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

# Save Pitch Audit prompts

> Replace the prompt-review draft of a Pitch Audit using the ETag from the latest read, so a dashboard or API edit cannot be silently overwritten.

Replaces the prompt set while a Pitch Audit is in `AWAITING_PROMPTS` and the
`PROMPT_REVIEW` phase. Read the audit first and write against its current
`ETag` so a dashboard or API edit cannot be silently overwritten.

**Authorization** `string` *required*

Bearer token. Example: `Bearer qw-api-xxx`

**If-Match** `string` *required*

`ETag` returned by the latest [Get Pitch
Audit](https://docs.qwairy.co/developers/endpoints/pitch-audits/get.md) response.

**auditId** `string` *required*

Pitch Audit ID owned by the API key's agency team.

**prompts** `array` *required*

Complete replacement set containing 20 to 100 prompts. Prompt IDs must be
unique. An unchanged draft created before this rule keeps its count.

Each prompt contains:

| Field | Type | Contract |
| - | - | - |
| `id` | string | Unique ID, up to 50 characters |
| `text` | string | Prompt text, up to 1000 characters |
| `category` | string | `TOFU`, `MOFU`, or `BOFU` |
| `topic` | string | Topic label, up to 120 characters |

## Synthetic request

```bash theme={null}
curl -X PATCH "https://www.qwairy.co/api/v1/pitch-audits/$AUDIT_ID/prompts" \
  -H "Authorization: Bearer $QWAIRY_API_TOKEN" \
  -H 'If-Match: "1788350400000"' \
  -H "Content-Type: application/json" \
  -d '{"prompts":[{"id":"p1","text":"Which platform fits a growing revenue team?","category":"MOFU","topic":"Platform selection"}]}'
```

## Response

Returns `200` with the saved prompts, the new `revision`, and a new `ETag`.
Use the new value if another prompt edit is required.

## Errors

| Status | Code | Cause |
| - | - | - |
| `404` | `RESOURCE_NOT_FOUND` | Audit is absent or belongs to another team |
| `409` | `INVALID_STATE_TRANSITION` | Audit is no longer awaiting prompt review |
| `412` | `PRECONDITION_FAILED` | Audit changed after the supplied `ETag` |
| `428` | `PRECONDITION_REQUIRED` | `If-Match` is missing |


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