Webhooks API Documentation

Overview

This collection contains configured webhooks. Each webhook instructs Capitan to make a POST request to a configured URL whenever a particular type of event occurs.

Fields

Name Type Restrictions Required? Description
id integer Automatic Automatic The unique identifier of the webhook.
event_type string Must be one of the supported event type options. Yes Which type of event will be sent via the webhook.
webhook string Must be a valid URL, including the protocol (http, https). Yes The URL which will receive the webhook.
secret string Must be no more than 255 characters in length. No A secret which will be included in all events published via this webhook. Can be used to verify that the events are authentic.
created_at string (ISO-8601 datetime) Automatic Automatic When the webhook was created.
updated_at string (ISO-8601 datetime) Automatic Automatic When the webhook was last updated.

Event Type Options

Name Syntax Description
Check In check_in This event occurs when a customer checks into a location within the organization.

Event Object

Each event POSTed via the webhook is a JSON object with the following fields:

Name Type Description
webhook_event_id integer The unique ID of the webhook event.
event_type string (one of the event type options) The type of event.
secret string The configured secret for the webhook.
event JSON object The event. Its fields depend on the event type; see below for each event type's list of fields.

Check-In Object

Check-in objects contain the following fields:

Name Type Description
webhook_event_id integer The unique ID of the check-in.
customer_id integer The unique ID of the customer who checked in.
first_name string The first name of the customer who checked in.
last_name string The last name of the customer who checked in.
birthday string (ISO-8601 date) The birthday of the customer who checked in.
email string or null The email of the customer who checked in (or null if they do not have one).
check_in_datetime string (ISO-8601 datetime) When the check-in occurred.
entry_method string (one of the entry method values) The type of entry method used for the check-in.
entry_method_description string A string describing the entry method (such as a membership or entry pass name).
location_id integer The unique ID of the location where the check-in occurred.
location_name integer The name of the location where the check-in occurred.
check_in_count integer How many total check-ins the customer had at the time (including this check-in).

Entry Method Values

Name Syntax
Membership MEM
Entry Pass ENT
Event Reservation EVE
Guest Pass GUE
Free Entry FRE
Migrated MIG

Operations

List

Request
GET /api/webhooks/

Response
200 OK
{
    "count": 17,
    "next": "https://api.hellocapitan.com/api/webhooks/?page=2",
    "previous": null,
    "results": [
        {
            "id": 35,
            "event_type": "check_in",
            "webhook_url": "http://example.com/webhook",
            ...
        },
        ...
    ]
}

Read

Request
GET /api/webhooks/35/

Response
200 OK
{
    "id": 35,
    "event_type": "check_in",
    "webhook_url": "http://example.com/webhook",
    ...
}

Create

Request
POST /api/webhooks/
{
    "event_type": "check_in",
    "webhook_url": "http://example.com/webhook2",
    "secret": "12345"
}

Response
201 Created
{
    "id": 53,
    "event_type": "check_in",
    "webhook_url": "http://example.com/webhook2",
    "secret": "12345",
    ...
}

Update

Request
PATCH /api/webhooks/53/
{
    "webhook_url": "http://example.com/webhook3"
}

Response
200 OK
{
    "id": 53,
    "event_type": "check_in",
    "webhook_url": "http://example.com/webhook3",
    "secret": "12345",
    ...
}

Example Webhook Object

Request
POST http://example.com/webhook3
{
    "webhook_event_id": 351,
    "event_type": "chek_in",
    "secret": "12345",
    "event": {
      "id": 114,
      "customer_id": 37512,
      "customer_first_name": "Thomas",
      "customer_last_name": "Anderson",
      "customer_birthday": "1971-09-13",
      "customer_email": null,
      "check_in_datetime": "2025-06-19T20:09:17.095284-04:00",
      "entry_method": "FRE",
      "entry_method_description": "Free Entry, created by Agent Smith",
      "location_id": 14,
      "location_name": "The Matrix",
      "check_in_count": 2
    }
}