Upsert contact
Upsert Contact
Update or create a contact in your phone address book and WhatsApp.
POST
Upsert contact
Update a contact in your phone address book using a phone number.
This endpoint allows you to:
- Create a new contact in your phone’s address book
- Update an existing contact’s information
- Sync contact details to WhatsApp using the contact’s phone number
This endpoint is intended for phone-number-based contact management and address book synchronization.
Use Cases
Contact Management
Automatically create or update contacts when new users register in your system.CRM Synchronization
Keep your WhatsApp contacts in sync with your CRM database.Bulk Contact Import
Import and update multiple contacts from external sources.Request Parameters
chat_id
Use the contact’s phone number only.- Phone number:
12132132130
Send the number with country code and without spaces or the
+ sign. Example: 12132132130Do not use an
@lid identifier with this endpoint.If the same person is handled once by phone number and again by LID, WhatsApp may treat them as two separate contacts. For upsert operations, always use the phone number only.first_name
The contact’s first name (required).last_name
The contact’s last name (optional).Response Examples
Successful Response
When the contact is upserted successfully:Best Practices
Multiple Requests
If the contact doesn’t appear in your address book immediately, try making 2-3 requests with a few seconds delay between them.Verification
After upserting a contact, you can use the Get Contact endpoint to verify the update was successful.Error Handling
Always implement proper error handling to catch validation errors or API failures.Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
application/json
Example:
"application/json"
application/json
Example:
"application/json"
Path Parameters
Instance UUID copied from hypersender dashboard
Example:
"{{ instance_id }}"
Body
application/json
Phone number (123123123) or chat ID ([email protected] or 123123@lid)
Example:
The contact's first name
Example:
"John"
The contact's last name
Example:
"Doe"