Short-URL API Documentation
Build powerful URL shortening features into your applications with our secure, FastAPI-based REST API. Complete with JWT authentication, password protection, and comprehensive URL management.
Quick Start
Get your URL shortener up and running in minutes
Start the Server
Launch the FastAPI application with Uvicorn.Your API will be available at
http://127.0.0.1:8000Key Features
Everything you need to build a production-ready URL shortening service
JWT Authentication
Secure token-based authentication with automatic token refresh and validation endpoints
Password Protection
Optional password protection for short URLs with bcrypt hashing
URL Management
Pause, resume, delete, and modify URLs with full control over your links
Analytics Tracking
Built-in hit counter tracking with resettable statistics
MongoDB Integration
Reliable data persistence with MongoDB and async Motor driver
CORS Support
Configurable CORS middleware for cross-origin API access
Explore by Topic
Deep dive into specific areas of the API
Authentication
Learn about JWT tokens, login flows, and token management
Public Endpoints
Create URLs, authenticate, and access health checks
Protected Endpoints
Manage URLs with secure, authenticated operations
Data Models
Understand request and response schemas
Configuration
Configure your deployment with environment variables
Environment Setup
Set up MongoDB, secrets, and runtime settings
Ready to get started?
Follow our quickstart guide to create your first short URL in under 5 minutes, or explore the complete API reference for advanced features.