Skip to content
Dashboard
Theme
Theme

Rotate the SCIM token

POST /v1/directories/{dir}/rotate_token: Rotate the SCIM token.

View Markdown

1 h overlap.

POST /v1/directories/{dir}/rotate_token

Scope
directories:write
Auth
Secret key (sk_…)
Since
1.0
  • dir string Required

  • 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

Errors share one shape; see the error code catalogue.

curl -X POST \
"https://api.ohauthcat.com/v1/directories/dir_01J9Z3K5V7W8X9Y0Z1A2B3C4D5/rotate_token" \
-H "Authorization: Bearer $OHAUTHCAT_API_KEY"
Response 200
{
"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"
}