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

# Associate

> Associates a specific TrueCall ID and dialed number combination to a customer's phone number. 

 This is to be called as soon as the customer call takes place.



## OpenAPI

````yaml internal-openapi GET /associate
openapi: 3.0.1
info:
  title: TrueCall Api Specs
  description: TrueCall internal API reference
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.truecall.com
security: []
paths:
  /associate:
    get:
      description: >-
        Associates a specific TrueCall ID and dialed number combination to a
        customer's phone number. 

         This is to be called as soon as the customer call takes place.
      parameters:
        - $ref: '#/components/parameters/ApiKeyQueryParam'
        - $ref: '#/components/parameters/TcIdQueryParam'
        - $ref: '#/components/parameters/DidQueryParam'
        - $ref: '#/components/parameters/ConsumerPhoneQueryParam'
      responses:
        '200':
          description: Associate response
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/AssociateSuccess'
                  - $ref: '#/components/schemas/AssociateError'
components:
  parameters:
    ApiKeyQueryParam:
      name: api_key
      in: query
      description: Campaign's API key
      required: true
      schema:
        type: string
    TcIdQueryParam:
      name: tc_id
      in: query
      description: TrueCall session ID
      required: true
      schema:
        type: string
    DidQueryParam:
      name: dialed_number
      in: query
      description: Number dialed by consumer
      required: true
      schema:
        type: string
    ConsumerPhoneQueryParam:
      name: consumer_phone
      in: query
      description: Consumer's phone number
      required: true
      schema:
        type: string
  schemas:
    AssociateSuccess:
      title: Success
      type: object
      properties:
        tc_req_id:
          $ref: '#/components/schemas/TcReqId'
        tc_status:
          $ref: '#/components/schemas/TcStatusSuccess'
    AssociateError:
      type: object
      properties:
        tc_req_id:
          $ref: '#/components/schemas/TcReqId'
        tc_status:
          $ref: '#/components/schemas/TcStatusError'
        tc_error_code:
          $ref: '#/components/schemas/AssociateTcErrorCode'
        tc_message:
          $ref: '#/components/schemas/TcMessage'
    TcReqId:
      type: string
      example: bnqtkot35h9bxgqi8ymva70x1easzqb7l7lt
    TcStatusSuccess:
      type: string
      enum:
        - success
      example: success
    TcStatusError:
      type: string
      enum:
        - error
      example: error
    AssociateTcErrorCode:
      type: number
      example: 100
      description: |-
        100 - Missing api_key 

         101 - Missing tc_id 

         102 - Missing consumer_phone 

         103 - Missing dialed_number 

         104 - Invalid consumer_phone 

         105 - Invalid dialed_number 

         106 - Invalid dialed_number 

         200 - Invalid api_key 

         201 - Invalid api_key 

         202 - Invalid api_key 

         203 - Invalid tc_id 

         204 - Invalid api_key 

         300 - Campaign source mismatch 

         400 - Already associated 

         500 - General failure 

         600 - User is suspended or pending config 

         700 - dialed_number not tracked 

         701 - dialed_number not matched
    TcMessage:
      type: string
      example: Missing api_key

````