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

# Create a contact

> Create a contact for the active team



## OpenAPI

````yaml /swagger.yml post /public/contacts
openapi: 3.0.0
info:
  title: Public API Docs
  description: Clerk Public API
  version: '1.0'
  contact: {}
servers:
  - url: https://web-api.clerk.chat
    description: Production server
  - url: http://localhost:3000
    description: Production server
security: []
tags: []
paths:
  /public/contacts:
    post:
      tags:
        - Contacts
      summary: Create a contact
      description: Create a contact for the active team
      operationId: PublicContactsController_create
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateContactRequest'
      responses:
        '201':
          description: The created contact
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContactResponse'
        '400':
          description: Invalid request body
        '401':
          description: Unauthorized request
        '403':
          description: You do not have permission to access this resource
        '404':
          description: Resource not found
        '422':
          description: Invalid request parameters
        '429':
          description: Too many requests for this resource
        '500':
          description: Internal server error
      security:
        - api_key: []
components:
  schemas:
    CreateContactRequest:
      type: object
      properties:
        name:
          type: string
          description: The name of the contact
          example: John Doe
        email:
          type: string
          description: The email address of the contact
          example: johndoe@example.com
        phone:
          type: string
          description: The phone number of the contact
          example: '+1234567890'
        public:
          type: boolean
          description: Whether the contact is public
          example: false
        data:
          type: object
          description: Additional metadata for the contact
          example: {}
    ContactResponse:
      type: object
      required:
        - data
      properties:
        data:
          $ref: '#/components/schemas/ContactObject'
    ContactObject:
      type: object
      required:
        - id
        - teamId
        - createdByUserId
        - name
        - phone
        - email
        - externalId
        - optOut
        - avatarURL
        - public
        - data
        - attributes
        - created
        - updated
      properties:
        id:
          type: string
          description: The ID of the contact
          example: '1'
          readOnly: true
        teamId:
          type: string
          description: The ID of the team the contact belongs to
          example: '1'
          readOnly: true
        createdByUserId:
          type: string
          description: The ID of the user who created the contact
          example: '1'
          readOnly: true
        name:
          type: string
          description: The name of the contact
          example: John Doe
        phone:
          type: string
          description: The phone number of the contact
          example: '+1234567890'
        email:
          type: string
          description: The email address of the contact
          example: johndoe@example.com
        externalId:
          type: string
          description: The external ID of the contact
          example: '1234'
        optOut:
          type: boolean
          description: Whether the contact has opted out of messages
          example: false
        avatarURL:
          type: string
          description: The URL of the contact avatar
          example: https://example.com/avatar.jpg
        public:
          type: boolean
          description: Whether the contact is public
          example: false
        data:
          type: object
          description: Additional metadata for the contact
          example: {}
        attributes:
          type: array
          description: The contact attributes
          items:
            $ref: '#/components/schemas/ContactAttributeObject'
          example: []
        created:
          type: string
          format: date-time
          example: '2021-01-01T00:00:00.000Z'
          readOnly: true
        updated:
          type: string
          format: date-time
          example: '2021-01-01T00:00:00.000Z'
          readOnly: true
    ContactAttributeObject:
      type: object
      required:
        - id
        - attributeTypeId
        - createdAt
        - updatedAt
      properties:
        id:
          type: string
        attributeTypeId:
          type: string
        value:
          type: object
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
  securitySchemes:
    api_key:
      type: apiKey
      in: header
      name: apiKey

````