WhatsApp
  1. Contact Management
  • Contact Management
    • Create a New Contact
      POST
    • List Contacts
      GET
    • Get Contact Details
      GET
    • Update Contact Information
      PUT
    • Delete Contact
      DELETE
  • Status Management
    • Create Status
      POST
    • List Statuses
      GET
    • Get Status Details
      GET
    • Update Status
      PUT
    • Delete Status
      DELETE
  • Source Management
    • Create Source
      POST
    • List Sources
      GET
    • Get Source Details
      GET
    • Update Source
      PUT
    • Delete Source
      DELETE
  • Group Management
    • List Groups
      GET
    • Create Group
      POST
    • Get Groups Details
      GET
    • Update Groups
      PUT
    • Delete Group
      DELETE
  • Template Management
    • List Templates
      GET
    • Get Templates Details
      GET
  • Template Bot Management
    • List TemplateBot
      GET
    • Get TemplateBot Details
      GET
  • Message Bot Management
    • List Messagebots
    • Get Messagebots Details
  • Send Messages
    • Send Simple Message
    • Send Template Message
    • Send Media Message to Contact
WhatsApp
  1. Contact Management

Create a New Contact

POST
/api/v1/{subdomain}/contacts
Add a new contact to your tenant database. You can specify the contact type (lead or customer),
assign them to groups, and include all relevant contact information.
Key Features:
Automatic validation of contact data
Type classification (lead vs customer)
Group assignment with auto-creation of new groups
Source and status tracking
International phone and country support
WhatsApp Auto Lead Settings Integration: Automatic fallback to configured defaults
WhatsApp Auto Lead Fallback:
When WhatsApp Auto Lead is enabled in your tenant settings, the system will automatically
provide default values for missing fields:
status_id: Uses the configured default lead status if not provided
source_id: Uses the configured default lead source if not provided
assignee: Uses the configured default assignee if not provided
This allows for simplified API calls where you only need to provide the essential contact
information, and the system handles lead management defaults automatically.
Available Reference Endpoints:
To find the exact IDs for sources, statuses, and groups, use these endpoints:
Sources: GET /api/v1/{subdomain}/sources - List all available sources with their IDs
Statuses: GET /api/v1/{subdomain}/statuses - List all available statuses with their IDs
Groups: GET /api/v1/{subdomain}/groups - List all available groups with their IDs
Individual items: Use GET /api/v1/{subdomain}/{resource}/{id} to get specific details
Business Rules:
Email must be unique within the tenant (if provided)
Phone numbers must be unique within the tenant
Groups will be auto-created if they don't exist
Contact creation counts towards your plan limits
Auto Lead fallback only applies when the feature is enabled in tenant settings

Request

Authorization
Path Params

Body Params application/jsonRequired

Examples

Responses

🟢201
application/json
contact created successfully
Body

🟠400
🟠401
🟠422
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://whatsapp.qtap.chat/api/v1//contacts' \
--header 'Content-Type: application/json' \
--data-raw '{
    "firstname": "John",
    "lastname": "Doe",
    "company": "Acme Inc",
    "type": "lead",
    "email": "john.doe@example.com",
    "phone": "+919876543210",
    "source_id": 2,
    "status_id": 1,
    "description": "Potential client interested in premium services, contacted via website form",
    "country_id": 101,
    "assigned_id": 15,
    "groups": "VIP Customers,Newsletter Subscribers,Product Updates"
}'
Response Response Example
201 - Example 1
{
    "status": "success",
    "message": "Contact created successfully",
    "data": {
        "id": 25,
        "tenant_id": 13,
        "firstname": "John",
        "lastname": "Doe",
        "company": "Corbital Technologies LLP",
        "type": "lead",
        "email": "john.doe@example.com",
        "phone": "+919925119284",
        "source_id": 2,
        "status_id": 1,
        "description": "Potential client interested in premium services, contacted via website form",
        "country_id": 101,
        "assigned_id": 15,
        "addedfrom": 15,
        "created_at": "2024-02-08T14:30:25.000000Z",
        "updated_at": "2024-02-08T14:30:25.000000Z",
        "group_id": [
            1,
            2,
            3
        ]
    }
}
Next
List Contacts
Built with