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 Facebook Publish endpoint lets you post photos and videos to any Facebook page connected to your Dohoo account. Supply the connection ID for the target page, the file you want to share, and an optional message, and Dohoo handles the rest of the publishing process with Facebook’s API.

Endpoint

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

Request headers

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

Request body

FieldTypeRequiredDescription
connectionIdstringThe ID of the Facebook page connection to publish from
fileIdstringThe ID of the uploaded file (photo or video)
messagestringThe text message to accompany the post

Example request

curl -X POST https://dohoo.ai/api/v2/facebook/publish \
  -H "X-API-Key: dh_live_xxxxxxxxxxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "connectionId": "conn_facebook_001",
    "fileId": "abc123",
    "message": "Your post message here"
  }'

Example response

{
  "success": true,
  "platform": "facebook",
  "postId": "123456789012345_987654321098765",
  "connectionId": "conn_facebook_001",
  "status": "published",
  "publishedAt": "2025-01-15T11:05:00Z",
  "url": "https://www.facebook.com/permalink/123456789"
}
This endpoint publishes to Facebook Pages only. Publishing to personal Facebook profiles is not supported by the Facebook Graph API.
Videos uploaded to Facebook perform best when encoded in H.264 with a 16:9 or 9:16 aspect ratio. Upload your file via the Dohoo media library first, then pass the returned fileId here.
Make sure the Facebook Page connected to Dohoo has the “Pages” permission granted during the OAuth flow. Missing permissions will result in a 403 Forbidden error on publish.