Receiving events
FalconProxy sends events for changes made through the API. Each event is a POST request with a JSON body to every active endpoint that subscribed to it.
POST /your/webhook/path HTTP/1.1
Content-Type: application/json
User-Agent: FalconProxy-Webhooks/1.0
Falcon-Signature: t=1768478400,v1=HEX_SIGNATURE
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"event": "proxy.assigned",
"created_at": "2026-01-15T12:00:00.000Z",
"data": {
"proxy_endpoint_id": "9b2c1f0e-4d3a-4c8e-9f1a-2b7d6e5c4a31",
"end_user_id": "c1d2e3f4-a5b6-4c7d-8e9f-0a1b2c3d4e5f"
}
}Answer with a 2xx status within 10 seconds: any other status, or no answer, is recorded as a failed delivery. Redirects are not followed, so register the URL that answers. An event is sent once and a failed delivery is not retried, so acknowledge quickly, do the work afterwards, and read the current state through the API to catch up after any downtime.
Verify the signature
Each request carries a Falcon-Signature header, t=<unix seconds>,v1=<hex>. The value of v1 is the HMAC-SHA256 of the timestamp, a dot and the raw request body, in hex, keyed with the endpoint’s secret. The secret starts with whsec_ and is returned once, when the endpoint is created, so store it then.
import { createHmac, timingSafeEqual } from 'node:crypto'
// rawBody is the request body exactly as received, before any JSON parsing.
export function isFromFalconProxy(rawBody, signatureHeader, secret) {
const parts = Object.fromEntries(signatureHeader.split(',').map((part) => part.split('=')))
if (!parts.t || typeof parts.v1 !== 'string') return false
const age = Math.abs(Date.now() / 1000 - Number(parts.t))
if (!(age <= 300)) return false
const expected = createHmac('sha256', secret).update(`${parts.t}.${rawBody}`).digest('hex')
const received = Buffer.from(parts.v1)
const wanted = Buffer.from(expected)
return received.length === wanted.length && timingSafeEqual(received, wanted)
}Reject a request whose timestamp is more than 5 minutes from your clock, and compare the signatures in constant time, as above.
Event types
| Event | Sent when | Data |
|---|---|---|
user.created | An end-user is created. | user |
user.updated | An end-user is updated. | user |
user.deleted | An end-user is deleted. The record is archived, not erased. | user_id, archived |
user.status_changed | An end-user’s status changes. | user, previous_status, reason |
proxy.assigned | A proxy is assigned to an end-user. | proxy_endpoint_id, end_user_id |
proxy.unassigned | A proxy is unassigned from an end-user. | proxy_endpoint_id, end_user_id |
proxy.rotated | The relay accepts a request to rotate a proxy’s IP. The event is sent when the rotation starts, not when the new IP is known, and it does not carry the new IP: details is the relay’s answer to the request. | proxy_endpoint_id, device_id, details |
ping | You test an endpoint. | message, endpoint_id, org_id |
GET/webhooks
List webhook endpoints
Returns all configured outbound webhook endpoints for this organization.
Requires the webhooks:manage scope and an active subscription.
Responses
| Status | Meaning |
|---|---|
200 | List of webhook endpoints. |
401 | Missing, invalid, expired, or revoked API token. |
402 | The subscription is inactive. Reading is allowed, but mutating actions require an active subscription. |
403 | The token lacks a required scope. |
Response body (200)
| Field | Type | Description |
|---|---|---|
endpoints | array of objects | Your webhook endpoints. |
endpoints[].id | string (uuid) | Webhook endpoint id. |
endpoints[].url | string (uri) | The HTTPS address events are delivered to. |
endpoints[].description | string or null | Your note about what the endpoint is for. |
endpoints[].events | array of "user.created" | "user.updated" | "user.deleted" | "user.status_changed" | "proxy.assigned" | "proxy.unassigned" | "proxy.rotated" | "ping" | The event types the endpoint receives. |
endpoints[].is_active | boolean | Whether events are delivered to the endpoint. |
endpoints[].secret | string | HMAC-SHA256 signing secret. Returned only once upon endpoint creation. |
endpoints[].created_at | string | ISO 8601 timestamp. |
endpoints[].updated_at | string | ISO 8601 timestamp. |
{
"endpoints": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"url": "https://example.com/webhooks/falconproxy",
"description": "string",
"events": [
"user.created"
],
"is_active": true,
"secret": "string",
"created_at": "2026-01-15T12:00:00Z",
"updated_at": "2026-01-15T12:00:00Z"
}
]
}Example request
curl "https://falconproxy.com/api/v1/webhooks" \
-H "Authorization: Bearer $FALCONPROXY_API_KEY"POST/webhooks
Create webhook endpoint
Registers a new outbound webhook endpoint and generates an HMAC signing secret.
Requires the webhooks:manage scope and an active subscription.
Request body
| Field | Type | Description |
|---|---|---|
urlrequired | string (uri) | HTTPS destination URL for webhook delivery. |
description | string (max 255 characters) | Your note about what the endpoint is for, up to 255 characters. |
eventsrequired | array of "user.created" | "user.updated" | "user.deleted" | "user.status_changed" | "proxy.assigned" | "proxy.unassigned" | "proxy.rotated" | "ping" (min 1 item) | List of event types to subscribe to. |
metadata | object | A JSON object of your own. |
{
"url": "https://example.com/webhooks/falconproxy",
"description": "string",
"events": [
"user.created"
],
"metadata": {}
}Responses
| Status | Meaning |
|---|---|
201 | Webhook endpoint created. |
401 | Missing, invalid, expired, or revoked API token. |
402 | The subscription is inactive. Reading is allowed, but mutating actions require an active subscription. |
403 | The token lacks a required scope. |
404 | The resource does not exist or is not visible to this token. |
Response body (201)
| Field | Type | Description |
|---|---|---|
endpoint | object | Configured outbound webhook destination. |
endpoint.id | string (uuid) | Webhook endpoint id. |
endpoint.url | string (uri) | The HTTPS address events are delivered to. |
endpoint.description | string or null | Your note about what the endpoint is for. |
endpoint.events | array of "user.created" | "user.updated" | "user.deleted" | "user.status_changed" | "proxy.assigned" | "proxy.unassigned" | "proxy.rotated" | "ping" | The event types the endpoint receives. |
endpoint.is_active | boolean | Whether events are delivered to the endpoint. |
endpoint.secret | string | HMAC-SHA256 signing secret. Returned only once upon endpoint creation. |
endpoint.created_at | string | ISO 8601 timestamp. |
endpoint.updated_at | string | ISO 8601 timestamp. |
{
"endpoint": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"url": "https://example.com/webhooks/falconproxy",
"description": "string",
"events": [
"user.created"
],
"is_active": true,
"secret": "string",
"created_at": "2026-01-15T12:00:00Z",
"updated_at": "2026-01-15T12:00:00Z"
}
}Example request
curl -X POST "https://falconproxy.com/api/v1/webhooks" \
-H "Authorization: Bearer $FALCONPROXY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com/webhooks/falconproxy",
"description": "string",
"events": [
"user.created"
],
"metadata": {}
}'GET/webhooks/{id}
Get webhook endpoint
Returns webhook endpoint configuration and recent deliveries.
Requires the webhooks:manage scope and an active subscription.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string (uuid) | Webhook endpoint UUID. |
Responses
| Status | Meaning |
|---|---|
200 | Webhook endpoint details. |
401 | Missing, invalid, expired, or revoked API token. |
402 | The subscription is inactive. Reading is allowed, but mutating actions require an active subscription. |
403 | The token lacks a required scope. |
404 | The resource does not exist or is not visible to this token. |
Response body (200)
| Field | Type | Description |
|---|---|---|
endpoint | object | Configured outbound webhook destination. |
endpoint.id | string (uuid) | Webhook endpoint id. |
endpoint.url | string (uri) | The HTTPS address events are delivered to. |
endpoint.description | string or null | Your note about what the endpoint is for. |
endpoint.events | array of "user.created" | "user.updated" | "user.deleted" | "user.status_changed" | "proxy.assigned" | "proxy.unassigned" | "proxy.rotated" | "ping" | The event types the endpoint receives. |
endpoint.is_active | boolean | Whether events are delivered to the endpoint. |
endpoint.secret | string | HMAC-SHA256 signing secret. Returned only once upon endpoint creation. |
endpoint.created_at | string | ISO 8601 timestamp. |
endpoint.updated_at | string | ISO 8601 timestamp. |
{
"endpoint": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"url": "https://example.com/webhooks/falconproxy",
"description": "string",
"events": [
"user.created"
],
"is_active": true,
"secret": "string",
"created_at": "2026-01-15T12:00:00Z",
"updated_at": "2026-01-15T12:00:00Z"
}
}Example request
curl "https://falconproxy.com/api/v1/webhooks/3fa85f64-5717-4562-b3fc-2c963f66afa6" \
-H "Authorization: Bearer $FALCONPROXY_API_KEY"PATCH/webhooks/{id}
Update webhook endpoint
Updates destination URL, event subscriptions, or active status.
Requires the webhooks:manage scope and an active subscription.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string (uuid) | Webhook endpoint UUID. |
Request body
| Field | Type | Description |
|---|---|---|
url | string (uri) | The HTTPS address events are delivered to. |
description | string (max 255 characters) or null | Your note about what the endpoint is for, up to 255 characters. |
events | array of "user.created" | "user.updated" | "user.deleted" | "user.status_changed" | "proxy.assigned" | "proxy.unassigned" | "proxy.rotated" | "ping" (min 1 item) | The event types to receive. Replaces the current list. |
is_active | boolean | Switch delivery on or off. |
metadata | object | A JSON object of your own. |
{
"url": "https://example.com/webhooks/falconproxy",
"description": "string",
"events": [
"user.created"
],
"is_active": true,
"metadata": {}
}Responses
| Status | Meaning |
|---|---|
200 | Webhook endpoint updated. |
401 | Missing, invalid, expired, or revoked API token. |
402 | The subscription is inactive. Reading is allowed, but mutating actions require an active subscription. |
403 | The token lacks a required scope. |
404 | The resource does not exist or is not visible to this token. |
Response body (200)
| Field | Type | Description |
|---|---|---|
endpoint | object | Configured outbound webhook destination. |
endpoint.id | string (uuid) | Webhook endpoint id. |
endpoint.url | string (uri) | The HTTPS address events are delivered to. |
endpoint.description | string or null | Your note about what the endpoint is for. |
endpoint.events | array of "user.created" | "user.updated" | "user.deleted" | "user.status_changed" | "proxy.assigned" | "proxy.unassigned" | "proxy.rotated" | "ping" | The event types the endpoint receives. |
endpoint.is_active | boolean | Whether events are delivered to the endpoint. |
endpoint.secret | string | HMAC-SHA256 signing secret. Returned only once upon endpoint creation. |
endpoint.created_at | string | ISO 8601 timestamp. |
endpoint.updated_at | string | ISO 8601 timestamp. |
{
"endpoint": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"url": "https://example.com/webhooks/falconproxy",
"description": "string",
"events": [
"user.created"
],
"is_active": true,
"secret": "string",
"created_at": "2026-01-15T12:00:00Z",
"updated_at": "2026-01-15T12:00:00Z"
}
}Example request
curl -X PATCH "https://falconproxy.com/api/v1/webhooks/3fa85f64-5717-4562-b3fc-2c963f66afa6" \
-H "Authorization: Bearer $FALCONPROXY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com/webhooks/falconproxy",
"description": "string",
"events": [
"user.created"
],
"is_active": true,
"metadata": {}
}'DELETE/webhooks/{id}
Delete webhook endpoint
Deletes a webhook endpoint.
Requires the webhooks:manage scope and an active subscription.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string (uuid) | Webhook endpoint UUID. |
Responses
| Status | Meaning |
|---|---|
200 | Webhook endpoint deleted. |
401 | Missing, invalid, expired, or revoked API token. |
402 | The subscription is inactive. Reading is allowed, but mutating actions require an active subscription. |
403 | The token lacks a required scope. |
404 | The resource does not exist or is not visible to this token. |
Response body (200)
| Field | Type | Description |
|---|---|---|
success | boolean | True when the endpoint was deleted. |
deleted | string | Id of the endpoint that was deleted. |
{
"success": true,
"deleted": "string"
}Example request
curl -X DELETE "https://falconproxy.com/api/v1/webhooks/3fa85f64-5717-4562-b3fc-2c963f66afa6" \
-H "Authorization: Bearer $FALCONPROXY_API_KEY"POST/webhooks/{id}/test
Test webhook endpoint
Dispatches a test ping event to the webhook endpoint.
Requires the webhooks:manage scope and an active subscription.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string (uuid) | Webhook endpoint UUID. |
Responses
| Status | Meaning |
|---|---|
200 | Test delivery result. |
401 | Missing, invalid, expired, or revoked API token. |
402 | The subscription is inactive. Reading is allowed, but mutating actions require an active subscription. |
403 | The token lacks a required scope. |
404 | The resource does not exist or is not visible to this token. |
Response body (200)
| Field | Type | Description |
|---|---|---|
success | boolean | True when the test event was delivered. |
event_id | string (uuid) | Id of the ping event that was sent. |
status_code | number or null | The HTTP status your endpoint answered with. Null when it did not answer. |
error | string or null | What went wrong, if the delivery failed. |
{
"success": true,
"event_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"status_code": 0,
"error": "string"
}Example request
curl -X POST "https://falconproxy.com/api/v1/webhooks/3fa85f64-5717-4562-b3fc-2c963f66afa6/test" \
-H "Authorization: Bearer $FALCONPROXY_API_KEY"