Delete alignment prompts
Deletes one or more alignment prompts. This mirrors the app exactly: there is no dedicated delete RPC, just a plain delete against the table, and no dry-run preview — the app itself does not offer one either.
There is no soft delete, no archive and no pause on delete, so this is the only way to stop an
alignment prompt running. To pause one instead and keep its history, use
Update alignment prompt markets with
is_active: false.
This cascades. Unlike Delete prompts for regular tracked
prompts, deleting an alignment prompt takes its execution history and claims with it —
alignment_executions and alignment_execution_jobs both reference the prompt with
ON DELETE CASCADE. There is no detach-and-keep here.
Bulk-shaped only. There is no single-prompt delete endpoint; send one id for the single-row case.
Requires the write:alignment scope.
DELETE /v1/brands/{brand_id}/alignment/promptsAuthorization
| 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 |
Body
application/json
| Field | Type | Required | Description |
|---|---|---|---|
prompt_ids | uuid[], 1-500 | required | From List alignment prompts |
Request
cURL
curl --request DELETE \
--url 'https://api.askylabs.com/v1/brands/242546de-4cee-4a7d-952e-f6aa60c63ef8/alignment/prompts' \
--header 'Authorization: Bearer <api-key>' \
--header 'Idempotency-Key: 1e4a92c7-6b0d-4f38-9d15-3a7c8e2f5b19' \
--header 'Content-Type: application/json' \
--data '{"prompt_ids": ["b4e91f2a-6c8d-4a17-9d35-2f7b81e4c9a6"]}'Response
200
{
"data": {
"deleted_prompt_ids": ["b4e91f2a-6c8d-4a17-9d35-2f7b81e4c9a6"]
},
"request_id": "req_5c1e93f8a2074b6dbf30"
}Response fields
| Field | Type | Description |
|---|---|---|
data.deleted_prompt_ids | uuid[] | required. Same set as prompt_ids, once every id has been verified to belong to this brand |
request_id | string | required. Also returned as the x-request-id header. Quote it when contacting support |
Errors
| Status | Code | When |
|---|---|---|
| 400 | invalid_request | prompt_ids is empty, over 500 entries, or contains an id not found for this brand |
| 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, or this key is not allowed to reach it |
| 429 | rate_limited | Over 60 requests per minute |
Notes
Deletion cascades, unlike regular prompts. Delete prompts
detaches a tracked prompt’s execution history so the underlying answer records survive as
orphaned rows. Alignment prompts have no such detach step: alignment_executions and
alignment_execution_jobs carry ON DELETE CASCADE to alignment_prompt_id, so every run,
claim, citation and piece of evidence tied to a deleted alignment prompt is removed in the same
transaction. There is nothing left to read back afterward, and nothing to restore.
Prefer deactivating if you might want the history later. Send
is_active: false to Update alignment prompt markets
instead of deleting — it frees the prompt’s quota slot the same way, but keeps every past claim
in place and lets you reactivate later.
Validation is all-or-nothing. An id that is missing or belongs to another brand refuses the entire call and names every offender — nothing is deleted unless every id checks out.
Deletion is permanent, and there is no lighter alternative once you commit to it. The app asks for typed confirmation before a bulk delete, precisely because the history goes with it. Over HTTP there is no typing step, so a script deleting in a loop has no friction at all. Build your own check before looping.
Up to 500 ids per call, wider than the 200-id cap on Delete prompts for regular prompts.