apyhub
DEVELOPER TOOLS · MARKETING

URL Shortener API

What it does

URL Shortener lets you create short links from absolute http or https URLs, then resolve those codes back to the original destination. Send a url in the request body and get back a response with a code, short_url, long_url, permanent, and, when applicable, expires_at.

Use permanent when you want a link that never expires. When permanent is false, the response may include an expiry timestamp; when it is true, expires_at is omitted. The generated short URL includes the /service/u/{code} path, so you can store or share it directly without building the link yourself.

This is a good fit for product analytics, share links, campaign redirects, and internal tooling where you need a stable short alias for a longer destination. On the redirect endpoint, send the code in the path and the service returns an empty response after routing the user to the original URL.

▣ ENDPOINT 02 / 02
GET
Redirect to the long URL
http://localhost:8080/pankajretestflows/mono-go-url-shortener-api

QUICKSTART

GUIDE

Quickstart

Fetch a shortened URL by its code. Replace the path value in the endpoint URL when you run this call.

curl -X GET "http://localhost:8080/pankajretestflows/mono-go-url-shortener-api" \
  -H "apy-token: $APY_TOKEN"

What you'll get back

Returns a minimal acknowledgement; see the Docs tab for the full response shape.

TRY ITLIVE · 10 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.

About this endpoint

What it does

Redirects a short URL code to its corresponding long URL. The request takes a path code and the endpoint returns a minimal acknowledgement on success; the detailed response shape is not yet captured in the schema.

Path Parameter(s)

AttributeTypeMandatoryDescription
codeStringYesShort URL code, 1 to 10 alphanumeric characters (^[A-Za-z0-9]{1,10}$).

Response

The endpoint returns a minimal acknowledgement on success — the detailed shape is not yet captured in the schema.

Path parameters

Name
Type
Description
codeREQUIRED
string
▣ COMMON ERRORS

Errors any endpoint can return

400bad_request

Required parameter missing or malformed body.

401unauthorized

API key missing, revoked, or not authorized for this service.

429rate_limited

Your plan's per-second rate exceeded. Retry with exponential backoff.

503upstream_busy

Backend temporarily unavailable. Try again in a few seconds.