> ## Documentation Index
> Fetch the complete documentation index at: https://docs.rankraft.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Activate or disable prompts

> PATCH /v1/sites/{site_id}/prompts/status

> [!NOTE]
>
> Needs a key with **Read and manage prompts** access. Counts against the write limit of 20 requests a minute.

Switch prompts on or off. Disabled prompts stop being asked but keep their answer history. Activating counts against the plan's cap; a request that would exceed it is refused whole with `422 prompt_limit_reached`.

The API never deletes a prompt. Deleting would erase its answer history and the before-and-after measurements of any Action Center card that targeted it, so "stop tracking" is always `disabled`.

## Path parameters

**site\_id** `string` *required*

The site's id, from [List sites](/api-reference/endpoints/list-sites).

## Body

**prompt\_ids** `string[]` *required*

1 to 500 prompt ids.

**status** `enum\<string\>` *required*

One of: `active`, `disabled`.

**dry\_run** `boolean` (default: false)

Validate and report without writing.

## Response

**dry\_run** `boolean`

**changed** `string[]`

Ids whose status changed.

**unchanged** `string[]`

Ids that already had that status.

**not\_found** `string[]`

Ids that are not prompts of this site.

```bash cURL theme={"system"}
curl -X PATCH https://api.rankraft.ai/v1/sites/3f2c9a10-7b1e-4c55-9d2a-1a2b3c4d5e6f/prompts/status \
  -H "X-API-Key: $RANKRAFT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt_ids": ["8a1e4b2c-6d0f-4e3a-9b51-2c7d8e9f0a1b"],
    "status": "disabled"
  }'
```

```javascript JavaScript theme={"system"}
// npm install rankraft-js · https://www.npmjs.com/package/rankraft-js
import { RankRaft } from "rankraft-js";

const rr = new RankRaft(); // reads RANKRAFT_API_KEY (needs "Read and manage prompts")

const result = await rr.prompts.setStatus({
  site_id: "3f2c9a10-7b1e-4c55-9d2a-1a2b3c4d5e6f",
  prompt_ids: ["8a1e4b2c-6d0f-4e3a-9b51-2c7d8e9f0a1b"],
  status: "disabled",
});
console.log(result.changed, result.unchanged, result.not_found);
```

```python Python theme={"system"}
# pip install rankraft-py · https://pypi.org/project/rankraft-py/
from rankraft import RankRaft

with RankRaft() as rr:  # reads RANKRAFT_API_KEY (needs "Read and manage prompts")
    result = rr.prompts.set_status(
        site_id="3f2c9a10-7b1e-4c55-9d2a-1a2b3c4d5e6f",
        prompt_ids=["8a1e4b2c-6d0f-4e3a-9b51-2c7d8e9f0a1b"],
        status="disabled",
    )
    print(result["changed"], result["unchanged"], result["not_found"])
```

```json 200 theme={"system"}
{
  "dry_run": false,
  "changed": ["8a1e4b2c-6d0f-4e3a-9b51-2c7d8e9f0a1b"],
  "unchanged": [],
  "not_found": []
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.