Project tokens
Create, list and revoke project API tokens.
A project token authenticates requests to a single project. You can restrict it further to one environment. Managing tokens over HTTP requires a signed-in session with access to the workspace.
BASE = https://api.cloud.simplifyd.com/v1/workspaces/{workspace}/projects/{project}/tokensSet BASE using your workspace and project slugs. Set SIMPLIFYD_SESSION_TOKEN to your signed-in session JWT and TOKEN to the token slug for revocation.
| Method and path | Response |
|---|---|
GET {BASE} | 200 OK with an array of tokens, including their slug and masked_key |
POST {BASE} | 201 Created with the new token, including its full value in key |
DELETE {BASE}/{token} | Revokes the token by its slug. Returns 200 OK with {"success":true}. |
Create a project token
POST {BASE}
Content-Type: application/jsonSend the signed-in session JWT as a bearer token.
Body
| Field | Description |
|---|---|
name | Required display name. |
env | Optional environment slug. Omit it for access to all environments in the project. |
curl --fail-with-body -X POST "$BASE" \
-H "Authorization: Bearer $SIMPLIFYD_SESSION_TOKEN" \
-H 'Content-Type: application/json' \
--data '{"name": "CI deploy", "env": "0192e7a0-55c1-7b3e-8f2d-4a1b6c9d0e14"}'const response = await fetch(`${BASE}`, {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.SIMPLIFYD_SESSION_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({"name": "CI deploy", "env": "0192e7a0-55c1-7b3e-8f2d-4a1b6c9d0e14"}),
});
const result = await response.json();
if (!response.ok) throw new Error(result.message ?? response.statusText);Response
201 Created.
{
"name": "CI deploy",
"slug": "0192e7a0-55c1-7b3e-8f2d-4a1b6c9d0e15",
"scope": "environment",
"project": "0192e7a0-55c1-7b3e-8f2d-4a1b6c9d0e13",
"env": {
"slug": "0192e7a0-55c1-7b3e-8f2d-4a1b6c9d0e14",
"name": "production"
},
"key": "sk_proj_example_only",
"masked_key": "sk_proj_********abcd",
"created_at": "0001-01-01T00:00:00Z"
}Store key in a secret store. Use the list endpoint for the recorded creation time. Use slug to revoke the token.
List project tokens
GET {BASE}Lists the tokens for one project. The full key is available only at creation.
curl --fail-with-body "$BASE" \
-H "Authorization: Bearer $SIMPLIFYD_SESSION_TOKEN"const response = await fetch(`${BASE}`, {
headers: {
Authorization: `Bearer ${process.env.SIMPLIFYD_SESSION_TOKEN}`,
},
});
const result = await response.json();
if (!response.ok) throw new Error(result.message ?? response.statusText);Response
200 OK.
[
{
"name": "CI deploy",
"slug": "0192e7a0-55c1-7b3e-8f2d-4a1b6c9d0e15",
"scope": "environment",
"project": "0192e7a0-55c1-7b3e-8f2d-4a1b6c9d0e13",
"env": {
"slug": "0192e7a0-55c1-7b3e-8f2d-4a1b6c9d0e14",
"name": "production"
},
"key": "",
"masked_key": "sk_proj_********abcd",
"created_at": "2026-01-15T12:00:00Z"
}
]Revoke a project token
DELETE {BASE}/{token}Use the token slug from the list or creation response.
curl --fail-with-body -X DELETE "$BASE/$TOKEN" \
-H "Authorization: Bearer $SIMPLIFYD_SESSION_TOKEN"const response = await fetch(`${BASE}/${TOKEN}`, {
method: 'DELETE',
headers: {
Authorization: `Bearer ${process.env.SIMPLIFYD_SESSION_TOKEN}`,
},
});
const result = await response.json();
if (!response.ok) throw new Error(result.message ?? response.statusText);Response
200 OK.
{
"success": true
}Errors
| Status | When |
|---|---|
400 | The name is missing or env is malformed. |
401 | The session is missing or invalid. |
403 | The caller lacks workspace access or supplied a project or workspace token. |