Interactive API documentation (Swagger)

API & developers

Back to Help & Support
API & developers

Interactive API documentation (Swagger)

ShortU provides an interactive API documentation interface powered by Swagger UI at /api/docs/.

What is Swagger UI?

Swagger UI is a web-based tool that displays all available API endpoints, their parameters and expected responses. You can test API calls directly from the browser without writing any code.

Accessing the API documentation:

  1. Log in to your ShortU account
  2. From the dashboard sidebar, click API Documentation under TOOLS
  3. Or navigate directly to /api/docs/

What you can do in Swagger UI:

  • Browse all endpoints: shorten, list links, get stats, delete, bulk operations
  • View request/response schemas with example values
  • Authenticate with your API token using the Authorize button (paste your token)
  • Send test requests and see live responses

Authenticating in Swagger UI:

  1. Click the Authorize button (lock icon) in Swagger UI
  2. Enter your API token in the format: Token YOUR_TOKEN_HERE
  3. Click Authorize, then Close
  4. All subsequent requests in Swagger UI will include your token

OpenAPI specification:

The raw OpenAPI YAML spec is available at /api/openapi.yaml. You can import it into tools like Postman, Insomnia or any OpenAPI-compatible client.

For a step-by-step guide to getting an API token, see How to generate an API token.