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

# Create Contact

> Creates a new contact with the provided information. Special validation is applied for WhatsApp contacts.



## OpenAPI

````yaml POST /public-api/contacts
openapi: 3.0.0
info:
  title: Agents Public API
  version: '1.0'
  description: REST API for managing contacts, campaigns, and conversations
  termsOfService: https://agents.nineteen58.co.za/terms
  contact:
    name: API Support
    url: https://agents.nineteen58.co.za/support
    email: support@nineteen58.co.za
servers:
  - url: https://agents.nineteen58.co.za
    description: Production server
security:
  - apiKeyAuth: []
tags: []
paths:
  /public-api/contacts:
    post:
      tags:
        - Contacts
      summary: Create a new contact
      description: >-
        Creates a new contact with the provided information. Special validation
        is applied for WhatsApp contacts.
      operationId: postpublicapicontacts
      parameters:
        - in: header
          name: x-api-key
          schema:
            type: string
          required: true
          description: API key for authentication
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - identifier
                - name
                - channel
              properties:
                identifier:
                  type: string
                  description: >-
                    Unique identifier for the contact (phone number for
                    WhatsApp, email for email channel)
                  example: '1234567890'
                name:
                  type: string
                  description: Contact's full name
                  example: John Doe
                channel:
                  type: string
                  enum:
                    - whatsapp
                    - email
                  description: Communication channel
                  example: whatsapp
                email:
                  type: string
                  format: email
                  description: Contact's email address
                  example: john.doe@example.com
                personal_context:
                  type: string
                  description: Personal context or background information about the contact
                  example: Met at Tech Conference 2024
                notes:
                  type: string
                  description: Additional notes or comments about the contact
                  example: Interested in AI solutions
                relevant_information:
                  type: string
                  description: Any other relevant information about the contact
                  example: Prefers communication in the morning
      responses:
        '201':
          description: Contact created successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Contact created successfully
                  contact_id:
                    type: string
                    format: uuid
                    example: 123e4567-e89b-12d3-a456-426614174000
        '400':
          description: Bad request - Invalid input parameters
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
        '401':
          description: Unauthorized - Invalid or missing authentication token
        '500':
          description: Internal server error
      security:
        - apiKeyAuth: []
components:
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````