Create alignment category fact
Creates a fact — a verified statement about the brand that future Brand Alignment runs grade
AI-stated claims against, e.g. “Ships to 12 EU countries”. Scope it to a category with
category_id, or omit category_id for a brand-wide fact that applies to claims in every
category. Matches the “Add fact” action on the Alignment Prompts page, and the claim sheet’s
“Add to brand facts” shortcut when category_id is omitted.
Get category ids from List alignment categories.
Requires the write:alignment scope, and the workspace must be enabled for API writes.
POST /v1/brands/{brand_id}/alignment/category-factsAuthorization
| Header | Type | Required |
|---|---|---|
Authorization | Bearer asky_sk_… | required |
Idempotency-Key | string | required |
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
brand_id | uuid | required | From List brands |
Query parameters
None.
Any parameter you pass returns 400 invalid_request naming the offending key.
Body
application/json
| Field | Type | Required | Description |
|---|---|---|---|
category_id | uuid | null | optional | Scope the fact to this category, from List alignment categories. Omit or send null for a brand-wide fact |
fact_text | string, 1–1000 chars | required | The verified statement. Cannot be empty |
sort_order | integer | optional | Position within its scope. Defaults to appended after the last fact in the same category (or the brand-wide group) |
Request
cURL
curl --request POST \
--url 'https://api.askylabs.com/v1/brands/242546de-4cee-4a7d-952e-f6aa60c63ef8/alignment/category-facts' \
--header 'Authorization: Bearer <api-key>' \
--header 'Idempotency-Key: <unique-per-attempt>' \
--header 'Content-Type: application/json' \
--data '{"category_id":"b19f3c02-8e41-4b6a-9c17-5d2a781fe346","fact_text":"Enterprise plans include SSO via SAML and OAuth 2.0 at no extra cost."}'Response
200
{
"data": {
"fact": {
"id": "e4a1c8f0-6b39-4d72-8a95-1f0c3e7b4d62",
"category_id": "b19f3c02-8e41-4b6a-9c17-5d2a781fe346",
"fact_text": "Enterprise plans include SSO via SAML and OAuth 2.0 at no extra cost.",
"sort_order": 2,
"created_at": "2026-08-30T09:16:47.118Z",
"updated_at": "2026-08-30T09:16:47.118Z"
}
},
"request_id": "req_7d21b0af59c34e18b6ac"
}Response fields
| Field | Type | Description |
|---|---|---|
data.fact.id | uuid | required. Use it as fact_id with Update / Delete alignment category facts |
data.fact.category_id | uuid | null | required. null means brand-wide |
data.fact.fact_text | string | required |
data.fact.sort_order | integer | required |
data.fact.created_at | timestamptz | required |
data.fact.updated_at | timestamptz | required |
request_id | string | required. Also returned as the x-request-id header |
Errors
| Status | Code | When |
|---|---|---|
| 400 | invalid_request | Unknown field, fact_text empty or over 1000 characters, or sort_order not an integer |
| 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 write:alignment |
| 403 | plan_required | This workspace is not enabled for API writes |
| 404 | not_found | The brand does not exist, this key is not allowed to reach it, or category_id does not exist for this brand |
| 429 | rate_limited | Over 60 requests per minute |
Notes
category_id is set once. Update alignment category fact
cannot move a fact to a different category afterwards — delete it and create a new one in the
category you want instead.
Omit category_id for a brand-wide fact. It is checked against claims in every category, not
just one — the same effect as the claim sheet’s “Add to brand facts” shortcut in the app.
sort_order defaults to appended last. Leave it unset and the fact is placed after every
existing fact in the same scope (its category, or the brand-wide group); pass a value to insert it
somewhere specific.
Idempotency-Key is required. Reuse it when retrying an attempt and the original response is
replayed rather than a second fact being created. See Idempotency.