latestOpenAPI 3.0.3MITraw.githubusercontent.com2026-08-14249167721.0 KB

75df3a43fcb2

Directories

Rotate a directory's API key

Generates a new API key for the directory and returns it in the api_key field. This is the only way to obtain the key after creation, so make sure to update it in your identity provider. The previous key remains valid for a short grace period before it expires.

post/directories/{directory_id}/rotate_api_key

Path parameters

directory_idstring required

The ID of the directory whose API key to rotate

Response

A directory

object'directory' required

String representing the object's type. Always "directory".

idstring required

Unique identifier for the directory.

namestring required

A human-friendly name for the directory.

enterprise_connection_idstring nullable

The ID of the associated enterprise connection.

endpoint_urlstring required

The provisioning endpoint URL for this directory.

providerstring required

The identity provider for this directory.

enabledboolean required

Whether the directory is enabled.

group_role_mapping_enabledboolean required

Whether group-to-role mapping is enabled for this directory.

attribute_mappingobject required

Mapping of user attributes to the directory attribute paths they are extracted from.

api_keystring nullable

The API key for authenticating provisioning requests. Only returned when the directory is created or the key is rotated.

created_atinteger required

Unix timestamp when the directory was created.

updated_atinteger required

Unix timestamp when the directory was last updated.