Developers
REST API endpoint reference
Every public /v1 route with its scope, inputs, response status, and integration boundary, plus the session-only key and webhook management routes.
Updated
Base URL and response conventions
Use https://api.krevaya.com with the paths below. Send a Bearer API key or OAuth access token. JSON requests use Content-Type: application/json. The default success status is 200; creation, asynchronous acceptance, and deletion statuses are called out below. IDs are strings in JSON responses.
Account and post routes
| Method and path | Scope | Input and result |
|---|---|---|
| GET /v1/me | Authenticated key | Returns email, effective plan, scopes |
| GET /v1/brands | read | The brands this account owns: id, uuid, name, is_default, is_active, niche, publish_mode. A brand shared with you by another account is not listed. |
| GET /v1/channels | read | Returns channels: every channel Krevaya has built, each with slug, label, text_limit (its caption cap), review_first, connection fields, and per-post settings. It is a catalog, not your connections, and it can include channels that can't be connected yet. It never returns credentials. |
| GET /v1/lineups | read | Query: brand_id (one of your own brands; omitted, the brand selected in the dashboard). Returns brand, connected, lineups (id, name, is_starter, channels with platform, first_comment, offset_minutes, connected) and note. Pass a Lineup's name or id as POST /v1/posts' lineup. |
| GET /v1/posts | read | Query: status_filter (default draft), limit (default 25, clamped 1–100), brand_id. Returns a post array. |
| GET /v1/posts/{post_id} | read | Returns one full post, including status, kind, body, media_paths, scheduled_for, published_at, external_post_id, permalink_url, and error. 404 when it is not in your account. |
| POST /v1/posts | publish | Required body and either platform or lineup. Optional hashtags, schedule_at, kind, asset_ids, brand_id, layout, template, design_id, first_comment. Optional Idempotency-Key header (1–128 printable ASCII characters, no spaces; requires brand_id). Returns a post receipt (201); with lineup, one post per connected channel of the Lineup: lineup, posts, post_ids, failed, dropped. A repeat with the same key and body returns the original receipt with idempotency_replayed: true; the same key with a different body is 409. |
| POST /v1/posts/{post_id}/schedule | publish | Required schedule_at: a future ISO-8601 string with Z or a UTC offset. Optional approve (default false); a draft or rejected post needs approve: true, which approves it. An approved, scheduled, or failed post moves to the new time. Returns id, status: scheduled, scheduled_at. Pinterest, TikTok, Tumblr and YouTube drafts are refused (403). |
| POST /v1/posts/{post_id}/unschedule | publish | Returns a scheduled post to draft: id, status: draft. Repeating it on a draft changes nothing; any other status is 409. |
| DELETE /v1/posts/{post_id} | publish | Deletes a post that has not gone out (draft, approved, scheduled, failed, or rejected) for good; no response body (204). It will not publish and can't be recovered. 404 when it is not in your account; 409 with the reason while it is publishing, once it is published (delete it on the platform), or for a Studio creation. |
| POST /v1/posts/{post_id}/favorite | publish | Star a post; returns the post with favorited_at |
| DELETE /v1/posts/{post_id}/favorite | publish | Clear its star; returns the post with favorited_at cleared (200) |
| POST /v1/posts/{post_id}/reject | publish | Optional reason and code; returns id and status |
| PATCH /v1/posts/{post_id}/design | publish | Optional template, layout, layout_version, only_this_post. Re-renders and returns creation state and media_paths. |
| POST /v1/generate | generate | Source url or text, optional instruction and brand_id. Returns source_id and post_ids after generation finishes. |
Automation routes
These brand-explicit routes serve workflow tools such as n8n and Make. Every route requires brand_id except brands and platforms. An unknown brand returns 404 here, rather than the 400 that POST /v1/posts returns.
| Method and path | Scope | Input and result |
|---|---|---|
| GET /v1/automation/brands | read | Returns brands: id, uuid, name, is_default. |
| GET /v1/automation/platforms | read | Returns platforms: id, name, and the post kinds each accepts. |
| POST /v1/automation/drafts | draft | Required Idempotency-Key header (8–200 characters: letters, digits, and . _ : / -), brand_id, platform, and body. Optional hashtags, kind, asset_ids; no other field is accepted. Returns the draft with requires_review: true (201). A repeat returns 200 with Idempotency-Replayed: true; the same key with different content is 409, and a key whose draft was deleted is 410. |
| GET /v1/automation/posts | read | Query: brand_id (required), status (default draft), before, limit (1–100, default 25). Returns posts and next_cursor; pass next_cursor as before for the next page. |
| GET /v1/automation/posts/{post_id} | read | Query: brand_id (required). Returns that brand's post: id, uuid, brand_id, platform, kind, body, hashtags, status, scheduled_at, published_at, permalink_url, error, created_at. |
| GET /v1/automation/events | read | Query: brand_id (required), after (default 0), limit (1–100, default 100), since (only with after=0). Returns events (post.published and post.failed from the last 30 days, each with event_id, type, occurred_at, post_id, platform, status, permalink_url, body_preview, error), next_cursor, has_more, retention_days. Pass next_cursor as after on the next call; an expired cursor is 410. |
Drafts from POST /v1/automation/drafts always wait for a person in Krevaya, even when the brand's Publish mode is Auto.
Media routes
| Method and path | Scope | Input and result |
|---|---|---|
| GET /v1/assets | read | Query: kind, brand_id, q, limit (1–200), cursor. Returns assets, next_cursor, and storage. |
| POST /v1/assets | media | JSON url: public image/video URL. Returns the imported asset (201). |
| POST /v1/assets/upload | media | Raw image bytes; returns the asset (201). This is not multipart/form-data. |
| POST /v1/assets/upload/init | media | JSON filename and size_bytes. Returns upload_id and part_bytes, with an optional direct storage grant. |
| PUT /v1/assets/upload/part | media | Query upload_id and zero-based index; body is raw bytes. |
| POST /v1/assets/upload/finish | media | JSON upload_id and parts (1–80). Returns the video asset (201). |
| DELETE /v1/assets/{asset_id} | media | Delete an owned asset; no response body (204). |
Brand memory routes
| Method and path | Scope | Input and result |
|---|---|---|
| GET /v1/brand-memory | read | Optional brand_id query. Returns brand_id, doc, version, confidence, gaps, updated_at. |
| PATCH /v1/brand-memory | generate | Required expected_version (at least 1), ops (up to 40); optional brand_id. Returns updated state and refused count. |
| POST /v1/brand-memory/import | generate | Optional platforms and brand_id. Returns job_id and status (202). |
| POST /v1/brand-memory/genome | generate | Optional url, run, brand_id. Returns job_id, status, and credits (202). |
Operations exposed through another interface
The REST surface is intentionally smaller than the MCP tool set. Do not construct a /v1 route by guessing from a dashboard request or tool name.
| Task | Supported interface |
|---|---|
| Read one full post | GET /v1/posts/{post_id} or MCP get_post |
| Schedule or unschedule an existing post | POST /v1/posts/{post_id}/schedule and /unschedule, or MCP schedule_post and unschedule_post |
| Delete a post that has not gone out | DELETE /v1/posts/{post_id} or MCP delete_post |
| Approve without scheduling, or change an existing post's copy | MCP approve_post and update_post |
| Read brands, connected accounts or Lineups | GET /v1/brands and GET /v1/lineups, or MCP list_brands, list_accounts and list_lineups |
| Create a standalone creation or drawing | MCP create_design and create_drawing |
| Edit individual layers or preview a creation | MCP get_layers, edit_layers, preview_design |
| Export a video or poll a background job | MCP export_video and job_status |
| Read analytics, queue counts, best posting times, or the latest weekly audit | MCP get_analytics, get_queue_summary, get_best_times, get_audit |
| Manage keys | Settings → API keys & MCP in Krevaya (signed-in session routes /apikeys) |
| Register webhook endpoints | Signed-in session route /webhooks only, with no settings screen yet: ask Krevaya support, or poll GET /v1/automation/events with a key |
Check both HTTP status and the response body
REST failures normally include detail. A 422 can contain structured validation errors rather than a single sentence. Native layout creation is a special partial-success case: the draft can be created with HTTP 201 while render_error explains that rendering failed. Save its id and retry the creation operation on that draft.