Method: posts.insert

Creates and publishes a text-only post or an image post.

This method is in a pilot phase with access limited to select launch partners (approved Google Cloud projects). Broader public API access is planned for General Availability in 2027.

An image post contains 1 to 10 images, which you upload with the posts.imageUpload method before calling this method, and optional text. Posts created with this method are public and are published immediately; scheduled posts aren't supported.

In the Post request body, specify snippet.channelId and at least one of snippet.textDisplay (required for text-only posts; optional for image posts) or 1 to 10 attachments.imageAttachments[].uploadToken values. Each upload token must come from a posts.imageUpload request for the same channel; upload the image again for each post instead of reusing a token.

The authorized user must own the channel or have permission to create posts for it.

Quota impact: A call to this method has a quota cost of 1 unit. The cost counts against the Post Uploads quota, which is separate from the default YouTube Data API quota.

For method-specific error responses, see posts.insert errors.

HTTP request

POST https://youtube.googleapis.com/youtube/v3/posts

The URL uses gRPC Transcoding syntax.

Query parameters

Parameters
part[]

string

Required. The part parameter specifies a comma-separated list of one or more post resource properties that the request sets and that the API response includes.

Set it to snippet for a text-only post, or snippet,attachments for an image post. You can also include id and status to add those properties to the response.

Request body

The request body contains an instance of Post.

Response body

If successful, the response body contains a newly created instance of Post.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/youtube
  • https://www.googleapis.com/auth/youtubepartner
  • https://www.googleapis.com/auth/youtube.force-ssl

For more information, see the OAuth 2.0 Overview.