Create or find a contact by phone
Returns the contact for a phone number, creating it when none exists. Requires the contacts.write scope. Phone numbers are normalised to international format. When channelConnectionId is omitted the workspace must have exactly one WhatsApp connection. An optional name renames the contact. The response is the contact snapshot, the same shape as the contact webhooks.
Responses
| Status | Meaning and codes |
|---|---|
| 201 | The contact. |
| 400 | undefined |
| 401 | undefined |
| 403 | undefined |
| 422 | undefined |
| 429 | undefined |
Success and handled error responses send Cache-Control: no-store and X-Correlation-ID (the resolved/generated UUID). Errors use application/problem+json and the reusable ProblemDetails schema below. Retry-After: 1 is sent only for RATE_LIMITED. Request examples read your key from a server environment variable; replace all fictional values.
Schemas and examples
ApiKeyAuthorizationBearer <token>Server-side API key. publicId is 12 lowercase base32 characters (a-z, 2-7); secret is 43 base64url characters from 32 random bytes. Use Authorization: Bearer <complete key>. The API key determines the workspace; requests cannot select another workspace. All public routes share 20 requests per second per key. See API-key authentication.
X-Correlation-ID?stringOptional tracing ID. A UUID-shaped value is echoed in the response. Missing or invalid values are replaced with a generated UUID, not rejected.
application/json- body
phone*stringlength <= 32name?string1 <= length <= 100channelConnectionId?stringuuidThe contact.
application/json- response
Contact snapshot returned by create, find, get and update, and embedded in contact webhooks.
id*stringuuidname*string|nullphone*|Phone number in E.164 form with a leading +, or null when the contact has no phone.
email*string|nulllifecycleStage*|nulllabels*array<>fields*Custom field values keyed by field key, only for fields that have a value. Every value is text; booleans are "Yes" or "No".