> ## Documentation Index
> Fetch the complete documentation index at: https://docs.narrative.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Setting Up API Access for The Trade Desk

> Prerequisites and API access every Trade Desk Connector API guide needs

The Trade Desk Connector API lets an unattended integration deliver audiences to The Trade Desk (TTD) and manage the taxonomy third-party audiences are sold from. A person signs in once to create an API key, and the integration uses that key from then on.

Complete the [prerequisites](#prerequisites) and [set up API access](#set-up-api-access) on this page before you follow any Trade Desk API guide. The guides are listed under **Guides** on the [The Trade Desk Connector](/reference/connectors/the-trade-desk.md#guides) reference page.

## Prerequisites

What you need depends on the guide you follow:

| Prerequisite | First-party | Third-party | Taxonomy |
| - | :-: | :-: | :-: |
| [API key](#api-key) | ✓ | ✓ | ✓ |
| [TTD Brand ID on your connector profile](#brand-id) | ✓ | ✓ | ✓ |
| [Sub-Provider ID](#sub-provider-id), where TTD requires one | | ✓ | ✓ |
| [Taxonomy element for the audience](#taxonomy-element) | | ✓ | |
| [Advertiser ID and secret key](#advertiser-id-and-secret-key) | ✓ | | |

### API key

Create the key under **Settings → API Keys** with read and write on `datasets` and `connections`, write on `uploads`, and read on `app_profiles`. See [API Keys](/account-settings/api-keys.md) for the procedure and the [Permissions Reference](/reference/security/permissions.md) for what each resource covers.

Create it from a shared team account rather than a personal login, so the integration keeps working when someone changes roles. Keys expire in at most 365 days, so plan on rotating yours once a year.

### Brand ID

Narrative is the registered data provider at The Trade Desk, and your Brand ID is a brand under Narrative's provider account. TTD issues it, so you cannot create one yourself. Ask your Narrative relationship manager or your TTD account representative.

The Brand ID is stored on your connector profile. The connector's `GET /profiles` returns the profile with its Brand ID and Sub-Provider ID; see [Find your connector profile](/guides/connectors/the-trade-desk/third-party-delivery-api.md#5-find-your-connector-profile). Taxonomy synchronization is refused for a profile with no Brand ID.

### Sub-Provider ID

Where TTD requires one, the connector sends the Sub-Provider ID when it creates each taxonomy element in TTD. It cannot be added to an element afterward, so have it on your profile before your first synchronization. Your Narrative relationship manager sets it up.

### Taxonomy element

Every third-party audience is a buyable element in your taxonomy, and the element carries the price and who can buy it. Your first taxonomy needs TTD's approval before anything sells, so start it early with [Taxonomy management](/guides/connectors/the-trade-desk/managing-taxonomy-api.md).

### Advertiser ID and secret key

First-party delivery goes into one advertiser's seat, so you need that advertiser's TTD Advertiser ID and secret key from whoever owns the seat.

## Set up API access

The guides talk to two hosts, and both accept the same credential, `Authorization: Bearer <your API key>`:

| Host | Base URL | Handles |
| - | - | - |
| Narrative API | `https://api.narrative.io` | Datasets, uploads, connections |
| Trade Desk connector | `https://thetradedesk.narrativeconnectors.com` | Connector profile, schema validation, taxonomy elements, synchronization, advertiser registration, delivery statistics |

For request and response schemas on the connector host, see the [Trade Desk Connector API reference](/api-reference/the-trade-desk/taxonomies/get-the-taxonomy.md).

Confirm that both answer before you build anything:

```bash theme={null}
curl -s https://api.narrative.io/company-info/whoami \
  -H "Authorization: Bearer $NIO_API_TOKEN"
# → {"id":1234}

curl -s https://thetradedesk.narrativeconnectors.com/whoami \
  -H "Authorization: Bearer $NIO_API_TOKEN"
# → 1234
```

Both must return your company ID. The connector returns it as a bare number. A `403` from the first call means the key was not created under **Settings → API Keys**. Application credentials do not work with these guides.

> [!TIP]
>
> API keys contain characters that shells mangle. Read the key from a file or an environment variable rather than pasting it inline.

## Connection settings

For the `quick_settings` each connection accepts and how a delivery treats existing and new rows, see **Connection settings** on the [The Trade Desk Connector](/reference/connectors/the-trade-desk.md#connection-settings) reference page.

## Related content

> **[The Trade Desk Connector](/reference/connectors/the-trade-desk.md)**
>
> Full settings reference, identifiers, and status vocabularies

> **[Connector Interfaces](/concepts/data-activation/connector-interfaces.md)**
>
> Why a dataset connects to an interface rather than a connector


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.