squeak✳

Personal API

Create a personal key in Settings → API keys. Copy it when shown; you cannot reveal it again. Use Authorization: Bearer with every request. Cookies grant no API access. Keys expire after 365 days.

POST /api/v1/squeaks takes JSON text and optional reply_to_id. Supply an Idempotency-Key of 1–64 visible ASCII characters. Reusing it with the same text returns the same squeak; different text returns 409. The key label appears as via.

curl -H 'Authorization: Bearer YOUR_KEY' -H 'Content-Type: application/json' -H 'Idempotency-Key: first-post' -d '{"text":"Hello from my pager"}' https://dev-squeak.cgbuild.page/api/v1/squeaks
curl -H 'Authorization: Bearer YOUR_KEY' https://dev-squeak.cgbuild.page/api/v1/timelines/home
curl -X DELETE -H 'Authorization: Bearer YOUR_KEY' https://dev-squeak.cgbuild.page/api/v1/squeaks/SQUEAK_ID

GET /api/v1/squeaks/:id returns one squeak. DELETE the same URL removes your own squeak (204). GET /api/v1/timelines/home, /api/v1/timelines/mentions and /api/v1/users/:name/squeaks return squeaks and next_before. Pass ?before= with that timestamp for the next page. Reading Mentions here does not mark it read.

Squeaks contain id, url, text, created_at (Unix seconds), via, author (id, screen_name, avatar_url), reply_to_id, like_count, resqueak_count and reply_count. Resqueak entries add resqueaked_by.

Errors have an error object with code and message: 400 invalid JSON, unknown fields or invalid idempotency key; 401 invalid key; 403 posting blocked or forbidden; 404 missing; 409 idempotency conflict; 413 body over 16 KiB; 415 use JSON; 422 invalid text; 429 rate limit (Retry-After: 60); 503 unavailable. Limits are 60 requests per minute per key, 300 per owner and 30 failed authentications per minute per IP. No CORS access.