API Documentation

Everything below reflects the live public API — every endpoint on this page works today.

Base URL

https://getmicrourl.com/api/v1

Authentication

Every request needs an API key in the Authorization header. Generate one from Dashboard → Settings.

Authorization: Bearer ck_live_...

Try it

Sign in to try this with a real API key instead of a placeholder.

curl -X POST https://getmicrourl.com/api/v1/links \
  -H "Authorization: Bearer ck_live_..." \
  -H "Content-Type: application/json" \
  -d '{ "url": "https://example.com/a-very-long-page" }'

Response format

Every successful response is wrapped in a data envelope:

{ "data": ... }

List endpoints add a pagination key:

{ "data": [...], "pagination": { "nextCursor": "lnk_..." } }

Errors follow the same shape, always with a machine-readable code:

{ "error": { "code": "not_found", "message": "Link not found" } }
Error codeHTTP status
invalid_request400
unauthenticated401
forbidden403
not_found404
slug_taken409
domain_not_active409
plan_limit_reached402
malicious_url400
rate_limited429
internal_error500

Rate limits

Limits are per API key, per minute, based on your plan. Every response includes X-RateLimit-Limit, X-RateLimit-Remaining, and X-RateLimit-Reset headers. A 429 response also includes Retry-After.

PlanLimit
Free10 requests/min
Starter60 requests/min
Growth300 requests/min
Business600 requests/min

Endpoints

POST/links/bulk

Create up to 100 links in one request. Each row succeeds or fails independently.

curl -X POST https://getmicrourl.com/api/v1/links/bulk \
  -H "Authorization: Bearer ck_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "links": [
      { "url": "https://example.com/one" },
      { "url": "https://example.com/two", "slug": "two" }
    ]
  }'

Response: an array with one result per input row.

{
  "data": [
    { "index": 0, "status": "success", "link": { ... } },
    { "index": 1, "status": "error", "error": { "code": "slug_taken", "message": "..." } }
  ]
}

Questions

Email [email protected] — this API is actively growing, and feedback shapes what we build next.