Quickstart
Get up and running with the xQR API. By the end of this guide, you’ll have created your first short link programmatically.
Prerequisites
- An xQR Platform account on the Pro plan or higher (API access is not available on the Free plan)
- Your workspace at platform.xqr.co
Create an API Key
- Go to Settings → Developers in your xQR dashboard
- Click Create API Key
- Give it a name (e.g. “My first key”) and select scopes — choose
*for full access - Copy the key immediately — it’s shown only once
Your key looks like: xqr_pk_a1b2c3d4.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Make Your First Request
curl -X POST https://xqr.co/api/v1/links \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "url": "https://example.com", "custom_slug": "my-first-link" }'const res = await fetch("https://xqr.co/api/v1/links", { method: "POST", headers: { Authorization: "Bearer YOUR_API_KEY", "Content-Type": "application/json", }, body: JSON.stringify({ url: "https://example.com", custom_slug: "my-first-link", }),});
const { data } = await res.json();console.log(data.short_url); // https://xqr.co/my-first-linkimport httpx
res = httpx.post( "https://xqr.co/api/v1/links", headers={"Authorization": "Bearer YOUR_API_KEY"}, json={ "url": "https://example.com", "custom_slug": "my-first-link", },)
data = res.json()["data"]print(data["short_url"]) # https://xqr.co/my-first-linkResponse
Every v1 API response wraps data in an envelope:
{ "data": { "id": "550e8400-e29b-41d4-a716-446655440000", "short_url": "https://xqr.co/my-first-link", "short_code": "my-first-link", "destination": "https://example.com", "enabled": true, "labels": [], "scan_count": 0, "created_at": "2026-03-21T10:30:00Z" }, "meta": { "request_id": "req_abc123", "rate_limit": { "limit": 1000, "remaining": 999, "burst_limit": 10, "burst_remaining": 9 } }}Next Steps
- Authentication — Understand API keys, scopes, and security
- Rate Limits — Know your plan’s limits
- API Reference — Explore all 37 endpoints
- MCP Server — Connect AI agents to xQR
Was this page helpful?
Thanks for your feedback!