UFY API · v1
Build with shorter links.
The UFY API gives your product a simple interface for creating and inspecting short URLs. Requests return predictable JSON and use standard HTTP status codes.
Create a link
Send a valid HTTP or HTTPS destination in the url field. Authenticate with an API key using the X-API-Key header.
curl -X POST https://ufy.example.com/api/v1/links \
-H "Content-Type: application/json" \
-H "X-API-Key: your_api_key" \
-d '{"url":"https://example.com/a-long-path"}'POST /api/v1/links
Returns 201 Created with the new short URL.
{
"data": {
"id": "a1b2c3",
"short_url": "https://ufy.example.com/s/a1b2c3",
"url": "https://example.com/a-long-path",
"clicks": 0,
"created_at": "2026-10-25T12:00:00.000Z"
}
}Look up a link
Retrieve the destination and click count by passing a slug.
GET /api/v1/links?slug=a1b2c3Errors and authentication
Responses include an error message. Common statuses are 401 for an invalid key, 404 for an unknown slug, and 422 for invalid input. Configure UFY_API_KEY in your deployment environment to require authentication.