Skip to Content
APIEndpointsDelete alignment prompts

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 italignment_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/prompts

Authorization

HeaderTypeRequired
AuthorizationBearer asky_sk_…required
Idempotency-Keystringrequired

Path parameters

ParameterTypeRequiredDescription
brand_iduuidrequiredFrom List brands

Body

application/json

FieldTypeRequiredDescription
prompt_idsuuid[], 1-500requiredFrom List alignment prompts

Request

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

{ "data": { "deleted_prompt_ids": ["b4e91f2a-6c8d-4a17-9d35-2f7b81e4c9a6"] }, "request_id": "req_5c1e93f8a2074b6dbf30" }

Response fields

FieldTypeDescription
data.deleted_prompt_idsuuid[]required. Same set as prompt_ids, once every id has been verified to belong to this brand
request_idstringrequired. Also returned as the x-request-id header. Quote it when contacting support

Errors

StatusCodeWhen
400invalid_requestprompt_ids is empty, over 500 entries, or contains an id not found for this brand
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 brand does not exist, or this key is not allowed to reach it
429rate_limitedOver 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.

Last updated on