Find or create a contact
Finds the contact for a phone number or email, or creates one with an optional name if none exists. Repeating the call with the same number returns the same contact, so it is a safe way to get a contact id. A new contact starts with no marketing consent.
Requires: desk.write scope, Converse or Contacts licence.
Authorization
bearerAuth A SautiDesk API key. An owner or admin makes it under Settings in SautiDesk for a named person and picks the scopes. The key is shown once. Send it as Authorization: Bearer <key>. It acts as that person and as nobody else.
In: header
Request Body
application/json
Response
OK
Example
{ "id": "3f2b8c1e-5a4d-4e7b-9c10-2d6a8e4f1b37", "name": "Amina Wanjiru", "company": "Example Ltd", "address": "help@support.example.com", "notes": "Hi Amina, your order has shipped.", "blocked": false, "account_no": "example", "consent_bulk_sms": false, "consent_bulk_whatsapp": false, "consent_newsletters": false, "consent_marketing_calls": false, "numbers": [ { "id": "3f2b8c1e-5a4d-4e7b-9c10-2d6a8e4f1b37", "e164": "+254712345678", "label": "Amina Wanjiru", "primary": false } ], "emails": [ { "id": "3f2b8c1e-5a4d-4e7b-9c10-2d6a8e4f1b37", "address": "help@support.example.com", "label": "Amina Wanjiru", "primary": false } ], "match": { "kind": "billing", "basis": "example", "confidence": "example", "label": "Amina Wanjiru", "reason": "Outside business hours", "tickets": 1, "open_tickets": 1, "numbers": [ "+254712345678" ], "unusable_numbers": [ "+254712345678" ] }}idrequiredstring (uuid)namerequiredstringA name for it.companystringThe company the contact works for.addressstringAn email address.notesstringNotes about the call or the ticket.blockedrequiredbooleanTrue to block this contact so nobody on the team contacts them by mistake, false to unblock.account_nostringYour own account or customer number for this contact, so you can match it to your billing system.consent_bulk_smsrequiredbooleanTrue if this contact has agreed to receive bulk SMS.consent_bulk_whatsapprequiredbooleanTrue if this contact has agreed to receive bulk WhatsApp messages.consent_newslettersrequiredbooleanTrue if this contact has agreed to receive newsletters.consent_marketing_callsrequiredbooleanTrue if this contact has agreed to receive marketing calls.numbersrequiredobject[]idrequiredstring (uuid)e164requiredstringlabelstringA short name to recognise it by.primaryrequiredbooleanTrue to make this the contact's main one.emailsrequiredobject[]idrequiredstring (uuid)addressrequiredstringAn email address.labelstringA short name to recognise it by.primaryrequiredbooleanTrue to make this the contact's main one.matchanykindrequiredstringWhat kind it is.basisrequiredstringconfidencerequiredstringlabelrequiredstringA short name to recognise it by.reasonrequiredstringWhy, in a few words, for example Lunch.ticketsrequiredintegeropen_ticketsrequiredintegernumbersrequiredstring[]unusable_numbersrequiredstring[]curl -X POST "https://api.sautidesk.com/v1/desk/contacts" \ -H "Content-Type: application/json" \ -d '{ "number": "+254712345678", "name": "Amina" }'