Skip to main content
POST
/
v1
/
webhooks
Create Webhook Endpoint
curl --request POST \
  --url https://karibu.briq.tz/v1/webhooks/ \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "app_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "service_type": "<string>",
  "url": "<string>"
}
'
{
  "webhook_id": "<string>",
  "app_id": "<string>",
  "service_type": "<string>",
  "url": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "secret_token": "<string>"
}

Authorizations

X-API-Key
string
header
required

Headers

X-API-Key
string
required

Body

application/json

Schema for creating a new webhook.

app_id
string<uuid>
required

The ID of the developer app this webhook belongs to

Example:

"550e8400-e29b-41d4-a716-446655440000"

service_type
string
required

Type of service for this webhook (e.g., 'sms', 'voice', 'otp', 'whatsapp')

Pattern: ^(sms|voice|otp|whatsapp|email)$
Example:

"sms"

url
string<uri>
required

The URL where webhook events will be sent

Required string length: 1 - 2083
Example:

"https://example.com/webhook"

secret_token
string | null

Secret token for signing outgoing webhook requests

Required string length: 16 - 255
Example:

"my_secret_token_123"

Response

Successful Response

Schema for webhook response.

webhook_id
string
required

Unique identifier for the webhook

app_id
string
required

The ID of the developer app

service_type
string
required

Type of service

url
string
required

The webhook URL

created_at
string<date-time>
required

When the webhook was created

updated_at
string<date-time>
required

When the webhook was last updated

secret_token
string | null

Secret token (masked for security)