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_KEY02 / CREATE
Create a short link
POST /v1/links accepts a destination plus optional private metadata, UTM parameters, and expiration. Without a custom domain, URLMe always allocates a seven-character code automatically.
urlstringrequiredHTTP or HTTPS destination, 8-8,192 characters. Credentials, private network targets, and unsupported ports are rejected.
descriptionstring | nullOptional internal label, up to 160 characters. Returned by API operations but never shown during redirects.
tagsstring[]Up to ten unique private tags, each 1-32 characters, for filtering and exports.
utmobjectOptional source, medium, campaign, term, and content values. Appended to the destination once during creation.
expiresAtstring | nullOptional future ISO 8601 date-time. A current or past value is rejected. When reached, the redirect returns HTTP 410.
domainstringOptional active custom hostname owned by this workspace. Growth or Scale only.
customCodestringOptional custom alias. Requires domain; see the complete rules below.
curl --request POST "https://api.urlme.link/v1/links" \
--header "Authorization: Bearer $URLME_API_KEY" \
--header "Idempotency-Key: welcome-campaign-2026" \
--header "Content-Type: application/json" \
--data '{
"url": "https://example.com/campaign/welcome",
"description": "Welcome campaign",
"tags": ["email", "onboarding"],
"utm": { "source": "newsletter", "medium": "email", "campaign": "welcome" },
"expiresAt": "2026-12-31T23:59:59Z"
}'{
"data": {
"id": "3OiMpZk866QrFxm0l5p0",
"code": "welcome",
"shortUrl": "https://go.example.com/welcome",
"destination": "https://example.com/onboarding",
"description": "Customer onboarding",
"tags": ["onboarding"],
"clicks": 0,
"status": "active",
"createdAt": "2026-07-29T14:22:31.381Z",
"expiresAt": null
}
}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
customCodeto receive an automatic code on the custom domain.
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 / LIFECYCLE
Organize, pause, resume, expire, or delete
PATCH a private description or tags. Send null to clear the description.
PATCH with {"status":"paused"}. Reversible; redirects return 404.
PATCH with {"status":"active"}. An expired link cannot resume.
POST .../expire. Permanent; redirects return 410.
DELETE. Removes the redirect and returns 204 with no body.
Create a new link. Destination, hostname, and short code can never be edited after creation.
05 / ENDPOINTS
Core API surface
/v1/linksCreate an automatic short code or a custom-domain alias.
201/v1/links/bulkCreate a plan-capped batch of immutable links.
201 / 207/v1/links?limit=50List newest links. limit defaults to 50 and is clamped from 1 to 100.
200/v1/links/:idRead details, last activity, device mix, and referrer mix.
200/v1/links/:idUpdate description, tags, or active/paused status. Redirect identity is immutable.
200/v1/links/:id/expirePermanently expire a link immediately.
200/v1/links/:idDelete a link and its redirect record.
204/v1/accountRead the workspace plan, service state, billing window, limits, and usage.
200GET /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.
URL: https://api.urlme.link/mcp
Authorization: Bearer $URLME_API_KEYCreate an automatic link or custom-domain alias with an optional internal description.
Read the newest links and descriptions in the authenticated workspace.
Set or clear a private internal link label without changing redirects.
Temporarily control redirect delivery.
Permanently expire a link with HTTP 410 behavior.
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.
09 / ERRORS
Stable JSON error envelopes
Non-2xx JSON responses use { error: { code, message } }. Branch on error.code, not the human-readable message.
{
"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.