Scheduler
Base path: /v1/scheduler
Queue blog or social posts for connected destinations (Webflow, WordPress, Notion, LinkedIn, webhooks, and more). Auth with an api-key header (Business+ plans) or a session JWT.
Create a schedule
POST /v1/scheduler/create
| Field | Type | Required | Description |
|---|---|---|---|
exportTo | string | yes | Destination id: webflow, wordpress, notion, linkedin, webhook, … |
contentToExport | object | yes* | Destination payload. *Or omit and pass title / text / content instead |
title | string | no | Convenience field merged into contentToExport |
text | string | no | Post body (LinkedIn). Merged into contentToExport |
content | string | no | Blog/CMS body. Merged into contentToExport |
whenToExport | string (ISO-8601) | yes* | When to publish. *Required unless status is draft |
status | string | no | pending (default) or draft |
webhookId | string | no | Required when targeting a saved webhook |
imageUrl | string | no | Hosted https image URL (or data: URL — Ranktune re-hosts it) |
imageBase64 | string | no | Raw base64 or data URL; Ranktune uploads to storage and sets imageUrl |
image | object | no | Uploaded file from ChatGPT / MCP hosts (download_url, file_id, optional mime_type, file_name) |
imageMimeType | string | no | Hint when using imageBase64 |
confirm | boolean (true) | yes* | MCP / careful clients: must be true after the user approves. *Required by the MCP schedule_content tool; optional for direct API calls from the Ranktune app |
When image, imageBase64, or a data: imageUrl is provided, Ranktune downloads/decodes the bytes, stores them, and writes a durable contentToExport.imageUrl before creating the schedule. Raw image blobs are not persisted in the schedule document.
LinkedIn with a hosted image URL
curl -X POST https://api.tryranktune.com/v1/scheduler/create \
-H "api-key: YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"exportTo": "linkedin",
"whenToExport": "2026-10-01T15:00:00.000Z",
"title": "Product launch",
"text": "We just shipped…",
"imageUrl": "https://cdn.example.com/cover.png"
}'
LinkedIn with base64 image bytes
curl -X POST https://api.tryranktune.com/v1/scheduler/create \
-H "api-key: YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"exportTo": "linkedin",
"whenToExport": "2026-10-01T15:00:00.000Z",
"title": "Product launch",
"text": "We just shipped…",
"imageBase64": "data:image/png;base64,iVBORw0KGgo…",
"imageFileName": "cover.png"
}'
ChatGPT / MCP uploaded file
MCP clients that support OpenAI file params (including ChatGPT) pass an image object:
{
"exportTo": "linkedin",
"whenToExport": "2026-10-01T15:00:00.000Z",
"title": "Product launch",
"text": "We just shipped…",
"image": {
"download_url": "https://…",
"file_id": "file_…",
"mime_type": "image/png",
"file_name": "cover.png"
}
}
Ranktune fetches download_url immediately (it is temporary), stores the image, then schedules with the resulting imageUrl.
Success (200)
{
"message": "Scheduler created",
"schedule": {
"id": "66f…",
"_id": "66f…",
"exportTo": "linkedin",
"status": "pending",
"whenToExport": "2026-10-01T15:00:00.000Z",
"webhookId": null,
"contentToExport": {
"title": "Product launch",
"text": "We just shipped…",
"imageUrl": "https://your-bucket.s3.amazonaws.com/scheduler/…"
},
"createdAt": "…",
"updatedAt": "…"
}
}
Blog / CMS example (Webflow)
{
"exportTo": "webflow",
"whenToExport": "2026-10-01T15:00:00.000Z",
"contentToExport": {
"title": "How AI search cites brands",
"content": "# Intro\n\nBody in markdown…",
"slug": "how-ai-search-cites-brands",
"collectionId": "YOUR_WEBFLOW_COLLECTION_ID",
"imageUrl": "https://cdn.example.com/cover.png"
}
}
Draft (no publish time)
{
"exportTo": "wordpress",
"status": "draft",
"contentToExport": {
"siteId": "https://blog.example.com",
"title": "Draft post",
"content": "…",
"slug": "draft-post",
"status": "draft",
"imageUrl": "https://cdn.example.com/cover.png"
}
}
You can also generate a cover with POST /v1/ai/generate/image (purpose: "blog" or "linkedin") and pass the returned url as imageUrl.
List schedules
GET /v1/scheduler?skip=0
Returns up to 20 items per page. Increase skip by 20 to paginate.
curl "https://api.tryranktune.com/v1/scheduler?skip=0" \
-H "api-key: YOUR_KEY"
{
"message": "Schedulers fetched",
"schedulers": [],
"total": 0
}
Get one schedule
GET /v1/scheduler/:id
curl https://api.tryranktune.com/v1/scheduler/SCHEDULE_ID \
-H "api-key: YOUR_KEY"
Delete / cancel a schedule
DELETE /v1/scheduler/:id
Cancels a pending schedule (or removes a draft).
curl -X DELETE https://api.tryranktune.com/v1/scheduler/SCHEDULE_ID \
-H "api-key: YOUR_KEY"
Errors
| Status | When |
|---|---|
400 | Missing exportTo / content, invalid whenToExport, or bad image payload |
401 | Missing or invalid API key / session |
404 | Schedule not found (get / delete) |
See Errors & rate limits.