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

# Sapt API

> One API for organic social publishing, ads, CRM, and attribution.

The Sapt API is the programmable surface of the Sapt platform. Everything the
dashboard does, it does through these endpoints.

<CardGroup cols={2}>
  <Card title="Social publishing" icon="calendar" href="/docs/mintlify/social/overview">
    Schedule and publish organic posts to Instagram, Facebook, TikTok, YouTube
    and Google Business Profile.
  </Card>

  <Card title="Quickstart" icon="rocket" href="/docs/mintlify/guides/quickstart">
    Publish your first post in four calls.
  </Card>

  <Card title="Authentication" icon="key" href="/docs/mintlify/guides/authentication">
    API keys, OAuth access tokens, and session cookies.
  </Card>

  <Card title="API reference" icon="code" href="/api-reference/socials/create-post">
    Every endpoint, generated from the live OpenAPI document.
  </Card>
</CardGroup>

## Base URL

```
https://api.sapt.ai
```

The OpenAPI document that generates this reference is served live at
[`https://api.sapt.ai/openapi.json`](https://api.sapt.ai/openapi.json). It is
the contract — if an endpoint is not in that document, it is not public, no
matter what else is reachable over HTTP.

## Projects

Almost every resource belongs to a **project** (a workspace). The project id is
a UUID and appears as a path parameter:

```
GET /socials/posts/{projectId}
```

An API key is already scoped to the projects it can reach, so passing a
`projectId` your key cannot see returns `403`, not `404`.

## Conventions

|                |                                                                                                         |
| -------------- | ------------------------------------------------------------------------------------------------------- |
| **Format**     | JSON in, JSON out, except media uploads which take raw bytes.                                           |
| **Dates**      | ISO 8601 strings in UTC (`2026-09-07T14:30:00Z`).                                                       |
| **Ids**        | UUIDs, except platform-native ids (a Facebook Page id, an Instagram media id) which are opaque strings. |
| **Pagination** | List endpoints take `limit` and `offset`.                                                               |
| **Errors**     | `{ "error": { "code", "message", "details?" } }` — see [Errors](/docs/mintlify/guides/errors).          |

## Backward compatibility

The OpenAPI contract is load-bearing. Fields are not removed from responses
without a version bump — a retired field returns `null` or its empty shape
rather than disappearing, so destructuring clients keep working. Request fields
that are retired stay accepted and are ignored server-side.
