API

Create a link over HTTP.

One public write endpoint is shipped: POST /api/v1/links. Create and revoke keys in Dashboard → Settings → Account.

Keys

Developer, Agency, and Enterprise include API access. POST /api/user/api-keys with your account session and optional scopes links:write, links:read, and analytics:read. The default is write and read. The secret is returned once, starts with uguy_, and is stored only as a SHA-256 hash. Revoke with DELETE and the key id.

Key guide

Create a link

curl -X POST https://ug.uy/api/v1/links \
  -H "Authorization: Bearer uguy_…" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: launch-2026-04" \
  -d '{"url":"https://example.com/docs","slug":"docs"}'
  • url is required and must pass the safety check and Web Risk.
  • slug is optional. Omit it and ug.uy generates six characters.
  • The key needs the links:write scope.
  • Idempotency-Key replays the same JSON response for that account.
  • 60 requests per minute per account. Over that, the response is HTTP 429.
  • Developer and Agency include 20,000 API link creates per month. Enterprise is not capped in the catalog. API creates also count toward the daily link create limit.

Errors

StatusCodeWhen
401unauthorizedMissing or unknown uguy_ key
403forbiddenKey cannot create links, or the plan has no API access
403unsafe_urlDestination failed the safety or threat check
403slug_unavailableSlug is reserved or not allowed
409conflictSlug is already taken
429rate_limitedMore than 60 creates in a minute