Skip to content

    AI answer collection and runs

    Cancel a job

    Cancels a job. The run stays available to read.

    DELETE /v2/runs/{run_id}

    • Path run_id starts with job:.

    Authentication and access

    Authentication
    Bearer API key
    Scopes
    collections:write
    Roles
    editor, owner, service
    Plans
    Optimizer, Analyzer
    Credits
    No credit charge.
    Billing access
    Required

    Parameters

    Request parameters
    NameWhereTypeRequiredDescription
    run_idpathstringYes
    Idempotency-KeyheaderstringYesFor 7 days, sending the same key and body for the same account and operation returns the original response. Changing the body for that key returns HTTP 409.
    reasonquerystringNoWhy you are cancelling the run. Supply 1 to 500 characters.

    Request body

    Send this request without a body.

    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.

    curl --fail-with-body -X DELETE "$AEO_API_BASE_URL/v2/runs/$RUN_ID" \
      -H "Authorization: Bearer $AEO_API_KEY" \
      -H "Idempotency-Key: $IDEMPOTENCY_KEY"
    from os import environ
    from aeo_sdk import AeoClient
    
    with AeoClient(environ["AEO_API_KEY"], base_url=environ["AEO_API_BASE_URL"]) as client:
        response = client.v2_delete_runs_run_id(
            run_id=environ["RUN_ID"],
            idempotency_key=environ["IDEMPOTENCY_KEY"],
        )
        print(response.body)
    import { AeoClient } from "@aeoapi/aeo-sdk";
    
    const client = new AeoClient(process.env.AEO_API_KEY!, {
      baseUrl: process.env.AEO_API_BASE_URL!,
    });
    const response = await client.v2DeleteRunsRunId(
      process.env.RUN_ID!,
      {
        idempotencyKey: process.env.IDEMPOTENCY_KEY!,
      },
    );
    console.log(response.body);

    Responses

    HTTP 202 means the request was accepted. Follow the Location header to check progress. You can also follow data.poll_url when present. For a job with data.state, queued and running mean the job is still in progress. Read the result at completed or partial. Stop polling at failed or cancelled.

    HTTP 202

    Collect or cancel work result.

    HTTP 202 headers
    NameTypeRequiredDescription
    Locationstring (uri-reference)NoAuthenticated polling URI returned in data.poll_url.
    X-RateLimit-LimitintegerNoRequests in rate window.
    X-RateLimit-RemainingintegerNoRemaining request tokens.
    X-RateLimit-ResetintegerNoUTC Unix seconds when window resets.
    X-Request-Idstring (uuid)NoTrace identifier.
    X-Usage-UnitsintegerNoCU charged by this response; GET and account/usage always zero.

    application/json

    {
      "data": {
        "billed_units": 0,
        "created_at": "2026-11-06T00:00:00Z",
        "error": null,
        "estimated_units": 0,
        "id": "00000000-0000-4000-8000-000000000001",
        "kind": "collection",
        "poll_url": "https://api.aeoapi.dev/v2/runs/job:00000000-0000-4000-8000-000000000001",
        "progress": 0,
        "reserved_units": 0,
        "result": null,
        "revision": 1,
        "state": "queued",
        "updated_at": "2026-11-06T00:00:00Z"
      },
      "meta": {
        "as_of": "2026-11-06T00:00:00Z",
        "collected_at": null,
        "next_cursor": null,
        "next_refresh_at": null,
        "request_id": "00000000-0000-4000-8000-000000000001",
        "rights_filtered": false,
        "schema_version": "1.0",
        "stale": false,
        "warnings": []
      }
    }
    HTTP 202 response fields 1
    NameTypeRequiredDescription
    dataobjectYesThe requested result. See the fields below for its contents.
    data.billed_unitsintegerYesThe credits charged for this work.
    data.created_atstring (date-time)Yes
    data.errorobject | nullYes
    data.error.code"invalid_request" | "unauthenticated" | "quota_exceeded" | "forbidden" | "not_found" | "conflict" | "precondition_failed" | "validation_error" | "rate_limited" | "source_pending" | "feature_not_offered" | "internal_error"Conditional
    data.error.duplicate_ofstring (uuid)NoID of your existing prompt.
    data.error.field_errorsarray of objectNo
    data.error.field_errors[].fieldstring | nullConditional
    data.error.field_errors[].messagestringConditional
    data.error.messagestringConditional
    data.error.request_idstring (uuid)Conditional
    data.error.retryablebooleanConditional
    data.error.similar_promptsarray of objectNoOther matching prompts in your library.
    data.error.similar_prompts[].prompt_idstring (uuid)Conditional
    data.estimated_unitsintegerYes
    data.idstring (uuid)Yes
    data.kind"collection" | "prompt_generation" | "deletion" | "audit" | "optimization"Yes
    data.phase"researching" | "drafting" | "validating" | "collecting" | "analyzing" | "exporting" | "purging" | nullNo
    data.poll_urlstring (uri)YesSend an authenticated GET request to this URL to read the current result.
    data.progressnumberYes
    data.reserved_unitsintegerYesCredits held for the run.
    data.resultobject | object | object | object | object | nullYes
    data.result.acceptedintegerConditional
    data.result.answersarray of objectNo
    data.result.answers[].answer_textstringConditional
    data.result.answers[].answer_text_truncatedbooleanConditional
    data.result.answers[].brand_citedbooleanConditional
    data.result.answers[].brand_mentionedboolean | nullConditional
    data.result.answers[].citationsarray of objectConditional
    data.result.answers[].citations[].orderintegerConditional
    data.result.answers[].citations[].urlstringConditional
    data.result.answers[].observation_idstringConditional
    data.result.evidence_cursorstring | nullConditional
    data.result.failedintegerConditional
    data.result.kind"collection"Conditional
    data.result.observation_idsarray of string (uuid)Conditional
    data.result.observationsarray of objectNo
    data.result.observations[].applied_locationobject | nullConditional
    data.result.observations[].applied_location.citystring | nullNo
    data.result.observations[].applied_location.countrystring | nullNo
    data.result.observations[].applied_location.granularity"country" | "region" | "city" | "postal" | "coordinates"Conditional
    data.result.observations[].applied_location.latitudenumber | nullNo
    data.result.observations[].applied_location.longitudenumber | nullNo
    data.result.observations[].applied_location.postal_codestring | nullNo
    data.result.observations[].applied_location.regionstring | nullNo
    data.result.observations[].observation_idstring (uuid)Conditional
    data.result.detailsarray of objectNo
    data.result.details[].rationalestringConditional
    data.result.details[].suggestion_indexintegerConditional
    data.result.details[].template_versionstringConditional
    data.result.details[].warningsarray of stringConditional
    data.result.kind"prompt_generation"Conditional
    data.result.outcomeobjectNoExplains why the result contains no suggestions.
    data.result.outcome.reason"no_eligible_candidates" | "web_evidence_missing"ConditionalWhether no candidate qualified or usable web evidence was missing.
    data.result.outcome.web_evidence_usedbooleanConditionalWhether the generation received a reply with confirmed web activity.
    data.result.suggestionsarray of objectConditional
    data.result.suggestions[].action"create"Conditional
    data.result.suggestions[].allow_similarbooleanNoSave the prompt even if you already track the same question or a differently worded question with the same meaning.
    data.result.suggestions[].brand_idstring (uuid) | nullNo
    data.result.suggestions[].category_idsarray of string | nullConditional
    data.result.suggestions[].intent"discovery" | "recommendation" | "evaluation" | "pricing" | "comparison" | "alternatives" | "use_case" | "transaction" | "local" | "troubleshooting" | "trust" | "informational"Conditional
    data.result.suggestions[].marketobjectConditional
    data.result.suggestions[].market.citystring | null | nullNo
    data.result.suggestions[].market.countrystringConditional
    data.result.suggestions[].market.languagestringConditional
    data.result.suggestions[].market.regionstring | null | nullNo
    data.result.suggestions[].tagsarray of string | nullNo
    data.result.suggestions[].textstringConditional
    data.result.backup_expiry_atstring (date-time) | nullConditional
    data.result.kind"deletion"Conditional
    data.result.purgedbooleanConditional
    data.result.resource_idstring (uuid)Conditional
    data.result.retained_record_reasonsarray of stringConditional
    data.result.agent_readinessobjectNoOur defined website access criteria for AI agents at checked_at (not a universal AI-readiness standard; no indexing, ranking, citation or answer outcome is measured).
    data.result.agent_readiness.checked_atstring (date-time)Conditional
    data.result.agent_readiness.checksarray of objectConditional
    data.result.agent_readiness.checks[].assessment"verified" | "detected" | "not_detected" | "not_assessed"No
    data.result.agent_readiness.checks[].category"core" | "robots" | "content" | "discovery" | "protocol"Conditional
    data.result.agent_readiness.checks[].evidencearray of objectConditional
    data.result.agent_readiness.checks[].evidence[].methodstringConditional
    data.result.agent_readiness.checks[].evidence[].observedstringConditional
    data.result.agent_readiness.checks[].evidence[].urlstringConditional
    data.result.agent_readiness.checks[].idstringConditional
    data.result.agent_readiness.checks[].labelstringConditional
    data.result.agent_readiness.checks[].limitationsarray of stringConditional
    data.result.agent_readiness.checks[].recommendationstring | nullConditional
    data.result.agent_readiness.checks[].referencestringNo
    data.result.agent_readiness.checks[].scoredbooleanConditional
    data.result.agent_readiness.checks[].spec_versionstringNo
    data.result.agent_readiness.checks[].status"pass" | "fail" | "unknown" | "not_applicable"Conditional
    data.result.agent_readiness.limitationsarray of stringConditional
    data.result.agent_readiness.scope"essential" | "full"Conditional
    data.result.agent_readiness.scoreobjectConditionaleligible = passed + failed + unknown over applicable scored checks; value = 100 * passed / (passed + failed), or null when no scored check was conclusive.
    data.result.agent_readiness.score.eligibleintegerConditional
    data.result.agent_readiness.score.failedintegerConditional
    data.result.agent_readiness.score.passedintegerConditional
    data.result.agent_readiness.score.unknownintegerConditional
    data.result.agent_readiness.score.valuenumber | nullConditional
    data.result.agent_readiness.status"completed" | "partial" | "not_assessed"Conditional
    data.result.agent_readiness.versionstringConditional
    data.result.budget_exhaustedbooleanNo
    data.result.business_factsobjectNo
    data.result.business_facts.locationsarray of objectConditional
    data.result.business_facts.locations[].location_idstring (uuid) | nullConditional
    data.result.business_facts.locations[].scoreobjectConditional
    data.result.business_facts.locations[].score.fieldsobjectConditional
    data.result.business_facts.locations[].score.fields.[key]number | nullNoValue for each key.
    data.result.business_facts.locations[].score.matched_fieldsintegerConditional
    data.result.business_facts.locations[].score.mismatched_fieldsintegerConditional
    data.result.business_facts.locations[].score.overallnumber | nullConditional
    data.result.business_facts.omitted_sourcesintegerConditional
    data.result.business_facts.scoreobjectConditional
    data.result.business_facts.score.fieldsobjectConditional
    data.result.business_facts.score.fields.[key]number | nullNoValue for each key.
    data.result.business_facts.score.matched_fieldsintegerConditional
    data.result.business_facts.score.mismatched_fieldsintegerConditional
    data.result.business_facts.score.overallnumber | nullConditional
    data.result.business_facts.sourcesarray of objectConditional
    data.result.business_facts.sources[].fieldsarray of objectConditional
    data.result.business_facts.sources[].fields[].expectedstring | array of string | object | nullConditional
    data.result.business_facts.sources[].fields[].expected.[key]string | number | array of stringNoValue for each key.
    data.result.business_facts.sources[].fields[].fieldstringConditional
    data.result.business_facts.sources[].fields[].observedstring | array of string | object | nullConditional
    data.result.business_facts.sources[].fields[].observed.[key]string | number | array of stringNoValue for each key.
    data.result.business_facts.sources[].fields[].status"matched" | "mismatched" | "not_found"Conditional
    data.result.business_facts.sources[].final_urlstring | nullConditional
    data.result.business_facts.sources[].http_statusinteger | nullConditional
    data.result.business_facts.sources[].location_idstring (uuid) | nullConditional
    data.result.business_facts.sources[].source"supplied" | "profile" | "citation"Conditional
    data.result.business_facts.sources[].status"matched" | "mismatched" | "not_found" | "could_not_fetch"Conditional
    data.result.business_facts.sources[].urlstringConditional
    data.result.completeness"preliminary" | "partial" | "complete" | "blocked"No
    data.result.content_coverage_notestringNo
    data.result.crawler_accessobjectNo
    data.result.crawler_access.assessedintegerConditional
    data.result.crawler_access.eligibleintegerConditional
    data.result.crawler_access.notestringConditional
    data.result.crawler_access.pagesarray of objectConditional
    data.result.crawler_access.pages[].agentsarray of objectConditional
    data.result.crawler_access.pages[].agents[].access"allowed" | "blocked_by_robots" | "blocked_by_firewall" | "challenged" | "rate_limited" | "unknown"Conditional
    data.result.crawler_access.pages[].agents[].agentstringConditional
    data.result.crawler_access.pages[].agents[].evidenceobjectConditional
    data.result.crawler_access.pages[].agents[].evidence.body_size_rationumber | nullConditional
    data.result.crawler_access.pages[].agents[].evidence.browser_statusinteger | nullConditional
    data.result.crawler_access.pages[].agents[].evidence.crawler_statusinteger | nullConditional
    data.result.crawler_access.pages[].agents[].evidence.marker"challenge_page" | "block_page" | "block_redirect" | "empty_or_short_body" | nullConditional
    data.result.crawler_access.pages[].agents[].purpose"search" | "user_fetch" | "training"Conditional
    data.result.crawler_access.pages[].agents[].robots_access"allowed" | "blocked" | nullNoWhether robots.txt allows this crawler on this page. HTTP 4xx responses other than 429 mean allowed. The value is null if the rules could not be checked.
    data.result.crawler_access.pages[].agents[].visibility_riskbooleanConditional
    data.result.crawler_access.pages[].urlstringConditional
    data.result.crawler_access.scorenumber | nullConditional
    data.result.findingsarray of objectConditional
    data.result.findings[].codestring | nullConditional
    data.result.findings[].confidencenumberConditional
    data.result.findings[].evidencestringConditional
    data.result.findings[].idstring (uuid)Conditional
    data.result.findings[].recommendationstringConditional
    data.result.findings[].severity"critical" | "high" | "medium" | "low" | "info"Conditional
    data.result.findings[].urlstring (uri)Conditional
    data.result.findings[].verificationstringConditional
    data.result.first_result_atstring (date-time) | nullNo
    data.result.kind"audit"Conditional
    data.result.next_cursorstring | nullConditional
    data.result.pages_billedintegerNoPages counted toward the final charge.
    data.result.pages_checkedintegerConditional
    data.result.pages_discoveredintegerNo
    data.result.pages_skippedintegerConditional
    data.result.profile"instant" | "detailed"No
    data.result.schema_consistencyobjectNo
    data.result.schema_consistency.pagesarray of objectConditional
    data.result.schema_consistency.pages[].fieldsarray of objectConditional
    data.result.schema_consistency.pages[].fields[].basis"visible" | "profile"Conditional
    data.result.schema_consistency.pages[].fields[].expectedstring | array of string | object | nullConditional
    data.result.schema_consistency.pages[].fields[].expected.[key]string | number | array of stringNoValue for each key.
    data.result.schema_consistency.pages[].fields[].fieldstringConditional
    data.result.schema_consistency.pages[].fields[].observedstring | array of string | object | nullConditional
    data.result.schema_consistency.pages[].fields[].observed.[key]string | number | array of stringNoValue for each key.
    data.result.schema_consistency.pages[].fields[].status"matched" | "mismatched" | "not_found"Conditional
    data.result.schema_consistency.pages[].issuesarray of objectConditional
    data.result.schema_consistency.pages[].issues[].code"missing_local_business" | "missing_required_properties" | "differs_from_visible" | "differs_from_profile" | "conflicting_blocks"Conditional
    data.result.schema_consistency.pages[].issues[].comparedarray of object | object | objectConditional
    data.result.schema_consistency.pages[].issues[].compared[].expectedstring | array of string | object | nullConditional
    data.result.schema_consistency.pages[].issues[].compared[].expected.[key]string | number | array of stringNoValue for each key.
    data.result.schema_consistency.pages[].issues[].compared[].fieldstringConditional
    data.result.schema_consistency.pages[].issues[].compared[].observedstring | array of string | object | nullConditional
    data.result.schema_consistency.pages[].issues[].compared[].observed.[key]string | number | array of stringNoValue for each key.
    data.result.schema_consistency.pages[].issues[].compared[].basis"visible" | "profile"Conditional
    data.result.schema_consistency.pages[].issues[].compared[].status"matched" | "mismatched" | "not_found"Conditional
    data.result.schema_consistency.pages[].issues[].fieldsarray of stringConditional
    data.result.schema_consistency.pages[].location_idstring (uuid) | nullConditional
    data.result.schema_consistency.pages[].markup"json_ld" | "microdata" | nullConditional
    data.result.schema_consistency.pages[].schema_typestring | nullConditional
    data.result.schema_consistency.pages[].urlstringConditional
    data.result.schema_consistency.pages_with_issuesintegerConditional
    data.result.schema_consistency.scorenumber | nullConditional
    data.result.skipped_reasonsarray of stringNo
    data.result.approval_expires_atstring (date-time) | nullConditional
    data.result.approval_idstring (uuid) | nullConditional
    data.result.artifact_download_urlstring (uri) | nullConditional
    data.result.artifact_sha256string | nullConditional
    data.result.diffstring | nullConditional
    data.result.external_revisionstring | null | nullConditional
    data.result.kind"optimization"Conditional
    data.result.syntheticbooleanNo
    data.result.target_urlstring (uri)Conditional
    data.result.verification_findingsarray of objectConditional
    data.result.verification_findings[].codestring | nullConditional
    data.result.verification_findings[].confidencenumberConditional
    data.result.verification_findings[].evidencestringConditional
    data.result.verification_findings[].idstring (uuid)Conditional
    data.result.verification_findings[].recommendationstringConditional
    data.result.verification_findings[].severity"critical" | "high" | "medium" | "low" | "info"Conditional
    data.result.verification_findings[].urlstring (uri)Conditional
    data.result.verification_findings[].verificationstringConditional
    data.revisionintegerYes
    data.state"queued" | "running" | "awaiting_approval" | "approved" | "executing" | "verifying" | "completed" | "partial" | "failed" | "cancelled" | "rejected" | "stale_approval"Yes
    data.updated_atstring (date-time)Yes
    metaobjectYesInformation about this response, including any warnings or pagination details.
    meta.as_ofstring (date-time)YesThe point in time that the response represents.
    meta.cohort_versionstring | nullNoIdentifies the version of the group used to calculate the results.
    meta.collected_atstring (date-time) | nullYesWhen the data was collected, if available.
    meta.metric_versionstring | nullNoThe version of the metric definition used for these results.
    meta.next_cursorstring | nullYesWhen present, pass this value as cursor to request the next page with the same filters.
    meta.next_refresh_atstring (date-time) | nullYes
    meta.request_idstring (uuid)YesKeep this ID when reporting a problem with the request.
    meta.restricted_fieldsarray of stringNoFields that your current access does not allow the API to return.
    meta.rights_filteredbooleanYesIndicates whether access rights affected the returned data.
    meta.schema_version"1.0"YesThe version of the response format.
    meta.stalebooleanYes
    meta.warningsarray of stringYesRead these notes for limitations that affect the results.
    HTTP 202 response fields 2
    NameTypeRequiredDescription
    dataobjectYesThe requested result. See the fields below for its contents.
    data.billed_unitsintegerNoThe credits charged for this work.
    data.brand_idstringYesIdentifies the brand this result belongs to.
    data.completed_pagesintegerNo
    data.due_pagesintegerNo
    data.next_offsetinteger | nullNo
    data.pagesarray of objectNo
    data.pages[].brand_mentioned_on_pageboolean | nullNo
    data.pages[].changed_since_previous_checkboolean | nullNo
    data.pages[].citing_answersintegerNo
    data.pages[].classification_basis"curated_domain" | "url_pattern" | "page_content" | "unknown"No
    data.pages[].classification_confidencenumberNo
    data.pages[].competitors_mentioned_on_pageobjectNo
    data.pages[].competitors_mentioned_on_page.[key]boolean | nullNoValue for each key.
    data.pages[].domainstringNo
    data.pages[].last_checked_atstringNo
    data.pages[].page_idstringConditional
    data.pages[].page_status"in_progress" | "live" | "gone"Conditional
    data.pages[].page_type"blog" | "directory" | "review_site" | "news" | "forum" | "brand_site" | "competitor_site" | "marketplace" | "docs" | "social" | "press_release" | "comparison" | "roundup" | "guide" | "institution" | "reference" | "other" | "unknown" | "video"No
    data.pages[].page_type_confidencenumber | nullNo
    data.pages[].source_category"directory" | "review_site" | "local_directory" | "industry_directory" | "forum" | "social" | "video" | "news" | "local_news" | "comparison" | "marketplace" | "brand_site" | "competitor_site" | "docs" | "press" | "other"No
    data.pages[].urlstringConditional
    data.run_idstringYesIdentifies the run. Keep any prefix when using it in a request.
    data.status"in_progress" | "completed" | "cancelled"Yes
    data.total_pagesintegerNo
    data.workflow"cited_page_sweep" | "cited_page_labelling"YesThe workflow selected for this run or estimate.
    metaobjectYesInformation about this response, including any warnings or pagination details.
    meta.as_ofstring (date-time)YesThe point in time that the response represents.
    meta.cohort_versionstring | nullNoIdentifies the version of the group used to calculate the results.
    meta.collected_atstring (date-time) | nullYesWhen the data was collected, if available.
    meta.metric_versionstring | nullNoThe version of the metric definition used for these results.
    meta.next_cursorstring | nullYesWhen present, pass this value as cursor to request the next page with the same filters.
    meta.next_refresh_atstring (date-time) | nullYes
    meta.request_idstring (uuid)YesKeep this ID when reporting a problem with the request.
    meta.restricted_fieldsarray of stringNoFields that your current access does not allow the API to return.
    meta.rights_filteredbooleanYesIndicates whether access rights affected the returned data.
    meta.schema_version"1.0"YesThe version of the response format.
    meta.stalebooleanYes
    meta.warningsarray of stringYesRead these notes for limitations that affect the results.
    HTTP 202 response fields 3
    NameTypeRequiredDescription
    dataobjectYesThe requested result. See the fields below for its contents.
    data.poll_urlstring (uri-reference)YesSend an authenticated GET request to this URL to read the current result.
    data.run_idstringYesIdentifies the run. Keep any prefix when using it in a request.
    data.status"queued" | "running" | "awaiting_approval" | "approved" | "executing" | "verifying" | "succeeded" | "partial" | "failed" | "cancelled" | "rejected" | "stale_approval"Yes
    data.workflow"retrieval_win_rate"YesThe workflow selected for this run or estimate.
    metaobjectYesInformation about this response, including any warnings or pagination details.
    meta.as_ofstring (date-time)YesThe point in time that the response represents.
    meta.cohort_versionstring | nullNoIdentifies the version of the group used to calculate the results.
    meta.collected_atstring (date-time) | nullYesWhen the data was collected, if available.
    meta.metric_versionstring | nullNoThe version of the metric definition used for these results.
    meta.next_cursorstring | nullYesWhen present, pass this value as cursor to request the next page with the same filters.
    meta.next_refresh_atstring (date-time) | nullYes
    meta.request_idstring (uuid)YesKeep this ID when reporting a problem with the request.
    meta.restricted_fieldsarray of stringNoFields that your current access does not allow the API to return.
    meta.rights_filteredbooleanYesIndicates whether access rights affected the returned data.
    meta.schema_version"1.0"YesThe version of the response format.
    meta.stalebooleanYes
    meta.warningsarray of stringYesRead these notes for limitations that affect the results.

    Errors

    Read code and message in the error response. Keep request_id when you contact support.

    AI answer collection and runs reference