API referenceWebhooks

Register a webhook endpoint

Add somewhere to send events. **The secret is shown once.**

POST
/api/b/v1/webhooks

Add somewhere to send events. The secret is shown once.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Where we send events, and which ones. IN-302.

Response Body

application/json

application/json

curl -X POST "https://example.com/api/b/v1/webhooks" \  -H "Content-Type: application/json" \  -d '{    "url": "https://api.example.com/hooks/inversepay"  }'
{  "endpoint": {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "url": "string",    "description": "string",    "event_types": [      "string"    ],    "is_active": true,    "failure_streak": 0,    "last_delivered_at": "2019-08-24T14:15:22Z",    "created_at": "2019-08-24T14:15:22Z"  },  "secret": "string",  "signature_header": "X-InversePay-Signature",  "verification_hint": "Sign the raw request body, not a re-serialised copy: two JSON documents can mean the same thing and differ byte for byte."}