PromptsArchive Prompts

Archive Prompts

Archive up to 100 active prompts so that they stop being analyzed. Each archived prompt refunds one prompt credit.

curl --request POST \
  --url https://api.aiclicks.io/api/v1/prompts/archive \
  --header 'Authorization: Bearer ak_live_xxx' \
  --header 'Content-Type: application/json' \
  --data '{
    "domain_id": "8f1d3c0a-2f9b-4c11-9b80-7a82e1f0c3f3",
    "prompt_ids": [
      "21c1f9aa-9b6d-4e3a-8a31-2b0c0e1f2a3b",
      "5b7e2d10-4c3a-4f8e-9d21-6a0b1c2d3e4f"
    ]
  }'
{
  "data": {
    "success": true,
    "archived_count": 2,
    "archived_query_count": 2,
    "archived_topic_query_count": 0,
    "credits_refunded": 2,
    "previous_remaining": 40,
    "new_remaining": 42
  },
  "generated_at": "2026-11-09T10:00:11.218000+00:00"
}

Archives active prompts of a domain. An archived prompt is not in the next analysis runs. The API keeps the history of the prompt. Each archived prompt gives one prompt credit back to the team.

Send 1 to 100 prompt IDs. All IDs must be active prompts of the domain. If one ID is not, the call returns 404 and the API archives no prompts. Find prompt IDs with GET /api/v1/prompts.

Archived prompts stop collecting new answers. Metrics for the domain then use fewer prompts. Archive prompts only when you do not want to track them.

Authorizations

header
Authorizationstring
Required

Your API key in the format Bearer ak_live_<your-key>. Create a key in the dashboard under Settings → Developers. The key must have access to the team that owns domain_id.

header
Content-Typestring
Required

Must be application/json.

Body parameters

body
domain_idstring
Required

UUID of the domain that owns the prompts.

body
prompt_idsarray
Required

UUIDs of the prompts to archive. Send 1 to 100 IDs. Each ID must be an active prompt of the domain.

Response

data.successboolean
Required

true when the archive is complete.

data.archived_countinteger
Required

The number of prompts that the API archived.

data.archived_query_countinteger
Required

The same number as archived_count for this endpoint.

data.archived_topic_query_countinteger
Required

Always 0 for this endpoint. The API keeps the topic links of archived prompts.

data.credits_refundedinteger
Required

The prompt credits that the team got back. This is one credit for each archived prompt. For a pitch domain, the value is 0.

data.previous_remaininginteger
Required

The prompt credits of the team before the call.

data.new_remaininginteger
Required

The prompt credits of the team after the refund.

generated_atstring
Required

ISO-8601 time when the server made this response.

Side effects

Errors

401 Unauthorizederror

The API key is missing, malformed or revoked.

403 Forbiddenerror

The caller is not a member of the team of the domain. Or the API key has no access to this domain. Or the plan of the team does not include API access.

404 Not Founderror

One or more IDs are not active prompts of the domain. The message lists these IDs. The API archives no prompts.

422 Unprocessable Entityerror

The body is not valid. For example, prompt_ids is empty, has more than 100 items, or has a value that is not a UUID.

429 Too Many Requestserror

You sent too many requests. Read the Retry-After header to know how long to wait.