Quickstart
Create an API key
In the dashboard, open Developers, API keys and choose Create key. Give it a name, keep the default
autopolicy for now, and copy the key. It is shown only once and starts withkea_live_. Keep it in an environment variable or a secret manager, never in client side code.shellexport POSTKEA_API_KEY="kea_live_..."Check the key. This call is free:
curl "https://postkea.com/api/v1/me" \ -H "Authorization: Bearer $POSTKEA_API_KEY"const res = await fetch("https://postkea.com/api/v1/me", { headers: { Authorization: `Bearer ${process.env.POSTKEA_API_KEY}` }, }); const { data } = await res.json(); console.log(data);import os, requests r = requests.get( "https://postkea.com/api/v1/me", headers={"Authorization": f"Bearer {os.environ['POSTKEA_API_KEY']}"}, ) data = r.json()["data"] print(data)Connect an account
The quickest way is the dashboard: Channels, Connect a channel. From the API, start an OAuth connection and send the person to the returned
url. After they approve, they land on yourredirectUrlwithconnectedandaccountquery parameters.curl -X POST "https://postkea.com/api/v1/connect/linkedin" \ -H "Authorization: Bearer $POSTKEA_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "redirectUrl": "https://yourapp.com/connected" }'const res = await fetch("https://postkea.com/api/v1/connect/linkedin", { method: "POST", headers: { Authorization: `Bearer ${process.env.POSTKEA_API_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ redirectUrl: "https://yourapp.com/connected", }), }); const { data } = await res.json(); console.log(data);import os, requests r = requests.post( "https://postkea.com/api/v1/connect/linkedin", headers={"Authorization": f"Bearer {os.environ['POSTKEA_API_KEY']}"}, json={ "redirectUrl": "https://yourapp.com/connected", }, ) data = r.json()["data"] print(data)Bluesky, Mastodon, Telegram, Discord, Slack and custom webhooks connect with credentials instead of OAuth:
curl -X POST "https://postkea.com/api/v1/connect/bluesky/credentials" \ -H "Authorization: Bearer $POSTKEA_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "values": { "handle": "studiolumen.bsky.social", "appPassword": "xxxx-xxxx-xxxx-xxxx" } }'const res = await fetch("https://postkea.com/api/v1/connect/bluesky/credentials", { method: "POST", headers: { Authorization: `Bearer ${process.env.POSTKEA_API_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ values: { handle: "studiolumen.bsky.social", appPassword: "xxxx-xxxx-xxxx-xxxx", }, }), }); const { data } = await res.json(); console.log(data);import os, requests r = requests.post( "https://postkea.com/api/v1/connect/bluesky/credentials", headers={"Authorization": f"Bearer {os.environ['POSTKEA_API_KEY']}"}, json={ "values": { "handle": "studiolumen.bsky.social", "appPassword": "xxxx-xxxx-xxxx-xxxx", }, }, ) data = r.json()["data"] print(data)List the connected accounts and note the
idof each one. You pass it asaccountIdwhen posting. See Accounts and connecting for profiles, connect links and your own OAuth apps.curl "https://postkea.com/api/v1/accounts" \ -H "Authorization: Bearer $POSTKEA_API_KEY"const res = await fetch("https://postkea.com/api/v1/accounts", { headers: { Authorization: `Bearer ${process.env.POSTKEA_API_KEY}` }, }); const { data: accounts } = await res.json(); console.log(accounts);import os, requests r = requests.get( "https://postkea.com/api/v1/accounts", headers={"Authorization": f"Bearer {os.environ['POSTKEA_API_KEY']}"}, ) accounts = r.json()["data"] print(accounts)Publish a post
One request posts to every account in
platforms. Each entry can override the text for its network.curl -X POST "https://postkea.com/api/v1/posts" \ -H "Authorization: Bearer $POSTKEA_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "content": "We just shipped dark mode.", "platforms": [ { "accountId": "acc_x_8f2k" }, { "accountId": "acc_li_3m9q", "content": "Dark mode is now live for every workspace. Here is what changed and why." } ], "publishNow": true }'const res = await fetch("https://postkea.com/api/v1/posts", { method: "POST", headers: { Authorization: `Bearer ${process.env.POSTKEA_API_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ content: "We just shipped dark mode.", platforms: [ { accountId: "acc_x_8f2k", }, { accountId: "acc_li_3m9q", content: "Dark mode is now live for every workspace. Here is what changed and why.", }, ], publishNow: true, }), }); const { data } = await res.json(); console.log(data);import os, requests r = requests.post( "https://postkea.com/api/v1/posts", headers={"Authorization": f"Bearer {os.environ['POSTKEA_API_KEY']}"}, json={ "content": "We just shipped dark mode.", "platforms": [ { "accountId": "acc_x_8f2k", }, { "accountId": "acc_li_3m9q", "content": "Dark mode is now live for every workspace. Here is what changed and why.", }, ], "publishNow": True, }, ) data = r.json()["data"] print(data)With
publishNowthe request waits up to 25 seconds for the networks to answer, so you usually get the final result straight away. Each platform reports its ownstatus, URL and error.Response{ "success": true, "data": { "post": { "id": "post_8f2k1x9q0m3v7n4b2c6d", "status": "published", "content": "We just shipped dark mode.", "scheduledFor": null, "platforms": [ { "accountId": "acc_li_3m9q", "platform": "linkedin", "status": "published", "success": true, "platformPostUrl": "https://www.linkedin.com/feed/update/urn:li:share:7251", "error": null, "warnings": [], "creditsCharged": 1 }, { "accountId": "acc_x_8f2k", "platform": "x", "status": "published", "success": true, "platformPostUrl": "https://x.com/studiolumen/status/1849", "error": null, "warnings": [], "creditsCharged": 1 } ] }, "issues": [] } }If one network fails, the post is markedpartial, only the networks that published are charged, andPOST /v1/posts/{id}/retrytries the failed ones again. Sendwait: falseto return immediately and follow progress with webhooks.Schedule the next one
Replace
publishNowwithscheduledForand atimezone. A time without an offset is read in that time zone, so2026-11-03T09:00inEurope/Berlingoes out at 9:00 Berlin time. TheidempotencyKeymakes it safe to retry the request.curl -X POST "https://postkea.com/api/v1/posts" \ -H "Authorization: Bearer $POSTKEA_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "content": "Our spring workshop opens for booking today.", "platforms": [ { "accountId": "acc_x_8f2k" }, { "accountId": "acc_li_3m9q" } ], "scheduledFor": "2026-11-03T09:00", "timezone": "Europe/Berlin", "idempotencyKey": "workshop-launch-2026-11-03" }'const res = await fetch("https://postkea.com/api/v1/posts", { method: "POST", headers: { Authorization: `Bearer ${process.env.POSTKEA_API_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ content: "Our spring workshop opens for booking today.", platforms: [ { accountId: "acc_x_8f2k", }, { accountId: "acc_li_3m9q", }, ], scheduledFor: "2026-11-03T09:00", timezone: "Europe/Berlin", idempotencyKey: "workshop-launch-2026-11-03", }), }); const { data } = await res.json(); console.log(data);import os, requests r = requests.post( "https://postkea.com/api/v1/posts", headers={"Authorization": f"Bearer {os.environ['POSTKEA_API_KEY']}"}, json={ "content": "Our spring workshop opens for booking today.", "platforms": [ { "accountId": "acc_x_8f2k", }, { "accountId": "acc_li_3m9q", }, ], "scheduledFor": "2026-11-03T09:00", "timezone": "Europe/Berlin", "idempotencyKey": "workshop-launch-2026-11-03", }, ) data = r.json()["data"] print(data)Not sure the post fits every network? Send the same body to
POST /v1/posts/validate(or adddryRun: true) to get each platform's errors and warnings without saving anything. Prefer a queue? UseaddToQueue: trueand each account's next free time slot is used, see Scheduling and queue.Next steps
- Add images and videos with Media, and learn every per-network option in Posting.
- Pull transcripts, comments and stats with Scraping.
- Get told when posts publish or fail with Webhooks.
- Let Claude, Codex or Cursor do all of this with the MCP server.