Skip to content

    Brand evidence

    Save a keyword dataset

    Saves a keyword dataset you own or license, as CSV or rows.

    PUT /v2/brands/{brand_id}/evidence/{kind}/{key}

    • Path kind is keyword_dataset.

    Authentication and access

    Authentication
    Bearer API key
    Scopes
    optimizations:write
    Roles
    editor, owner, service
    Plans
    Optimizer
    Credits
    No credit charge.

    Parameters

    Request parameters
    NameWhereTypeRequiredDescription
    brand_idpathstring (uuid)Yes
    keypathstring (uuid)YesThe dataset UUID.
    kindpath"keyword_dataset"Yes

    Request body

    {
      "rights_basis": "customer_licensed",
      "rights_expires_at": "2026-12-24T10:00:00Z",
      "rights_reference": "fixture-license",
      "rows": [
        {
          "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"
        }
      ],
      "source_revision": 1
    }
    Request body fields 1
    NameTypeRequiredDescription
    csvobject | nullNo
    csv.column_mapobjectNo
    csv.column_map.[key]stringNoValue for each key.
    csv.contentstringConditional
    csv.defaultsobjectNo
    csv.defaults.countrystring | nullNo
    csv.defaults.difficulty_methodstring | nullNo
    csv.defaults.languagestring | nullNo
    csv.defaults.measured_onstring (date) | nullNo
    csv.defaults.sourcestring | nullNo
    csv.defaults.source_referencestring | nullNo
    csv.defaults.volume_period_endstring (date) | nullNo
    csv.defaults.volume_period_startstring (date) | nullNo
    rights_basis"customer_licensed" | "customer_owned"Yes
    rights_expires_atstring (date-time)Yes
    rights_referencestringYes
    rowsarray of object | nullNo
    rows.countrystringConditional
    rows.difficulty_methodstring | nullNo
    rows.difficulty_scorenumber | nullNo
    rows.estimated_monthly_searchesinteger | nullNo
    rows.keywordstringConditional
    rows.languagestringConditional
    rows.measured_onstring (date)Conditional
    rows.sourcestringConditional
    rows.source_referencestringConditional
    rows.volume_period_endstring (date) | nullNo
    rows.volume_period_startstring (date) | nullNo
    source_revisionintegerYes

    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/evidence/keyword_dataset/$KEY" \
      -H "Authorization: Bearer $AEO_API_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_put_brands_brand_id_evidence_kind_key(
            brand_id=environ["BRAND_ID"],
            key=environ["KEY"],
            kind="keyword_dataset",
            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.v2PutBrandsBrandIdEvidenceKindKey(
      process.env.BRAND_ID!,
      process.env.KEY!,
      "keyword_dataset",
      body,
    );
    console.log(response.body);

    Responses

    HTTP 200

    Successful Response

    application/json

    Response fields are listed below.

    HTTP 200 response fields 1
    NameTypeRequiredDescription
    dataobjectYesThe requested result. See the fields below for its contents.
    data.dataset_idstring (uuid)Yes
    data.rights_expires_atstring (date-time)Yes
    data.source_revisionintegerYes
    data.state"active" | "revoked"Yes
    data.stored_keywordsintegerYes
    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.

    Brand evidence reference