Create a webhook endpoint
POST /v1/webhooks · Authorization: Bearer
POST
/v1/webhooksCreate a webhook endpoint
Creates an active signed endpoint. Requires webhooks:manage; the raw signing_secret is returned only in this response.
- Credential
Authorization: Bearer- Plane
https://api.bardiyamap.com- Operation id
createWebhook
The signing secret is returned once, on creation. Store it before the response leaves your server.
Parameters
This operation takes no parameters.
Request body
application/json · required
| Field | Type | Required | Notes |
|---|---|---|---|
subscribed_events | string[] | yes | Event types to deliver. An empty list is rejected rather than silently defaulting to everything.<= 10 items |
url | string | yes | HTTPS endpoint that receives deliveries. Plain HTTP and private address ranges are rejected.1 to 2048 chars |
json
{
"subscribed_events": [
"tracking.location"
],
"url": "https://example.com/bardiya/webhook"
}Request example
shell
curl -X POST "https://api.bardiyamap.com/v1/webhooks" \
-H "Authorization: Bearer $BARDIYA_TRACKING_KEY" \
-H "Content-Type: application/json" \
--data '{"subscribed_events":["tracking.location"],"url":"https://example.com/bardiya/webhook"}'Response 201 · WebhookResponse
| Field | Type | Required | Notes |
|---|---|---|---|
created_at | string (date-time) | yes | date-time |
environment | string | yes | |
id | string (uuid) | yes | uuid |
signing_secret | string | null | no | |
status | string | yes | |
subscribed_events | string[] | yes | |
updated_at | string (date-time) | yes | date-time |
url | string | yes |
Errors
| Status | Meaning |
|---|---|
401 | Authentication failed |
403 | Required scope is missing |
404 | Resource not found or is not visible to this tenant |
409 | Conflict or idempotency error |
422 | Validation Error |
503 | Public transport is temporarily unavailable |
Error bodies use the shared envelope documented in Errors: { "error": { "code", "message", "details", "request_id" } }.
POST /v1/webhooks is part of the Webhooks group. Values on this page are generated from contract version 1.1.0.
