---
title: "ThetradedeskCapiExport: Create job"
method: POST
path: "/job/thetradedesk-capi-export"
tags: ["Jobs"]
---

# ThetradedeskCapiExport: Create job

`POST /job/thetradedesk-capi-export`

## Request

- Base URL: `https://api.lytics.io/v2`
- URL: `https://api.lytics.io/v2/job/thetradedesk-capi-export`
- Auth: API key in header `Authorization`

Create a ThetradedeskCapiExport job

## Query parameters

- `account_id` string

## Request body `*/*`

- object
  - `auth_ids` string[]: Authorization IDs associated with the Job
  - `config` object, required: Job configuration, unique per-workflow
    - `advertiser_id` string: Enter your Trade Desk Advertiser ID. Required when sending page view events. Can be omitted when sending only user-interaction events.
    - `audience_events` 'enters_only' | 'exits_only': Select which audience trigger events to send. By default both enters and exits are sent.
    - `custom_fields_mapping` object[]: Optional. Map Lytics user fields to The Trade Desk custom fields td1..td10 for additional metadata (e.g. promo codes).
    - `event_name` string: Enter the name of the user-interaction event (e.g. addtocart, purchase). Required when sending user-interaction events. Leave empty for page view events.
    - `field_changes` string[]: Select up to 75 user fields. If any selected field changes for a user in the exported audience, the user will be sent to the Trade Desk Conversion API.
    - `identifier_mapping` object[], required: Map a Lytics user field to one of the Trade Desk identifier types (UID2, EUID, TDID, IDFA, AAID, NAID, DAID, IDL). At least one mapping is required. Identifiers are passed through as-is; UID2/EUID must be tokens (not raw).
    - `item_mapping` object[]: Optional. Map Lytics user fields to The Trade Desk item-level fields (name, qty, price, cat, item_brand) for user-interaction events.
    - `merchant_id` string: Enter your Trade Desk Merchant ID. Required when sending user-interaction events with a product catalog. Can be omitted when sending only page view events.
    - `pixel_id` string, required: Enter the universal pixel ID (for page views) or the event tracking tag ID (for user interactions) configured in The Trade Desk.
    - `referrer_url_field` string: Select the Lytics user field that contains the page URL. Required when sending page view events.
    - `segment_id` string, required: Select the Lytics audience that contains the users to export
    - `withbackfill` boolean: Select to immediately push users who currently exist in the selected Lytics audience. Deselecting will only push users as they enter or leave the audience.
  - `description` string: A user-defined description
  - `drop_events_during_quiet_window` boolean
  - `expires_at` string, date-time
  - `monitoring` object: Inline monitoring config. On write: omit to keep, null to clear, or a config to set.
  - `name` string, required: A user-defined name
  - `quiet_period` integer
  - `quiet_time_of_day` string
  - `quiet_timezone` string

## Response `201`

ThetradedeskCapiExport Job

- object
  - `_meta` object: Response Metadata
  - `data` object: Response Payload
    - `account_id` string: Lytics Account ID
    - `anomaly_rule` ModelsAnomalyRuleResp
      - `aid` integer
      - `checks` ModelsRuleCheckConfigReq[]
        - `allowable_violations` integer
        - `interval` string
        - `lookback_count` integer
        - `max_threshold` integer
        - `metric_type` string
        - `min_threshold` integer
        - `type` string
        - `variance_pct` number
      - `created` string
      - `id` string
      - `subject_id` string
      - `subject_type` string
      - `updated` string
    - `api_token_auth_id` string: this is set when work is create using access token
    - `auth_ids` string[]: Authorization IDs associated with the Job
    - `config` object, required: Job configuration, unique per-workflow
      - `advertiser_id` string: Enter your Trade Desk Advertiser ID. Required when sending page view events. Can be omitted when sending only user-interaction events.
      - `audience_events` 'enters_only' | 'exits_only': Select which audience trigger events to send. By default both enters and exits are sent.
      - `custom_fields_mapping` object[]: Optional. Map Lytics user fields to The Trade Desk custom fields td1..td10 for additional metadata (e.g. promo codes).
      - `event_name` string: Enter the name of the user-interaction event (e.g. addtocart, purchase). Required when sending user-interaction events. Leave empty for page view events.
      - `field_changes` string[]: Select up to 75 user fields. If any selected field changes for a user in the exported audience, the user will be sent to the Trade Desk Conversion API.
      - `identifier_mapping` object[], required: Map a Lytics user field to one of the Trade Desk identifier types (UID2, EUID, TDID, IDFA, AAID, NAID, DAID, IDL). At least one mapping is required. Identifiers are passed through as-is; UID2/EUID must be tokens (not raw).
      - `item_mapping` object[]: Optional. Map Lytics user fields to The Trade Desk item-level fields (name, qty, price, cat, item_brand) for user-interaction events.
      - `merchant_id` string: Enter your Trade Desk Merchant ID. Required when sending user-interaction events with a product catalog. Can be omitted when sending only page view events.
      - `pixel_id` string, required: Enter the universal pixel ID (for page views) or the event tracking tag ID (for user interactions) configured in The Trade Desk.
      - `referrer_url_field` string: Select the Lytics user field that contains the page URL. Required when sending page view events.
      - `segment_id` string, required: Select the Lytics audience that contains the users to export
      - `withbackfill` boolean: Select to immediately push users who currently exist in the selected Lytics audience. Deselecting will only push users as they enter or leave the audience.
    - `created` string
    - `deleted` boolean: The Job has been deleted
    - `description` string: A user-defined description
    - `drop_events_during_quiet_window` boolean
    - `expires_at` string, date-time
    - `id` string: A Lytics-assigned, immutable unique ID for the Job
    - `meta` object: Extra meta data about the job
    - `monitoring` object: Inline monitoring config. On write: omit to keep, null to clear, or a config to set.
    - `name` string, required: A user-defined name
    - `quiet_period` integer
    - `quiet_time_of_day` string
    - `quiet_timezone` string
    - `sleep_until` string
    - `status` 'runnable' | 'sleeping' | 'paused' | 'completed' | 'fault' | 'failed' | 'killed' | 'deleted' | 'unknown': The status of the job
    - `updated` string
    - `user_id` string: The user ID that created or updated the job
    - `workflow` string: The workflow slug
    - `workflow_id` string: The workflow ID
  - `request_id` string
  - `status` integer: HTTP Status Code

## Other responses

- `404`: Not Found
- `500`: Internal Server Error

## Changes

- **2026-11-03** `d8e975057aec`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/lytics/apis/lytics-api/changes/job/thetradedesk-capi-export/post.md)

---

[API](https://skmtc.dev/lytics/apis/lytics-api.md) - [All operations](https://skmtc.dev/lytics/apis/lytics-api/llms.txt) - [OpenAPI document](https://skmtc.dev/lytics/apis/lytics-api/revisions/d8e975057aec?raw)
