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

# TikTok Posting API: Publish Videos | Dohoo

> Use the Dohoo TikTok posting API to publish short-form videos programmatically from your app or automation workflow.

The TikTok publish endpoint lets you post videos to a connected TikTok account directly through the Dohoo API. Unlike the other platform-specific endpoints, TikTok publishing uses the shared social post endpoint — you specify `"platform": "tiktok"` in the request body to route the content to TikTok. Pass your connection ID, the uploaded video file reference, and an optional caption to get your video live.

## Endpoint

```
POST https://dohoo.ai/api/social/post
```

## Request headers

| Header         | Required | Description                |
| -------------- | -------- | -------------------------- |
| `X-API-Key`    | ✅        | Your Dohoo API key         |
| `Content-Type` | ✅        | Must be `application/json` |

## Request body

| Field          | Type   | Required | Description                                                 |
| -------------- | ------ | -------- | ----------------------------------------------------------- |
| `platform`     | string | ✅        | Must be `"tiktok"`                                          |
| `connectionId` | string | ✅        | The ID of the TikTok connection to publish from             |
| `fileId`       | string | ✅        | The ID of the uploaded video file                           |
| `caption`      | string | ❌        | Caption for the TikTok post. Supports hashtags and mentions |

## Example request

```bash theme={null}
curl -X POST https://dohoo.ai/api/social/post \
  -H "X-API-Key: dh_live_xxxxxxxxxxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "platform": "tiktok",
    "connectionId": "conn_tiktok_001",
    "fileId": "abc123",
    "caption": "Your TikTok caption #trending"
  }'
```

## Example response

```json theme={null}
{
  "success": true,
  "platform": "tiktok",
  "postId": "7234567890123456789",
  "connectionId": "conn_tiktok_001",
  "status": "published",
  "publishedAt": "2025-01-15T14:20:00Z",
  "url": "https://www.tiktok.com/@yourhandle/video/7234567890123456789"
}
```

<Warning>
  TikTok **only supports video content** through this endpoint. Image posts are not supported. Attempting to publish a non-video file will return a `400 Bad Request` error.
</Warning>

<Note>
  Videos must be between **3 seconds and 10 minutes** in length. TikTok may reject videos outside this range during processing, even if the API initially accepts the request.
</Note>

<Tip>
  For best results on TikTok, use vertical video (9:16 aspect ratio) at a minimum resolution of 1080×1920. Front-load engaging content in the first 2–3 seconds to reduce drop-off rates.
</Tip>
