Chatilo
USDPrices shown in US dollars Sign in Start free trial
API reference

Events and hooks

Subscribe an address to an event and it is told the moment it happens. This is how Zapier, Make and n8n connect; your own code can use it the same way. The webhooks guide explains deliveries, signatures and retries.

List event types #

GET/api/v1/events

Works with any key

Every event a hook can subscribe to, with what it means.

Returns HTTP 200

okboolean
Always true on success.
eventslist of object
Each as {"event", "description"}.

Errors

401unauthorized
The Authorization header is missing, or the key is wrong or deleted.
429rate_limited
More than 120 requests in a minute with this key. Wait for the seconds in Retry-After.

Plus the errors any request can get.

Request
curl "https://chatilo.me/api/v1/events" \
  -H "Authorization: Bearer YOUR_API_KEY"
<?php
$apiKey = 'YOUR_API_KEY';

$ch = curl_init('https://chatilo.me/api/v1/events');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . $apiKey],
]);
$result = json_decode((string) curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);

if ($status >= 400) {
    throw new RuntimeException($result['error']['code'] . ': ' . $result['error']['message']);
}
print_r($result);
const apiKey = 'YOUR_API_KEY';

const response = await fetch("https://chatilo.me/api/v1/events", {
  headers: {
    Authorization: `Bearer ${apiKey}`,
  },
});
const result = await response.json();

if (!response.ok) {
  throw new Error(`${result.error.code}: ${result.error.message}`);
}
console.log(result);
import requests

api_key = "YOUR_API_KEY"

response = requests.get(
    "https://chatilo.me/api/v1/events",
    headers={"Authorization": f"Bearer {api_key}"},
    timeout=30,
)
result = response.json()

if not response.ok:
    raise RuntimeError(f"{result['error']['code']}: {result['error']['message']}")
print(result)
Response · HTTP 200
{
    "ok": true,
    "events": [
        {
            "event": "message.received",
            "description": "A customer sends a message"
        },
        {
            "event": "order.paid",
            "description": "An order is paid"
        }
    ]
}

Get sample deliveries #

GET/api/v1/sample/{event}

Works with any key

Up to three example deliveries for an event, built from the workspace’s own most recent data where there is some and made up otherwise. Each one has the same shape as a real delivery, so you can build against it before anything has happened.

Path

eventstringrequired
An event name: message.received, contact.created, contact.updated, contact.tag_added, conversation.opened, conversation.closed, conversation.handover, campaign.finished, lead.created, order.created, order.paid, order.fulfilled, order.cancelled, booking.created, booking.rescheduled, booking.cancelled.

Returns HTTP 200

okboolean
Always true on success.
eventstring
The event asked for.
sampleslist of object
Deliveries as {"id", "event", "created_at", "data"}.

Errors

401unauthorized
The Authorization header is missing, or the key is wrong or deleted.
404invalid_event
There is no event with that name.
429rate_limited
More than 120 requests in a minute with this key. Wait for the seconds in Retry-After.

Plus the errors any request can get.

Request
curl "https://chatilo.me/api/v1/sample/contact.created" \
  -H "Authorization: Bearer YOUR_API_KEY"
<?php
$apiKey = 'YOUR_API_KEY';

$ch = curl_init('https://chatilo.me/api/v1/sample/contact.created');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . $apiKey],
]);
$result = json_decode((string) curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);

if ($status >= 400) {
    throw new RuntimeException($result['error']['code'] . ': ' . $result['error']['message']);
}
print_r($result);
const apiKey = 'YOUR_API_KEY';

const response = await fetch("https://chatilo.me/api/v1/sample/contact.created", {
  headers: {
    Authorization: `Bearer ${apiKey}`,
  },
});
const result = await response.json();

if (!response.ok) {
  throw new Error(`${result.error.code}: ${result.error.message}`);
}
console.log(result);
import requests

api_key = "YOUR_API_KEY"

response = requests.get(
    "https://chatilo.me/api/v1/sample/contact.created",
    headers={"Authorization": f"Bearer {api_key}"},
    timeout=30,
)
result = response.json()

if not response.ok:
    raise RuntimeError(f"{result['error']['code']}: {result['error']['message']}")
print(result)
Response · HTTP 200
{
    "ok": true,
    "event": "contact.created",
    "samples": [
        {
            "id": "evt_sample_contact_created_1001",
            "event": "contact.created",
            "created_at": "2026-01-31T09:30:00Z",
            "data": {
                "contact": {
                    "id": 1001,
                    "name": "Grace Miller",
                    "phone": "919876543210",
                    "email": "[email protected]",
                    "source": "api",
                    "opted_in": true,
                    "tags": [
                        "VIP"
                    ],
                    "created_at": "2026-01-31T09:30:00Z",
                    "attributes": {
                        "city": "Denver"
                    },
                    "notes": "",
                    "opted_out_at": null,
                    "last_seen_at": "2026-01-31T09:30:00Z",
                    "updated_at": "2026-01-31T09:30:00Z"
                }
            }
        }
    ]
}

List hooks #

GET/api/v1/hooks

Works with any key

The hook subscriptions made through the API, newest first. Webhooks added by hand on the API and webhooks page are not listed here.

Returns HTTP 200

okboolean
Always true on success.
hookslist of Hook
The subscriptions. Signing secrets are never listed.

Errors

401unauthorized
The Authorization header is missing, or the key is wrong or deleted.
429rate_limited
More than 120 requests in a minute with this key. Wait for the seconds in Retry-After.

Plus the errors any request can get.

Request
curl "https://chatilo.me/api/v1/hooks" \
  -H "Authorization: Bearer YOUR_API_KEY"
<?php
$apiKey = 'YOUR_API_KEY';

$ch = curl_init('https://chatilo.me/api/v1/hooks');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . $apiKey],
]);
$result = json_decode((string) curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);

if ($status >= 400) {
    throw new RuntimeException($result['error']['code'] . ': ' . $result['error']['message']);
}
print_r($result);
const apiKey = 'YOUR_API_KEY';

const response = await fetch("https://chatilo.me/api/v1/hooks", {
  headers: {
    Authorization: `Bearer ${apiKey}`,
  },
});
const result = await response.json();

if (!response.ok) {
  throw new Error(`${result.error.code}: ${result.error.message}`);
}
console.log(result);
import requests

api_key = "YOUR_API_KEY"

response = requests.get(
    "https://chatilo.me/api/v1/hooks",
    headers={"Authorization": f"Bearer {api_key}"},
    timeout=30,
)
result = response.json()

if not response.ok:
    raise RuntimeError(f"{result['error']['code']}: {result['error']['message']}")
print(result)
Response · HTTP 200
{
    "ok": true,
    "hooks": [
        {
            "id": 21,
            "event": "message.received",
            "target_url": "https://example.com/hooks/chat",
            "last_status": null,
            "last_sent_at": null,
            "created_at": "2026-01-31T09:30:00Z"
        }
    ]
}

Subscribe to an event #

POST/api/v1/hooks

Needs a read-and-write key Accepts Idempotency-Key

From now on, each time the event happens a signed JSON POST goes to your address. One subscription is one event; subscribe again for another. Subscribing the same address to the same event twice returns the first subscription (status 200) without its secret. A workspace can hold 50.

Body JSON

eventstringrequired
The event name, from “List event types”.
target_urlstringrequired
Your public https address, up to 500 characters. Addresses on a private network are refused. “url” and “hookUrl” are accepted as other names for this field.

Returns HTTP 201

okboolean
Always true on success.
hookHook
The subscription, plus "secret": the signing secret for its deliveries. The secret is shown this once and never again.

Errors

401unauthorized
The Authorization header is missing, or the key is wrong or deleted.
403hook_limit
The workspace already has 50 subscriptions.
403read_only_key
A read-only key was used for a request that changes something.
409idempotency_conflict
A request with the same Idempotency-Key is still running.
422invalid_event
event isn’t an event name.
422invalid_idempotency_key
The Idempotency-Key is longer than 200 characters.
422invalid_url
target_url is missing, too long, can’t be found, or points to a private network.
429rate_limited
More than 120 requests in a minute with this key. Wait for the seconds in Retry-After.

Plus the errors any request can get.

Request
curl -X POST "https://chatilo.me/api/v1/hooks" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "event": "message.received",
    "target_url": "https://example.com/hooks/chat"
}'
<?php
$apiKey = 'YOUR_API_KEY';

$ch = curl_init('https://chatilo.me/api/v1/hooks');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . $apiKey, 'Content-Type: application/json'],
    CURLOPT_POSTFIELDS => json_encode([
        'event' => 'message.received',
        'target_url' => 'https://example.com/hooks/chat',
    ]),
]);
$result = json_decode((string) curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);

if ($status >= 400) {
    throw new RuntimeException($result['error']['code'] . ': ' . $result['error']['message']);
}
print_r($result);
const apiKey = 'YOUR_API_KEY';

const response = await fetch("https://chatilo.me/api/v1/hooks", {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${apiKey}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "event": "message.received",
      "target_url": "https://example.com/hooks/chat"
  }),
});
const result = await response.json();

if (!response.ok) {
  throw new Error(`${result.error.code}: ${result.error.message}`);
}
console.log(result);
import requests

api_key = "YOUR_API_KEY"

response = requests.post(
    "https://chatilo.me/api/v1/hooks",
    headers={"Authorization": f"Bearer {api_key}"},
    json={
        "event": "message.received",
        "target_url": "https://example.com/hooks/chat",
    },
    timeout=30,
)
result = response.json()

if not response.ok:
    raise RuntimeError(f"{result['error']['code']}: {result['error']['message']}")
print(result)
Response · HTTP 201
{
    "ok": true,
    "hook": {
        "id": 21,
        "event": "message.received",
        "target_url": "https://example.com/hooks/chat",
        "last_status": null,
        "last_sent_at": null,
        "created_at": "2026-01-31T09:30:00Z",
        "secret": "whsec_3f9a1c0b7d2e4a5f6b8c9d0e1f2a3b4c5d6e7f80"
    }
}

Unsubscribe #

DELETE/api/v1/hooks/{id}

Needs a read-and-write key

Stops deliveries for one subscription. Answering a delivery with HTTP 410 does the same thing.

Path

idintegerrequired
The subscription’s id.

Returns HTTP 200

okboolean
Always true on success.
deletedinteger
The id that was removed.

Errors

401unauthorized
The Authorization header is missing, or the key is wrong or deleted.
403read_only_key
A read-only key was used for a request that changes something.
404hook_not_found
No subscription with that id in this workspace.
429rate_limited
More than 120 requests in a minute with this key. Wait for the seconds in Retry-After.

Plus the errors any request can get.

Request
curl -X DELETE "https://chatilo.me/api/v1/hooks/21" \
  -H "Authorization: Bearer YOUR_API_KEY"
<?php
$apiKey = 'YOUR_API_KEY';

$ch = curl_init('https://chatilo.me/api/v1/hooks/21');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => 'DELETE',
    CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . $apiKey],
]);
$result = json_decode((string) curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);

if ($status >= 400) {
    throw new RuntimeException($result['error']['code'] . ': ' . $result['error']['message']);
}
print_r($result);
const apiKey = 'YOUR_API_KEY';

const response = await fetch("https://chatilo.me/api/v1/hooks/21", {
  method: 'DELETE',
  headers: {
    Authorization: `Bearer ${apiKey}`,
  },
});
const result = await response.json();

if (!response.ok) {
  throw new Error(`${result.error.code}: ${result.error.message}`);
}
console.log(result);
import requests

api_key = "YOUR_API_KEY"

response = requests.delete(
    "https://chatilo.me/api/v1/hooks/21",
    headers={"Authorization": f"Bearer {api_key}"},
    timeout=30,
)
result = response.json()

if not response.ok:
    raise RuntimeError(f"{result['error']['code']}: {result['error']['message']}")
print(result)
Response · HTTP 200
{
    "ok": true,
    "deleted": 21
}

Cookies on this site

We use the cookies needed to run the site and keep you signed in. With your OK we also remember choices you make here, such as the currency for prices. We don’t use advertising or tracking cookies. Cookie policy