Skip to content

    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.

    PATCH /v2/recommendations

    • Body section is act.
    • Body workflow is analyst_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

    Request parameters
    NameWhereTypeRequiredDescription
    Idempotency-KeyheaderstringYes

    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"
    }
    Request body fields 1
    NameTypeRequiredDescription
    analyst_run_idstringYes
    brand_idstring (uuid)Yes
    draft_format"faq" | "organization_jsonld" | nullNo
    finding_idstring (uuid)Yes
    kind"fresh_check" | "content_draft"Yes
    passage_idstring (uuid) | nullNo
    section"act"Yes
    websitestring | nullNo
    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.json
    import 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.

    HTTP 201 response fields 1
    NameTypeRequiredDescription
    dataobjectYesThe requested result. See the fields below for its contents.
    data.action_idstringYes
    data.analyst_run_idstringYes
    data.approved_atstring | nullYes
    data.approved_bystring | nullYes
    data.approved_max_creditsinteger | nullYes
    data.brand_idstringYesIdentifies the brand this result belongs to.
    data.draftobject | nullYes
    data.draft_fingerprintstring | nullYes
    data.estimated_creditsintegerYesThe expected credit cost for this selection.
    data.finding_idstringYes
    data.kind"content_draft" | "fresh_check"Yes
    data.maximum_creditsintegerYesThe upper credit estimate for this selection.
    data.organization_facts_status"partner_confirmed" | "pending_partner_confirmation" | nullYes
    data.passage_idstring | nullYes
    data.proposed_atstringYes
    data.proposed_bystringYes
    data.quoteobject | nullYes
    data.runobject | nullYes
    data.run.brand_idstringConditional
    data.run.charged_creditsintegerConditional
    data.run.check_idstring | nullConditional
    data.run.check_urlstring | nullConditional
    data.run.citation_status"in_progress" | "completed"NoCitation preparation status for this run, when applicable.
    data.run.created_atstringConditional
    data.run.estimated_creditsintegerConditional
    data.run.failure_reasonsarray of "access_restricted" | "limit_reached" | "input_missing" | "approval_expired" | "cancelled" | "check_failed" | "check_incomplete"Conditional
    data.run.hold_reasonsarray of "retry_pending" | "under_review"Conditional
    data.run.phasestring | nullConditional
    data.run.progressobjectConditional
    data.run.progress.by_locationarray of objectNo
    data.run.progress.by_location[].by_sourcearray of objectConditional
    data.run.progress.by_location[].completed_stepsintegerConditional
    data.run.progress.by_location[].expected_stepsintegerConditional
    data.run.progress.by_location[].location_idstring (uuid)Conditional
    data.run.progress.by_sourcearray of objectConditional
    data.run.progress.completed_stepsintegerConditional
    data.run.progress.expected_stepsintegerConditional
    data.run.prompt_set_revisionstringConditional
    data.run.released_creditsintegerConditional
    data.run.report_idstring | nullConditional
    data.run.report_status"pending" | "ready" | "not_available"Conditional
    data.run.report_urlstring | nullConditional
    data.run.reserved_creditsintegerConditional
    data.run.run_idstringConditional
    data.run.statusstringConditional
    data.run.updated_atstringConditional
    data.run.websitestring | nullConditional
    data.run_idstring | nullYesIdentifies the run. Keep any prefix when using it in a request.
    data.status"proposed" | "approved"Yes
    data.v2_action_idstringNo
    metaobjectYesInformation 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.

    Recommendations and visibility analyst reference