> ## 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.

# Create Contact

> Create a new contact.



## OpenAPI

````yaml openapi-final post /create-contact
openapi: 3.0.3
info:
  title: Retell SDK
  version: 3.0.0
  x-retell-spec-revision: 2026-08-22-7679759
  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:
  /create-contact:
    post:
      description: Create a new contact.
      operationId: createContact
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - phone_number
              properties:
                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
                custom_fields:
                  type: object
                  description: >
                    Values must match the types defined in CRM config custom
                    fields. Set a value to null to clear it.
      responses:
        '201':
          description: Contact created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Contact'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '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.create({ phone_number:
            '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.create(
                phone_number="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.
        external_id:
          type: string
          description: CRM record ID from the external provider.
        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
  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.
    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"

````