Skip to main content
POST
Create subscriptions

Authorizations

Authorization
string
header
required

Bearer access token issued by Peerlogic.

Body

application/json
name
string
required

A customer-defined name for the subscription.

Required string length: 1 - 128
practice_id
string
required

The practice whose events produce deliveries.

Minimum string length: 1
subscription_type
enum<string>
required

Use webhook to deliver events to an HTTPS endpoint.

Available options:
webhook,
email,
sms,
noop
trigger
object
required

Condition that produces a delivery for this subscription.

description
string | null

A customer-defined description of the subscription.

Maximum string length: 255
destination
string | null

The HTTPS endpoint that receives webhook deliveries. Required when subscription_type is webhook.

Required string length: 1 - 255
extra
string | null

Optional customer-defined value for a webhook subscription.

Maximum string length: 255

Response

The subscription was created. Webhook responses include a secret_key that is not returned by later read or list requests.

secret_key
string | null
required
read-only

The Fernet key used to decrypt webhook request bodies. Returned only by this create response. Store it securely; it cannot be retrieved or changed later.

name
string
required

Customer-defined name used to identify the subscription.

Required string length: 1 - 128
practice_id
string
required

Practice whose activity is evaluated for this subscription.

Minimum string length: 1
subscription_type
enum<string>
required

Delivery channel used by the subscription. Customer webhook integrations use webhook.

Available options:
webhook,
email,
sms,
noop
trigger
object
required

Condition that produces a delivery for this subscription.

id
string
read-only

The unique subscription ID. Webhook deliveries include this value in X-Subscription-ID.

is_active
boolean
read-only

Whether the subscription can produce deliveries.

created_at
string<date-time>
read-only

Time when the subscription was created.

modified_at
string<date-time>
read-only

Time when the subscription was last changed.

system_message
string | null
read-only

A delivery or verification status that may require attention.

description
string | null

Customer-defined explanation of the workflow this subscription supports.

Maximum string length: 255
destination
string | null

Delivery destination. Webhook destinations must be HTTPS URLs.

Required string length: 1 - 255
extra
string | null

Optional customer-defined value available for webhook subscriptions.

Maximum string length: 255