Method: package.insert
Stay organized with collections
Save and categorize content based on your preferences.
Inserts a metadata-only package.
HTTP request
POST https://youtubepartner.googleapis.com/youtube/partner/v1/package
The URL uses gRPC Transcoding
syntax.
Query parameters
Parameters |
onBehalfOfContentOwner
|
string
The onBehalfOfContentOwner
parameter identifies the content owner that the user is acting on behalf of. This parameter supports users whose accounts are associated with multiple content owners.
|
Request body
The request body contains an instance of Package
.
Response body
A package
resource and possible errors or warnings returned in response to package.insert
request.
If successful, the response body contains data with the following structure:
Fields |
status
|
string
The package insert status. Indicates whether the insert operation completed successfully or identifies the general cause of failure. For most cases where the insert operation failed, the errors are described in the API response's errors
object. However, if the operation failed because the package contained non-metadata files, the errors
object is not included in the response.
|
errors[]
|
object ( ValidateError
)
The list of errors and/or warnings.
|
kind
|
string
The type of the API response. For this operation, the value is youtubePartner#packageInsert
.
|
resource
|
object ( Package
)
The package
resource.
|
Authorization scopes
Requires the following OAuth scope:
-
https://www.googleapis.com/auth/youtubepartner
For more information, see the OAuth 2.0 Overview
.
All rights reserved. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-20 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-20 UTC."],[[["\u003cp\u003eThis endpoint inserts a metadata-only package using a \u003ccode\u003ePOST\u003c/code\u003e request to the specified URL: \u003ccode\u003ehttps://youtubepartner.googleapis.com/youtube/partner/v1/package\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe request accepts an \u003ccode\u003eonBehalfOfContentOwner\u003c/code\u003e query parameter, which is a string used to identify the content owner for users associated with multiple content owners.\u003c/p\u003e\n"],["\u003cp\u003eThe request body must contain an instance of the \u003ccode\u003ePackage\u003c/code\u003e resource, defining the package's metadata.\u003c/p\u003e\n"],["\u003cp\u003eA successful response will include a JSON representation containing a \u003ccode\u003estatus\u003c/code\u003e, an array of \u003ccode\u003eerrors\u003c/code\u003e (if any), a \u003ccode\u003ekind\u003c/code\u003e indicating the response type, and the inserted \u003ccode\u003epackage\u003c/code\u003e resource.\u003c/p\u003e\n"],["\u003cp\u003eThe request requires the OAuth scope \u003ccode\u003ehttps://www.googleapis.com/auth/youtubepartner\u003c/code\u003e for authorization.\u003c/p\u003e\n"]]],["This content details how to insert a metadata-only package via the YouTube Partner API. A `POST` request is made to the specified URL, including an optional `onBehalfOfContentOwner` query parameter. The request body uses a `Package` instance. The response body will either contain a `package` resource with status, errors (if present), kind of response, and the `package` resource or errors in case of failure. An OAuth scope of `https://www.googleapis.com/auth/youtubepartner` is required for authorization.\n"],null,["# Method: package.insert\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n - [JSON representation](#body.PackageInsertResponse.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nInserts a metadata-only package.\n\n### HTTP request\n\n`POST https://youtubepartner.googleapis.com/youtube/partner/v1/package`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Query parameters\n\n| Parameters ||\n|--------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `onBehalfOfContentOwner` | `string` The `onBehalfOfContentOwner` parameter identifies the content owner that the user is acting on behalf of. This parameter supports users whose accounts are associated with multiple content owners. |\n\n### Request body\n\nThe request body contains an instance of [Package](/youtube/partner/reference/rest/v1/package#Package).\n\n### Response body\n\nA `package` resource and possible errors or warnings returned in response to `package.insert`request.\n\nIf successful, the response body contains data with the following structure:\n\n| JSON representation |\n|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"status\": string, \"errors\": [ { object (/youtube/partner/reference/rest/v1/validator#ValidateError) } ], \"kind\": string, \"resource\": { object (/youtube/partner/reference/rest/v1/package#Package) } } ``` |\n\n| Fields ||\n|------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `status` | `string` The package insert status. Indicates whether the insert operation completed successfully or identifies the general cause of failure. For most cases where the insert operation failed, the errors are described in the API response's `errors` object. However, if the operation failed because the package contained non-metadata files, the `errors` object is not included in the response. |\n| `errors[]` | `object (`[ValidateError](/youtube/partner/reference/rest/v1/validator#ValidateError)`)` The list of errors and/or warnings. |\n| `kind` | `string` The type of the API response. For this operation, the value is `youtubePartner#packageInsert`. |\n| `resource` | `object (`[Package](/youtube/partner/reference/rest/v1/package#Package)`)` The `package` resource. |\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/youtubepartner`\n\nFor more information, see the [OAuth 2.0 Overview](/identity/protocols/OAuth2)."]]