URLME API REFERENCE

Build short links with a small, explicit API.

Complete request contracts, custom-domain aliases, lifecycle behavior, limits, and machine-readable errors for the URLMe production API.

Base URL
https://api.urlme.link
Authentication
Bearer API key
Media type
application/json
Timestamp format
ISO 8601 UTC

01 / AUTHENTICATION

Keep the key server-side

Send an active workspace key as a Bearer credential. Keys begin with urlme_live_ in production and are displayed only once. Store them in a secret manager or environment variable; never include one in browser or mobile application code.

Authorization: Bearer $URLME_API_KEY

03 / AUTOMATION

Retry and batch safely

Send an Idempotency-Key header of 8-128 characters on create requests. URLMe retains the key for 24 hours. Retrying the same body replays the original link without increasing usage; reusing the key with a different body returns 409.

POST /v1/links/bulk accepts a links array and returns one result per item. Batch sizes are deliberately capped at 25 for Starter, 100 for Growth, and 250 for Scale. A partial result uses HTTP 207, and only successfully created links consume the link allowance.

04 / CUSTOM ALIASES

Choose the path on your own domain

Custom aliases are deliberately unavailable on urlme.link. Growth and Scale workspaces may send customCode only together with an active, connected custom-domain domain.

  • 4-32 characters: letters, numbers, underscore, or hyphen.
  • Aliases preserve case and are unique per hostname.
  • Reserved aliases are checked case-insensitively.
  • A duplicate returns 409 code_unavailable; the existing link is never overwritten.
  • Omit customCode to receive an automatic code on the custom domain.
Custom-domain alias request
curl --request POST "https://api.urlme.link/v1/links" \
  --header "Authorization: Bearer $URLME_API_KEY" \
  --header "Content-Type: application/json" \
  --data '{
    "url": "https://example.com/onboarding",
    "description": "Customer onboarding",
    "tags": ["onboarding"],
    "domain": "go.example.com",
    "customCode": "welcome"
  }'

05 / ENDPOINTS

Core API surface

POST/v1/links

Create an automatic short code or a custom-domain alias.

201
POST/v1/links/bulk

Create a plan-capped batch of immutable links.

201 / 207
GET/v1/links?limit=50

List newest links. limit defaults to 50 and is clamped from 1 to 100.

200
GET/v1/links/:id

Read details, last activity, device mix, and referrer mix.

200
PATCH/v1/links/:id

Update description, tags, or active/paused status. Redirect identity is immutable.

200
POST/v1/links/:id/expire

Permanently expire a link immediately.

200
DELETE/v1/links/:id

Delete a link and its redirect record.

204
GET/v1/account

Read the workspace plan, service state, billing window, limits, and usage.

200

GET /v1/links returns newest-first records and omits deleted links. The current API does not expose cursor pagination; use limit up to 100.

06 / MCP

Use URLMe from compatible AI clients

URLMe exposes the same workspace through a Streamable HTTP MCP endpoint at https://api.urlme.link/mcp. Authenticate with a workspace API key. MCP calls inherit the same subscription state, quotas, destination checks, custom-domain ownership, and alias rules as REST calls.

MCP server
URL: https://api.urlme.link/mcp
Authorization: Bearer $URLME_API_KEY
create_short_link

Create an automatic link or custom-domain alias with an optional internal description.

list_links

Read the newest links and descriptions in the authenticated workspace.

update_link_description

Set or clear a private internal link label without changing redirects.

pause_link / resume_link

Temporarily control redirect delivery.

expire_link

Permanently expire a link with HTTP 410 behavior.

get_usage

Read the current plan window, limits, and counters.

This API-key endpoint works with compatible MCP clients and developer tooling. A publicly listed URLMe app inside ChatGPT requires a separate per-user OAuth connection and OpenAI app review; a workspace API key alone does not install or authorize a public ChatGPT app.

07 / REDIRECTS

Delivery behavior is explicit

302Active link; redirect is counted in the current billing window.
404Unknown, deleted, paused, or service-inactive link.
410Permanently or automatically expired link.
429The workspace redirect allowance is exhausted.

08 / LIMITS

Usage follows the Stripe billing window

Link creation and redirects are counted in the current workspace usage window. Existing links continue to consume redirect allowance when opened in later periods. Paid usage windows align with Stripe billing periods; allowances reset when the next period begins.

Starter5,000 links100,000 redirects1 API key25 per bulk requestNo custom domains
Growth50,000 links1,000,000 redirects3 API keys100 per bulk request1 custom domain
Scale250,000 links5,000,000 redirects10 API keys250 per bulk request3 custom domains

09 / ERRORS

Stable JSON error envelopes

Non-2xx JSON responses use { error: { code, message } }. Branch on error.code, not the human-readable message.

Example conflict
{
  "error": {
    "code": "code_unavailable",
    "message": "That short code is already in use on this domain."
  }
}
400invalid_requestMalformed destination, settings, or JSON body.
400custom_alias_domain_requiredcustomCode was sent without domain.
401authentication_requiredBearer credential is missing or invalid.
402subscription_requiredTrial or paid service access is inactive.
403plan_upgrade_requiredCustom domains and aliases require Growth or Scale.
403domain_not_connectedThe requested hostname is not active in this workspace.
404link_not_foundThe link does not exist in this workspace.
409code_unavailableThe alias is already used on that hostname.
409reserved_codeThe alias is reserved by URLMe.
409link_expiredAn expired link cannot be changed or expired again.
422unsafe_destinationThe destination matched a security blocklist.
429monthly_limit_reachedThe billing-window link allowance is exhausted.

10 / MANAGEMENT

What belongs in the console

API-key creation and revocation, custom-domain DNS and certificate provisioning, billing checkout, and the Stripe portal require an authenticated owner or admin session. They are customer-facing management operations, but they do not accept a workspace API key and are intentionally excluded from unattended integration examples.