Zingat API Reference
Complete documentation for all Zingat API endpoints and web UI routes. API endpoints return JSON responses and support standard HTTP methods.Base URL
All API endpoints are relative to the base URL:Authentication
API endpoints require an API key for authentication. Generate an API key usingGET /api/clip/key. Password-protected clips require the password to be provided when accessing via web UI.
Web UI Routes
Home Page
Endpoint:GET /
Displays the home page with clip creation form.
Create Clip (Web Form)
Endpoint:POST /
Creates a new clip from web form submission.
View Clip
Endpoint:GET /clip/<shortcode>
View a clip by its shortcode. If password-protected, displays password prompt.
Submit Password
Endpoint:POST /clip/<shortcode>
Submit password for password-protected clip.
Raw Content
Endpoint:GET /clip/raw/<shortcode>
Get raw content only (no HTML wrapper).
API Endpoints
Generate API Key
Generate a new API key for programmatic access. Endpoint:GET /api/clip/key
Create Clip
Create a new clip with optional password protection and expiry. Endpoint:POST /api/clip
The text content to store.
Optional title for the clip.
Optional password for access protection.
Optional expiration date in YYYY-MM-DD format.
Get Clip
Retrieve a clip by its shortcode. Requires API key. Endpoint:GET /api/clip/<shortcode>
Headers:
Update Clip
Update an existing clip. Requires API key. Endpoint:PUT /api/clip
Headers:
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 may be rate limited to prevent abuse. Web UI routes use cookie-based password persistence for protected clips.Content Limits
- Minimum content length: 1 character
- Expiry dates: Custom date format (YYYY-MM-DD)
Example Usage
Response Codes Summary
| Code | Description |
|---|---|
| 200 | Success |
| 201 | Created successfully |
| 400 | Bad request parameters / API key error |
| 401 | API key required or invalid |
| 403 | Invalid password |
| 404 | Clip not found or expired |
| 429 | Rate limit exceeded |
| 500 | Internal server error |