> ## Documentation Index
> Fetch the complete documentation index at: https://docs.social-api.ai/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Base URL: https://api.social-api.ai/v1. Send your API key in the Authorization header: Authorization: Bearer <your API key>.
> Every error response from /v1 is JSON: { "error": { "code", "message", "meta" (optional) }, "request_id" }. Branch on error.code; use error.message only for logs.
> A 429 response carries a Retry-After header, in seconds, when the limit has a known wait. Authenticated responses can carry X-RateLimit-Limit, X-RateLimit-Remaining, and X-RateLimit-Reset for the per-minute request budget your SocialAPI account shares across every API key (see /guides/rate-limits).
> Paginated list endpoints return next_cursor, at the top level or inside pagination (see /guides/pagination). Pass it as the cursor query parameter to get the next page. An absent or empty next_cursor means you have the last page.
> Treat every ID as an opaque string: do not parse it or assume a format.
> Support differs by platform and by operation. Check /platforms/overview before assuming an operation works on a platform. An unsupported operation returns 501 with error.code resource.not_supported.

# API reference

> Look up the SocialAPI REST API base URL, authentication, request and response format, and error envelope before you open an endpoint.

The SocialAPI REST API reads and writes your connected accounts' comments, direct messages (DMs), reviews, mentions, posts, and analytics over HTTPS with JSON. This page covers what every endpoint shares. The endpoint pages in the reference below list each operation's parameters, request body, and responses.

## Base URL

Every endpoint lives under one base URL:

```text theme={null}
https://api.social-api.ai/v1
```

## Authentication

Every request carries a token on the `Authorization` header. SocialAPI accepts two token types: an API key (`sapi_key_...`) that you create and keep on your server, and an OAuth 2.1 access token that an app receives after a SocialAPI user approves it. A [scoped API key](https://docs.social-api.ai/guides/scoped-keys.md) limits a key to some scopes and brands.

```bash theme={null}
curl https://api.social-api.ai/v1/accounts \
  -H "Authorization: Bearer $SOCAPI_KEY"
```

See [Authentication](https://docs.social-api.ai/guides/authentication.md) to create and rotate keys, and [OAuth for MCP clients](https://docs.social-api.ai/integrations/oauth.md) for the OAuth flow.

## Request format

* Send a JSON body with `Content-Type: application/json`. Two endpoints take a multipart form instead: `POST /v1/media/upload` and `POST /v1/posts/import`.
* Write every timestamp in ISO 8601 UTC, for example `2026-10-02T09:00:00Z`.
* Send `X-Request-ID` to set your own request ID: see [Debugging](https://docs.social-api.ai/guides/debugging.md).

## Response format

A successful response is JSON with an HTTP `2xx` status. List endpoints return a page of results and a cursor: see [Pagination](https://docs.social-api.ai/guides/pagination.md). Every object has an `id` that you store and send back unchanged: see [IDs](https://docs.social-api.ai/guides/ids.md).

A failed request to `/v1` returns a non-`2xx` status and this body:

```json theme={null}
{
  "error": {
    "code": "validation.field_required",
    "message": "Required field is missing: platform",
    "meta": { "field": "platform" }
  },
  "request_id": "a1b2c3d4"
}
```

Branch on `error.code`, never on `error.message`. `request_id` equals the `X-Request-ID` response header: quote it when you report a failed request. [Errors](https://docs.social-api.ai/guides/errors.md) lists every code with its HTTP status, and [Debugging](https://docs.social-api.ai/guides/debugging.md) explains `request_id`.

## Endpoint groups

Endpoint pages cover these areas:

| Group | What it covers |
| - | - |
| Accounts | Connect, list, reconnect, and disconnect accounts, and manage Pages and locations |
| Brands and Invites | Group accounts by brand and invite clients to connect theirs |
| Inbox | Comments, DMs, and reviews across platforms |
| Mentions | Mentions of a connected account |
| Automations | Rules that reply to Instagram and Facebook comments and DMs |
| Posts | Publish, schedule, update, retry, and delete posts, and read post metrics |
| Media | Upload and manage media files |
| Analytics and Exports | Stored account, brand, and post history, and exports |
| Webhooks | Webhook endpoints and their deliveries |
| Events, Usage, and Announcements | The events log, plan usage, and product announcements |
| Billing | The plan catalog: see [Plans and usage](https://docs.social-api.ai/guides/plans.md) |
| API Keys and Users | API keys and your SocialAPI profile |
| Platform groups | Endpoints under `/v1/platforms/` for one platform, such as WhatsApp, Google, Instagram, TikTok, and YouTube |

> **[Inbox](https://docs.social-api.ai/guides/inbox.md)**
>
> Comments, DMs, and reviews across platforms.

> **[Publishing](https://docs.social-api.ai/guides/publishing.md)**
>
> Create, schedule, and manage posts.

> **[Webhooks](https://docs.social-api.ai/guides/webhooks.md)**
>
> Get notified of events in real time.

> **[Errors](https://docs.social-api.ai/guides/errors.md)**
>
> Every error code and how to handle it.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.