Crear un aviso
curl --request POST \
--url https://api.impulsodigital.app/v1/webhooks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "https://tu-crm.com/impulso",
"events": []
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({url: 'https://tu-crm.com/impulso', events: []})
};
fetch('https://api.impulsodigital.app/v1/webhooks', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.impulsodigital.app/v1/webhooks"
payload = {
"url": "https://tu-crm.com/impulso",
"events": []
}
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/webhooks",
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([
'url' => 'https://tu-crm.com/impulso',
'events' => [
]
]),
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>",
"url": "<string>",
"description": "<string>",
"events": [
"message.received"
],
"active": true,
"consecutive_failures": 123,
"disabled_at": "2023-11-07T05:31:56Z",
"disabled_reason": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"secret": "whsec_…"
}
}Avisos
Crear un aviso
La respuesta incluye secret una sola vez; guárdalo para verificar la firma. Solo https y direcciones públicas. Hasta 10 por cuenta.
POST
/
webhooks
Crear un aviso
curl --request POST \
--url https://api.impulsodigital.app/v1/webhooks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "https://tu-crm.com/impulso",
"events": []
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({url: 'https://tu-crm.com/impulso', events: []})
};
fetch('https://api.impulsodigital.app/v1/webhooks', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.impulsodigital.app/v1/webhooks"
payload = {
"url": "https://tu-crm.com/impulso",
"events": []
}
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/webhooks",
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([
'url' => 'https://tu-crm.com/impulso',
'events' => [
]
]),
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>",
"url": "<string>",
"description": "<string>",
"events": [
"message.received"
],
"active": true,
"consecutive_failures": 123,
"disabled_at": "2023-11-07T05:31:56Z",
"disabled_reason": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"secret": "whsec_…"
}
}Autorizaciones
Cuerpo
application/json

