Skip to Content
APIEndpointsRun alignment check

Run alignment check

Runs every active alignment prompt now, instead of waiting for the daily cadence — the same flow as the “Run your first scan” button in the app. There is no configuration on this call: it runs whatever is already set up on the Alignment Prompts page.

This call returns immediately once the check is dispatched. Poll Get alignment run status until is_analyzing is false, then read the results with Get alignment and List alignment claims.

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

POST /v1/brands/{brand_id}/alignment/execute

Authorization

HeaderTypeRequired
AuthorizationBearer asky_sk_…required
Idempotency-Keystringrequired

Path parameters

ParameterTypeRequiredDescription
brand_iduuidrequiredFrom List brands

Body

application/json. This endpoint takes no fields — send {} or an empty body.

Any field you pass returns 400 invalid_request naming it.

Request

curl --request POST \ --url 'https://api.askylabs.com/v1/brands/242546de-4cee-4a7d-952e-f6aa60c63ef8/alignment/execute' \ --header 'Authorization: Bearer <api-key>' \ --header 'Idempotency-Key: 5b0e77d2-13a9-4f6a-8ce1-9a3f5e21c0aa' \ --header 'Content-Type: application/json' \ --data '{}'

Response

{ "data": { "dispatched": true, "already_running": false }, "request_id": "req_7d21b0af59c34e18b6ac" }

Response fields

FieldTypeDescription
data.dispatchedbooleanrequired. true if this call started a new check. false if one was already running today — see Notes
data.already_runningbooleanrequired. true when today’s check (from a previous call, or the daily cron) was already in flight. dispatched is false whenever this is true
request_idstringrequired. Also returned as the x-request-id header. Quote it when contacting support

Errors

StatusCodeWhen
400invalid_requestUnknown field in the body, or this brand has no active alignment prompts
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
403plan_requiredBrand alignment is not included in this workspace’s plan
404not_foundThe brand does not exist, or this key is not allowed to reach it
429rate_limitedOver 60 requests per minute

Notes

At most one check per brand per UTC calendar day. A check already running today — whether started by a previous call to this endpoint or by the daily 04:00 UTC scan — is a no-op, not an error: you get back dispatched: false, already_running: true with a 200. It is always safe to call this repeatedly.

There is no per-call configuration. This runs every currently-active alignment prompt across every market and engine the brand already has set up. To change what runs, edit the prompts first with Create alignment prompt, Update alignment prompt or Update alignment prompt markets.

This only starts the check. Poll Get alignment run status for completion — dispatched tells you whether this call kicked it off, not whether it has finished.

Idempotency-Key is required. Reuse it when retrying an attempt and the original response is replayed rather than a second dispatch attempt being made. See Idempotency.

Last updated on