Recommendations and visibility analyst
Propose a follow-up action
Propose a content draft or a new check to follow up on a saved visibility finding.
- Body
sectionisact. - Body
workflowisanalyst_action.
Authentication and access
- Authentication
- Bearer API key
- Scopes
- analytics:read
- Roles
- editor, owner, service
- Plans
- Optimizer, Analyzer
- Credits
- No credit charge.
- Action kind content_draft. Scopes analytics:read, optimizations:write. Plans Optimizer.
- FAQ drafts also require this permission. Scope
prompts:read. - Action kind fresh_check. Scopes analytics:read, collections:write. Plans Optimizer, Analyzer.
Parameters
| Name | Where | Type | Required | Description |
|---|---|---|---|---|
Idempotency-Key | header | string | Yes |
Request body
{
"analyst_run_id": "analyst:report.00000000-0000-4000-8000-000000000001.2026-10.2026-11",
"brand_id": "00000000-0000-4000-8000-000000000001",
"finding_id": "00000000-0000-4000-8000-000000000001",
"kind": "fresh_check",
"section": "act",
"workflow": "analyst_action"
}| Name | Type | Required | Description |
|---|---|---|---|
analyst_run_id | string | Yes | |
brand_id | string (uuid) | Yes | |
draft_format | "faq" | "organization_jsonld" | null | No | |
finding_id | string (uuid) | Yes | |
kind | "fresh_check" | "content_draft" | Yes | |
passage_id | string (uuid) | null | No | |
section | "act" | Yes | |
website | string | null | No | |
workflow | "analyst_action" | Yes |
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 PATCH "$AEO_API_BASE_URL/v2/recommendations" \
-H "Authorization: Bearer $AEO_API_KEY" \
-H "Idempotency-Key: $IDEMPOTENCY_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_patch_recommendations(
body=body,
idempotency_key=environ["IDEMPOTENCY_KEY"],
)
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.v2PatchRecommendations(
body,
{
idempotencyKey: process.env.IDEMPOTENCY_KEY!,
},
);
console.log(response.body);Responses
HTTP 201
Created
application/json
Response fields are listed below.
| Name | Type | Required | Description |
|---|---|---|---|
data | object | Yes | The requested result. See the fields below for its contents. |
data.action_id | string | Yes | |
data.analyst_run_id | string | Yes | |
data.approved_at | string | null | Yes | |
data.approved_by | string | null | Yes | |
data.approved_max_credits | integer | null | Yes | |
data.brand_id | string | Yes | Identifies the brand this result belongs to. |
data.draft | object | null | Yes | |
data.draft_fingerprint | string | null | Yes | |
data.estimated_credits | integer | Yes | The expected credit cost for this selection. |
data.finding_id | string | Yes | |
data.kind | "content_draft" | "fresh_check" | Yes | |
data.maximum_credits | integer | Yes | The upper credit estimate for this selection. |
data.organization_facts_status | "partner_confirmed" | "pending_partner_confirmation" | null | Yes | |
data.passage_id | string | null | Yes | |
data.proposed_at | string | Yes | |
data.proposed_by | string | Yes | |
data.quote | object | null | Yes | |
data.run | object | null | Yes | |
data.run.brand_id | string | Conditional | |
data.run.charged_credits | integer | Conditional | |
data.run.check_id | string | null | Conditional | |
data.run.check_url | string | null | Conditional | |
data.run.citation_status | "in_progress" | "completed" | No | Citation preparation status for this run, when applicable. |
data.run.created_at | string | Conditional | |
data.run.estimated_credits | integer | Conditional | |
data.run.failure_reasons | array of "access_restricted" | "limit_reached" | "input_missing" | "approval_expired" | "cancelled" | "check_failed" | "check_incomplete" | Conditional | |
data.run.hold_reasons | array of "retry_pending" | "under_review" | Conditional | |
data.run.phase | string | null | Conditional | |
data.run.progress | object | Conditional | |
data.run.progress.by_location | array of object | No | |
data.run.progress.by_location[].by_source | array of object | Conditional | |
data.run.progress.by_location[].completed_steps | integer | Conditional | |
data.run.progress.by_location[].expected_steps | integer | Conditional | |
data.run.progress.by_location[].location_id | string (uuid) | Conditional | |
data.run.progress.by_source | array of object | Conditional | |
data.run.progress.completed_steps | integer | Conditional | |
data.run.progress.expected_steps | integer | Conditional | |
data.run.prompt_set_revision | string | Conditional | |
data.run.released_credits | integer | Conditional | |
data.run.report_id | string | null | Conditional | |
data.run.report_status | "pending" | "ready" | "not_available" | Conditional | |
data.run.report_url | string | null | Conditional | |
data.run.reserved_credits | integer | Conditional | |
data.run.run_id | string | Conditional | |
data.run.status | string | Conditional | |
data.run.updated_at | string | Conditional | |
data.run.website | string | null | Conditional | |
data.run_id | string | null | Yes | Identifies the run. Keep any prefix when using it in a request. |
data.status | "proposed" | "approved" | Yes | |
data.v2_action_id | string | No | |
meta | object | Yes | Information about this response, including any warnings or pagination details. |
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 422
validation_error - HTTP 429
rate_limited