تخطَّ إلى المحتوى
توثيق المطورين

Create a webhook endpoint

POST /v1/webhooks · Authorization: Bearer

Create a webhook endpoint

POST /v1/webhooks · Authorization: Bearer

POST/v1/webhooks

Create 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

FieldTypeRequiredNotes
subscribed_eventsstring[]yesEvent types to deliver. An empty list is rejected rather than silently defaulting to everything.<= 10 items
urlstringyesHTTPS 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"
}
Minimal valid body

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

FieldTypeRequiredNotes
created_atstring (date-time)yesdate-time
environmentstringyes
idstring (uuid)yesuuid
signing_secretstring | nullno
statusstringyes
subscribed_eventsstring[]yes
updated_atstring (date-time)yesdate-time
urlstringyes

Errors

StatusMeaning
401Authentication failed
403Required scope is missing
404Resource not found or is not visible to this tenant
409Conflict or idempotency error
422Validation Error
503Public 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.