Content drafts and editorial generation
Create a draft
Create a blog post, social post, LinkedIn article, product fact patch or accuracy fix for review.
PUT /v2/brands/{brand_id}/drafts/{draft_id}
Authentication and access
- Authentication
- Bearer API key
- Scopes
- optimizations:write, analytics:read, recommendations:read
- Roles
- editor, owner, service
- Plans
- Optimizer
- Credits
- No credit charge.
Parameters
| Name | Where | Type | Required | Description |
|---|---|---|---|---|
brand_id | path | string (uuid) | Yes | |
draft_id | path | string (uuid) | Yes |
Request body
{
"format": "blog",
"item_id": "00000000-0000-4000-8000-000000000001",
"keywords": [
{
"country": "US",
"estimated_monthly_searches": 120,
"keyword": "setup",
"language": "en",
"measured_on": "2026-11-24",
"source": "example",
"source_reference": "fixture-measurement",
"volume_period_end": "2026-10-31",
"volume_period_start": "2026-10-01"
}
],
"primary_keyword": "setup",
"sections": [
{
"heading": "Getting started",
"passage_id": "00000000-0000-4000-8000-000000000001"
}
],
"title": "Setup instructions"
}| Name | Type | Required | Description |
|---|---|---|---|
format | "blog" | "social" | "linkedin_article" | Yes | |
item_id | string (uuid) | Yes | |
keywords | array of object | Yes | |
keywords[].country | string | Yes | |
keywords[].difficulty_method | string | null | No | |
keywords[].difficulty_score | number | null | No | |
keywords[].estimated_monthly_searches | integer | null | No | |
keywords[].keyword | string | Yes | |
keywords[].language | string | Yes | |
keywords[].measured_on | string (date) | Yes | |
keywords[].source | string | Yes | |
keywords[].source_reference | string | Yes | |
keywords[].volume_period_end | string (date) | null | No | |
keywords[].volume_period_start | string (date) | null | No | |
month | string | null | No | |
primary_keyword | string | Yes | |
report_id | string (uuid) | null | No | |
sections | array of object | Yes | |
sections[].heading | string | Yes | |
sections[].passage_id | string (uuid) | Yes | |
title | string | Yes |
| Name | Type | Required | Description |
|---|---|---|---|
automatic_policy | object | null | No | |
automatic_policy.artifact_types | array of "llms_txt" | "json_ld" | "canonical_summary" | Conditional | |
automatic_policy.domains | array of string | Conditional | |
automatic_policy.fact_sources | array of string | Conditional | |
automatic_policy.max_changed_bytes | integer | Conditional | |
automatic_policy.max_targets | integer | Conditional | |
automatic_policy.paths | array of string | Conditional | |
automatic_policy.version | string | Conditional | |
fact_event_id | string (uuid) | Yes | |
format | "product_fact_patch" | Yes | |
targets | array of object | Yes | |
targets[].baseline | string | Yes | |
targets[].baseline_revision | string | Yes | |
targets[].connector | "cms" | "edge" | Yes | |
targets[].domain | string | Yes | |
targets[].kind | "llms_txt" | "json_ld" | "canonical_summary" | Yes | |
targets[].path | string | Yes |
| Name | Type | Required | Description |
|---|---|---|---|
claim_id | string (uuid) | Yes | |
format | "accuracy_fix" | Yes | |
title | string | null | No |
Request examples
Set AEO_API_BASE_URL to https://api.aeoapi.dev and AEO_API_KEY to your server-side API key. Set the other environment variables to the values for your request.
Save the JSON request body as request.json. Replace sample IDs, revisions and other values with your own.
curl --fail-with-body -X PUT "$AEO_API_BASE_URL/v2/brands/$BRAND_ID/drafts/$DRAFT_ID" \
-H "Authorization: Bearer $AEO_API_KEY" \
-H "Content-Type: application/json" \
--data-binary @request.jsonimport json
from pathlib import Path
from os import environ
from aeo_sdk import AeoClient
body = json.loads(Path("request.json").read_text())
with AeoClient(environ["AEO_API_KEY"], base_url=environ["AEO_API_BASE_URL"]) as client:
response = client.v2_put_brands_brand_id_drafts_draft_id(
brand_id=environ["BRAND_ID"],
draft_id=environ["DRAFT_ID"],
body=body,
)
print(response.body)import { AeoClient } from "@aeoapi/aeo-sdk";
import { readFile } from "node:fs/promises";
const client = new AeoClient(process.env.AEO_API_KEY!, {
baseUrl: process.env.AEO_API_BASE_URL!,
});
const body = JSON.parse(await readFile("request.json", "utf8"));
const response = await client.v2PutBrandsBrandIdDraftsDraftId(
process.env.BRAND_ID!,
process.env.DRAFT_ID!,
body,
);
console.log(response.body);Responses
HTTP 200
Successful Response
application/json
Example generated from the response schema.
{
"data": {
"draft_id": "00000000-0000-4000-8000-000000000001",
"item_id": "00000000-0000-4000-8000-000000000001",
"format": "blog",
"revision": 0,
"status": "draft",
"created_at": "2026-01-01T00:00:00Z",
"updated_at": "2026-01-01T00:00:00Z",
"voice": {
"tone": "example",
"audience": "example",
"language": "en"
},
"voice_revision": 0,
"keywords": [],
"primary_keyword": "example",
"content": null,
"content_method": "customer_owned_passage_assembly",
"content_sha256": null,
"approved_content_sha256": null,
"source_passages": [],
"claim_support": [],
"source_availability": "current",
"voice_checks": null,
"review_note": null,
"generation_guidance": null,
"handoff": null,
"receipt": null,
"publication_failure": null
},
"meta": {}
}| Name | Type | Required | Description |
|---|---|---|---|
data | object | Yes | The requested result. See the fields below for its contents. |
data.approved_content_sha256 | string | null | Yes | SHA-256 hash of the content approved for delivery. |
data.citation_lift_benchmark | object | null | No | |
data.citation_lift_benchmark.benchmark | object | null | Conditional | |
data.citation_lift_benchmark.benchmark.action_channel | string | Conditional | |
data.citation_lift_benchmark.benchmark.after_answer_target_pairs | integer | Conditional | |
data.citation_lift_benchmark.benchmark.after_citing_target_pairs | integer | Conditional | |
data.citation_lift_benchmark.benchmark.before_answer_target_pairs | integer | Conditional | |
data.citation_lift_benchmark.benchmark.before_citing_target_pairs | integer | Conditional | |
data.citation_lift_benchmark.benchmark.eligible_targets | integer | Conditional | |
data.citation_lift_benchmark.benchmark.matched_target_cohorts | integer | Conditional | |
data.citation_lift_benchmark.benchmark.mean_after_citation_rate | number | Conditional | |
data.citation_lift_benchmark.benchmark.mean_before_citation_rate | number | Conditional | |
data.citation_lift_benchmark.benchmark.mean_citation_rate_change_percentage_points | number | Conditional | |
data.citation_lift_benchmark.benchmark.median_citation_rate_change_percentage_points | number | Conditional | |
data.citation_lift_benchmark.benchmark.method | "equal_weighted_targets_and_matched_cohorts" | Conditional | |
data.citation_lift_benchmark.benchmark.observational | true | Conditional | |
data.citation_lift_benchmark.benchmark.report_generated_at | string | Conditional | |
data.citation_lift_benchmark.benchmark.report_id | string | Conditional | |
data.citation_lift_benchmark.benchmark.window_days | integer | Conditional | |
data.citation_lift_benchmark.reason | "insufficient_access" | "no_saved_report" | "insufficient_eligible_targets" | "scan_limit_exceeded" | null | Conditional | |
data.claim_support | array of object | Yes | |
data.claim_support[].claim_text | string | Yes | |
data.claim_support[].passage_id | string (uuid) | Yes | |
data.claim_support[].source_excerpt | string | Yes | |
data.content | object | null | Yes | |
data.content.body | string | Conditional | |
data.content.title | string | Conditional | |
data.content_method | "customer_owned_passage_assembly" | "agency_edited" | Yes | |
data.content_sha256 | string | null | Yes | SHA-256 hash identifying this version of the content. |
data.created_at | string (date-time) | Yes | |
data.draft_id | string (uuid) | Yes | Identifies the draft associated with this result. |
data.format | "blog" | "social" | "linkedin_article" | Yes | |
data.generation_guidance | string | null | Yes | |
data.handoff | object | null | Yes | |
data.handoff.content_sha256 | string | Conditional | |
data.handoff.created_at | string (date-time) | Conditional | |
data.handoff.delivery_claim_id | string (uuid) | null | No | |
data.handoff.destination | object | Conditional | |
data.handoff.destination.destination_reference | string | Conditional | |
data.handoff.destination.platform | "cms" | "linkedin" | "reddit" | "youtube" | "other" | Conditional | |
data.handoff.handoff_id | string (uuid) | Conditional | |
data.item_id | string (uuid) | Yes | |
data.keywords | array of object | Yes | |
data.keywords[].country | string | Yes | |
data.keywords[].difficulty_method | string | null | No | |
data.keywords[].difficulty_score | number | null | No | |
data.keywords[].estimated_monthly_searches | integer | null | No | |
data.keywords[].keyword | string | Yes | |
data.keywords[].language | string | Yes | |
data.keywords[].measured_on | string (date) | Yes | |
data.keywords[].source | string | Yes | |
data.keywords[].source_reference | string | Yes | |
data.keywords[].volume_period_end | string (date) | null | No | |
data.keywords[].volume_period_start | string (date) | null | No | |
data.primary_keyword | string | Yes | |
data.publication_failure | string | null | Yes | |
data.receipt | object | null | Yes | |
data.receipt.evidence_basis | "publisher_reported" | No | |
data.receipt.published_at | string (date-time) | Conditional | |
data.receipt.published_url | string | Conditional | |
data.receipt.publisher_reference | string | Conditional | |
data.receipt.reported_at | string (date-time) | Conditional | |
data.review_note | string | null | Yes | |
data.revision | integer | Yes | |
data.source_availability | "current" | "missing" | Yes | |
data.source_passages | array of object | Yes | |
data.source_passages[].content_revision | string (uuid) | Yes | |
data.source_passages[].heading | string | Yes | |
data.source_passages[].passage_id | string (uuid) | Yes | |
data.source_passages[].source_url | string | Yes | |
data.status | "draft" | "in_review" | "changes_requested" | "approved" | "handed_off" | "publication_failed" | "published" | "archived" | Yes | |
data.updated_at | string (date-time) | Yes | |
data.voice | object | Yes | |
data.voice.audience | string | Yes | |
data.voice.avoided_terms | array of string | No | |
data.voice.call_to_action | string | null | No | |
data.voice.editorial_guidelines | string | null | No | |
data.voice.language | string | Yes | |
data.voice.opening | string | null | No | |
data.voice.preferred_terms | array of string | No | |
data.voice.tone | string | Yes | |
data.voice.writing_samples | array of string | No | |
data.voice_checks | object | null | Yes | |
data.voice_checks.avoided_terms_present | array of string | Conditional | |
data.voice_checks.copy_uses_primary_keyword | boolean | Conditional | |
data.voice_checks.language | string | Conditional | |
data.voice_checks.preferred_terms_absent | array of string | Conditional | |
data.voice_checks.title_uses_primary_keyword | boolean | Conditional | |
data.voice_revision | integer | Yes | |
meta | object | Yes | Information about this response, including any warnings or pagination details. |
| Name | Type | Required | Description |
|---|---|---|---|
data | object | Yes | The requested result. See the fields below for its contents. |
data.created_at | string (date-time) | Yes | |
data.draft_id | string (uuid) | Yes | Identifies the draft associated with this result. |
data.format | "product_fact_patch" | Yes | |
data.item_id | string (uuid) | Yes | |
data.patch | object | null | Yes | |
data.patch.approved_content_sha256 | string | null | No | |
data.patch.automatic_policy | object | null | No | |
data.patch.automatic_policy.artifact_types | array of "llms_txt" | "json_ld" | "canonical_summary" | Conditional | |
data.patch.automatic_policy.domains | array of string | Conditional | |
data.patch.automatic_policy.fact_sources | array of string | Conditional | |
data.patch.automatic_policy.max_changed_bytes | integer | Conditional | |
data.patch.automatic_policy.max_targets | integer | Conditional | |
data.patch.automatic_policy.paths | array of string | Conditional | |
data.patch.automatic_policy.version | string | Conditional | |
data.patch.content_sha256 | string | Conditional | |
data.patch.pause_reason | "destination_drift" | "destination_unresolved" | null | No | |
data.patch.policy_approved_by | string (uuid) | null | No | |
data.patch.policy_version | string | Conditional | |
data.patch.source_content_revision | string (uuid) | Conditional | |
data.patch.source_fact | object | Conditional | |
data.patch.source_fact.amount | string | Conditional | |
data.patch.source_fact.currency | string | Conditional | |
data.patch.source_fact.depends_on | array of string (uuid) | No | |
data.patch.source_fact.effective_from | string (date) | Conditional | |
data.patch.source_fact.event_id | string (uuid) | Conditional | |
data.patch.source_fact.market | string | Conditional | |
data.patch.source_fact.period | "month" | "year" | "one_time" | Conditional | |
data.patch.source_fact.product | string | Conditional | |
data.patch.source_fact.resolves_conflict | boolean | No | |
data.patch.source_fact.sequence | integer | Conditional | |
data.patch.source_fact.source | string | Conditional | |
data.patch.source_facts | array of object | Conditional | |
data.patch.source_facts[].amount | string | Conditional | |
data.patch.source_facts[].currency | string | Conditional | |
data.patch.source_facts[].depends_on | array of string (uuid) | No | |
data.patch.source_facts[].effective_from | string (date) | Conditional | |
data.patch.source_facts[].event_id | string (uuid) | Conditional | |
data.patch.source_facts[].market | string | Conditional | |
data.patch.source_facts[].period | "month" | "year" | "one_time" | Conditional | |
data.patch.source_facts[].product | string | Conditional | |
data.patch.source_facts[].resolves_conflict | boolean | No | |
data.patch.source_facts[].sequence | integer | Conditional | |
data.patch.source_facts[].source | string | Conditional | |
data.patch.source_url | string | Conditional | |
data.patch.targets | array of object | Conditional | |
data.patch.targets[].baseline_revision | string | Conditional | |
data.patch.targets[].connector | "cms" | "edge" | Conditional | |
data.patch.targets[].content | string | Conditional | |
data.patch.targets[].content_sha256 | string | Conditional | |
data.patch.targets[].diff | string | Conditional | |
data.patch.targets[].domain | string | Conditional | |
data.patch.targets[].kind | "llms_txt" | "json_ld" | "canonical_summary" | Conditional | |
data.patch.targets[].path | string | Conditional | |
data.patch.targets[].previous_sha256 | string | Conditional | |
data.patch.targets[].publish_claim | object | null | No | |
data.patch.targets[].publish_claim.expected_revision | string | Conditional | |
data.patch.targets[].publish_claim.expected_sha256 | string | Conditional | |
data.patch.targets[].publish_claim.id | string (uuid) | Conditional | |
data.patch.targets[].publish_receipt | object | null | No | |
data.patch.targets[].publish_receipt.claim_id | string (uuid) | Conditional | |
data.patch.targets[].publish_receipt.content_sha256 | string | Conditional | |
data.patch.targets[].publish_receipt.revision | string | Conditional | |
data.patch.targets[].rollback_claim | object | null | No | |
data.patch.targets[].rollback_claim.expected_revision | string | Conditional | |
data.patch.targets[].rollback_claim.expected_sha256 | string | Conditional | |
data.patch.targets[].rollback_claim.id | string (uuid) | Conditional | |
data.patch.targets[].rollback_content | string | Conditional | |
data.patch.targets[].rollback_receipt | object | null | No | |
data.patch.targets[].rollback_receipt.claim_id | string (uuid) | Conditional | |
data.patch.targets[].rollback_receipt.content_sha256 | string | Conditional | |
data.patch.targets[].rollback_receipt.revision | string | Conditional | |
data.patch.targets[].target_id | string (uuid) | Conditional | |
data.revision | integer | Yes | |
data.source_availability | "current" | "missing" | Yes | |
data.status | "draft" | "in_review" | "changes_requested" | "approved" | "handed_off" | "publication_failed" | "published" | "archived" | "rolled_back" | Yes | |
data.updated_at | string (date-time) | Yes | |
meta | object | Yes | Information about this response, including any warnings or pagination details. |
meta.as_of | string (date-time) | Yes | The point in time that the response represents. |
meta.cohort_version | string | null | No | Identifies the version of the group used to calculate the results. |
meta.collected_at | string (date-time) | null | Yes | When the data was collected, if available. |
meta.metric_version | string | null | No | The version of the metric definition used for these results. |
meta.next_cursor | string | null | Yes | When present, pass this value as cursor to request the next page with the same filters. |
meta.next_refresh_at | string (date-time) | null | Yes | |
meta.request_id | string (uuid) | Yes | Keep this ID when reporting a problem with the request. |
meta.restricted_fields | array of string | No | Fields that your current access does not allow the API to return. |
meta.rights_filtered | boolean | Yes | Indicates whether access rights affected the returned data. |
meta.schema_version | "1.0" | Yes | The version of the response format. |
meta.stale | boolean | Yes | |
meta.warnings | array of string | Yes | Read these notes for limitations that affect the results. |
| Name | Type | Required | Description |
|---|---|---|---|
data | object | Yes | The requested result. See the fields below for its contents. |
data.accuracy_claim_id | string (uuid) | Yes | |
data.accuracy_source_pages | array of object | Yes | |
data.accuracy_source_pages[].ownership | "brand" | "competitor" | "third_party" | Yes | |
data.accuracy_source_pages[].scope | "answer" | "claim" | Yes | |
data.accuracy_source_pages[].url | string | Yes | |
data.approved_content_sha256 | string | null | Yes | SHA-256 hash of the content approved for delivery. |
data.citation_lift_benchmark | null | No | |
data.claim_support | array of object | Yes | |
data.claim_support[].claim_text | string | Yes | |
data.claim_support[].passage_id | string (uuid) | Yes | |
data.claim_support[].source_excerpt | string | Yes | |
data.content | object | null | Yes | |
data.content.body | string | Conditional | |
data.content.title | string | Conditional | |
data.content_method | "approved_accuracy_fact" | "agency_edited" | Yes | |
data.content_sha256 | string | null | Yes | SHA-256 hash identifying this version of the content. |
data.created_at | string (date-time) | Yes | |
data.draft_id | string (uuid) | Yes | Identifies the draft associated with this result. |
data.format | "accuracy_fix" | Yes | |
data.generation_guidance | string | null | Yes | |
data.handoff | object | null | Yes | |
data.handoff.content_sha256 | string | Conditional | |
data.handoff.created_at | string (date-time) | Conditional | |
data.handoff.delivery_claim_id | string (uuid) | null | No | |
data.handoff.destination | object | Conditional | |
data.handoff.destination.destination_reference | string | Conditional | |
data.handoff.destination.platform | "cms" | "linkedin" | "reddit" | "youtube" | "other" | Conditional | |
data.handoff.handoff_id | string (uuid) | Conditional | |
data.item_id | string (uuid) | Yes | |
data.keywords | array of object | Yes | |
data.keywords[].country | string | Yes | |
data.keywords[].difficulty_method | string | null | No | |
data.keywords[].difficulty_score | number | null | No | |
data.keywords[].estimated_monthly_searches | integer | null | No | |
data.keywords[].keyword | string | Yes | |
data.keywords[].language | string | Yes | |
data.keywords[].measured_on | string (date) | Yes | |
data.keywords[].source | string | Yes | |
data.keywords[].source_reference | string | Yes | |
data.keywords[].volume_period_end | string (date) | null | No | |
data.keywords[].volume_period_start | string (date) | null | No | |
data.primary_keyword | string | Yes | |
data.publication_failure | string | null | Yes | |
data.receipt | object | null | Yes | |
data.receipt.evidence_basis | "publisher_reported" | No | |
data.receipt.published_at | string (date-time) | Conditional | |
data.receipt.published_url | string | Conditional | |
data.receipt.publisher_reference | string | Conditional | |
data.receipt.reported_at | string (date-time) | Conditional | |
data.review_note | string | null | Yes | |
data.revision | integer | Yes | |
data.source_availability | "current" | "needs_review" | Yes | |
data.source_passages | array of object | Yes | |
data.source_passages[].content_revision | string (uuid) | Yes | |
data.source_passages[].heading | string | Yes | |
data.source_passages[].passage_id | string (uuid) | Yes | |
data.source_passages[].source_url | string | Yes | |
data.status | "draft" | "in_review" | "changes_requested" | "approved" | "handed_off" | "publication_failed" | "published" | "archived" | Yes | |
data.updated_at | string (date-time) | Yes | |
data.voice | object | Yes | |
data.voice.audience | string | Yes | |
data.voice.avoided_terms | array of string | No | |
data.voice.call_to_action | string | null | No | |
data.voice.editorial_guidelines | string | null | No | |
data.voice.language | string | Yes | |
data.voice.opening | string | null | No | |
data.voice.preferred_terms | array of string | No | |
data.voice.tone | string | Yes | |
data.voice.writing_samples | array of string | No | |
data.voice_checks | object | null | Yes | |
data.voice_checks.avoided_terms_present | array of string | Conditional | |
data.voice_checks.copy_uses_primary_keyword | boolean | Conditional | |
data.voice_checks.language | string | Conditional | |
data.voice_checks.preferred_terms_absent | array of string | Conditional | |
data.voice_checks.title_uses_primary_keyword | boolean | Conditional | |
data.voice_revision | integer | Yes | |
meta | object | Yes | Information about this response, including any warnings or pagination details. |
meta.as_of | string (date-time) | Yes | The point in time that the response represents. |
meta.cohort_version | string | null | No | Identifies the version of the group used to calculate the results. |
meta.collected_at | string (date-time) | null | Yes | When the data was collected, if available. |
meta.metric_version | string | null | No | The version of the metric definition used for these results. |
meta.next_cursor | string | null | Yes | When present, pass this value as cursor to request the next page with the same filters. |
meta.next_refresh_at | string (date-time) | null | Yes | |
meta.request_id | string (uuid) | Yes | Keep this ID when reporting a problem with the request. |
meta.restricted_fields | array of string | No | Fields that your current access does not allow the API to return. |
meta.rights_filtered | boolean | Yes | Indicates whether access rights affected the returned data. |
meta.schema_version | "1.0" | Yes | The version of the response format. |
meta.stale | boolean | Yes | |
meta.warnings | array of string | Yes | Read these notes for limitations that affect the results. |
Errors
Read code and message in the error response. Keep request_id when you contact support.
- HTTP 400
invalid_request - HTTP 401
unauthenticated - HTTP 403
forbidden - HTTP 404
not_found - HTTP 409
conflict - HTTP 422
validation_error - HTTP 429
rate_limited