Short URLs
These events are emitted by the Notifications API (btrz-api-notifications) when a short URL is created. The short-urls resource exposes POST /short-urls (create) and GET /u/:shortId (resolve redirect); only the create action emits a webhook event.
Events
| Action |
Event name |
Endpoint |
| Create a short URL |
short_urls.created |
POST /short-urls |
Payload example for created
{
"attemptId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"created": 1709999999,
"data": {
"shortUrl": "https://btrz.ca/u/V1StGXR8_Z5j",
"shortId": "V1StGXR8_Z5j",
"fullUrl": "https://example.com/long/path?query=1",
"createdAt": {
"offset": 0,
"value": "2024-03-09T12:00:00.000Z"
}
},
"event": "short_urls.created",
"id": "webhook-delivery-uuid",
"livemode": true
}
Field descriptions — data (short_urls.created)
| Field |
Type |
Description |
| shortUrl |
string |
The short URL (e.g. https://btrz.ca/u/>). |
| shortId |
string |
Unique short identifier used in the short URL path. |
| fullUrl |
string |
The original full URL that the short URL redirects to. |
| createdAt |
object |
BzDate: date the short URL was created. Contains value (ISO 8601 string) and offset (minutes from UTC). |