# TheTabber API

Version: 1.0.0

Public developer API for TheTabber. Authenticate every request with a workspace-scoped API key minted in **[Settings → Developer API](/dashboard/settings/api-keys)**.

Pass the key as `Authorization: Bearer ttbr_live_…`. Every key is scoped to one workspace; all reads and writes are limited to that workspace's social accounts and media.

**Rate limit:** 10 requests per second per key. Headers `X-RateLimit-Limit`, `X-RateLimit-Remaining`, and `X-RateLimit-Reset` are returned on every response.

- Base URL: `https://thetabber.com`
- OpenAPI spec (JSON): https://thetabber.com/v1/openapi.json
- Interactive reference: https://thetabber.com/docs/api

## Authentication

Scheme: HTTP `bearer`. Workspace-scoped API key minted in Settings → Developer API. Format: `ttbr_live_…`.

## Endpoints

### GET /v1/me

Get current key context

Returns the workspace and key the request is authenticated as. Useful for SDKs to validate a key on initialization.

Tags: Identity


**Responses**

| Status | Description | Schema |
| --- | --- | --- |
| `200` | Current key context. | `MeDto` |
| `401` |  |  |
| `429` |  |  |

### GET /v1/social-accounts

List connected social accounts

Paginated list of social accounts connected to the authenticated workspace. Filter by one or more platforms or usernames using repeated query parameters.

Tags: Social Accounts


**Parameters**

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `offset` | query | integer | no | Number of items to skip. |
| `limit` | query | integer | no | Number of items to return (max 100). |
| `platform` | query | array | no | Filter by platform(s). Repeat the query parameter to filter by multiple values (OR). |
| `username` | query | array | no | Filter by username(s). Repeat to OR multiple values. |


**Responses**

| Status | Description | Schema |
| --- | --- | --- |
| `200` | Paginated list of social accounts. |  |
| `401` |  |  |
| `429` |  |  |

### POST /v1/media/create-upload-url

Request a presigned upload URL

Step 1 of two-step upload. Returns a `media_id` and a signed `upload_url`. Step 2: PUT your file directly to the `upload_url` with the same `Content-Type` as the `mime_type` you sent here. The URL expires in 10 minutes.

Allowed mime types: `image/png`, `image/jpeg`, `image/webp`, `video/mp4`, `video/quicktime`. Size caps: 10MB for images, 200MB for videos.

Tags: Media


**Request body** (required): `CreateUploadUrlDto` — see [Schemas](#schemas).


**Responses**

| Status | Description | Schema |
| --- | --- | --- |
| `200` | Presigned upload URL. | `CreateUploadUrlResponseDto` |
| `400` |  |  |
| `401` |  |  |
| `429` |  |  |

### GET /v1/media

List media

Paginated list of media assets for the authenticated workspace. Filter by one or more types.

Tags: Media


**Parameters**

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `offset` | query | integer | no | Number of items to skip. |
| `limit` | query | integer | no | Number of items to return (max 100). |
| `type` | query | array | no | Filter by media kind. Repeat to OR multiple values. |


**Responses**

| Status | Description | Schema |
| --- | --- | --- |
| `200` | Paginated list of media. |  |
| `401` |  |  |
| `429` |  |  |

### GET /v1/media/{id}

Get media by ID

Returns the media record. If the asset is still `pending`, the server will HEAD-verify the S3 object and flip the status to `ready` when the file is present. Poll this endpoint after PUT-ing the file if you want explicit confirmation.

Tags: Media


**Parameters**

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes |  |


**Responses**

| Status | Description | Schema |
| --- | --- | --- |
| `200` | Media record. | `MediaDto` |
| `401` |  |  |
| `404` |  |  |
| `429` |  |  |

### DELETE /v1/media/{id}

Delete media

Soft-deletes the record and removes the S3 object.

Tags: Media


**Parameters**

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes |  |


**Responses**

| Status | Description | Schema |
| --- | --- | --- |
| `200` | Media deleted. | `DeleteResponseDto` |
| `401` |  |  |
| `404` |  |  |
| `429` |  |  |

### GET /v1/posts

List posts

Tags: Posts


**Parameters**

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `offset` | query | integer | no | Number of items to skip. |
| `limit` | query | integer | no | Number of items to return (max 100). |
| `status` | query | array | no | Filter by status. Repeat to OR. |


**Responses**

| Status | Description | Schema |
| --- | --- | --- |
| `200` | Paginated list of posts. |  |
| `401` |  |  |
| `429` |  |  |

### POST /v1/posts

Create a post

Publishes immediately when `scheduled_at` is null, otherwise schedules for later. Supply media via uploaded `media` IDs or developer-hosted `media_urls`. A post may contain at most one video OR up to 10 images.

Tags: Posts


**Request body** (required): `CreatePostDto` — see [Schemas](#schemas).


**Responses**

| Status | Description | Schema |
| --- | --- | --- |
| `200` | Post created. | `PostDto` |
| `400` |  |  |
| `401` |  |  |
| `402` | Quota exceeded. | `ErrorDto` |
| `409` | Media not uploaded. | `ErrorDto` |
| `429` |  |  |

### GET /v1/posts/{id}

Get a post by ID

Tags: Posts


**Parameters**

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes |  |


**Responses**

| Status | Description | Schema |
| --- | --- | --- |
| `200` | Post. | `PostDto` |
| `401` |  |  |
| `404` |  |  |
| `429` |  |  |

### PATCH /v1/posts/{id}

Update a scheduled post

Only posts with status `scheduled` can be updated. All fields are optional; only the keys present in the body are changed. `scheduled_at` must remain a future timestamp.

Tags: Posts


**Parameters**

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes |  |


**Request body** (required): `UpdatePostDto` — see [Schemas](#schemas).


**Responses**

| Status | Description | Schema |
| --- | --- | --- |
| `200` | Post updated. | `PostDto` |
| `400` |  |  |
| `401` |  |  |
| `404` |  |  |
| `409` | Status changed during update; refetch and retry. | `ErrorDto` |
| `429` |  |  |

### DELETE /v1/posts/{id}

Cancel a post

Cancels a scheduled or processing post. Posts already in a terminal state (posted, partial, failed) cannot be cancelled.

Tags: Posts


**Parameters**

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes |  |


**Responses**

| Status | Description | Schema |
| --- | --- | --- |
| `200` | Post cancelled. | `DeleteResponseDto` |
| `400` |  |  |
| `401` |  |  |
| `404` |  |  |
| `429` |  |  |

### GET /v1/post-results

List post results

Tags: Post Results


**Parameters**

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `offset` | query | integer | no | Number of items to skip. |
| `limit` | query | integer | no | Number of items to return (max 100). |
| `post_id` | query | array | no | Filter by post IDs. Repeat to OR. |
| `platform` | query | array | no | Filter by platform(s). Repeat to OR. |


**Responses**

| Status | Description | Schema |
| --- | --- | --- |
| `200` | Paginated list of post results. |  |
| `401` |  |  |
| `429` |  |  |

### GET /v1/post-results/{id}

Get a post result by ID

Tags: Post Results


**Parameters**

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes |  |


**Responses**

| Status | Description | Schema |
| --- | --- | --- |
| `200` | Post result. | `PostResultDto` |
| `401` |  |  |
| `404` |  |  |
| `429` |  |  |

### GET /v1/social-accounts/{id}

Get a social account by ID

Tags: Social Accounts


**Parameters**

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes | Social account UUID. |


**Responses**

| Status | Description | Schema |
| --- | --- | --- |
| `200` | Social account. | `SocialAccountDto` |
| `401` |  |  |
| `404` |  |  |
| `429` |  |  |


## Schemas

### MeDto

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `user_id` | string | yes |  |
| `workspace_id` | string | yes |  |
| `workspace_name` | string | yes |  |
| `key_id` | string | yes |  |
| `key_name` | string | no |  |
| `key_prefix` | string | no |  |
| `scopes` | array | yes |  |

### SocialAccountDto

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | yes |  |
| `platform` | string | yes |  |
| `username` | string | no |  |
| `display_name` | string | no |  |
| `avatar_url` | string | no |  |
| `is_active` | boolean | yes |  |
| `created_at` | string | yes |  |
| `updated_at` | string | no |  |
| `facebook_pages` | array | no | Facebook only. The Pages this connection can publish to. Use a page `id` here to build the `page_mapping` a Facebook post requires. Omitted for non-Facebook accounts. |

### CreateUploadUrlDto

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `name` | string | yes | Original filename. Used for the S3 key and audit. |
| `mime_type` | string | yes |  |
| `size_bytes` | integer | yes | Exact byte length of the file. Must match the bytes you PUT to the upload URL. |

### CreateUploadUrlResponseDto

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `media_id` | string | yes |  |
| `upload_url` | string | yes | PUT your file to this URL within 10 minutes. |
| `name` | string | yes |  |
| `expires_at` | string | yes | When the media record expires if not referenced by a post. |

### MediaDto

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | yes |  |
| `mime_type` | string | yes |  |
| `kind` | string | yes |  |
| `status` | string | yes |  |
| `object` | object | yes |  |
| `created_at` | string | yes |  |
| `expires_at` | string | no |  |

### DeleteResponseDto

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `success` | boolean | yes |  |

### CreatePostDto

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `caption` | string | no | Caption applied to all targeted platforms unless overridden. |
| `social_accounts` | array | yes | Social account UUIDs from /v1/social-accounts. |
| `media` | array | no | Media UUIDs from /v1/media. One video OR up to 10 images. |
| `media_urls` | array | no | Public URLs the developer already hosts. Ignored if `media` is provided. |
| `scheduled_at` | string | no | ISO 8601 future timestamp. Omit or null to publish immediately. |
| `timezone` | string | no | IANA timezone for the scheduled time. Defaults to UTC. |
| `platform_configurations` | object | no | Per-platform overrides and platform-specific knobs. See examples below.  **Facebook:** `page_mapping` maps each targeted Facebook `<account_id>` to the `<page_id>` to publish to. Get valid page IDs from the `facebook_pages` array on `GET /v1/social-accounts` (or `/v1/social-accounts/{id}`). |

### UpdatePostDto

All fields are optional. Only keys present in the body are changed.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `caption` | string | no |  |
| `social_accounts` | array | no |  |
| `media` | array | no |  |
| `media_urls` | array | no |  |
| `scheduled_at` | string | no | New future timestamp. Cannot be null on update. |
| `timezone` | string | no |  |
| `platform_configurations` | object | no |  |

### PostDto

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | yes |  |
| `status` | string | yes |  |
| `post_type` | string | yes |  |
| `caption` | string | no |  |
| `social_accounts` | array | yes |  |
| `media` | array | yes |  |
| `media_urls` | array | yes |  |
| `platform_configurations` | object | no |  |
| `scheduled_at` | string | no |  |
| `timezone` | string | no |  |
| `published_at` | string | no |  |
| `error_message` | string | no |  |
| `created_at` | string | yes |  |
| `updated_at` | string | no |  |

### PostResultDto

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | yes |  |
| `post_id` | string | yes |  |
| `social_account_id` | string | yes |  |
| `platform` | string | yes |  |
| `success` | boolean | yes |  |
| `error` | object | no | Present when success is false. |
| `platform_data` | object | no | Present when success is true. Identifiers for the published content on the target platform. |
| `created_at` | string | yes |  |

### PageMeta

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `total` | integer | yes | Total items available across all pages. |
| `offset` | integer | yes |  |
| `limit` | integer | yes |  |
| `next` | string | yes | URL for the next page, or null if no more pages. |

### ErrorDto

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `error` | object | yes |  |
