Nimply Developers
Examples

Post to all channels in the next slot

Fan a post out to every healthy channel's next free posting-schedule slot.

Scopes: channels:read, posts:write, posts:publish.

Each channel in Nimply has a posting schedule (weekday time slots). "schedule": "next_slot" drops the post into the next free slot of each channel independently — so one request can queue Instagram for 13:30 and LinkedIn for 18:00.

1. List channels and pick the healthy ones

curl https://api.nimply.io/v1/channels \
  -H "Authorization: Bearer $NIMPLY_API_KEY"

Keep only channels where isConnected is true and tokenStatus is not NEEDS_RECONNECT. Skip channels with isQueuePaused: true too — their scheduled posts won't go out until the queue is resumed.

2. Create one post per channel with next_slot

curl -X POST https://api.nimply.io/v1/posts \
  -H "Authorization: Bearer $NIMPLY_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: weekly-update-2026-w28" \
  -d '{
    "channelIds": [
      "123e4567-e89b-12d3-a456-426614174000",
      "3e0b9311-aaaa-4bbb-8ccc-000000000001"
    ],
    "content": "Our weekly update is out — highlights inside.",
    "schedule": "next_slot"
  }'

Both steps in JavaScript

const API = "https://api.nimply.io/v1";
const headers = {
  Authorization: `Bearer ${process.env.NIMPLY_API_KEY}`,
  "Content-Type": "application/json",
};

const { data: channels } = await (await fetch(`${API}/channels`, { headers })).json();

const healthy = channels.filter(
  (c) => c.isConnected && c.tokenStatus !== "NEEDS_RECONNECT" && !c.isQueuePaused
);

const posts = await (
  await fetch(`${API}/posts`, {
    method: "POST",
    headers: { ...headers, "Idempotency-Key": "weekly-update-2026-w28" },
    body: JSON.stringify({
      channelIds: healthy.map((c) => c.id),
      content: "Our weekly update is out — highlights inside.",
      schedule: "next_slot",
    }),
  })
).json();

for (const p of posts) console.log(p.channelId, p.status, p.scheduledAt);

Each returned post is SCHEDULED with its own scheduledAt — the slot Nimply picked for that channel.

Gotchas

  • Slots are configured per channel in the channel's own timezone. Inspect them with GET /v1/channels/{id}/schedule.
  • One post is created per channel — you get back an array of independent posts, each with its own id and lifecycle.
  • "next_slot" requires the posts:publish scope, like every schedule value other than "draft".

On this page