Mora API
Version v1 · Last updated: 13 November 2026
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.
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
- Use HTTPS and
www.morapost.comexactly. Never put the key in a URL, a query string, or a public web page. - A key belongs to one workspace and only works on
/api/v1/*. Revoke it any time in the same settings page. - Group-limited keys: when creating a key you can pick one group (e.g. one brand's Facebook Page, Instagram and Threads). That key only sees and posts to the accounts in that group —
"platforms": ["facebook"]means that group's Facebook Page(s) — and only sees, edits and cancels posts made for that group. Use one key per brand or client. - Quick check that the key works (read-only, posts nothing):
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"
}'
| Field | Type | Notes |
|---|---|---|
caption | string | Up to 5,000 characters. Trimmed per platform (X 280, Threads 500). |
image_urls | string[] | Up to 10 public image URLs (or image_url for one). Downloaded and re-hosted by Mora, max 20 MB each. |
video_url | string | One public MP4/MOV URL, max 200 MB. Not together with images. |
platforms | string[] | Post to every connected, active account on these platforms. |
accounts | object | Or pick accounts exactly: {"facebook": ["<account_id>"]}. Use instead of platforms. |
scheduled_at | ISO 8601 | Include a timezone. Omit to publish now (within ~30 s). Max 1 year ahead. |
first_comment | string | Auto first comment (Facebook, Instagram). Up to 2,000 characters. |
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
status: comma list ofdraft, scheduled, publishing, published, partially_published, failed, missedfrom/to: on the post's time (published time, else scheduled time).tois exclusive.platform,source(api= created through the API),limit(default 100, max 500),offset
{ "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" }.
| Status | Meaning | What to do |
|---|---|---|
| 400 | Invalid input (message says which field) | Fix the request; don't retry as is. |
| 401 | Missing, wrong or revoked key | Check the Authorization header. |
| 402 | Trial ended or plan expired | Renew the plan in the app. |
| 403 | Key used outside /api/v1 | Use the documented endpoints only. |
| 404 | Post or webhook not found in this workspace | Check the id. |
| 409 | Post already publishing/published | It can't be changed or cancelled any more. |
| 413 / 422 | Media too large, not reachable, or wrong type | Use a public URL to a supported file. |
| 429 | Too many requests: {"error":"rate_limited","retry_after":60} | Wait retry_after seconds, then retry. |
| 5xx | Temporary server problem | Retry with backoff, reusing the same Idempotency-Key. |
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
Platform (platforms value) | Content | Notes |
|---|---|---|
facebook | Text, images, video | Pages. |
instagram | Image, carousel, video (Reel) | Needs at least one image or a video. |
threads | Text, images, video | Caption trimmed to 500. |
x | Text, up to 4 images, or 1 video (max 2:20) | Caption trimmed to 280. Available once the workspace has connected X. |
linkedin | Text, images, video | |
pinterest | Image pin | Needs an image. |
youtube | Video | Needs a video. |
tiktok | Video | Posted as "Only me" until TikTok approves the Mora app. |
Questions: reply to any Mora email or write to founder@morapost.com.