Solved Docs

Quickstart: REST (5 minutes)

Make your first authenticated, credit-metered API call.

Goal: make your first authenticated, credit-metered API call.

1. Get a key. Create one with the link:links.write scope — see API keys. You'll use it as a bearer token on every request below.

2. Make the call.

curl -X POST https://api.link.solved.group/v1/links \
  -H "Authorization: Bearer slv_live_e17Hk2Qp…9xZr4fT2aB" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: 8f1c6e2a-9b7d-4e3f-9a21-9c2b7a0f5e41" \
  -d '{
    "destination_url": "https://example.com/spring",
    "slug": "spring-sale"
  }'

The Idempotency-Key is required on this call because it spends credits: if your connection drops and you retry with the same key, you get the same link back instead of a second one. Use a fresh UUID per link you intend to create.

3. Read the response.

{
  "id": "lnk_01J9Z4A7R3V5W2XN4V6B0RTC5H",
  "short_url": "https://slv.link/spring-sale",
  "destination_url": "https://example.com/spring",
  "created_at": "2026-10-02T12:00:00Z",
  "credits_charged": 1,
  "credits_balance": 2499
}

id is the link's canonical identifier — use it for later GET/PATCH/DELETE calls. credits_charged and credits_balance tell you what this call cost and what's left, with no extra request. If something goes wrong instead, you'll get a problem+json body with a stable code — see Concepts: errors for how to branch on it.

Where to next: