Crear un contacto
curl --request POST \
--url https://api.impulsodigital.app/v1/contacts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Ana Ruiz",
"phone": "+57 310 555 0001"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'Ana Ruiz', phone: '+57 310 555 0001'})
};
fetch('https://api.impulsodigital.app/v1/contacts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.impulsodigital.app/v1/contacts"
payload = {
"name": "Ana Ruiz",
"phone": "+57 310 555 0001"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.impulsodigital.app/v1/contacts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Ana Ruiz',
'phone' => '+57 310 555 0001'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"data": {
"id": "<string>",
"phone": "573105550001",
"whatsapp_id": "<string>",
"name": "<string>",
"email": "<string>",
"company": "<string>",
"address": "<string>",
"national_id": "<string>",
"notes": "<string>",
"status": "new",
"is_buyer": true,
"blocked": true,
"accepts_messaging": true,
"first_contact": "2023-11-07T05:31:56Z",
"last_contact": "2023-11-07T05:31:56Z",
"total_messages": 123,
"conversation_id": "<string>"
}
}Contactos
Crear un contacto
Crea el contacto, o devuelve el que ya existía con ese teléfono (200). Incluye conversation_id.
POST
/
contacts
Crear un contacto
curl --request POST \
--url https://api.impulsodigital.app/v1/contacts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Ana Ruiz",
"phone": "+57 310 555 0001"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'Ana Ruiz', phone: '+57 310 555 0001'})
};
fetch('https://api.impulsodigital.app/v1/contacts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.impulsodigital.app/v1/contacts"
payload = {
"name": "Ana Ruiz",
"phone": "+57 310 555 0001"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.impulsodigital.app/v1/contacts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Ana Ruiz',
'phone' => '+57 310 555 0001'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"data": {
"id": "<string>",
"phone": "573105550001",
"whatsapp_id": "<string>",
"name": "<string>",
"email": "<string>",
"company": "<string>",
"address": "<string>",
"national_id": "<string>",
"notes": "<string>",
"status": "new",
"is_buyer": true,
"blocked": true,
"accepts_messaging": true,
"first_contact": "2023-11-07T05:31:56Z",
"last_contact": "2023-11-07T05:31:56Z",
"total_messages": 123,
"conversation_id": "<string>"
}
}Autorizaciones
Encabezados
Cuerpo
application/json
Respuesta
Ya existía

