Docs
Webhooks

Register a webhook

POST
/v1/webhooks

Authorization

BearerAuth
AuthorizationBearer <token>

API key (csk_live_…)

In: header

Request Body

application/json

url*string

HTTPS URL to receive webhook POSTs

Formaturi
Lengthlength <= 2048
events*array<>

Events to subscribe to

Items1 <= items

Response Body

application/json

application/json

application/json

curl -X POST "https://api.cospec.io/v1/webhooks" \  -H "Content-Type: application/json" \  -d '{    "url": "http://example.com",    "events": [      "run.completed"    ]  }'
{
  "id": "string",
  "url": "http://example.com",
  "events": [
    "run.completed"
  ],
  "createdAt": "2019-08-24T14:15:22Z"
}
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "instance": "string",
  "requestId": "string"
}
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "instance": "string",
  "requestId": "string"
}