URLx

URLx API Documentation

Integrate URL shortening into your applications with our REST API. Simple, fast, and reliable.

Getting Started

  1. 1 Create an account and log in
  2. 2 Generate your API token in your dashboard
  3. 3 Use the token in Authorization header for all requests

API Features

  • RESTful endpoints with JSON responses
  • Complete CRUD operations on URLs
  • Real-time analytics and statistics
  • Rate limiting and pagination

Code Examples

1. Create a shortened URL

curl -X POST https://urlx.fr/api/url/create \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "long_url": "https://example.com/very/long/url"
  }'

2. Get URL statistics

curl -X GET https://urlx.fr/api/url/{slug}/stats \
  -H "Authorization: Bearer YOUR_TOKEN"

3. List all your URLs

curl -X GET https://urlx.fr/api/url/list?page=1 \
  -H "Authorization: Bearer YOUR_TOKEN"

Authentication

All API requests require authentication using Bearer tokens. Include your token in the Authorization header of each request.

Note: You can generate your API token from your client dashboard under the API section.

Rate Limiting & Pagination

To ensure fair usage, the API implements rate limiting and pagination:

60
requests/minute
15
items per page
pages available