Skip to main content

Contacts API

Manage WhatsApp contacts associated with your instance.

All requests are POST with Content-Type: application/json and must include the X-API-KEY header. Responses follow {message: string, success: boolean, code: number, data: any}.

Phone numbers use the international format, digits only, without the leading plus sign. Example: 14155552671.

The instance must be connected.

Check if a phone number is on WhatsApp​

POST /contacts/check

When to use it

  • Verify if a number is WhatsApp-registered before attempting messages or saving as contact.
  • Useful for validation during signup or import flows.

Body

  • instance: string — Your instance identifier.
  • phone: string — E.164 number without plus (digits only).
curl -X POST https://api.communiktor.com/contacts/check \
-H "Content-Type: application/json" \
-H "X-API-KEY: YOUR_API_KEY" \
-d '{
"instance": "my-instance-1",
"phone": "14155552671"
}'

Response — the number is on WhatsApp:

{
"success": true,
"code": 200,
"message": "The phone number is registered on WhatsApp",
"data": null
}

A number that is not on WhatsApp returns HTTP 400 with success: false and the message The phone number is not registered on WhatsApp.

Add or edit a number in your WhatsApp contacts​

POST /contacts/push

When to use it

  • Create or update a contact in the device address book used by the instance.
  • Keep names synchronized with your CRM.

Body

  • instance: string — Your instance identifier.
  • phone: string — E.164 number without plus (digits only).
  • lastname: string — Contact last name.
  • firstname: string — Contact first name.
curl -X POST https://api.communiktor.com/contacts/push \
-H "Content-Type: application/json" \
-H "X-API-KEY: YOUR_API_KEY" \
-d '{
"instance": "my-instance-1",
"phone": "14155552671",
"lastname": "Doe",
"firstname": "Jane"
}'

Response

{
"success": true,
"code": 200,
"message": "The contact is saved into your WhatsApp contacts.",
"data": null
}

Remove a number from your WhatsApp contacts​

POST /contacts/delete

When to use it

  • Clean up your device address book to avoid clutter.
  • Remove stale or wrong contacts.

Body

  • instance: string — Your instance identifier.
  • phone: string — E.164 number without plus (digits only).
curl -X POST https://api.communiktor.com/contacts/delete \
-H "Content-Type: application/json" \
-H "X-API-KEY: YOUR_API_KEY" \
-d '{
"instance": "my-instance-1",
"phone": "14155552671"
}'

Response

{
"success": true,
"code": 200,
"message": "The phone number is removed from your WhatsApp contacts",
"data": null
}