Zingat API Reference
Complete documentation for all Zingat API endpoints. All endpoints return JSON responses and support standard HTTP methods.Base URL
All API endpoints are relative to the base URL:Authentication
Most endpoints do not require authentication. Password-protected pastes require the password to be provided in the request.Endpoints
Create Paste
Create a new paste with optional password protection and expiry. Endpoint:POST /api/paste
The text content to store.
Optional password for access protection.
Expiry time in seconds (default 24 hours).
Get Paste
Retrieve a paste by its ID. Password required if paste is protected. Endpoint:GET /api/paste/{id}
Headers (if password protected):
Delete Paste
Delete a paste by its ID. Requires password if paste is protected. Endpoint:DELETE /api/paste/{id}
Headers (if password protected):
Get Paste Stats
Get statistics about a paste without retrieving the content. Endpoint:GET /api/paste/{id}/stats
Response:
List Recent Pastes
Get a list of recently created pastes (non-protected only). Endpoint:GET /api/pastes/recent
Query Parameters:
limit(number, optional): Number of pastes to return (default: 20, max: 100)offset(number, optional): Pagination offset (default: 0)
Error Responses
All endpoints return standard HTTP status codes with JSON error messages:400 Bad Request
401 Unauthorized
403 Forbidden
404 Not Found
429 Too Many Requests
Rate Limiting
API endpoints are rate limited to prevent abuse:- Create Paste: 10 requests per minute per IP
- Get Paste: 60 requests per minute per IP
- Other endpoints: 30 requests per minute per IP
Content Limits
- Maximum paste size: 10MB (configurable)
- Minimum content length: 1 character
- Maximum expiry: 30 days (2592000 seconds)
Example Usage
Response Codes Summary
| Code | Description |
|---|---|
| 200 | Success |
| 201 | Created successfully |
| 400 | Bad request parameters |
| 401 | Password required |
| 403 | Invalid password |
| 404 | Paste not found |
| 429 | Rate limit exceeded |
| 500 | Internal server error |