curl --request POST \
--url https://app.thinnest.ai/api/v1/contacts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"phone": "+91 98765 43210",
"name": "Asha Rao",
"email": "Asha.Rao@gmail.com",
"externalId": "LSQ-42",
"tags": [
"Hot Lead",
"Sky Towers"
],
"language": "Hindi",
"consent": {
"status": "granted",
"source": "99acres enquiry form, 17 Sep"
}
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
phone: '+91 98765 43210',
name: 'Asha Rao',
email: 'Asha.Rao@gmail.com',
externalId: 'LSQ-42',
tags: ['Hot Lead', 'Sky Towers'],
language: 'Hindi',
consent: {status: 'granted', source: '99acres enquiry form, 17 Sep'}
})
};
fetch('https://app.thinnest.ai/api/v1/contacts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.thinnest.ai/api/v1/contacts"
payload = {
"phone": "+91 98765 43210",
"name": "Asha Rao",
"email": "Asha.Rao@gmail.com",
"externalId": "LSQ-42",
"tags": ["Hot Lead", "Sky Towers"],
"language": "Hindi",
"consent": {
"status": "granted",
"source": "99acres enquiry form, 17 Sep"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)Create Contact
Creates a contact — or, when someone is already on that number, updates that person instead, so a CRM that syncs the same lead twice never doubles your list. Answers 201 for a new contact and 200 for one it updated. Creating a contact is not consent: only consent.status: "granted" with a source is. A build key may do this.
curl --request POST \
--url https://app.thinnest.ai/api/v1/contacts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"phone": "+91 98765 43210",
"name": "Asha Rao",
"email": "Asha.Rao@gmail.com",
"externalId": "LSQ-42",
"tags": [
"Hot Lead",
"Sky Towers"
],
"language": "Hindi",
"consent": {
"status": "granted",
"source": "99acres enquiry form, 17 Sep"
}
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
phone: '+91 98765 43210',
name: 'Asha Rao',
email: 'Asha.Rao@gmail.com',
externalId: 'LSQ-42',
tags: ['Hot Lead', 'Sky Towers'],
language: 'Hindi',
consent: {status: 'granted', source: '99acres enquiry form, 17 Sep'}
})
};
fetch('https://app.thinnest.ai/api/v1/contacts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.thinnest.ai/api/v1/contacts"
payload = {
"phone": "+91 98765 43210",
"name": "Asha Rao",
"email": "Asha.Rao@gmail.com",
"externalId": "LSQ-42",
"tags": ["Hot Lead", "Sky Towers"],
"language": "Hindi",
"consent": {
"status": "granted",
"source": "99acres enquiry form, 17 Sep"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)Authorizations
Headers
Developers only: the customer workspace this request acts in — its org_… id from POST /customers. Leave it out to act in your own workspace. Refused with 404 (Workspace not found.) when the id is unknown, is not one of your customers, or is not an org_… id; 410 when that customer was deleted (restore it with POST /customers/{id}/restore until it is erased); 403 when the key belongs to one customer workspace (it cannot act as another); 400 when your workspace is not a developer workspace. /customers/* and GET /customers/usage are your own workspace's and refuse the header with 400: call them without it.
"org_3fKq9TzQ1mN8vB2xR7cLpA"
Body
The language to write to them in, by its English name as the console offers it, auto to match theirs, or null.
auto, English, Hindi, Assamese, Bengali, Bodo, Dogri, French, German, Gujarati, Indonesian, Italian, Japanese, Kannada, Kashmiri, Konkani, Korean, Maithili, Malayalam, Manipuri, Marathi, Nepali, Odia, Polish, Portuguese, Punjabi, Russian, Sanskrit, Santali, Sindhi, Spanish, Swahili, Tamil, Telugu, Thai, Turkish, Urdu, Vietnamese, null "Hindi"
Response
Someone was already on that number; they were updated.