API Reference
Brevix REST API — create, manage and get stats for short links.
All
/api/v1 endpoints require an
X-Api-Key: bvx_… header.
Generate a key from your Dashboard → API Key.
POST
/api/v1/links
Create a short link.
| Field | Type | Required |
|---|---|---|
| destination | string | Yes |
| alias | string | No |
| expires_at | ISO 8601 | No |
| max_clicks | integer | No |
| link_password | string | No |
Example
curl -X POST https://brevix.in/api/v1/links \
-H "X-Api-Key: bvx_your_key" \
-H "Content-Type: application/json" \
-d '{"destination":"https://example.com","alias":"mybrand"}'
{
"link": { "id": 1, "code": "mybrand", ... },
"short_url": "https://brevix.in/mybrand"
}
GET
/api/v1/links
List your short links.
| Query param | Default |
|---|---|
| page | 1 |
| limit | 20 (max 100) |
Example
curl https://brevix.in/api/v1/links?page=1&limit=20 \
-H "X-Api-Key: bvx_your_key"
PATCH
/api/v1/links/:code
Update a link's destination, expiry or click limit.
| Field | Type |
|---|---|
| destination | string (required) |
| expires_at | ISO 8601 / null |
| max_clicks | integer / null |
Example
curl -X PATCH https://brevix.in/api/v1/links/mybrand \
-H "X-Api-Key: bvx_your_key" \
-H "Content-Type: application/json" \
-d '{"destination":"https://new-target.com"}'
DELETE
/api/v1/links/:code
Delete a short link permanently.
Example
curl -X DELETE https://brevix.in/api/v1/links/mybrand \
-H "X-Api-Key: bvx_your_key"
GET
/api/v1/links/:code/stats
Full click breakdown: daily, by country, device, browser, and top referrers.
Example
curl https://brevix.in/api/v1/links/mybrand/stats \
-H "X-Api-Key: bvx_your_key"
GET
/api/v1/links/:code/qr
Get QR code as PNG or SVG.
| Query param | Default |
|---|---|
| format | png |
| fg | 000000 |
| bg | ffffff |
| size | 300 (100–1000) |
Example
curl "https://brevix.in/api/v1/links/mybrand/qr?format=svg&size=400" \
-H "X-Api-Key: bvx_your_key" \
-o mybrand.svg
POST
/api/v1/keys
Generate or rotate your API key. Requires cookie auth (call from the dashboard or a browser session).
Returns {"api_key":"bvx_…"}. The raw key is shown once — the server stores a SHA-256 hash.
Rate limits
- Global: 300 req/min per IP
- Login / Sign-up: 20 req/15 min per IP
- API: 60 req/min per IP
- Free plan: configurable link/month and API call/day limits