Skip to main content
POST
Create a subscription
Create a subscription that routes a specific event type to a connection for delivery. A subscription links an event type (e.g., parcels.event.created) to a connection endpoint. When the event occurs, the event payload is delivered to the connection’s configured endpoint.
Subscriptions are active by default. Set is_active to false to create a paused subscription.

Authorizations

Authorization
string
header
required

Basic Authentication using API key and secrets is currently the main authentication mechanism.

Body

application/json

Request body for creating a new subscription.

connection_id
integer<int64>
required

The identifier of the connection to deliver events to.

Required range: x >= 1
event_type
enum<string>
required

The type of event to subscribe to.

Available options:
parcels.event.created
is_active
boolean
default:true

Whether the subscription should be active immediately. Defaults to true.

Response

Created

Subscription created

data
Subscription · object

A subscription routes a specific event type to a connection for delivery.