Contacts API
Read, create, update and delete the contacts of your workspace from your own systems.
A contact is one person in the key's workspace. Each phone number can belong to only one contact in a workspace.
The machine-readable contract is openapi.public.yaml. Download it for clients and codegen. This site has no live Try-it console.
Scopes
contacts:readforGETcontacts:writeforPOST,PATCHandDELETE
The contact object
| Field | Type | Notes |
|---|---|---|
id | string (UUID) | Set by Dhvanee. |
phone | string or null | Always send the country code, for example +14155552671. A number without one is read as Indian (+91). If you send an email too, a phone number that is not valid is dropped rather than refused. |
first_name, last_name | string or null | Up to 128 characters each. |
email | string or null | Stored in lower case. It is not checked as an address, so check it before you send it. |
company, job_title | string or null | Up to 200 and 128 characters. |
language | string or null | Accepted when you create or update a contact; not returned. |
List contacts
Newest first. limit is 1 to 200 (default 50) and offset is 0 or more; a value outside those returns 422.
curl -sS -X GET "https://api.stage.dhvanee.com/v1/contacts?limit=50&offset=0" \
-H "Authorization: Bearer dhvanee_live_YOUR_KEY"{"items": [{"id": "6f1c...", "phone": "+919876543210", "first_name": "Asha", "last_name": "Patel", "email": "asha@example.com", "company": "Sunrise Dental", "job_title": null}], "limit": 50, "offset": 0}Create a contact
Send at least a phone or an email. Returns 201 with the contact.
curl -sS -X POST "https://api.stage.dhvanee.com/v1/contacts" \
-H "Authorization: Bearer dhvanee_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"phone":"+919876543210","first_name":"Asha","last_name":"Patel","email":"asha@example.com"}'Fields the API does not know, such as
name, are ignored without an error. Use first_name and last_name.Read, update and delete one contact
curl -sS -X GET "https://api.stage.dhvanee.com/v1/contacts/CONTACT_ID" \
-H "Authorization: Bearer dhvanee_live_YOUR_KEY"curl -sS -X PATCH "https://api.stage.dhvanee.com/v1/contacts/CONTACT_ID" \
-H "Authorization: Bearer dhvanee_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"company":"Sunrise Dental Clinic"}'curl -sS -X DELETE "https://api.stage.dhvanee.com/v1/contacts/CONTACT_ID" \
-H "Authorization: Bearer dhvanee_live_YOUR_KEY"PATCH changes only the fields you send; sending null clears a field. DELETE returns 204.
Errors
| Status | When |
|---|---|
404 | No contact with that id in this workspace (Contact not found). |
409 | Another contact already has that phone number (A contact already owns that phone number). |
422 | Neither a valid phone nor an email was sent (Give a valid phone or email), or limit/offset is out of range (limit must be 1-200 and offset non-negative). |
Creating a contact does not take an Idempotency-Key. If you retry a create, a contact with a phone number comes back as 409 instead of being made twice.