Skip to content
Dashboard
Theme
Theme

Create a directory

POST /v1/directories: Create a directory.

View Markdown

A SCIM directory’s URL and token returned once.

POST /v1/directories

Scope
directories:write
Auth
Secret key (sk_…)
Since
1.0
  • OhAuthCat-Version string

    Minor version; defaults to the environment’s pin.

  • Idempotency-Key string

    Honoured for 24 h; a replay returns the original response.

    min length 1 · max length 255

  • organization string Required

  • name string

  • provider string Required

    A directory provider of GET /v1/providers. google is Google Workspace SCIM push from Google’s custom SCIM profiles beta: people only, no groups, and only Workspaces admitted to Google’s beta. google_admin_sdk (Connect Google) is the recommended Google Workspace source and syncs people and groups.

    one of okta, entra, google, onelogin, jumpcloud, generic, cyberark, pingfederate, rippling, sailpoint, csv, bamboohr, rippling_hris, google_admin_sdk, sftp_csv, workday, hibob, personio, gusto

Errors share one shape; see the error code catalogue.

curl -X POST \
"https://api.ohauthcat.com/v1/directories" \
-H "Authorization: Bearer $OHAUTHCAT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"organization": "org_01J9Z3K5V7W8X9Y0Z1A2B3C4D5",
"provider": "okta"
}'
Response 201
{
"directory": {
"google_oauth_available": true,
"bamboohr_oauth_available": true,
"gusto_oauth_available": true,
"id": "dir_01J9Z3K5V7W8X9Y0Z1A2B3C4D5",
"object": "directory",
"legacy_ids": {
"workos": "org_01H8ZQ4M7K2X8V3N5B6C1D0E9F"
},
"organization_id": "org_01J9Z3K5V7W8X9Y0Z1A2B3C4D5",
"name": "Acme Corp",
"provider": "okta",
"state": "awaiting_first_request",
"scim_base_url": "https://app.acme.com/callback",
"created_at": "2026-01-15T09:30:00Z"
},
"scim_base_url": "https://app.acme.com/callback",
"token": "sk_test_example",
"previous_token_expires_at": "2026-01-15T09:30:00Z"
}