Skip to main content
GET
/
directories
/
{id}
Get directory
curl --request GET \
  --url https://app.usechar.ai/api/directories/{id} \
  --header 'Authorization: Bearer <token>'
{
  "id": "<string>",
  "organization_id": "<string>",
  "workos_directory_id": "<string>",
  "name": "<string>",
  "type": "<string>",
  "state": "<string>",
  "domain": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "user_count": 0,
  "group_count": 0
}

Authorizations

Authorization
string
header
required

WorkOS JWT token. Obtain via WorkOS AuthKit authentication flow. The token must include organization_id claim for organization-scoped endpoints.

Path Parameters

id
string<uuid>
required

Unique identifier (UUID) of the resource

Response

OK

Directory connection with synced user and group counts

id
string
required

Internal ID for the directory connection.

organization_id
string
required

WorkOS organization ID that owns this directory connection.

workos_directory_id
string
required

WorkOS directory ID for this connection.

name
string
required

Directory name as configured in the identity provider.

type
string
required

Directory type (e.g., okta_scim, azure_scim, google_workspace).

state
string
required

Directory sync state (active, inactive, or deleting).

domain
string | null
required

Primary domain associated with the directory, if provided.

created_at
string<date-time>
required

Timestamp when the directory connection was created.

updated_at
string<date-time>
required

Timestamp when the directory connection was last updated.

user_count
integer
required

Number of users synced from this directory

Required range: -9007199254740991 <= x <= 9007199254740991
group_count
integer
required

Number of groups synced from this directory

Required range: -9007199254740991 <= x <= 9007199254740991