List event types
/v1/webhooks/event-types Lists every event type that can be sent to a webhook endpoint (and listed by GET /events), with its group and what it means. Any valid token can read it.
New types are added over time; your receiver should accept, and may ignore, types it doesn't know.
Scopes
Any valid token can make this request.
Query parameters
| Field | Type and description |
|---|---|
limit | integer 1 to 100 Default How many items to return, from 1 to 100. Default 25. |
cursor | string 1 to 1,024 characters The |
sort | string Default The field to sort by. Each list names the fields it can be sorted by. One of: |
order | string Default
One of: |
category | string Only the types of this group. One of: |
Example request
curl "https://api.rabbitflare.com/v1/webhooks/event-types?category=sites" \
-H "Authorization: Bearer $RABBITFLARE_TOKEN" const res = await fetch("https://api.rabbitflare.com/v1/webhooks/event-types?category=sites", {
headers: {
Authorization: `Bearer ${process.env.RABBITFLARE_TOKEN}`,
},
});
if (!res.ok) throw new Error(`Rabbitflare API error ${res.status}: ${await res.text()}`);
const { data, pagination } = await res.json();
console.log(data, pagination.nextCursor); import { Rabbitflare } from "@rabbitflare/api";
const rf = new Rabbitflare({ token: process.env.RABBITFLARE_TOKEN });
for await (const item of rf.webhooks.eventTypes.list({ category: "sites" })) {
console.log(item);
} <?php
$ch = curl_init('https://api.rabbitflare.com/v1/webhooks/event-types?category=sites');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 120,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('RABBITFLARE_TOKEN'),
],
]);
$body = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
if ($body === false || $status >= 400) {
throw new RuntimeException("Rabbitflare API error $status: $body");
}
$answer = json_decode($body, true);
print_r($answer['data']);
echo $answer['pagination']['nextCursor'] ?? 'Last page', PHP_EOL; import os
import requests
response = requests.get(
"https://api.rabbitflare.com/v1/webhooks/event-types",
headers={
"Authorization": "Bearer " + os.environ["RABBITFLARE_TOKEN"],
},
params={
"category": "sites",
},
timeout=120,
)
response.raise_for_status()
answer = response.json()
print(answer["data"], answer["pagination"]["nextCursor"]) Response
200 OK Returns a list of EventType objects in data, with a Pagination object in pagination.
The EventType object's fields 3 fields
| Field | Type and description |
|---|---|
type | string The event type, as events and webhooks name it. Known values: |
category | string The group it belongs to: Known values: |
description | string What it means, in one line. |
Example response
{
"data": [
{
"type": "site.ready",
"category": "sites",
"description": "A site finished installing and is live."
}
],
"pagination": {
"limit": 25,
"hasMore": false,
"nextCursor": null
}
} Errors
The errors this request can answer besides those every request can (a missing token, a missing scope, the rate limits). Each answer is an Error object (see Errors).
| Status and code | When, and what to do |
|---|---|
400 invalid_ | A query parameter is unknown or has a wrong value ( Correct or remove the parameter named in |
400 invalid_ | The cursor isn't one this list gave, or was made with other filters or another sort. Start again from the first page, or keep the filters and sort the cursor was made with. |