---
title: "Save a keyword dataset | Brand evidence | AEO API"
description: "Saves a keyword dataset you own or license, as CSV or rows."
url: "https://aeoapi.dev/docs/features/brand-evidence/put-brands-brand-id-evidence-kind-key-keyword-dataset"
canonical: "https://aeoapi.dev/docs/features/brand-evidence/put-brands-brand-id-evidence-kind-key-keyword-dataset"
last_updated: "2026-11-30"
---

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}`](https://aeoapi.dev/docs/api-reference#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

| Name | Where | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `brand_id` | path | `string (uuid)` | Yes |  |
| `key` | path | `string (uuid)` | Yes | The dataset UUID. |
| `kind` | path | `"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

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `csv` | `object \| null` | No |  |
| `csv.column_map` | `object` | No |  |
| `csv.column_map.[key]` | `string` | No | Value for each key. |
| `csv.content` | `string` | Conditional |  |
| `csv.defaults` | `object` | No |  |
| `csv.defaults.country` | `string \| null` | No |  |
| `csv.defaults.difficulty_method` | `string \| null` | No |  |
| `csv.defaults.language` | `string \| null` | No |  |
| `csv.defaults.measured_on` | `string (date) \| null` | No |  |
| `csv.defaults.source` | `string \| null` | No |  |
| `csv.defaults.source_reference` | `string \| null` | No |  |
| `csv.defaults.volume_period_end` | `string (date) \| null` | No |  |
| `csv.defaults.volume_period_start` | `string (date) \| null` | No |  |
| `rights_basis` | `"customer_licensed" \| "customer_owned"` | Yes |  |
| `rights_expires_at` | `string (date-time)` | Yes |  |
| `rights_reference` | `string` | Yes |  |
| `rows` | `array of object \| null` | No |  |
| `rows.country` | `string` | Conditional |  |
| `rows.difficulty_method` | `string \| null` | No |  |
| `rows.difficulty_score` | `number \| null` | No |  |
| `rows.estimated_monthly_searches` | `integer \| null` | No |  |
| `rows.keyword` | `string` | Conditional |  |
| `rows.language` | `string` | Conditional |  |
| `rows.measured_on` | `string (date)` | Conditional |  |
| `rows.source` | `string` | Conditional |  |
| `rows.source_reference` | `string` | Conditional |  |
| `rows.volume_period_end` | `string (date) \| null` | No |  |
| `rows.volume_period_start` | `string (date) \| null` | No |  |
| `source_revision` | `integer` | 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.

```bash
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
```

```python
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)
```

```typescript
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

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `data` | `object` | Yes | The requested result. See the fields below for its contents. |
| `data.dataset_id` | `string (uuid)` | Yes |  |
| `data.rights_expires_at` | `string (date-time)` | Yes |  |
| `data.source_revision` | `integer` | Yes |  |
| `data.state` | `"active" \| "revoked"` | Yes |  |
| `data.stored_keywords` | `integer` | Yes |  |
| `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`](https://aeoapi.dev/docs/errors#invalid_request)
- HTTP 401 [`unauthenticated`](https://aeoapi.dev/docs/errors#unauthenticated)
- HTTP 403 [`forbidden`](https://aeoapi.dev/docs/errors#forbidden)
- HTTP 404 [`not_found`](https://aeoapi.dev/docs/errors#not_found)
- HTTP 422 [`validation_error`](https://aeoapi.dev/docs/errors#validation_error)
- HTTP 429 [`rate_limited`](https://aeoapi.dev/docs/errors#rate_limited)

[Brand evidence reference](https://aeoapi.dev/docs/features/brand-evidence)
