Skip to Content
APIEndpointsUpdate alignment category fact

Update alignment category fact

Changes an existing fact’s text and/or its position within its scope. A fact’s category is fixed at creation: this endpoint can never move a fact between categories, or between a category and brand-wide — send category_id and it is refused as an unknown field.

Requires the write:alignment scope, and the workspace must be enabled for API writes.

PATCH /v1/brands/{brand_id}/alignment/category-facts/{fact_id}

Authorization

HeaderTypeRequired
AuthorizationBearer asky_sk_…required
Idempotency-Keystringrequired

Path parameters

ParameterTypeRequiredDescription
brand_iduuidrequiredFrom List brands
fact_iduuidrequiredFrom List alignment category facts

Query parameters

None.

Body

application/json

FieldTypeRequiredDescription
fact_textstring, 1–1000 charsrequiredThe verified statement. Replaces the previous text entirely. Required on every call — resend the current text if you are only changing sort_order
sort_orderintegeroptionalNew position within the fact’s existing category (or brand-wide group). Omitted leaves it unchanged

Request

curl --request PATCH \ --url 'https://api.askylabs.com/v1/brands/242546de-4cee-4a7d-952e-f6aa60c63ef8/alignment/category-facts/3f8b0e6a-9c42-4e17-8f0b-6c951a2d7e40' \ --header 'Authorization: Bearer <api-key>' \ --header 'Idempotency-Key: <unique-per-attempt>' \ --header 'Content-Type: application/json' \ --data '{"fact_text":"Enterprise plans include SSO via SAML and OAuth 2.0, and SCIM provisioning, at no extra cost.","sort_order":2}'

Response

{ "data": { "fact": { "id": "3f8b0e6a-9c42-4e17-8f0b-6c951a2d7e40", "category_id": "b19f3c02-8e41-4b6a-9c17-5d2a781fe346", "fact_text": "Enterprise plans include SSO via SAML and OAuth 2.0, and SCIM provisioning, at no extra cost.", "sort_order": 2, "created_at": "2026-08-12T10:02:31.884Z", "updated_at": "2026-08-30T09:16:47.118Z" } }, "request_id": "req_7d21b0af59c34e18b6ac" }

Response fields

The fact after the change, in the same shape List alignment category facts returns its rows.

FieldTypeDescription
data.fact.iduuidrequired
data.fact.category_iduuid | nullrequired. Unchanged by this call — see Notes
data.fact.fact_textstringrequired
data.fact.sort_orderintegerrequired
data.fact.created_attimestamptzrequired
data.fact.updated_attimestamptzrequired
request_idstringrequired

Errors

StatusCodeWhen
400invalid_requestUnknown field (including category_id), a body missing fact_text, fact_text empty or over 1000 characters, or sort_order not an integer
401invalid_tokenThe key is missing, malformed, or does not exist
401token_expiredThe key passed its expiry date
401token_revokedThe key was revoked
403insufficient_scopeThe key does not carry write:alignment
403plan_requiredThis workspace is not enabled for API writes
404not_foundThe fact does not exist or belongs to another brand
429rate_limitedOver 60 requests per minute

Notes

fact_text is required on every call, not optional. Unlike sort_order, there is no partial update for it — to reposition a fact without changing its wording, resend the current fact_text alongside the new sort_order.

category_id cannot be changed here. An update never moves a fact between categories, or between a category and brand-wide. Sending category_id returns 400; to recategorise a fact, delete it with Delete alignment category facts and create it again in the category you want.

Idempotency-Key is required. See Idempotency.

Last updated on