# SleekPost: reference for AI agents

> SleekPost publishes and schedules social media posts to X (Twitter), LinkedIn, Instagram, Facebook, Threads, Bluesky, TikTok, YouTube, Pinterest and Telegram. AI agents use it through a remote MCP server or a REST API: one call posts to many networks, and each network's rules are checked before anything is published.

This file is the complete reference. Quickstart for humans: https://sleekpost.com/agents

## Getting access

The human account owner does this once:
1. Sign up at https://sleekpost.com/sign-up and start a plan (7-day free trial).
2. Connect social accounts at https://sleekpost.com/dashboard/connections. Agents cannot connect accounts; each network requires the owner's own login.
3. Create an API key at https://sleekpost.com/dashboard/api. It is shown once; treat it like a password. It acts with the owner's full permissions.

Every API call needs the key, as `Authorization: Bearer sp_live_...` or `X-API-Key: sp_live_...`.

## Option A: MCP server

Endpoint: https://sleekpost.com/mcp (Streamable HTTP, stateless, JSON responses). Send the API key as a header.

Tools:
- `list_accounts`: List connected social accounts and their ids.
- `create_post`: Publish now, schedule, or draft a post to one or more accounts, with optional images/videos.
- `upload_media`: Import an image or video from a public URL and get a media id.
- `list_posts`: List scheduled, published, failed or draft posts.
- `get_post`: Get a post's per-account status, errors and live URLs.
- `delete_post`: Delete a draft or cancel a scheduled post.

`create_post` takes the same fields as `POST /api/v1/posts` (below), plus an optional `idempotency_key`.

Client setup:

### Claude Code

Run in your terminal:

```bash
claude mcp add --transport http sleekpost https://sleekpost.com/mcp --header "Authorization: Bearer YOUR_SLEEKPOST_API_KEY"
```

### Cursor

~/.cursor/mcp.json:

```json
{
  "mcpServers": {
    "sleekpost": {
      "url": "https://sleekpost.com/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_SLEEKPOST_API_KEY"
      }
    }
  }
}
```

### VS Code

.vscode/mcp.json:

```json
{
  "servers": {
    "sleekpost": {
      "type": "http",
      "url": "https://sleekpost.com/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_SLEEKPOST_API_KEY"
      }
    }
  }
}
```

### Codex

~/.codex/config.toml (then export SLEEKPOST_API_KEY):

```toml
[mcp_servers.sleekpost]
url = "https://sleekpost.com/mcp"
bearer_token_env_var = "SLEEKPOST_API_KEY"
```

### Gemini CLI

~/.gemini/settings.json:

```json
{
  "mcpServers": {
    "sleekpost": {
      "httpUrl": "https://sleekpost.com/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_SLEEKPOST_API_KEY"
      }
    }
  }
}
```

### Claude Desktop

claude_desktop_config.json (uses mcp-remote):

```json
{
  "mcpServers": {
    "sleekpost": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://sleekpost.com/mcp",
        "--header",
        "X-API-Key:${SLEEKPOST_API_KEY}"
      ],
      "env": {
        "SLEEKPOST_API_KEY": "YOUR_SLEEKPOST_API_KEY"
      }
    }
  }
}
```

## Option B: REST API

Base URL: https://sleekpost.com/api/v1
OpenAPI: https://sleekpost.com/api/v1/openapi.json

| Method | Path | What it does |
| --- | --- | --- |
| GET | `/me` | Check the key, plan and connected account count. |
| GET | `/accounts` | List connected accounts (ids for account_ids). |
| POST | `/posts` | Publish now, schedule (scheduled_at) or draft. Supports Idempotency-Key and dry_run. |
| GET | `/posts` | List posts. Filters: status, limit, page. |
| GET | `/posts/{id}` | Get a post with per-account status and live URLs. |
| DELETE | `/posts/{id}` | Delete a draft or cancel a scheduled post. |
| POST | `/media` | Import an image/video from a URL (JSON) or upload a file (multipart). |

Successful responses wrap results in `data`. Errors look like:

```json
{ "error": { "code": "invalid_request", "message": "What went wrong", "hint": "What to do next", "details": {} } }
```

### Create a post: POST /posts

Set exactly one of `publish_now`, `scheduled_at` or `draft`. Unknown fields are rejected.

| Field | Type | Description |
| --- | --- | --- |
| `text` | string | The post text. Used for every account unless text_overrides gives that account its own text. |
| `account_ids` | string[] (required) | IDs of the connected accounts to post to, from list_accounts / GET /api/v1/accounts. |
| `media_urls` | string[] | Public http(s) URLs of images (JPEG/PNG/WebP/GIF) or videos (MP4/MOV/WebM) to attach. SleekPost downloads and re-hosts them. |
| `media_ids` | string[] | IDs of media already uploaded with upload_media / POST /api/v1/media. |
| `text_overrides` | object { account_id: string } | Per-account text, keyed by account ID. Use it to fit stricter limits, e.g. a shorter version for Bluesky (300) or a title for YouTube (100). |
| `publish_now` | boolean | true = publish immediately. Set exactly one of publish_now, scheduled_at or draft. |
| `scheduled_at` | string (ISO 8601) | When to publish, as ISO 8601 with a timezone, e.g. 2026-12-01T15:00:00Z or 2026-12-01T09:00:00-05:00. Must be at least 2 minutes ahead. |
| `draft` | boolean | true = save as a draft in the SleekPost dashboard without publishing. |
| `dry_run` | boolean | true = validate everything and report what would happen, without saving or publishing anything. |

Limits: up to 25 accounts and 10 media items per post.

```bash
curl -X POST https://sleekpost.com/api/v1/posts \
  -H "Authorization: Bearer $SLEEKPOST_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: 0b6f8a9e-5c1d-4f8e-9a3b-2c7d1e4f5a6b" \
  -d '{
    "text": "We just shipped dark mode",
    "account_ids": ["665f1c2e9b1d4a0012345678", "665f1c2e9b1d4a0012345679"],
    "media_urls": ["https://example.com/dark-mode.png"],
    "text_overrides": { "665f1c2e9b1d4a0012345679": "Dark mode is here" },
    "scheduled_at": "2026-12-01T15:00:00Z"
  }'
```

Responses:
- `201`: created. For `publish_now`, publishing finished; check each `targets[].status` (`published` or `failed`) and `targets[].url`.
- `202`: still publishing (large videos). Poll `GET /posts/{id}` until `status` is `published` or `failed`.
- `200`: dry run; nothing was saved.
- `400`: invalid request, or content a network would reject. `details.problems` lists each account and what to fix. Drafts are saved anyway, with those problems listed in `warnings`.

```json
{
  "data": {
    "id": "6660a1b2c3d4e5f601234567",
    "status": "published",
    "text": "We just shipped dark mode",
    "scheduled_at": null,
    "media": [{ "id": "6660a1b2c3d4e5f601234568", "type": "image", "url": "https://cdn.example.com/media/abc.png" }],
    "targets": [
      { "account_id": "665f1c2e9b1d4a0012345678", "platform": "linkedin", "status": "published", "url": "https://www.linkedin.com/feed/update/urn:li:share:123", "error": null },
      { "account_id": "665f1c2e9b1d4a0012345679", "platform": "bluesky", "status": "failed", "url": null, "error": "Session expired" }
    ]
  },
  "warnings": []
}
```

Retrying safely: send an `Idempotency-Key` header (any unique string, e.g. a UUID). Repeating a request with the same key within 24 hours returns the original response with `Idempotent-Replayed: true` instead of posting again.

### Media: POST /media

JSON `{"url": "https://..."}` imports a public file (recommended). multipart/form-data with a `file` field uploads one directly, but request bodies are capped at 4.5 MB by our hosting, so import anything larger by URL. Images (JPEG, PNG, GIF, WebP; up to 30 MB by URL) are resized to at most 1920px and converted to JPEG when a network might not accept the format. Videos (MP4, MOV, WebM) can be up to 200 MB by URL; H.264 MP4 is the most compatible. URLs must point directly at the file and be publicly reachable.

## Network rules

Checked before anything is published:

- **X (Twitter)**: Up to 4 images or 1 video. If both are attached, only the video is posted. Posts over 280 characters need X Premium on the connected account. The owner connects X with their own X developer app credentials (bring your own keys).
- **LinkedIn**: Up to 3,000 characters. Up to 9 images or 1 video.
- **Instagram**: Needs at least one image or video. 2-10 items are posted as a carousel. Caption up to 2,200 characters.
- **Facebook**: Posts to a Facebook Page: text, images or video.
- **Threads**: Up to 500 characters and up to 10 images or videos.
- **Bluesky**: Up to 300 characters and up to 4 images. Prefer images: video support is limited.
- **TikTok**: Needs one video, or images for a photo post. Caption up to 2,200 characters.
- **YouTube**: Needs a video. The post text becomes the video title and description, so keep it within 100 characters.
- **Pinterest**: Needs an image or video. The text becomes the Pin description (up to 500 characters).
- **Telegram**: Up to 4,096 characters, or 1,024 when media is attached (it becomes the caption).

## Errors

| HTTP | code | Meaning |
| --- | --- | --- |
| 400 | `invalid_request` | Bad input or content a network would reject. Read `hint` and `details`. |
| 401 | `missing_api_key` / `invalid_api_key` | No key, or a wrong or revoked key. |
| 402 | `subscription_required` | The workspace has no active plan; the owner can start one at https://sleekpost.com/dashboard/billing. |
| 404 | `not_found` | No such post or media in this workspace. |
| 409 | `conflict` | The post is publishing right now, or an idempotent request is still running. |
| 413 / 415 | `media_too_large` / `unsupported_media` | File too big or not a supported image/video. |
| 422 | `idempotency_key_reused` | Same Idempotency-Key, different request. Use a new key. |
| 429 | `rate_limited` | Too many requests; wait for `Retry-After` seconds. |

Rate limits per API key: 120 requests per minute, of which at most 30 may create posts, upload media or delete.

## Good practice for agents

- Confirm the final text, accounts and time with the user before `publish_now`, unless they explicitly asked you to post immediately. Drafts land in the dashboard for review.
- Ask for the user's timezone before scheduling; always send `scheduled_at` with an offset or `Z`.
- Write per-network versions with `text_overrides` instead of one text that breaks the strictest limit.
- After a timeout, call `GET /posts` (MCP: `list_posts`) before retrying, or reuse the same idempotency key.

## Pricing

- **STARTER**: $9/month, or $5.4/month billed yearly. 5 connected social accounts; Multiple accounts per platform; No team member seats; Unlimited posts; Unlimited Schedule posts; Unlimited Carousel posts; Media Library access; 500MB large file uploads.
- **PRO**: $19/month, or $11.4/month billed yearly. All Starter features included; Unlimited connected social accounts; 1 team member seat; Team integration access controls; Unlimited Recurring posts; Unlimited Auto Reposts.
- **PREMIUM**: $39/month, or $23.4/month billed yearly. All PRO features included; 3 team member seats; Advanced team permissions; AI Content Generator; Multiple post variations.

All plans start with a 7-day free trial, include unlimited posts and scheduling, and can be cancelled anytime. Refunds are available within 7 days of a charge.

## Support

Email support@sleekpost.com.
