Posts, media, analytics and usage endpoints + idempotency and plan metering
The /v1 surface grows to 17 operations: full post lifecycle, media uploads via presigned PUT, workspace analytics, and a usage meter — with a Postgres-backed idempotency ledger and per-plan API metering.
Added
- Posts: list, create (draft / scheduled / publish-now), get, reschedule, delete, and publish — 12 new operations across posts, media, analytics, and usage.
- Idempotency-Key on POST /v1/posts: a 24-hour ledger replays the original response verbatim (Idempotency-Replayed: true) and answers key reuse with a different body with 422 idempotency_key_reused.
- Media uploads: POST /v1/media/uploads returns a presigned PUT URL; complete the upload to get a library asset usable in posts.
- api_requests metering per plan, with distinct errors: 403 feature_not_enabled (plan lacks the API) vs 429 quota_exhausted (monthly allowance consumed).
- Per-key burst limits derived from your plan, stamped at key mint and re-synced on billing events.
Changed
- Dangerous operations (DELETE /v1/posts/{id}, POST /v1/posts/{id}/publish) return 403 dangerous_ops_disabled until an org owner enables them in Settings → API keys.
