Sayweek for developers: API and MCP
Connect Sayweek to Claude or ChatGPT, or use the REST API. Every write creates a draft that waits for your approval.
Claude & ChatGPT (MCP)
Sayweek is a remote MCP server (Streamable HTTP, OAuth 2.1). Its URL:
https://app.sayweek.com/api/mcp
- claude.ai: Settings → Connectors → “Add custom connector” → paste the URL → Connect → sign in to Sayweek → Allow.
- ChatGPT: Settings → Apps & Connectors → Advanced → Developer mode → Create → the URL, Authentication: OAuth.
Claude Code:
claude mcp add --transport http sayweek https://app.sayweek.com/api/mcp
Tools for the assistant
list_brands– brands and channelsget_week_plan– the week's slots and postsget_calendar_context– where you'll be and what kind of day it is (from your calendar, no event titles)list_posts, list_ideas, get_analytics_summary– readingcreate_post_draft, update_post, add_idea– drafts and ideasgenerate_week_drafts, get_generation_job– Sayweek writes the week's drafts in the brand's voiceapprove_post– real scheduling – only with the “approve” scope and approvals turned on
Authentication
Every request: Authorization: Bearer <token>. The token is an API key (pp_…, Settings → Integrations → Claude & ChatGPT) or an OAuth access token (sw_at_…, valid for 1 hour, refreshable). Tokens are stored hashed only; a password reset revokes assistant connections.
OAuth 2.1: authorization code + PKCE (S256), dynamic client registration (RFC 7591), metadata at /.well-known/oauth-authorization-server and /.well-known/oauth-protected-resource.
Scopes
read– brands, channels, plan, posts, ideas, calendar summary, analyticswrite– write/edit drafts, ideas, generate a week, delete unsent postsapprove– approve = schedule for real; must also be allowed in the workspace, and every approval rule applies
Solo: read only. Pro, Team and Agency: write and approve too.
Endpoints
| GET | /api/v1/brands | read |
| GET | /api/v1/channels?brand_id= | read |
| GET | /api/v1/posts?from=&to=&status=&brand_id=&cursor= | read |
| POST | /api/v1/posts | write |
| GET | /api/v1/posts/{id} | read |
| PATCH | /api/v1/posts/{id} | write |
| DELETE | /api/v1/posts/{id} | write |
| POST | /api/v1/posts/{id}/approve | approve |
| GET | /api/v1/ideas?status=new | read |
| POST | /api/v1/ideas | write |
| GET | /api/v1/week?start=YYYY-MM-DD | read |
| POST | /api/v1/generate | write |
| GET | /api/v1/jobs/{id} | read |
| GET | /api/v1/calendar/sources?days=14 | read |
| GET | /api/v1/analytics/summary?days=30 | read |
Full reference (OpenAPI 3.1): https://app.sayweek.com/api/v1/openapi.json
Examples
curl
# Next week's plan
curl https://app.sayweek.com/api/v1/week?start=2026-10-05 \
-H "Authorization: Bearer $SAYWEEK_KEY"
# A draft (never published by the API)
curl -X POST https://app.sayweek.com/api/v1/posts \
-H "Authorization: Bearer $SAYWEEK_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: draft-2026-10-06-linkedin" \
-d '{"channel_id":"<channel id>","date":"2026-10-06","text":"…","hashtags":["#sayweek"]}'
# Let Sayweek write next week (async job)
curl -X POST https://app.sayweek.com/api/v1/generate -H "Authorization: Bearer $SAYWEEK_KEY"
curl https://app.sayweek.com/api/v1/jobs/<job id> -H "Authorization: Bearer $SAYWEEK_KEY"JavaScript
const api = (path, init = {}) =>
fetch(`https://app.sayweek.com/api/v1${path}`, {
...init,
headers: { Authorization: `Bearer ${process.env.SAYWEEK_KEY}`, "Content-Type": "application/json", ...init.headers },
}).then(async (r) => {
const body = await r.json();
if (!r.ok) throw new Error(`${body.error.code}: ${body.error.message}`);
return body;
});
const { data: brands } = await api("/brands");
const job = await api("/generate", { method: "POST", body: JSON.stringify({ brand_ids: [brands[0].id] }) });
const status = await api(`/jobs/${job.id}`);
console.log(status.status, status.done, "/", status.total);Errors, paging, limits
Error format: { "error": { "code", "message", "details" } }. Lists: { data, next_cursor } – next page: ?cursor=<next_cursor>. Limits per client and minute: 120 reads, 30 writes, 6 generations (429 + Retry-After). On POST, an Idempotency-Key header replays the first response for 24 hours.