API & Webhooks
Build on MASK with a powerful API.
Every feature in the dashboard is available via REST API. Scoped API keys, rate limiting, and real-time webhooks for seamless integration.
Create a short link
curl -X POST https://api.mask.pk/v1/links \
-H "Authorization: Bearer mk_live_..." \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com/long-page",
"slug": "launch",
"domain": "go.yourbrand.com"
}'API Features
Everything you need to integrate.
Scoped API Keys
Create multiple API keys with different scopes. Rotate keys without downtime. Revoke instantly.
Rate Limiting
Generous rate limits that scale with your plan. Clear headers tell you exactly where you stand.
Webhook Events
Real-time notifications for link.created, link.clicked, page.viewed, and more. HMAC-signed payloads.
RESTful Design
Predictable resource-oriented URLs, standard HTTP methods, and consistent JSON responses.
Error Handling
Structured error responses with codes, messages, and suggestions. Never guess what went wrong.
Idempotent Requests
Safe to retry. Idempotency keys ensure the same request never creates duplicate resources.
Webhook events
link.createdA new short link was createdlink.clickedA short link was clickedlink.updatedA link was modifiedlink.deletedA link was deletedqr.scannedA QR code was scannedpage.viewedA bio page was vieweddomain.verifiedA custom domain was verified