{
"success": true,
"data": {
"valid": true,
"tokenType": "api_key",
"scopes": [
"compositions:read",
"widgets:read"
],
"userId": "user_123",
"expiresAt": "2024-12-31T23:59:59Z",
"workspace": {
"id": "5f1c1a6e-2f0c-4f3a-9d0f-6a2a3a1c9b7e",
"name": "Studio"
}
},
"meta": {
"page": 1,
"size": 20,
"total": 135,
"limit": 20,
"offset": 0,
"hasNextPage": true,
"hasPreviousPage": false,
"nextCursor": "<string>",
"warnings": [
"<string>"
]
}
}{
"success": false,
"message": "<string>",
"error": {
"code": "RESOURCE_NOT_FOUND",
"message": "Composition not found",
"timestamp": "2026-10-15T10:00:00.000Z",
"param": "name",
"docUrl": "<string>",
"suggestedAction": "<string>",
"retryAfter": 60,
"details": {},
"correlationId": "req_123e4567-e89b-12d3-a456-426614174000"
}
}Validate an API key
Describes the credential the request was made with: how it signs in (tokenType), what it may do (scopes), the
account it belongs to (userId) and the workspace it works in (workspace). An API key works in the one workspace it
was made for, whichever workspace its owner is looking at on widgetic.com; a signed-in session names none (workspace
is null), and follows the workspace the person has chosen. A credential that belongs to the platform itself, and not to
a customer’s account, is held to no scope: it is answered with tokenType service_key, scopes ["*:*"], no userId
and no workspace.
{
"success": true,
"data": {
"valid": true,
"tokenType": "api_key",
"scopes": [
"compositions:read",
"widgets:read"
],
"userId": "user_123",
"expiresAt": "2024-12-31T23:59:59Z",
"workspace": {
"id": "5f1c1a6e-2f0c-4f3a-9d0f-6a2a3a1c9b7e",
"name": "Studio"
}
},
"meta": {
"page": 1,
"size": 20,
"total": 135,
"limit": 20,
"offset": 0,
"hasNextPage": true,
"hasPreviousPage": false,
"nextCursor": "<string>",
"warnings": [
"<string>"
]
}
}{
"success": false,
"message": "<string>",
"error": {
"code": "RESOURCE_NOT_FOUND",
"message": "Composition not found",
"timestamp": "2026-10-15T10:00:00.000Z",
"param": "name",
"docUrl": "<string>",
"suggestedAction": "<string>",
"retryAfter": 60,
"details": {},
"correlationId": "req_123e4567-e89b-12d3-a456-426614174000"
}
}Authorizations
Send your API key as a bearer token: Authorization: Bearer <your API key>. Make a key in the dashboard under Settings → API keys; a workspace key starts with wdg_org_ and works in the workspace it was made in. See API keys and Authentication.