YouTube endpoints

YouTube endpoints in the Siar social media API: 14 operations that exist on YouTube only, with parameters, body fields, responses and curl examples.

Updated

These operations exist for YouTube only. The shared operations (posts, comments, analytics) are in the API reference; all network-specific areas are listed under network-specific operations.

Operations

OperationMethod and path
Set or change thumbnail for a YouTube videoPOST /api/v1/misc/youtube/thumbnail
Get channel playlistsGET /api/v1/misc/youtube/playlist
Create a new playlistPOST /api/v1/misc/youtube/playlist
Update an existing playlistPUT /api/v1/misc/youtube/playlist
Delete a channel playlistDELETE /api/v1/misc/youtube/playlist/{playlistId}
Add a video to a playlistPOST /api/v1/misc/youtube/playlist-items
Get videos from a playlistGET /api/v1/misc/youtube/playlist-items
Remove a video from a playlistDELETE /api/v1/misc/youtube/playlist-items/{playlistItemId}
Edit YouTube video metadataPATCH /api/v1/misc/youtube/video
Delete a YouTube videoDELETE /api/v1/misc/youtube/video
Edit YouTube commentPATCH /api/v1/misc/youtube/comment
Delete a YouTube commentDELETE /api/v1/misc/youtube/comment
Get YouTube video categoriesGET /api/v1/misc/youtube/video-categories
Get YouTube regionsGET /api/v1/misc/youtube/regions
POST /api/v1/misc/youtube/thumbnail

Set or change thumbnail for a YouTube video

misc.youtube.setThumbnail · requires x-api-key

Request body application/json

  • teamId string required
  • url string required
  • postId string required

Example

curl -X POST "https://api.siaran.my/api/v1/misc/youtube/thumbnail" \
  -H "x-api-key: $SIAR_API_KEY" \
  -H "content-type: application/json" \
  -d '{
    "teamId": "TEAM_ID",
    "url": "https://example.com/file.jpg",
    "postId": "POST_ID"
  }'

Response 200

1 top-level fields
  • items object[] default []
    5 fields
    • default object
      3 fields
      • url string required uri
      • width integer
      • height integer
    • medium object
      3 fields
      • url string required uri
      • width integer
      • height integer
    • high object
      3 fields
      • url string required uri
      • width integer
      • height integer
    • standard object
      3 fields
      • url string required uri
      • width integer
      • height integer
    • maxres object
      3 fields
      • url string required uri
      • width integer
      • height integer

Errors: 400 Validation failed · 401 Missing or invalid API key · 403 Plan limit or permission · 404 Not found · 429 Rate limited · 500 Server error · 502 Network error

GET /api/v1/misc/youtube/playlist

Get channel playlists

misc.youtube.getChannelPlaylist · requires x-api-key

Parameters

NameInTypeNotes
teamId required query string
maxResults query integer default 10

Example

curl -X GET "https://api.siaran.my/api/v1/misc/youtube/playlist?teamId=TEAM_ID" \
  -H "x-api-key: $SIAR_API_KEY"

Response 200

6 top-level fields
  • kind string
  • etag string
  • nextPageToken string
  • prevPageToken string
  • pageInfo object
    2 fields
    • totalResults integer
    • resultsPerPage integer
  • items object[] default []
    6 fields
    • kind string
    • etag string
    • id string
    • snippet object
      7 fields
      • publishedAt string
      • channelId string
      • title string
      • description string
      • channelTitle string
      • thumbnails object
        5 fields
        • default object
          3 fields
          • url string uri
          • width integer
          • height integer
        • medium object
          3 fields
          • url string uri
          • width integer
          • height integer
        • high object
          3 fields
          • url string uri
          • width integer
          • height integer
        • standard object
          3 fields
          • url string uri
          • width integer
          • height integer
        • maxres object
          3 fields
          • url string uri
          • width integer
          • height integer
      • localized object
        2 fields
        • title string
        • description string
    • status object
      1 field
      • privacyStatus string
    • contentDetails object
      1 field
      • itemCount integer

Errors: 400 Validation failed · 401 Missing or invalid API key · 403 Plan limit or permission · 404 Not found · 429 Rate limited · 500 Server error · 502 Network error

POST /api/v1/misc/youtube/playlist

Create a new playlist

misc.youtube.createNewChannelPlaylist · requires x-api-key

Request body application/json

  • teamId string required
  • title string required
  • description string required
  • privacyStatus string
    One of: public unlisted private

Example

curl -X POST "https://api.siaran.my/api/v1/misc/youtube/playlist" \
  -H "x-api-key: $SIAR_API_KEY" \
  -H "content-type: application/json" \
  -d '{
    "teamId": "TEAM_ID",
    "title": "Hello from Siar",
    "description": "Hello from Siar"
  }'

Response 200

6 top-level fields
  • kind string
  • etag string
  • id string
  • snippet object
    7 fields
    • publishedAt string
    • channelId string
    • title string
    • description string
    • channelTitle string
    • thumbnails object
      5 fields
      • default object
        3 fields
        • url string uri
        • width integer
        • height integer
      • medium object
        3 fields
        • url string uri
        • width integer
        • height integer
      • high object
        3 fields
        • url string uri
        • width integer
        • height integer
      • standard object
        3 fields
        • url string uri
        • width integer
        • height integer
      • maxres object
        3 fields
        • url string uri
        • width integer
        • height integer
    • localized object
      2 fields
      • title string
      • description string
  • status object
    1 field
    • privacyStatus string
  • contentDetails object
    1 field
    • itemCount integer

Errors: 400 Validation failed · 401 Missing or invalid API key · 403 Plan limit or permission · 404 Not found · 429 Rate limited · 500 Server error · 502 Network error

PUT /api/v1/misc/youtube/playlist

Update an existing playlist

misc.youtube.updateChannelPlaylist · requires x-api-key

Request body application/json

  • teamId string required
  • title string required
  • description string required
  • privacyStatus string
    One of: public unlisted private
  • playlistId string required

Example

curl -X PUT "https://api.siaran.my/api/v1/misc/youtube/playlist" \
  -H "x-api-key: $SIAR_API_KEY" \
  -H "content-type: application/json" \
  -d '{
    "teamId": "TEAM_ID",
    "title": "Hello from Siar",
    "description": "Hello from Siar",
    "playlistId": "PLAYLIST_ID"
  }'

Response 200

Same fields as the response of Create a new playlist.

Errors: 400 Validation failed · 401 Missing or invalid API key · 403 Plan limit or permission · 404 Not found · 429 Rate limited · 500 Server error · 502 Network error

DELETE /api/v1/misc/youtube/playlist/{playlistId}

Delete a channel playlist

misc.youtube.deleteChannelPlaylist · requires x-api-key

Parameters

NameInTypeNotes
playlistId required path string
teamId required query string

Example

curl -X DELETE "https://api.siaran.my/api/v1/misc/youtube/playlist/PLAYLISTID?teamId=TEAM_ID" \
  -H "x-api-key: $SIAR_API_KEY"

Response 200

A boolean.

Errors: 400 Validation failed · 401 Missing or invalid API key · 403 Plan limit or permission · 404 Not found · 429 Rate limited · 500 Server error · 502 Network error

POST /api/v1/misc/youtube/playlist-items

Add a video to a playlist

misc.youtube.addVideoToPlaylist · requires x-api-key

Request body application/json

  • teamId string required
  • playlistId string required
  • postId string required
  • position integer ≥ 0

Example

curl -X POST "https://api.siaran.my/api/v1/misc/youtube/playlist-items" \
  -H "x-api-key: $SIAR_API_KEY" \
  -H "content-type: application/json" \
  -d '{
    "teamId": "TEAM_ID",
    "playlistId": "PLAYLIST_ID",
    "postId": "POST_ID"
  }'

Response 200

5 top-level fields
  • kind string
  • etag string
  • id string
  • snippet object
    9 fields
    • publishedAt string
    • channelId string
    • title string
    • description string
    • channelTitle string
    • thumbnails object
      5 fields
      • default object
        3 fields
        • url string uri
        • width integer
        • height integer
      • medium object
        3 fields
        • url string uri
        • width integer
        • height integer
      • high object
        3 fields
        • url string uri
        • width integer
        • height integer
      • standard object
        3 fields
        • url string uri
        • width integer
        • height integer
      • maxres object
        3 fields
        • url string uri
        • width integer
        • height integer
    • playlistId string
    • position integer
    • resourceId object
      4 fields
      • kind string
      • videoId string
      • playlistId string
      • channelId string
  • contentDetails object
    2 fields
    • videoId string
    • videoPublishedAt string

Errors: 400 Validation failed · 401 Missing or invalid API key · 403 Plan limit or permission · 404 Not found · 429 Rate limited · 500 Server error · 502 Network error

GET /api/v1/misc/youtube/playlist-items

Get videos from a playlist

misc.youtube.getVideosFromPlaylist · requires x-api-key

Parameters

NameInTypeNotes
teamId required query string
playlistId required query string
maxResults query integer default 10

Example

curl -X GET "https://api.siaran.my/api/v1/misc/youtube/playlist-items?teamId=TEAM_ID&playlistId=PLAYLIST_ID" \
  -H "x-api-key: $SIAR_API_KEY"

Response 200

6 top-level fields
  • kind string
  • etag string
  • nextPageToken string
  • prevPageToken string
  • pageInfo object
    2 fields
    • totalResults integer
    • resultsPerPage integer
  • items object[] default []
    5 fields
    • kind string
    • etag string
    • id string
    • snippet object
      9 fields
      • publishedAt string
      • channelId string
      • title string
      • description string
      • channelTitle string
      • thumbnails object
        5 fields
        • default object
          3 fields
          • url string uri
          • width integer
          • height integer
        • medium object
          3 fields
          • url string uri
          • width integer
          • height integer
        • high object
          3 fields
          • url string uri
          • width integer
          • height integer
        • standard object
          3 fields
          • url string uri
          • width integer
          • height integer
        • maxres object
          3 fields
          • url string uri
          • width integer
          • height integer
      • playlistId string
      • position integer
      • resourceId object
        4 fields
        • kind string
        • videoId string
        • playlistId string
        • channelId string
    • contentDetails object
      2 fields
      • videoId string
      • videoPublishedAt string

Errors: 400 Validation failed · 401 Missing or invalid API key · 403 Plan limit or permission · 404 Not found · 429 Rate limited · 500 Server error · 502 Network error

DELETE /api/v1/misc/youtube/playlist-items/{playlistItemId}

Remove a video from a playlist

misc.youtube.deleteVideoFromPlaylist · requires x-api-key

Parameters

NameInTypeNotes
playlistItemId required path string
teamId required query string

Example

curl -X DELETE "https://api.siaran.my/api/v1/misc/youtube/playlist-items/PLAYLISTITEMID?teamId=TEAM_ID" \
  -H "x-api-key: $SIAR_API_KEY"

Response 200

Same fields as the response of Delete a channel playlist.

Errors: 400 Validation failed · 401 Missing or invalid API key · 403 Plan limit or permission · 404 Not found · 429 Rate limited · 500 Server error · 502 Network error

PATCH /api/v1/misc/youtube/video

Edit YouTube video metadata

misc.youtube.editVideo · requires x-api-key

Request body application/json

  • teamId string required
  • postId string required
  • title string
  • description string
  • tags string[]
  • categoryId string
  • privacyStatus string
    One of: public unlisted private
  • defaultLanguage string max length 35
  • defaultAudioLanguage string max length 35

Example

curl -X PATCH "https://api.siaran.my/api/v1/misc/youtube/video" \
  -H "x-api-key: $SIAR_API_KEY" \
  -H "content-type: application/json" \
  -d '{
    "teamId": "TEAM_ID",
    "postId": "POST_ID"
  }'

Response 200

2 top-level fields
  • success boolean required
  • permalink string required

Errors: 400 Validation failed · 401 Missing or invalid API key · 403 Plan limit or permission · 404 Not found · 429 Rate limited · 500 Server error · 502 Network error

DELETE /api/v1/misc/youtube/video

Delete a YouTube video

misc.youtube.deleteVideo · requires x-api-key

Request body application/json

  • teamId string required
  • postId string required

Example

curl -X DELETE "https://api.siaran.my/api/v1/misc/youtube/video" \
  -H "x-api-key: $SIAR_API_KEY" \
  -H "content-type: application/json" \
  -d '{
    "teamId": "TEAM_ID",
    "postId": "POST_ID"
  }'

Response 200

1 top-level fields
  • success boolean required

Errors: 400 Validation failed · 401 Missing or invalid API key · 403 Plan limit or permission · 404 Not found · 429 Rate limited · 500 Server error · 502 Network error

PATCH /api/v1/misc/youtube/comment

Edit YouTube comment

misc.youtube.editComment · requires x-api-key

Request body application/json

  • teamId string required
  • commentId string required
  • text string required min length 1

Example

curl -X PATCH "https://api.siaran.my/api/v1/misc/youtube/comment" \
  -H "x-api-key: $SIAR_API_KEY" \
  -H "content-type: application/json" \
  -d '{
    "teamId": "TEAM_ID",
    "commentId": "COMMENT_ID",
    "text": "Hello from Siar"
  }'

Response 200

2 top-level fields
  • success boolean required
  • permalink string nullable

Errors: 400 Validation failed · 401 Missing or invalid API key · 403 Plan limit or permission · 404 Not found · 429 Rate limited · 500 Server error · 502 Network error

DELETE /api/v1/misc/youtube/comment

Delete a YouTube comment

misc.youtube.deleteComment · requires x-api-key

Request body application/json

  • teamId string required
  • commentId string required

Example

curl -X DELETE "https://api.siaran.my/api/v1/misc/youtube/comment" \
  -H "x-api-key: $SIAR_API_KEY" \
  -H "content-type: application/json" \
  -d '{
    "teamId": "TEAM_ID",
    "commentId": "COMMENT_ID"
  }'

Response 200

Same fields as the response of Delete a YouTube video.

Errors: 400 Validation failed · 401 Missing or invalid API key · 403 Plan limit or permission · 404 Not found · 429 Rate limited · 500 Server error · 502 Network error

GET /api/v1/misc/youtube/video-categories

Get YouTube video categories

misc.youtube.getVideoCategories · requires x-api-key

Parameters

NameInTypeNotes
teamId required query string
regionCode query string

Example

curl -X GET "https://api.siaran.my/api/v1/misc/youtube/video-categories?teamId=TEAM_ID" \
  -H "x-api-key: $SIAR_API_KEY"

Response 200

3 top-level fields
  • kind string
  • etag string
  • items object[] default []
    4 fields
    • kind string
    • etag string
    • id string
    • snippet object
      3 fields
      • channelId string
      • title string
      • assignable boolean

Errors: 400 Validation failed · 401 Missing or invalid API key · 403 Plan limit or permission · 404 Not found · 429 Rate limited · 500 Server error · 502 Network error

GET /api/v1/misc/youtube/regions

Get YouTube regions

misc.youtube.getRegions · requires x-api-key

Parameters

NameInTypeNotes
teamId required query string

Example

curl -X GET "https://api.siaran.my/api/v1/misc/youtube/regions?teamId=TEAM_ID" \
  -H "x-api-key: $SIAR_API_KEY"

Response 200

3 top-level fields
  • kind string
  • etag string
  • items object[] default []
    4 fields
    • kind string
    • etag string
    • id string
    • snippet object
      2 fields
      • gl string
      • name string

Errors: 400 Validation failed · 401 Missing or invalid API key · 403 Plan limit or permission · 404 Not found · 429 Rate limited · 500 Server error · 502 Network error