Skip to content

Create a webhook subscription

Request

Creates a new webhook subscription for the merchant

Security
api_key
Bodyapplication/jsonrequired
topicstringrequired

The subscription topic (will be used as sort key).

Enum:"customer.joined.paid_tier""customer.joined.free_tier""customer.joined.free_trial""customer.joined.lifetime_tier""customer.changed_tier""customer.ordered""customer.payment_succeeded""customer.payment_failed""customer_billing.attempt.failed""customer.credits.updated"
Example:"customer.joined.paid_tier"
callbackUrlstringrequired

The callback URL that will be called when one of the webhooks is triggered.

namestringrequired

The subscription name.

curl -i -X POST \
  https://public.inveterateapi.com/v2.0/admin/webhook-subscriptions \
  -H 'Content-Type: application/json' \
  -H 'X-Inveterate-Api-Key: YOUR_API_KEY_HERE' \
  -d '{
    "topic": "customer.joined.paid_tier",
    "callbackUrl": "string",
    "name": "string"
  }'

Responses

Returned upon successful request made to our backend. Requests that return this code may take a small amount of time after successful API return to fully update.

Bodyapplication/json
messagestringrequired

The message associated with the response. Generally, the message only confirms the requested action. In the case of errors, the message will give insight into the source of the error.

dataobjectrequired

The data associated with the response. Data is only returned from errors if the error originates from our backend to give further insight into the nature of the error.

Response
{ "message": "Request sent successfully", "data": { "id": 1, "name": "John Doe" } }