Skip to main content

Secure Link API

Generate secure, expiring links with password protection, access limits, and comprehensive audit trails. Built with Java and Spring Boot for production-ready link management.

Key Features

Everything you need to create, manage, and monitor secure links

Expiration Control

Set precise expiration dates or automatic TTL for time-sensitive content

Access Limits

Define maximum view counts to control how many times a link can be accessed

Password Protection

Secure links with password authentication via HTTP headers

File Uploads

Upload files and generate secure download links with access controls

Audit Trail

Track every access attempt with origin, user agent, and result status

Real-time Stats

Monitor access patterns, security exceptions, and link performance

Quick Start

Get up and running with the Secure Link API in minutes

1

Start the API server

Clone the repository and start the Spring Boot application with your preferred profile:
git clone https://github.com/WalysonGomes/secure-link-api.git
cd secure-link-api/backend
SPRING_PROFILES_ACTIVE=dev mvn spring-boot:run
The API will be available at http://localhost:8080
2

Create your first secure link

Send a POST request to create a link with expiration and access controls:
curl -X POST http://localhost:8080/api/links \
  -H "Content-Type: application/json" \
  -d '{
    "targetUrl": "https://example.com/document.pdf",
    "expiresAt": "2026-12-31T23:59:59Z",
    "maxViews": 5,
    "password": "secret123"
  }'
{
  "shortCode": "K2x9pLmN",
  "accessUrl": "http://localhost:8080/l/K2x9pLmN",
  "expiresAt": "2026-12-31T23:59:59Z",
  "maxViews": 5
}
3

Access the secure link

Use the short code to access the link, providing the password in the header:
curl -i http://localhost:8080/l/K2x9pLmN \
  -H "X-Link-Password: secret123"
The API validates the link status, checks the password, and redirects to the target URL if all conditions are met.
4

Monitor access statistics

Check access patterns and security metrics:
curl http://localhost:8080/api/stats/access/summary
View detailed statistics on successful accesses, failures, security exceptions, and more.

Explore the Documentation

Dive deeper into core concepts, guides, and API reference

Core Concepts

Understand how secure links work, validation rules, and the link lifecycle

API Reference

Complete API documentation with endpoints, parameters, and response schemas

Deployment Guide

Deploy the API with Docker, configure environments, and set up monitoring

Monitoring & Metrics

Set up Prometheus metrics, health checks, and observability tools

Ready to get started?

Jump into the quickstart guide or explore the full API reference to start building secure link management into your application.

Get Started Now