# Authentication

Source: https://ampost.io/docs/authentication · Full reference: https://ampost.io/llms-full.txt

## Key Scopes

Each operation needs one scope, shown next to it below (`workspace_get`, `docs_search` and `feedback_submit` need none); a key without it gets 403 `INSUFFICIENT_SCOPE` with `details.requiredScope`. MCP `tools/list` shows only the tools the key may call. Keys are created in the dashboard (`https://ampost.io/app/settings/api-keys`) as Full access (every scope), Read only (`posts:read`, `accounts:read`, `analytics:read`) or custom scopes.

- `posts:read`: List and read posts and posting queues, and read platform rules
- `posts:write`: Create, change, publish, retry, delete and import posts; edit posting queues
- `posts:propose`: Drafts only (approval mode): create and change drafts and submit them for approval. Never publishes, schedules, retries, unpublishes or edits a published post; an approver decides. `posts:write` includes it
- `accounts:read`: List and read accounts, platform sets and connection requests
- `accounts:write`: Connect and disconnect accounts; create, rename and delete platform sets
- `media:write`: Upload media for posts and check an upload's status. There is no read scope: only the key that uploads needs the status
- `analytics:read`: Read post metrics, account overviews and follower history
- `webhooks:write`: List, read, create, change, test and delete webhooks, read their delivery logs, and redeliver events. Reading needs it too: webhooks and their logs show receiver URLs and full post payloads

A key can also be restricted to some platform sets. Lists then show only those sets, their accounts and posts with an account in them (with only those accounts' results); an id from another set answers 404. Creating a post, connecting an account or changing a set outside the restriction (the default set included, when no set is named) answers 403 `PLATFORM_SET_NOT_ALLOWED`, and a restricted key cannot create platform sets.

## Workspaces

A key or MCP connection belongs to one workspace, the user's own or a team's, and reaches only that workspace's posts, accounts and platform sets; in a team workspace it can do at most what the user's role there allows. To act in another workspace, use a key or connection made there. `GET /api/workspaces/current` (MCP `workspace_get`, any key) returns the workspace (`id`, `name`, `personal`), the user's `userId` and `role`, `access` (the scopes and platform sets this key may use there) and the `members` with their user id, name, email and role. Each post's `createdBy` is the user id of the member who created it; it stays the same when someone else edits or publishes the post.

### Get the current workspace

`GET /api/workspaces/current` · MCP tool `workspace_get` · scope none (any key) · rate limit `apiRead` · success `200`

Return the workspace this key or connection acts in: its `id`, `name` and whether it is your `personal` one, your `userId` and `role` there, `access` (the scopes and platform sets this call may use, already narrowed to your role) and its `members` with their user id, name, email and role. Every post, account and platform set you reach belongs to this workspace; a key or connection works in one workspace only, so to act in another, use a key made there. A post's `createdBy` is one of the members' `userId`: use this to say who created a post. Any valid key may call it.

Example response:

```json
{
  "id": "6c2e8a4f-3b1d-4e7a-9f5c-2d8b6e1a4c30",
  "name": "Agency",
  "personal": false,
  "userId": "4e8b2d6f-1a3c-4f7e-9d5b-8c2a6e1f3b90",
  "role": "editor",
  "access": {
    "scopes": [
      "posts:read",
      "posts:write",
      "media:write"
    ],
    "platformSetIds": [
      "0b6e4d2a-9c3f-4e1b-8a7d-5f2c1e9b3d40"
    ]
  },
  "members": [
    {
      "userId": "1d7f3b9e-5a2c-4e8d-b6f1-9c3a7e2d5b80",
      "name": "Ana Owner",
      "email": "ana@example.com",
      "role": "owner",
      "joinedAt": "2026-11-02T09:00:00.000Z"
    },
    {
      "userId": "4e8b2d6f-1a3c-4f7e-9d5b-8c2a6e1f3b90",
      "name": "Sam Editor",
      "email": "sam@example.com",
      "role": "editor",
      "joinedAt": "2026-11-12T14:30:00.000Z"
    }
  ]
}
```

## Plan Requirement

The REST API and MCP are on every plan (Free, Pro, Max, Scale), Free included, with no credit card, so an agent can try Ampost right away. Free includes 2 social accounts, posts to several platforms at once, 60 read requests a minute and 1,000 API requests every 30 days (a hard cap: then 429 `QUOTA_EXCEEDED`); scheduling needs the Pro plan or higher and X a confirmed email. On Free two counts apply, each over a 30-day period: a workspace can create 15 posts (a post counts once, when it is created, whether it is a draft or published now, and however many accounts it goes to), and a social account can be published to 15 times (counted when a post publishes to it with `publishNow`, `posts_publish` or `posts_retry`, whichever Free workspace publishes; a publish that fails gives its count back). On Free a social account can be connected in one Ampost workspace only (also for 30 days after it is disconnected). A request outside the plan gets `403 UPGRADE_REQUIRED` (a feature) or `429 QUOTA_EXCEEDED` (the 30-day API requests or post quota), and a Free connect of a social account another workspace has gets `SOCIAL_ACCOUNT_IN_USE`. Plans: `https://ampost.io/pricing`.

| | Free | Pro | Max | Scale |
|---|---|---|---|---|
| Price (monthly / yearly) | $0 | $29 / $290 | $49 / $490 | $99 / $990 |
| Social accounts | 2 social accounts | 10 social accounts | 25 social accounts | 100 social accounts included, then $1 per account / month, up to 1,000 |
| Posts per 30 days | 15 | unlimited | unlimited | unlimited |
| API requests per 30 days | 1,000 | 50,000 | 200,000 | 1,000,000 |
| Multi-platform posts | yes | yes | yes | yes |
| Scheduling | no | yes | yes | yes |
| REST API and MCP | yes | yes | yes | yes |
| X | yes | yes | yes | yes |
