Skip to main content
POST
/
contacts
Create or update a contact
curl --request POST \
  --url https://wsapi.chat/contacts \
  --header 'Content-Type: application/json' \
  --header 'X-Api-Key: <api-key>' \
  --header 'X-Instance-Id: <x-instance-id>' \
  --data '
{
  "id": "<string>",
  "fullName": "<string>",
  "firstName": "<string>"
}
'
{
  "status": 400,
  "detail": "invalid request body"
}

Authorizations

X-Api-Key
string
header
required

Instance or customer-level API key. Either the instance's own API key or the customer's API key is accepted. Must be paired with the X-Instance-Id header to identify the target instance.

Headers

X-Instance-Id
string
default:{{instanceId}}
required

The ID of the WhatsApp instance to use

Body

application/json
id
string
required

Phone number or JID of the contact

fullName
string
required

Full name of the contact

firstName
string

First name of the contact (optional)

Response

Contact created or updated