Commet
  • Precios
Iniciar SesiónRegistrarse
Create webhook endpoint POSTDelete webhook endpoint DELETEList webhook endpoints GETTest webhook endpoint POST
DocumentaciónRecursosConstruir con AIAPI ReferenceWebhooks

Create webhook endpoint

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

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.

POST
/webhooks

Authorization

ApiKeyAuth
x-api-key<token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

url*string
Formaturi
events*array<>
Items1 <= items
description?string

Response Body

application/json

curl -X POST "https://commet.co/api/v1/webhooks" \  -H "Content-Type: application/json" \  -d '{    "url": "http://example.com",    "events": [      "subscription.created"    ]  }'
application/json

application/json

Destination URL (HTTPS)

Webhook events to subscribe to

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

{
  "success": true,
  "data": {
    "object": "webhook",
    "livemode": true,
    "id": "string",
    "url": "http://example.com",
    "events": [
      "string"
    ],
    "description": "string",
    "isActive": true,



{
  "success": false,
  "error": {
    "type": "validation_error",
    "code": "string",
    "message": "string",
    "doc_url": "string",
    "param": "string"
  }
}
{
  "success": false,
  "error": {
    "type": "validation_error",
    "code": "string",
    "message": "string",
    "doc_url": "string",
    "param": "string"
  }
}
"secretKey": "string",
"createdAt": "2019-08-24T14:15:22Z"
}
}