Webhooks

Create Endpoint

POST
/endpoints.json

Creates an endpoint and assigns a list of webhook subscriptions (events) to it. See the Webhooks Reference page for available events.

Authorization

BasicAuth
AuthorizationBasic <token>

The username is a Maxio Chargify API key. The password is x.

In: header

Request Body

application/json

Used to Create or Update Endpoint.

endpoint*

Used to Create or Update Endpoint.

Response Body

application/json

application/json

curl -X POST "https://example.com/endpoints.json" \  -H "Content-Type: application/json" \  -d '{    "endpoint": {      "url": "https://your.site/webhooks",      "webhook_subscriptions": [        "payment_success",        "payment_failure",        "invoice_pending"      ]    }  }'
{  "endpoint": {    "id": 1,    "url": "https://your.site/webhooks",    "site_id": 1,    "status": "enabled",    "webhook_subscriptions": [      "payment_success",      "payment_failure",      "invoice_pending"    ]  }}