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

# Create Affiliate Tracking Domain

Assign a tracking domain to an affiliate. You can apply the domain to all offers or specify individual offer IDs.

**Note:** If `is_apply_all_offers` is set to `true` but `network_offer_ids` contains offer IDs, the backend will override `is_apply_all_offers` to `false` and create one assignment per offer ID.


## OpenAPI

````yaml openapi/tracking-domains.yaml post /networks/affiliates/{affiliateId}/trackingdomains
openapi: 3.0.3
info:
  title: Everflow Network API - Tracking Domains
  description: >
    Endpoints for managing tracking domains and affiliate tracking domain
    assignments. Tracking domains are the custom domains used to construct
    tracking links and impression URLs for offers. Affiliate tracking domain
    assignments control which tracking domain a specific partner uses when
    generating links. For more detail, see [Tracking & Conversion Domain
    Management](https://helpdesk.everflow.io/customer/tracking-conversion-domain-management)
    in the Help Center.
  version: 1.0.0
servers:
  - url: https://api.eflow.team/v1
security: []
tags:
  - name: Tracking Domains
paths:
  /networks/affiliates/{affiliateId}/trackingdomains:
    post:
      tags:
        - Tracking Domains
      summary: Create Affiliate Tracking Domain
      parameters:
        - in: path
          name: affiliateId
          required: true
          schema:
            type: integer
          description: The unique affiliate ID.
      requestBody:
        required: true
        content:
          application/json:
            example:
              network_affiliate_id: 7
              network_tracking_domain_id: 1
              is_apply_all_offers: false
              network_offer_ids:
                - 1
                - 25
            schema:
              $ref: '#/components/schemas/AffiliateTrackingDomainInput'
      responses:
        '200':
          description: ''
          content:
            application/json:
              example:
                tracking_domains:
                  - network_affiliate_tracking_domain_id: 4
                    network_id: 1
                    network_affiliate_id: 7
                    network_tracking_domain_id: 1
                    is_apply_all_offers: false
                    network_offer_id: 1
                    relationship:
                      affiliate:
                        network_affiliate_id: 7
                        network_id: 1
                        name: Partner A
                        account_status: active
                        network_traffic_source_id: 0
                      tracking_domain:
                        network_tracking_domain_id: 1
                        network_id: 1
                        url: www.testtracking.com
                        is_primary_domain: true
                        domain_status: active
                        is_unassignable: false
                        ownership: internal
                        is_ssl_enabled: false
                        html_static_redirect: ''
                        url_redirect: ''
                        public_notes: ''
                        time_created: 1774296114
                        time_saved: 1774296114
                      offer:
                        network_offer_id: 1
                        network_id: 1
                        network_advertiser_id: 13
                        network_offer_group_id: 0
                        name: Auto Game
                        offer_status: active
                        network_tracking_domain_id: 1
                        visibility: public
                        currency_id: USD
                  - network_affiliate_tracking_domain_id: 5
                    network_id: 1
                    network_affiliate_id: 7
                    network_tracking_domain_id: 1
                    is_apply_all_offers: false
                    network_offer_id: 25
                    relationship:
                      affiliate:
                        network_affiliate_id: 7
                        network_id: 1
                        name: Partner A
                        account_status: active
                        network_traffic_source_id: 0
                      tracking_domain:
                        network_tracking_domain_id: 1
                        network_id: 1
                        url: www.testtracking.com
                        is_primary_domain: true
                        domain_status: active
                        is_unassignable: false
                        ownership: internal
                        is_ssl_enabled: false
                        html_static_redirect: ''
                        url_redirect: ''
                        public_notes: ''
                        time_created: 1774296114
                        time_saved: 1774296114
                      offer:
                        network_offer_id: 25
                        network_id: 1
                        network_advertiser_id: 13
                        network_offer_group_id: 0
                        name: Travel Daily
                        offer_status: active
                        network_tracking_domain_id: 1
                        visibility: private
                        currency_id: USD
              schema:
                type: object
                properties:
                  tracking_domains:
                    type: array
                    description: List of created affiliate tracking domain assignments.
                    items:
                      $ref: '#/components/schemas/AffiliateTrackingDomain'
      security:
        - API Key: []
components:
  schemas:
    AffiliateTrackingDomainInput:
      type: object
      required:
        - network_affiliate_id
        - network_tracking_domain_id
        - is_apply_all_offers
        - network_offer_ids
      properties:
        network_affiliate_id:
          type: integer
          description: The affiliate ID.
        network_tracking_domain_id:
          type: integer
          description: The tracking domain ID to assign.
        is_apply_all_offers:
          type: boolean
          description: Whether to apply this tracking domain to all offers.
        network_offer_ids:
          type: array
          items:
            type: integer
          description: List of offer IDs to apply this tracking domain to.
    AffiliateTrackingDomain:
      type: object
      properties:
        network_affiliate_tracking_domain_id:
          type: integer
          description: Unique affiliate tracking domain assignment ID.
        network_id:
          type: integer
          description: Network ID.
        network_affiliate_id:
          type: integer
          description: Affiliate ID.
        network_tracking_domain_id:
          type: integer
          description: Tracking domain ID.
        is_apply_all_offers:
          type: boolean
          description: Whether this tracking domain applies to all offers.
        network_offer_id:
          type: integer
          description: The specific offer ID this domain is applied to.
        relationship:
          type: object
          description: >
            Related data for this affiliate tracking domain assignment. Includes
            affiliate, tracking domain, and optionally offer details.
          properties:
            affiliate:
              type: object
              description: Related affiliate details.
              properties:
                network_affiliate_id:
                  type: integer
                  description: The affiliate ID.
                network_id:
                  type: integer
                  description: The network ID.
                name:
                  type: string
                  description: The affiliate name.
                account_status:
                  type: string
                  description: The affiliate account status.
                network_traffic_source_id:
                  type: integer
                  description: The traffic source ID associated with the affiliate.
            tracking_domain:
              type: object
              description: Related tracking domain details.
              properties:
                network_tracking_domain_id:
                  type: integer
                  description: The tracking domain ID.
                network_id:
                  type: integer
                  description: The network ID.
                url:
                  type: string
                  description: The tracking domain URL.
                is_primary_domain:
                  type: boolean
                  description: Whether this is the primary tracking domain.
                domain_status:
                  type: string
                  description: Domain status.
                is_unassignable:
                  type: boolean
                  description: Whether the domain cannot be assigned to offers.
                ownership:
                  type: string
                  description: Domain ownership information.
                is_ssl_enabled:
                  type: boolean
                  description: Whether SSL is enabled for this domain.
                html_static_redirect:
                  type: string
                  description: HTML static redirect content.
                url_redirect:
                  type: string
                  description: URL redirect value.
                public_notes:
                  type: string
                  description: Public-facing notes for this domain.
                time_created:
                  type: integer
                  example: 1734455015
                  description: Unix timestamp of creation.
                time_saved:
                  type: integer
                  example: 1734455015
                  description: Unix timestamp of last update.
            offer:
              type: object
              description: >-
                Related offer details. Present when `is_apply_all_offers` is
                false.
              properties:
                network_offer_id:
                  type: integer
                  description: The offer ID.
                network_id:
                  type: integer
                  description: The network ID.
                network_advertiser_id:
                  type: integer
                  description: The advertiser ID that owns the offer.
                network_offer_group_id:
                  type: integer
                  description: The offer group ID, 0 if not part of a group.
                name:
                  type: string
                  description: The offer name.
                offer_status:
                  type: string
                  description: The offer status.
                network_tracking_domain_id:
                  type: integer
                  description: The tracking domain ID assigned to the offer.
                visibility:
                  type: string
                  description: The offer visibility.
                  enum:
                    - public
                    - private
                    - require_approval
                currency_id:
                  type: string
                  description: The offer currency.
  securitySchemes:
    API Key:
      description: The Everflow API key generated from the Control Center > Security.
      in: header
      name: X-Eflow-Api-Key
      type: apiKey

````