For developers

API

Create short links straight from your app, script or CMS – no sign-up and no API key required.

Endpoint

POST https://firsturl.de/api/v1/shorten
Content-Type: application/json

Parameters

FieldTypeDescription
urlstringTarget URL (required). https:// is added if no scheme is given.
waitint 0–12Wait time of the redirect page in seconds. Default: 3.
aliasstringOptional custom alias (3–40 characters: A–Z, a–z, 0–9, - and _).
expires_in_daysintOptional validity in days: 1, 7, 30, 90, 365. Unlimited if omitted.

Example

curl -X POST https://firsturl.de/api/v1/shorten \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com/ein/sehr/langer/link", "wait": 0}'

Response

HTTP/1.1 201 Created
{
  "code": "aB3xY7k",
  "short_url": "https://firsturl.de/aB3xY7k",
  "preview_url": "https://firsturl.de/aB3xY7k+",
  "manage_url": "https://firsturl.de/m/…",
  "target": "https://example.com/ein/sehr/langer/link",
  "wait": 0,
  "expires_at": null
}

Errors & limits

Errors are returned with a matching HTTP status (400, 422, 429) and a JSON object with "error" and "message". Each IP address can create 30 links per hour.

HTTP/1.1 422 Unprocessable Entity
{ "error": "url_invalid", "message": "…" }