openapi: 3.1.0
info:
  title: Brand Call Data API
  version: v11
  description: "Log call data from call tracking providers such as Invoca, DialogTech,\
    \ Retreaver, and TalkDesk. \nThis API allows brands to track partner pay-per-call\
    \ performance and attribute calls to the appropriate partner.\n"
servers:
- url: https://twilio.ivr.impactradius.com
paths:
  /calldata/logCallData:
    get:
      operationId: logCallDataGet
      tags:
      - Call Data
      summary: Log Call Data via GET
      description: Submit call data from a call tracking provider to impact.com using
        query parameters.
      parameters:
      - $ref: '#/components/parameters/CampaignId'
      - $ref: '#/components/parameters/MediaId'
      - $ref: '#/components/parameters/EventDate'
      - $ref: '#/components/parameters/ActionTrackerId'
      - $ref: '#/components/parameters/CallProvider'
      - $ref: '#/components/parameters/CallSessionId'
      - $ref: '#/components/parameters/CallerId'
      - $ref: '#/components/parameters/CalledPhoneNumber'
      - $ref: '#/components/parameters/CallDuration'
      - $ref: '#/components/parameters/TalkDuration'
      - name: AdId
        in: query
        required: false
        description: The unique ID of the ad associated with the call.
        schema:
          type: integer
      - name: CallStatus
        in: query
        required: false
        description: The final outcome of the call. Defaults to ANSWER if not provided.
        schema:
          type: string
          default: ANSWER
          enum:
          - UNKNOWN_CALLERID
          - CONGESTION
          - INCOMPLETE
          - CANCEL
          - IVR_DROPOFF
          - NO_TRANSFER_ATTEMPT
          - ANSWER
          - FAILURE
      - name: CallerPhoneNumberCountry
        in: query
        required: false
        description: Country code derived from the incoming phone call. Defaults to US.
        schema:
          type: string
      - name: CalledPhoneNumberCountry
        in: query
        required: false
        description: Country code derived from the receiver of the incoming phone call. Defaults to US.
        schema:
          type: string
      - name: SubId1
        in: query
        required: false
        description: First partner-specific value for data points to be reported back.
        schema:
          type: string
          maxLength: 64
      - name: SubId2
        in: query
        required: false
        description: Second partner-specific value for data points to be reported back.
        schema:
          type: string
          maxLength: 64
      - name: SubId3
        in: query
        required: false
        description: Third partner-specific value for data points to be reported back.
        schema:
          type: string
          maxLength: 64
      - name: ClickId
        in: query
        required: false
        description: The ClickId from the landing page URL.
        schema:
          type: string
      - name: City
        in: query
        required: false
        description: City of the CallerId, as identified by the Call Tracking vendor.
        schema:
          type: string
      - name: Region
        in: query
        required: false
        description: Region of the CallerId, as identified by the Call Tracking vendor.
        schema:
          type: string
      - name: Zip
        in: query
        required: false
        description: Zip code of the CallerId, as identified by the Call Tracking vendor.
        schema:
          type: integer
      - name: RepeatCaller
        in: query
        required: false
        description: Indicates whether the caller was recorded as a repeat caller by the Call Tracking vendor.
        schema:
          type: string
      - name: PhoneType
        in: query
        required: false
        description: Landline or Mobile, or empty string if the type is unknown.
        schema:
          type: string
      - name: CallRecording
        in: query
        required: false
        description: Unique URL of the call recording.
        schema:
          type: string
          format: uri
      - name: IvrDuration
        in: query
        required: false
        description: Duration in seconds that the call spent in the IVR tree.
        schema:
          type: integer
      - name: Keypresses
        in: query
        required: false
        description: List of unique keynames pressed.
        schema:
          type: string
      - name: Key1
        in: query
        required: false
        description: Name of the first key that was pressed.
        schema:
          type: string
      - name: Key2
        in: query
        required: false
        description: Name of the second key that was pressed.
        schema:
          type: string
      - name: Key3
        in: query
        required: false
        description: Name of the third key that was pressed.
        schema:
          type: string
      - name: Key4
        in: query
        required: false
        description: Name of the fourth key that was pressed.
        schema:
          type: string
      - name: TrafficSource
        in: query
        required: false
        description: Source of the transaction (referring media source).
        schema:
          type: string
      - name: OptInSms
        in: query
        required: false
        description: Whether the caller opted in to receive an SMS promotion.
        schema:
          type: string
      - name: UserAgent
        in: query
        required: false
        description: The user agent of the conversion generator.
        schema:
          type: string
      - name: DispositionName
        in: query
        required: false
        description: The Conversion Event Name.
        schema:
          type: string
      - name: SaleAmount
        in: query
        required: false
        description: If there was a sale conversion, the sale amount.
        schema:
          type: number
      - name: ReferenceId
        in: query
        required: false
        description: Customer Disposition Code for reference.
        schema:
          type: number
      - name: CustomConversionEvent1Name
        in: query
        required: false
        description: Custom name for reporting on Conversion events.
        schema:
          type: string
      - name: CustomConversionEvent1Value
        in: query
        required: false
        description: Custom value for reporting on Conversion events.
        schema:
          type: string
      - name: VendorEventId
        in: query
        required: false
        description: A unique ID sent from the vendor for the Call and Conversion Event.
        schema:
          type: string
      - name: PromoNumberDescription
        in: query
        required: false
        description: Describes the Called Phone Number.
        schema:
          type: string
      - name: CustomCallEvent1Name
        in: query
        required: false
        description: Custom name for reporting on Call events.
        schema:
          type: string
      - name: CustomCallEvent1Value
        in: query
        required: false
        description: Custom value for reporting on Call events.
        schema:
          type: string
      responses:
        '200':
          description: Successful request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StatusResponse'
    post:
      operationId: logCallDataPost
      tags:
      - Call Data
      summary: Log Call Data via POST
      description: Submit call data from a call tracking provider using form-encoded
        parameters.
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
              - CampaignId
              - MediaId
              - EventDate
              - ActionTrackerId
              - CallProvider
              - CallSessionId
              - CallerId
              - CalledPhoneNumber
              - CallDuration
              - TalkDuration
              properties:
                CampaignId:
                  type: integer
                  example: 1000
                MediaId:
                  type: integer
                  example: 10000
                EventDate:
                  type: string
                  format: date-time
                  example: '2026-09-10T22:55:32-08:00'
                ActionTrackerId:
                  type: integer
                  example: 4000
                CallProvider:
                  type: string
                  maxLength: 64
                CallSessionId:
                  type: string
                CallerId:
                  type: string
                  maxLength: 64
                CalledPhoneNumber:
                  type: string
                CallDuration:
                  type: integer
                  example: 180
                TalkDuration:
                  type: integer
                  example: 120
                AdId:
                  type: integer
                  example: 656565
                CallStatus:
                  type: string
                  default: ANSWER
                  enum:
                  - UNKNOWN_CALLERID
                  - CONGESTION
                  - INCOMPLETE
                  - CANCEL
                  - IVR_DROPOFF
                  - NO_TRANSFER_ATTEMPT
                  - ANSWER
                  - FAILURE
                  example: ANSWER
                CallerPhoneNumberCountry:
                  type: string
                  example: US
                CalledPhoneNumberCountry:
                  type: string
                  example: US
                SubId1:
                  type: string
                SubId2:
                  type: string
                SubId3:
                  type: string
                ClickId:
                  type: string
                  example: QiiWXOVnrQ3SQHl24jQjyxBGUkmzfJ3i1VHrWM0
                City:
                  type: string
                  example: Santa Barbara
                Region:
                  type: string
                  example: CA
                Zip:
                  type: integer
                  example: 93101
                RepeatCaller:
                  type: string
                PhoneType:
                  type: string
                CallRecording:
                  type: string
                  format: uri
                IvrDuration:
                  type: integer
                  example: 30
                Keypresses:
                  type: string
                Key1:
                  type: string
                Key2:
                  type: string
                Key3:
                  type: string
                Key4:
                  type: string
                TrafficSource:
                  type: string
                OptInSms:
                  type: string
                UserAgent:
                  type: string
                DispositionName:
                  type: string
                SaleAmount:
                  type: number
                ReferenceId:
                  type: number
                CustomConversionEvent1Name:
                  type: string
                CustomConversionEvent1Value:
                  type: string
                VendorEventId:
                  type: string
                PromoNumberDescription:
                  type: string
                CustomCallEvent1Name:
                  type: string
                CustomCallEvent1Value:
                  type: string
      responses:
        '200':
          description: Successful request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StatusResponse'
components:
  parameters:
    CampaignId:
      name: CampaignId
      in: query
      required: true
      description: A unique identifier for your program (formerly known as campaign).
      schema:
        type: integer
    MediaId:
      name: MediaId
      in: query
      required: true
      description: The ID of the Partner or Media Source in impact.com.
      schema:
        type: integer
    EventDate:
      name: EventDate
      in: query
      required: true
      description: The ISO 8601 time when the call event took place.
      schema:
        type: string
        format: date-time
    ActionTrackerId:
      name: ActionTrackerId
      in: query
      required: true
      description: A unique identifier for the Event Type (Phone_Action_Tracker_ID).
      schema:
        type: integer
    CallProvider:
      name: CallProvider
      in: query
      required: true
      description: The vendor or client sending the call event data.
      schema:
        type: string
        maxLength: 64
    CallSessionId:
      name: CallSessionId
      in: query
      required: true
      description: The unique session ID from the vendor to identify the call.
      schema:
        type: string
    CallerId:
      name: CallerId
      in: query
      required: true
      description: The phone number of the originating call.
      schema:
        type: string
        maxLength: 64
    CalledPhoneNumber:
      name: CalledPhoneNumber
      in: query
      required: true
      description: The destination phone number that received the call.
      schema:
        type: string
    CallDuration:
      name: CallDuration
      in: query
      required: true
      description: Total duration (in seconds) of the call.
      schema:
        type: integer
    TalkDuration:
      name: TalkDuration
      in: query
      required: true
      description: Actual talk duration (in seconds) of the call.
      schema:
        type: integer
  schemas:
    StatusResponse:
      type: object
      properties:
        Status:
          type: string
          example: OK
