Skip to content

Issue a SCIM token

POST
/v1/companies/{id}/scim/tokens
curl --request POST \
--url https://beta-api.plune.ai/v1/companies/example/scim/tokens \
--header 'Content-Type: application/json' \
--cookie plune_session=<plune_session> \
--data '{ "expiresInDays": 365 }'

For the company’s directory (Okta: the API token; Entra: the Secret Token). The value is in this answer and nowhere else - the server keeps its SHA-256. It ends after expiresInDays (1-365, 365 when left out); at most 2 live at once, so the directory’s token is replaced without a gap. A company log entry scim.token_issued. The owner only, with the session; 10 a minute. A company without Enterprise in active or grace is refused 403 enterprise_required; it loses nothing and nobody is switched off.

id
required
string
Media type application/json
object
expiresInDays
integer
>= 1 <= 365
Example
{
"expiresInDays": 365
}

The token, with its value this once

Media type application/json
object
id
required
string
prefix
required

The non-secret start of the value.

string
createdBy
required
string
createdAt
required
string format: date-time
expiresAt
required
string format: date-time
revokedAt
required
string format: date-time
nullable
lastUsedAt
required

The last request the directory made with it; null before the first. Written at most once a minute, so it can be up to a minute behind.

string format: date-time
nullable
token
required
string
Example
{
"prefix": "plune_scim_Ab12Cd",
"token": "plune_scim_…"
}

expiresInDays outside 1-365

Media type application/json
object
error
required
string
Example generated
{
"error": "example"
}

No session

Media type application/json
object
error
required
string
Example generated
{
"error": "example"
}

Not the owner, or no Enterprise (code: enterprise_required)

Media type application/json
object
error
required
string
Example generated
{
"error": "example"
}

A company the caller is not in

Media type application/json
object
error
required
string
Example generated
{
"error": "example"
}

2 tokens are live already (code: scim_token_limit): revoke one first

Media type application/json
object
error
required
string
Example generated
{
"error": "example"
}

Rate-limited: the per-route throttle, or the per-minute request limit of the plan an API token counts by (#1442; the body names the plan, #2092). Retry-After carries the seconds until the window rolls over.

Media type application/json
object
error
required
string
Example generated
{
"error": "example"
}
Retry-After
integer

Seconds until the window rolls over