WeRepost
Publish and schedule short videos from an AI agent to connected social accounts, then check delivery status for each destination.
Gehosteter MCP-Server
npx add-mcp 'https://werepost.ai/mcp'Installiert in Claude Code, Codex, Cursor und mehr
Dokumentation
Publish once.Ship everywhere.
Base URL https://werepost.ai/api/v1
Authentication and scope
Create an API key in the app: switch to Dev (top left), open API Keys, then + Create key. The complete key is copied and shown once. Store it in a server-side secret manager.
Authorization: Bearer wrp_live_your_key
Content-Type: application/json
Keys are stored as one-way hashes, can be deleted from the same page, and only ever act on the profiles of the account that created them.
Profiles
A request may name the profile it acts on with profile_id. Without it, it acts on the account's first profile, the one created with the account, which is all most accounts have. The API Keys page shows the current profile's ID, and this endpoint lists every profile a key can use:
GET /api/v1/profiles
curl https://werepost.ai/api/v1/profiles \
--header "Authorization: Bearer $WEREPOST_API_KEY"
{
"data": [
{ "id": "4a40c92d-68af-4f10-b1cc-881591b575fd", "name": "My brand", "default": true },
{ "id": "9b1e7f3a-2c44-4d1b-8f0e-6a5d3c2b1a09", "name": "Client B", "default": false }
]
}
Keep keys off the browser.
Do not put a live API key in front-end JavaScript, a mobile binary, a public repository, a URL, or logs. If a key is exposed, delete it on the API Keys page and create a replacement.
Connection-management endpoints use a signed-in Werepost user access token, not an API key. For a normal server integration, connect destinations in the Werepost app and use the API key only for post operations.
Quickstart
- Sign in to Werepost.
- Connect the apps you post on from Connections. Finish page or channel selection where required. For Pinterest, Reddit, Discord, and Slack, choose the publishing target in each post.
- Switch to Dev, open API Keys, create a key and save the one-time value.
- Host the video or image at a public HTTPS link that downloads the file directly.
- Send a create request with a unique
Idempotency-Key.
curl https://werepost.ai/api/v1/posts \
--request POST \
--header "Authorization: Bearer $WEREPOST_API_KEY" \
--header "Content-Type: application/json" \
--header "Idempotency-Key: product-launch-2026-08-21" \
--data '{
"title": "Product launch",
"caption": "A first look at what we built.",
"media_url": "https://cdn.example.com/video/launch.mp4",
"platforms": ["tiktok", "instagram", "youtube"]
}'
A new request returns 201. A replay that resolves to an existing post returns 200 with "idempotent": true. Add "profile_id" to post on a profile other than your first one.
MCP server for AI agents
ChatGPT, Claude, Claude Code, Codex, Cursor, Hermes Agent, OpenClaw and any client that speaks the Model Context Protocol (Streamable HTTP) can post through WeRepost. The server is https://werepost.ai/mcp; it authenticates with your API key, sent either as Authorization: Bearer wrp_live_… or as the last segment of the address (https://werepost.ai/mcp/wrp_live_…) for apps whose connector form has no header field. Treat that address like the key itself. The Connect your AI panel in the app (API Keys) creates it and shows the setup for each assistant.
Paste your full link into your assistant’s MCP connector settings. To check the connection, ask “Which social accounts are connected in WeRepost?” If the list is empty, use Connections in WeRepost to connect the apps you want to publish to.
Publishing from ChatGPT web requires a Business, Enterprise or Edu workspace with write actions enabled. ChatGPT setup and permissions
claude mcp add --transport http --scope user werepost https://werepost.ai/mcp \
--header "Authorization: Bearer $WEREPOST_API_KEY"
codex mcp add werepost --url https://werepost.ai/mcp/$WEREPOST_API_KEY
Tools:
list_accounts: the connected apps and the ones still to connect.publish_post: one video or image with its caption, now or atscheduled_at. Useplatform_optionsfor apps that require a target or a Pinterest video cover. The media is a public HTTPSmedia_url, a ChatGPT conversation file (media), or an upload made with the two tools below. Identical calls are deduplicated.start_uploadandfinish_upload: upload a local MP4 or MOV (up to 500 MB) with HTTP PUTs to the returned part links, then get itsmedia_url.get_post,list_posts: status per app (live,scheduled,processing,failed) with the live links.cancel_post: cancels a post that is not live yet.
Account problems (setup not finished, subscription inactive, app not connected) come back as tool errors written for the assistant to relay.
Media and CDN flow
API clients supply media by URL. Werepost validates the URL, prepares the remote media for publishing, and passes the resulting media reference into the selected platform jobs.
| Requirement | Contract |
|---|---|
| Content | One video (MP4 or MOV) or one image (JPG, PNG or WEBP) per post. The link's file extension tells which; for a link without one, send media_type. |
| Apps | TikTok and YouTube take videos only. Google Business takes images only. Snapchat Spotlight takes videos only. A Pinterest video needs a cover image, and Reddit media depends on the subreddit. Unsupported media returns 400 media_not_supported. |
| Images | Instagram and Facebook receive an image as a feed post. An image outside Instagram's 4:5 to 1.91:1 shape gets margins added, or is cropped with auto_crop_image. |
| Scheme | https:// only for API clients; embedded URL credentials are rejected. |
| Host | Use a publicly resolvable CDN host. localhost and literal private IP addresses are rejected. |
| Availability | The file must download directly, without signing in, while the create request is processed. Avoid short-lived signed URLs that may expire during transfer. A link that answers an error returns 400 media_unreachable with the status it answered. |
| Length | The media URL may be at most 4,096 characters. |
| Request size | JSON bodies are limited to 1,000,000 bytes. Do not base64-encode media into JSON. |
External API clients should provide a public HTTPS CDN URL. The Werepost web app transfers video files directly to the publishing service; Werepost does not retain a copy in Supabase Storage. Internal upload references are reserved for app-managed uploads.
Deleting a post removes app-managed private media associated with that record. Werepost does not delete an object from your public CDN.
Create a post
POST /api/v1/posts
| Field | Type | Description |
|---|---|---|
media_url required | string | Public HTTPS link to one video or one image. video_url is accepted as an alias. |
platforms required | string[] | One or more of the platform keys below, each connected. An unknown key returns 400 unsupported_platform. Duplicates are removed. |
profile_id | UUID | Profile to post on. Defaults to your first profile (see Profiles). |
media_type | video | image | Only needed when the link has no file extension. |
caption | string | Up to 20,000 characters. An app with a lower limit receives it shortened at a word and ended with “…”, for that app only (limits below). text and description are accepted aliases. |
title | string | Internal title, truncated to 180 characters. Werepost derives a fallback when omitted. |
scheduled_at | ISO-8601 | Future publication time. Omit for immediate publication. publish_at and post_date are accepted aliases. |
platform_options | object | Optional per-platform controls described below. |
Immediate publishing
Omit scheduled_at. Werepost places the job shortly ahead so the remote media can be prepared safely. “Immediate” is asynchronous: use the returned post ID to check delivery.
Scheduled publishing
{
"profile_id": "4a40c92d-68af-4f10-b1cc-881591b575fd",
"caption": "Publishing Tuesday at 16:30 Paris time.",
"media_url": "https://cdn.example.com/video/tuesday.mp4",
"platforms": ["facebook", "linkedin"],
"scheduled_at": "2026-08-25T14:30:00Z"
}
Send a timezone-aware timestamp. UTC with a trailing Z is recommended. A timestamp materially in the past returns 400 invalid_schedule.
Supported platform keys
| Key | App | Takes | Caption limit |
|---|---|---|---|
tiktok | TikTok | Video | 2,200 |
instagram | Video, image | 2,000 | |
facebook | Video, image | 50,000 (the API takes up to 20,000) | |
youtube | YouTube Shorts | Video | 5,000 (title: 100) |
x | X | Video, image | 280, counted the way X counts: a link is 23 and most non-Latin characters and emoji are 2 |
linkedin | Video, image | 3,000 | |
pinterest | Image, video with cover | 800 (title up to 100) | |
reddit | Video or image where the target permits it | Title up to 300 | |
discord | Discord | Video, image | 2,000 |
slack | Slack | Video, image | 20,000 through this API |
mastodon | Mastodon | Video or image as allowed by the instance | Werepost caps text at 500. Your instance may accept less. |
threads | Threads | Video, image | 500 |
bluesky | Bluesky | Video, image | 300 |
googlebusiness | Google Business | Image | 1,500 |
snapchat | Snapchat | Stories accept image or video. Spotlight is video only. | Spotlight description up to 160. |
twitter is accepted for x. Use GET /api/v1/platforms as the live source of truth: each entry carries media and caption_limit. A caption is never cut inside a link or an emoji.
For Snapchat video, use a vertical MP4 at least 540 × 960 pixels, 5 to 180 seconds long and up to 100 MB. Mastodon media limits vary by instance. Reddit communities can allow different media types and require different flair.
Platform options
Keys under platform_options match the Werepost platform key. Pinterest, Reddit, Discord, and Slack require a target with each post. Omitted booleans default to false unless stated otherwise.
| Platform | Supported option fields |
|---|---|
tiktok | privacy (default PUBLIC_TO_EVERYONE), disable_comments, disable_duet, disable_stitch, is_brand_content, is_organic_brand_content, is_ai_generated |
instagram | type (default REEL for a video, POST for an image), share_to_feed (Reels, default true), auto_fit_image (images, default true: adds margins to reach a shape Instagram accepts), auto_crop_image (images: crops to that shape instead), is_paid_partnership, is_ai_generated |
facebook | type (default REEL for a video, POST for an image) |
youtube | type (default SHORT), title (100 characters), privacy (default PUBLIC), made_for_kids, contains_synthetic_media, has_paid_product_placement |
x | is_ai_generated |
linkedin | disable_reshare |
pinterest | board_name (required, the exact name of an existing board), title (100 characters), cover_url (required for video, a public HTTPS image URL on an approved CDN) |
reddit | subreddit (required, r/community or u/profile), title (300 characters), flair_id (required if the target requires flair), nsfw |
discord or slack | channel_id (required, a channel the connected account can publish to) |
mastodon | privacy (PUBLIC by default, UNLISTED, PRIVATE, or DIRECT), spoiler (content warning, 50 characters) |
threads | topic_tag |
bluesky | tags as an array of strings |
googlebusiness | topic_type (default STANDARD) |
snapchat | type (STORY by default for images, SPOTLIGHT by default for videos, or SAVED_STORY), title (Saved Stories, 40 characters). For Spotlight, the request's caption is its description. |
{
"platforms": ["instagram", "youtube", "tiktok"],
"platform_options": {
"instagram": { "share_to_feed": false },
"youtube": { "title": "What we shipped", "privacy": "UNLISTED" },
"tiktok": { "privacy": "SELF_ONLY", "disable_duet": true }
}
}
Apps also apply their own rules on size, length and shape. When an app's rule refuses the post, the request returns 400 platform_rejected with that rule in its message (a Short that is too long, a bitrate that is too high…) and nothing is created. A refusal that comes later, at publishing time, appears in the post's error field after refresh.
Idempotency
Every create request requires an Idempotency-Key header containing 8–128 letters, digits, dots, underscores, colons, or dashes.
- Generate one key for one intended post and reuse it for every retry of that same intent.
- The key is combined with
profile_id, so the same literal key in two different profiles does not identify the same post. - A confirmed new post returns
201andidempotent: false. - A replay that already has a publishing job returns
200and the existing post withidempotent: true. - Do not reuse a key with different content. Werepost compares a stable request fingerprint and returns
409 idempotency_conflictwhen the same key is used for a different request. - A request refused with a
400creates nothing. Fix it and send it again, with the same key or a new one.
If a request times out or the connection drops, retry the exact request with the same key. For 429, 502, or 503, use exponential backoff and preserve the key.
For clients that cannot set headers, idempotency_key in the JSON body is accepted as a compatibility fallback. The header is the production recommendation.
Status and refresh
GET /api/v1/posts/{post_id}
Without a query parameter, this endpoint returns the last state stored by Werepost. Add ?refresh=true to synchronise the publishing job before responding.
curl "https://werepost.ai/api/v1/posts/4cf807c9-5e93-4c98-9077-586b5ce0e20e?refresh=true" \
--header "Authorization: Bearer $WEREPOST_API_KEY"
pending
Accepted and waiting for the scheduled time or next processing stage.
processing
Media transfer, publication, retry, or review is in progress.
delivered
The publishing job reported success. The destination may still process or review content.
failed
The job reported an error or deletion. Inspect provider_status and error.
provider_status gives the detailed state when available, including UPLOADING, SCHEDULED, PROCESSING, RETRYING, REVIEW, POSTED, ERROR, and DELETED.
Per-platform deliveries
Every post response also includes deliveries, an array with one entry per destination. This is the best field for partial success: the overall post can finish while a specific platform reports its own result.
{
"platform": "youtube",
"status": "delivered",
"external_id": "video_123",
"external_url": "https://www.youtube.com/watch?v=video_123",
"error": null,
"delivered_at": "2026-08-25T14:31:08.000Z"
}
Delivery status is one of pending, uploading, delivered, or failed. external_id and external_url are present only when the destination returns them. Errors and URLs are sanitised before Werepost exposes them.
Polling pattern
Poll the normal endpoint for local state and periodically request refresh=true while a post is pending or processing. Use increasing intervals, stop on delivered or failed, and back off on 429 or dependency errors.
GET /api/v1/posts?profile_id={uuid}&limit=100
Lists posts in descending scheduled order. Without profile_id, an API key lists its first profile and a signed-in session lists all of its profiles. limit defaults to 100 and is clamped from 1 to 200.
Retry and delete
POST /api/v1/posts/{post_id}/retry
Retries an existing failed publishing job, immediately refreshes it, and returns { "data": post }. If the original create failed before a publishing job existed, Werepost returns 409 resubmit_required. Resend the original POST /posts request with the same Idempotency-Key.
DELETE /api/v1/posts/{post_id}
Attempts to cancel the job, removes app-managed private media if applicable, and deletes the Werepost post record. It returns:
{
"deleted": true,
"id": "4cf807c9-5e93-4c98-9077-586b5ce0e20e"
}
Deletion is not a universal social delete.
A job may already be processing or delivered. Content already published on a destination may remain there; manage it with that platform's controls. Public CDN media also remains under your control.
Connection flow
Connection routes are used by the Werepost web application and require a signed-in user access token. They reject wrp_live_… API keys. This prevents a leaked publishing key from authorising or disconnecting social accounts.
- Provision the owned profile with
POST /profiles/{profile_id}/provision. - Request a connection URL with
GET /connect/{platform}?profile_id={uuid}. - Open the returned
urlin the browser. Discord, Slack, and Mastodon open a connection page first. Snapchat requires a Public Profile. - After the browser returns to Werepost, call
GET /connections?profile_id={uuid}. - If the connection says
needs_channel_selection: true, present itschannelsand submit one selection.
GET /api/v1/connect/{platform}?profile_id={uuid}&choose_account=true
choose_account defaults to true so providers ask which account to use where supported. The response is { "url": "https://…", "platform": "tiktok" }.
For Mastodon, include the public HTTPS origin of your instance in server_url, for example /api/v1/connect/mastodon?profile_id={uuid}&server_url=https%3A%2F%2Fmastodon.social.
For Facebook, the link asks for Business access, so a Page that belongs to a business portfolio can be chosen. It includes business and ads permissions. Add business_access=false to ask for standard access only; a Page in a business portfolio then comes back with errorReason=facebook-business-access-required.
GET /api/v1/connections?profile_id={uuid}
Returns account display data, connection status, and available destinations. Valid status values are connected, action_required, and disconnected.
DELETE /api/v1/connections/{platform}?profile_id={uuid}
Disconnects the platform for this profile. It does not delete existing posts from the destination.
Channel selection
Facebook, YouTube, LinkedIn, Google Business and Snapchat Business may require you to select a Page, channel, organisation, location or Public Profile. Use the exact id returned in connections[].channels when needs_channel_selection is true.
POST /api/v1/connections/channel
{
"profile_id": "4a40c92d-68af-4f10-b1cc-881591b575fd",
"platform": "youtube",
"channel_id": "UC123456789"
}
Werepost verifies that the channel belongs to the profile's connection and refreshes the available channel list once if necessary. Publishing returns 409 channel_selection_required until setup is complete.
Publishing targets
Pinterest boards, Reddit communities, Discord channels, and Slack channels are selected per post. Refresh the options with a signed-in user session and use the returned data.channels to choose a target. Use the exact board name for Pinterest and the channel ID for Discord or Slack. For Reddit, provide the r/ community or u/ profile and any flair the target requires.
POST /api/v1/connections/targets
{
"profile_id": "4a40c92d-68af-4f10-b1cc-881591b575fd",
"platform": "pinterest"
}
Automatic reposting controls
Read or change automatic reposting for one owned profile. Both endpoints require a signed-in Werepost user access token and reject wrp_live_… API keys.
Autopilot watches videos posted on TikTok, Instagram, Facebook, or YouTube. Mastodon and Snapchat can receive automatic reposts. Pinterest, Reddit, Discord, and Slack are available for manual publishing and scheduling because each post needs a target.
Autopilot shows the publishing queue and the current daily allowance for each connected destination. Limits vary by network, account and content type; they are not a universal posts-per-day promise. When an allowance is exhausted, videos remain queued until it resets and other destinations can continue. Temporary failures retry automatically. Processing and retries can move estimated times; avoid posting queued videos by hand to prevent duplicates.
GET /api/v1/reposting/status?profile_id={uuid}
curl "https://werepost.ai/api/v1/reposting/status?profile_id=4a40c92d-68af-4f10-b1cc-881591b575fd" \
--header "Authorization: Bearer $WEREPOST_USER_TOKEN"
{
"data": {
"profile_id": "4a40c92d-68af-4f10-b1cc-881591b575fd",
"enabled": true,
"video_file_unavailable": false,
"source": {
"source_platform": "tiktok",
"status": "watching",
"last_checked_at": "2026-09-16T10:00:00.000Z",
"next_check_at": "2026-09-16T10:15:00.000Z"
},
"queue": {
"total_videos": 2,
"checked_at": "2026-11-17T15:00:00.000Z",
"platforms": [{
"platform": "youtube", "pending": 2, "retrying": 0, "attention": 0,
"resume_at": "2026-11-18T00:01:00.000Z",
"allowance": { "used": 10, "limit": 10, "remaining": 0, "resets_at": "2026-11-18T00:00:00.000Z" }
}]
}
}
}
POST /api/v1/reposting/settings
curl https://werepost.ai/api/v1/reposting/settings \
--request POST \
--header "Authorization: Bearer $WEREPOST_USER_TOKEN" \
--header "Content-Type: application/json" \
--data '{
"profile_id": "4a40c92d-68af-4f10-b1cc-881591b575fd",
"enabled": false
}'
Set enabled to false to pause or true to resume. The response reflects the saved setting. Read the status endpoint again for the current queue and daily allowances. An unavailable allowance is null, never an assumed zero or unlimited allowance; counters may be cached for up to one minute.
OFF pauses automatic work only.
It stops automatic discovery, automatic retries, and new automatic submissions. Manual posts created in the app, calendar, or API continue to work. Jobs already accepted by a provider are not canceled, and queued automatic work resumes idempotently when the setting returns to ON.
Edit a published Facebook caption
In the app, open Posts, then the published Facebook post’s ⋯ menu and Edit Facebook caption. Change its text or hashtags and save. The video stays published at the same address.
POST /api/v1/posts/{id}/caption
curl https://werepost.ai/api/v1/posts/YOUR_WEREPOST_POST_ID/caption \
--request POST \
--header "Authorization: Bearer $WEREPOST_API_KEY" \
--header "Content-Type: application/json" \
--data '{"caption":"Your updated caption. #YourHashtag"}'
The ID is the Werepost post ID returned by the posts API. The post must belong to your account, already be delivered, and have Facebook as its only destination. Automatic reposts have a separate post for each destination. The response contains the updated post. This replaces the full caption, including any hashtags; media, other destinations, and future posts are unaffected.
AI disclosure: you can add “AI-generated video.” to the caption. This is plain text and does not activate Facebook’s native AI label. The current connection cannot set that label; requesting platform_options.facebook.is_ai_generated: true when publishing returns 422 facebook_ai_label_unavailable before creating a post. Facebook decides organic recommendations; changing hashtags cannot guarantee a particular audience.
Endpoint reference
| Method | Path | Credential | Purpose |
|---|---|---|---|
| GET | /api/v1 | Public | API version and implemented routes. |
| GET | /api/v1/health | Public | Configuration health. |
| GET | /api/v1/platforms | Public | Supported platforms, the media each takes and its caption limit. |
| GET | /api/v1/profiles | API key or user session | List the profiles you can post to; the first is the default. |
| POST | /api/v1/profiles/{id}/provision | User session | Prepare a profile publishing workspace. |
| GET | /api/v1/connections | User session | List profile connections. |
| POST | /api/v1/connections/targets | User session | Refresh boards, communities, or channels for a publishing target. |
| GET | /api/v1/connect/{platform} | User session | Create a browser authorisation URL. |
| POST | /api/v1/connections/channel | User session | Select a page or channel. |
| DELETE | /api/v1/connections/{platform} | User session | Disconnect a platform. |
| GET | /api/v1/reposting/status | User session | Read automatic reposting state for an owned profile. |
| POST | /api/v1/reposting/settings | User session | Pause or resume automatic reposting for an owned profile. |
| POST | /api/v1/posts | API key or user session | Create an immediate or scheduled post. |
| GET | /api/v1/posts | API key or user session | List posts. |
| GET | /api/v1/posts/{id} | API key or user session | Read or refresh one post. |
| POST | /api/v1/posts/{id}/retry | API key or user session | Retry a failed publishing job. |
| POST | /api/v1/posts/{id}/caption | API key or user session | Replace the caption and hashtags of a delivered Facebook-only post. |
| DELETE | /api/v1/posts/{id} | API key or user session | Cancel and delete a Werepost post. |
The authoritative request and response schemas are available as OpenAPI 3.1 JSON.
Errors
Every error is JSON. The request_id also appears in the X-Request-Id response header.
{
"error": "platform_not_connected",
"message": "Connect every selected platform before publishing.",
"details": {
"missing": ["tiktok"],
"needs_channel": []
},
"request_id": "b4805362-5580-4eb0-b4e3-d95b30235b2b"
}
| Status | Meaning | Typical codes |
|---|---|---|
400 | Correct the request body, media, publishing target, schedule, or platform option. | invalid_json, platforms_required, unsupported_platform, media_url_required, invalid_media_url, invalid_media_type, media_not_supported, media_unreachable, media_rejected, platform_rejected, caption_too_long, invalid_profile_id, invalid_schedule, idempotency_key_required, post_target_required, invalid_post_target, invalid_platform_option, pinterest_cover_required, invalid_pinterest_cover |
401 | Missing, invalid, revoked, wrong-type, or profile-mismatched credential. | unauthorized, invalid_api_key_or_profile, user_session_required |
402 | The account's subscription is not active. | subscription_required |
403 | The account has not finished its setup in the app. | onboarding_required |
404 | Endpoint, profile, or post not found or not visible to the caller. | not_found |
409 | Publishing precondition, idempotency, automation, or resubmission conflict. | platform_not_connected, channel_selection_required, invalid_post_target, idempotency_conflict, reposting_paused, resubmit_required |
413 | JSON body exceeds 1,000,000 bytes. | payload_too_large |
429 | A publishing dependency applied a rate limit. | rate_limited |
500 | Unexpected Werepost error. Public message is intentionally generic. | internal_error |
502 | Connection, media, database, or publishing dependency failed. | social_provider_error, social_provider_timeout, social_provider_unavailable |
503 | A required service is unavailable or not configured. | social_provider_not_configured |
For status codes below 500, message describes the problem. For 5xx errors it is deliberately generic; record the request ID. Structured details may identify missing platforms, destinations awaiting channel selection, or safe validation issues.
Production checklist
- Keep the API key in a server-side secret manager and rotate it after any suspected exposure.
- Persist the post
id, and theprofile_idwhen the account has several profiles; never infer profile ownership client-side. - Generate and persist an idempotency key before the first create attempt.
- Use a durable HTTPS CDN URL and keep it available until the post is accepted.
- Send each app what it takes: no image to TikTok or YouTube, no video to Google Business. Check
GET /api/v1/platforms. - Use
refresh=truewith backoff until a post reachesdeliveredorfailed. - Handle
409 resubmit_requiredby replaying the original create request with the original idempotency key. - Log
X-Request-Idwith your request metadata, but never log Bearer credentials or sensitive authorisation URLs. - Expect platform-specific rejection and review. A successful API response means the job was accepted, not that every destination has published it.
Questions or a reproducible failure? Email info@sofuto.uk with the request ID, endpoint, timestamp, and post ID. Do not include your API key.