Endpoints: briefs
brief scope.
POST/api/v1/briefs
- Scopebrief
- Credits free
- Role edit (Owner, Editor, Writer)
siteId is left out.
Body
| Name | Type | Description |
|---|---|---|
topic | string | |
angle | string | |
siteId | string | |
brandId | string | |
purpose | string | news, explainer, background, roundup, press or blog. |
audience | string | |
region | string | |
language | string | +, as en+es+de: the first code is the article, the others are versions of it. With + each code must be one of the 22 supported languages and appear once. |
tone | string | neutral, explanatory, formal or conversational. |
length | string | short, standard or long. |
targetWords | integer | |
structure | string | ibc, list or qa. |
keywords | string[] | |
mustAppear | string[] | |
useUrls | string[] | |
excludeDomains | string[] | |
preferDomains | string[] | |
illustration | string | generate, upload or none. |
seo | boolean |
Response
200
{
"id": "5D2E8A14-7B3C-4F69-A0D1-9C46E3B7F208",
"siteId": "3b6f0c52-6a41-4d0e-9a53-71c8f2d5a1e0",
"topic": "Ferry operators agree on a single timetable for the northern route",
"angle": "What changes for commuters from November",
"useUrls": [],
"excludeDomains": [],
"purpose": "news",
"audience": "",
"region": "Global",
"language": "en",
"tone": "neutral",
"length": "standard",
"targetWords": 900,
"structure": "ibc",
"keywords": [],
"mustAppear": [
"the November start date"
],
"preferDomains": [],
"illustration": "none",
"seo": true
}Errors
| Status | Code | When |
|---|---|---|
| 404 | not_found | brandId or siteId does not exist or is not visible to this credential. |
| 400 | validation | topic 300 characters, angle 1,000, audience 500, region, imageStyle and imageFormat 100; at most 20 keywords or mustAppear entries of 100 characters, 10 useUrls and 20 domains of 253 characters in excludeDomains or preferDomains. field names the one refused. |
| 422 | invalid_language | + list is not a supported language, appears twice, or is empty, or the value has a space in it. |
curl -X POST "$BRENZURI_URL/api/v1/briefs" \
-H "Authorization: Bearer $BRENZURI_KEY" \
-H "Content-Type: application/json" \
-d '{
"topic": "Ferry operators agree on a single timetable for the northern route",
"angle": "What changes for commuters from November",
"purpose": "news",
"length": "standard",
"mustAppear": [
"the November start date"
],
"illustration": "none"
}'GET/api/v1/briefs/{id}
- Scoperead
- Credits free
Path
| Name | Type | Description |
|---|---|---|
id | string |
Response
200
{
"id": "5D2E8A14-7B3C-4F69-A0D1-9C46E3B7F208",
"siteId": "3b6f0c52-6a41-4d0e-9a53-71c8f2d5a1e0",
"topic": "Ferry operators agree on a single timetable for the northern route",
"angle": "What changes for commuters from November",
"useUrls": [],
"excludeDomains": [],
"purpose": "news",
"audience": "",
"region": "Global",
"language": "en",
"tone": "neutral",
"length": "standard",
"targetWords": 900,
"structure": "ibc",
"keywords": [],
"mustAppear": [
"the November start date"
],
"preferDomains": [],
"illustration": "none",
"seo": true
}Errors
| Status | Code | When |
|---|---|---|
| 404 | not_found |
curl "$BRENZURI_URL/api/v1/briefs/$BRIEF_ID" \
-H "Authorization: Bearer $BRENZURI_KEY"PATCH/api/v1/briefs/{id}
- Scopebrief
- Credits free
- Role edit
Path
| Name | Type | Description |
|---|---|---|
id | string |
Body
| Name | Type | Description |
|---|---|---|
any field of POST /briefs | various |
Response
200
{
"id": "5D2E8A14-7B3C-4F69-A0D1-9C46E3B7F208",
"siteId": "3b6f0c52-6a41-4d0e-9a53-71c8f2d5a1e0",
"topic": "Ferry operators agree on a single timetable for the northern route",
"angle": "What changes for commuters from November",
"useUrls": [],
"excludeDomains": [],
"purpose": "news",
"audience": "",
"region": "Global",
"language": "en",
"tone": "neutral",
"length": "long",
"targetWords": 1400,
"structure": "ibc",
"keywords": [],
"mustAppear": [
"the November start date"
],
"preferDomains": [],
"illustration": "none",
"seo": true
}Errors
| Status | Code | When |
|---|---|---|
| 404 | not_found | |
| 400 | validation | field names it. |
| 422 | invalid_language | language is not valid. See POST /briefs. |
curl -X PATCH "$BRENZURI_URL/api/v1/briefs/$BRIEF_ID" \
-H "Authorization: Bearer $BRENZURI_KEY" \
-H "Content-Type: application/json" \
-d '{
"length": "long",
"targetWords": 1400
}'POST/api/v1/briefs/{id}/estimate
- Scopebrief
- Credits free
Path
| Name | Type | Description |
|---|---|---|
id | string |
Query
| Name | Type | Description |
|---|---|---|
articleId | string |
Response
200
{
"credits": 1,
"parts": [
{
"label": "Article",
"credits": 1,
"kind": "article"
}
],
"steps": [
{
"id": "find",
"name": "Searching for sources",
"estMs": 14200
},
{
"id": "group",
"name": "Grouping by origin",
"estMs": 6100
},
{
"id": "read",
"name": "Reading one page per origin",
"estMs": 39400
},
{
"id": "check",
"name": "Checking claims across origins",
"estMs": 30800
},
{
"id": "write",
"name": "Writing",
"estMs": 48000
},
{
"id": "seo",
"name": "Writing the SEO fields",
"estMs": 4000
},
{
"id": "qa",
"name": "Reading the finished text back",
"estMs": 9000
}
],
"enough": true
}Errors
| Status | Code | When |
|---|---|---|
| 404 | not_found | articleId is not an article written from it. |
| 422 | invalid_language | language is not valid. A brief made or changed through the API cannot be saved with one. |
enoughis false when the trial has ended, the balance is belowcredits, or, for a key or an agent, today’s spend pluscreditswould pass its daily cap.creditsis the article’s cost plus 1 for each language version, andpartslists them. Thestepslist includesseoonly when the brief asks for it andillustrateonly whenillustrationisgenerate, and the three steps of each language version after the article’s steps. See Write in several languages.
curl -X POST "$BRENZURI_URL/api/v1/briefs/$BRIEF_ID/estimate" \
-H "Authorization: Bearer $BRENZURI_KEY"