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.

MethodProcedure
Bearer Token AuthenticationInclude the header Authorization: Bearer $API_KEY, replacing $API_KEY with your personal key
Basic AuthenticationSet 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

ParameterTypeDescription
namestringName of the new connection
source.namestringName of the source to create
destination.namestringName of the destination to create
destination.config.urlstringHTTP endpoint of the destination
destination.config.pathstringPath for the CLI destination

Only one of url or path 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.

MethodProcedure
Bearer Token AuthenticationInclude the header Authorization: Bearer $API_KEY, replacing $API_KEY with your project key
Basic AuthenticationSet 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.

ParameterDefaultDescription
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")
limit100The making amount of results returned per query (max: 250)
nextundefinedThe ID to provide in the query to get the next set of results
prevundefinedThe 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.

ParameterTypeDescription
handlebooleanError was handled by the API and did not resolve in an uncaught exception
statusintegerHTTP status code for the error
messagestringAny message associated with the error
dataobjectAny 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

OperatorSupported TypesDescription
gtedate numberGreater than or equal to
gtdate numberGreater than
ltedate numberLesser than or equal to
ltdate numberLesser than
anydate number stringNot null
containsstringContains

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 to WEBHOOK and has no required config property.
  • The custom_response, allowed_http_methods properties have been moved to the Source to the config object for the supported type.
  • The verification has been moved to the config object and the verification.type property is now config.auth_type and the verification.config property is just config.auth.

Destination

  • The Destination type property defaults to HTTP and requires a config.url property.
  • The Destination properties url, rate_limit, rate_limit_period, disabled_path_forwarding and http_method have been moved to the config object for the supported type.
  • The Destination cli_path property has been renamed to path and has been moved to the config object when type is CLI.
  • When type is CLI the rate_limit and rate_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 of SUCCESFUL or FAILED. This is true regardless of API version.
  • The /events/:id/retry will always return null for the attempt 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 to disabled_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 as DISABLED
  • Rejection cause SOURCE_ARCHIVED has been renamed as SOURCE_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 as username 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 as HMAC, github is renamed as GITHUB 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 and resolved_rules array from Connections.
  • Removed all /rulesets endpoints
  • Removed ruleset and ruleset_id property when creating or updating a Connection

Replacing integrations by Source "verification"

  • Add the verification property to the Source model
  • Add the verification input when creating or updating a Source
  • Remove the integration and integration_id property from Source
  • Removed all /integrations

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
Required

ID of the connection

name

string
Required
Nullable

Unique name of the connection for this source

full_name

string
Required
Nullable

Full name of the connection concatenated from source, connection and desitnation name

description

string
Required
Nullable

Description of the connection

team_id

string
Required

ID of the project

destination

Destination
Required

Associated Destination object

source

Source
Required

Associated Source object

rules

Rule[]
Required
Nullable

Array of rules configured on the connection

disabled_at

string
Required
Nullable
Date

Date the connection was disabled

paused_at

string
Required
Nullable
Date

Date the connection was paused

updated_at

string
Required
Date

Date the connection was last updated

created_at

string
Required
Date

Date the connection was created

Retrieve all connections

This endpoint lists all connections, or a subset of connections.

Query Parameters

id

stringstring[]

Filter by connection IDs

name

stringOperatorsstring[]
Nullable

Filter by connection name

destination_id

stringstring[]

Filter by associated destination IDs

source_id

stringstring[]

Filter by associated source IDs

disabled

boolean

Include disabled resources in the response

disabled_at

stringOperators
Nullable

Date the connection was disabled

full_name

string
Pattern: ^[a-z0-9-_>\s]+$
Max length: 155

Fuzzy match the concatenated source and connection name. The source name and connection name must be separated by " -> "

paused_at

stringOperators
Nullable

Date the connection was paused

order_by

stringstring[]

Sort key(s)

dir

stringstring[]

Sort direction(s)

limit

integer
Max: 255

Result set size

next

string
Max length: 255

The ID to provide in the query to get the next set of results

prev

string
Max length: 255

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
Required

Connection ID

Create a connection

This endpoint creates a connection.

Body Parameters

name

string
Nullable
Pattern: ^[A-z0-9-_]+$
Max length: 155

A unique name of the connection for the source

description

string
Nullable
Max length: 500

Description for the connection

destination_id

string
Nullable
Max length: 255

ID of a destination to bind to the connection

source_id

string
Nullable
Max length: 255

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.

Create connection with a new source and destination JSON
{
  "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.

Create a connection reusing a source & destination JSON
{
  "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
Nullable
Pattern: ^[A-z0-9-_]+$
Max length: 155

A unique name of the connection for the source

description

string
Nullable
Max length: 500

Description for the connection

destination_id

string
Nullable
Max length: 255

ID of a destination to bind to the connection

source_id

string
Nullable
Max length: 255

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
Required

Connection ID

Body Parameters

name

string
Nullable
Pattern: ^[A-z0-9-_]+$
Max length: 155

description

string
Nullable
Max length: 500

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
Required

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
Required

Connection ID

The parameter paused_at is set to null.

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
Required

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.