# API Quickstart

## Get Started with Blotato API

The Blotato API allows you to:

* publish and schedule posts directly to social media platforms
* supports text, image, videos, reels, slideshows, carousels, threads, and stories
* create images, videos, slideshows, and carousels programmatically via templates

It is limited to paying subscribers in order to reduce spam and service abuse, keeping Blotato's integration in good standing with the social platforms.

***

## Plans That Include API

| Plan       | API Access |
| ---------- | ---------- |
| Free Trial | No         |
| Starter    | Yes        |
| Creator    | Yes        |
| Agency     | Yes        |

API access is included on every paid plan. Generating an API key from Settings > API immediately ends a free trial and activates your paid Starter subscription.

***

## Base URLs

Blotato has two base URLs. Use the one that matches your integration:

| Integration                                                                  | Base URL                         |
| ---------------------------------------------------------------------------- | -------------------------------- |
| REST API (direct HTTP, n8n, Make)                                            | `https://backend.blotato.com/v2` |
| MCP Server (Claude Code, Claude Cowork, Claude Desktop, Cursor, Antigravity) | `https://mcp.blotato.com/mcp`    |

`api.blotato.com` is **not a valid base URL**. If your AI tool reports a DNS error for `api.blotato.com`, it guessed wrong. Use one of the two URLs above.

***

## 1. Get Your API Key

:exclamation:**IMPORTANT: this will end your free trial immediately and start your paid subscription.**

Go to [Settings](https://my.blotato.com/settings) > API > click "Generate API Key".

***

## 2. Connect Social Accounts

Go to [Settings](https://my.blotato.com/settings) and connect your social accounts. If you get stuck, more information here:

{% embed url="<https://help.blotato.com/settings/social-accounts>" %}

***

## 3. Install the Official Blotato Node

### n8n

1. Go to your n8n Admin Panel > Settings
2. Enable Verified Community Nodes
3. Open any workflow
4. Click the "+" icon in the top right corner
5. Search for "Blotato"
6. Click Install

For self-hosted n8n, see: [Self-Hosted n8n Users](https://help.blotato.com/api/n8n/n8n-blotato-node#self-hosted-n8n-users)

### Make

1. Open any scenario in Make
2. Click the "+" icon to add a module
3. Search for "Blotato"
4. Select the Blotato module

***

## 4. Setup Your First Automation!

**New to building automations?** Start here:

* [Build Your First AI Automation](/api/templates/11-build-your-first-ai-automation.md) - Learn how to extract content from any source and publish to social media

Choose your preferred integration path:

* [MCP Server](/api/mcp.md) - control Blotato from Claude.ai, Claude Desktop, Claude Code, Cursor, and more with natural language
* [n8n - post everywhere](/api/templates/1-post-everywhere.md)
* [Make - post everywhere](/api/templates/1-post-everywhere.md)
* [REST API - OpenAPI reference](/api/openapi-reference.md) and [Examples Below](#raw-rest-api-calls-examples)

Blotato has official Make.com and n8n nodes. Zapier coming soon!

Check out more workflow automation templates here:

{% embed url="<https://help.blotato.com/api/templates>" %}

***

## 5. Troubleshoot Errors

Use the API Dashboard and click on each request to see full payload, response, and error message:

**API Dashboard (for debugging):** <https://my.blotato.com/api-dashboard>

**FIX MY AUTOMATION (n8n only):** On a failed n8n request in the API Dashboard, click the green **FIX MY AUTOMATION** button and Blotato AI will attempt to fix your n8n workflow automatically. This feature is for n8n only -- it does not work for Make, Claude, MCP, or direct REST API calls. Full walkthrough: [Fix My Automation](/api/n8n/faqs.md#first-step-click-fix-my-automation-in-the-api-dashboard-n8n-only).

***

## Raw REST API Calls - Examples

### Authentication

To authenticate API requests, include your Blotato API key in the request headers.

**Authentication Header**

```
blotato-api-key: YOUR_API_KEY
```

Requests without a valid API key will be rejected and 401 error will be returned.

### Step 0: Get Your Account IDs

Before publishing, fetch your connected accounts to get the `accountId`:

```
GET https://backend.blotato.com/v2/users/me/accounts HTTP/1.1
blotato-api-key: YOUR_API_KEY
```

Use the `id` from the response as your `accountId`. For Facebook and LinkedIn, also fetch subaccounts to get `pageId`. See [Accounts reference](/api/accounts.md) for details.

### Post to a Platform Immediately

```
POST https://backend.blotato.com/v2/posts HTTP/1.1
Content-Type: application/json
blotato-api-key: YOUR_API_KEY

{
  "post": {
    "accountId": "98432",
    "content": {
      "text": "Hello, world!",
      "mediaUrls": [],
      "platform": "twitter"
    },
    "target": {
      "targetType": "twitter"
    }
  }
}
```

### Post at a Scheduled Time

```
POST https://backend.blotato.com/v2/posts HTTP/1.1
Content-Type: application/json
blotato-api-key: YOUR_API_KEY

{
  "post": {
    "accountId": "98432",
    "content": {
      "text": "Scheduled post example",
      "mediaUrls": [],
      "platform": "facebook"
    },
    "target": {
      "targetType": "facebook",
      "pageId": "987654321"
    }
  },
  "scheduledTime": "2025-03-10T15:30:00Z"
}
```

To schedule at the user's next available calendar slot instead of a specific time, replace `scheduledTime` with `useNextFreeSlot: true`. Both are top-level fields, not inside `post`. See [Publish Post](/api/publish-post.md) for all scheduling options.

### Post a Twitter Thread with Multiple Posts

```
POST https://backend.blotato.com/v2/posts HTTP/1.1
Content-Type: application/json
blotato-api-key: YOUR_API_KEY

{
  "post": {
    "accountId": "98432",
    "content": {
      "text": "This is the first tweet in the thread.",
      "mediaUrls": [],
      "platform": "twitter",
      "additionalPosts": [
        {
          "text": "Here's the second tweet, adding more info.",
          "mediaUrls": []
        },
        {
          "text": "And here's the third tweet to conclude!",
          "mediaUrls": []
        }
      ]
    },
    "target": {
      "targetType": "twitter"
    }
  }
}
```

### Attach Media to Post (images and videos)

Pass any publicly accessible image/video URL into the `mediaUrls` parameter. No upload step required. Blotato handles the media transfer.

For local files without a public URL, use the [Presigned Upload](/api/publish-post/upload-media-v2-media.md#presigned-upload-local-files) endpoint to upload directly to Blotato. No Google Drive or S3 needed.

```
POST https://backend.blotato.com/v2/posts HTTP/1.1
Content-Type: application/json
blotato-api-key: YOUR_API_KEY

{
  "post": {
    "accountId": "98432",
    "content": {
      "text": "Check out this image!",
      "mediaUrls": [
        "https://example.com/image.jpg"
      ],
      "platform": "instagram"
    },
    "target": {
      "targetType": "instagram"
    }
  }
}
```

The optional Upload Media endpoint is still available if you need to host media on Blotato's servers. See [Upload Media](/api/publish-post/upload-media-v2-media.md).

***

## For AI Agents

If you are an AI agent or LLM integration, start with the plain-text API reference:

[API Reference for LLMs](/api/llm.md)

This contains the full API specification in a format optimized for LLMs, including all endpoints, parameters, status values, and a complete workflow pseudocode.

For async workflow patterns and code examples, see [Protocol and Recipes](/api/workflows.md).

For the full endpoint reference, see [API Reference](https://github.com/Blotato-Inc/help.blotato.com/blob/main/api/api-reference/README.md).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.blotato.com/api/start.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
