openapi: 3.1.0
info:
  title: Brand Phone Numbers API
  version: v11
  description: "List and retrieve phone numbers available to your brand account for call tracking. \nThis is primarily used to identify available numbers for assignment to partners.\n"
servers:
- url: https://api.impact.com
security:
- basicAuth: []
paths:
  /Advertisers/{AccountSID}/PhoneNumbers:
    get:
      operationId: listPhoneNumbers
      tags:
      - Phone Numbers
      summary: List all PhoneNumbers
      description: Returns an array of phone number objects available to the brand account.
      parameters:
      - name: AccountSID
        in: path
        required: true
        description: The unique identifier for the account.
        schema:
          type: string
      - name: Id
        in: query
        required: false
        description: Filter by specific ID values (comma-separated).
        schema:
          type: string
      - name: LastDateAssigned
        in: query
        required: false
        description: Filter by the date the number was last assigned (ISO 8601).
        schema:
          type: string
          format: date-time
      - name: LastDateReleased
        in: query
        required: false
        description: Filter by the date the number was last released (ISO 8601).
        schema:
          type: string
          format: date-time
      - name: Number
        in: query
        required: false
        description: Filter by the actual phone number values (comma-separated).
        schema:
          type: string
      responses:
        '200':
          description: A list of phone number objects.
          content:
            application/json:
              schema:
                type: object
                properties:
                  PhoneNumbers:
                    type: array
                    description: The list of phone number objects.
                    items:
                      $ref: '#/components/schemas/PhoneNumber'
  /Advertisers/{AccountSID}/PhoneNumbers/{PhoneNumberId}:
    get:
      operationId: getPhoneNumber
      tags:
      - Phone Numbers
      summary: Retrieve a PhoneNumber
      description: Retrieves the details of a specific phone number using its unique identifier.
      parameters:
      - name: AccountSID
        in: path
        required: true
        description: The unique identifier for the account.
        schema:
          type: string
      - name: PhoneNumberId
        in: path
        required: true
        description: The unique identifier for the phone number.
        schema:
          type: integer
      responses:
        '200':
          description: A single phone number object.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PhoneNumber'
components:
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
  schemas:
    PhoneNumber:
      type: object
      properties:
        Id:
          type: integer
          description: Unique identifier for the phone number (Phone Number ID).
          example: 12345
        Country:
          type: string
          description: Two-letter ISO 3166 country code.
          example: US
        Number:
          type: string
          description: The full phone number.
          example: '8051234567'
        InternationalNumber:
          type: string
          description: The phone number with international prefix.
          example: +1 805 123 4567
        DateCreated:
          type: string
          format: date-time
          nullable: true
          description: The date and time the phone number was created.
          example: '2026-01-15T10:00:00-08:00'
        LastDateAssigned:
          type: string
          format: date-time
          nullable: true
          description: The date and time the phone number was last assigned to a partner.
          example: '2026-02-01T10:00:00-08:00'
        LastDateReleased:
          type: string
          format: date-time
          nullable: true
          description: The date and time the phone number was last released from a partner.
          example: '2026-03-15T10:00:00-08:00'
        Uri:
          type: string
          format: uri-reference
          description: The URI path to this phone number object.
          example: /Advertisers/<AccountSID>/PhoneNumbers/12345
