# Default platforms API reference

Base URL `https://api.beplan.io/v1`. Every operation is listed with its scope, permission, inputs, answers, errors and an example. Conventions: https://beplan.io/docs/api.md. OpenAPI document: https://beplan.io/docs/api/openapi.json.

## Get the default platforms

`GET /organizations/{organizationId}/workspaces/{workspaceId}/settings/default-platforms` · operationId `defaultPlatforms.get`

- Scope: `organization:read`
- Role permission: Manage workspace settings (`workspace:update`)
- Effect (`read`): Changes nothing.
- Stability: Beta (May still change before it is marked stable.) Since 2026-11-19.

Returns the workspace's connected accounts and, among them, the ones a new post starts with (`accountIds`). For members who can edit the workspace's settings.

**Parameters**

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `organizationId` | path | string | yes | 1–128 characters |
| `workspaceId` | path | string (uuid) | yes |  |

**200 OK**

- `data` (object, required, DefaultPlatforms)
  - `accounts` (array of object, required)
    - `id` (string, required)
    - `platform` (string, required): Platform id (`instagram`, `x`, `tiktok`…).
    - `username` (string, required)
    - `avatarUrl` (string, required, nullable): Profile picture URL given by the platform (it may expire); `null` without one.
  - `accountIds` (array of string, required): Ids of the accounts a new post starts with: always a subset of `accounts`.

**Errors**

| Status | Code | Message |
|---|---|---|
| 403 | `MISSING_PERMISSION` | You don't have permission to do this. |
| 404 | `ORGANIZATION_NOT_FOUND` | This organization doesn't exist or you're not a member of it. |
| 404 | `WORKSPACE_NOT_FOUND` | This workspace doesn't exist or you don't have access to it. |

Also, like every operation: `VALIDATION_FAILED` (400), `APP_SUSPENDED` (401), `TOKEN_EXPIRED` (401), `TOKEN_REVOKED` (401), `UNAUTHENTICATED` (401), `INSUFFICIENT_SCOPE` (403), `INTEGRATION_BLOCKED_BY_ORGANIZATION` (403), `INTEGRATION_PENDING_APPROVAL` (403), `RATE_LIMITED` (429), `INTERNAL_ERROR` (500).

**Example: Instagram on by default**

```bash
curl -X GET "https://api.beplan.io/v1/organizations/Yx0k2N7mQf3bA9cRz1LwP/workspaces/3f6c2a8e-91b4-4d7e-a2c5-7e0b9d1f4a62/settings/default-platforms" \
  -H "Authorization: Bearer beplan_pat_…"
```

Answers 200:

```json
{
  "data": {
    "accounts": [
      {
        "id": "5b9e2d7a-0c4f-4a18-9e3b-7d6c1f8a2e05",
        "platform": "instagram",
        "username": "northwind.studio",
        "avatarUrl": null
      }
    ],
    "accountIds": [
      "5b9e2d7a-0c4f-4a18-9e3b-7d6c1f8a2e05"
    ]
  }
}
```


## Set the default platforms

`PATCH /organizations/{organizationId}/workspaces/{workspaceId}/settings/default-platforms` · operationId `defaultPlatforms.update`

- Scope: `workspaces:write`
- Role permission: Manage workspace settings (`workspace:update`)
- Effect (`write`): Changes data in Beplan.
- Stability: Beta (May still change before it is marked stable.) Since 2026-11-19.

Replaces the accounts a new post starts with. Every id must be a connected account of the workspace (`GET …/social-accounts`), else `404 SOCIAL_ACCOUNT_NOT_FOUND` and nothing changes; an empty list turns them all off. Answers with the accounts and the new defaults.

**Parameters**

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `organizationId` | path | string | yes | 1–128 characters |
| `workspaceId` | path | string (uuid) | yes |  |

**Request body** (JSON, required)

- `accountIds` (array of string (uuid), required): The connected accounts (ids from `GET …/social-accounts`) new posts start with; replaces the list. at most 50 items.

**200 OK**

- `data` (object, required, DefaultPlatforms)
  - `accounts` (array of object, required)
    - `id` (string, required)
    - `platform` (string, required): Platform id (`instagram`, `x`, `tiktok`…).
    - `username` (string, required)
    - `avatarUrl` (string, required, nullable): Profile picture URL given by the platform (it may expire); `null` without one.
  - `accountIds` (array of string, required): Ids of the accounts a new post starts with: always a subset of `accounts`.

**Errors**

| Status | Code | Message |
|---|---|---|
| 400 | `VALIDATION_FAILED` | Some of the information sent is invalid. |
| 403 | `MISSING_PERMISSION` | You don't have permission to do this. |
| 404 | `ORGANIZATION_NOT_FOUND` | This organization doesn't exist or you're not a member of it. |
| 404 | `SOCIAL_ACCOUNT_NOT_FOUND` | This account isn't connected to this workspace anymore. |
| 404 | `WORKSPACE_NOT_FOUND` | This workspace doesn't exist or you don't have access to it. |

Also, like every operation: `APP_SUSPENDED` (401), `TOKEN_EXPIRED` (401), `TOKEN_REVOKED` (401), `UNAUTHENTICATED` (401), `INSUFFICIENT_SCOPE` (403), `INTEGRATION_BLOCKED_BY_ORGANIZATION` (403), `INTEGRATION_PENDING_APPROVAL` (403), `PAYLOAD_TOO_LARGE` (413), `UNSUPPORTED_MEDIA_TYPE` (415), `RATE_LIMITED` (429), `INTERNAL_ERROR` (500).

**Example: No account on by default**

```bash
curl -X PATCH "https://api.beplan.io/v1/organizations/Yx0k2N7mQf3bA9cRz1LwP/workspaces/3f6c2a8e-91b4-4d7e-a2c5-7e0b9d1f4a62/settings/default-platforms" \
  -H "Authorization: Bearer beplan_pat_…" \
  -H "Content-Type: application/json" \
  -d '{
  "accountIds": []
}'
```

Answers 200:

```json
{
  "data": {
    "accounts": [
      {
        "id": "5b9e2d7a-0c4f-4a18-9e3b-7d6c1f8a2e05",
        "platform": "instagram",
        "username": "northwind.studio",
        "avatarUrl": null
      }
    ],
    "accountIds": []
  }
}
```


---
HTML version: https://beplan.io/docs/api/default-platforms/
