Tunploy
APIReferenceWebhooks

Add a webhook

POST/webhooks

Needs the webhooks:write scope.

Authorization

apiKey
AuthorizationBearer <token>

An API key: tp_….

In: header

Header Parameters

Idempotency-Key?string

A retry with the same key within 24 hours gets the first reply back (with Idempotent-Replayed: true) instead of running again.

Lengthlength <= 255

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/webhooks" \  -H "Content-Type: application/json" \  -d '{    "url": "http://example.com"  }'
{  "id": 0,  "url": "http://example.com",  "events": [    "device.created"  ],  "description": "string",  "enabled": true,  "created_by": "string",  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z",  "secret": "whsec_…"}