Skip to content

API documentation

Create, manage, and track short links programmatically over HTTPS. All endpoints return JSON.

Authentication

Every request authenticates with an API key sent as a bearer token. Generate one on your API keys page — it's shown only once, so store it securely.

curl https://raisababy.space/api/v1/links \
  -H "Authorization: Bearer rfl_your_key_here"

A missing or invalid key returns 401 Unauthorized; a key belonging to a suspended account returns 403 Forbidden.

Rate limits

Requests are limited per hour based on your plan. Every response carries the current window in its headers:

  • X-RateLimit-Limit — your hourly ceiling
  • X-RateLimit-Remaining — calls left in this window
  • X-RateLimit-Reset — Unix time (seconds) the window resets

Exceeding the limit returns 429 Too Many Requests with a Retry-After header. Defaults: Free 100/hr, Pro 1,000/hr, Enterprise 10,000/hr.

Response format

Successful responses wrap the payload in a consistent envelope:

{ "success": true, "data": { /* … */ } }

Errors carry a machine-readable code and a human message:

{ "success": false, "error": { "code": "NOT_FOUND", "message": "Link not found." } }

Endpoints

POST/api/v1/links

Create a short link.

Body fields: url (required), and optionally customAlias, title, password, expiresAt (ISO 8601), tags (array), and domainId (a verified custom domain).

Social preview: ogTitle (≤120 chars), ogDescription (≤300), and ogImage (an http(s) URL). Set any of them and link-preview crawlers get that card instead of the destination page's own. With ogImage omitted, Ruflo renders a branded 1200×630 card from the title and description. Omit all three and the link behaves exactly as before.

curl -X POST https://raisababy.space/api/v1/links \
  -H "Authorization: Bearer rfl_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://example.com","customAlias":"launch"}'
GET/api/v1/links

List your links (paginated).

Query params: q, tag, status, sort (created·clicks·updated), order (asc·desc), page, perPage.

GET/api/v1/links/:id

Retrieve a single link.

:id may be the link id or its short code.

PATCH/api/v1/links/:id

Update a link.

Send only the fields you want to change. An empty string clears title, password, expiresAt, or any of the og* fields — clearing all three of those restores the destination's own preview. Set status to ACTIVE or DISABLED to enable or disable it.

DELETE/api/v1/links/:id

Permanently delete a link.

GET/api/v1/links/:id/analytics

Click analytics for a link.

Query param range: 7d, 30d (default), or 90d.