Overview

Use the Contacts API for CRM records stored in Wazapin.
  • contacts is the canonical customer resource.
  • Use POST /v1/contacts/resolve to resolve an existing stored contact by one or more identifiers.
  • Use POST /v1/channels/{channelID}/contacts/lookup only when you need provider-specific profile lookup from a channel.

Common headers

X-Api-Key
string
required
Primary auth header for public API requests.
Content-Type
string
required
Use application/json.

Canonical contact endpoints

EndpointPurpose
POST /v1/contactsCreate or upsert a contact record
GET /v1/contactsList stored contacts
GET /v1/contacts/{contactID}Get one contact by internal contact ID
PATCH /v1/contacts/{contactID}Update a stored contact
DELETE /v1/contacts/{contactID}Delete a stored contact
GET /v1/contacts/phone/{phone}Get one contact by phone number
POST /v1/contacts/resolveResolve a stored contact by omnichannel identifiers
POST /v1/contacts/lookupCompatibility alias for resolve
GET /v1/contacts/{contactID}/identitiesList identities linked to a contact
GET /v1/contacts/{contactID}/notesList notes
POST /v1/contacts/{contactID}/notesCreate note
GET /v1/contacts/{contactID}/tagsList assigned tags
POST /v1/contacts/{contactID}/tagsAssign tag
PUT /v1/contacts/{contactID}/consent/{channel}Upsert consent state
GET /v1/contacts/{contactID}/consentsList consent rows
GET /v1/contacts/{contactID}/suppressionsList suppressions
POST /v1/contacts/{contactID}/suppressionsCreate or update suppression

Create a contact

POST /v1/contacts
curl -X POST "https://api.wazapin.id/v1/contacts" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "phone_number": "+6281234567890",
    "name": "Ujang",
    "email": "ujang@example.com",
    "external_source": "shopify",
    "external_id": "cust_123",
    "custom_fields": {
      "tier": "premium"
    }
  }'
{
  "data": {
    "id": "cnt_123",
    "phone_number": "+6281234567890",
    "name": "Ujang",
    "email": "ujang@example.com",
    "external_source": "shopify",
    "external_id": "cust_123"
  }
}

Resolve a contact

POST /v1/contacts/resolve Use this endpoint when your system knows one or more identifiers, but does not yet know Wazapin’s internal contactID. Supported identifier types:
  • contact_id
  • phone
  • whatsapp
  • wa_id
  • email
  • external_id
When type is external_id, include source.

Resolve by phone

cURL
curl -X POST "https://api.wazapin.id/v1/contacts/resolve" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "identifiers": [
      {
        "type": "phone",
        "value": "+6281234567890"
      }
    ]
  }'

Resolve by external identity

cURL
curl -X POST "https://api.wazapin.id/v1/contacts/resolve" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "identifiers": [
      {
        "type": "external_id",
        "source": "shopify",
        "value": "cust_123"
      }
    ]
  }'

Resolve response

200 OK
{
  "data": {
    "id": "cnt_123",
    "phone_number": "+6281234567890",
    "name": "Ujang",
    "email": "ujang@example.com"
  }
}
404 Not Found
{
  "error": "contact not found",
  "code": "not_found"
}
409 Conflict
{
  "error": "contact identifiers resolve to different contacts",
  "code": "conflict"
}

Update a contact

PATCH /v1/contacts/{contactID}
cURL
curl -X PATCH "https://api.wazapin.id/v1/contacts/cnt_123" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Ujang Updated",
    "email": "ujang-updated@example.com"
  }'

Provider lookup versus CRM resolve

Use the correct endpoint for the correct job:
  • POST /v1/contacts/resolve
    • resolves a stored CRM contact inside Wazapin
  • POST /v1/channels/{channelID}/contacts/lookup
    • looks up provider-specific profile data from a connected channel
If you are building CRM, automation, segmentation, or customer-data workflows, use resolve.