Commet
  • Precios
Iniciar SesiónRegistrarse
Create webhook endpoint POSTDelete webhook endpoint DELETEGet webhook endpoint GETList webhook endpoints GETTest webhook endpoint POSTUpdate webhook endpoint PUT
DocumentaciónRecursosConstruir con AIAPI ReferenceWebhooks

Create webhook endpoint

Create a new webhook endpoint. The response includes the signing secret which is only returned once.

POST
/webhooks

Create a new webhook endpoint. The response includes the signing secret which is only returned once.

Authorization

ApiKeyAuth
x-api-key<token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

url*string
events*array<>
description?string
apiVersion?string

Response Body

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",    "events": [      "subscription.created"    ]  }'
{  "success": true,  "data": {    "id": "string",    "url": "string",    "events": [      "string"    ],    "description": "string",    "isActive": true,    "apiVersion": "string",    "createdAt": "2019-08-24T14:15:22Z",    "secretKey": "string",    "object": "webhook",    "livemode": true  }}
{  "success": false,  "error": {    "type": "string",    "code": "string",    "message": "string",    "param": "string",    "details": null,    "doc_url": "string"  }}
{  "success": false,  "error": {    "type": "string",    "code": "string",    "message": "string",    "param": "string",    "details": null,    "doc_url": "string"  }}
{  "success": false,  "error": {    "type": "string",    "code": "string",    "message": "string",    "param": "string",    "details": null,    "doc_url": "string"  }}
{  "success": false,  "error": {    "type": "string",    "code": "string",    "message": "string",    "param": "string",    "details": null,    "doc_url": "string"  }}

Track usage event POST

Track a usage event for a metered feature. Deducts from balance/credits if applicable.

Delete webhook endpoint DELETE

Permanently delete a webhook endpoint.