Skip to Content
APIEndpointsUpdate fact

Update fact

Changes a verified fact’s text or its position in the list. Send only what you want to change.

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

PATCH /v1/brands/{brand_id}/facts/{fact_id}

Authorization

HeaderTypeRequired
AuthorizationBearer asky_sk_…required
Idempotency-Keystringrequired

Path parameters

ParameterTypeRequiredDescription
brand_iduuidrequiredFrom List brands
fact_iduuidrequiredFrom verified_facts[].id on Get brand profile

Query parameters

None.

Any parameter you pass returns 400 invalid_request naming the offending key, rather than being ignored silently.

Body

application/json. At least one field is required.

FieldTypeRequiredDescription
fact_textstring, 1–300 charsoptionalThe statement text
sort_orderinteger, 0–10000optionalDisplay position

Request

curl --request PATCH \ --url 'https://api.askylabs.com/v1/brands/242546de-4cee-4a7d-952e-f6aa60c63ef8/facts/9f2c1d84-6b31-4a2e-9c77-1e5b0a3f8d42' \ --header 'Authorization: Bearer <api-key>' \ --header 'Idempotency-Key: <unique-per-attempt>' \ --header 'Content-Type: application/json' \ --data '{"fact_text":"Asky was founded in 2025 and is headquartered in Stockholm, Sweden."}'

Response

{ "data": { "fact": { "id": "9f2c1d84-6b31-4a2e-9c77-1e5b0a3f8d42", "fact": "Asky was founded in 2025 and is headquartered in Stockholm, Sweden.", "sort_order": 3 } }, "request_id": "req_7d21b0af59c34e18b6ac" }

Response fields

FieldTypeDescription
data.fact.iduuidrequired
data.fact.factstringrequired. The statement text
data.fact.sort_orderintegerrequired
request_idstringrequired. Also returned as the x-request-id header

Errors

StatusCodeWhen
400invalid_requestAn unknown field, a body with neither field, or a value over its limit
401invalid_tokenThe key is missing, malformed, or does not exist
403insufficient_scopeThe key does not carry write:brand_profile
403plan_requiredThis workspace is not enabled for API writes
404not_foundThe fact does not exist, belongs to another brand, or belongs to an alignment category
429rate_limitedOver 60 requests per minute. See the Retry-After header

Notes

A fact owned by an alignment category returns 404, the same as one that does not exist. Only brand-level facts — the ones the Facts tab manages — are editable here, and the two cases are deliberately indistinguishable so a caller cannot probe for facts they may not touch.

sort_order is not compacted. Positions are whatever you set; gaps and ties are allowed, and ties fall back to insertion order. Renumber the whole list yourself if you need it dense.

Idempotency-Key is required. See Idempotency.

Last updated on