Skip to content
Back to Blog
announcement

v1.1 API Update: Aliases, Expiration, and Passwords

2026-02-28·3 min read·Plung Team

Today we are releasing v1.1 of the Plung public API. This update adds programmatic access to three features previously only available through our web interface: custom aliases, link expiration, and password protection.

These additions maintain our "zero-friction" philosophy. There are still no API keys, no signups, and no complex authentication flows. You can start using these new parameters immediately by updating your request bodies.

New Features

Aliases

You can now specify an alias in your shortening requests. This allows you to create branded or memorable links programmatically. The API will return a 400 Bad Request with the message "Alias is already taken" if your requested code is unavailable.

Flexible Expiration

The current API supports an expiresIn parameter. This accepts an integer representing seconds, giving you precise control over exactly when a link should expire.

Password Protection

You can now secure your shortened links with a password. When a user visits a password-protected link, they will be prompted to enter the password before being redirected to the destination URL.

Example Integration

We have updated our documentation with new examples. Here is how you can use all three new features in a single request:

curl -X POST https://api.plung.co/v2/shorten \
  -H "Authorization: Bearer your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com/confidential-report",
    "alias": "q1-report",
    "password": "SecurePassword123",
    "expiresIn": 3600
  }'

In this example, the resulting link plung.co/q1-report will be password-protected and will automatically expire in exactly one hour (3600 seconds).

Granular Error Handling

As part of this update, we have standardized our error responses. Instead of broad "Bad Request" errors, the API now returns specific messages for common failure cases:

  • "Alias is already taken"
  • "Alias must be between 3 and 50 characters"
  • "Password must be between 4 and 100 characters"
  • "expiresIn must be at least 60 seconds (1 minute)"

Full details on these changes and all available parameters can be found in our Developer Documentation.

The Plung API remains free and open for everyone. We can't wait to see what you build with these new capabilities.

Share:

Share Article

Written by

Plung Team

Related Articles