Paste69 API Documentation

Table of Contents

Getting Started

All API endpoints accept requests with any of the following content types:

The parameter names remain the same regardless of the content type used. The examples in this documentation use form data for simplicity, as it doesn't require explicitly setting content type headers.

Authentication & API Keys

Most endpoints require an API key for authentication. To get started, request an API key:

CURL
curl -X POST \ -d "name=Your Name" \ -d "email=your@email.com" \ https://0x45.st/keys/request

Once you have your API key, you can use it in one of two ways:

1. Authorization Header (Recommended)

CURL
curl -H "Authorization: Bearer YOUR_API_KEY" https://0x45.st/u/list

2. Query Parameter

CURL
curl "https://0x45.st/u/list?api_key=YOUR_API_KEY"

API Key Features

Verifying an API Key

CURL
curl -H "Authorization: Bearer YOUR_API_KEY" https://0x45.st/keys/verify

File Upload Endpoints

1. Multipart Upload
CURL
curl -X POST -F "file=@path/to/file.txt" https://0x45.st/p
Form field:
file
Optional query params:
  • ext: file extension
  • expires_in: expiration time (e.g. "24h" or "7 days 2 hours and 45 minutes")
  • expires_at: expiration date (YYYY-MM-DD)
  • private: true/false (requires API key)
  • filename: custom filename
Response:
{
    "success": true,
    "data": {
        "id": "abc12345",
        "filename": "example.txt",
        "size": 1234,
        "mime_type": "text/plain",
        "created_at": "2024-03-20T15:30:00Z",
        "expires_at": "2024-03-21T15:30:00Z",
        "private": false,
        "url": "/abc12345.txt",
        "raw_url": "/raw/abc12345.txt",
        "download_url": "/download/abc12345.txt",
        "delete_url": "/delete/abc12345/deletekey123"
    }
}
2. Raw Upload
CURL
curl -X POST --data-binary @path/to/file.txt https://0x45.st/p
Body:
raw file content
Query params:
Same query params as multipart
Response:
{
    "success": true,
    "data": {
        "id": "abc12345",
        "filename": "paste.txt",
        "size": 1234,
        "mime_type": "text/plain",
        "created_at": "2024-03-20T15:30:00Z",
        "expires_at": "2024-03-21T15:30:00Z",
        "private": false,
        "url": "/abc12345.txt",
        "raw_url": "/raw/abc12345.txt",
        "download_url": "/download/abc12345.txt",
        "delete_url": "/delete/abc12345/deletekey123"
    }
}
3. JSON Upload
CURL
curl -X POST \ -H "Content-Type: application/json" \ -d '{"content":"Hello World"}' \ https://0x45.st/p
Content-Type:
application/json
Body:
{
    "content": "string",     // Required if no URL
    "url": "string",         // Required if no content
    "filename": "string",    // Optional
    "extension": "string",   // Optional
    "expires_in": "string",  // Optional (e.g. "24h")
    "expires_at": "string",  // Optional (e.g. "2024-03-20")
    "private": boolean       // Optional
}
Response:
{
    "success": true,
    "data": {
        "id": "abc12345",
        "filename": "example.txt",
        "size": 1234,
        "mime_type": "text/plain",
        "created_at": "2024-03-20T15:30:00Z",
        "expires_at": "2024-03-21T15:30:00Z",
        "private": false,
        "url": "/abc12345.txt",
        "raw_url": "/raw/abc12345.txt",
        "download_url": "/download/abc12345.txt",
        "delete_url": "/delete/abc12345/deletekey123"
    }
}

File Management

URL Shortener

1. Shorten URL
CURL
curl -X POST \ -H "Authorization: Bearer YOUR_API_KEY" \ -d "url=https://example.com" \ -d "title=Example Website" \ -d "expires_in=7d" \ https://0x45.st/u
Request Body:
  • url (required): The URL to shorten
  • title (optional): Custom title for the URL
  • expires_in (optional): Duration string (e.g., "24h", "7d", "30d")
  • expires_at (optional): Date string (YYYY-MM-DD)
2. URL Stats
CURL
curl -X GET \ -H "Authorization: Bearer YOUR_API_KEY" \ "https://0x45.st/u/:id/stats?start_date=2024-01-01&end_date=2024-12-31"
Query Parameters:
  • start_date (optional): Start date for stats (YYYY-MM-DD)
  • end_date (optional): End date for stats (YYYY-MM-DD)
3. List URLs
CURL
curl -X GET \ -H "Authorization: Bearer YOUR_API_KEY" \ "https://0x45.st/u/list?page=1&limit=10"
Query Parameters:
  • page (optional): Page number (default: 1)
  • limit (optional): Items per page (default: 10)

URL Management

1. List URLs
CURL
curl -X GET \ -H "Authorization: Bearer YOUR_API_KEY" \ "https://0x45.st/u/list?page=1&limit=10"
Query Parameters:
  • page (optional): Page number (default: 1)
  • limit (optional): Items per page (default: 10)
2. URL Stats
CURL
curl -X GET \ -H "Authorization: Bearer YOUR_API_KEY" \ "https://0x45.st/u/:id/stats?start_date=2024-01-01&end_date=2024-12-31"
Query Parameters:
  • start_date (optional): Start date for stats (YYYY-MM-DD)
  • end_date (optional): End date for stats (YYYY-MM-DD)
3. Update URL Expiration
CURL
curl -X PUT \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "expires_at": "2024-12-31T23:59:59Z" }' \ https://0x45.st/u/:id/expire
Content-Type:
application/json
Body:
{
    // One of the following is required:
    "expires_in": "string",   // Optional (e.g., "24h" or "never")
    "expires_at": "string",   // Optional (YYYY-MM-DD)
}
4. Delete URL
CURL
curl -X DELETE \ -H "Authorization: Bearer YOUR_API_KEY" \ "https://0x45.st/u/:id"
Response:
{
    "success": true,
    "message": "URL deleted successfully"
}

Limits & Retention

Support

For support, bug reports, or feature requests, please visit our GitHub Issues page.