Skip to content
Keptslot
Start free

Create an endpoint

POST
/v1/webhook-endpoints
curl --request POST \
--url https://api.keptslot.com/v1/webhook-endpoints \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "url": "https://example.com/hooks/keptslot", "events": [ "booking.created", "booking.cancelled" ] }'

This endpoint registers a URL to receive events.

CAUTION: The response carries secret, and it is the only response that ever does. Store it now. The stored form is sealed, so no later call can show it to you. If you lose it, use the rotate endpoint and store the new one.

Media type application/json
object
url
required
string
events
required
Array<string>
Example
{
"url": "https://example.com/hooks/keptslot",
"events": [
"booking.created",
"booking.cancelled"
]
}

The endpoint is created. This response carries secret.

Media type application/json
object
id
required
string format: uuid
url
required
string
events
required

The event types this endpoint receives.

Array<string>
active
required
boolean
consecutive_failures
required

How many deliveries failed in a row. It returns to 0 after a success.

integer
last_success_at
string | null format: date-time
last_failure_at
string | null format: date-time
created_at
required
string format: date-time
secret

The signing secret. It is present ONLY on the create response. The stored form is sealed and no read path can reveal it again. Store it now. If you lose it, rotate it.

string
Example generated
{
"id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"url": "example",
"events": [
"example"
],
"active": true,
"consecutive_failures": 1,
"last_success_at": "2026-04-15T12:00:00Z",
"last_failure_at": "2026-04-15T12:00:00Z",
"created_at": "2026-04-15T12:00:00Z",
"secret": "example"
}

The key is missing, malformed or revoked.

Media type application/json
object
error
required
object
type
required

A stable machine-readable code. Match on this.

string
message
required

A sentence for a person. Do not match on this.

string
param

The field that caused the refusal, if one field did.

string
dimension

The plan limit that refused the request. It is present only on a 402, and only for a secret key or an account key. See the errors guide.

string
used

The current count for that dimension. It is present only on a 402, and only for an account key. It is absent when the refusal has no count to report. Absent and zero are different answers.

integer format: int64
limit

The cap for that dimension. It is present only on a 402, and only for an account key. A cap of zero is a real value.

integer format: int64
Example generated
{
"error": {
"type": "example",
"message": "example",
"param": "example",
"dimension": "example",
"used": 1,
"limit": 1
}
}

The request body or the query is not valid.

Media type application/json
object
error
required
object
type
required

A stable machine-readable code. Match on this.

string
message
required

A sentence for a person. Do not match on this.

string
param

The field that caused the refusal, if one field did.

string
dimension

The plan limit that refused the request. It is present only on a 402, and only for a secret key or an account key. See the errors guide.

string
used

The current count for that dimension. It is present only on a 402, and only for an account key. It is absent when the refusal has no count to report. Absent and zero are different answers.

integer format: int64
limit

The cap for that dimension. It is present only on a 402, and only for an account key. A cap of zero is a real value.

integer format: int64
Example generated
{
"error": {
"type": "example",
"message": "example",
"param": "example",
"dimension": "example",
"used": 1,
"limit": 1
}
}