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

# Get Contact by Phone

> Retrieve a contact by phone number. At most one contact exists per phone number in an organization.



## OpenAPI

````yaml openapi-final get /get-contact-by-phone/{phone_number}
openapi: 3.0.3
info:
  title: Retell SDK
  version: 3.0.0
  x-retell-spec-revision: 2026-11-12-056ac2f
  contact:
    name: Retell Support
    url: https://www.retellai.com/
    email: support@retellai.com
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
servers:
  - url: https://api.retellai.com
    description: The production server.
security:
  - api_key: []
paths:
  /get-contact-by-phone/{phone_number}:
    get:
      description: >-
        Retrieve a contact by phone number. At most one contact exists per phone
        number in an organization.
      operationId: getContactByPhone
      parameters:
        - in: path
          name: phone_number
          required: true
          description: >-
            Phone number of the contact, E.164 preferred. An exact stored match
            is returned first, including contacts with custom SIP caller IDs. If
            no exact match exists, other formats are normalized for a fallback
            lookup.
          schema:
            type: string
      responses:
        '200':
          description: Contact found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Contact'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalServerError'
      x-codeSamples:
        - lang: JavaScript
          source: >-
            import Retell from 'retell-sdk';


            const client = new Retell({
              apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted
            });


            const contactResponse = await
            client.contact.getByPhone('phone_number');


            console.log(contactResponse.contact_id);
        - lang: Python
          source: |-
            import os
            from retell import Retell

            client = Retell(
                api_key=os.environ.get("RETELL_API_KEY"),  # This is the default and can be omitted
            )
            contact_response = client.contact.get_by_phone(
                "phone_number",
            )
            print(contact_response.contact_id)
components:
  schemas:
    Contact:
      type: object
      properties:
        contact_id:
          type: string
          description: Unique identifier for the contact.
        org_id:
          type: string
          description: Organization this contact belongs to.
        phone_number:
          type: string
          description: Phone number of the contact.
        first_name:
          type: string
          description: First name of the contact.
        last_name:
          type: string
          description: Last name of the contact.
        do_not_call:
          type: boolean
          description: Whether this contact should not be called.
        contact_memory:
          type: string
          maxLength: 2000
          description: >-
            Running brief shared across this contact's phone calls and SMS
            chats. Omitted when unset.
        external_id:
          type: string
          description: CRM record ID from the external provider.
        contact_tags:
          type: array
          maxItems: 50
          uniqueItems: true
          items:
            $ref: '#/components/schemas/ContactTag'
          description: >-
            Assigned tag IDs and labels from the organization's CRM config. IDs
            absent from the config are omitted.
        custom_fields:
          type: object
          description: Custom fields defined in CRM config.
        conversation_count:
          type: number
          description: >-
            Number of conversations (calls and chats) associated with this
            contact.
        last_conversation_timestamp:
          type: number
          description: >-
            Epoch milliseconds of the most recent conversation with this
            contact.
        created_timestamp:
          type: number
          description: Epoch milliseconds when the contact was created.
        user_modified_timestamp:
          type: number
          description: Epoch milliseconds when the contact was last modified.
      required:
        - contact_id
        - org_id
        - phone_number
        - created_timestamp
    ContactTag:
      type: object
      required:
        - id
        - label
      properties:
        id:
          type: string
          minLength: 32
          maxLength: 32
          description: Unique identifier for the tag.
        label:
          type: string
          description: Human-readable label for the tag.
          minLength: 1
          maxLength: 40
          pattern: \S
  responses:
    BadRequest:
      description: Bad Request
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                type: string
                enum:
                  - error
              message:
                type: string
                example: Invalid request format, please check API reference.
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                type: string
                enum:
                  - error
              message:
                type: string
                example: API key is missing or invalid.
    NotFound:
      description: Not Found
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                type: string
                enum:
                  - error
              message:
                type: string
                example: The requested resource was not found.
    TooManyRequests:
      description: Too Many Requests
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                type: string
                enum:
                  - error
              message:
                type: string
                example: Account rate limited, please throttle your requests.
    InternalServerError:
      description: Internal Server Error
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                type: string
                enum:
                  - error
              message:
                type: string
                example: An unexpected server error occurred.
  securitySchemes:
    api_key:
      type: http
      scheme: bearer
      bearerFormat: string
      description: >-
        Authentication header containing API key (find it in dashboard). The
        format is "Bearer YOUR_API_KEY"

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.