Base URL: /api/v1
Creates a new temporary payload.
POST /payloads
Content-Type: application/json{
"content": "string",
"mime_type": "string",
"expiry_time": "2025-03-28T00:00:00Z" // Optional, ISO 8601 format
}| Field | Type | Required | Description |
|---|---|---|---|
| content | string | Yes | The content to store |
| mime_type | string | Yes | MIME type of the content |
| expiry_time | string | No | When the content should expire (ISO 8601) |
{
"hash_id": "string",
"expiry_time": "2025-03-28T00:00:00Z"
}- 400 Bad Request: Invalid request body or MIME type
- 413 Payload Too Large: Content exceeds size limit
- 429 Too Many Requests: Rate limit exceeded
- 500 Internal Server Error: Server error
Retrieves a payload by its hash ID.
GET /payloads/{hash_id}| Name | In | Type | Required | Description |
|---|---|---|---|---|
| hash_id | path | string | Yes | The unique identifier of the payload |
{
"content": "string",
"mime_type": "string",
"expiry_time": "2025-03-28T00:00:00Z"
}- 404 Not Found: Payload not found or expired
- 429 Too Many Requests: Rate limit exceeded
- 500 Internal Server Error: Server error
Deletes a payload by its hash ID.
DELETE /payloads/{hash_id}| Name | In | Type | Required | Description |
|---|---|---|---|---|
| hash_id | path | string | Yes | The unique identifier of the payload |
No response body
- 404 Not Found: Payload not found
- 429 Too Many Requests: Rate limit exceeded
- 500 Internal Server Error: Server error
The API implements rate limiting based on client IP address:
- Default limit: 100 requests per 60 seconds
- Rate limit headers:
X-RateLimit-Limit: Maximum requests per windowX-RateLimit-Remaining: Remaining requests in current windowX-RateLimit-Reset: Time when the rate limit resets (Unix timestamp)
All error responses follow this format:
{
"error": "string" // Human-readable error message
}Request:
curl -X POST http://localhost:8080/api/v1/payloads \
-H "Content-Type: application/json" \
-d '{
"content": "Hello, World!",
"mime_type": "text/plain",
"expiry_time": "2025-03-28T00:00:00Z"
}'Response:
{
"hash_id": "feb61cd1b3d34efebab6d6a8490071b2",
"expiry_time": "2025-03-28T00:00:00Z"
}Request:
curl http://localhost:8080/api/v1/payloads/feb61cd1b3d34efebab6d6a8490071b2Response:
{
"content": "Hello, World!",
"mime_type": "text/plain",
"expiry_time": "2025-03-28T00:00:00Z"
}Request:
curl -X DELETE http://localhost:8080/api/v1/payloads/feb61cd1b3d34efebab6d6a8490071b2Response:
204 No Content