Mora API

Create, schedule, reschedule and track posts on the accounts connected to your Mora workspace — from n8n, Make, Zapier, a script, or an AI agent. Posts created through the API go into the same queue and calendar as posts made in the app.

Tiếng Việt: Mọi lệnh gọi đều gửi tới https://www.morapost.com/api/v1, kèm header Authorization: Bearer mora_sk_…. Tạo khoá trong Mora → Cài đặt → API & tích hợp. Không gửi khoá tới bất kỳ địa chỉ nào khác.

AuthenticationPostsMetricsWebhooksErrors & limitsPlatforms

1. Base URL and authentication

Base URL — the only host that accepts your key:

https://www.morapost.com/api/v1

Create a key in the app: Settings → API & integrations → Create key. It starts with mora_sk_ and is shown once. Send it on every request:

Authorization: Bearer mora_sk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Content-Type: application/json
curl https://www.morapost.com/api/v1/accounts \
  -H "Authorization: Bearer mora_sk_..."

2. Connected accounts

GET/accounts — the accounts you can post to.

{ "accounts": [
  { "platform": "facebook", "account_id": "1115303838329452", "name": "My Page", "status": "active" },
  { "platform": "instagram", "account_id": "27594644706891879", "name": "my.shop", "status": "active" }
] }

status is active or needs_reconnect. Connect accounts in the app (Connect Accounts page); the API can't connect them.

3. Posts

POST/posts — create and schedule

curl -X POST https://www.morapost.com/api/v1/posts \
  -H "Authorization: Bearer mora_sk_..." \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: sheet-row-42" \
  -d '{
    "caption": "Weekend sale — 30% off!",
    "image_urls": ["https://example.com/photo.jpg"],
    "platforms": ["facebook", "instagram"],
    "scheduled_at": "2026-11-20T09:00:00+07:00"
  }'

Response 201:

{ "ok": true, "post": {
  "id": "1794495624991-7vdm8u", "status": "scheduled",
  "scheduled_at": "2026-11-20T02:00:00.000Z", "published_at": null,
  "platforms": ["facebook", "instagram"], "accounts": { "facebook": ["…"], "instagram": ["…"] },
  "links": [], "error": null, "caption": "Weekend sale — 30% off!"
} }

Idempotency-Key (recommended): any unique string per post, e.g. your sheet row id. Repeating a request with the same key within 24 h returns the first post instead of creating a duplicate.

GET/posts — list

GET /posts?status=scheduled,failed&from=2026-11-01T00:00:00Z&to=2026-12-01T00:00:00Z&platform=facebook&limit=100
{ "posts": [ … ], "has_more": true, "next_offset": 100 }

GET/posts/{id} — status and links

Returns { "post": { … } }. After publishing, links lists each platform's post URL and error explains any target that failed.

PATCH/posts/{id} — reschedule or edit

curl -X PATCH https://www.morapost.com/api/v1/posts/1794495624991-7vdm8u \
  -H "Authorization: Bearer mora_sk_..." -H "Content-Type: application/json" \
  -d '{ "scheduled_at": "2026-11-21T19:30:00+07:00", "caption": "New text" }'

Accepts scheduled_at, caption, first_comment. Only for posts not yet publishing (draft, scheduled, failed, missed; otherwise 409). A new scheduled_at puts a failed post back in the queue. To change media or targets, delete and create a new post.

DELETE/posts/{id} — cancel

Removes a post that hasn't been published. Published posts return 409 (delete them on the platform itself).

4. Metrics

GET/posts/{id}/metrics — live numbers for a published post, refreshed at most every 10 minutes.

{ "post_id": "…", "fetched_at": "…", "targets": [
  { "platform": "youtube", "url": "https://www.youtube.com/watch?v=…", "metrics": { "views": 77, "likes": 3, "comments": 1 }, "unavailable": null },
  { "platform": "facebook", "metrics": { "likes": 1, "comments": 0 }, "unavailable": "views/reach need the read_insights permission" },
  { "platform": "threads", "metrics": null, "unavailable": "Threads metrics need the threads_manage_insights permission (Meta app review)" }
] }

Available today: Facebook likes/reactions, comments, shares · Instagram likes, comments · YouTube views, likes, comments · X views, likes, replies, reposts. Fields Mora can't read are listed in unavailable, never estimated.

5. Webhooks

Get a POST on your server when a post finishes, instead of polling.

curl -X POST https://www.morapost.com/api/v1/webhooks \
  -H "Authorization: Bearer mora_sk_..." -H "Content-Type: application/json" \
  -d '{ "url": "https://your-server.com/mora-hook", "events": ["post.failed", "post.published"] }'

The response includes a secret (whsec_…), shown once. Events: post.published, post.partially_published, post.failed (default: all). HTTPS only, up to 5 per workspace. GET/webhooks lists them, DELETE/webhooks/{id} removes one.

Each delivery:

POST https://your-server.com/mora-hook
Mora-Event: post.failed
Mora-Delivery: evt_…
Mora-Signature: t=1794500000,v1=5f2b…

{ "id": "evt_…", "type": "post.failed", "created_at": "…", "data": { "post": { …same shape as GET /posts/{id}… } } }

Verify it: v1 is the hex HMAC-SHA256 of "<t>.<raw body>" with your secret; reject if it doesn't match or t is older than 5 minutes.

// Node.js
const crypto = require("crypto");
function verify(secret, rawBody, header) {
  const [, t, v1] = header.match(/^t=(\d+),v1=([0-9a-f]{64})$/) || [];
  if (!t || Math.abs(Date.now() / 1000 - t) > 300) return false;
  const want = crypto.createHmac("sha256", secret).update(`${t}.${rawBody}`).digest("hex");
  return crypto.timingSafeEqual(Buffer.from(want), Buffer.from(v1));
}

Answer with any 2xx within 10 seconds. Otherwise Mora retries after 30 s, 5 min and 30 min.

6. Errors and limits

Errors are JSON: { "error": "invalid_request", "message": "scheduled_at is in the past" }.

Rate limit: 240 requests per minute per workspace. Posting is also capped by a fair-use limit of 100 posts per day per workspace.

7. Platforms

Questions: reply to any Mora email or write to founder@morapost.com.