---
title: "Create Ad Record"
method: POST
path: "/data-in/ads"
tags: ["Data In"]
---

# Create Ad Record

`POST /data-in/ads`

Ingest ad data into Triple Whale. This endpoint allows users to upload  detailed ad information, including campaign, adset, ad details, and  performance metrics.

## Request body

- object
  - `shop` string, required — The exact Shop URL (e.g., 'example.myshopify.com'). Must match the Shop URL value shown in [Settings → Store](https://app.triplewhale.com/store-settings/general). The API key owner must also have access to the shop, otherwise the request will return 403.
  - `channel` string, required — The advertising platform associated with the ad data. Use a [Standardized Ad Channel ID](https://triplewhale.readme.io/docs/ads-standardized-channel-ids#/) or enter a custom value.
  - `channel_account_id` string — The platform-specific account ID. Maps to `account_id` in the Ads table.
  - `event_date` string, date, required — The date of the event in local timezone. Must be a valid date string (e.g., YYYY-MM-DD).
  - `currency` string, required — The currency used for reporting (e.g., 'USD').
  - `campaign` object — Details of the advertising campaign. At least one of `campaign`, `adset`, or `ad` is required.
    - `id` string, required — The unique ID of the campaign. Maps to `campaign_id` in the Ads table.
    - `name` string, required — The name of the campaign. Maps to `campaign_name` in the Ads table.
    - `status` 'PAUSED' | 'ACTIVE', required — The status of the campaign (e.g., 'PAUSED' or 'ACTIVE'). Maps to `campaign_status` in the Ads table.
  - `adset` object — Details of the adset. At least one of `campaign`, `adset`, or `ad` is required.
    - `id` string, required — The unique ID of the adset. Maps to `adset_id` in the Ads table.
    - `name` string, required — The name of the adset. Maps to `adset_name` in the Ads table.
    - `status` 'PAUSED' | 'ACTIVE', required — The status of the adset (e.g., 'PAUSED' or 'ACTIVE'). Maps to `adset_status` in the Ads table.
  - `ad` object — Details of the individual ad. At least one of `campaign`, `adset`, or `ad` is required.
    - `id` string, required — The unique ID of the ad. Maps to `ad_id` in the Ads table.
    - `name` string, required — The name of the ad. Maps to `ad_name` in the Ads table.
    - `status` 'PAUSED' | 'ACTIVE', required — The status of the ad (e.g., 'PAUSED' or 'ACTIVE'). Maps to `ad_status` in the Ads table.
    - `ad_image_url` string — The URL of the ad's thumbnail image.
  - `metrics` object — Performance metrics for the ad.
    - `clicks` number — Total number of clicks.
    - `conversions` number — Total number of conversions (purchases).
    - `conversion_value` number — Total conversion value (order revenue).
    - `impressions` number — Total number of impressions.
    - `spend` number — Total ad spend.
    - `visits` number — Total number of visits.
  - `updated_at` string, date-time — The time at which the ad record was last updated. Must be provided in ISO 8601 format, with explicit timezone information (`Z` or `+/-HH:mm` offset). Offsets are supported (e.g., `2024-11-29T12:00:00+02:00`). Defaults to the current time.

## Response `200`

Ad record successfully received.

- object
  - `success` boolean
  - `message` string

## Other responses

- `400` — Bad Request
- `429` — Too Many Requests
- `500` — Internal Server Error

---

[API](https://skmtc.net/triplewhale/apis/triple-whale-api.md) · [All operations](https://skmtc.net/triplewhale/apis/triple-whale-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/triplewhale/triple-whale-api/versions/96b22ac9b5a7/schema)
