Set up or change the organization's directory

People only, with a fresh second factor.

PUT/v1/directory

Not available yet Pod's API does not answer this call yet.

People only, with a fresh second factor. Sets where the organization's groups come from and how the identity provider's sign-in tokens are checked. A SCIM directory gets a SCIM token when it is made, and a new one when new_scim_token is true; the token is in this answer only (scim_token), never stored here in the clear, and the old one stops working at once. A repeat of the call with the same Idempotency-Key answers without the token. Changing the source is conflict: delete the directory first. base_version is 0 to make it.

For people only: a signed-in person with a fresh second factor makes this call, from the dashboard. Any API key is refused with person_required.

Request

curl -X PUT "https://api.pod.mapier.ai/v1/directory?project=example" \
  -H "Authorization: Bearer $POD_PERSON_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"source":"scim","base_version":0}'

Parameters

NameInTypeRequiredWhat it is
projectquerystringYesThe project the call is about. Every route is scoped to one.
Pod-OrganisationheaderstringNoThe organization, for a person who belongs to several. An API key's organization is its own, and a different one here is forbidden.
Idempotency-KeyheaderstringNoMakes a repeat of this call safe for 24 hours.

Body

FieldTypeRequiredWhat it is
source"scim" | "oidc"Yes
base_versionintegerYesThe directory's version the change was made from; 0 to make it. At least 0.
oidcDirectoryOidcRequest | nullNoThe identity provider's issuer, Pod's client id there, and its key set (JWKS) as a document. Needed for oidc, and for linking accounts to a SCIM directory's people. This service never fetches it.
subject_claimstringNoDefault "sub".
groups_claimstringNoDefault "groups".
membership_ttl_sintegerNoDefault 43200. From 300 to 86400.
new_scim_tokenbooleanNoDefault false.

Answer

200. The directory as set, with a new SCIM token when one was made.

200
{
  "source": "scim",
  "oidc": null,
  "subject_claim": "example",
  "groups_claim": "example",
  "membership_ttl_s": 300,
  "scim_token_made_at": null,
  "people": 0,
  "groups": 0,
  "linked_accounts": 0,
  "version": 1,
  "updated_at": "2026-11-23T12:00:00.000Z",
  "updated_by": "example",
  "scim_token": null
}
FieldTypeAlwaysWhat it is
source"scim" | "oidc"YesWhere groups come from: pushed by the identity provider over SCIM 2.0 to /scim/v2, or the groups claim of its sign-in tokens, each membership lapsing after membership_ttl_s without a newer sign-in.
oidcDirectoryOidc | nullYesHow the identity provider's sign-in tokens are checked; null when not set.
subject_claimstringYesThe sign-in token's claim that names the person, as SCIM's externalId does.
groups_claimstringYes
membership_ttl_sintegerYesFrom 300 to 86400.
scim_token_made_atstring | nullYesWhen the SCIM token in use was made; null for a directory of sign-in tokens.
peopleintegerYesAt least 0.
groupsintegerYesAt least 0.
linked_accountsintegerYesIdentity accounts linked to a person of the directory by a sign-in through it. At least 0.
versionintegerYesAt least 1.
updated_atstringYesRFC 3339 in UTC with milliseconds, for example 2026-11-23T17:04:05.123Z.
updated_bystringYesWho made a change. An identity account id for a person, or a key id (key_…) for an API key.
scim_tokenstring | nullYesThe new SCIM token, shown this once; null when none was made. Give it to the identity provider as the bearer token of its SCIM app.

Errors

The refusals this call is known for: invalid, unauthorized, person_required, forbidden, conflict. Any call can also answer unauthorized, rate_limited, unavailable or internal; the error list says what each means and when to send the call again.