Skip to main content
POST
/
api
/
shorten
Create Short URL
curl --request POST \
  --url https://api.krumb.fun/api/shorten \
  --header 'Content-Type: application/json' \
  --data '
{
  "email": "[email protected]",
  "password": "mypassword",
  "api_key": "abc123",
  "url": "https://example.com",
  "link_password": "secret123"
}
'
{
  "success": true,
  "short_url": "<string>",
  "tokens_left": 123,
  "require_password": true,
  "already_exists": true
}

Shorten URL

POST /api/shorten Create a new short link.
Optionally, you can protect the link with a password.

Request

{
  "email": "[email protected]",
  "password": "your_account_password",
  "api_key": "your_api_key",
  "url": "https://example.com/long/link",
  "link_password": "secret123"
}
  • link_password (optional) – If provided, the generated link will require this password to access.

Success Response

Without password:
{
  "success": true,
  "short_url": "https://krumb.fun/abc123",
  "tokens_left": 299,
  "require_password": false
}
With password:
{
  "success": true,
  "short_url": "https://krumb.fun/xyz789",
  "tokens_left": 299,
  "require_password": true
}
If the link already exists:
{
  "success": true,
  "short_url": "https://krumb.fun/abc123",
  "already_exists": true,
  "tokens_left": 300,
  "require_password": true
}

Error Responses

  • 400 – Missing fields
  • 403 – Invalid credentials or out of tokens

Body

application/json
email
string
required
password
string
required
Example:

"mypassword"

api_key
string
required
Example:

"abc123"

url
string
required
Example:

"https://example.com"

Optional password to protect the short link

Example:

"secret123"

Response

Short URL created successfully

success
boolean
short_url
string
tokens_left
integer
require_password
boolean

Indicates if the link requires a password

already_exists
boolean

Returned if the link already exists for this user