Scheduling and queue
Schedule for a time
Set scheduledFor to an ISO 8601 date-time and timezone to an IANA zone. The post is published within a few seconds of that moment.
curl -X POST "https://postkea.com/api/v1/posts" \
-H "Authorization: Bearer $POSTKEA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"content": "Doors open at 6. See you there.",
"platforms": [
{
"accountId": "acc_ig_5t1p"
},
{
"accountId": "acc_fb_7k2m"
}
],
"mediaItems": [
{
"type": "image",
"url": "https://cdn.example.com/poster.jpg"
}
],
"scheduledFor": "2026-11-14T17:30",
"timezone": "America/New_York"
}'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: "Doors open at 6. See you there.",
platforms: [
{
accountId: "acc_ig_5t1p",
},
{
accountId: "acc_fb_7k2m",
},
],
mediaItems: [
{
type: "image",
url: "https://cdn.example.com/poster.jpg",
},
],
scheduledFor: "2026-11-14T17:30",
timezone: "America/New_York",
}),
});
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": "Doors open at 6. See you there.",
"platforms": [
{
"accountId": "acc_ig_5t1p",
},
{
"accountId": "acc_fb_7k2m",
},
],
"mediaItems": [
{
"type": "image",
"url": "https://cdn.example.com/poster.jpg",
},
],
"scheduledFor": "2026-11-14T17:30",
"timezone": "America/New_York",
},
)
data = r.json()["data"]
print(data)- Without an offset, the time is the wall clock time in
timezone:2026-11-14T17:30inAmerica/New_Yorkis 5:30 in the afternoon in New York, daylight saving included. - With an offset or
Z, for example2026-11-14T22:30:00Z, the time is exact andtimezoneis only stored for display. - Times more than a minute in the past are rejected with
400 bad_request. The defaulttimezoneis UTC.
Add to the queue
Each account has a posting schedule: a list of weekly time slots. With addToQueue: true, every account gets the post in its own next free slot, so one request can land at 9:00 on X and 13:00 on LinkedIn.
curl -X POST "https://postkea.com/api/v1/posts" \
-H "Authorization: Bearer $POSTKEA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"content": "Tip of the week: glaze thin, fire slow.",
"platforms": [
{
"accountId": "acc_x_8f2k"
},
{
"accountId": "acc_li_3m9q"
}
],
"addToQueue": 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: "Tip of the week: glaze thin, fire slow.",
platforms: [
{
accountId: "acc_x_8f2k",
},
{
accountId: "acc_li_3m9q",
},
],
addToQueue: 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": "Tip of the week: glaze thin, fire slow.",
"platforms": [
{
"accountId": "acc_x_8f2k",
},
{
"accountId": "acc_li_3m9q",
},
],
"addToQueue": True,
},
)
data = r.json()["data"]
print(data)Queueing creates one post per account. The response lists them in posts. If an account has no free slot in the next three weeks, the request fails and tells you which account to add slots to.
Posting schedules
Until you set one, an account uses the default schedule: weekdays at 9:00, 13:00 and 17:00. Set your own with PUT /v1/accounts/{id}/schedule:
curl -X PUT "https://postkea.com/api/v1/accounts/acc_x_8f2k/schedule" \
-H "Authorization: Bearer $POSTKEA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"timezone": "Europe/Berlin",
"slots": [
{
"day": 1,
"time": "08:30"
},
{
"day": 3,
"time": "08:30"
},
{
"day": 5,
"time": "12:00"
},
{
"day": 6,
"time": "10:00"
}
]
}'const res = await fetch("https://postkea.com/api/v1/accounts/acc_x_8f2k/schedule", {
method: "PUT",
headers: {
Authorization: `Bearer ${process.env.POSTKEA_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
timezone: "Europe/Berlin",
slots: [
{
day: 1,
time: "08:30",
},
{
day: 3,
time: "08:30",
},
{
day: 5,
time: "12:00",
},
{
day: 6,
time: "10:00",
},
],
}),
});
const { data } = await res.json();
console.log(data);import os, requests
r = requests.put(
"https://postkea.com/api/v1/accounts/acc_x_8f2k/schedule",
headers={"Authorization": f"Bearer {os.environ['POSTKEA_API_KEY']}"},
json={
"timezone": "Europe/Berlin",
"slots": [
{
"day": 1,
"time": "08:30",
},
{
"day": 3,
"time": "08:30",
},
{
"day": 5,
"time": "12:00",
},
{
"day": 6,
"time": "10:00",
},
],
},
)
data = r.json()["data"]
print(data)GET /v1/accounts/{id}/schedule returns the schedule and the next upcoming slot times. To choose good slots, see the best times endpoint in Analytics.
See what is coming up
GET /v1/queue returns the scheduled and pending posts of the next days (default 14, up to 60) and every slot of every active account, marked as taken or free. Filter one account with accountId.
curl "https://postkea.com/api/v1/queue?days=7" \
-H "Authorization: Bearer $POSTKEA_API_KEY"const res = await fetch("https://postkea.com/api/v1/queue?days=7", {
headers: { Authorization: `Bearer ${process.env.POSTKEA_API_KEY}` },
});
const { data: queue } = await res.json();
console.log(queue);import os, requests
r = requests.get(
"https://postkea.com/api/v1/queue",
headers={"Authorization": f"Bearer {os.environ['POSTKEA_API_KEY']}"},
params={
"days": 7,
},
)
queue = r.json()["data"]
print(queue){
"success": true,
"data": {
"posts": [
{
"id": "post_2n7c",
"status": "scheduled",
"scheduledFor": "2026-10-21T07:00:00.000Z",
"content": "Tip of the week...",
"platforms": [
{
"accountId": "acc_x_8f2k",
"platform": "x",
"status": "pending"
}
]
}
],
"slots": [
{
"accountId": "acc_x_8f2k",
"platform": "x",
"at": "2026-10-21T07:00:00.000Z",
"taken": true
},
{
"accountId": "acc_x_8f2k",
"platform": "x",
"at": "2026-10-21T11:00:00.000Z",
"taken": false
}
]
}
}For a calendar view, GET /v1/posts/calendar returns posts between from and to (up to three months), optionally for one accountId or tag.
Reschedule and cancel
PATCH /v1/posts/{id}/schedulemoves a scheduled, pending or draft post to a newscheduledFor(and optionaltimezone).POST /v1/posts/{id}/cancelstops a scheduled or pending post and turns it back into a draft.PUT /v1/posts/{id}withstatus: "draft"unschedules a post, and withstatus: "scheduled"and ascheduledForschedules a draft.
curl -X PATCH "https://postkea.com/api/v1/posts/post_2n7c/schedule" \
-H "Authorization: Bearer $POSTKEA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"scheduledFor": "2026-10-22T09:00",
"timezone": "Europe/Berlin"
}'const res = await fetch("https://postkea.com/api/v1/posts/post_2n7c/schedule", {
method: "PATCH",
headers: {
Authorization: `Bearer ${process.env.POSTKEA_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
scheduledFor: "2026-10-22T09:00",
timezone: "Europe/Berlin",
}),
});
const { data: post } = await res.json();
console.log(post);import os, requests
r = requests.patch(
"https://postkea.com/api/v1/posts/post_2n7c/schedule",
headers={"Authorization": f"Bearer {os.environ['POSTKEA_API_KEY']}"},
json={
"scheduledFor": "2026-10-22T09:00",
"timezone": "Europe/Berlin",
},
)
post = r.json()["data"]
print(post)Approvals
A post waits for approval (status pending_approval) when:
- it was created by an API key with the
approvalpolicy, - the request had
requireApproval: true, - it was created by a team member with the contributor role, or
- the workspace setting
requireApprovalis on and the author cannot approve posts.
Approving schedules the post for its time, or publishes it right away when that time has passed. Rejecting sends it back to drafts with an optional note. Both send webhook events: post.approval_requested, post.approved and post.rejected.
curl -X POST "https://postkea.com/api/v1/posts/post_2n7c/approve" \
-H "Authorization: Bearer $POSTKEA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"note": "Looks good, ship it."
}'const res = await fetch("https://postkea.com/api/v1/posts/post_2n7c/approve", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.POSTKEA_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
note: "Looks good, ship it.",
}),
});
const { data: post } = await res.json();
console.log(post);import os, requests
r = requests.post(
"https://postkea.com/api/v1/posts/post_2n7c/approve",
headers={"Authorization": f"Bearer {os.environ['POSTKEA_API_KEY']}"},
json={
"note": "Looks good, ship it.",
},
)
post = r.json()["data"]
print(post)Evergreen posts
Some posts are worth repeating. With evergreen, each time the post publishes successfully a copy is scheduled everyDays later, until it has repeated maxRepeats times (no limit when it is not set).
{
"content": "New here? Start with our beginner guide.",
"platforms": [
{
"accountId": "acc_x_8f2k"
}
],
"scheduledFor": "2026-11-01T10:00",
"timezone": "UTC",
"evergreen": {
"everyDays": 30,
"maxRepeats": 6
}
}