Skip to content

REST API

The Postlyra REST API lives at https://api.postlyra.com. It is a JSON API authenticated with a bearer token.

It covers account and brand management, media, members, subscription state, and the idea import surface the CLI uses. It does not publish: there is no endpoint that creates a scheduled post or pushes content to a social platform. Publishing requires a human approving a draft in Studio, and that rule has no API bypass.

Base URL

https://api.postlyra.com

Both https://api.postlyra.com/auth/me and https://api.postlyra.com/api/auth/me resolve. The unprefixed form is canonical, the prefixed one is a fallback that keeps local installs working.

A first call

bash
curl https://api.postlyra.com/auth/me \
  -H "Authorization: Bearer $POSTLYRA_TOKEN" \
  -H "Accept: application/json"
json
{
  "user": { "id": 1, "name": "Ada Lovelace", "email": "[email protected]" },
  "teams": [{ "id": 1, "name": "My Brand", "slug": "0f8fad5b-d9cb-469f-a165-70867728950e" }],
  "current_team": { "id": 1, "name": "My Brand" }
}

See Authentication for how to get $POSTLYRA_TOKEN.

What you need to know

  • Authentication — create a token, and the login flow if you want to mint one programmatically.
  • Choosing a brand — one token reaches every brand you belong to, so most endpoints need to know which one you mean.
  • Errors — including one status-code quirk that will bite you if you do not know about it.
  • Rate limits — what is throttled and what is not.
  • Endpoint index — every route, generated from the router.

What is not here

Outbound webhooks do not exist. You cannot subscribe to an event and receive a callback when a post publishes or a DM arrives. See Webhooks for what the webhook endpoints in Postlyra actually are, and how to poll instead.

There are no token scopes. Every token carries full account access. Treat one like a password.

There is no publishing endpoint. If you want to get content into Postlyra programmatically, push ideas, or use the MCP server's create_draft tool to write a draft. Both land in a human review queue.

Postlyra, by MAVA Design