List alignment categories
The brand’s alignment categories — how alignment prompts and claims are grouped, for example
“Pricing” or “Support”. Prompts and claims with no category are not represented here; to see
them elsewhere, filter for category_id absent rather than looking for an “Uncategorised” row.
Get id from here for the category_id filters on
Get alignment,
List alignment claims and
List alignment prompts.
Requires the read:alignment scope. Managing categories needs write:alignment.
GET /v1/brands/{brand_id}/alignment/categoriesAuthorization
| Header | Type | Required |
|---|---|---|
Authorization | Bearer asky_sk_… | required |
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
brand_id | uuid | required | From List brands |
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
limit | integer | optional | Rows per page, 1 to 100. Defaults to 20. |
cursor | string | optional | Opaque cursor from the previous response. Treat it as a token, never construct one. |
Request
cURL
curl --request GET \
--url 'https://api.askylabs.com/v1/brands/242546de-4cee-4a7d-952e-f6aa60c63ef8/alignment/categories?limit=50' \
--header 'Authorization: Bearer <api-key>'Response
200
{
"data": [
{
"id": "8f3d2c1b-6a94-4e57-9c02-1b7f4d3a8e65",
"name": "Pricing",
"slug": "pricing",
"description": "Claims about cost, plans and billing.",
"sort_order": 0,
"is_system": false,
"active_prompt_count": 6
},
{
"id": "2e9a5c17-4f8b-4d31-9a02-6c3f7e1b9d40",
"name": "Support",
"slug": "support",
"description": null,
"sort_order": 1,
"is_system": true,
"active_prompt_count": 3
}
],
"pagination": {
"limit": 50,
"has_more": false,
"next_cursor": null
},
"request_id": "req_2f7b90c14ae8471da3cd"
}Response fields
| Field | Type | Description |
|---|---|---|
data[].id | uuid | required. Use it as the category_id filter elsewhere, or with Update / Delete alignment category |
data[].name | string | required |
data[].slug | string | required. Derived from the name, unique per brand |
data[].description | string | null | required |
data[].sort_order | integer | required. Display order in the app |
data[].is_system | boolean | required. true for a small set of categories seeded automatically; always false for one you create through this API |
data[].active_prompt_count | integer | required. Active alignment prompts currently assigned to this category |
request_id | string | required. Also returned as the x-request-id header. Quote it when contacting support |
Errors
| Status | Code | When |
|---|---|---|
| 400 | invalid_request | A parameter is unknown or malformed. The message names it |
| 401 | invalid_token | The key is missing, malformed, or does not exist |
| 401 | token_expired | The key passed its expiry date |
| 401 | token_revoked | The key was revoked |
| 403 | insufficient_scope | The key does not carry read:alignment |
| 404 | not_found | The brand does not exist, or this key is not allowed to reach it |
| 429 | rate_limited | Over 300 requests per minute |
Notes
No category filters here. Unlike most list endpoints, there is nothing to narrow this one by besides pagination — a brand’s category list is small and bounded, so you get all of it.
Uncategorised prompts and claims are invisible to this endpoint. There is no “Uncategorised”
row with id: null. On the endpoints that accept a category_id filter, simply omit it to include
everything, categorised or not.
active_prompt_count only counts active prompts. A category with prompts that were later
deactivated, or with no prompts at all, can legitimately show 0 while still existing.