Skip to main content
POST
Make a directory token
Takes a managing key (oc_key_...) or a signed-in session. See Editions for what OneCLI Cloud adds. Makes a token for the organization’s directory to sync with. The answer shows it once. Needs a plan with directory sync.
Availability: OneCLI Cloud only. A self-hosted deployment does not serve this endpoint and answers 404 with error.code: "not_found".

Authorizations

Authorization
string
header
required

A managing key (oc_key_...), an older API key (oc_...), or a signed-in session.

Headers

Idempotency-Key
string

Not accepted on this call. Sending it is 400 bad_request.

Required string length: 1 - 255

Body

application/json
label
string
required

A name for it, such as the directory it is for.

Required string length: 1 - 64

Response

The new token, with its value shown once.

createdAt
string
required
id
string
required
label
string
required
lastUsedAt
string | null
required
token
string
required

The token. Shown this once: it cannot be read again.