Set up or change the organization's directory
People only, with a fresh second factor.
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
| Name | In | Type | Required | What it is |
|---|---|---|---|---|
project | query | string | Yes | The project the call is about. Every route is scoped to one. |
Pod-Organisation | header | string | No | The organization, for a person who belongs to several. An API key's organization is its own, and a different one here is forbidden. |
Idempotency-Key | header | string | No | Makes a repeat of this call safe for 24 hours. |
Body
| Field | Type | Required | What it is |
|---|---|---|---|
source | "scim" | "oidc" | Yes | |
base_version | integer | Yes | The directory's version the change was made from; 0 to make it. At least 0. |
oidc | DirectoryOidcRequest | null | No | The 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_claim | string | No | Default "sub". |
groups_claim | string | No | Default "groups". |
membership_ttl_s | integer | No | Default 43200. From 300 to 86400. |
new_scim_token | boolean | No | Default false. |
Answer
200. The directory as set, with a new SCIM token when one was made.
{
"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
}| Field | Type | Always | What it is |
|---|---|---|---|
source | "scim" | "oidc" | Yes | Where 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. |
oidc | DirectoryOidc | null | Yes | How the identity provider's sign-in tokens are checked; null when not set. |
subject_claim | string | Yes | The sign-in token's claim that names the person, as SCIM's externalId does. |
groups_claim | string | Yes | |
membership_ttl_s | integer | Yes | From 300 to 86400. |
scim_token_made_at | string | null | Yes | When the SCIM token in use was made; null for a directory of sign-in tokens. |
people | integer | Yes | At least 0. |
groups | integer | Yes | At least 0. |
linked_accounts | integer | Yes | Identity accounts linked to a person of the directory by a sign-in through it. At least 0. |
version | integer | Yes | At least 1. |
updated_at | string | Yes | RFC 3339 in UTC with milliseconds, for example 2026-11-23T17:04:05.123Z. |
updated_by | string | Yes | Who made a change. An identity account id for a person, or a key id (key_…) for an API key. |
scim_token | string | null | Yes | The 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.