Delete prompts
Deletes one or more 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, so this is the only way to stop a prompt running.
Bulk-shaped only. There is no single-prompt delete endpoint; send one id for the single-row case.
Requires the write:prompts scope.
DELETE /v1/brands/{brand_id}/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-200 | required | From List prompts |
Request
cURL
curl --request DELETE \
--url 'https://api.askylabs.com/v1/brands/242546de-4cee-4a7d-952e-f6aa60c63ef8/prompts' \
--header 'Authorization: Bearer <api-key>' \
--header 'Idempotency-Key: 5b0e77d2-13a9-4f6a-8ce1-9a3f5e21c0aa' \
--header 'Content-Type: application/json' \
--data '{"prompt_ids": ["7c2f5a91-3b8e-4d06-9a44-1e7b30c9f852"]}'Response
200
{
"data": {
"deleted_prompt_ids": ["7c2f5a91-3b8e-4d06-9a44-1e7b30c9f852"]
},
"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 200 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:prompts |
| 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
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. The app asks for typed confirmation before a bulk delete of 25 prompts or more, precisely because the history goes with them. 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.
Execution history is detached, not deleted. The underlying answer records survive — they simply no longer roll up under a prompt. They still count toward brand-level totals.
Tags and other prompt-scoped rows are cleaned up automatically. Tag assignments and per-prompt analytics referencing a deleted prompt are removed by the database itself; nothing to do on your side.