Skip to main content

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.

The Instagram Publish endpoint lets you post photos and videos to a connected Instagram account without leaving your application. Pass a valid connection ID, a file reference, and an optional caption to schedule or immediately publish content to any Instagram profile you’ve linked in the Dohoo dashboard.

Endpoint

POST https://dohoo.ai/api/v2/instagram/publish

Request headers

HeaderRequiredDescription
X-API-KeyYour Dohoo API key
Content-TypeMust be application/json

Request body

FieldTypeRequiredDescription
connectionIdstringThe ID of the Instagram connection to publish from
fileIdstringThe ID of the uploaded file (photo or video)
captionstringCaption text for the post. Maximum 2,200 characters

Example request

curl -X POST https://dohoo.ai/api/v2/instagram/publish \
  -H "X-API-Key: dh_live_xxxxxxxxxxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "connectionId": "conn_instagram_001",
    "fileId": "abc123",
    "caption": "Your caption here #hashtag"
  }'

Example response

{
  "success": true,
  "platform": "instagram",
  "postId": "17841400123456789",
  "connectionId": "conn_instagram_001",
  "status": "published",
  "publishedAt": "2025-01-15T10:32:00Z",
  "url": "https://www.instagram.com/p/ABC123xyz/"
}
You can retrieve your connectionId by calling GET /api/connections/unified. This endpoint returns all active social connections linked to your Dohoo account.
Keep captions under 2,200 characters — Instagram silently truncates anything beyond that limit. Front-load your key message and hashtags near the beginning of the caption for maximum visibility.
Instagram does not support publishing to personal profiles via the API — only to Instagram Business or Creator accounts. Ensure the connected account is set to the correct account type in the Instagram app before publishing.