Revise a content draft
curl --request POST \
--url https://app.promptingco.com/api/v1/content/{id}/revision \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"content": "<string>"
}
'const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({content: '<string>'})
};
fetch('https://app.promptingco.com/api/v1/content/{id}/revision', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.promptingco.com/api/v1/content/{id}/revision"
payload = { "content": "<string>" }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"ok": true,
"data": {
"mode": "content",
"draftId": "<string>",
"promptId": "<string>",
"title": "<string>",
"versionNumber": 1,
"updatedAt": "2023-11-07T05:31:56Z"
}
}{
"ok": false,
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}{
"ok": false,
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}{
"ok": false,
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}{
"ok": false,
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}{
"ok": false,
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}{
"ok": false,
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}Content
Revise a content draft
Submit an edited revision (content) or relaunch the generation agent with reviewer feedback (Pro plan). Both keep the draft in the review queue and reset a prior rejection.
POST
/
api
/
v1
/
content
/
{id}
/
revision
Revise a content draft
curl --request POST \
--url https://app.promptingco.com/api/v1/content/{id}/revision \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"content": "<string>"
}
'const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({content: '<string>'})
};
fetch('https://app.promptingco.com/api/v1/content/{id}/revision', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.promptingco.com/api/v1/content/{id}/revision"
payload = { "content": "<string>" }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"ok": true,
"data": {
"mode": "content",
"draftId": "<string>",
"promptId": "<string>",
"title": "<string>",
"versionNumber": 1,
"updatedAt": "2023-11-07T05:31:56Z"
}
}{
"ok": false,
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}{
"ok": false,
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}{
"ok": false,
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}{
"ok": false,
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}{
"ok": false,
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}{
"ok": false,
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}Authorizations
apiKeyAuthbearerAuthcookieAuth
Organization-scoped API key. Available scopes:
- content:read: Read site pages, markdown content, and llms.txt files
- content:write: Create, update, and delete site pages and content
- prompts:read: Read prompts, topics, prompt suggestions, and prompt analysis results
- prompts:write: Create, update, archive prompts and generate, edit, or review prompt suggestions
- simulations:read: Read agent-simulation tasks, runs, environments, and analytics
- simulations:write: Create and trigger simulation runs
- logs:read: Read AI-traffic logs and request-level audit events
- analytics:read: Read analytics aggregates (rankings, mentions, sources, SOV)
- analytics:write: Write events to analytics
- products:read: Read product metadata and competitor data
- products:write: Update product settings and competitor lists
Path Parameters
Minimum string length:
1Body
application/json
- Option 1
- Option 2
Submit an edited revision (human edit).
Full replacement markdown for the draft body.
Minimum string length:
1Minimum string length:
1Required string length:
1 - 500The draft's updatedAt from a prior read; the revision is rejected if the draft changed since.