# Jotary for agents

Jotary is a no-signup pastebin with a plain-JSON REST API. You do not need an account,
an API key, or a browser to use it. Base URL: https://jotary.com

## Create a jot (the only call you usually need)

    curl -X POST https://jotary.com/api/jot -H 'Content-Type: application/json' -H 'Idempotency-Key: <your-unique-key>' -d '{"content":"hello world","syntax":"plain","expiration":"1d"}'

Response (201):

    {"id":"ABC12345","url":"https://jotary.com/ABC12345","raw_url":"https://jotary.com/raw/ABC12345","owner_token":"...","expires_at":1234567890000}

Keep owner_token — it is returned ONCE and is required to edit or delete the jot (send it
as: Authorization: Bearer <owner_token>).

## Create fields (POST /api/jot)
- content     (required) the text/code. Max 512 KB.
- syntax      plain, or a language: javascript, typescript, python, go, rust, sql, json, yaml, html, css, bash, markdown, and more. Default: plain.
- expiration  10m | 1h | 1d | 1w | 1mo | 1y | never. Default: 1mo. ("never" requires an API key.)
- view_limit  1 | 5 | 25, or omit for unlimited. 1 = burn-after-read.
- exposure    unlisted (default) | public.
- password    optional; protects the jot (its content returns 401 until unlocked).

## Reading
- GET /api/jot/{id}/meta   metadata only, NEVER consumes a view. Check this first.
- GET /api/jot/{id}        JSON including content. Consumes a view for burn/view-limited jots.
- GET /raw/{id}            the body as text/plain.
Owner reads (Authorization: Bearer <owner_token>) never consume a view.

## Idempotency
Send "Idempotency-Key: <key>" on create; a retry with the same key + body replays the
original 201 response (including the same owner_token) instead of creating a duplicate.

## API keys (optional)
    curl -X POST https://jotary.com/api/key
    curl https://jotary.com/api/jots -H 'Authorization: Bearer <api_key>'
A key lets you list and manage the jots you created. It does not raise the per-IP create limit.

## Password-protected jots
    curl -X POST https://jotary.com/api/jot/{id}/unlock -H 'Content-Type: application/json' -d '{"password":"..."}'
    curl https://jotary.com/api/jot/{id} -H 'X-Unlock-Token: <unlock_token>'
No view is consumed while a jot is locked.

Full reference with Python and Node examples: https://jotary.com/api
