ProvidersYouTube

YouTube

YouTube channels through your Google Cloud project, with the single youtube.force-ssl scope.

The permissions each capability needs are in App Review: YouTube.

  • YouTube keeps no Shorts flag and classifies uploads on criteria it does not publish, so reads report durationSeconds and aspectRatio and carry no variant; publishing with variant: "short" applies Shorts media rules.
  • YouTube publishes no comment webhooks, so uploads and comments are collected by polling against your project's daily quota; a spent quota answers platform_rate_limit with Retry-After set to Google's midnight-Pacific reset.
  • Uploads from a project that has not passed Google's compliance audit are made private by YouTube, whatever privacyStatus you asked for.
  • Livestreams and live chat are not a surface yet.
Content typeOperationsEventsBackfill
youtube.videos.itemslist, get, publish, update, deletecreatedyes
youtube.videos.commentslist, get, publish, update, moderate, deletecreatedyes

youtube.videos.items

The channel's uploads, videos and Shorts alike.

list

List the channel's videos and Shorts, newest first.

FieldTypeRequiredDescription
connectedProfileIdstringyesKoil Connected Profile associated with the operation.
cursorstringnoOpaque cursor for fetching the next result page.
limitnumbernoMaximum number of items to return.
includeProviderRawbooleannoWhether to include transient provider-native payloads.
JSON Schema
{
  "additionalProperties": false,
  "type": "object",
  "properties": {
    "connectedProfileId": {
      "description": "Koil Connected Profile associated with the operation.",
      "minLength": 1,
      "type": "string"
    },
    "cursor": {
      "description": "Opaque cursor for fetching the next result page.",
      "minLength": 1,
      "type": "string"
    },
    "limit": {
      "description": "Maximum number of items to return.",
      "minimum": 1,
      "type": "number"
    },
    "includeProviderRaw": {
      "description": "Whether to include transient provider-native payloads.",
      "type": "boolean"
    }
  },
  "required": [
    "connectedProfileId"
  ]
}

get

Get one YouTube video by provider id.

FieldTypeRequiredDescription
connectedProfileIdstringyesKoil Connected Profile associated with the operation.
externalIdstringyes
includeProviderRawbooleannoWhether to include transient provider-native payloads.
JSON Schema
{
  "additionalProperties": false,
  "type": "object",
  "properties": {
    "connectedProfileId": {
      "description": "Koil Connected Profile associated with the operation.",
      "minLength": 1,
      "type": "string"
    },
    "externalId": {
      "minLength": 1,
      "type": "string"
    },
    "includeProviderRaw": {
      "description": "Whether to include transient provider-native payloads.",
      "type": "boolean"
    }
  },
  "required": [
    "connectedProfileId",
    "externalId"
  ]
}

publish

Upload a YouTube video or Short through the resumable upload protocol.

Submit through POST /v1/publish-requests with contentType: "youtube.videos.items". These fields go in the item's args; connectedProfileId and variant are item fields.

FieldTypeRequiredDescription
titlestringyesUp to 100 characters; YouTube refuses < and >.
textstringnoDescription, up to 5,000 bytes; YouTube refuses < and >.
tagsstring[]noKeyword tags; at most 500 characters in total.
categoryIdstringnoA YouTube video category id, e.g. 22 for People & Blogs.
privacyStatus"public" | "private" | "unlisted"yesWho can see the video.
publishAtstring (date-time)noYouTube's scheduled release time. Requires privacyStatus private; YouTube makes the video public at this instant.
madeForKidsbooleannoThe self-declared audience setting YouTube requires an answer for.
containsSyntheticMediabooleannoDisclose altered or synthetic content.
notifySubscribersbooleannoWhether YouTube notifies subscribers; defaults to true.
mediaobject | object[]yes
schedulingobjectnoFuture operation time and optional wall-clock timezone.
JSON Schema
{
  "additionalProperties": false,
  "type": "object",
  "properties": {
    "title": {
      "minLength": 1,
      "maxLength": 100,
      "pattern": "^[^<>]*$",
      "description": "Up to 100 characters; YouTube refuses < and >.",
      "type": "string"
    },
    "text": {
      "maxLength": 5000,
      "pattern": "^[^<>]*$",
      "description": "Description, up to 5,000 bytes; YouTube refuses < and >.",
      "type": "string"
    },
    "tags": {
      "description": "Keyword tags; at most 500 characters in total.",
      "type": "array",
      "items": {
        "minLength": 1,
        "type": "string"
      }
    },
    "categoryId": {
      "minLength": 1,
      "description": "A YouTube video category id, e.g. 22 for People & Blogs.",
      "type": "string"
    },
    "privacyStatus": {
      "description": "Who can see the video.",
      "anyOf": [
        {
          "const": "public",
          "type": "string"
        },
        {
          "const": "private",
          "type": "string"
        },
        {
          "const": "unlisted",
          "type": "string"
        }
      ]
    },
    "publishAt": {
      "format": "date-time",
      "description": "YouTube's scheduled release time. Requires privacyStatus private; YouTube makes the video public at this instant.",
      "type": "string"
    },
    "madeForKids": {
      "description": "The self-declared audience setting YouTube requires an answer for.",
      "type": "boolean"
    },
    "containsSyntheticMedia": {
      "description": "Disclose altered or synthetic content.",
      "type": "boolean"
    },
    "notifySubscribers": {
      "description": "Whether YouTube notifies subscribers; defaults to true.",
      "type": "boolean"
    },
    "media": {
      "minItems": 1,
      "maxItems": 1,
      "type": "array",
      "items": {
        "anyOf": [
          {
            "additionalProperties": false,
            "type": "object",
            "properties": {
              "mediaId": {
                "minLength": 1,
                "type": "string"
              },
              "contentType": {
                "minLength": 1,
                "pattern": "^video/",
                "type": "string"
              },
              "altText": {
                "minLength": 1,
                "type": "string"
              }
            },
            "required": [
              "mediaId"
            ]
          },
          {
            "additionalProperties": false,
            "type": "object",
            "properties": {
              "sourceUrl": {
                "minLength": 1,
                "type": "string"
              },
              "contentType": {
                "minLength": 1,
                "pattern": "^video/",
                "type": "string"
              },
              "altText": {
                "minLength": 1,
                "type": "string"
              }
            },
            "required": [
              "sourceUrl"
            ]
          }
        ]
      }
    },
    "scheduling": {
      "additionalProperties": false,
      "description": "Future operation time and optional wall-clock timezone.",
      "type": "object",
      "properties": {
        "at": {
          "format": "date-time",
          "description": "Future execution time as an ISO-8601 string.",
          "type": "string"
        },
        "timezone": {
          "minLength": 1,
          "type": "string"
        }
      },
      "required": [
        "at"
      ]
    }
  },
  "required": [
    "title",
    "privacyStatus",
    "media"
  ]
}

update

Edit a video's title, description, tags, category, or privacy.

FieldTypeRequiredDescription
connectedProfileIdstringyesKoil Connected Profile associated with the operation.
externalIdstringyes
titlestringno
textstringno
tagsstring[]no
categoryIdstringno
privacyStatus"public" | "private" | "unlisted"noWho can see the video.
includeProviderRawbooleanno
JSON Schema
{
  "additionalProperties": false,
  "type": "object",
  "properties": {
    "connectedProfileId": {
      "description": "Koil Connected Profile associated with the operation.",
      "minLength": 1,
      "type": "string"
    },
    "externalId": {
      "minLength": 1,
      "type": "string"
    },
    "title": {
      "minLength": 1,
      "maxLength": 100,
      "pattern": "^[^<>]*$",
      "type": "string"
    },
    "text": {
      "maxLength": 5000,
      "pattern": "^[^<>]*$",
      "type": "string"
    },
    "tags": {
      "type": "array",
      "items": {
        "minLength": 1,
        "type": "string"
      }
    },
    "categoryId": {
      "minLength": 1,
      "type": "string"
    },
    "privacyStatus": {
      "description": "Who can see the video.",
      "anyOf": [
        {
          "const": "public",
          "type": "string"
        },
        {
          "const": "private",
          "type": "string"
        },
        {
          "const": "unlisted",
          "type": "string"
        }
      ]
    },
    "includeProviderRaw": {
      "type": "boolean"
    }
  },
  "required": [
    "connectedProfileId",
    "externalId"
  ]
}

delete

Delete one of the channel's videos.

FieldTypeRequiredDescription
connectedProfileIdstringyesKoil Connected Profile associated with the operation.
externalIdstringyes
JSON Schema
{
  "additionalProperties": false,
  "type": "object",
  "properties": {
    "connectedProfileId": {
      "description": "Koil Connected Profile associated with the operation.",
      "minLength": 1,
      "type": "string"
    },
    "externalId": {
      "minLength": 1,
      "type": "string"
    }
  },
  "required": [
    "connectedProfileId",
    "externalId"
  ]
}

Not offered

  • moderate: not applicable

Events

Backfill: supported (bounded coverage); see Backfill history.

Item schema

What list and get return and what events carry as data.

FieldTypeRequiredDescription
externalIdstringyesProvider-owned content identifier.
titlestringyes
textstringnoCaption/body text for content.
tagsstring[]no
mediaobject[]no
providerPermalinkstring (uri)noCanonical provider URL for content.
privacyStatus"public" | "private" | "unlisted"noWho can see the video.
aspectRationumberno
uploadStatusstringno
liveBroadcast"none" | "live" | "upcoming"no
madeForKidsbooleanno
durationSecondsnumberno
engagementobjectnoProvider-reported engagement counts.
publishedAtstring (date-time)noProvider publish timestamp as an ISO-8601 string.
scheduledPublishAtstring (date-time)noWhen a private video is scheduled to go public.
providerRawunknownnoOptional provider-native payload included only for transient delivery/debug use.
contentType"youtube.videos.items"yes

youtube.videos.comments

Comments on the channel's videos, and replies to them.

list

List comments across the channel's videos (newest thread first, replies inline), one video's comments, or the replies to one comment.

FieldTypeRequiredDescription
connectedProfileIdstringyesKoil Connected Profile associated with the operation.
mediaExternalIdstringnoOnly this video's comments; every video of the channel otherwise.
parentExternalIdstringnoThe replies to this top-level comment instead of the threads.
moderationStatus"published" | "heldForReview" | "likelySpam"noWhich of YouTube's queues to read; defaults to published. Ignored with parentExternalId.
searchTermsstringnoOnly threads containing these terms. Ignored with parentExternalId.
cursorstringnoOpaque cursor for fetching the next result page.
limitnumbernoMaximum number of items to return.
includeProviderRawbooleannoWhether to include transient provider-native payloads.
JSON Schema
{
  "additionalProperties": false,
  "type": "object",
  "properties": {
    "connectedProfileId": {
      "description": "Koil Connected Profile associated with the operation.",
      "minLength": 1,
      "type": "string"
    },
    "mediaExternalId": {
      "minLength": 1,
      "description": "Only this video's comments; every video of the channel otherwise.",
      "type": "string"
    },
    "parentExternalId": {
      "minLength": 1,
      "description": "The replies to this top-level comment instead of the threads.",
      "type": "string"
    },
    "moderationStatus": {
      "description": "Which of YouTube's queues to read; defaults to published. Ignored with parentExternalId.",
      "anyOf": [
        {
          "const": "published",
          "type": "string"
        },
        {
          "const": "heldForReview",
          "type": "string"
        },
        {
          "const": "likelySpam",
          "type": "string"
        }
      ]
    },
    "searchTerms": {
      "minLength": 1,
      "description": "Only threads containing these terms. Ignored with parentExternalId.",
      "type": "string"
    },
    "cursor": {
      "description": "Opaque cursor for fetching the next result page.",
      "minLength": 1,
      "type": "string"
    },
    "limit": {
      "description": "Maximum number of items to return.",
      "minimum": 1,
      "type": "number"
    },
    "includeProviderRaw": {
      "description": "Whether to include transient provider-native payloads.",
      "type": "boolean"
    }
  },
  "required": [
    "connectedProfileId"
  ]
}

get

Get one YouTube comment by provider id.

FieldTypeRequiredDescription
connectedProfileIdstringyesKoil Connected Profile associated with the operation.
externalIdstringyes
includeProviderRawbooleannoWhether to include transient provider-native payloads.
JSON Schema
{
  "additionalProperties": false,
  "type": "object",
  "properties": {
    "connectedProfileId": {
      "description": "Koil Connected Profile associated with the operation.",
      "minLength": 1,
      "type": "string"
    },
    "externalId": {
      "minLength": 1,
      "type": "string"
    },
    "includeProviderRaw": {
      "description": "Whether to include transient provider-native payloads.",
      "type": "boolean"
    }
  },
  "required": [
    "connectedProfileId",
    "externalId"
  ]
}

publish

Publish a YouTube comment: a top-level comment on a video, or a reply to a top-level comment.

Submit through POST /v1/publish-requests with contentType: "youtube.videos.comments". These fields go in the item's args; connectedProfileId and variant are item fields.

FieldTypeRequiredDescription
targetobjectyesThe provider content this publish targets, identified as events identify it.
textstringyesComment text as the author wrote it.
JSON Schema
{
  "additionalProperties": false,
  "type": "object",
  "properties": {
    "target": {
      "additionalProperties": false,
      "description": "The provider content this publish targets, identified as events identify it.",
      "type": "object",
      "properties": {
        "contentType": {
          "anyOf": [
            {
              "const": "youtube.videos.comments",
              "type": "string"
            },
            {
              "const": "youtube.videos.items",
              "type": "string"
            }
          ]
        },
        "externalId": {
          "description": "Provider-owned content identifier.",
          "minLength": 1,
          "type": "string"
        }
      },
      "required": [
        "contentType",
        "externalId"
      ]
    },
    "text": {
      "description": "Comment text as the author wrote it.",
      "minLength": 1,
      "maxLength": 10000,
      "type": "string"
    }
  },
  "required": [
    "target",
    "text"
  ]
}

update

Edit the text of a comment the channel made.

FieldTypeRequiredDescription
connectedProfileIdstringyesKoil Connected Profile associated with the operation.
externalIdstringyes
textstringyesComment text as the author wrote it.
includeProviderRawbooleannoWhether to include transient provider-native payloads.
JSON Schema
{
  "additionalProperties": false,
  "type": "object",
  "properties": {
    "connectedProfileId": {
      "description": "Koil Connected Profile associated with the operation.",
      "minLength": 1,
      "type": "string"
    },
    "externalId": {
      "minLength": 1,
      "type": "string"
    },
    "text": {
      "description": "Comment text as the author wrote it.",
      "minLength": 1,
      "maxLength": 10000,
      "type": "string"
    },
    "includeProviderRaw": {
      "description": "Whether to include transient provider-native payloads.",
      "type": "boolean"
    }
  },
  "required": [
    "connectedProfileId",
    "externalId",
    "text"
  ]
}

moderate

Publish, hold for review, or reject a comment on one of the channel's videos, optionally banning its author.

FieldTypeRequiredDescription
connectedProfileIdstringyesKoil Connected Profile associated with the operation.
externalIdstringyes
moderationStatus"published" | "heldForReview" | "rejected"yes
banAuthorbooleannoAlso block the comment's author from the channel. Only with moderationStatus rejected.
JSON Schema
{
  "additionalProperties": false,
  "type": "object",
  "properties": {
    "connectedProfileId": {
      "description": "Koil Connected Profile associated with the operation.",
      "minLength": 1,
      "type": "string"
    },
    "externalId": {
      "minLength": 1,
      "type": "string"
    },
    "moderationStatus": {
      "anyOf": [
        {
          "const": "published",
          "type": "string"
        },
        {
          "const": "heldForReview",
          "type": "string"
        },
        {
          "const": "rejected",
          "type": "string"
        }
      ]
    },
    "banAuthor": {
      "description": "Also block the comment's author from the channel. Only with moderationStatus rejected.",
      "type": "boolean"
    }
  },
  "required": [
    "connectedProfileId",
    "externalId",
    "moderationStatus"
  ]
}

delete

Delete a comment on one of the channel's videos.

FieldTypeRequiredDescription
connectedProfileIdstringyesKoil Connected Profile associated with the operation.
externalIdstringyes
JSON Schema
{
  "additionalProperties": false,
  "type": "object",
  "properties": {
    "connectedProfileId": {
      "description": "Koil Connected Profile associated with the operation.",
      "minLength": 1,
      "type": "string"
    },
    "externalId": {
      "minLength": 1,
      "type": "string"
    }
  },
  "required": [
    "connectedProfileId",
    "externalId"
  ]
}

Events

Backfill: supported (bounded coverage); see Backfill history.

Item schema

What list and get return and what events carry as data.

FieldTypeRequiredDescription
externalIdstringyesProvider-owned content identifier.
mediaExternalIdstringyes
textstringnoCaption/body text for content.
authorobjectnoProvider actor reference for observed content.
authorProfileImageUrlstringno
threadobjectnoParent/root identifiers for threaded contexts.
moderationStatus"published" | "heldForReview" | "likelySpam" | "rejected"noYouTube's moderation state of a comment.
engagementobjectnoProvider-reported engagement counts.
providerPermalinkstring (uri)noCanonical provider URL for content.
publishedAtstring (date-time)noProvider publish timestamp as an ISO-8601 string.
updatedAtstring (date-time)noProvider update timestamp as an ISO-8601 string.
providerRawunknownnoOptional provider-native payload included only for transient delivery/debug use.
contentType"youtube.videos.comments"yes

On this page