Issue a SCIM token
const url = 'https://beta-api.plune.ai/v1/companies/example/scim/tokens';const options = { method: 'POST', headers: { cookie: 'plune_session=<plune_session>', 'Content-Type': 'application/json' }, body: '{"expiresInDays":365}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”Request Body
Section titled “Request Body ”object
Example
{ "expiresInDays": 365}Responses
Section titled “ Responses ”The token, with its value this once
object
The non-secret start of the value.
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.
Example
{ "prefix": "plune_scim_Ab12Cd", "token": "plune_scim_…"}expiresInDays outside 1-365
object
Example generated
{ "error": "example"}No session
object
Example generated
{ "error": "example"}Not the owner, or no Enterprise (code: enterprise_required)
object
Example generated
{ "error": "example"}A company the caller is not in
object
Example generated
{ "error": "example"}2 tokens are live already (code: scim_token_limit): revoke one first
object
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.
object
Example generated
{ "error": "example"}Headers
Section titled “Headers ”Seconds until the window rolls over