> ## Documentation Index
> Fetch the complete documentation index at: https://kapso-1adbad2d.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a WhatsApp contact

> Create a new WhatsApp contact for the project



## OpenAPI

````yaml api/legacy/openapi-whatsapp.yaml post /whatsapp_contacts
openapi: 3.0.3
info:
  title: Kapso External API - WhatsApp API
  description: >-
    API for programmatically interacting with Kapso agents, executions, and
    WhatsApp conversations. This specification includes only WhatsApp API
    endpoints.
  version: 1.0.0
  contact:
    name: Kapso Support
servers:
  - url: https://app.kapso.ai/api/v1
    description: Production server
security:
  - ApiKeyAuth: []
paths:
  /whatsapp_contacts:
    post:
      tags:
        - WhatsApp Contacts
      summary: Create a WhatsApp contact
      description: Create a new WhatsApp contact for the project
      operationId: createWhatsappContact
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - contact
              properties:
                contact:
                  type: object
                  required:
                    - wa_id
                  properties:
                    wa_id:
                      type: string
                      example: '1234567890'
                      description: The WhatsApp phone number
                    profile_name:
                      type: string
                      example: John Doe
                    customer_id:
                      type: string
                      format: uuid
                      example: customer-456def
                      description: Optional customer ID to associate with this contact
                    metadata:
                      type: object
                      example:
                        source: website
                        tags:
                          - lead
                          - priority
      responses:
        '201':
          description: Contact created successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/WhatsappContact'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: Validation error
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: string
                    example:
                      - Wa_id has already been taken
      security:
        - ApiKeyAuth: []
components:
  schemas:
    WhatsappContact:
      type: object
      properties:
        id:
          type: string
          format: uuid
          example: contact-789ghi
        wa_id:
          type: string
          example: '1234567890'
          description: The WhatsApp ID (normalized phone number)
        profile_name:
          type: string
          example: John Doe
          description: The contact's profile name from WhatsApp
        customer_id:
          type: string
          format: uuid
          nullable: true
          example: customer-456def
          description: ID of the associated customer, null for sandbox contacts
        metadata:
          type: object
          description: Additional metadata about the contact
          example:
            source: website
            tags:
              - lead
              - priority
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    Error:
      type: object
      properties:
        error:
          type: string
          example: Resource not found
        status:
          type: integer
          example: 404
        message:
          type: string
          example: The requested resource could not be found
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: API key required for all endpoints

````