Skip to main content

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 using GET /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
string
required
The text content to store.
string
Optional title for the clip.
string
Optional password for access protection.
string
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:
Response:

Update Clip

Update an existing clip. Requires API key. Endpoint: PUT /api/clip Headers:
Request Body:
Response:

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