Save Pitch Audit prompts
curl --request PATCH \
--url https://www.qwairy.co/api/v1/pitch-audits/{auditId}/prompts \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--header 'If-Match: <if-match>' \
--data '
{
"prompts": [
{}
]
}
'import requests
url = "https://www.qwairy.co/api/v1/pitch-audits/{auditId}/prompts"
payload = { "prompts": [{}] }
headers = {
"Authorization": "<authorization>",
"If-Match": "<if-match>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
Authorization: '<authorization>',
'If-Match': '<if-match>',
'Content-Type': 'application/json'
},
body: JSON.stringify({prompts: [{}]})
};
fetch('https://www.qwairy.co/api/v1/pitch-audits/{auditId}/prompts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));Pitch audits
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.
PATCH
https://www.qwairy.co
/
api
/
v1
/
pitch-audits
/
{auditId}
/
prompts
Save Pitch Audit prompts
curl --request PATCH \
--url https://www.qwairy.co/api/v1/pitch-audits/{auditId}/prompts \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--header 'If-Match: <if-match>' \
--data '
{
"prompts": [
{}
]
}
'import requests
url = "https://www.qwairy.co/api/v1/pitch-audits/{auditId}/prompts"
payload = { "prompts": [{}] }
headers = {
"Authorization": "<authorization>",
"If-Match": "<if-match>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
Authorization: '<authorization>',
'If-Match': '<if-match>',
'Content-Type': 'application/json'
},
body: JSON.stringify({prompts: [{}]})
};
fetch('https://www.qwairy.co/api/v1/pitch-audits/{auditId}/prompts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));Replaces the prompt set while a Pitch Audit is in
Each prompt contains:
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.
ETag returned by the latest Get Pitch
Audit response.Complete replacement set containing 20 to 100 prompts. Prompt IDs must be
unique. An unchanged draft created before this rule keeps its count.
| 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
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
Returns200 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 |

