{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/reddit/json-schema/reddit-components-schema-custom-audience-create-schema.json",
  "title": "Custom Audience Create",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/reddit-custom-audiences-api-openapi.yml#/components/schemas/components_schema_custom_audience_create",
  "oneOf": [
    {
      "$ref": "#/$defs/components_schema_customer_list_custom_audience"
    },
    {
      "$ref": "#/$defs/components_schema_pixel_retargeting_custom_audience_create"
    },
    {
      "$ref": "#/$defs/components_schema_engagement_retargeting_custom_audience_create"
    }
  ],
  "$defs": {
    "ad_account_id-3": {
      "type": [
        "string"
      ],
      "description": "The ID of the ad account that owns this custom audience.",
      "readOnly": true
    },
    "business_id-2": {
      "anyOf": [
        {
          "$ref": "#/$defs/components_schema_business_id"
        },
        {
          "type": "null"
        }
      ],
      "description": "The ID of the business that owns this custom audience.",
      "readOnly": true
    },
    "components_enums_currency": {
      "description": "The currency symbol used ([ISO 4217](https://www.iso.org/iso-4217-currency-codes.html)).",
      "type": "string",
      "enum": [
        "AED",
        "AFN",
        "ALL",
        "AMD",
        "ANG",
        "AOA",
        "ARS",
        "AUD",
        "AWG",
        "AZN",
        "BAM",
        "BBD",
        "BDT",
        "BGN",
        "BHD",
        "BIF",
        "BMD",
        "BND",
        "BOB",
        "BOV",
        "BRL",
        "BSD",
        "BTN",
        "BWP",
        "BYN",
        "BZD",
        "CAD",
        "CDF",
        "CHE",
        "CHF",
        "CHW",
        "CLF",
        "CLP",
        "CNY",
        "COP",
        "COU",
        "CRC",
        "CUC",
        "CUP",
        "CVE",
        "CZK",
        "DJF",
        "DKK",
        "DOP",
        "DZD",
        "EGP",
        "ERN",
        "ETB",
        "EUR",
        "FJD",
        "FKP",
        "GBP",
        "GEL",
        "GHS",
        "GIP",
        "GMD",
        "GNF",
        "GTQ",
        "GYD",
        "HKD",
        "HNL",
        "HRK",
        "HTG",
        "HUF",
        "IDR",
        "ILS",
        "INR",
        "IQD",
        "IRR",
        "ISK",
        "JMD",
        "JOD",
        "JPY",
        "KES",
        "KGS",
        "KHR",
        "KMF",
        "KPW",
        "KRW",
        "KWD",
        "KYD",
        "KZT",
        "LAK",
        "LBP",
        "LKR",
        "LRD",
        "LSL",
        "LYD",
        "MAD",
        "MDL",
        "MGA",
        "MKD",
        "MMK",
        "MNT",
        "MOP",
        "MRU",
        "MUR",
        "MVR",
        "MWK",
        "MXN",
        "MXV",
        "MYR",
        "MZN",
        "NAD",
        "NGN",
        "NIO",
        "NOK",
        "NPR",
        "NZD",
        "OMR",
        "PAB",
        "PEN",
        "PGK",
        "PHP",
        "PKR",
        "PLN",
        "PYG",
        "QAR",
        "RON",
        "RSD",
        "RUB",
        "RWF",
        "SAR",
        "SBD",
        "SCR",
        "SDG",
        "SEK",
        "SGD",
        "SHP",
        "SLL",
        "SOS",
        "SRD",
        "SSP",
        "STN",
        "SVC",
        "SYP",
        "SZL",
        "THB",
        "TJS",
        "TMT",
        "TND",
        "TOP",
        "TRY",
        "TTD",
        "TWD",
        "TZS",
        "UAH",
        "UGX",
        "USD",
        "USN",
        "UYI",
        "UYU",
        "UYW",
        "UZS",
        "VES",
        "VND",
        "VUV",
        "WST",
        "XAF",
        "XAG",
        "XAU",
        "XBA",
        "XBB",
        "XBC",
        "XBD",
        "XCD",
        "XDR",
        "XOF",
        "XPD",
        "XPF",
        "XPT",
        "XSU",
        "XTS",
        "XUA",
        "XXX",
        "YER",
        "ZAR",
        "ZMW",
        "ZWL"
      ]
    },
    "components_enums_engagement_tracking_types": {
      "title": "Engagement Audience Tracking Type",
      "type": "string",
      "enum": [
        "IMPRESSIONS",
        "CLICKS",
        "UPVOTES",
        "COMMENT_SUBMISSIONS",
        "VIDEO_WATCHED_50_PERCENT",
        "VIDEO_WATCHED_100_PERCENT",
        "VIDEO_STARTED"
      ]
    },
    "components_schema_business_id": {
      "description": "The business ID.",
      "type": "string",
      "format": "uuid"
    },
    "components_schema_created_at": {
      "description": "When this entity was created ([ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html)).",
      "type": "string",
      "format": "date-time",
      "readOnly": true
    },
    "components_schema_customer_list_config": {
      "title": "Customer List Audience",
      "description": "Details for the [customer list audience](https://business.reddithelp.com/s/article/custom-audiences#customer-lists).",
      "type": [
        "object"
      ],
      "additionalProperties": false,
      "minProperties": 1,
      "required": [
        "origin_client_id"
      ],
      "properties": {
        "origin": {
          "description": "The audience's external source.",
          "type": [
            "string"
          ],
          "enum": [
            "UNSPECIFIED",
            "LIVE_RAMP",
            "MPARTICLE",
            "TEALIUM",
            "OTHER",
            "LIVE_RAMP_ADVERTISER_DIRECT",
            "BOMBORA"
          ]
        },
        "external_audience_id": {
          "description": "The ID of the audience in the external system.",
          "type": [
            "string"
          ]
        },
        "origin_client_id": {
          "description": "The client ID of the application that created this audience. Mostly applies to audiences created via API by third-party partners.",
          "type": [
            "string"
          ]
        }
      }
    },
    "components_schema_customer_list_custom_audience": {
      "title": "Customer List Custom Audience",
      "type": "object",
      "additionalProperties": false,
      "required": [
        "name",
        "type"
      ],
      "properties": {
        "name": {
          "$ref": "#/$defs/name-4"
        },
        "id": {
          "$ref": "#/$defs/id-5"
        },
        "status": {
          "$ref": "#/$defs/status"
        },
        "ad_account_id": {
          "$ref": "#/$defs/ad_account_id-3"
        },
        "business_id": {
          "$ref": "#/$defs/business_id-2"
        },
        "created_at": {
          "$ref": "#/$defs/components_schema_created_at"
        },
        "delivery_status": {
          "$ref": "#/$defs/components_schema_delivery_status"
        },
        "modified_at": {
          "$ref": "#/$defs/components_schema_modified_at"
        },
        "size_range_upper": {
          "$ref": "#/$defs/size_range_upper"
        },
        "size_range_lower": {
          "$ref": "#/$defs/size_range_lower"
        },
        "type": {
          "type": "string",
          "description": "The custom audience type, which must be `CUSTOMER_LIST`.",
          "const": "CUSTOMER_LIST"
        },
        "customer_list_config": {
          "$ref": "#/$defs/components_schema_customer_list_config"
        },
        "cost": {
          "$ref": "#/$defs/cost"
        }
      }
    },
    "components_schema_delivery_status": {
      "type": [
        "array",
        "null"
      ],
      "description": "The delivery statuses for this ad group.",
      "items": {
        "type": "string"
      },
      "readOnly": true
    },
    "components_schema_engagement_audience_config_create": {
      "description": "Configuration for an ENGAGEMENT_RETARGETING audience. Required when type is ENGAGEMENT_RETARGETING.",
      "type": [
        "object"
      ],
      "additionalProperties": false,
      "required": [
        "tracking_types",
        "lookback_window_days",
        "campaign_ids"
      ],
      "properties": {
        "tracking_types": {
          "description": "The engagement types used to generate the audience from the campaign list. Supports singleton values and arbitrary combinations of valid engagement types, including combinations beyond those exposed in the UI.",
          "type": [
            "array"
          ],
          "minItems": 1,
          "uniqueItems": true,
          "items": {
            "$ref": "#/$defs/components_enums_engagement_tracking_types"
          }
        },
        "lookback_window_days": {
          "description": "How far back (in days) to look for user actions to include in the audience.",
          "type": [
            "integer"
          ],
          "minimum": 1,
          "maximum": 180
        },
        "campaign_ids": {
          "description": "The IDs of the campaigns to include in this audience. Each campaign must exist, belong to the caller's ad account, and be eligible for engagement retargeting.",
          "type": [
            "array"
          ],
          "items": {
            "type": "string"
          },
          "minItems": 1,
          "maxItems": 500
        }
      }
    },
    "components_schema_engagement_retargeting_custom_audience_create": {
      "title": "Engagement Retargeting Custom Audience Create",
      "type": "object",
      "additionalProperties": false,
      "required": [
        "name",
        "type",
        "engagement_audience_config"
      ],
      "properties": {
        "type": {
          "type": "string",
          "description": "Type of the custom audience. For engagement retargeting audiences, this value is always ENGAGEMENT_RETARGETING.",
          "const": "ENGAGEMENT_RETARGETING"
        },
        "name": {
          "$ref": "#/$defs/name-4"
        },
        "engagement_audience_config": {
          "$ref": "#/$defs/components_schema_engagement_audience_config_create"
        }
      }
    },
    "components_schema_modified_at": {
      "title": "Modified At",
      "description": "When this entity was last changed ([ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html)).",
      "type": "string",
      "format": "date-time",
      "readOnly": true
    },
    "components_schema_pixel_audience_config_create": {
      "description": "Configuration for a website retargeting audience. In the API, website retargeting is represented by the `PIXEL_RETARGETING` type and the `pixel_audience_config` field.",
      "type": [
        "object"
      ],
      "additionalProperties": false,
      "required": [
        "targetings",
        "lookback_window_days",
        "pixel_ids"
      ],
      "properties": {
        "targetings": {
          "type": [
            "array"
          ],
          "description": "The [conversion events](https://business.reddithelp.com/s/article/supported-conversion-events) to target. Include `CUSTOM` when targeting custom conversion events listed in `custom_targetings`.",
          "items": {
            "$ref": "#/$defs/standard_tracking_type",
            "description": "The conversion event type to target. If set to `CUSTOM`, provide the custom conversion event names in `custom_targetings`."
          },
          "minItems": 1,
          "uniqueItems": true
        },
        "lookback_window_days": {
          "type": [
            "integer"
          ],
          "description": "Determine how long ago a user's action can be to be included in the audience.",
          "minimum": 1,
          "maximum": 90
        },
        "custom_targetings": {
          "type": [
            "array"
          ],
          "description": "Custom conversion event names to target. Required when `targetings` includes `CUSTOM`. When this field is non-empty, `targetings` must include `CUSTOM`.",
          "items": {
            "type": "string"
          },
          "maxItems": 50
        },
        "pixel_ids": {
          "type": [
            "array"
          ],
          "description": "The one Pixel ID to associate with this audience. The caller's ad account must have access to this Pixel. Find Pixel IDs in the [Events Manager](https://ads.reddit.com/events-manager), or retrieve Pixel IDs using the List Pixels By Ad Account or List Pixels By Business endpoints.",
          "items": {
            "type": "string"
          },
          "minItems": 1,
          "maxItems": 1
        }
      }
    },
    "components_schema_pixel_retargeting_custom_audience_create": {
      "title": "Pixel Retargeting Custom Audience Create",
      "type": "object",
      "additionalProperties": false,
      "required": [
        "name",
        "type",
        "pixel_audience_config"
      ],
      "properties": {
        "name": {
          "$ref": "#/$defs/name-4"
        },
        "type": {
          "type": "string",
          "description": "Type of the custom audience. For website retargeting audiences, this API uses the value `PIXEL_RETARGETING`.",
          "const": "PIXEL_RETARGETING"
        },
        "pixel_audience_config": {
          "$ref": "#/$defs/components_schema_pixel_audience_config_create"
        }
      }
    },
    "components_schema_third_party_data_cost": {
      "title": "Third-Party Data Cost",
      "description": "The cost information for audiences using third-party data providers.",
      "type": "object",
      "additionalProperties": false,
      "readOnly": true,
      "properties": {
        "partner": {
          "description": "The audience's data provider.",
          "type": "string",
          "enum": [
            "LIVE_RAMP",
            "BOMBORA"
          ]
        },
        "partner_segment_id": {
          "description": "The data provider's segment ID.",
          "type": "string"
        },
        "reddit_audience_id": {
          "description": "The Reddit audience ID. Populated for custom audiences, omitted for third-party audiences.",
          "type": "string"
        },
        "rate_type": {
          "description": "The data's pricing model.",
          "type": "string",
          "enum": [
            "CPM"
          ]
        },
        "price": {
          "description": "The data's cost (local microcurrency). For example, `2750000` is $2.75 for CPM pricing.",
          "type": "integer"
        },
        "currency": {
          "description": "The cost's currency ([ISO 4217](https://www.iso.org/iso-4217-currency-codes.html)).",
          "$ref": "#/$defs/components_enums_currency"
        },
        "currency_conversion_rate_to_usd": {
          "description": "The conversion rate from local currency to USD (micro units). Omitted if currency is already USD or unavailable.",
          "type": "integer"
        },
        "update_timestamp": {
          "description": "When the cost was last updated (Unix timestamp in milliseconds). Omitted for third-party audiences when unavailable.",
          "type": "integer"
        },
        "is_cost_exempted": {
          "description": "Whether this cost is exempted from being passed to the advertiser.",
          "type": "boolean"
        }
      }
    },
    "cost": {
      "description": "Cost information for the custom audience sourced from third-party data providers. Only populates for audiences with associated data costs.",
      "$ref": "#/$defs/components_schema_third_party_data_cost"
    },
    "id-5": {
      "type": [
        "string"
      ],
      "description": "The custom audience ID.",
      "readOnly": true
    },
    "name-4": {
      "$ref": "#/$defs/non_nullable",
      "description": "The custom audience name."
    },
    "non_nullable": {
      "description": "The entity name.",
      "type": "string",
      "minLength": 3,
      "maxLength": 500
    },
    "size_range_lower": {
      "type": [
        "integer"
      ],
      "description": "The lower bound of the estimated matched users for this audience.",
      "readOnly": true
    },
    "size_range_upper": {
      "type": [
        "integer"
      ],
      "description": "The upper bound of the estimated matched users for this audience.",
      "readOnly": true
    },
    "standard_tracking_type": {
      "type": "string",
      "description": "The [conversion event type](https://business.reddithelp.com/s/article/supported-conversion-events).",
      "x-enumDescriptions": {
        "CUSTOM": "A custom conversion event identified by its event name."
      },
      "enum": [
        "PAGE_VISIT",
        "VIEW_CONTENT",
        "SEARCH",
        "ADD_TO_CART",
        "ADD_TO_WISHLIST",
        "PURCHASE",
        "LEAD",
        "SIGN_UP",
        "CUSTOM"
      ]
    },
    "status": {
      "type": "string",
      "description": "The custom audience's processing status.",
      "x-enumDescriptions": {
        "VALID": "Used only when `size_range_upper` is at least 1,000 users.",
        "NOT_ENOUGH_MATCHES_ERROR": "Used when `size_range_upper` is less than 1,000 users."
      },
      "enum": [
        "VALID",
        "SUCCESSFUL",
        "PENDING",
        "EXPIRED",
        "USER_ERROR",
        "SERVER_ERROR",
        "DELETED",
        "NOT_ENOUGH_MATCHES_ERROR",
        "INVALID_DATA_SOURCE"
      ],
      "readOnly": true
    }
  }
}