API
Log in
Documentation › Inbound webhook › Inbound webhook (Integrations)
POST

Inbound webhook (Integrations)

POSThttps://app.sendapp.ai/api/integrations/webhook/{token}
Receive contacts from external platforms (Shopify, WooCommerce, HubSpot, Klaviyo, Pipedrive and others). On each event we extract the contact (name / phone / email), create or update it in SendApp and tag it with the source platform (e.g. shopify). No message is sent: reach those contacts later with a Campaign (by tag) or via API.
The payload can be any JSON: we recursively search for phone, email and name keys at any depth. Typical response: { "status": "ok", "contact": { "id": 12345 } }.
If we find neither phone nor email, we respond 200 with status: ignored, so the source platform keeps the webhook active.
Parameters
token required
Account token, in the URL path. Determines which account receives the contacts.
source optional
Query string, e.g. ?source=shopify. Used as the contact tag; if missing, the User-Agent is used.
Request
curl -X POST 'https://app.sendapp.ai/api/integrations/webhook/YOUR_ACCOUNT_TOKEN?source=shopify' \
  -H 'Content-Type: application/json' \
  -d '{
    "email": "jon@example.com",
    "customer": {
      "first_name": "Jon",
      "last_name": "Snow",
      "phone": "+391234567890"
    }
  }'
<?php
$ch = curl_init('https://app.sendapp.ai/api/integrations/webhook/YOUR_ACCOUNT_TOKEN?source=shopify');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_POST => true,
    CURLOPT_HTTPHEADER => ['Content-Type: application/json'],
    CURLOPT_POSTFIELDS => json_encode([
        'email'    => 'jon@example.com',
        'customer' => ['first_name' => 'Jon', 'last_name' => 'Snow', 'phone' => '+391234567890'],
    ]),
]);
echo curl_exec($ch);
curl_close($ch);
const res = await fetch('https://app.sendapp.ai/api/integrations/webhook/YOUR_ACCOUNT_TOKEN?source=shopify', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    email: 'jon@example.com',
    customer: { first_name: 'Jon', last_name: 'Snow', phone: '+391234567890' }
  })
});
console.log(await res.json());
Response (200 OK)
{
  "status": "ok",
  "contact": {
    "id": 4023
  }
}
Error
{
  "status": "error",
  "message": "Unknown webhook token"
}