Create SDK Token
Mint an SDK token for a workspace. The token is valid for 24 hours.
POST
Mints a signed SDK token tied to your API key and workspace.
No endpoint accepts this token yet. Connect a Web Call rejects it with 401 {"error": "Invalid token"}. Until that changes, start web calls from your server with your API key, and keep the key off the client.
Headers
x-api-keystringrequiredYour API key. This endpoint reads it directly: a dashboard session token is not enough, and the request fails with 400 without it.
x-workspace-idstringrequiredWorkspace identifier for the API. The key's user must be a member of this workspace.
Response Fields
statusstringsuccess.
sdk_tokenstringThe SDK token.
expires_innumberSeconds until the token expires: 86400 (24 hours).
Errors
| Status | Body | When |
|---|---|---|
400 | {"error": "Missing required headers: x-api-key and x-workspace-id are required"} | A header is missing |
401 | {"error": "Unauthorized Api Key"} | The API key is not valid |
403 | {"error": "Unauthorized API key. User is not included in the workspace."} | The key's user isn't in that workspace |
500 | {"error": "Internal server error"} | Server error |
{
"status": "success",
"sdk_token": "eyJ3b3Jrc3BhY2VJZCI6IjY2NGExYjJj...",
"expires_in": 86400
}Last updated on