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

# Create media billing entity (admin)

> Create a media billing entity. An org's FIRST entity always becomes PRIMARY (the mandatory backstop every media-transacting org must have) regardless of `isPrimary`. Admin-only.



## OpenAPI

````yaml /v2/buyer-api-v2.yaml post /billing/media-entities
openapi: 3.0.0
info:
  title: Scope3 Buyer API
  version: 2.0.0
  description: |-
    REST API for advertisers to manage advertisers, campaigns, and reporting.

    ## Authentication

    All endpoints require a Bearer token in the Authorization header:
    ```
    Authorization: Bearer your-api-key
    ```

    ## Base URL

    `https://api.interchange.io/api/v2/buyer`

    ## For AI Agents

    AI agents can use the MCP endpoint at `/mcp/v2/buyer` with three tools:
    - `initialize`: Start an MCP session
    - `api_call`: Make REST API calls
    - `ask_about_capability`: Learn about API features
servers:
  - url: https://api.interchange.io/api/v2/buyer
    description: Production server
security: []
tags:
  - name: Account
    description: Account management, service tokens, and preferences
  - name: Advertisers
    description: Manage advertisers
  - name: Product Discovery
    description: Discover and select products
  - name: Campaigns
    description: Manage advertising campaigns
  - name: Creatives
    description: Build, manage, and sync campaign creatives via AdCP Creative Protocol
  - name: Reporting
    description: Access performance metrics
  - name: Event Sources
    description: >-
      Manage event source configurations and log conversion/marketing events for
      attribution
  - name: Property Lists
    description: Validate property lists against AAO registry
  - name: Sales Agents
    description: View and connect sales agents
  - name: Measurement
    description: Measurement sources, records, context, and freshness
  - name: Syndication
    description: Syndicate resources to ADCP agents
  - name: Tasks
    description: Track async operation status
  - name: Planning Briefs
    description: >-
      Share prospective briefs with publishers and collect their
      fit/quote/clarify/decline/book responses (gated by the
      demand-supply-signals flag).
  - name: Buyer Billing
    description: >-
      Consolidated invoicing for buyers — invoices and pending invoice items
      issued by Scope3 across the buyer customer.
  - name: MCP
    description: Model Context Protocol endpoints for AI agents
paths:
  /billing/media-entities:
    servers:
      - url: https://api.interchange.io/api/v2
        description: Production server
    post:
      tags:
        - Media Billing
      summary: Create media billing entity (admin)
      description: >-
        Create a media billing entity. An org's FIRST entity always becomes
        PRIMARY (the mandatory backstop every media-transacting org must have)
        regardless of `isPrimary`. Admin-only.
      operationId: createMediaBillingEntity
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateMediaBillingEntityBody'
      responses:
        '200':
          description: Create media billing entity (admin)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateMediaBillingEntityResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: ACCESS_DENIED (not an account admin).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          description: CONFLICT (an entity with this name and currency already exists).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - bearerAuth: []
components:
  schemas:
    CreateMediaBillingEntityBody:
      description: >-
        Create a media billing entity — a legal entity Scope3 invoices for media
        spend.
      type: object
      properties:
        entityName:
          description: >-
            Legal name of the media billing entity (e.g. "WPP South Africa (Pty)
            Ltd").
          type: string
          minLength: 1
          maxLength: 255
        countryCode:
          description: >-
            Country of the billing entity, as an ISO 3166-1 alpha-2 code.
            Metadata only — drives tax treatment and bank/address formatting,
            never invoice routing (money-streams.md §6.4).
          example: US
          type: string
          pattern: ^[A-Z]{2}$
        currency:
          description: ISO 4217 currency code
          example: USD
          type: string
          pattern: ^[A-Z]{3}$
        billingEmails:
          description: >-
            Invoicing contact email(s) for this entity. At least one is
            required.
          minItems: 1
          maxItems: 20
          type: array
          items:
            type: string
            format: email
            pattern: >-
              ^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$
        addressLine1:
          description: Entity street address, line 1.
          type: string
          minLength: 1
          maxLength: 255
        addressLine2:
          description: Entity street address, line 2 (optional).
          type: string
          maxLength: 255
        city:
          description: Entity city.
          type: string
          minLength: 1
          maxLength: 128
        state:
          description: Entity state/province/region (optional).
          type: string
          maxLength: 128
        postalCode:
          description: Entity postal/ZIP code.
          type: string
          minLength: 1
          maxLength: 32
        taxId:
          description: >-
            Tax identifier for this entity (e.g. VAT number, EIN), when
            applicable.
          type: string
          maxLength: 64
        isPrimary:
          description: >-
            Set true to make this the org's PRIMARY media billing entity (the
            mandatory backstop every media-transacting org must have), demoting
            any other primary entity. Omit to leave the current
            primary/non-primary status unchanged. An org's FIRST entity always
            becomes primary regardless of this field.
          type: boolean
      required:
        - entityName
        - countryCode
        - currency
        - billingEmails
        - addressLine1
        - city
        - postalCode
    CreateMediaBillingEntityResponse:
      type: object
      properties:
        entity:
          $ref: '#/components/schemas/MediaBillingEntity'
      required:
        - entity
      additionalProperties: false
    ErrorResponse:
      description: Standard error response
      type: object
      properties:
        data:
          type: string
          nullable: true
          enum:
            - null
        error:
          $ref: '#/components/schemas/ApiError'
      required:
        - data
        - error
      additionalProperties: false
    MediaBillingEntity:
      description: A media billing entity — a legal entity Scope3 invoices for media spend.
      type: object
      properties:
        id:
          description: Media billing entity ID
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        entityName:
          description: >-
            Legal name of the media billing entity (e.g. "WPP South Africa (Pty)
            Ltd").
          type: string
          minLength: 1
          maxLength: 255
        countryCode:
          description: >-
            Country of the billing entity, as an ISO 3166-1 alpha-2 code.
            Metadata only — drives tax treatment and bank/address formatting,
            never invoice routing (money-streams.md §6.4).
          example: US
          type: string
          pattern: ^[A-Z]{2}$
        currency:
          description: ISO 4217 currency code
          example: USD
          type: string
          pattern: ^[A-Z]{3}$
        billingEmails:
          description: >-
            Invoicing contact email(s) for this entity. At least one is
            required.
          minItems: 1
          maxItems: 20
          type: array
          items:
            type: string
            format: email
            pattern: >-
              ^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$
        addressLine1:
          description: Entity street address, line 1.
          type: string
          minLength: 1
          maxLength: 255
        addressLine2:
          nullable: true
          description: Entity street address, line 2 (optional).
          type: string
          maxLength: 255
        city:
          description: Entity city.
          type: string
          minLength: 1
          maxLength: 128
        state:
          nullable: true
          description: Entity state/province/region (optional).
          type: string
          maxLength: 128
        postalCode:
          description: Entity postal/ZIP code.
          type: string
          minLength: 1
          maxLength: 32
        taxId:
          nullable: true
          description: >-
            Tax identifier for this entity (e.g. VAT number, EIN), when
            applicable.
          type: string
          maxLength: 64
        isPrimary:
          description: >-
            Whether this is the org's PRIMARY media billing entity — the
            mandatory backstop used when no advertiser or account attachment
            matches. At most one entity per org is primary.
          type: boolean
        createdAt:
          description: Creation timestamp (ISO 8601)
          type: string
          format: date-time
          pattern: >-
            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
        updatedAt:
          description: Last update timestamp (ISO 8601)
          type: string
          format: date-time
          pattern: >-
            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
      required:
        - id
        - entityName
        - countryCode
        - currency
        - billingEmails
        - addressLine1
        - city
        - postalCode
        - isPrimary
        - createdAt
        - updatedAt
      additionalProperties: false
    ApiError:
      description: Structured error object
      type: object
      properties:
        code:
          description: Machine-readable error code
          type: string
        message:
          description: Human-readable error message
          type: string
        field:
          description: Field path associated with the error
          type: string
        details:
          description: Additional error context
          type: object
          additionalProperties: {}
      required:
        - code
        - message
      additionalProperties: false
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API key or access token

````