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 YouTube API endpoints let you upload videos to a connected YouTube channel and optionally set a custom thumbnail after publishing. Use the publish endpoint to send a video live with a title, description, and privacy status, then call the thumbnail endpoint with the returned video ID to attach a custom thumbnail image. Both endpoints authenticate via your Dohoo API key.
Dohoo uses YouTube API Services. By connecting your YouTube channel, you agree to the YouTube Terms of Service.

Publish a video

Upload a video to your connected YouTube channel.

Endpoint

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

Request headers

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

Request body

FieldTypeRequiredDescription
connectionIdstringThe ID of the YouTube connection to publish from
fileIdstringThe ID of the uploaded video file
titlestringTitle of the YouTube video. Maximum 100 characters
descriptionstringDescription for the video. Maximum 5,000 characters
privacyStatusstringVisibility: "public", "unlisted", or "private". Defaults to "public"

Example request

curl -X POST https://dohoo.ai/api/v2/youtube/publish \
  -H "X-API-Key: dh_live_xxxxxxxxxxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "connectionId": "conn_youtube_001",
    "fileId": "abc123",
    "title": "My Video Title",
    "description": "Video description",
    "privacyStatus": "public"
  }'

Example response

{
  "success": true,
  "platform": "youtube",
  "videoId": "dQw4w9WgXcQ",
  "connectionId": "conn_youtube_001",
  "status": "published",
  "privacyStatus": "public",
  "publishedAt": "2025-01-15T09:00:00Z",
  "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
}
Set privacyStatus to "unlisted" while testing so your video is accessible via direct link but won’t appear in search results or on your channel page.

Set a custom thumbnail

Attach a custom thumbnail image to a previously published YouTube video.

Endpoint

POST https://dohoo.ai/api/v2/youtube/thumbnail/:videoId
Replace :videoId in the URL with the videoId returned from the publish endpoint above.

Request headers

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

Request body

FieldTypeRequiredDescription
thumbnailFileIdstringThe ID of the uploaded thumbnail image file

Example request

curl -X POST https://dohoo.ai/api/v2/youtube/thumbnail/VIDEO_ID \
  -H "X-API-Key: dh_live_xxxxxxxxxxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{ "thumbnailFileId": "thumb456" }'

Example response

{
  "success": true,
  "videoId": "dQw4w9WgXcQ",
  "thumbnailUrl": "https://i.ytimg.com/vi/dQw4w9WgXcQ/maxresdefault.jpg",
  "status": "thumbnail_set",
  "updatedAt": "2025-01-15T09:05:00Z"
}
Custom thumbnails are only available on YouTube channels that are verified. If your channel is unverified, the thumbnail endpoint will return an error and YouTube will auto-generate a thumbnail instead.
YouTube recommends thumbnail images at 1280×720 pixels (16:9 aspect ratio), under 2 MB, in JPG, GIF, or PNG format.