assets.dev docs

/webhooks

/api/v1/webhooks - GET, POST

GET/api/v1/webhooks

Response Body

application/json

curl -X GET "https://example.com/api/v1/webhooks"
{  "webhooks": [    {      "id": "4a01a492-f21b-4cad-9836-910ec06f6e26",      "url": "http://example.com",      "events": [        "render.completed"      ],      "active": true,      "createdAt": "2019-08-24T14:15:22Z"    }  ]}
POST/api/v1/webhooks

Request Body

application/json

Webhook endpoint

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/api/v1/webhooks" \  -H "Content-Type: application/json" \  -d '{    "url": "http://example.com",    "events": [      "render.completed"    ]  }'
{  "webhooks": [    {      "id": "4a01a492-f21b-4cad-9836-910ec06f6e26",      "url": "http://example.com",      "events": [        "render.completed"      ],      "active": true,      "createdAt": "2019-08-24T14:15:22Z"    }  ]}