Getting started

popkit REST API

popkit's capabilities as a REST API for your scripts, automation platforms and back ends: with one long-lived credential you can read accounts and posts, save drafts, schedule, publish, reply to comments and read analytics. It shares its foundation with popkit's MCP server — the same scopes, rate limits, idempotency and audit — just a different way to call it.

Base URL

https://popkit.loxily.com/api/v1

HTTPS only; requests and responses are JSON (Content-Type: application/json). v1 in the path is the major version: within a version we only make backward-compatible additions (new fields, endpoints, enum values), so ignore fields you do not recognise.

Start here

All endpoints (20)

Grouped by domain. Each endpoint has its own page with parameter tables, cURL / JavaScript / Python samples and response examples per status.

Workspace & accounts — Who am I, which accounts are connected, what quota is left.

MethodPathWhat it does
GET/api/v1/workspaceWorkspace context
GET/api/v1/accountsConnected accounts

Posts — Drafts, scheduling, edits, rescheduling, approval and prechecks.

MethodPathWhat it does
GET/api/v1/postsList posts
GET/api/v1/posts/{postId}Get a post
POST/api/v1/postsCreate a post
PATCH/api/v1/posts/{postId}Update a post
POST/api/v1/posts/precheckPublish precheck
POST/api/v1/posts/{postId}/rescheduleReschedule
POST/api/v1/posts/{postId}/submitSubmit for approval
POST/api/v1/posts/{postId}/cover-suggestionsSuggest covers
POST/api/v1/posts/{postId}/coverSet cover

Publishing — The two endpoints that actually go out: confirm and publish / retry.

MethodPathWhat it does
POST/api/v1/posts/{postId}/confirmConfirm publish
POST/api/v1/posts/{postId}/publishPublish / retry

Media — Hand images / videos to popkit in exchange for a publishable media URL.

MethodPathWhat it does
POST/api/v1/mediaAttach media

Comments — The comment inbox and replying as the account.

MethodPathWhat it does
GET/api/v1/commentsComment inbox
POST/api/v1/comments/{commentId}/repliesReply to a comment

Idea board — Groups and ideas on the planning board.

MethodPathWhat it does
GET/api/v1/ideasList ideas
POST/api/v1/ideasCreate an idea
PATCH/api/v1/ideas/{ideaId}Update an idea

Analytics — Metrics overview, same definitions as the in-app analytics page.

MethodPathWhat it does
GET/api/v1/analytics/summaryAnalytics summary

Response envelope

Success
{
  "data": {
    "…": "…"
  },
  "meta": {
    "requestId": "3f9c1e2a-7d4b-4c1e-9a6f-0b2d8e5c7a11"
  }
}
Failure
{
  "error": {
    "code": "forbidden",
    "message": "credential lacks scope posts:write",
    "params": {
      "scope": "posts:write"
    }
  },
  "meta": {
    "requestId": "3f9c1e2a-7d4b-4c1e-9a6f-0b2d8e5c7a12"
  }
}
FieldTypeMeaning
dataobjectPayload on success; shape depends on the endpoint.
error.codestringMachine code to branch on; full table under Errors.
error.messagestring | nullEnglish hint for developers / models; not UI copy.
error.paramsobject | nullMachine-readable extras such as { limit, used } or { scope }.
meta.requestIdstringRequest id (also in the X-Request-Id header); quote it when asking for help.
meta.replayedboolean?true when this is the cached result of an earlier call with the same Idempotency-Key.

Relationship to the MCP server

REST and MCP are two façades over one capability core: the 20 endpoints map one-to-one to the 20 MCP tools, input schemas are byte-identical, and rate limits and idempotency caches are shared per credential (5 publishes over REST also use up 5 of the same credential's MCP publish budget). Unattended scripts and automation platforms use REST; AI assistants with a human present use MCP (which supports OAuth and two-step confirmation).