put
https://api.getwax.io/v1/contacts/upsert
Creates a new contact or updates an existing one.
Use Case: Use this endpoint to synchronize your customer data with Wax CRM. This is useful for:
- Importing contacts from your e-commerce platform, CRM, or other systems
- Updating contact information when customers update their profile, including their phone number
- Adding custom attributes to contacts for segmentation and personalization
Matching:
- By default the contact is matched on
phone_number(or onemailwhen no phone number is sent) - Send
reference_key: external_idto match on your own identifier instead. The matched contact keeps its id, conversation history, attributes, tags and opt-in statuses, and itsphone_numberis updated when a different one is sent - With
reference_key: external_id, a sentphone_numbermust be a valid mobile number, since it replaces the contact's current one - A phone number change resets the WhatsApp deliverability and identity fields of the contact (they describe the previous number); the contact is reachable again at the new number once it opts in or writes to you
- When no contact matches the
external_id, the contact owning the sent phone number is used if it has noexternal_idyet; otherwise a new contact is created - A phone number or an email is always required to create a contact
Technical Details:
emailis only updated when the field is sent; omit it to keep the current value- Custom attributes are upserted (created or updated) individually
- Tags are added to the contact (existing tags are preserved)
422is returned when the sentphone_numberorexternal_idalready belongs to another contact of your organization: delete that contact first or send the matching value
Errors (422): Contact must have either an email or a phone number, Invalid phone number, reference_key must be one of: phone_number, external_id, external_id is required when reference_key is external_id, Phone number already belongs to another contact, External id already belongs to another contact
Recent Requests
Log in to see full request history
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Loading…
200successful