Getting Started
The Hookdeck REST API allows you to set up connections, retrieve events, and perform actions programmatically.
Get an API key
You'll need to include an API key in every API request. If you do not yet have a Hookdeck account, please sign up for a free account. Your API key is located in your project settings.
To include your API key in requests, use either Bearer Token Authentication or Basic Authentication.
Method | Procedure |
---|---|
Bearer Token Authentication | Include the header Authorization: Bearer $API_KEY , replacing $API_KEY with your personal key |
Basic Authentication | Set the username as your API key, and supply an empty password |
Create your first connection
Creating your first connection will allow you to start routing events with Hookdeck.
The API only supports
application/json
for both input and output. Header is optional.
Required parameters
Parameter | Type | Description |
---|---|---|
name | string | Name of the new connection |
source.name | string | Name of the source to create |
destination.name | string | Name of the destination to create |
destination.config.url | string | HTTP endpoint of the destination |
destination.config.path | string | Path for the CLI destination |
Only one of
url
orpath
is required.
Response
The response body returns objects for the associated source, destination, and ruleset.
These resources can be reused in future requests by passing the destination_id
or source_id
instead of an object.
Verify your first connection
Verifying the connection lets you know Hookdeck is properly ingesting and processing events from your source.
Copy the unique Hookdeck URL and paste it into your API provider's HTTP URL field. Test the connection by triggering a request on your source. As soon Hookdeck receives your first request, it'll appear in your dashboard.
The connection URL is a property of the source object.
Congratulations! Your request & events can now be viewed, inspected, filtered, sorted, retried, and more using Hookdeck.
Authentication
Your API key is located in your project settings, and must be included in every API request. Use either Bearer Token Authentication or Basic Authentication.
Method | Procedure |
---|---|
Bearer Token Authentication | Include the header Authorization: Bearer $API_KEY , replacing $API_KEY with your project key |
Basic Authentication | Set the username as your API key, and supply an empty password |
Paging
All GET
endpoints that retrieve a list of resources are paged using cursor (aka keyset) pagination, which resides in the response body's pagination
object.
Parameter | Default | Description |
---|---|---|
order_by | "created_at" | The sortable key to use (options varies base on the resource ) |
dir | "desc" | The direction to sort it ("asc" or "desc" ) |
limit | 100 | The making amount of results returned per query (max: 250 ) |
next | undefined | The ID to provide in the query to get the next set of results |
prev | undefined | The ID to provide in the query to get the previous set of results |
Unless you have specified an order_by
or dir
, you can omit it from the next or previous set query. You only have to carry them over if you are not using the resource default.
Errors
Hookdeck uses standard HTTP response codes to indicate the success or failure of an API request.
Parameter | Type | Description |
---|---|---|
handle | boolean | Error was handled by the API and did not resolve in an uncaught exception |
status | integer | HTTP status code for the error |
message | string | Any message associated with the error |
data | object | Any data related to the error, useful for diagnostics |
In general, codes in the 2xx range indicate success, codes in the 4xx range indicate an error that resulted from the provided information (e.g. a required parameter was missing), and codes in the 5xx range indicate an error. See a more complete list of error codes here.
Rate Limits
The Hookdeck API has a rate limit of 240 request per minute, per API key. Contact us if you need your rate limit increased.
Query Formatting
Arrays
Arrays in query parameters are indicated by a []
appended to their type, like string[]
.
For example: ?item[1]=hello&item[2]=world
becomes ["hello", "world"]
Date
Dates are expected in ISO format.
For example: 2021-01-21T20:16:28Z
or 2021-01-21
JSON
Some query parameters take JSON as input. The JSON should be stringified and URL encoded.
For example: ?body=%7B%0A%20%20"hello"%3A%20"world"%0A%7D
becomes { "hello": "world" }
Operators
Most GET
endpoints that retrieve a list of resources support operators as part of the request query.
For example: ?number[gte]=1&number[lte]=10
Operator | Supported Types | Description |
---|---|---|
gte | date number | Greater than or equal to |
gt | date number | Greater than |
lte | date number | Lesser than or equal to |
lt | date number | Lesser than |
any | date number string | Not null |
contains | string | Contains |
Changelog
When backwards-incompatible changes are made to the API, a new, dated version is released. The latest version is 2025-01-01.
The API version can be set in the base path of any endpoint, such as https://api.hookdeck.com/2025-01-01/sources. Otherwise the API defaults to the oldest supported version.
The backwards-incompatible changes for each version are listed below. Backwards-compatible changes don’t need a new API version and do not appear in this list.
Dated versions remain supported for up to 1 year after the date of release. For instance 2023-07-01 will be officially supported until 2024-07-01.
2025-01-01
Source and Destination Types
Source and Destination Types are now available on the Source and Destination objects. This introduces the following changes:
- Added
type
property to the Source and Destination objects, which can be set when creating or updating them. - Added
config
property to contain all type-dependent configuration options, including authentication methods, custom responses, and HTTP method restrictions. See the source object for more details on each Type configuration.
Source
- The Source
type
property defaults toWEBHOOK
and has no requiredconfig
property. - The
custom_response
,allowed_http_methods
properties have been moved to the Source to theconfig
object for the supportedtype
. - The
verification
has been moved to theconfig
object and theverification.type
property is nowconfig.auth_type
and theverification.config
property is justconfig.auth
.
Destination
- The Destination
type
property defaults toHTTP
and requires aconfig.url
property. - The Destination properties
url
,rate_limit
,rate_limit_period
,disabled_path_forwarding
andhttp_method
have been moved to theconfig
object for the supportedtype
. - The Destination
cli_path
property has been renamed topath
and has been moved to theconfig
object whentype
isCLI
. - When
type
isCLI
therate_limit
andrate_limit_period
properties are not supported.
2024-09-01
Change to attempts
Attempts no longer store state and are created when the event is delivered rather then when the event is queued for delivery.
Because of the underlying data structure change, the behavior of the API has changed for some endpoint, regardless of versions. While those are not technically breaking changes, they are worth noting:
- The
/attempts
(see: Retrieve all attempts) endpoint now only returns attempts with status ofSUCCESFUL
orFAILED
. This is true regardless of API version. - The
/events/:id/retry
will always returnnull
for theattempt
property on the response. This is true regardless of API version.
The breaking changes for this version specifically are:
- The
/events/:id/retry
(see: Retry an event) endpoint previously returned{ event: Event, attempt: Attempt }
and now only returns the Event object in root of the response.
2024-03-01
Renamed archive to disable
On Source, Destination and Connection objects, archive
and unarchive
have been renamed as disabled
and enable
. This affects the following:
archived_at
has been renamed todisabled_at
/sources/:id/archive
have been renamed to/sources/:id/disable
(see Disable a source)/sources/:id/unarchive
have been renamed to/sources/:id/enable
(see Enable a source)/connections/:id/archive
have been renamed to/connections/:id/disable
(see Disable a connection)/connections/:id/unarchive
have been renamed to/connections/:id/enable
(see Enable a connection)/destinations/:id/archive
have been renamed to/destinations/:id/disable
(see Disable a destination)/destinations/:id/unarchive
have been renamed to/destinations/:id/enable
(see Enable a destination)- Ignored event cause
ARCHIVED
has been renamed asDISABLED
- Rejection cause
SOURCE_ARCHIVED
has been renamed asSOURCE_DISABLED
Standardise source verification configs
To use consistent casing and keys between source authentication and destination authentication, we have made the following changes:
- On the Source's verification, rename
user
asusername
in the following config types:- Basic Auth
- Postmark
- Pipedrive
- All config types have been uppercased on the Source's verification. For instance,
hmac
is renamed asHMAC
,github
is renamed asGITHUB
and so on
2023-07-01 [DEPRECATED]
Removing rulesets
Removes support for Rulesets and is replaced by setting rules directly on connections.
- Removed
rulesets
object andresolved_rules
array from Connections. - Removed all
/rulesets
endpoints - Removed
ruleset
andruleset_id
property when creating or updating a Connection
Replacing integrations by Source "verification"
OpenAPI Schema
Our OpenAPI schema is available at https://api.hookdeck.com/2025-01-01/openapi.
OpenAPI schemas can be used to generate SDKs for your language of choice and work with various tools made for OpenAPI definitions such as importing into Postman.
Connections
A connection lets you route events from a source to a destination.
Connections were historically called "webhooks". The endpoint root path
/webhooks
has been moved to/connections
. The former will remain functional, but consider migrating to/connections
.
Connection object
id
string
ID of the connection
name
string
Unique name of the connection for this source
full_name
string
Full name of the connection concatenated from source, connection and desitnation name
description
string
Description of the connection
team_id
string
ID of the project
destination
Destination
Associated Destination object
source
Source
Associated Source object
rules
Rule[]
Array of rules configured on the connection
disabled_at
string
Date the connection was disabled
paused_at
string
Date the connection was paused
updated_at
string
Date the connection was last updated
created_at
string
Date the connection was created
Retrieve all connections
This endpoint lists all connections, or a subset of connections.
Query Parameters
id
string
string[]
Filter by connection IDs
name
string
Operators
string[]
Filter by connection name
destination_id
string
string[]
Filter by associated destination IDs
source_id
string
string[]
Filter by associated source IDs
disabled
boolean
Include disabled resources in the response
disabled_at
string
Operators
Date the connection was disabled
full_name
string
Fuzzy match the concatenated source and connection name. The source name and connection name must be separated by " -> "
paused_at
string
Operators
Date the connection was paused
order_by
string
string[]
Sort key(s)
dir
string
string[]
Sort direction(s)
limit
integer
Result set size
next
string
The ID to provide in the query to get the next set of results
prev
string
The ID to provide in the query to get the previous set of results
Retrieve a connection
This endpoint retrieves a specific connection.
URL Parameters
id
string
Connection ID
Create a connection
This endpoint creates a connection.
Body Parameters
name
string
A unique name of the connection for the source
description
string
Description for the connection
destination_id
string
ID of a destination to bind to the connection
source_id
string
ID of a source to bind to the connection
destination
object
Destination input object
source
object
Source input object
rules
Rule[]
Create a connection with new resources
You can create a connection's underlying source, destination, and ruleset with a single call by declaring an object for any of those resources.
{
"name": "github-some-api",
"source": {
"name": "github"
},
"destination": {
"name": "some-api",
"url": "https://example.com/webhook"
}
}
Create a connection with existing resources
You can reuse a source, destination, or ruleset by referencing their ID.
{
"source_id": "src_xxx",
"destination_id": "des_xxx"
}
Create/Update a connection
This endpoint creates a connection.
This endpoint creates a connection, or updates an existing connection by name.
A connection's source and destination cannot be updated.
Body Parameters
name
string
A unique name of the connection for the source
description
string
Description for the connection
destination_id
string
ID of a destination to bind to the connection
source_id
string
ID of a source to bind to the connection
destination
object
Destination input object
source
object
Source input object
rules
Rule[]
Create/Update a connection with new resources
You can create a connection's underlying source, destination, and ruleset with a single call by declaring an object for any of those resources.
Create/Update a connection with existing resources
You can reuse a source, destination, or ruleset by referencing their ID.
Update a connection
This endpoint updates a connection.
URL Parameters
id
string
Connection ID
Body Parameters
name
string
description
string
Description for the connection
rules
Rule[]
Pause a connection
This endpoint pauses a connection.
A paused connection will still receive events, but those events will be marked with a status of HOLD
and will be delivered only once the connection is unpaused.
URL Parameters
id
string
Connection ID
The parameter
paused_at
is set to the current timestamp.
Unpause a connection
This endpoint unpauses a connection.
Any event with a status of HOLD
will be attempted (destination delivery rate will be respected). This operation is asynchronous, so it may take some time for all events to be QUEUED
for delivery.
URL Parameters
id
string
Connection ID
The parameter
paused_at
is set tonull
.
Disable a connection
This endpoint disables a connection. Notice that a connection is enabled by default when created.
An disabled connection will no longer receive or deliver any events.
URL Parameters
id
string
Connection ID
The parameter
disabled_at
is set to the current timestamp.
Enable a connection
This endpoint enables a connection that has been previously disabled.
The associated source and destination will also be enabled if they were previously disabled.