openapi: 3.0.0
x-stoplight:
  id: ybzk39fiws46g
info:
  title: api.video
  description: 'api.video is an API that encodes on the go to facilitate immediate playback, enhancing viewer streaming experiences across multiple devices and platforms. You can stream live or on-demand online videos within minutes.'
  version: '1'
servers:
  - url: 'https://ws.api.video'
    description: Production server
  - url: 'https://sandbox.api.video'
    description: 'Test server `all videos are watermarked, and deleted after 24 hours.'
paths:
  /auth/api-key:
    post:
      tags:
        - Advanced authentication
      summary: Get Bearer Token
      description: |-
        Returns a bearer token that can be used to authenticate other endpoint.

        You can find the tutorial on using the disposable bearer token [here](https://docs.api.video/reference/disposable-bearer-token-authentication).
      operationId: POST_auth-api-key
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/authenticate-payload'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/access-token'
              examples:
                response:
                  value:
                    token_type: Bearer
                    expires_in: 3600
                    access_token: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6IjUyZWM4NWUyMjFkODZjOWI0NDQ5NzBhMjQwMzUyOWQ4MDQyNGQ3ZmJjYjFlYWM2MjVlM2VkMjI2YWRlNTcxMDY2NDUyZDc0NjdhN2E4NjI0In0.eyJhdWQiOiJsaWJjYXN0IiwianRpIjoiNTJlYzg1ZTIyMWQ4NmM5YjQ0NDk3MGEyNDAzNTI5ZDgwNDI0ZDdmYmNiMWVhYzYyNWUzZWQyMjZhZGU1NzEwNjY0NTJkNzQ2N2E3YTg2MjQiLCJpYXQiOjE1MjUyNzYxNDcsIm5iZiI6MTUyNTI3NjE0NywiZXhwIjoxNTI1Mjc5NzQ3LCJzdWIiOiJ1c01vbml0b3IiLCJzY29wZXMiOlsibW9uaXRvci5saWJjYXN0LmNvbSJdLCJjb250ZXh0Ijp7InVzZXIiOiJ1c01vbml0b3IiLCJwcm9qZWN0IjoicHJNb25pdG9yIiwibWVtYmVyIjoibWVNb25pdG9yIn19.rUvishDNyJLNlI4W5VmguNecm5KD2uZgPkKJQbaqw-cJbSrVxkSbiKYtk_E3cz3WT7-IS2yFTsYN3uIo5Rbit8_HftweyEp2bdBRI8yjR6oZZ1sNJJXswISN1i2kk4r-aaxu7Xxf_LtsjOMUj_YZsvcc2nqBXPKjHbJCJryx3DDJaIcymOqao7nhQaCCQyrQooAXNTYs4E9fWN1dC_x2O-zok5TuG-xhEW-umwxfSUMWNgSTkz38ACceQ0PCJSgB3jqjDH4MwC7B3ppEPZuK5E6JhKeyRlalswRyYq3UQPnVeMTam7YQHsuTgbehF6WySW8i44o7V_MCe9hjPdp-WA
                    refresh_token: def50200a28d88fb9aaa921be78eeb5604b071101a334899a7d5fc7492cf8ea752962ddc8961fe5c126101d4ecacd980396eb2fd494995b812dffcb98256c4277f790d1f658fc2d2e34f350740544e5232d69d68d34c648271d706c5e7049adac0b1832d0fdf71809715cc7e97fa63f65966deadb501a55ff469b0fd23a637cb6acbe9d9b8594a17f09efc2efeed82984764a0065d5e29c950c7b081a61ba2aaa192be3085c400ee37eac50fa9320ce2cfe8916c8165418d23e9f91b6a5c8515e1d74ee193a5a1ca01954fbff27361c20184240be2359e0afbed0bf1c762cf872450b5e8b5d4704f4fd9583e4470adc98409dd42965709712806bd9019378a72eea0b4912ce684ffd833db5806ab84174f905db2a75380071d004615c944bb8f8c4045cce7234c2be9a2330522cf7f067b8e58f57cffb6edb4b7ef91313e12bcde47e5e76ceee7fa52990132288f345d33ed917ae4fd54b7284f8964d898e97e1ee3bc4157f75d7fee63976e4be66ac1ec32ef74afa533f0eb593523f226cbec57d196ac8962
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/bad-request'
              examples:
                response:
                  value:
                    type: 'https://docs.api.video/reference/authentication-invalid-user-credentials'
                    title: The user credentials were incorrect.
                    name: ''
                    status: 400
      x-client-action: authenticate
      x-client-hidden: true
      x-doctave:
        code-samples:
          - language: go
            code: |
              //With the api.video API clients, authentication is taken care of with each client created.
              // You get to skip this step!
          - language: node
            code: |
              //With the api.video API clients, authentication is taken care of with each client created.
              // You get to skip this step!
          - language: php
            code: |
              //With the api.video API clients, authentication is taken care of with each client created.
              // You get to skip this step!
          - language: python
            code: |
              #With the api.video API clients, authentication is taken care of with each client created.
              # You get to skip this step!
          - language: java
            code: |
              //With the api.video API clients, authentication is taken care of with each client created.
              // You get to skip this step!
          - language: csharp
            code: |
              //With the api.video API clients, authentication is taken care of with each client created.
              // You get to skip this step!
          - language: swift
            code: |
              // With the api.video API clients, authentication is taken care of with each client created.
              // You get to skip this step!
  /auth/refresh:
    post:
      tags:
        - Advanced authentication
      summary: Refresh Bearer Token
      description: |-
        Accepts the old bearer token and returns a new bearer token that can be used to authenticate other endpoint.

        You can find the tutorial on using the disposable bearer token [here](https://docs.api.video/reference/disposable-bearer-token-authentication).
      operationId: POST_auth-refresh
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/refresh-token-payload'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/access-token'
              examples:
                response:
                  value:
                    token_type: Bearer
                    expires_in: 3600
                    access_token: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6IjUyZWM4NWUyMjFkODZjOWI0NDQ5NzBhMjQwMzUyOWQ4MDQyNGQ3ZmJjYjFlYWM2MjVlM2VkMjI2YWRlNTcxMDY2NDUyZDc0NjdhN2E4NjI0In0.eyJhdWQiOiJsaWJjYXN0IiwianRpIjoiNTJlYzg1ZTIyMWQ4NmM5YjQ0NDk3MGEyNDAzNTI5ZDgwNDI0ZDdmYmNiMWVhYzYyNWUzZWQyMjZhZGU1NzEwNjY0NTJkNzQ2N2E3YTg2MjQiLCJpYXQiOjE1MjUyNzYxNDcsIm5iZiI6MTUyNTI3NjE0NywiZXhwIjoxNTI1Mjc5NzQ3LCJzdWIiOiJ1c01vbml0b3IiLCJzY29wZXMiOlsibW9uaXRvci5saWJjYXN0LmNvbSJdLCJjb250ZXh0Ijp7InVzZXIiOiJ1c01vbml0b3IiLCJwcm9qZWN0IjoicHJNb25pdG9yIiwibWVtYmVyIjoibWVNb25pdG9yIn19.rUvishDNyJLNlI4W5VmguNecm5KD2uZgPkKJQbaqw-cJbSrVxkSbiKYtk_E3cz3WT7-IS2yFTsYN3uIo5Rbit8_HftweyEp2bdBRI8yjR6oZZ1sNJJXswISN1i2kk4r-aaxu7Xxf_LtsjOMUj_YZsvcc2nqBXPKjHbJCJryx3DDJaIcymOqao7nhQaCCQyrQooAXNTYs4E9fWN1dC_x2O-zok5TuG-xhEW-umwxfSUMWNgSTkz38ACceQ0PCJSgB3jqjDH4MwC7B3ppEPZuK5E6JhKeyRlalswRyYq3UQPnVeMTam7YQHsuTgbehF6WySW8i44o7V_MCe9hjPdp-WA
                    refresh_token: def50200a28d88fb9aaa921be78eeb5604b071101a334899a7d5fc7492cf8ea752962ddc8961fe5c126101d4ecacd980396eb2fd494995b812dffcb98256c4277f790d1f658fc2d2e34f350740544e5232d69d68d34c648271d706c5e7049adac0b1832d0fdf71809715cc7e97fa63f65966deadb501a55ff469b0fd23a637cb6acbe9d9b8594a17f09efc2efeed82984764a0065d5e29c950c7b081a61ba2aaa192be3085c400ee37eac50fa9320ce2cfe8916c8165418d23e9f91b6a5c8515e1d74ee193a5a1ca01954fbff27361c20184240be2359e0afbed0bf1c762cf872450b5e8b5d4704f4fd9583e4470adc98409dd42965709712806bd9019378a72eea0b4912ce684ffd833db5806ab84174f905db2a75380071d004615c944bb8f8c4045cce7234c2be9a2330522cf7f067b8e58f57cffb6edb4b7ef91313e12bcde47e5e76ceee7fa52990132288f345d33ed917ae4fd54b7284f8964d898e97e1ee3bc4157f75d7fee63976e4be66ac1ec32ef74afa533f0eb593523f226cbec57d196ac8962
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/bad-request'
              examples:
                response:
                  value:
                    status: 400
                    type: 'https://docs.api.video/reference/authentication-invalid-user-credentials'
                    title: The user credentials were incorrect.
                    name: ''
      x-client-action: refresh
      x-client-hidden: true
      x-doctave:
        code-samples:
          - language: go
            code: |
              //With the api.video API clients, authentication is taken care of with each client created.
              // You get to skip this step!
          - language: node
            code: |
              //With the api.video API clients, authentication is taken care of with each client created.
              // You get to skip this step!
          - language: php
            code: |
              //With the api.video API clients, authentication is taken care of with each client created.
              // You get to skip this step!
          - language: python
            code: |
              #With the api.video API clients, authentication is taken care of with each client created.
              # You get to skip this step!
          - language: java
            code: |
              //With the api.video API clients, authentication is taken care of with each client created.
              // You get to skip this step!
          - language: csharp
            code: |
              //With the api.video API clients, authentication is taken care of with each client created.
              // You get to skip this step!
          - language: swift
            code: |
              // With the api.video API clients, authentication is taken care of with each client created.
              // You get to skip this step!
  /videos:
    get:
      tags:
        - Videos
      summary: List all video objects
      description: List all the video objects that are associated with the current workspace.
      x-client-description:
        default: 'This method returns a list of your videos (with all their details). With no parameters added, the API returns the first page of all videos. You can filter videos using the parameters described below.'
      operationId: LIST-videos
      parameters:
        - name: title
          in: query
          description: The title of a specific video you want to find. The search will match exactly to what term you provide and return any videos that contain the same term as part of their titles.
          required: false
          style: form
          explode: true
          schema:
            type: string
          example: My Video.mp4
        - name: 'tags[]'
          in: query
          description: A tag is a category you create and apply to videos. You can search for videos with particular tags by listing one or more here. Only videos that have all the tags you list will be returned.
          required: false
          style: form
          explode: true
          schema:
            type: array
            items:
              type: string
          example: '["captions", "dialogue"]'
        - name: metadata
          in: query
          description: 'Videos can be tagged with metadata tags in key:value pairs. You can search for videos with specific key value pairs using this parameter.'
          required: false
          style: deepObject
          x-is-deep-object: true
          explode: true
          schema:
            type: object
            additionalProperties:
              type: string
          example: 'metadata[Author]=John Doe&metadata[Format]=Tutorial'
        - name: description
          in: query
          description: 'Retrieve video objects by `description`.'
          required: false
          style: form
          explode: true
          schema:
            type: string
          example: New Zealand
        - name: liveStreamId
          in: query
          description: 'Retrieve video objects that were recorded from a live stream by `liveStreamId`.'
          required: false
          style: form
          explode: true
          schema:
            type: string
          example: li400mYKSgQ6xs7taUeSaEKr
        - name: sortBy
          in: query
          description: 'Use this parameter to sort videos by the their created time, published time, updated time, or by title.'
          required: false
          style: form
          explode: true
          schema:
            type: string
            enum: [title, createdAt, publishedAt, updatedAt]
          example: publishedAt
        - name: sortOrder
          in: query
          description: 'Use this parameter to sort results. `asc` is ascending and sorts from A to Z. `desc` is descending and sorts from Z to A.'
          required: false
          style: form
          explode: true
          schema:
            type: string
            enum: [asc, desc]
          example: asc
        - $ref: '#/components/parameters/current-page'
        - $ref: '#/components/parameters/page-size'
      responses:
        '200':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/videos-list-response'
              examples:
                response:
                  value:
                    data:
                      - videoId: vi4blUQJFrYWbaG44NChkH27
                        playerId: pl45KFKdlddgk654dspkze
                        title: Maths video
                        description: An amazing video explaining the string theory
                        language: 'en'
                        languageOrigin: 'api'
                        public: false
                        panoramic: false
                        mp4Support: true
                        tags:
                          - maths
                          - string theory
                          - video
                        metadata:
                          - key: Author
                            value: John Doe
                          - key: Format
                            value: Tutorial
                        publishedAt: '2019-12-16T08:25:51+00:00'
                        updatedAt: '2019-12-16T08:48:49+00:00'
                        discarded: false
                        discardedAt: null
                        deletesAt: null
                        source:
                          uri: /videos/c188ed58-3403-46a2-b91b-44603d10b2c9/source
                        assets:
                          iframe: '<iframe src="https://embed.api.video/vod/vi4blUQJFrYWbaG44NChkH27" width="100%" height="100%" frameborder="0" scrolling="no" allowfullscreen=""></iframe>'
                          player: 'https://embed.api.video/vod/vi4blUQJFrYWbaG44NChkH27'
                          hls: 'https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/hls/manifest.m3u8'
                          thumbnail: 'https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/thumbnail.jpg'
                          mp4: 'https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/mp4/source.mp4'
                      - videoId: vi4blUQJFrYWbaG44NChkH27
                        title: Video Title
                        description: A description for your video.
                        language: 'en'
                        languageOrigin: 'api'
                        public: false
                        panoramic: false
                        mp4Support: true
                        tags:
                          - books
                          - short stories
                        metadata:
                          - key: Author
                            value: John Doe
                          - key: Science Fiction
                            value: Cyberpunk
                          - key: Technology
                            value: Computers
                        publishedAt: '2019-12-16T08:25:51+00:00'
                        updatedAt: '2019-12-16T08:48:49+00:00'
                        discarded: false
                        discardedAt: null
                        deletesAt: null
                        source:
                          uri: /videos/vi4blUQJFrYWbaG44NChkH27/source
                        assets:
                          iframe: '<iframe src="https://embed.api.video/vod/vi4blUQJFrYWbaG44NChkH27" width="100%" height="100%" frameborder="0" scrolling="no" allowfullscreen=""></iframe>'
                          player: 'https://embed.api.video/vod/vi4blUQJFrYWbaG44NChkH27'
                          hls: 'https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/hls/manifest.m3u8'
                          thumbnail: 'https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/thumbnail.jpg'
                          mp4: 'https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/mp4/source.mp4'
                      - videoId: vi4blUQJFrYWbaG44NChkH27
                        playerId: pl45KFKdlddgk654dspkze
                        title: My Video Title
                        description: A brief description of the video.
                        language: 'fr'
                        languageOrigin: 'api'
                        public: false
                        panoramic: false
                        mp4Support: true
                        tags:
                          - General
                          - Videos
                        metadata:
                          - key: Length
                            value: Short
                        publishedAt: '2019-12-16T08:25:51+00:00'
                        updatedAt: '2019-12-16T08:48:49+00:00'
                        discarded: false
                        discardedAt: null
                        deletesAt: null
                        source:
                          uri: /videos/vi4blUQJFrYWbaG44NChkH27/source
                        assets:
                          iframe: '<iframe src="https://embed.api.video/vod/vi4blUQJFrYWbaG44NChkH27" width="100%" height="100%" frameborder="0" scrolling="no" allowfullscreen=""></iframe>'
                          player: 'https://embed.api.video/vod/vi4blUQJFrYWbaG44NChkH27'
                          hls: 'https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/hls/manifest.m3u8'
                          thumbnail: 'https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/thumbnail.jpg'
                          mp4: 'https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/mp4/source.mp4'
                    pagination:
                      currentPage: 1
                      pageSize: 25
                      pagesTotal: 1
                      itemsTotal: 11
                      currentPageItems: 11
                      links:
                        - rel: self
                          uri: 'https://ws.api.video/videos?currentPage=1'
                        - rel: first
                          uri: 'https://ws.api.video/videos?currentPage=1'
                        - rel: last
                          uri: 'https://ws.api.video/videos?currentPage=1'
        '400':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/bad-request'
              examples:
                response:
                  value:
                    title: This parameter is out of the allowed range of values.
                    name: page
                    status: 400
                    range:
                      min: 1
                    problems:
                      - title: This parameter is out of the allowed range of values.
                        name: page
                        range:
                          min: 1
                      - title: This parameter is out of the allowed range of values.
                        name: pageSize
                        range:
                          min: 10
                          max: 100
        '429':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/too-many-requests'
              examples:
                Too many requests:
                  value:
                    type: 'https://docs.api.video/reference/too-many-requests'
                    title: Too many requests.
                    status: 429
      security:
        - apiKey: []
      x-doctave:
        code-samples:
          - language: php
            code: |
              <?php
              // First install the api client: "composer require api-video/php-api-client"
              // Documentation: https://github.com/apivideo/api.video-php-client/blob/main/docs/Api/VideosApi.md#list

              require __DIR__ . '/vendor/autoload.php';


              $client = new \ApiVideo\Client\Client(
                  'https://ws.api.video',
                  'YOUR_API_KEY',
                  new \Symfony\Component\HttpClient\Psr18Client()
              );

              // list all videos (all pages)
              $allVideos = [];
              do {
                  $currentPage = $client->videos()->list([]);
                  $allVideos = array_merge($allVideos, $currentPage->getData());
              } while($currentPage->getPagination()->getCurrentPage() < $currentPage->getPagination()->getPagesTotal());

              // list videos that have all the given tags (only first results page)
              $videosWithTag = $client->videos()->list(['tags' => ['TAG2','TAG1']]);

              // list videos that have all the given metadata values (only first results page)
              $videosWithMetadata = $client->videos()->list(['metadata' => ['key1' => 'key1value1', 'key2' => 'key2value1']]);
          - language: java
            code: |-
              // First add the "video.api:java-api-client" maven dependency to your project
              // Documentation: https://github.com/apivideo/api.video-java-client/blob/main/docs/VideosApi.md#list

              ApiVideoClient client = new ApiVideoClient("YOUR_API_KEY");
              VideosApi videosApi = client.videos();

              // list all videos (all pages)
              Page<Video> videosPages = videosApi.list().execute();
              videosPages.forEach(videosPage -> videosPage.getItems().forEach(video ->
                  System.out.println(video.getVideoId())
              ));

              // list videos that have all the given tags (only first results page)
              List<Video> videosWithTags = videosApi.list()
                  .tags(Arrays.asList("tag1", "tag2"))
                  .execute()
                  .getItems();

              // list videos that have all the given metadata values (only first results page)
              List<Video> videosWithMetadata = videosApi.list()
                  .metadata(Map.of("key1", "value1", "key2", "value2"))
                  .execute()
                  .getItems();
          - language: node
            code: |-
              // First install the "@api.video/nodejs-client" npm package
              // Documentation: https://github.com/apivideo/api.video-nodejs-client/blob/main/doc/api/VideosApi.md#list

              const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" });

              // list all videos (all pages)
              let allVideos = [];
              for(let currentPage=1 ; ; currentPage++) {
                const res = await client.videos.list({ currentPage });
                allVideos = [...allVideos, ...res.data];
                if(currentPage >= res.pagination.pagesTotal) {
                  break;
                }
              }

              // list videos that have all the given tags (only first results page)
              const videosWithTags = await client.videos.list({ tags: ["tag1", "tag2"] });

              // list videos that have all the given metadata values (only first results page)
              const videosWithMetadata = await client.videos.list({ metadata: { "key1": "value1", "key2": "value2" } })
          - language: csharp
            code: |
              // First add the "ApiVideo" NuGet package to your project
              // Documentation: https://github.com/apivideo/api.video-csharp-client/blob/main/docs/VideosApi.md#list
          - language: go
            code: |
              // First install the go client with "go get github.com/apivideo/api.video-go-client"
              // Documentation: https://github.com/apivideo/api.video-go-client/blob/main/docs/VideosApi.md#list
          - language: python
            code: |
              # First install the api client with "pip install api.video"
              # Documentation: https://github.com/apivideo/api.video-python-client/blob/main/docs/VideosApi.md#list
          - language: swift
            code: |
              // First install the api client: https://github.com/apivideo/api.video-swift-client#getting-started
              // Documentation: https://github.com/apivideo/api.video-swift-client/blob/main/docs/VideosAPI.md#list
      x-client-action: list
      x-group-parameters: true
      x-client-paginated: true
      x-optional-object: true
    post:
      tags:
        - Videos
      summary: Create a video object
      description: |
        Creates a video object. More information on video objects can be found [here](https://docs.api.video/reference/api/Videos).
      operationId: POST-video
      requestBody:
        description: video to create
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/video-creation-payload'
      responses:
        '201':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/video'
              examples:
                response:
                  value:
                    videoId: vi4blUQJFrYWbaG44NChkH27
                    title: Maths video
                    description: An amazing video explaining the string theory
                    language: 'en'
                    languageOrigin: 'api'
                    public: false
                    panoramic: false
                    mp4Support: true
                    playerId: pl4k0jvEUuaTdRAEjQ4Jfrgz
                    tags:
                      - maths
                      - string theory
                      - video
                    metadata:
                      - key: Author
                        value: John Doe
                      - key: Format
                        value: Tutorial
                    publishedAt: '2024-07-14T23:36:07+00:00'
                    discarded: false
                    discardedAt: null
                    deletesAt: null
                    source:
                      uri: /videos/vi4blUQJFrYWbaG44NChkH27/source
                    assets:
                      iframe: '<iframe src="https://embed.api.video/vod/vi4blUQJFrYWbaG44NChkH27" width="100%" height="100%" frameborder="0" scrolling="no" allowfullscreen=""></iframe>'
                      player: 'https://embed.api.video/vod/vi4blUQJFrYWbaG44NChkH27'
                      hls: 'https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/hls/manifest.m3u8'
                      thumbnail: 'https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/thumbnail.jpg'
                      mp4: 'https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/mp4/source.mp4'
        '202':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Accepted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/video'
        '400':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/bad-request'
              examples:
                Arttribute required:
                  value:
                    type: 'https://docs.api.video/reference/attribute-required'
                    title: This attribute is required.
                    name: title
                    status: 400
                    problems:
                      - type: 'https://docs.api.video/reference/attribute-required'
                        title: This attribute is required.
                        name: title
                      - type: 'https://docs.api.video/reference/invalid-attribute'
                        title: This attribute must be a ISO-8601 date.
                        name: scheduledAt
                      - type: 'https://docs.api.video/reference/invalid-attribute'
                        title: This attribute must be an array.
                        name: tags
                      - type: 'https://docs.api.video/reference/invalid-attribute'
                        title: This attribute must be an array.
                        name: metadata
                Invalid language formatting:
                  description: This error occurs when the language tag you provided contains characters other than letters and dashes.
                  value:
                    type: https://docs.api.video/reference/invalid-attribute
                    title: An attribute is invalid.
                    status: 400
                    detail: The "language" attribute must contain only letters and dashes (for example "fr", "fr-BE").
                    name: language
                Invalid language:
                  description: This error occurs when the language tag you provided does not match any supported language.
                  value:
                    type: https://docs.api.video/reference/invalid-attribute
                    title: An attribute is invalid.
                    status: 400
                    detail: The "language" attribute is not valid.
                    name: language
        '429':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/too-many-requests'
              examples:
                Too many requests:
                  value:
                    type: 'https://docs.api.video/reference/too-many-requests'
                    title: Too many requests.
                    status: 429
      security:
        - apiKey: []
      x-client-action: create
      x-doctave:
        code-samples:
          - language: go
            code: |
              // First install the go client with "go get github.com/apivideo/api.video-go-client"
              // Documentation: https://github.com/apivideo/api.video-go-client/blob/main/docs/VideosApi.md#create

              package main

              import (
                  "context"
                  "fmt"
                  "os"
                  apivideosdk "github.com/apivideo/api.video-go-client"
              )

              func main() {
                  client := apivideosdk.ClientBuilder("YOUR_API_KEY").Build()
                  // if you rather like to use the sandbox environment:
                  // client := apivideosdk.SandboxClientBuilder("YOUR_SANDBOX_API_KEY").Build()
                      
                  videoCreationPayload := *apivideosdk.NewVideoCreationPayload("Maths video") // VideoCreationPayload | video to create

                  
                  res, err := client.Videos.Create(videoCreationPayload)

                  if err != nil {
                      fmt.Fprintf(os.Stderr, "Error when calling `Videos.Create``: %v\
              ", err)
                  }
                  // response from `Create`: Video
                  fmt.Fprintf(os.Stdout, "Response from `Videos.Create`: %v\
              ", res)
              }
          - language: node
            code: |
              // First install the "@api.video/nodejs-client" npm package
              // Documentation: https://github.com/apivideo/api.video-nodejs-client/blob/main/doc/api/VideosApi.md#create

              const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" });

              // create a simple video
              const video = await client.videos.create({ title: "Maths video" });

              // create a video using an existing source
              const existingSourceVideo = await client.videos.create({
                title: "Video using an existing source", 
                source: "https://www.myvideo.url.com/video.mp4", 
              });

              // create a private video
              const privateVideo = await client.videos.create({
                title: "Video using an existing source", 
                _public: false,
              });

              // create a video using all available attributes
              const video = await client.videos.create({
                title: "Maths video", // The title of your new video.
                description: "A video about string theory.", // A brief description of your video.
                source: "https://www.myvideo.url.com/video.mp4", // If you add a video already on the web, this is where you enter the url for the video.
                _public: true, // Whether your video can be viewed by everyone, or requires authentication to see it. A setting of false will require a unique token for each view.
                panoramic: false, // Indicates if your video is a 360/immersive video.
                mp4Support: true, // Enables mp4 version in addition to streamed version.
                playerId: "pl45KFKdlddgk654dspkze", // The unique identification number for your video player.
                tags: ["maths", "string theory", "video"], // A list of tags you want to use to describe your video.
                metadata: [{"key": "Author", "value": "John Doe"}], // A list of key value pairs that you use to provide metadata for your video. These pairs can be made dynamic, allowing you to segment your audience. You can also just use the pairs as another way to tag and categorize your videos.
              });
          - language: php
            code: |
              <?php
              // First install the api client: "composer require api-video/php-api-client"
              // Documentation: https://github.com/apivideo/api.video-php-client/blob/main/docs/Api/VideosApi.md#create

              require __DIR__ . '/vendor/autoload.php';

              $client = new \ApiVideo\Client\Client(
                  'https://ws.api.video',
                  'YOUR_API_KEY',
                  new \Symfony\Component\HttpClient\Psr18Client()
              );

              // create a simple video
              $video = $client->videos()->create((new \ApiVideo\Client\Model\VideoCreationPayload())->setTitle("Maths video"));

              // create a video using an existing source
              $existingSourceVideo = $client->videos()->create((new \ApiVideo\Client\Model\VideoCreationPayload())
                  ->setTitle("Maths video")
                  ->setSource("https://www.myvideo.url.com/video.mp4"));

              // create a private video
              $privateVideo = $client->videos()->create((new \ApiVideo\Client\Model\VideoCreationPayload())
                  ->setTitle("Maths video")
                  ->setPublic(false));

              // create a video using all available attributes
              $anotherVideo = $client->videos()->create((new \ApiVideo\Client\Model\VideoCreationPayload())
                  ->setTitle("Maths video") // The title of your new video.
                  ->setDescription("A video about string theory.") // A brief description of your video.
                  ->setSource("https://www.myvideo.url.com/video.mp4") // If you add a video already on the web, this is where you enter the url for the video.
                  ->setPublic(true) // Whether your video can be viewed by everyone, or requires authentication to see it. A setting of false will require a unique token for each view.
                  ->setPanoramic(false) // Indicates if your video is a 360/immersive video.
                  ->setMp4Support(true) // Enables mp4 version in addition to streamed version.
                  ->setPlayerId("pl45KFKdlddgk654dspkze") // The unique identification number for your video player.
                  ->setTags(array("TAG1", "TAG2")) // A list of tags you want to use to describe your video.
                  ->setMetadata(array( // A list of key value pairs that you use to provide metadata for your video. These pairs can be made dynamic, allowing you to segment your audience. You can also just use the pairs as another way to tag and categorize your videos.
                      new \ApiVideo\Client\Model\Metadata(['key' => 'key1', 'value' => 'key1value1']),
                      new \ApiVideo\Client\Model\Metadata(['key' => 'key2', 'value' => 'key2value1']))));
          - language: python
            code: |
              # First install the api client with "pip install api.video"
              # Documentation: https://github.com/apivideo/api.video-python-client/blob/main/docs/VideosApi.md#create

              import apivideo
              from apivideo.api import videos_api
              from apivideo.model.video_creation_payload import VideoCreationPayload
              from apivideo.model.bad_request import BadRequest
              from apivideo.model.video import Video
              from pprint import pprint

              # Enter a context with an instance of the API client
              with apivideo.AuthenticatedApiClient(__API_KEY__) as api_client:
                  # Create an instance of the API class
                  api_instance = videos_api.VideosApi(api_client)
                  video_creation_payload = VideoCreationPayload(
                      title="Maths video",
                      description="A video about string theory.",
                      source="https://www.myvideo.url.com/video.mp4",
                      public=True,
                      panoramic=False,
                      mp4_support=True,
                      player_id="pl45KFKdlddgk654dspkze",
                      tags=["maths", "string theory", "video"],
                      metadata=[
                          Metadata(
                              key="Color",
                              value="Green",
                          ),
                      ],
                  ) # VideoCreationPayload | video to create

                  # example passing only required values which don't have defaults set
                  try:
                      # Create a video
                      api_response = api_instance.create(video_creation_payload)
                      pprint(api_response)
                  except apivideo.ApiException as e:
                      print("Exception when calling VideosApi->create: %s\n" % e)
          - language: java
            code: |
              // First add the "video.api:java-api-client" maven dependency to your project
              // Documentation: https://github.com/apivideo/api.video-java-client/blob/main/docs/VideosApi.md#create

              import video.api.client.ApiVideoClient;
              import video.api.client.api.ApiException;
              import video.api.client.api.models.*;
              import video.api.client.api.clients.VideosApi;
              import java.util.*;

              public class Example {
                public static void main(String[] args) {
                  ApiVideoClient client = new ApiVideoClient("YOUR_API_KEY");
                  // if you rather like to use the sandbox environment:
                  // ApiVideoClient client = new ApiVideoClient("YOUR_SANDBOX_API_KEY", ApiVideoClient.Environment.SANDBOX);

                  VideosApi apiInstance = client.videos();
                  
                  VideoCreationPayload videoCreationPayload = new VideoCreationPayload(); // video to create
                  videoCreationPayload.setTitle("Maths video"); // The title of your new video.
                  videoCreationPayload.setDescription("A video about string theory."); // A brief description of your video.
                  videoCreationPayload.setSource("https://www.myvideo.url.com/video.mp4"); // If you add a video already on the web, this is where you enter the url for the video.
                  videoCreationPayload.setPublic(true); // Whether your video can be viewed by everyone, or requires authentication to see it. A setting of false will require a unique token for each view.
                  videoCreationPayload.setPanoramic(false); // Indicates if your video is a 360/immersive video.
                  videoCreationPayload.setMp4Support(true); // Enables mp4 version in addition to streamed version.
                  videoCreationPayload.setPlayerId("pl45KFKdlddgk654dspkze"); // The unique identification number for your video player.
                  videoCreationPayload.setTags(Arrays.asList("maths", "string theory", "video")); // A list of tags you want to use to describe your video.
                  videoCreationPayload.setMetadata(Collections.<Metadata>emptyList()); // A list of key value pairs that you use to provide metadata for your video. These pairs can be made dynamic, allowing you to segment your audience. You can also just use the pairs as another way to tag and categorize your videos.


                  try {
                    Video result = apiInstance.create(videoCreationPayload);
                    System.out.println(result);
                  } catch (ApiException e) {
                    System.err.println("Exception when calling VideosApi#create");
                    System.err.println("Status code: " + e.getCode());
                    System.err.println("Reason: " + e.getMessage());
                    System.err.println("Response headers: " + e.getResponseHeaders());
                    e.printStackTrace();
                  }
                }
              }
          - language: csharp
            code: |
              // First add the "ApiVideo" NuGet package to your project
              // Documentation: https://github.com/apivideo/api.video-csharp-client/blob/main/docs/VideosApi.md#create

              using System.Diagnostics;
              using ApiVideo.Client;

              namespace Example
              {
                  public class createExample
                  {
                      public static void Main()
                      {
                          var basePath = ApiVideoClient.Client.Environment.SANDBOX;
                          var apiKey = "YOUR_API_KEY";

                          var apiInstance = new ApiVideoClient(apiKey,basePath);

                          var videoCreationPayload = new VideoCreationPayload(); // VideoCreationPayload | video to create
                          var apiVideosInstance = apiInstance.Videos();
                          try
                          {
                              // Create a video
                              Video result = apiVideosInstance.create(videoCreationPayload);
                              Debug.WriteLine(result);
                          }
                          catch (ApiException  e)
                          {
                              Debug.Print("Exception when calling VideosApi.create: " + e.Message );
                              Debug.Print("Status Code: "+ e.ErrorCode);
                              Debug.Print(e.StackTrace);
                          }
                      }
                  }
              }
          - language: swift
            code: |
              // First install the api client: https://github.com/apivideo/api.video-swift-client#getting-started
              // Documentation: https://github.com/apivideo/api.video-swift-client/blob/main/docs/VideosAPI.md#create
  /tags:
    get:
      tags:
        - Tags
      summary: List all video tags
      description: This endpoint enables you to search for video tags in a project and see how many videos are tagged with them. If you do not define any query parameters, the endpoint lists all video tags and the numbers of times they are used in a project.
      operationId: LIST-tags
      x-client-action: list
      x-group-parameters: true
      x-client-paginated: true
      parameters:
        - name: value
          in: query
          description: |
            Use this parameter to search for specific video tags. The API filters results even on partial values, and ignores accents, uppercase, and lowercase.
          required: false
          style: form
          explode: true
          schema:
            type: string
        - name: sortBy
          in: query
          description: |
            Use this parameter to choose which field the API will use to sort the response data. The default is `value`.
            
            These are the available fields to sort by:
            
            - `value`: Sorts the results based on tag values in alphabetic order.
            - `videoCount`: Sorts the results based on the number of times a video tag is used.
          required: false
          style: form
          explode: true
          schema:
            type: string
            enum: [value, videoCount]
          example: value
        - name: sortOrder
          in: query
          description: Use this parameter to sort results. `asc` is ascending and sorts from A to Z. `desc` is descending and sorts from Z to A.
          required: false
          style: form
          explode: true
          schema:
            type: string
            enum: [asc, desc]
          example: asc
        - $ref: '#/components/parameters/current-page'
        - $ref: '#/components/parameters/page-size'
      responses:
        '200':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/list-tags-response'
              examples:
                response:
                  value:
                    data:
                      - value: maths
                        videoCount: '33'
                      - value: tutorials
                        videoCount: '10'
                    pagination:
                      currentPage: 1
                      pageSize: 25
                      pagesTotal: 1
                      itemsTotal: 2
                      currentPageItems: 2
                      links:
                        - rel: self
                          uri: '/tags?currentPage=1&pageSize=25'
                        - rel: first
                          uri: '/tags?currentPage=1&pageSize=25'
                        - rel: last
                          uri: '/tags?currentPage=1&pageSize=25'
        '429':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/too-many-requests'
              examples:
                Too many requests:
                  value:
                    type: 'https://docs.api.video/reference/too-many-requests'
                    title: Too many requests.
                    status: 429
  /summaries:
    post:
      tags:
        - Summaries
      summary: Generate video summary
      description: Generate an abstract and key takeaways for a video.
      x-client-action: create
      x-client-description:
        default: 'Generate an abstract and key takeaways for a video.'
      operationId: POST_summaries
      security:
        - apiKey: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/summary-creation-payload'
      responses:
        '201':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/summary'
              examples:
                Summary created:
                  value:
                    summaryId: 'summary_1CGHWuXjhxmeH4WiZ51234'
                    createdAt: '2024-07-14T23:36:07+00:00'
                    updatedAt: '2024-07-14T23:36:07+00:00'
                    videoId: 'vilkR8K3N7yrRcxcMt91234'
                    origin: auto
                    sourceStatus: completed
        '409':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/conflict-error'
              examples:
                Summary already exists:
                  value:
                    type: https://docs.api.video/reference/summary-already-exists
                    title: A summary already exists or is being created on this video.
                    status: 409
                    detail: You can delete the existing summary and generate a new one.
                    name: videoId
    get:
      tags:
      - Summaries
      summary: List summaries
      description: List all summarries for your videos in a project.
      x-client-action: list
      x-client-description:
        default: 'List all summarries for your videos in a project.'
      operationId: GET_summaries
      parameters:
        - name: videoId
          in: query
          required: false
          description: Use this parameter to filter for a summary that belongs to a specific video.
          schema:
            type: string
          example: vilkR8K3N7yrRcxcMt91234
        - name: origin
          in: query
          required: false
          description: 'Use this parameter to filter for summaries based on the way they were created: automatically or manually via the API.'
          schema:
            type: string
            enum: [auto, api]
          example: auto
        - name: sourceStatus
          in: query
          required: false
          description: |
            Use this parameter to filter for summaries based on the current status of the summary source.
            
            These are the available statuses:
            
            `missing`: the input for a summary is not present.
            `waiting` : the input video is being processed and a summary will be generated.
            `failed`: a technical issue prevented summary generation.
            `completed`: the summary is generated.
            `unprocessable`: the API rules the source video to be unsuitable for summary generation. An example for this is an input video that has no audio.
          schema:
            type: string
            enum: [missing, waiting, failed, completed, unprocessable]
          example: auto
        - name: sortBy
          in: query
          description: |
            Use this parameter to choose which field the API will use to sort the response data. The default is `value`.
            
            These are the available fields to sort by:
            
            - `createdAt`: Sorts the results based on date and timestamps when summaries were created.
            - `updatedAt`: Sorts the results based on date and timestamps when summaries were last updated.
            - `videoId`: Sorts the results based on video IDs.
          required: false
          style: form
          explode: true
          schema:
            type: string
            enum: [createdAt, updatedAt, videoId]
          example: createdAt
        - name: sortOrder
          in: query
          description: 'Use this parameter to sort results. `asc` is ascending and sorts from A to Z. `desc` is descending and sorts from Z to A.'
          required: false
          style: form
          explode: true
          schema:
            type: string
            enum: [asc, desc]
          example: asc
        - $ref: '#/components/parameters/current-page'
        - $ref: '#/components/parameters/page-size'
      x-group-parameters: true
      x-client-paginated: true
      responses:
        '200':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/summaries-list-response'
              examples:
                List all summaries:
                  value:
                    data:
                    - summaryId: 'summary_1CGHWuXjhxmeH4WiZ51234'
                      createdAt: '2024-07-14T23:36:07+00:00'
                      updatedAt: '2024-07-14T23:36:07+00:00'
                      videoId: 'vilkR8K3N7yrRcxcMt91234'
                      origin: auto
                      sourceStatus: completed
                    - summaryId: 'summary_123HWuXjhxmeH4WiZ55678'
                      createdAt: '2024-07-15T23:36:07+00:00'
                      updatedAt: '2024-07-15T23:36:07+00:00'
                      videoId: 'vibaBXK3N7yrRcxcMt95678'
                      origin: auto
                      sourceStatus: waiting     
                    pagination:
                      currentPage: 1
                      pageSize: 25
                      pagesTotal: 1
                      itemsTotal: 11
                      currentPageItems: 11
                      links:
                        - rel: self
                          uri: 'https://ws.api.video/summaries?currentPage=1'
                        - rel: first
                          uri: 'https://ws.api.video/summaries?currentPage=1'
                        - rel: last
                          uri: 'https://ws.api.video/summaries?currentPage=1'
  /summaries/{summaryId}:
    delete:
      tags:
        - Summaries
      summary: Delete video summary
      description: Delete a summary tied to a video.
      x-client-action: delete
      x-client-description:
        default: 'Delete a summary tied to a video.'
      operationId: DELETE_summaries-summaryId
      security:
        - apiKey: []
      parameters:
        - name: summaryId
          in: path
          description: The unique identifier of the summary you want to delete.
          required: true
          style: simple
          explode: false
          schema:
            type: string
          example: 'summary_1CGHWuXjhxmeH4WiZ51234'
      responses:
        '204':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: No Content      
  /summaries/{summaryId}/source:
    get:
      tags:
        - Summaries
      summary: Get summary details
      description: Get all details for a summary
      x-client-action: getSummarySource
      x-client-description:
        default: 'Get all details for a summary.'
      operationId: GET_summaries-summaryId-source
      security:
        - apiKey: []
      parameters:
        - name: summaryId
          in: path
          description: The unique identifier of the summary source you want to retrieve.
          required: true
          style: simple
          explode: false
          schema:
            type: string
          example: 'summary_1CGHWuXjhxmeH4WiZ51234'
      responses:
        '200':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/summary-source'
        '404':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/not-found'
              examples:
                response:
                  value:
                    type: 'https://docs.api.video/reference/resource-not-found'
                    title: The requested resource was not found.
                    name: summaryId
                    status: 404
    patch:
      tags:
        - Summaries
      summary: Update summary details
      description: Update details for a summary.
      x-client-action: update
      x-client-description:
        default: 'Update details for a summary.'
      operationId: PATCH_summaries-summaryId-source
      parameters:
        - name: summaryId
          in: path
          description: The unique identifier of the summary source you want to update.
          required: true
          style: simple
          explode: false
          schema:
            type: string
          example: 'summary_1CGHWuXjhxmeH4WiZ51234'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/summary-update-payload'
      responses:
        '201':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/summary-source'        
        '409':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/conflict-error'
              examples:
                Summary generation still in progress:
                  value:
                    type: https://docs.api.video/reference/summary-already-exists
                    title: A summary already exists or is being created on this video.
                    status: 409
                    detail: You can delete the existing summary and generate a new one.
  '/videos/{videoId}/source':
    post:
      tags:
        - Videos
      summary: Upload a video
      description: Ingest a video from a source or file.
      x-client-description:
        default: |
          To upload a video to the videoId you created. You can only upload your video to the videoId once.

          We offer 2 types of upload: 
          * Regular upload 
          * Progressive upload
          The latter allows you to split a video source into X chunks and send those chunks independently (concurrently or sequentially). The 2 main goals for our users are to
            * allow the upload of video sources > 200 MiB (200 MiB = the max. allowed file size for regular upload)
            * allow to send a video source "progressively", i.e., before before knowing the total size of the video.
            Once all chunks have been sent, they are reaggregated to one source file. The video source is considered as "completely sent" when the "last" chunk is sent (i.e., the chunk that "completes" the upload).
      operationId: POST_videos-videoId-source
      parameters:
        - name: videoId
          in: path
          description: Enter the videoId you want to use to upload your video.
          required: true
          style: simple
          explode: false
          schema:
            type: string
          example: vi4k0jvEUuaTdRAEjQ4Jfrgz
        - name: Content-Range
          in: header
          required: false
          style: simple
          explode: false
          schema:
            pattern: '/(?:bytes (?<from>\d+)-(?<to>\d+)|part (?<part>\d+))\/(?<total>\d+|\*)/'
            type: string
          example: bytes 209715200-419430399/524288000 OR part 2/3
          x-client-ignore: true
          description: '`part <part>/<total_parts>` ; `bytes <from_byte>-<to_byte>/<total_bytes>`'
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/video-upload-payload'
      responses:
        '201':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Created
          content:
            application/json:
              schema:
                type: object
                $ref: '#/components/schemas/video'
              examples:
                response:
                  value:
                    videoId: vi4blUQJFrYWbaG44NChkH27
                    title: Maths video
                    description: An amazing video explaining the string theory.
                    public: false
                    panoramic: false
                    mp4Support: true
                    playerId: pl45KFKdlddgk654dspkze
                    tags:
                      - maths
                      - string theory
                      - video
                    metadata:
                      - key: Author
                        value: John Doe
                      - key: Format
                        value: Tutorial
                    publishedAt: '2024-07-14T23:36:07+00:00'
                    discarded: false
                    discardedAt: null
                    deletesAt: null
                    source:
                      uri: /videos/vi4blUQJFrYWbaG44NChkH27/source
                    assets:
                      iframe: '<iframe src="https://embed.api.video/vod/vi4blUQJFrYWbaG44NChkH27" width="100%" height="100%" frameborder="0" scrolling="no" allowfullscreen=""></iframe>'
                      player: 'https://embed.api.video/vod/vi4blUQJFrYWbaG44NChkH27'
                      hls: 'https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/hls/manifest.m3u8'
                      thumbnail: 'https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/thumbnail.jpg'
                      mp4: 'https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/mp4/source.mp4'
        '400':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/bad-request'
              examples:
                response:
                  value:
                    type: 'https://docs.api.video/reference/video-source-already-uploaded'
                    title: The source of the video is already uploaded.
                    name: file
                    status: 400
                    problems:
                      - type: 'https://docs.api.video/reference/video-source-already-uploaded'
                        title: The source of the video is already uploaded.
                        name: file
                      - type: 'https://docs.api.video/reference/video-source-already-uploaded'
                        title: The video xxxx has already been uploaded.
                        name: video
                      - type: 'https://docs.api.video/reference/uploaded-file-no-file'
                        title: There is no uploaded file in the request.
                        name: file
                      - type: 'https://docs.api.video/reference/uploaded-file-multiple-files'
                        title: There is more than one uploaded file in the request.
                        name: file
        '404':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/not-found'
              examples:
                response:
                  value:
                    type: 'https://docs.api.video/reference/resource-not-found'
                    title: The requested resource was not found.
                    name: videoId
                    status: 404
        '429':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/too-many-requests'
              examples:
                Too many requests:
                  value:
                    type: 'https://docs.api.video/reference/too-many-requests'
                    title: Too many requests.
                    status: 429
      security:
        - apiKey: []
      x-client-action: upload
      x-client-chunk-upload: true
      x-doctave:
        explorer-enabled: false
        code-samples:
          - language: go
            code: |
              // First install the go client with "go get github.com/apivideo/api.video-go-client"
              // Documentation: https://github.com/apivideo/api.video-go-client/blob/main/docs/VideosApi.md#upload

              package main

              import (
                  "context"
                  "fmt"
                  "os"
                  apivideosdk "github.com/apivideo/api.video-go-client"
              )

              func main() {
                  client := apivideosdk.ClientBuilder("YOUR_API_KEY").Build()
                  // if you rather like to use the sandbox environment:
                  // client := apivideosdk.SandboxClientBuilder("YOUR_SANDBOX_API_KEY").Build()

                    videoId := "vi4k0jvEUuaTdRAEjQ4Jfrgz" 
                  // string | Enter the videoId you want to use to upload your video.
                    file := os.NewFile(1234, "some_file") 
                  // *os.File | The path to the video you would like to upload. The path must be local. If you want to use a video from an online source, you must use the "/videos" endpoint and add the "source" parameter when you create a new video.
                  
                  
                    res, err := client.Videos.UploadFile(videoId, file)
                  
                    // you can also use a Reader instead of a File:
                    // client.Videos.Upload(videoId, fileName, fileReader, fileSize)
                  
                    if err != nil {
                        fmt.Fprintf(os.Stderr, "Error when calling `Videos.Upload``: %v\
              ", err)
                    }
                    // response from `Upload`: Video
                    fmt.Fprintf(os.Stdout, "Response from `Videos.Upload`: %v\
              ", res)
                  }
                    }
          - language: node
            code: |-
              // First install the "@api.video/nodejs-client" npm package
              // Documentation: https://github.com/apivideo/api.video-nodejs-client/blob/main/doc/api/VideosApi.md#upload

              const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" });

              const videoId = 'vi4k0jvEUuaTdRAEjQ4Jfrgz'; // Enter the videoId you want to use to upload your video.
              const file = './my-video.mp4'; // The path to the video you would like to upload. The path must be local. If you want to use a video from an online source, you must use the "/videos" endpoint and add the "source" parameter when you create a new video.
                    
              const video = await client.videos.upload(videoId, file);

              // if needed you can define an upload progress listener:
              const video2 = await client.videos.upload(videoId, file, (event) => {
                console.log("uploadedBytes: " + event.uploadedBytes);
                console.log("totalBytes: " + event.totalBytes);
                console.log("chunksCount: " + event.chunksCount);
                console.log("currentChunk: " + event.currentChunk);
                console.log("currentChunkTotalBytes: " + event.currentChunkTotalBytes);
                console.log("currentChunkUploadedBytes: " + event.currentChunkUploadedBytes);
              });
          - language: php
            code: |-
              <?php
              // First install the api client: "composer require api-video/php-api-client"
              // Documentation: https://github.com/apivideo/api.video-php-client/blob/main/docs/Api/VideosApi.md#upload

              require __DIR__ . '/vendor/autoload.php';

              $client = new \ApiVideo\Client\Client(
                  'https://ws.api.video',
                  'YOUR_API_KEY',
                  new \Symfony\Component\HttpClient\Psr18Client()
              );

              // create a new video & upload a video file
              $myVideo = $client->videos()->create((new \ApiVideo\Client\Model\VideoCreationPayload())->setTitle('Uploaded video'));
              $client->videos()->upload($myVideo->getVideoId(), new SplFileObject(__DIR__ . '/558k.mp4'));

              // create a new video & upload a video file using progressive upload (the file is uploaded by parts)
              $myVideo2 = $client->videos()->create((new \ApiVideo\Client\Model\VideoCreationPayload())->setTitle('Uploaded video (progressive upload)'));

              $progressiveSession = $client->videos()->createUploadProgressiveSession($myVideo2->getVideoId());

              $progressiveSession->uploadPart(new SplFileObject(__DIR__ . '/10m.mp4.part.a'));
              $progressiveSession->uploadPart(new SplFileObject(__DIR__ . '/10m.mp4.part.b'));

              $progressiveSession->uploadLastPart(new SplFileObject(__DIR__ . '/10m.mp4.part.c')); 
          - language: python
            code: |
              # First install the api client with "pip install api.video"
              # Documentation: https://github.com/apivideo/api.video-python-client/blob/main/docs/VideosApi.md#upload

              import apivideo
              from apivideo.api import videos_api
              from apivideo.model.bad_request import BadRequest
              from apivideo.model.not_found import NotFound
              from apivideo.model.video import Video
              from apivideo.configuration import Configuration
              from pprint import pprint

              # Enter a context with an instance of the API client
              # When uploading a file you can change the chunk size (in octet)
              configuration = Configuration(chunk_size=10 * 1024 * 1024)
              with apivideo.AuthenticatedApiClient(__API_KEY__, configuration=configuration) as api_client:
                  # Create an instance of the API class
                  api_instance = videos_api.VideosApi(api_client)
                  video_id = "vi4k0jvEUuaTdRAEjQ4Jfrgz" # str | Enter the videoId you want to use to upload your video.
                  file = open('/path/to/file', 'rb') # file_type | The path to the video you would like to upload. The path must be local. If you want to use a video from an online source, you must use the "/videos" endpoint and add the "source" parameter when you create a new video.

                  # example passing only required values which don't have defaults set
                  try:
                      # Upload a video
                      api_response = api_instance.upload(video_id, file)
                      pprint(api_response)
                  except apivideo.ApiException as e:
                      print("Exception when calling VideosApi->upload: %s\n" % e)
          - language: java
            code: |
              // First add the "video.api:java-api-client" maven dependency to your project
              // Documentation: https://github.com/apivideo/api.video-java-client/blob/main/docs/VideosApi.md#upload

              import video.api.client.ApiVideoClient;
              import video.api.client.api.ApiException;
              import video.api.client.api.models.*;
              import video.api.client.api.clients.VideosApi;
              import java.util.*;

              public class Example {
                public static void main(String[] args) {
                  ApiVideoClient client = new ApiVideoClient("YOUR_API_KEY");
                  // if you rather like to use the sandbox environment:
                  // ApiVideoClient client = new ApiVideoClient("YOUR_SANDBOX_API_KEY", ApiVideoClient.Environment.SANDBOX);

                  VideosApi apiInstance = client.videos();

                  String videoId = "vi4k0jvEUuaTdRAEjQ4Jfrgz"; // Enter the videoId you want to use to upload your video.
                  File file = new File("/path/to/file"); // The path to the video you would like to upload. The path must be local. If you want to use a video from an online source, you must use the "/videos" endpoint and add the "source" parameter when you create a new video.

                  try {
                    Video result = apiInstance.upload(videoId, file);
                    System.out.println(result);
                  } catch (ApiException e) {
                    System.err.println("Exception when calling VideosApi#upload");
                    System.err.println("Status code: " + e.getCode());
                    System.err.println("Reason: " + e.getMessage());
                    System.err.println("Response headers: " + e.getResponseHeaders());
                    e.printStackTrace();
                  }
                }
              }
          - language: android
            code: |
              // First add the "video.api:android-api-client" maven dependency to your project
              // Documentation: https://github.com/apivideo/api.video-android-client/blob/main/docs/VideosApi.md#upload

              VideosApiStore.initialize("YOUR_API_KEY")
              // if you rather like to use the sandbox environment:
              // VideosApiStore.initialize("YOUR_SANDBOX_API_KEY", Environment.SANDBOX)

              val workManager = WorkManager.getInstance(context) // WorkManager comes from package "androidx.work:work-runtime"

              val videoId = "vi4k0jvEUuaTdRAEjQ4Jfrgz" // The videoId you want to use to upload your video.
              val file = File("/path/to/file") // The path to the video you want to upload.

              workManager.upload(videoId, file) // Dispatch the upload with the WorkManager
          - language: csharp
            code: |
              // First add the "ApiVideo" NuGet package to your project
              // Documentation: https://github.com/apivideo/api.video-csharp-client/blob/main/docs/VideosApi.md#upload

              using System.Diagnostics;
              using ApiVideo.Client;

              namespace Example
              {
                  public class uploadExample
                  {
                      public static void Main()
                      {
                          var basePath = ApiVideoClient.Client.Environment.SANDBOX;
                          var apiKey = "YOUR_API_KEY";

                          var apiInstance = new ApiVideoClient(apiKey,basePath);

                          var videoId = vi4k0jvEUuaTdRAEjQ4Jfrgz;  // string | Enter the videoId you want to use to upload your video.
                          var file = BINARY_DATA_HERE;  // System.IO.Stream | The path to the video you would like to upload. The path must be local. If you want to use a video from an online source, you must use the "/videos" endpoint and add the "source" parameter when you create a new video.
                          var apiVideosInstance = apiInstance.Videos();
                          try
                          {
                              // Upload a video
                              Video result = apiVideosInstance.upload(videoId, file);
                              Debug.WriteLine(result);
                          }
                          catch (ApiException  e)
                          {
                              Debug.Print("Exception when calling VideosApi.upload: " + e.Message );
                              Debug.Print("Status Code: "+ e.ErrorCode);
                              Debug.Print(e.StackTrace);
                          }
                      }
                  }
              }
          - language: swift
            code: |
              // First install the api client: https://github.com/apivideo/api.video-swift-client#getting-started
              // Documentation: https://github.com/apivideo/api.video-swift-client/blob/main/docs/VideosAPI.md#upload
  /watermarks:
    post:
      tags:
        - Watermarks
      summary: Upload a watermark
      description: Create a new watermark by uploading a `JPG` or a `PNG` image.
      operationId: POST_watermark
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/watermark-upload-payload'
      responses:
        '200':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/watermark'
              examples:
                response:
                  value:
                    watermarkId: watermark_1BWr2L5MTQwxGkuxKjzh6i
                    createdAt: '2020-03-03T12:52:03+00:00'
        '400':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/bad-request'
              examples:
                response:
                  value:
                    status: 400
                    type: 'https://docs.api.video/reference/uploaded-file-extension-invalid'
                    title: 'Only [jpeg, jpg, JPG, JPEG, png, PNG] extensions are supported.'
                    name: file
        '429':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/too-many-requests'
              examples:
                Too many requests:
                  value:
                    type: 'https://docs.api.video/reference/too-many-requests'
                    title: Too many requests.
                    status: 429
      security:
        - apiKey: []
      x-client-action: upload
      x-doctave:
        code-samples:
          - language: go
            code: |
              // First install the go client with "go get github.com/apivideo/api.video-go-client"
              // Documentation: https://github.com/apivideo/api.video-go-client/blob/main/docs/WatermarksApi.md#upload

              package main

              import (
                  "context"
                  "fmt"
                  "os"
                  apivideosdk "github.com/apivideo/api.video-go-client"
              )

              func main() {
                  client := apivideosdk.ClientBuilder("YOUR_API_KEY").Build()
                  // if you rather like to use the sandbox environment:
                  // client := apivideosdk.SandboxClientBuilder("YOUR_SANDBOX_API_KEY").Build()

                  file, _ := os.Open("./watermark.jpg")
                  
                  res, err := client.Watermarks.UploadFile(file)

                  if err != nil {
                      fmt.Fprintf(os.Stderr, "Error when calling `Watermarks.UploadFile``: %v", err)
                  }
                  // response from `UploadFile`: Watermark
                  fmt.Fprintf(os.Stdout, "Response from `Watermarks.UploadFile`: %v", res)
              }
          - language: node
            code: |
              // First install the "@api.video/nodejs-client" npm package
              // Documentation: https://github.com/apivideo/api.video-nodejs-client/blob/main/doc/api/WatermarksApi.md#upload

              const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" });

              // Upload a watermark
              const watermark = await client.watermarks.upload('test/data/test.jpg');

              // create a video with watermark
              const watermarkVideo = await client.videos.create({
                title: 'Nodejs - watermark',
                watermark: {
                  id: watermark.watermarkId,
                  top: '0px',
                  left: '0px',
                  width: '100px',
                  height: '100px',
                },
              });
          - language: php
            code: |
              <?php
              // First install the api client: "composer require api-video/php-api-client"
              // Documentation: https://github.com/apivideo/api.video-php-client/blob/main/docs/Api/WatermarksApi.md#upload

              require __DIR__ . '/vendor/autoload.php';

              $client = new \ApiVideo\Client\Client(
                  'https://ws.api.video',
                  'YOUR_API_KEY',
                  new \Symfony\Component\HttpClient\Psr18Client()
              );

              // upload the watermark
              $watermark = $client->watermarks()->upload(new SplFileObject(__DIR__ . '/watermark.png'));

              // create a new video with the watermark
              $video = $client->videos()->create((new VideoCreationPayload())
                      ->setWatermark((new VideoWatermark())
                              ->setId($watermark->getWatermarkId())
                              ->setTop("0px")
                              ->setLeft("0px")
                              ->setWidth("100px")
                              ->setHeight("100px"))
                      ->setTitle("Test PHP watermark")
              );

              // upload the video
              $client->videos()->upload($video->getVideoId(), new SplFileObject(__DIR__ . '/558k.mp4')); 
          - language: python
            code: |
              # First install the api client with "pip install api.video"
              # Documentation: https://github.com/apivideo/api.video-python-client/blob/main/docs/WatermarksApi.md#upload

              import apivideo
              from apivideo.api import videos_api
              from apivideo.model.bad_request import BadRequest
              from apivideo.model.not_found import NotFound
              from pprint import pprint

              # Enter a context with an instance of the API client
              with apivideo.AuthenticatedApiClient(__API_KEY__) as api_client:
                  # Create an instance of the API class
                  api_instance = videos_api.WatermarksApi(api_client)
                  file = open('/path/to/file', 'rb') # file_type | The watermark image.

                  # example passing only required values which don't have defaults set
                  try:
                      # Upload a watermark
                      api_response = api_instance.upload(file)
                      pprint(api_response)
                  except apivideo.ApiException as e:
                      print("Exception when calling WatermarksApi->upload: %s\
              " % e)
          - language: java
            code: |
              // First add the "video.api:java-api-client" maven dependency to your project
              // Documentation: https://github.com/apivideo/api.video-java-client/blob/main/docs/WatermarksApi.md#upload

              import video.api.client.ApiVideoClient;
              import video.api.client.api.ApiException;
              import video.api.client.api.models.*;
              import video.api.client.api.clients.WatermarksApi;
              import java.util.*;

              public class Example {
               public static void main(String[] args) {
                 ApiVideoClient client = new ApiVideoClient("YOUR_API_KEY");
                 // if you rather like to use the sandbox environment:
                 // ApiVideoClient client = new ApiVideoClient("YOUR_SANDBOX_API_KEY", ApiVideoClient.Environment.SANDBOX);

                 WatermarksApi watermarkApi = apiClient.watermarks();

                 File file = new File("/path/to/file"); // The watermark image.

                 try {
                   Watermark result = watermarkApi.upload(file);
                   System.out.println(result);
                 } catch (ApiException e) {
                   System.err.println("Exception when calling WatermarksApi#upload");
                   System.err.println("Status code: " + e.getCode());
                   System.err.println("Reason: " + e.getMessage());
                   System.err.println("Response headers: " + e.getResponseHeaders());
                   e.printStackTrace();
                 }
               }
              }
          - language: csharp
            code: |
              // First add the "ApiVideo" NuGet package to your project
              // Documentation: https://github.com/apivideo/api.video-csharp-client/blob/main/docs/WatermarksApi.md#upload

              using System.Diagnostics;
              using ApiVideo.Client;

              namespace Example
              {
                  public class uploadWatermarkExample
                  {
                      public static void Main()
                      {
                          var basePath = ApiVideoClient.Client.Environment.SANDBOX;
                          var apiKey = "YOUR_API_KEY";

                          var apiInstance = new ApiVideoClient(apiKey,basePath);

                          var file = File.OpenRead("watermark.jpg");  // The watermark image.
                          var apiWatermarksInstance = apiInstance.Watermarks();

                          try
                          {
                              // Upload a watermark
                              Video result = apiWatermarksInstance.upload(videoId, file);
                              Debug.WriteLine(result);
                          }
                          catch (ApiException  e)
                          {
                              Debug.Print("Exception when calling WatermarksApi.upload: " + e.Message );
                              Debug.Print("Status Code: "+ e.ErrorCode);
                              Debug.Print(e.StackTrace);
                          }
                      }
                  }
              }
          - language: swift
            code: |
              // First install the api client: https://github.com/apivideo/api.video-swift-client#getting-started
              // Documentation: https://github.com/apivideo/api.video-swift-client/blob/main/docs/WatermarksAPI.md#upload
    get:
      tags:
        - Watermarks
      summary: List all watermarks
      description: List all watermarks associated with your workspace.
      operationId: LIST-watermarks
      x-client-action: list
      parameters:
        - name: sortBy
          in: query
          description: 'Allowed: createdAt. You can search by the time watermark were created at.'
          required: false
          style: form
          explode: true
          schema:
            type: string
          example: createdAt
        - name: sortOrder
          in: query
          description: 'Allowed: asc, desc. asc is ascending and sorts from A to Z. desc is descending and sorts from Z to A.'
          required: false
          style: form
          explode: true
          schema:
            type: string
          example: asc
        - $ref: '#/components/parameters/current-page'
        - $ref: '#/components/parameters/page-size'
      responses:
        '200':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/watermarks-list-response'
              examples:
                response:
                  value:
                    data:
                      - watermarkId: watermark_1BWr2L5MTQwxGkuxKjzh6i
                        createdAt: '2019-12-16T08:25:51+00:00'
                      - watermarkId: watermark_3BWC2L5MTQwxGkuxKjzh7g
                        createdAt: '2019-12-16T08:25:51+00:00'
                    pagination:
                      currentPage: 1
                      pageSize: 25
                      pagesTotal: 1
                      itemsTotal: 11
                      currentPageItems: 11
                      links:
                        - rel: self
                          uri: 'https://ws.api.video/watermarks?currentPage=1'
                        - rel: first
                          uri: 'https://ws.api.video/watermarks?currentPage=1'
                        - rel: last
                          uri: 'https://ws.api.video/watermarks?currentPage=1'
        '400':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/bad-request'
              examples:
                response:
                  value:
                    title: This parameter is out of the allowed range of values.
                    name: page
                    status: 400
                    range:
                      min: 1
                    problems:
                      - title: This parameter is out of the allowed range of values.
                        name: page
                        range:
                          min: 1
                      - title: This parameter is out of the allowed range of values.
                        name: pageSize
                        range:
                          min: 10
                          max: 100
        '429':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/too-many-requests'
              examples:
                Too many requests:
                  value:
                    type: 'https://docs.api.video/reference/too-many-requests'
                    title: Too many requests.
                    status: 429
      security:
        - apiKey: []
      x-group-parameters: true
      x-client-paginated: true
      x-doctave:
        code-samples:
          - language: node
            code: |
              // First install the "@api.video/nodejs-client" npm package
              // Documentation: https://github.com/apivideo/api.video-nodejs-client/blob/main/doc/api/WatermarksApi.md#list

              const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" }); 

              // retrieve the first page of all watermarks
              const watermarks = await client.watermarks.list({});

              // retrieve the 5 first watermarks, ordered by creation date
              const watermarks2 = await client.watermarks.list({});
              createdAt
          - language: csharp
            code: |
              // First add the "ApiVideo" NuGet package to your project
              // Documentation: https://github.com/apivideo/api.video-csharp-client/blob/main/docs/WatermarksApi.md#list
          - language: go
            code: |
              // First install the go client with "go get github.com/apivideo/api.video-go-client"
              // Documentation: https://github.com/apivideo/api.video-go-client/blob/main/docs/WatermarksApi.md#list
          - language: java
            code: |
              // First add the "video.api:java-api-client" maven dependency to your project
              // Documentation: https://github.com/apivideo/api.video-java-client/blob/main/docs/WatermarksApi.md#list
          - language: php
            code: |-
              <?php
              // First install the api client: "composer require api-video/php-api-client"
              // Documentation: https://github.com/apivideo/api.video-php-client/blob/main/docs/Api/WatermarksApi.md#list

              require __DIR__ . '/vendor/autoload.php';

              $client = new \ApiVideo\Client\Client(
                  'https://ws.api.video',
                  'YOUR_API_KEY',
                  new \Symfony\Component\HttpClient\Psr18Client()
              ); 

              // retrieve the first page of all watermarks
              $watermarks =  client->watermarks()->list();

              // retrieve the 5 first watermarks, ordered by creation date
              $watermarks2 = $client->watermarks()->list(array(
                  'pageSize' => 5,
                  'sortBy' => 'createdAt',
                  'sortOrder' => 'asc'
              )); 
          - language: python
            code: |
              # First install the api client with "pip install api.video"
              # Documentation: https://github.com/apivideo/api.video-python-client/blob/main/docs/WatermarksApi.md#list
          - language: swift
            code: |
              // First install the api client: https://github.com/apivideo/api.video-swift-client#getting-started
              // Documentation: https://github.com/apivideo/api.video-swift-client/blob/main/docs/WatermarksAPI.md#list
  '/watermarks/{watermarkId}':
    delete:
      tags:
        - Watermarks
      summary: Delete a watermark
      description: Delete a watermark.
      operationId: DELETE_watermark
      parameters:
        - name: watermarkId
          in: path
          description: The watermark ID for the watermark you want to delete.
          required: true
          style: simple
          explode: false
          schema:
            type: string
          example: watermark_1BWr2L5MTQwxGkuxKjzh6i
      responses:
        '204':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: No Content
        '404':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/not-found'
              examples:
                response:
                  value:
                    type: 'https://docs.api.video/reference/resource-not-found'
                    title: The requested resource was not found.
                    name: watermarkId
                    status: 404
        '429':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/too-many-requests'
              examples:
                Too many requests:
                  value:
                    type: 'https://docs.api.video/reference/too-many-requests'
                    title: Too many requests.
                    status: 429
      security:
        - apiKey: []
      x-client-action: delete
      x-doctave:
        code-samples:
          - language: node
            code: |-
              // First install the "@api.video/nodejs-client" npm package
              // Documentation: https://github.com/apivideo/api.video-nodejs-client/blob/main/doc/api/WatermarksApi.md#delete

              const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" }); 

              const watermarkId = 'watermark_1Bji68oeAAwR44dAb5ZhML'; // The watermark ID for the watermark you want to delete.

              client.watermarks.delete(watermarkId);
          - language: csharp
            code: |
              // First add the "ApiVideo" NuGet package to your project
              // Documentation: https://github.com/apivideo/api.video-csharp-client/blob/main/docs/WatermarksApi.md#delete
          - language: go
            code: |
              // First install the go client with "go get github.com/apivideo/api.video-go-client"
              // Documentation: https://github.com/apivideo/api.video-go-client/blob/main/docs/WatermarksApi.md#delete
          - language: java
            code: |
              // First add the "video.api:java-api-client" maven dependency to your project
              // Documentation: https://github.com/apivideo/api.video-java-client/blob/main/docs/WatermarksApi.md#delete
          - language: php
            code: |-
              <?php
              // First install the api client: "composer require api-video/php-api-client"
              // Documentation: https://github.com/apivideo/api.video-php-client/blob/main/docs/Api/WatermarksApi.md#list

              require __DIR__ . '/vendor/autoload.php';

              $client = new \ApiVideo\Client\Client(
                  'https://ws.api.video',
                  'YOUR_API_KEY',
                  new \Symfony\Component\HttpClient\Psr18Client()
              ); 

              $watermarkId = 'watermark_1Bji68oeAAwR44dAb5ZhML'; // The watermark ID for the watermark you want to delete.

              $client->watermarks->delete(watermarkId);
          - language: python
            code: |
              # First install the api client with "pip install api.video"
              # Documentation: https://github.com/apivideo/api.video-python-client/blob/main/docs/WatermarksApi.md#delete
          - language: swift
            code: |
              // First install the api client: https://github.com/apivideo/api.video-swift-client#getting-started
              // Documentation: https://github.com/apivideo/api.video-swift-client/blob/main/docs/WatermarksAPI.md#delete
  '/videos/{videoId}/thumbnail':
    post:
      tags:
        - Videos
      summary: Upload a thumbnail
      description: Upload a thumbnail for a certain video.
      x-client-description:
        default: |-
          The thumbnail is the poster that appears in the player window before video playback begins.

          This endpoint allows you to upload an image for the thumbnail.

          To select a still frame from the video using a time stamp, use the [dedicated method](#pickThumbnail) to pick a time in the video.

          Note: There may be a short delay before the new thumbnail is delivered to our CDN.
      operationId: POST_videos-videoId-thumbnail
      parameters:
        - name: videoId
          in: path
          description: 'Unique identifier of the chosen video '
          required: true
          style: simple
          explode: false
          schema:
            type: string
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/video-thumbnail-upload-payload'
      responses:
        '200':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/video'
              examples:
                response:
                  value:
                    videoId: vi4blUQJFrYWbaG44NChkH27
                    playerId: pl45KFKdlddgk654dspkze
                    title: Maths video
                    description: An amazing video explaining the string theory
                    public: false
                    panoramic: false
                    mp4Support: true
                    tags:
                      - maths
                      - string theory
                      - video
                    metadata:
                      - key: Author
                        value: John Doe
                      - key: Format
                        value: Tutorial
                    createdAt: '2020-03-03T12:52:03+00:00'
                    publishedAt: '2020-07-14T23:36:07+00:00'
                    discarded: false
                    discardedAt: null
                    deletesAt: null
                    source:
                      uri: /videos/vi4blUQJFrYWbaG44NChkH27/source
                    assets:
                      iframe: '<iframe src="https://embed.api.video/vod/vi4blUQJFrYWbaG44NChkH27" width="100%" height="100%" frameborder="0" scrolling="no" allowfullscreen=""></iframe>'
                      player: 'https://embed.api.video/vod/vi4blUQJFrYWbaG44NChkH27'
                      hls: 'https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/hls/manifest.m3u8'
                      thumbnail: 'https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/thumbnail.jpg'
                      mp4: 'https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/mp4/source.mp4'
        '400':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/bad-request'
              examples:
                response:
                  value:
                    status: 400
                    type: 'https://docs.api.video/reference/uploaded-file-extension-invalid'
                    title: 'Only [jpeg, jpg, JPG, JPEG] extensions are supported.'
                    name: file
        '404':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/not-found'
              examples:
                response:
                  value:
                    type: 'https://docs.api.video/reference/resource-not-found'
                    title: The requested resource was not found.
                    name: videoId
                    status: 404
        '429':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/too-many-requests'
              examples:
                Too many requests:
                  value:
                    type: 'https://docs.api.video/reference/too-many-requests'
                    title: Too many requests.
                    status: 429
      security:
        - apiKey: []
      x-client-action: uploadThumbnail
      x-doctave:
        explorer-enabled: false
        code-samples:
          - language: go
            code: |
              // First install the go client with "go get github.com/apivideo/api.video-go-client"
              // Documentation: https://github.com/apivideo/api.video-go-client/blob/main/docs/VideosApi.md#uploadThumbnail

              package main

              import (
                  "context"
                  "fmt"
                  "os"
                  apivideosdk "github.com/apivideo/api.video-go-client"
              )

              func main() {
                  client := apivideosdk.ClientBuilder("YOUR_API_KEY").Build()
                  // if you rather like to use the sandbox environment:
                  // client := apivideosdk.SandboxClientBuilder("YOUR_SANDBOX_API_KEY").Build()

                  videoId := "videoId_example" // string | Unique identifier of the chosen video 
                  file := os.NewFile(1234, "some_file") // *os.File | The image to be added as a thumbnail.


                  res, err := client.Videos.UploadThumbnailFile(videoId, file)

                  // you can also use a Reader instead of a File:
                  // client.Videos.UploadThumbnail(videoId, fileName, fileReader)

                  if err != nil {
                      fmt.Fprintf(os.Stderr, "Error when calling `Videos.UploadThumbnail``: %v\
              ", err)
                  }
                  // response from `UploadThumbnail`: Video
                  fmt.Fprintf(os.Stdout, "Response from `Videos.UploadThumbnail`: %v\
              ", res)
              }
          - language: node
            code: |-
              // First install the "@api.video/nodejs-client" npm package
              // Documentation: https://github.com/apivideo/api.video-nodejs-client/blob/main/doc/api/VideosApi.md#uploadThumbnail

              const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" });

              const videoId = 'videoId_example'; // Unique identifier of the chosen video 
              const file = './thumbnail.jpg'; // The image to be added as a thumbnail.

              const video = await client.videos.uploadThumbnail(videoId, file);
          - language: python
            code: |
              # First install the api client with "pip install api.video"
              # Documentation: https://github.com/apivideo/api.video-python-client/blob/main/docs/VideosApi.md#uploadThumbnail

              import apivideo
              from apivideo.api import videos_api
              from apivideo.model.bad_request import BadRequest
              from apivideo.model.not_found import NotFound
              from apivideo.model.video import Video
              from pprint import pprint

              # Enter a context with an instance of the API client
              with apivideo.AuthenticatedApiClient(__API_KEY__) as api_client:
                  # Create an instance of the API class
                  api_instance = videos_api.VideosApi(api_client)
                  video_id = "videoId_example" # str | Unique identifier of the chosen video 
                  file = open('/path/to/file', 'rb') # file_type | The image to be added as a thumbnail.

                  # example passing only required values which don't have defaults set
                  try:
                      # Upload a thumbnail
                      api_response = api_instance.upload_thumbnail(video_id, file)
                      pprint(api_response)
                  except apivideo.ApiException as e:
                      print("Exception when calling VideosApi->upload_thumbnail: %s\
              " % e)
          - language: java
            code: |
              // First add the "video.api:java-api-client" maven dependency to your project
              // Documentation: https://github.com/apivideo/api.video-java-client/blob/main/docs/VideosApi.md#uploadThumbnail

              import video.api.client.ApiVideoClient;
              import video.api.client.api.ApiException;
              import video.api.client.api.models.*;
              import video.api.client.api.clients.VideosApi;
              import java.util.*;

              public class Example {
               public static void main(String[] args) {
                 ApiVideoClient client = new ApiVideoClient("YOUR_API_KEY");
                 // if you rather like to use the sandbox environment:
                 // ApiVideoClient client = new ApiVideoClient("YOUR_SANDBOX_API_KEY", ApiVideoClient.Environment.SANDBOX);

                 VideosApi apiInstance = client.videos();

                 String videoId = "videoId_example"; // Unique identifier of the chosen video 
                 File file = new File("/path/to/file"); // The image to be added as a thumbnail.

                 try {
                   Video result = apiInstance.uploadThumbnail(videoId, file);
                   System.out.println(result);
                 } catch (ApiException e) {
                   System.err.println("Exception when calling VideosApi#uploadThumbnail");
                   System.err.println("Status code: " + e.getCode());
                   System.err.println("Reason: " + e.getMessage());
                   System.err.println("Response headers: " + e.getResponseHeaders());
                   e.printStackTrace();
                 }
               }
              }
          - language: csharp
            code: |
              // First add the "ApiVideo" NuGet package to your project
              // Documentation: https://github.com/apivideo/api.video-csharp-client/blob/main/docs/VideosApi.md#uploadThumbnail

              using System.Diagnostics;
              using ApiVideo.Client;

              namespace Example
              {
                  public class uploadThumbnailExample
                  {
                      public static void Main()
                      {
                          var basePath = ApiVideoClient.Client.Environment.SANDBOX;
                          var apiKey = "YOUR_API_KEY";

                          var apiInstance = new ApiVideoClient(apiKey,basePath);

                          var videoId = videoId_example;  // string | Unique identifier of the chosen video 
                          var file = BINARY_DATA_HERE;  // System.IO.Stream | The image to be added as a thumbnail.
                          var apiVideosInstance = apiInstance.Videos();
                          try
                          {
                              // Upload a thumbnail
                              Video result = apiVideosInstance.uploadThumbnail(videoId, file);
                              Debug.WriteLine(result);
                          }
                          catch (ApiException  e)
                          {
                              Debug.Print("Exception when calling VideosApi.uploadThumbnail: " + e.Message );
                              Debug.Print("Status Code: "+ e.ErrorCode);
                              Debug.Print(e.StackTrace);
                          }
                      }
                  }
              }
          - language: php
            code: |-
              <?php
              // First install the api client: "composer require api-video/php-api-client"
              // Documentation: https://github.com/apivideo/api.video-php-client/blob/main/docs/Api/VideosApi.md#uploadWithUploadToken

              require __DIR__ . '/vendor/autoload.php';

              $client = new \ApiVideo\Client\Client(
                  'https://ws.api.video',
                  'YOUR_API_KEY',
                  new \Symfony\Component\HttpClient\Psr18Client()
              ); 

              $videoId = 'vi4k0jvEUuaTdRAEjQ4Jfrgz'; // Unique identifier of the chosen video
              $thumbnail = new SplFileObject(__DIR__ . '/thumbnail.jpg'); // The image to be added as a thumbnail.

              $client->videos()->uploadThumbnail($videoId, $thumbnail); 
          - language: swift
            code: |
              // First install the api client: https://github.com/apivideo/api.video-swift-client#getting-started
              // Documentation: https://github.com/apivideo/api.video-swift-client/blob/main/docs/VideosAPI.md#uploadThumbnail
    patch:
      tags:
        - Videos
      summary: Set a thumbnail
      description: Set a thumbnail from a specific time interval within a video.
      x-client-description:
        default: |
          Pick a thumbnail from the given time code. 

          If you'd like to upload an image for your thumbnail, use the dedicated [method](#uploadThumbnail). 

          There may be a short delay for the thumbnail to update.
      operationId: PATCH_videos-videoId-thumbnail
      parameters:
        - name: videoId
          in: path
          description: 'Unique identifier of the video you want to add a thumbnail to, where you use a section of your video as the thumbnail.'
          required: true
          style: simple
          explode: false
          schema:
            type: string
          example: vi4k0jvEUuaTdRAEjQ4Jfrgz
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/video-thumbnail-pick-payload'
      responses:
        '200':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/video'
              examples:
                response:
                  value:
                    videoId: vi4blUQJFrYWbaG44NChkH27
                    playerId: pl45KFKdlddgk654dspkze
                    title: Maths video
                    description: An amazing video explaining string theory
                    public: false
                    panoramic: false
                    mp4Support: true
                    tags:
                      - maths
                      - string theory
                      - video
                    metadata:
                      - key: Author
                        value: John Doe
                      - key: Format
                        value: Tutorial
                    publishedAt: '2024-07-14T23:36:07+00:00'
                    discarded: false
                    discardedAt: null
                    deletesAt: null
                    source:
                      uri: /videos/vi4blUQJFrYWbaG44NChkH27/source
                    assets:
                      iframe: '<iframe src="https://embed.api.video/vod/vi4blUQJFrYWbaG44NChkH27" width="100%" height="100%" frameborder="0" scrolling="no" allowfullscreen=""></iframe>'
                      player: 'https://embed.api.video/vod/vi4blUQJFrYWbaG44NChkH27'
                      hls: 'https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/hls/manifest.m3u8'
                      thumbnail: 'https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/thumbnail.jpg'
                      mp4: 'https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/mp4/source.mp4'
        '404':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/not-found'
              examples:
                response:
                  value:
                    type: 'https://docs.api.video/reference/resource-not-found'
                    title: The requested resource was not found.
                    name: videoId
                    status: 404
        '429':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/too-many-requests'
              examples:
                Too many requests:
                  value:
                    type: 'https://docs.api.video/reference/too-many-requests'
                    title: Too many requests.
                    status: 429
      security:
        - apiKey: []
      x-client-action: pickThumbnail
      x-doctave:
        code-samples:
          - language: go
            code: |
              // First install the go client with "go get github.com/apivideo/api.video-go-client"
              // Documentation: https://github.com/apivideo/api.video-go-client/blob/main/docs/VideosApi.md#pickThumbnail

              package main

              import (
                  "context"
                  "fmt"
                  "os"
                  apivideosdk "github.com/apivideo/api.video-go-client"
              )

              func main() {
                  client := apivideosdk.ClientBuilder("YOUR_API_KEY").Build()
                  // if you rather like to use the sandbox environment:
                  // client := apivideosdk.SandboxClientBuilder("YOUR_SANDBOX_API_KEY").Build()
                      
                  videoId := "vi4k0jvEUuaTdRAEjQ4Jfrgz" // string | Unique identifier of the video you want to add a thumbnail to, where you use a section of your video as the thumbnail.
                  videoThumbnailPickPayload := *apivideosdk.NewVideoThumbnailPickPayload("Timecode_example") // VideoThumbnailPickPayload | 

                  
                  res, err := client.Videos.PickThumbnail(videoId, videoThumbnailPickPayload)

                  if err != nil {
                      fmt.Fprintf(os.Stderr, "Error when calling `Videos.PickThumbnail``: %v\
              ", err)
                  }
                  // response from `PickThumbnail`: Video
                  fmt.Fprintf(os.Stdout, "Response from `Videos.PickThumbnail`: %v\
              ", res)
              }
          - language: node
            code: |
              // First install the "@api.video/nodejs-client" npm package
              // Documentation: https://github.com/apivideo/api.video-nodejs-client/blob/main/doc/api/VideosApi.md#pickThumbnail

              const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" });

              const videoId = 'vi4k0jvEUuaTdRAEjQ4Jfrgz'; // Unique identifier of the video you want to add a thumbnail to, where you use a section of your video as the thumbnail.
              const videoThumbnailPickPayload = {
                timecode: "00:01:00.000",  // Frame in video to be used as a placeholder before the video plays. 
              }; 

              const video = await client.videos.pickThumbnail(videoId, videoThumbnailPickPayload);
          - language: python
            code: |
              # First install the api client with "pip install api.video"
              # Documentation: https://github.com/apivideo/api.video-python-client/blob/main/docs/VideosApi.md#pickThumbnail

              import apivideo
              from apivideo.api import videos_api
              from apivideo.model.video_thumbnail_pick_payload import VideoThumbnailPickPayload
              from apivideo.model.not_found import NotFound
              from apivideo.model.video import Video
              from pprint import pprint

              # Enter a context with an instance of the API client
              with apivideo.AuthenticatedApiClient(__API_KEY__) as api_client:
                  # Create an instance of the API class
                  api_instance = videos_api.VideosApi(api_client)
                  video_id = "vi4k0jvEUuaTdRAEjQ4Jfrgz" # str | Unique identifier of the video you want to add a thumbnail to, where you use a section of your video as the thumbnail.
                  video_thumbnail_pick_payload = VideoThumbnailPickPayload(
                      timecode="04:80:72",
                  ) # VideoThumbnailPickPayload | 

                  # example passing only required values which don't have defaults set
                  try:
                      # Pick a thumbnail
                      api_response = api_instance.pick_thumbnail(video_id, video_thumbnail_pick_payload)
                      pprint(api_response)
                  except apivideo.ApiException as e:
                      print("Exception when calling VideosApi->pick_thumbnail: %s\
              " % e)
          - language: java
            code: |
              // First add the "video.api:java-api-client" maven dependency to your project
              // Documentation: https://github.com/apivideo/api.video-java-client/blob/main/docs/VideosApi.md#pickThumbnail

              import video.api.client.ApiVideoClient;
              import video.api.client.api.ApiException;
              import video.api.client.api.models.*;
              import video.api.client.api.clients.VideosApi;
              import java.util.*;

              public class Example {
                public static void main(String[] args) {
                  ApiVideoClient client = new ApiVideoClient("YOUR_API_KEY");
                  // if you rather like to use the sandbox environment:
                  // ApiVideoClient client = new ApiVideoClient("YOUR_SANDBOX_API_KEY", ApiVideoClient.Environment.SANDBOX);

                  VideosApi apiInstance = client.videos();
                  
                  String videoId = "vi4k0jvEUuaTdRAEjQ4Jfrgz"; // Unique identifier of the video you want to add a thumbnail to, where you use a section of your video as the thumbnail.
                  VideoThumbnailPickPayload videoThumbnailPickPayload = new VideoThumbnailPickPayload(); // 
                  videoThumbnailPickPayload.setTimecode("null"); // Frame in video to be used as a placeholder before the video plays.
              Example: &#39;&quot;00:01:00.000&quot; for 1 minute into the video.&#39;
              Valid Patterns:
              &quot;hh:mm:ss.ms&quot;
              &quot;hh:mm:ss:frameNumber&quot;
              &quot;124&quot; (integer value is reported as seconds)
              If selection is out of range, &quot;00:00:00.00&quot; will be chosen.


                  try {
                    Video result = apiInstance.pickThumbnail(videoId, videoThumbnailPickPayload);
                    System.out.println(result);
                  } catch (ApiException e) {
                    System.err.println("Exception when calling VideosApi#pickThumbnail");
                    System.err.println("Status code: " + e.getCode());
                    System.err.println("Reason: " + e.getMessage());
                    System.err.println("Response headers: " + e.getResponseHeaders());
                    e.printStackTrace();
                  }
                }
              }        
          - language: csharp
            code: |
              // First add the "ApiVideo" NuGet package to your project
              // Documentation: https://github.com/apivideo/api.video-csharp-client/blob/main/docs/VideosApi.md#pickThumbnail

              using System.Diagnostics;
              using ApiVideo.Client;

              namespace Example
              {
                  public class pickThumbnailExample
                  {
                      public static void Main()
                      {
                          var basePath = ApiVideoClient.Client.Environment.SANDBOX;
                          var apiKey = "YOUR_API_KEY";

                          var apiInstance = new ApiVideoClient(apiKey,basePath);

                          var videoId = vi4k0jvEUuaTdRAEjQ4Jfrgz;  // string | Unique identifier of the video you want to add a thumbnail to, where you use a section of your video as the thumbnail.
                          var videoThumbnailPickPayload = new VideoThumbnailPickPayload(); // VideoThumbnailPickPayload | 
                          var apiVideosInstance = apiInstance.Videos();
                          try
                          {
                              // Pick a thumbnail
                              Video result = apiVideosInstance.pickThumbnail(videoId, videoThumbnailPickPayload);
                              Debug.WriteLine(result);
                          }
                          catch (ApiException  e)
                          {
                              Debug.Print("Exception when calling VideosApi.pickThumbnail: " + e.Message );
                              Debug.Print("Status Code: "+ e.ErrorCode);
                              Debug.Print(e.StackTrace);
                          }
                      }
                  }
              }              
          - language: php
            code: |-
              <?php
              // First install the api client: "composer require api-video/php-api-client"
              // Documentation: https://github.com/apivideo/api.video-php-client/blob/main/docs/Api/VideosApi.md#pickThumbnail

              require __DIR__ . '/vendor/autoload.php';

              $client = new \ApiVideo\Client\Client(
                  'https://ws.api.video',
                  'YOUR_API_KEY',
                  new \Symfony\Component\HttpClient\Psr18Client()
              );
               
              $videoId = 'vi4k0jvEUuaTdRAEjQ4Jfrgz'; // Unique identifier of the video you want to add a thumbnail to, where you use a section of your video as the thumbnail.

              $video = $client->videos()->pickThumbnail($videoId, (new \ApiVideo\Client\Model\VideoThumbnailPickPayload())
                  ->setTimecode("00:01:00.000")); // Frame in video to be used as a placeholder before the video plays. 
          - language: swift
            code: |
              // First install the api client: https://github.com/apivideo/api.video-swift-client#getting-started
              // Documentation: https://github.com/apivideo/api.video-swift-client/blob/main/docs/VideosAPI.md#pickThumbnail
  '/videos/{videoId}':
    get:
      tags:
        - Videos
      summary: Retrieve a video object
      description: Retrieve the video details by video id.
      x-client-description:
        default: 'This call provides the same information provided on video creation. For private videos, it will generate a unique token url. Use this to retrieve any details you need about a video, or set up a private viewing URL.'
      operationId: GET-video
      parameters:
        - name: videoId
          in: path
          description: The unique identifier for the video you want details about.
          required: true
          style: simple
          explode: false
          schema:
            type: string
      responses:
        '200':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Success
          content:
            application/json:
              schema:
                type: object
                $ref: '#/components/schemas/video'
              examples:
                response:
                  value:
                    videoId: vi4blUQJFrYWbaG44NChkH27
                    playerId: pl45KFKdlddgk654dspkze
                    title: Maths video
                    description: An amazing video explaining string theory
                    language: 'en'
                    languageOrigin: 'api'
                    public: false
                    panoramic: false
                    mp4Support: true
                    tags:
                      - maths
                      - string theory
                      - video
                    metadata:
                      - key: Author
                        value: John Doe
                      - key: Format
                        value: Tutorial
                    publishedAt: '2019-12-16T08:25:51+00:00'
                    updatedAt: '2019-12-16T08:48:49+00:00'
                    discarded: false
                    discardedAt: null
                    deletesAt: null
                    source:
                      uri: /videos/vi4blUQJFrYWbaG44NChkH27/source
                    assets:
                      iframe: '<iframe src="https://embed.api.video/vod/vi4blUQJFrYWbaG44NChkH27" width="100%" height="100%" frameborder="0" scrolling="no" allowfullscreen=""></iframe>'
                      player: 'https://embed.api.video/vod/vi4blUQJFrYWbaG44NChkH27'
                      hls: 'https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/hls/manifest.m3u8'
                      thumbnail: 'https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/thumbnail.jpg'
                      mp4: 'https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/mp4/source.mp4'
        '404':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/not-found'
              examples:
                response:
                  value:
                    type: 'https://docs.api.video/reference/resource-not-found'
                    title: The requested resource was not found.
                    name: videoId
                    status: 404
        '429':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/too-many-requests'
              examples:
                Too many requests:
                  value:
                    type: 'https://docs.api.video/reference/too-many-requests'
                    title: Too many requests.
                    status: 429
      security:
        - apiKey: []
      x-client-action: get
      x-doctave:
        code-samples:
          - language: go
            code: |
              // First install the go client with "go get github.com/apivideo/api.video-go-client"
              // Documentation: https://github.com/apivideo/api.video-go-client/blob/main/docs/VideosApi.md#get

              package main

              import (
                  "context"
                  "fmt"
                  "os"
                  apivideosdk "github.com/apivideo/api.video-go-client"
              )

              func main() {
                  client := apivideosdk.ClientBuilder("YOUR_API_KEY").Build()
                  // if you rather like to use the sandbox environment:
                  // client := apivideosdk.SandboxClientBuilder("YOUR_SANDBOX_API_KEY").Build()
                      
                  videoId := "videoId_example" // string | The unique identifier for the video you want details about.

                  
                  res, err := client.Videos.Get(videoId)

                  if err != nil {
                      fmt.Fprintf(os.Stderr, "Error when calling `Videos.Get``: %v\
              ", err)
                  }
                  // response from `Get`: Video
                  fmt.Fprintf(os.Stdout, "Response from `Videos.Get`: %v\
              ", res)
              }
          - language: node
            code: |
              // First install the "@api.video/nodejs-client" npm package
              // Documentation: https://github.com/apivideo/api.video-nodejs-client/blob/main/doc/api/VideosApi.md#get

              const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" });

              const videoId = 'vi4k0jvEUuaTdRAEjQ4Jfrgz'; // The unique identifier for the video you want to retrieve.
              const result = await client.videos.get(videoId);  
          - language: python
            code: |
              # First install the api client with "pip install api.video"
              # Documentation: https://github.com/apivideo/api.video-python-client/blob/main/docs/VideosApi.md#get

              import apivideo
              from apivideo.api import videos_api
              from apivideo.model.not_found import NotFound
              from apivideo.model.video import Video
              from pprint import pprint

              # Enter a context with an instance of the API client
              with apivideo.AuthenticatedApiClient(__API_KEY__) as api_client:
                  # Create an instance of the API class
                  api_instance = videos_api.VideosApi(api_client)
                  video_id = "videoId_example" # str | The unique identifier for the video you want details about.

                  # example passing only required values which don't have defaults set
                  try:
                      # Show a video
                      api_response = api_instance.get(video_id)
                      pprint(api_response)
                  except apivideo.ApiException as e:
                      print("Exception when calling VideosApi->get: %s\n" % e)
          - language: java
            code: |
              // First add the "video.api:java-api-client" maven dependency to your project
              // Documentation: https://github.com/apivideo/api.video-java-client/blob/main/docs/VideosApi.md#get

              import video.api.client.ApiVideoClient;
              import video.api.client.api.ApiException;
              import video.api.client.api.models.*;
              import video.api.client.api.clients.VideosApi;
              import java.util.*;

              public class Example {
                public static void main(String[] args) {
                  ApiVideoClient client = new ApiVideoClient("YOUR_API_KEY");
                  // if you rather like to use the sandbox environment:
                  // ApiVideoClient client = new ApiVideoClient("YOUR_SANDBOX_API_KEY", ApiVideoClient.Environment.SANDBOX);

                  VideosApi apiInstance = client.videos();
                  
                  String videoId = "videoId_example"; // The unique identifier for the video you want details about.

                  try {
                    Video result = apiInstance.get(videoId);
                    System.out.println(result);
                  } catch (ApiException e) {
                    System.err.println("Exception when calling VideosApi#get");
                    System.err.println("Status code: " + e.getCode());
                    System.err.println("Reason: " + e.getMessage());
                    System.err.println("Response headers: " + e.getResponseHeaders());
                    e.printStackTrace();
                  }
                }
              }  
          - language: csharp
            code: |
              // First add the "ApiVideo" NuGet package to your project
              // Documentation: https://github.com/apivideo/api.video-csharp-client/blob/main/docs/VideosApi.md#get

              using System.Diagnostics;
              using ApiVideo.Client;

              namespace Example
              {
                  public class getExample
                  {
                      public static void Main()
                      {
                          var basePath = ApiVideoClient.Client.Environment.SANDBOX;
                          var apiKey = "YOUR_API_KEY";

                          var apiInstance = new ApiVideoClient(apiKey,basePath);

                          var videoId = videoId_example;  // string | The unique identifier for the video you want details about.
                          var apiVideosInstance = apiInstance.Videos();
                          try
                          {
                              // Show a video
                              Video result = apiVideosInstance.get(videoId);
                              Debug.WriteLine(result);
                          }
                          catch (ApiException  e)
                          {
                              Debug.Print("Exception when calling VideosApi.get: " + e.Message );
                              Debug.Print("Status Code: "+ e.ErrorCode);
                              Debug.Print(e.StackTrace);
                          }
                      }
                  }
              } 
          - language: php
            code: |-
              <?php
              // First install the api client: "composer require api-video/php-api-client"
              // Documentation: https://github.com/apivideo/api.video-php-client/blob/main/docs/Api/VideosApi.md#getStatus

              require __DIR__ . '/vendor/autoload.php';

              $client = new \ApiVideo\Client\Client(
                  'https://ws.api.video',
                  'YOUR_API_KEY',
                  new \Symfony\Component\HttpClient\Psr18Client()
              );

              $videoId = 'vi4k0jvEUuaTdRAEjQ4Jfrgz'; // The unique identifier for the video you want the status for.
              $videoStatus = $client->videos()->getStatus($videoId);  
          - language: swift
            code: |
              // First install the api client: https://github.com/apivideo/api.video-swift-client#getting-started
              // Documentation: https://github.com/apivideo/api.video-swift-client/blob/main/docs/VideosAPI.md#get
    delete:
      tags:
        - Videos
      summary: Delete a video object
      description: |
        Delete a video object by video ID. 
        
        By default, deleted videos cannot be recovered. If you have the Video Restore feature enabled, this operation will discard the video instead of permanently deleting it. Make sure you subscribe to the Video Restore feature if you want to be able to restore deleted videos! 
        
        The Video Restore feature retains videos for 90 days, after which the videos are permanently deleted.       
      x-client-description:
        default: 'If you do not need a video any longer, you can send a request to delete it. All you need is the videoId. By default, deleted videos cannot be recovered. If you have the Video Restore feature enabled, this operation will discard the video instead of permanently deleting it. Make sure you subscribe to the Video Restore feature if you want to be able to restore deleted videos! The Video Restore feature retains videos for 90 days, after which the videos are permanently deleted'
      operationId: DELETE-video
      parameters:
        - name: videoId
          in: path
          description: The video ID for the video you want to delete.
          required: true
          style: simple
          explode: false
          schema:
            type: string
          example: vi4k0jvEUuaTdRAEjQ4Jfrgz
      responses:
        '204':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: No Content
        '404':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/not-found'
              examples:
                response:
                  value:
                    type: 'https://docs.api.video/reference/resource-not-found'
                    title: The requested resource was not found.
                    name: videoId
                    status: 404
        '429':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/too-many-requests'
              examples:
                Too many requests:
                  value:
                    type: 'https://docs.api.video/reference/too-many-requests'
                    title: Too many requests.
                    status: 429
      security:
        - apiKey: []
      x-client-action: delete
      x-doctave:
        code-samples:
          - language: go
            code: |
              // First install the go client with "go get github.com/apivideo/api.video-go-client"
              // Documentation: https://github.com/apivideo/api.video-go-client/blob/main/docs/VideosApi.md#delete

              package main
              import (
                  "context"
                  "fmt"
                  "os"
                  apivideosdk "github.com/apivideo/api.video-go-client"
              )
              func main() {
                  client := apivideosdk.ClientBuilder("YOUR_API_KEY").Build()
                  // if you rather like to use the sandbox environment:
                  // client := apivideosdk.SandboxClientBuilder("YOUR_SANDBOX_API_KEY").Build()
                      
                  videoId := "vi4k0jvEUuaTdRAEjQ4Jfrgz" // string | The video ID for the video you want to delete.
                  err := client.Videos.Delete(videoId)
                  if err != nil {
                      fmt.Fprintf(os.Stderr, "Error when calling `Videos.Delete``: %v\
              ", err)
                  }
              }  
          - language: node
            code: |
              // First install the "@api.video/nodejs-client" npm package
              // Documentation: https://github.com/apivideo/api.video-nodejs-client/blob/main/doc/api/VideosApi.md#delete

              const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" });

              const videoId = 'vi4k0jvEUuaTdRAEjQ4Jfrgz'; // the id of the video to delete
              await client.videos.delete(videoId); 
          - language: python
            code: |
              # First install the api client with "pip install api.video"
              # Documentation: https://github.com/apivideo/api.video-python-client/blob/main/docs/VideosApi.md#delete

              import apivideo
              from apivideo.api import videos_api
              from apivideo.model.not_found import NotFound
              from pprint import pprint
              # Enter a context with an instance of the API client
              with apivideo.AuthenticatedApiClient(__API_KEY__) as api_client:
                  # Create an instance of the API class
                  api_instance = videos_api.VideosApi(api_client)
                  video_id = "vi4k0jvEUuaTdRAEjQ4Jfrgz" # str | The video ID for the video you want to delete.
                  # example passing only required values which don't have defaults set
                  try:
                      # Delete a video
                      api_instance.delete(video_id)
                  except apivideo.ApiException as e:
                      print("Exception when calling VideosApi->delete: %s\n" % e)
          - language: java
            code: |
              // First add the "video.api:java-api-client" maven dependency to your project
              // Documentation: https://github.com/apivideo/api.video-java-client/blob/main/docs/VideosApi.md#delete

              import video.api.client.ApiVideoClient;
              import video.api.client.api.ApiException;
              import video.api.client.api.models.*;
              import video.api.client.api.clients.VideosApi;
              import java.util.*;
                
              public class Example {
                public static void main(String[] args) {
                  ApiVideoClient client = new ApiVideoClient("YOUR_API_KEY");
                  // if you rather like to use the sandbox environment:
                  // ApiVideoClient client = new ApiVideoClient("YOUR_SANDBOX_API_KEY", ApiVideoClient.Environment.SANDBOX);
                  
                  VideosApi apiInstance = client.videos();
                  
                  String videoId = "vi4k0jvEUuaTdRAEjQ4Jfrgz"; // The video ID for the video you want to delete.
                  
                  try {
                    apiInstance.delete(videoId);
                  } catch (ApiException e) {
                    System.err.println("Exception when calling VideosApi#delete");
                    System.err.println("Status code: " + e.getCode());
                    System.err.println("Reason: " + e.getMessage());
                    System.err.println("Response headers: " + e.getResponseHeaders());
                    e.printStackTrace();
                  }
                }
              }
          - language: csharp
            code: |
              // First add the "ApiVideo" NuGet package to your project
              // Documentation: https://github.com/apivideo/api.video-csharp-client/blob/main/docs/VideosApi.md#delete

              using System.Diagnostics;
              using ApiVideo.Client;

              namespace Example
              {
                  public class deleteExample
                  {
                      public static void Main()
                      {
                          var basePath = ApiVideoClient.Client.Environment.SANDBOX;
                          var apiKey = "YOUR_API_KEY";
                          var apiInstance = new ApiVideoClient(apiKey,basePath);
                          var videoId = vi4k0jvEUuaTdRAEjQ4Jfrgz;  // string | The video ID for the video you want to delete.
                          var apiVideosInstance = apiInstance.Videos();
                          try
                          {
                              // Delete a video
                              apiVideosInstance.delete(videoId);
                          }
                          catch (ApiException  e)
                          {
                              Debug.Print("Exception when calling VideosApi.delete: " + e.Message );
                              Debug.Print("Status Code: "+ e.ErrorCode);
                              Debug.Print(e.StackTrace);
                          }
                      }
                  }
              } 
          - language: php
            code: |-
              <?php
              // First install the api client: "composer require api-video/php-api-client"
              // Documentation: https://github.com/apivideo/api.video-php-client/blob/main/docs/Api/VideosApi.md#delete

              require __DIR__ . '/vendor/autoload.php';

              $client = new \ApiVideo\Client\Client(
                  'https://ws.api.video',
                  'YOUR_API_KEY',
                  new \Symfony\Component\HttpClient\Psr18Client()
              );

              $videoId = 'vi4k0jvEUuaTdRAEjQ4Jfrgz'; // the id of the video to delete
              $client->videos()->delete($videoId); 
          - language: swift
            code: |
              // First install the api client: https://github.com/apivideo/api.video-swift-client#getting-started
              // Documentation: https://github.com/apivideo/api.video-swift-client/blob/main/docs/VideosAPI.md#delete
    patch:
      tags:
        - Videos
      summary: Update a video object
      description: Update the parameters associated with a video ID.
      x-client-description:
        default: |
          Updates the parameters associated with a video ID. The video object you are updating is determined by the video ID you provide. 

          NOTE: If you are updating an array, you must provide the entire array as what you provide here overwrites what is in the system rather than appending to it.
      operationId: PATCH-video
      parameters:
        - name: videoId
          in: path
          description: The video ID for the video you want to update.
          required: true
          style: simple
          explode: false
          schema:
            type: string
          example: vi4k0jvEUuaTdRAEjQ4Jfrgz
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/video-update-payload'
      responses:
        '200':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/video'
              examples:
                response:
                  value:
                    videoId: vi4blUQJFrYWbaG44NChkH27
                    playerId: pl45KFKdlddgk654dspkze
                    title: Maths video
                    description: An amazing video explaining the string theory
                    language: 'en'
                    languageOrigin: 'api'
                    public: false
                    panoramic: false
                    mp4Support: true
                    tags:
                      - maths
                      - string theory
                      - video
                    metadata:
                      - key: Author
                        value: John Doe
                      - key: Format
                        value: Tutorial
                    publishedAt: '2019-12-16T08:25:51+00:00'
                    updatedAt: '2019-12-16T08:48:49+00:00'
                    discarded: false
                    discardedAt: null
                    deletesAt: null
                    source:
                      uri: /videos/vi4blUQJFrYWbaG44NChkH27/source
                    assets:
                      iframe: '<iframe src="https://embed.api.video/vod/vi4blUQJFrYWbaG44NChkH27" width="100%" height="100%" frameborder="0" scrolling="no" allowfullscreen=""></iframe>'
                      player: 'https://embed.api.video/vod/vi4blUQJFrYWbaG44NChkH27'
                      hls: 'https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/hls/manifest.m3u8'
                      thumbnail: 'https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/thumbnail.jpg'
                      mp4: 'https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/mp4/source.mp4'
        '400':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/bad-request'
              examples:
                Invalid attribute:
                  value:
                    type: 'https://docs.api.video/reference/invalid-attribute'
                    title: This attribute must be a ISO-8601 date.
                    name: scheduledAt
                    status: 400
                    problems:
                      - type: 'https://docs.api.video/reference/invalid-attribute'
                        title: This attribute must be a ISO-8601 date.
                        name: scheduledAt
                      - type: 'https://docs.api.video/reference/invalid-attribute'
                        title: This attribute must be an array.
                        name: tags
                      - type: 'https://docs.api.video/reference/invalid-attribute'
                        title: This attribute must be an array.
                        name: metadata
                Invalid language formatting:
                  description: This error occurs when the language tag you provided contains characters other than letters and dashes.
                  value:
                    type: https://docs.api.video/reference/invalid-attribute
                    title: An attribute is invalid.
                    status: 400
                    detail: The "language" attribute must contain only letters and dashes (for example "fr", "fr-BE").
                    name: language
                Invalid language:
                  description: This error occurs when the language tag you provided does not match any supported language.
                  value:
                    type: https://docs.api.video/reference/invalid-attribute
                    title: An attribute is invalid.
                    status: 400
                    detail: The "language" attribute is not valid.
                    name: language
        '404':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/not-found'
              examples:
                response:
                  value:
                    type: 'https://docs.api.video/reference/resource-not-found'
                    title: The requested resource was not found.
                    name: videoId
                    status: 404
        '409':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/conflict-error'
              examples:
                Summary already exists:
                  value:
                    type: https://docs.api.video/reference/summary-already-exists
                    title: A summary already exists or is being created on this video.
                    status: 409
                    detail: You can delete the existing summary and generate a new one.
                    name: transcriptSummary
        '429':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/too-many-requests'
              examples:
                Too many requests:
                  value:
                    type: 'https://docs.api.video/reference/too-many-requests'
                    title: Too many requests.
                    status: 429
      security:
        - apiKey: []
      x-client-action: update
      x-doctave:
        code-samples:
          - language: go
            code: |
              // First install the go client with "go get github.com/apivideo/api.video-go-client"
              // Documentation: https://github.com/apivideo/api.video-go-client/blob/main/docs/VideosApi.md#update

              package main

              import (
                  "context"
                  "fmt"
                  "os"
                  apivideosdk "github.com/apivideo/api.video-go-client"
              )

              func main() {
                  client := apivideosdk.ClientBuilder("YOUR_API_KEY").Build()
                  // if you rather like to use the sandbox environment:
                  // client := apivideosdk.SandboxClientBuilder("YOUR_SANDBOX_API_KEY").Build()
                      
                  videoId := "vi4k0jvEUuaTdRAEjQ4Jfrgz" // string | The video ID for the video you want to delete.
                  videoUpdatePayload := *apivideosdk.NewVideoUpdatePayload() // VideoUpdatePayload | 

                  
                  res, err := client.Videos.Update(videoId, videoUpdatePayload)

                  if err != nil {
                      fmt.Fprintf(os.Stderr, "Error when calling `Videos.Update``: %v\
              ", err)
                  }
                  // response from `Update`: Video
                  fmt.Fprintf(os.Stdout, "Response from `Videos.Update`: %v\
              ", res)
              }
          - language: node
            code: |
              // First install the "@api.video/nodejs-client" npm package
              // Documentation: https://github.com/apivideo/api.video-nodejs-client/blob/main/doc/api/VideosApi.md#update

              const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" });

              const videoId = 'vi4k0jvEUuaTdRAEjQ4Jfrgz'; // The video ID for the video you want to update.

              // define the value you want to update
              const videoUpdatePayload = {
                  playerId: "pl4k0jvEUuaTdRAEjQ4Jfrgz", // The unique ID for the player you want to associate with your video.
                  title: "title_example", // The title you want to use for your video.
                  description: "A film about good books.", // A brief description of the video.
                  _public: true, // Whether the video is publicly available or not. False means it is set to private.
                  panoramic: false, // Whether the video is a 360 degree or immersive video.
                  mp4Support: true, // Whether the player supports the mp4 format.
                  tags: ["maths", "string theory", "video"], // A list of terms or words you want to tag the video with. Make sure the list includes all the tags you want as whatever you send in this list will overwrite the existing list for the video.
                  metadata: [{"key": "Author", "value": "John Doe"}], // A list (array) of dictionaries where each dictionary contains a key value pair that describes the video. As with tags, you must send the complete list of metadata you want as whatever you send here will overwrite the existing metadata for the video.
              }; 


              const updatedVideo = await client.videos.update(videoId, videoUpdatePayload);
          - language: python
            code: |
              # First install the api client with "pip install api.video"
              # Documentation: https://github.com/apivideo/api.video-python-client/blob/main/docs/VideosApi.md#update

              import apivideo
              from apivideo.api import videos_api
              from apivideo.model.video_update_payload import VideoUpdatePayload
              from apivideo.model.bad_request import BadRequest
              from apivideo.model.not_found import NotFound
              from apivideo.model.video import Video
              from pprint import pprint

              # Enter a context with an instance of the API client
              with apivideo.AuthenticatedApiClient(__API_KEY__) as api_client:
                  # Create an instance of the API class
                  api_instance = videos_api.VideosApi(api_client)
                  video_id = "vi4k0jvEUuaTdRAEjQ4Jfrgz" # str | The video ID for the video you want to delete.
                  video_update_payload = VideoUpdatePayload(
                      player_id="pl4k0jvEUuaTdRAEjQ4Jfrgz",
                      title="title_example",
                      description="A film about good books.",
                      public=True,
                      panoramic=False,
                      mp4_support=True,
                      tags=["maths", "string theory", "video"],
                      metadata=[
                          Metadata(
                              key="Color",
                              value="Green",
                          ),
                      ],
                  ) # VideoUpdatePayload | 

                  # example passing only required values which don't have defaults set
                  try:
                      # Update a video
                      api_response = api_instance.update(video_id, video_update_payload)
                      pprint(api_response)
                  except apivideo.ApiException as e:
                      print("Exception when calling VideosApi->update: %s\
              " % e)              
          - language: java
            code: |
              // First add the "video.api:java-api-client" maven dependency to your project
              // Documentation: https://github.com/apivideo/api.video-java-client/blob/main/docs/VideosApi.md#update

              import video.api.client.ApiVideoClient;
              import video.api.client.api.ApiException;
              import video.api.client.api.models.*;
              import video.api.client.api.clients.VideosApi;
              import java.util.*;

              public class Example {
                public static void main(String[] args) {
                  ApiVideoClient client = new ApiVideoClient("YOUR_API_KEY");
                  // if you rather like to use the sandbox environment:
                  // ApiVideoClient client = new ApiVideoClient("YOUR_SANDBOX_API_KEY", ApiVideoClient.Environment.SANDBOX);

                  VideosApi apiInstance = client.videos();
                  
                  String videoId = "vi4k0jvEUuaTdRAEjQ4Jfrgz"; // The video ID for the video you want to delete.
                  VideoUpdatePayload videoUpdatePayload = new VideoUpdatePayload(); // 
                  videoUpdatePayload.setPlayerId("pl4k0jvEUuaTdRAEjQ4Jfrgz"); // The unique ID for the player you want to associate with your video.
                  videoUpdatePayload.setTitle("null"); // The title you want to use for your video.
                  videoUpdatePayload.setDescription("A film about good books."); // A brief description of the video.
                  videoUpdatePayload.setPublic(true); // Whether the video is publicly available or not. False means it is set to private.
                  videoUpdatePayload.setPanoramic(false); // Whether the video is a 360 degree or immersive video.
                  videoUpdatePayload.setMp4Support(true); // Whether the player supports the mp4 format.
                  videoUpdatePayload.setTags(Arrays.asList("maths", "string theory", "video")); // A list of terms or words you want to tag the video with. Make sure the list includes all the tags you want as whatever you send in this list will overwrite the existing list for the video.
                  videoUpdatePayload.setMetadata(Collections.<Metadata>emptyList()); // A list (array) of dictionaries where each dictionary contains a key value pair that describes the video. As with tags, you must send the complete list of metadata you want as whatever you send here will overwrite the existing metadata for the video.


                  try {
                    Video result = apiInstance.update(videoId, videoUpdatePayload);
                    System.out.println(result);
                  } catch (ApiException e) {
                    System.err.println("Exception when calling VideosApi#update");
                    System.err.println("Status code: " + e.getCode());
                    System.err.println("Reason: " + e.getMessage());
                    System.err.println("Response headers: " + e.getResponseHeaders());
                    e.printStackTrace();
                  }
                }
              }
          - language: csharp
            code: |
              // First add the "ApiVideo" NuGet package to your project
              // Documentation: https://github.com/apivideo/api.video-csharp-client/blob/main/docs/VideosApi.md#update

              using System.Diagnostics;
              using ApiVideo.Client;

              namespace Example
              {
                  public class updateExample
                  {
                      public static void Main()
                      {
                          var basePath = ApiVideoClient.Client.Environment.SANDBOX;
                          var apiKey = "YOUR_API_KEY";

                          var apiInstance = new ApiVideoClient(apiKey,basePath);

                          var videoId = vi4k0jvEUuaTdRAEjQ4Jfrgz;  // string | The video ID for the video you want to delete.
                          var videoUpdatePayload = new VideoUpdatePayload(); // VideoUpdatePayload | 
                          var apiVideosInstance = apiInstance.Videos();
                          try
                          {
                              // Update a video
                              Video result = apiVideosInstance.update(videoId, videoUpdatePayload);
                              Debug.WriteLine(result);
                          }
                          catch (ApiException  e)
                          {
                              Debug.Print("Exception when calling VideosApi.update: " + e.Message );
                              Debug.Print("Status Code: "+ e.ErrorCode);
                              Debug.Print(e.StackTrace);
                          }
                      }
                  }
              }
          - language: php
            code: |-
              <?php
              // First install the api client: "composer require api-video/php-api-client"
              // Documentation: https://github.com/apivideo/api.video-php-client/blob/main/docs/Api/VideosApi.md#update

              require __DIR__ . '/vendor/autoload.php';

              $client = new \ApiVideo\Client\Client(
                  'https://ws.api.video',
                  'YOUR_API_KEY',
                  new \Symfony\Component\HttpClient\Psr18Client()
              );

              $videoId = 'vi4k0jvEUuaTdRAEjQ4Jfrgz'; // The video ID for the video you want to update.

              $client->videos()->update($videoId, (new \ApiVideo\Client\Model\VideoUpdatePayload())
                  ->setPlayerId("pl4k0jvEUuaTdRAEjQ4Jfrgz") // The unique ID for the player you want to associate with your video.
                  ->setTitle("The new title") // The title you want to use for your video.
                  ->setDescription("A new description") // A brief description of the video.
                  ->setPublic(false) // Whether the video is publicly available or not. False means it is set to private.
                  ->setPanoramic(false) // Whether the video is a 360 degree or immersive video.
                  ->setMp4Support(true) // Whether the player supports the mp4 format.
                  ->setTags(["tag1", "tag2"]) // A list of terms or words you want to tag the video with. Make sure the list includes all the tags you want as whatever you send in this list will overwrite the existing list for the video.
                  ->setMetadata(array( // A list (array) of dictionaries where each dictionary contains a key value pair that describes the video. As with tags, you must send the complete list of metadata you want as whatever you send here will overwrite the existing metadata for the video.
                      new \ApiVideo\Client\Model\Metadata(["key" => "aa", 'value' => "bb"]),
                      new \ApiVideo\Client\Model\Metadata(["key" => "aa2", 'value' => "bb2"])))); 
          - language: swift
            code: |
              // First install the api client: https://github.com/apivideo/api.video-swift-client#getting-started
              // Documentation: https://github.com/apivideo/api.video-swift-client/blob/main/docs/VideosAPI.md#update  
  /discarded/videos:
    get:
      tags:
        - Videos
      summary: List all discarded video objects
      description: List all the video objects that are associated with the current workspace.
      x-client-description:
        default: 'This method returns a list of your discarded videos (with all their details). With no parameters added, the API returns the first page of all discarded videos. You can filter discarded videos using the parameters described below.'
      operationId: LIST-discarded-videos
      parameters:
        - name: title
          in: query
          description: The title of a specific video you want to find. The search will match exactly to what term you provide and return any videos that contain the same term as part of their titles.
          required: false
          style: form
          explode: true
          schema:
            type: string
          example: My Video.mp4
        - name: 'tags[]'
          in: query
          description: A tag is a category you create and apply to videos. You can search for videos with particular tags by listing one or more here. Only videos that have all the tags you list will be returned.
          required: false
          style: form
          explode: true
          schema:
            type: array
            items:
              type: string
          example: '["captions", "dialogue"]'
        - name: metadata
          in: query
          description: 'Videos can be tagged with metadata tags in key:value pairs. You can search for videos with specific key value pairs using this parameter.'
          required: false
          style: deepObject
          x-is-deep-object: true
          explode: true
          schema:
            type: object
            additionalProperties:
              type: string
          example: 'metadata[Author]=John Doe&metadata[Format]=Tutorial'
        - name: description
          in: query
          description: 'Retrieve video objects by `description`.'
          required: false
          style: form
          explode: true
          schema:
            type: string
          example: New Zealand
        - name: liveStreamId
          in: query
          description: 'Retrieve video objects that were recorded from a live stream by `liveStreamId`.'
          required: false
          style: form
          explode: true
          schema:
            type: string
          example: li400mYKSgQ6xs7taUeSaEKr
        - name: sortBy
          in: query
          description: 'Use this parameter to sort videos by the their created time, published time, updated time, or by title.'
          required: false
          style: form
          explode: true
          schema:
            type: string
            enum: [title, createdAt, publishedAt, updatedAt]
          example: publishedAt
        - name: sortOrder
          in: query
          description: 'Use this parameter to sort results. `asc` is ascending and sorts from A to Z. `desc` is descending and sorts from Z to A.'
          required: false
          style: form
          explode: true
          schema:
            type: string
            enum: [asc, desc]
          example: asc
        - $ref: '#/components/parameters/current-page'
        - $ref: '#/components/parameters/page-size'
      responses:
        '200':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/videos-list-response'
              examples:
                response:
                  value:
                    data:
                      - videoId: vi4blUQJFrYWbaG44NChkH27
                        playerId: pl45KFKdlddgk654dspkze
                        title: Maths video
                        description: An amazing video explaining the string theory
                        public: false
                        panoramic: false
                        mp4Support: true
                        tags:
                          - maths
                          - string theory
                          - video
                        metadata:
                          - key: Author
                            value: John Doe
                          - key: Format
                            value: Tutorial
                        publishedAt: '2019-12-16T08:25:51+00:00'
                        updatedAt: '2019-12-16T08:48:49+00:00'
                        discarded: true
                        discardedAt: '2024-10-16T08:48:49+00:00'
                        deletesAt: '2024-11-16T08:48:49+00:00'
                        source:
                          uri: /videos/c188ed58-3403-46a2-b91b-44603d10b2c9/source
                        assets:
                      - videoId: vi4blUQJFrYWbaG44NChkH27
                        title: Video Title
                        description: A description for your video.
                        public: false
                        panoramic: false
                        mp4Support: true
                        tags:
                          - books
                          - short stories
                        metadata:
                          - key: Author
                            value: John Doe
                          - key: Science Fiction
                            value: Cyberpunk
                          - key: Technology
                            value: Computers
                        publishedAt: '2019-12-16T08:25:51+00:00'
                        updatedAt: '2019-12-16T08:48:49+00:00'
                        discarded: true
                        discardedAt: '2024-10-16T08:48:49+00:00'
                        deletesAt: '2024-11-16T08:48:49+00:00'
                        source:
                          uri: /videos/vi4blUQJFrYWbaG44NChkH27/source
                        assets:
                      - videoId: vi4blUQJFrYWbaG44NChkH27
                        playerId: pl45KFKdlddgk654dspkze
                        title: My Video Title
                        description: A brief description of the video.
                        public: false
                        panoramic: false
                        mp4Support: true
                        tags:
                          - General
                          - Videos
                        metadata:
                          - key: Length
                            value: Short
                        publishedAt: '2019-12-16T08:25:51+00:00'
                        updatedAt: '2019-12-16T08:48:49+00:00'
                        discarded: true
                        discardedAt: '2024-10-16T08:48:49+00:00'
                        deletesAt: '2024-11-16T08:48:49+00:00'
                        source:
                          uri: /videos/vi4blUQJFrYWbaG44NChkH27/source
                        assets:
                    pagination:
                      currentPage: 1
                      pageSize: 25
                      pagesTotal: 1
                      itemsTotal: 11
                      currentPageItems: 11
                      links:
                        - rel: self
                          uri: 'https://ws.api.video/videos?currentPage=1'
                        - rel: first
                          uri: 'https://ws.api.video/videos?currentPage=1'
                        - rel: last
                          uri: 'https://ws.api.video/videos?currentPage=1'
        '400':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/bad-request'
              examples:
                response:
                  value:
                    title: This parameter is out of the allowed range of values.
                    name: page
                    status: 400
                    range:
                      min: 1
                    problems:
                      - title: This parameter is out of the allowed range of values.
                        name: page
                        range:
                          min: 1
                      - title: This parameter is out of the allowed range of values.
                        name: pageSize
                        range:
                          min: 10
                          max: 100
        '429':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/too-many-requests'
              examples:
                Too many requests:
                  value:
                    type: 'https://docs.api.video/reference/too-many-requests'
                    title: Too many requests.
                    status: 429
      security:
        - apiKey: []
      x-client-action: listDiscarded
      x-group-parameters: true
      x-client-paginated: true
      x-optional-object: true
  '/discarded/videos/{videoId}':
    get:
      tags:
        - Videos
      summary: Retrieve a discarded video object
      description: Retrieve the video details of a discarded video object by video id.
      x-client-description:
        default: 'This call provides the same information provided on video creation. For private videos, it will generate a unique token url. Use this to retrieve any details you need about a video, or set up a private viewing URL.'
      operationId: GET-discarded-video
      parameters:
        - name: videoId
          in: path
          description: The unique identifier for the video you want details about.
          required: true
          style: simple
          explode: false
          schema:
            type: string
      responses:
        '200':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Success
          content:
            application/json:
              schema:
                type: object
                $ref: '#/components/schemas/video'
              examples:
                response:
                  value:
                    videoId: vi4blUQJFrYWbaG44NChkH27
                    playerId: pl45KFKdlddgk654dspkze
                    title: Maths video
                    description: An amazing video explaining string theory
                    public: false
                    panoramic: false
                    mp4Support: true
                    tags:
                      - maths
                      - string theory
                      - video
                    metadata:
                      - key: Author
                        value: John Doe
                      - key: Format
                        value: Tutorial
                    publishedAt: '2019-12-16T08:25:51+00:00'
                    updatedAt: '2019-12-16T08:48:49+00:00'
                    discarded: true
                    discardedAt: '2024-10-16T08:48:49+00:00'
                    deletesAt: '2024-11-16T08:48:49+00:00'
                    source:
                      uri: /videos/vi4blUQJFrYWbaG44NChkH27/source
                    assets:
        '404':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/not-found'
              examples:
                response:
                  value:
                    type: 'https://docs.api.video/reference/resource-not-found'
                    title: The requested resource was not found.
                    name: videoId
                    status: 404
        '429':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/too-many-requests'
              examples:
                Too many requests:
                  value:
                    type: 'https://docs.api.video/reference/too-many-requests'
                    title: Too many requests.
                    status: 429
      security:
        - apiKey: []
      x-client-action: getDiscarded
    patch:
      tags:
        - Videos
      summary: Update a discarded video object
      description: Restore a discarded video
      x-client-description:
        default: |
          Use this endpoint to restore a discarded video when you have the Video Restore feature enabled.
      operationId: PATCH-discarded-video
      parameters:
        - name: videoId
          in: path
          description: The video ID for the video you want to restore.
          required: true
          style: simple
          explode: false
          schema:
            type: string
          example: vi4k0jvEUuaTdRAEjQ4Jfrgz
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/discarded-video-update-payload'
      responses:
        '200':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/video'
              examples:
                response:
                  value:
                    videoId: vi4blUQJFrYWbaG44NChkH27
                    playerId: pl45KFKdlddgk654dspkze
                    title: Maths video
                    description: An amazing video explaining the string theory
                    public: false
                    panoramic: false
                    mp4Support: true
                    tags:
                      - maths
                      - string theory
                      - video
                    metadata:
                      - key: Author
                        value: John Doe
                      - key: Format
                        value: Tutorial
                    publishedAt: '2019-12-16T08:25:51+00:00'
                    updatedAt: '2019-12-16T08:48:49+00:00'
                    discarded: true
                    discardedAt: '2024-10-16T08:48:49+00:00'
                    deletesAt: '2024-11-16T08:48:49+00:00'
                    source:
                      uri: /videos/vi4blUQJFrYWbaG44NChkH27/source
                    assets:
        '400':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/bad-request'
              examples:
                response:
                  value:
                    type: 'https://docs.api.video/reference/invalid-attribute'
                    title: An attribute is invalid.
                    detail: Value must be false.
                    name: discarded
                    status: 400
        '404':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/not-found'
              examples:
                response:
                  value:
                    type: 'https://docs.api.video/reference/resource-not-found'
                    title: The requested resource was not found.
                    name: videoId
                    status: 404
        '429':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/too-many-requests'
              examples:
                Too many requests:
                  value:
                    type: 'https://docs.api.video/reference/too-many-requests'
                    title: Too many requests.
                    status: 429
      security:
        - apiKey: []
      x-client-action: updateDiscarded
      x-doctave:
        code-samples:
          - language: go
            code: |
              // First install the go client with "go get github.com/apivideo/api.video-go-client"
              // Documentation: https://github.com/apivideo/api.video-go-client/blob/main/docs/VideosApi.md#update

              package main

              import (
                  "context"
                  "fmt"
                  "os"
                  apivideosdk "github.com/apivideo/api.video-go-client"
              )

              func main() {
                  client := apivideosdk.ClientBuilder("YOUR_API_KEY").Build()
                  // if you rather like to use the sandbox environment:
                  // client := apivideosdk.SandboxClientBuilder("YOUR_SANDBOX_API_KEY").Build()
                      
                  videoId := "vi4k0jvEUuaTdRAEjQ4Jfrgz" // string | The video ID for the video you want to delete.
                  videoUpdatePayload := *apivideosdk.NewVideoUpdatePayload() // VideoUpdatePayload | 

                  
                  res, err := client.Videos.Update(videoId, videoUpdatePayload)

                  if err != nil {
                      fmt.Fprintf(os.Stderr, "Error when calling `Videos.Update``: %v\
              ", err)
                  }
                  // response from `Update`: Video
                  fmt.Fprintf(os.Stdout, "Response from `Videos.Update`: %v\
              ", res)
              }
          - language: node
            code: |
              // First install the "@api.video/nodejs-client" npm package
              // Documentation: https://github.com/apivideo/api.video-nodejs-client/blob/main/doc/api/VideosApi.md#update

              const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" });

              const videoId = 'vi4k0jvEUuaTdRAEjQ4Jfrgz'; // The video ID for the video you want to update.

              // define the value you want to update
              const videoUpdatePayload = {
                  playerId: "pl4k0jvEUuaTdRAEjQ4Jfrgz", // The unique ID for the player you want to associate with your video.
                  title: "title_example", // The title you want to use for your video.
                  description: "A film about good books.", // A brief description of the video.
                  _public: true, // Whether the video is publicly available or not. False means it is set to private.
                  panoramic: false, // Whether the video is a 360 degree or immersive video.
                  mp4Support: true, // Whether the player supports the mp4 format.
                  tags: ["maths", "string theory", "video"], // A list of terms or words you want to tag the video with. Make sure the list includes all the tags you want as whatever you send in this list will overwrite the existing list for the video.
                  metadata: [{"key": "Author", "value": "John Doe"}], // A list (array) of dictionaries where each dictionary contains a key value pair that describes the video. As with tags, you must send the complete list of metadata you want as whatever you send here will overwrite the existing metadata for the video.
              }; 


              const updatedVideo = await client.videos.update(videoId, videoUpdatePayload);
          - language: python
            code: |
              # First install the api client with "pip install api.video"
              # Documentation: https://github.com/apivideo/api.video-python-client/blob/main/docs/VideosApi.md#update

              import apivideo
              from apivideo.api import videos_api
              from apivideo.model.video_update_payload import VideoUpdatePayload
              from apivideo.model.bad_request import BadRequest
              from apivideo.model.not_found import NotFound
              from apivideo.model.video import Video
              from pprint import pprint

              # Enter a context with an instance of the API client
              with apivideo.AuthenticatedApiClient(__API_KEY__) as api_client:
                  # Create an instance of the API class
                  api_instance = videos_api.VideosApi(api_client)
                  video_id = "vi4k0jvEUuaTdRAEjQ4Jfrgz" # str | The video ID for the video you want to delete.
                  video_update_payload = VideoUpdatePayload(
                      player_id="pl4k0jvEUuaTdRAEjQ4Jfrgz",
                      title="title_example",
                      description="A film about good books.",
                      public=True,
                      panoramic=False,
                      mp4_support=True,
                      tags=["maths", "string theory", "video"],
                      metadata=[
                          Metadata(
                              key="Color",
                              value="Green",
                          ),
                      ],
                  ) # VideoUpdatePayload | 

                  # example passing only required values which don't have defaults set
                  try:
                      # Update a video
                      api_response = api_instance.update(video_id, video_update_payload)
                      pprint(api_response)
                  except apivideo.ApiException as e:
                      print("Exception when calling VideosApi->update: %s\
              " % e)              
          - language: java
            code: |
              // First add the "video.api:java-api-client" maven dependency to your project
              // Documentation: https://github.com/apivideo/api.video-java-client/blob/main/docs/VideosApi.md#update

              import video.api.client.ApiVideoClient;
              import video.api.client.api.ApiException;
              import video.api.client.api.models.*;
              import video.api.client.api.clients.VideosApi;
              import java.util.*;

              public class Example {
                public static void main(String[] args) {
                  ApiVideoClient client = new ApiVideoClient("YOUR_API_KEY");
                  // if you rather like to use the sandbox environment:
                  // ApiVideoClient client = new ApiVideoClient("YOUR_SANDBOX_API_KEY", ApiVideoClient.Environment.SANDBOX);

                  VideosApi apiInstance = client.videos();
                  
                  String videoId = "vi4k0jvEUuaTdRAEjQ4Jfrgz"; // The video ID for the video you want to delete.
                  VideoUpdatePayload videoUpdatePayload = new VideoUpdatePayload(); // 
                  videoUpdatePayload.setPlayerId("pl4k0jvEUuaTdRAEjQ4Jfrgz"); // The unique ID for the player you want to associate with your video.
                  videoUpdatePayload.setTitle("null"); // The title you want to use for your video.
                  videoUpdatePayload.setDescription("A film about good books."); // A brief description of the video.
                  videoUpdatePayload.setPublic(true); // Whether the video is publicly available or not. False means it is set to private.
                  videoUpdatePayload.setPanoramic(false); // Whether the video is a 360 degree or immersive video.
                  videoUpdatePayload.setMp4Support(true); // Whether the player supports the mp4 format.
                  videoUpdatePayload.setTags(Arrays.asList("maths", "string theory", "video")); // A list of terms or words you want to tag the video with. Make sure the list includes all the tags you want as whatever you send in this list will overwrite the existing list for the video.
                  videoUpdatePayload.setMetadata(Collections.<Metadata>emptyList()); // A list (array) of dictionaries where each dictionary contains a key value pair that describes the video. As with tags, you must send the complete list of metadata you want as whatever you send here will overwrite the existing metadata for the video.


                  try {
                    Video result = apiInstance.update(videoId, videoUpdatePayload);
                    System.out.println(result);
                  } catch (ApiException e) {
                    System.err.println("Exception when calling VideosApi#update");
                    System.err.println("Status code: " + e.getCode());
                    System.err.println("Reason: " + e.getMessage());
                    System.err.println("Response headers: " + e.getResponseHeaders());
                    e.printStackTrace();
                  }
                }
              }
          - language: csharp
            code: |
              // First add the "ApiVideo" NuGet package to your project
              // Documentation: https://github.com/apivideo/api.video-csharp-client/blob/main/docs/VideosApi.md#update

              using System.Diagnostics;
              using ApiVideo.Client;

              namespace Example
              {
                  public class updateExample
                  {
                      public static void Main()
                      {
                          var basePath = ApiVideoClient.Client.Environment.SANDBOX;
                          var apiKey = "YOUR_API_KEY";

                          var apiInstance = new ApiVideoClient(apiKey,basePath);

                          var videoId = vi4k0jvEUuaTdRAEjQ4Jfrgz;  // string | The video ID for the video you want to delete.
                          var videoUpdatePayload = new VideoUpdatePayload(); // VideoUpdatePayload | 
                          var apiVideosInstance = apiInstance.Videos();
                          try
                          {
                              // Update a video
                              Video result = apiVideosInstance.update(videoId, videoUpdatePayload);
                              Debug.WriteLine(result);
                          }
                          catch (ApiException  e)
                          {
                              Debug.Print("Exception when calling VideosApi.update: " + e.Message );
                              Debug.Print("Status Code: "+ e.ErrorCode);
                              Debug.Print(e.StackTrace);
                          }
                      }
                  }
              }
          - language: php
            code: |-
              <?php
              // First install the api client: "composer require api-video/php-api-client"
              // Documentation: https://github.com/apivideo/api.video-php-client/blob/main/docs/Api/VideosApi.md#update

              require __DIR__ . '/vendor/autoload.php';

              $client = new \ApiVideo\Client\Client(
                  'https://ws.api.video',
                  'YOUR_API_KEY',
                  new \Symfony\Component\HttpClient\Psr18Client()
              );

              $videoId = 'vi4k0jvEUuaTdRAEjQ4Jfrgz'; // The video ID for the video you want to update.

              $client->videos()->update($videoId, (new \ApiVideo\Client\Model\VideoUpdatePayload())
                  ->setPlayerId("pl4k0jvEUuaTdRAEjQ4Jfrgz") // The unique ID for the player you want to associate with your video.
                  ->setTitle("The new title") // The title you want to use for your video.
                  ->setDescription("A new description") // A brief description of the video.
                  ->setPublic(false) // Whether the video is publicly available or not. False means it is set to private.
                  ->setPanoramic(false) // Whether the video is a 360 degree or immersive video.
                  ->setMp4Support(true) // Whether the player supports the mp4 format.
                  ->setTags(["tag1", "tag2"]) // A list of terms or words you want to tag the video with. Make sure the list includes all the tags you want as whatever you send in this list will overwrite the existing list for the video.
                  ->setMetadata(array( // A list (array) of dictionaries where each dictionary contains a key value pair that describes the video. As with tags, you must send the complete list of metadata you want as whatever you send here will overwrite the existing metadata for the video.
                      new \ApiVideo\Client\Model\Metadata(["key" => "aa", 'value' => "bb"]),
                      new \ApiVideo\Client\Model\Metadata(["key" => "aa2", 'value' => "bb2"])))); 
          - language: swift
            code: |
              // First install the api client: https://github.com/apivideo/api.video-swift-client#getting-started
              // Documentation: https://github.com/apivideo/api.video-swift-client/blob/main/docs/VideosAPI.md#update
  '/videos/{videoId}/status':
    get:
      tags:
        - Videos
      summary: Retrieve video status and details
      description: 'Retrieve upload status and encoding status to determine when the video is uploaded or ready to playback. Once encoding is completed, the response also lists the available stream qualities.'
      x-client-description:
        default: 'This method provides upload status & encoding status to determine when the video is uploaded or ready to playback. Once encoding is completed, the response also lists the available stream qualities.'
      operationId: GET-video-status
      parameters:
        - name: videoId
          in: path
          description: The unique identifier for the video you want the status for.
          required: true
          style: simple
          explode: false
          schema:
            type: string
          example: vi4k0jvEUuaTdRAEjQ4Jfrgz
      responses:
        '200':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/video-status'
              examples:
                response:
                  value:
                    ingest:
                      status: uploaded
                      filesize: 273579401
                      receivedBytes:
                        - to: 134217727
                          from: 0
                          total: 273579401
                        - to: 268435455
                          from: 134217728
                          total: 273579401
                        - to: 273579400
                          from: 268435456
                          total: 273579401
                    encoding:
                      playable: true
                      qualities:
                        - quality: 360p
                          status: encoded
                        - quality: 480p
                          status: encoded
                        - quality: 720p
                          status: encoded
                        - quality: 1080p
                          status: encoding
                        - quality: 2160p
                          status: waiting
                      metadata:
                        width: 424
                        height: 240
                        bitrate: 411.218
                        duration: 4176
                        framerate: 24
                        samplerate: 48000
                        videoCodec: h264
                        audioCodec: aac
                        aspectRatio: 16/9
        '404':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/not-found'
              examples:
                response:
                  value:
                    type: 'https://docs.api.video/reference/resource-not-found'
                    title: The requested resource was not found.
                    name: videoId
                    status: 404
        '429':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/too-many-requests'
              examples:
                Too many requests:
                  value:
                    type: 'https://docs.api.video/reference/too-many-requests'
                    title: Too many requests.
                    status: 429
      security:
        - apiKey: []
      x-client-action: getStatus
      x-doctave:
        code-samples:
          - language: go
            code: |
              // First install the go client with "go get github.com/apivideo/api.video-go-client"
              // Documentation: https://github.com/apivideo/api.video-go-client/blob/main/docs/VideosApi.md#getStatus

               package main

              import (
                  "context"
                  "fmt"
                  "os"
                  apivideosdk "github.com/apivideo/api.video-go-client"
              )

              func main() {
                  client := apivideosdk.ClientBuilder("YOUR_API_KEY").Build()
                  // if you rather like to use the sandbox environment:
                  // client := apivideosdk.SandboxClientBuilder("YOUR_SANDBOX_API_KEY").Build()
                      
                  videoId := "vi4k0jvEUuaTdRAEjQ4Jfrgz" // string | The unique identifier for the video you want the status for.

                  
                  res, err := client.Videos.GetStatus(videoId)

                  if err != nil {
                      fmt.Fprintf(os.Stderr, "Error when calling `Videos.GetStatus``: %v\
              ", err)
                  }
                  // response from `GetStatus`: VideoStatus
                  fmt.Fprintf(os.Stdout, "Response from `Videos.GetStatus`: %v\
              ", res)
              }             
          - language: node
            code: |
              // First install the "@api.video/nodejs-client" npm package
              // Documentation: https://github.com/apivideo/api.video-nodejs-client/blob/main/doc/api/VideosApi.md#getStatus

              const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" });

              const videoId = 'vi4k0jvEUuaTdRAEjQ4Jfrgz'; // The unique identifier for the video you want the status for.
              const result = await client.videos.getStatus(videoId); 
          - language: python
            code: |
              # First install the api client with "pip install api.video"
              # Documentation: https://github.com/apivideo/api.video-python-client/blob/main/docs/VideosApi.md#getStatus

              import apivideo
              from apivideo.api import videos_api
              from apivideo.model.video_status import VideoStatus
              from apivideo.model.not_found import NotFound
              from pprint import pprint

              # Enter a context with an instance of the API client
              with apivideo.AuthenticatedApiClient(__API_KEY__) as api_client:
                  # Create an instance of the API class
                  api_instance = videos_api.VideosApi(api_client)
                  video_id = "vi4k0jvEUuaTdRAEjQ4Jfrgz" # str | The unique identifier for the video you want the status for.

                  # example passing only required values which don't have defaults set
                  try:
                      # Show video status
                      api_response = api_instance.get_status(video_id)
                      pprint(api_response)
                  except apivideo.ApiException as e:
                      print("Exception when calling VideosApi->get_status: %s\n" % e)
          - language: java
            code: |
              // First add the "video.api:java-api-client" maven dependency to your project
              // Documentation: https://github.com/apivideo/api.video-java-client/blob/main/docs/VideosApi.md#getStatus

              import video.api.client.ApiVideoClient;
              import video.api.client.api.ApiException;
              import video.api.client.api.models.*;
              import video.api.client.api.clients.VideosApi;
              import java.util.*;

              public class Example {
                public static void main(String[] args) {
                  ApiVideoClient client = new ApiVideoClient("YOUR_API_KEY");
                  // if you rather like to use the sandbox environment:
                  // ApiVideoClient client = new ApiVideoClient("YOUR_SANDBOX_API_KEY", ApiVideoClient.Environment.SANDBOX);

                  VideosApi apiInstance = client.videos();
                  
                  String videoId = "vi4k0jvEUuaTdRAEjQ4Jfrgz"; // The unique identifier for the video you want the status for.

                  try {
                    VideoStatus result = apiInstance.getStatus(videoId);
                    System.out.println(result);
                  } catch (ApiException e) {
                    System.err.println("Exception when calling VideosApi#getStatus");
                    System.err.println("Status code: " + e.getCode());
                    System.err.println("Reason: " + e.getMessage());
                    System.err.println("Response headers: " + e.getResponseHeaders());
                    e.printStackTrace();
                  }
                }
              }
          - language: csharp
            code: |
              // First add the "ApiVideo" NuGet package to your project
              // Documentation: https://github.com/apivideo/api.video-csharp-client/blob/main/docs/VideosApi.md#getStatus

              using System.Diagnostics;
              using ApiVideo.Client;

              namespace Example
              {
                  public class getStatusExample
                  {
                      public static void Main()
                      {
                          var basePath = ApiVideoClient.Client.Environment.SANDBOX;
                          var apiKey = "YOUR_API_KEY";

                          var apiInstance = new ApiVideoClient(apiKey,basePath);

                          var videoId = vi4k0jvEUuaTdRAEjQ4Jfrgz;  // string | The unique identifier for the video you want the status for.
                          var apiVideosInstance = apiInstance.Videos();
                          try
                          {
                              // Show video status
                              VideoStatus result = apiVideosInstance.getStatus(videoId);
                              Debug.WriteLine(result);
                          }
                          catch (ApiException  e)
                          {
                              Debug.Print("Exception when calling VideosApi.getStatus: " + e.Message );
                              Debug.Print("Status Code: "+ e.ErrorCode);
                              Debug.Print(e.StackTrace);
                          }
                      }
                  }
              }
          - language: php
            code: |-
              <?php
              // First install the api client: "composer require api-video/php-api-client"
              // Documentation: https://github.com/apivideo/api.video-php-client/blob/main/docs/Api/VideosApi.md#getStatus

              require __DIR__ . '/vendor/autoload.php';

              $client = new \ApiVideo\Client\Client(
                  'https://ws.api.video',
                  'YOUR_API_KEY',
                  new \Symfony\Component\HttpClient\Psr18Client()
              );

              $videoId = 'vi4k0jvEUuaTdRAEjQ4Jfrgz'; // The unique identifier for the video you want the status for.
              $videoStatus = $client->videos()->getStatus($videoId);  
          - language: swift
            code: |
              // First install the api client: https://github.com/apivideo/api.video-swift-client#getting-started
              // Documentation: https://github.com/apivideo/api.video-swift-client/blob/main/docs/VideosAPI.md#getStatus
  /upload-tokens:
    get:
      tags:
        - Upload Tokens
      summary: List all active upload tokens
      description: Retrieve a list of all currently active delegated tokens.
      operationId: GET_upload-tokens
      parameters:
        - name: sortBy
          in: query
          description: 'Allowed: createdAt, ttl. You can use these to sort by when a token was created, or how much longer the token will be active (ttl - time to live). Date and time is presented in ATOM UTC format.'
          required: false
          style: form
          explode: true
          schema:
            type: string
            enum:
              - createdAt
              - ttl
          example: ttl
        - name: sortOrder
          in: query
          description: 'Allowed: asc, desc. Ascending is 0-9 or A-Z. Descending is 9-0 or Z-A.'
          required: false
          style: form
          explode: true
          schema:
            type: string
            enum:
              - asc
              - desc
          example: asc
        - $ref: '#/components/parameters/current-page'
        - $ref: '#/components/parameters/page-size'
      responses:
        '200':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/token-list-response'
              examples:
                response:
                  value:
                    data:
                      - token: to37YfoPDRR2pcDKa6LsUE0M
                        ttl: 3600
                        createdAt: '2020-12-02T10:26:46+00:00'
                        expiresAt: '2020-12-02T11:26:46+00:00'
                      - token: to1W3ZS9PdUBZWzzTEZr1B79
                        ttl: 0
                        createdAt: '2020-12-02T10:26:28+00:00'
                    pagination:
                      currentPage: 1
                      currentPageItems: 2
                      pageSize: 25
                      pagesTotal: 1
                      itemsTotal: 2
                      links:
                        - rel: self
                          uri: /upload-tokens?currentPage=1&pageSize=25
                        - rel: first
                          uri: /upload-tokens?currentPage=1&pageSize=25
                        - rel: last
                          uri: /upload-tokens?currentPage=1&pageSize=25
        '429':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/too-many-requests'
              examples:
                Too many requests:
                  value:
                    type: 'https://docs.api.video/reference/too-many-requests'
                    title: Too many requests.
                    status: 429
      security:
        - apiKey: []
      x-group-parameters: true
      x-client-paginated: true
      x-optional-object: true
      x-client-action: list
      x-doctave:
        code-samples:
          - language: go
            code: |
              // First install the go client with "go get github.com/apivideo/api.video-go-client"
              // Documentation: https://github.com/apivideo/api.video-go-client/blob/main/docs/UploadTokensApi.md#list

              package main
              import (
                  "context"
                  "fmt"
                  "os"
                  apivideosdk "github.com/apivideo/api.video-go-client"
              )

              func main() {
                  client := apivideosdk.ClientBuilder("YOUR_API_KEY").Build()
                  // if you rather like to use the sandbox environment:
                  // client := apivideosdk.SandboxClientBuilder("YOUR_SANDBOX_API_KEY").Build()
                      
                  uploadToken := "to1tcmSFHeYY5KzyhOqVKMKb" // string | The unique identifier for the token you want information about.

                  
                  res, err := client.UploadTokens.GetToken(uploadToken)

                  if err != nil {
                      fmt.Fprintf(os.Stderr, "Error when calling `UploadTokens.GetToken``: %v\
              ", err)
                  }
                  // response from `GetToken`: UploadToken
                  fmt.Fprintf(os.Stdout, "Response from `UploadTokens.GetToken`: %v\
              ", res)
              }
          - language: node
            code: |
              // First install the "@api.video/nodejs-client" npm package
              // Documentation: https://github.com/apivideo/api.video-nodejs-client/blob/main/doc/api/UploadTokensApi.md#list

              const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" }); 
               
              const uploadTokens = await client.uploadTokens.list();
                      
          - language: python
            code: |
              # First install the api client with "pip install api.video"
              # Documentation: https://github.com/apivideo/api.video-python-client/blob/main/docs/UploadTokensApi.md#list

              import apivideo
              from apivideo.api import upload_tokens_api
              from apivideo.model.not_found import NotFound
              from apivideo.model.upload_token import UploadToken
              from pprint import pprint

              # Enter a context with an instance of the API client
              with apivideo.AuthenticatedApiClient(__API_KEY__) as api_client:
                  # Create an instance of the API class
                  api_instance = upload_tokens_api.UploadTokensApi(api_client)
                  upload_token = "to1tcmSFHeYY5KzyhOqVKMKb" # str | The unique identifier for the token you want information about.

                  # example passing only required values which don't have defaults set
                  try:
                      # Show upload token
                      api_response = api_instance.get_token(upload_token)
                      pprint(api_response)
                  except apivideo.ApiException as e:
                      print("Exception when calling UploadTokensApi->get_token: %s\n" % e)
          - language: java
            code: |
              // First add the "video.api:java-api-client" maven dependency to your project
              // Documentation: https://github.com/apivideo/api.video-java-client/blob/main/docs/UploadTokensApi.md#list

              import video.api.client.ApiVideoClient;
              import video.api.client.api.ApiException;
              import video.api.client.api.models.*;
              import video.api.client.api.clients.UploadTokensApi;
              import java.util.*;

              public class Example {
                public static void main(String[] args) {
                  ApiVideoClient client = new ApiVideoClient("YOUR_API_KEY");
                  // if you rather like to use the sandbox environment:
                  // ApiVideoClient client = new ApiVideoClient("YOUR_SANDBOX_API_KEY", ApiVideoClient.Environment.SANDBOX);

                  UploadTokensApi apiInstance = client.uploadTokens();
                  
                  String uploadToken = "to1tcmSFHeYY5KzyhOqVKMKb"; // The unique identifier for the token you want information about.

                  try {
                    UploadToken result = apiInstance.getToken(uploadToken);
                    System.out.println(result);
                  } catch (ApiException e) {
                    System.err.println("Exception when calling UploadTokensApi#getToken");
                    System.err.println("Status code: " + e.getCode());
                    System.err.println("Reason: " + e.getMessage());
                    System.err.println("Response headers: " + e.getResponseHeaders());
                    e.printStackTrace();
                  }
                }
              }
          - language: csharp
            code: |
              // First add the "ApiVideo" NuGet package to your project
              // Documentation: https://github.com/apivideo/api.video-csharp-client/blob/main/docs/UploadTokensApi.md#list

              import video.api.client.ApiVideoClient;
              import video.api.client.api.ApiException;
              import video.api.client.api.models.*;
              import video.api.client.api.clients.UploadTokensApi;
              import java.util.*;

              public class Example {
                public static void main(String[] args) {
                  ApiVideoClient client = new ApiVideoClient("YOUR_API_KEY");
                  // if you rather like to use the sandbox environment:
                  // ApiVideoClient client = new ApiVideoClient("YOUR_SANDBOX_API_KEY", ApiVideoClient.Environment.SANDBOX);

                  UploadTokensApi apiInstance = client.uploadTokens();
                  
                  String uploadToken = "to1tcmSFHeYY5KzyhOqVKMKb"; // The unique identifier for the token you want information about.

                  try {
                    UploadToken result = apiInstance.getToken(uploadToken);
                    System.out.println(result);
                  } catch (ApiException e) {
                    System.err.println("Exception when calling UploadTokensApi#getToken");
                    System.err.println("Status code: " + e.getCode());
                    System.err.println("Reason: " + e.getMessage());
                    System.err.println("Response headers: " + e.getResponseHeaders());
                    e.printStackTrace();
                  }
                }
              }
          - language: csharp
            code: |
              // First add the "ApiVideo" NuGet package to your project
              // Documentation: https://github.com/apivideo/api.video-csharp-client/blob/main/docs/UploadTokensApi.md#list

              using System.Diagnostics;
              using ApiVideo.Client;

              namespace Example
              {
                  public class getTokenExample
                  {
                      public static void Main()
                      {
                          var basePath = ApiVideoClient.Client.Environment.SANDBOX;
                          var apiKey = "YOUR_API_KEY";

                          var apiInstance = new ApiVideoClient(apiKey,basePath);

                          var uploadToken = to1tcmSFHeYY5KzyhOqVKMKb;  // string | The unique identifier for the token you want information about.
                          var apiUploadTokensInstance = apiInstance.UploadTokens();
                          try
                          {
                              // Show upload token
                              UploadToken result = apiUploadTokensInstance.getToken(uploadToken);
                              Debug.WriteLine(result);
                          }
                          catch (ApiException  e)
                          {
                              Debug.Print("Exception when calling UploadTokensApi.getToken: " + e.Message );
                              Debug.Print("Status Code: "+ e.ErrorCode);
                              Debug.Print(e.StackTrace);
                          }
                      }
                  }
              }
          - language: php
            code: |-
              <?php
              // First install the api client: "composer require api-video/php-api-client"
              // Documentation: https://github.com/apivideo/api.video-php-client/blob/main/docs/Api/UploadTokensApi.md#list

              require __DIR__ . '/vendor/autoload.php';

              $client = new \ApiVideo\Client\Client(
                  'https://ws.api.video',
                  'YOUR_API_KEY',
                  new \Symfony\Component\HttpClient\Psr18Client()
              ); 

              $uploadTokens = $client->uploadTokens()->list(); 
          - language: swift
            code: |
              // First install the api client: https://github.com/apivideo/api.video-swift-client#getting-started
              // Documentation: https://github.com/apivideo/api.video-swift-client/blob/main/docs/UploadTokensAPI.md#list
    post:
      tags:
        - Upload Tokens
      summary: Generate an upload token
      description: 'Generates an upload token that can be used to replace the API Key. More information can be found [here](https://docs.api.video/vod/delegated-upload-tokens)'
      operationId: POST_upload-tokens
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/token-creation-payload'
      responses:
        '200':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/upload-token'
              examples:
                response:
                  value:
                    token: to1tcmSFHeYY5KzyhOqVKMKb
                    ttl: 3600
                    createdAt: '2020-12-02T10:13:19+00:00'
                    expiresAt: '2020-12-02T11:13:19+00:00'
        '400':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/bad-request'
        '429':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/too-many-requests'
              examples:
                Too many requests:
                  value:
                    type: 'https://docs.api.video/reference/too-many-requests'
                    title: Too many requests.
                    status: 429
      security:
        - apiKey: []
      x-client-action: createToken
      x-doctave:
        code-samples:
          - language: go
            code: |
              // First install the go client with "go get github.com/apivideo/api.video-go-client"
              // Documentation: https://github.com/apivideo/api.video-go-client/blob/main/docs/UploadTokensApi.md#createToken

              package main

              import (
                  "context"
                  "fmt"
                  "os"
                  apivideosdk "github.com/apivideo/api.video-go-client"
              )

              func main() {
                  client := apivideosdk.ClientBuilder("YOUR_API_KEY").Build()
                  // if you rather like to use the sandbox environment:
                  // client := apivideosdk.SandboxClientBuilder("YOUR_SANDBOX_API_KEY").Build()
                      
                  tokenCreationPayload := *apivideosdk.NewTokenCreationPayload() // TokenCreationPayload | 

                  
                  res, err := client.UploadTokens.CreateToken(tokenCreationPayload)

                  if err != nil {
                      fmt.Fprintf(os.Stderr, "Error when calling `UploadTokens.CreateToken``: %v\
              ", err)
                  }
                  // response from `CreateToken`: UploadToken
                  fmt.Fprintf(os.Stdout, "Response from `UploadTokens.CreateToken`: %v\
              ", res)
              }
          - language: node
            code: |
              // First install the "@api.video/nodejs-client" npm package
              // Documentation: https://github.com/apivideo/api.video-nodejs-client/blob/main/doc/api/UploadTokensApi.md#createToken

              const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" }); 

              const tokenCreationPayload = {
                ttl: 56, // Time in seconds that the token will be active. A value of 0 means that the token has no expiration date. The default is to have no expiration.
              }; 

              const uploadToken = await client.uploadTokens.createToken(tokenCreationPayload);
          - language: python
            code: |
              # First install the api client with "pip install api.video"
              # Documentation: https://github.com/apivideo/api.video-python-client/blob/main/docs/UploadTokensApi.md#createToken

              import apivideo
              from apivideo.api import upload_tokens_api
              from apivideo.model.bad_request import BadRequest
              from apivideo.model.upload_token import UploadToken
              from apivideo.model.token_creation_payload import TokenCreationPayload
              from pprint import pprint

              # Enter a context with an instance of the API client
              with apivideo.AuthenticatedApiClient(__API_KEY__) as api_client:
                  # Create an instance of the API class
                  api_instance = upload_tokens_api.UploadTokensApi(api_client)
                  token_creation_payload = TokenCreationPayload(
                      ttl=0,
                  ) # TokenCreationPayload | 

                  # example passing only required values which don't have defaults set
                  try:
                      # Generate an upload token
                      api_response = api_instance.create_token(token_creation_payload)
                      pprint(api_response)
                  except apivideo.ApiException as e:
                      print("Exception when calling UploadTokensApi->create_token: %s\
              " % e)
          - language: java
            code: |
              // First add the "video.api:java-api-client" maven dependency to your project
              // Documentation: https://github.com/apivideo/api.video-java-client/blob/main/docs/UploadTokensApi.md#createToken

              import video.api.client.ApiVideoClient;
              import video.api.client.api.ApiException;
              import video.api.client.api.models.*;
              import video.api.client.api.clients.UploadTokensApi;
              import java.util.*;

              public class Example {
                public static void main(String[] args) {
                  ApiVideoClient client = new ApiVideoClient("YOUR_API_KEY");
                  // if you rather like to use the sandbox environment:
                  // ApiVideoClient client = new ApiVideoClient("YOUR_SANDBOX_API_KEY", ApiVideoClient.Environment.SANDBOX);

                  UploadTokensApi apiInstance = client.uploadTokens();
                  
                  TokenCreationPayload tokenCreationPayload = new TokenCreationPayload(); // 
                  tokenCreationPayload.setTtl(); // Time in seconds that the token will be active. A value of 0 means that the token has no expiration date. The default is to have no expiration.


                  try {
                    UploadToken result = apiInstance.createToken(tokenCreationPayload);
                    System.out.println(result);
                  } catch (ApiException e) {
                    System.err.println("Exception when calling UploadTokensApi#createToken");
                    System.err.println("Status code: " + e.getCode());
                    System.err.println("Reason: " + e.getMessage());
                    System.err.println("Response headers: " + e.getResponseHeaders());
                    e.printStackTrace();
                  }
                }
              }
          - language: csharp
            code: |
              // First add the "ApiVideo" NuGet package to your project
              // Documentation: https://github.com/apivideo/api.video-csharp-client/blob/main/docs/UploadTokensApi.md#createToken

              using System.Diagnostics;
              using ApiVideo.Client;

              namespace Example
              {
                  public class createTokenExample
                  {
                      public static void Main()
                      {
                          var basePath = ApiVideoClient.Client.Environment.SANDBOX;
                          var apiKey = "YOUR_API_KEY";

                          var apiInstance = new ApiVideoClient(apiKey,basePath);

                          var tokenCreationPayload = new TokenCreationPayload(); // TokenCreationPayload | 
                          var apiUploadTokensInstance = apiInstance.UploadTokens();
                          try
                          {
                              // Generate an upload token
                              UploadToken result = apiUploadTokensInstance.createToken(tokenCreationPayload);
                              Debug.WriteLine(result);
                          }
                          catch (ApiException  e)
                          {
                              Debug.Print("Exception when calling UploadTokensApi.createToken: " + e.Message );
                              Debug.Print("Status Code: "+ e.ErrorCode);
                              Debug.Print(e.StackTrace);
                          }
                      }
                  }
              }
          - language: php
            code: |-
              <?php
              // First install the api client: "composer require api-video/php-api-client"
              // Documentation: https://github.com/apivideo/api.video-php-client/blob/main/docs/Api/UploadTokensApi.md#deleteToken

              require __DIR__ . '/vendor/autoload.php';

              $client = new \ApiVideo\Client\Client(
                  'https://ws.api.video',
                  'YOUR_API_KEY',
                  new \Symfony\Component\HttpClient\Psr18Client()
              ); 

              $uploadToken = 'to1tcmSFHeYY5KzyhOqVKMKb'; // The unique identifier for the upload token you want to delete. Deleting a token will make it so the token can no longer be used for authentication.
              $client->uploadTokens()->deleteToken($uploadToken); 
          - language: swift
            code: |
              // First install the api client: https://github.com/apivideo/api.video-swift-client#getting-started
              // Documentation: https://github.com/apivideo/api.video-swift-client/blob/main/docs/UploadTokensAPI.md#createToken
  '/upload-tokens/{uploadToken}':
    get:
      tags:
        - Upload Tokens
      summary: Retrieve upload token
      description: Retrieve details about a specific upload token by id.
      operationId: GET_upload-tokens-uploadToken
      parameters:
        - name: uploadToken
          in: path
          description: The unique identifier for the token you want information about.
          required: true
          style: simple
          explode: false
          schema:
            type: string
          example: to1tcmSFHeYY5KzyhOqVKMKb
      responses:
        '200':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/upload-token'
              examples:
                response:
                  value:
                    token: to1tcmSFHeYY5KzyhOqVKMKb
                    ttl: 0
                    createdAt: '2020-12-02T10:13:19+00:00'
        '404':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/not-found'
        '429':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/too-many-requests'
              examples:
                Too many requests:
                  value:
                    type: 'https://docs.api.video/reference/too-many-requests'
                    title: Too many requests.
                    status: 429
      security:
        - apiKey: []
      x-client-action: getToken
      x-doctave:
        code-samples:
          - language: go
            code: |
              // First install the go client with "go get github.com/apivideo/api.video-go-client"
              // Documentation: https://github.com/apivideo/api.video-go-client/blob/main/docs/UploadTokensApi.md#getToken

              package main

              import (
                  "context"
                  "fmt"
                  "os"
                  apivideosdk "github.com/apivideo/api.video-go-client"
              )

              func main() {
                  client := apivideosdk.ClientBuilder("YOUR_API_KEY").Build()
                  // if you rather like to use the sandbox environment:
                  // client := apivideosdk.SandboxClientBuilder("YOUR_SANDBOX_API_KEY").Build()
                      
                  uploadToken := "to1tcmSFHeYY5KzyhOqVKMKb" // string | The unique identifier for the token you want information about.

                  
                  res, err := client.UploadTokens.GetToken(uploadToken)

                  if err != nil {
                      fmt.Fprintf(os.Stderr, "Error when calling `UploadTokens.GetToken``: %v\
              ", err)
                  }
                  // response from `GetToken`: UploadToken
                  fmt.Fprintf(os.Stdout, "Response from `UploadTokens.GetToken`: %v\
              ", res)
              }
          - language: node
            code: |
              // First install the "@api.video/nodejs-client" npm package
              // Documentation: https://github.com/apivideo/api.video-nodejs-client/blob/main/doc/api/UploadTokensApi.md#getToken

              const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" }); 

              const uploadTokenId = 'to1tcmSFHeYY5KzyhOqVKMKb'; // The unique identifier for the token you want information about.

              const uploadToken = await client.uploadTokens.getToken(uploadTokenId);
          - language: python
            code: |
              # First install the api client with "pip install api.video"
              # Documentation: https://github.com/apivideo/api.video-python-client/blob/main/docs/UploadTokensApi.md#getToken

              import apivideo
              from apivideo.api import upload_tokens_api
              from apivideo.model.not_found import NotFound
              from apivideo.model.upload_token import UploadToken
              from pprint import pprint

              # Enter a context with an instance of the API client
              with apivideo.AuthenticatedApiClient(__API_KEY__) as api_client:
                  # Create an instance of the API class
                  api_instance = upload_tokens_api.UploadTokensApi(api_client)
                  upload_token = "to1tcmSFHeYY5KzyhOqVKMKb" # str | The unique identifier for the token you want information about.

                  # example passing only required values which don't have defaults set
                  try:
                      # Show upload token
                      api_response = api_instance.get_token(upload_token)
                      pprint(api_response)
                  except apivideo.ApiException as e:
                      print("Exception when calling UploadTokensApi->get_token: %s\n" % e)
          - language: java
            code: |
              // First add the "video.api:java-api-client" maven dependency to your project
              // Documentation: https://github.com/apivideo/api.video-java-client/blob/main/docs/UploadTokensApi.md#getToken

              import video.api.client.ApiVideoClient;
              import video.api.client.api.ApiException;
              import video.api.client.api.models.*;
              import video.api.client.api.clients.UploadTokensApi;
              import java.util.*;

              public class Example {
                public static void main(String[] args) {
                  ApiVideoClient client = new ApiVideoClient("YOUR_API_KEY");
                  // if you rather like to use the sandbox environment:
                  // ApiVideoClient client = new ApiVideoClient("YOUR_SANDBOX_API_KEY", ApiVideoClient.Environment.SANDBOX);

                  UploadTokensApi apiInstance = client.uploadTokens();
                  
                  String uploadToken = "to1tcmSFHeYY5KzyhOqVKMKb"; // The unique identifier for the token you want information about.

                  try {
                    UploadToken result = apiInstance.getToken(uploadToken);
                    System.out.println(result);
                  } catch (ApiException e) {
                    System.err.println("Exception when calling UploadTokensApi#getToken");
                    System.err.println("Status code: " + e.getCode());
                    System.err.println("Reason: " + e.getMessage());
                    System.err.println("Response headers: " + e.getResponseHeaders());
                    e.printStackTrace();
                  }
                }
              }
          - language: csharp
            code: |
              // First add the "ApiVideo" NuGet package to your project
              // Documentation: https://github.com/apivideo/api.video-csharp-client/blob/main/docs/UploadTokensApi.md#getToken

              using System.Diagnostics;
              using ApiVideo.Client;

              namespace Example
              {
                  public class getTokenExample
                  {
                      public static void Main()
                      {
                          var basePath = ApiVideoClient.Client.Environment.SANDBOX;
                          var apiKey = "YOUR_API_KEY";

                          var apiInstance = new ApiVideoClient(apiKey,basePath);

                          var uploadToken = to1tcmSFHeYY5KzyhOqVKMKb;  // string | The unique identifier for the token you want information about.
                          var apiUploadTokensInstance = apiInstance.UploadTokens();
                          try
                          {
                              // Show upload token
                              UploadToken result = apiUploadTokensInstance.getToken(uploadToken);
                              Debug.WriteLine(result);
                          }
                          catch (ApiException  e)
                          {
                              Debug.Print("Exception when calling UploadTokensApi.getToken: " + e.Message );
                              Debug.Print("Status Code: "+ e.ErrorCode);
                              Debug.Print(e.StackTrace);
                          }
                      }
                  }
              }
          - language: php
            code: |-
              <?php
              // First install the api client: "composer require api-video/php-api-client"
              // Documentation: https://github.com/apivideo/api.video-php-client/blob/main/docs/Api/UploadTokensApi.md#getToken

              require __DIR__ . '/vendor/autoload.php';

              $client = new \ApiVideo\Client\Client(
                  'https://ws.api.video',
                  'YOUR_API_KEY',
                  new \Symfony\Component\HttpClient\Psr18Client()
              ); 

              $uploadTokenId = 'to1tcmSFHeYY5KzyhOqVKMKb'; // The unique identifier for the token you want information about.
              $uploadToken = $client->uploadTokens()->getToken($uploadTokenId); 
          - language: swift
            code: |
              // First install the api client: https://github.com/apivideo/api.video-swift-client#getting-started
              // Documentation: https://github.com/apivideo/api.video-swift-client/blob/main/docs/UploadTokensAPI.md#getToken
    delete:
      tags:
        - Upload Tokens
      summary: Delete an upload token
      description: Delete an existing upload token. This is especially useful for tokens you may have created that do not expire.
      operationId: DELETE_upload-tokens-uploadToken
      parameters:
        - name: uploadToken
          in: path
          description: The unique identifier for the upload token you want to delete. Deleting a token will make it so the token can no longer be used for authentication.
          required: true
          style: simple
          explode: false
          schema:
            type: string
          example: to1tcmSFHeYY5KzyhOqVKMKb
      responses:
        '204':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: No Content
        '404':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/not-found'
        '429':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/too-many-requests'
              examples:
                Too many requests:
                  value:
                    type: 'https://docs.api.video/reference/too-many-requests'
                    title: Too many requests.
                    status: 429
      security:
        - apiKey: []
      x-client-action: deleteToken
      x-doctave:
        code-samples:
          - language: go
            code: |
              // First install the go client with "go get github.com/apivideo/api.video-go-client"
              // Documentation: https://github.com/apivideo/api.video-go-client/blob/main/docs/UploadTokensApi.md#deleteToken

              package main

              import (
                  "context"
                  "fmt"
                  "os"
                  apivideosdk "github.com/apivideo/api.video-go-client"
              )

              func main() {
                  client := apivideosdk.ClientBuilder("YOUR_API_KEY").Build()
                  // if you rather like to use the sandbox environment:
                  // client := apivideosdk.SandboxClientBuilder("YOUR_SANDBOX_API_KEY").Build()
                      
                  uploadToken := "to1tcmSFHeYY5KzyhOqVKMKb" // string | The unique identifier for the upload token you want to delete. Deleting a token will make it so the token can no longer be used for authentication.

                  
                  err := client.UploadTokens.DeleteToken(uploadToken)

                  if err != nil {
                      fmt.Fprintf(os.Stderr, "Error when calling `UploadTokens.DeleteToken``: %v\
              ", err)
                  }
              }
          - language: node
            code: |-
              // First install the "@api.video/nodejs-client" npm package
              // Documentation: https://github.com/apivideo/api.video-nodejs-client/blob/main/doc/api/UploadTokensApi.md#deleteToken

              const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" }); 

              const uploadToken = 'to1tcmSFHeYY5KzyhOqVKMKb'; // The unique identifier for the upload token you want to delete. Deleting a token will make it so the token can no longer be used for authentication.
                
              await client.uploadTokens.deleteToken(uploadToken); 
          - language: python
            code: |
              # First install the api client with "pip install api.video"
              # Documentation: https://github.com/apivideo/api.video-python-client/blob/main/docs/UploadTokensApi.md#deleteToken

              import apivideo
              from apivideo.api import upload_tokens_api
              from apivideo.model.not_found import NotFound
              from pprint import pprint

              # Enter a context with an instance of the API client
              with apivideo.AuthenticatedApiClient(__API_KEY__) as api_client:
                  # Create an instance of the API class
                  api_instance = upload_tokens_api.UploadTokensApi(api_client)
                  upload_token = "to1tcmSFHeYY5KzyhOqVKMKb" # str | The unique identifier for the upload token you want to delete. Deleting a token will make it so the token can no longer be used for authentication.

                  # example passing only required values which don't have defaults set
                  try:
                      # Delete an upload token
                      api_instance.delete_token(upload_token)
                  except apivideo.ApiException as e:
                      print("Exception when calling UploadTokensApi->delete_token: %s\n" % e)
          - language: java
            code: |
              // First add the "video.api:java-api-client" maven dependency to your project
              // Documentation: https://github.com/apivideo/api.video-java-client/blob/main/docs/UploadTokensApi.md#deleteToken

              import video.api.client.ApiVideoClient;
              import video.api.client.api.ApiException;
              import video.api.client.api.models.*;
              import video.api.client.api.clients.UploadTokensApi;
              import java.util.*;

              public class Example {
                public static void main(String[] args) {
                  ApiVideoClient client = new ApiVideoClient("YOUR_API_KEY");
                  // if you rather like to use the sandbox environment:
                  // ApiVideoClient client = new ApiVideoClient("YOUR_SANDBOX_API_KEY", ApiVideoClient.Environment.SANDBOX);

                  UploadTokensApi apiInstance = client.uploadTokens();
                  
                  String uploadToken = "to1tcmSFHeYY5KzyhOqVKMKb"; // The unique identifier for the upload token you want to delete. Deleting a token will make it so the token can no longer be used for authentication.

                  try {
                    apiInstance.deleteToken(uploadToken);
                  } catch (ApiException e) {
                    System.err.println("Exception when calling UploadTokensApi#deleteToken");
                    System.err.println("Status code: " + e.getCode());
                    System.err.println("Reason: " + e.getMessage());
                    System.err.println("Response headers: " + e.getResponseHeaders());
                    e.printStackTrace();
                  }
                }
              }
          - language: csharp
            code: |
              // First add the "ApiVideo" NuGet package to your project
              // Documentation: https://github.com/apivideo/api.video-csharp-client/blob/main/docs/UploadTokensApi.md#deleteToken

              using System.Diagnostics;
              using ApiVideo.Client;

              namespace Example
              {
                  public class deleteTokenExample
                  {
                      public static void Main()
                      {
                          var basePath = ApiVideoClient.Client.Environment.SANDBOX;
                          var apiKey = "YOUR_API_KEY";

                          var apiInstance = new ApiVideoClient(apiKey,basePath);

                          var uploadToken = to1tcmSFHeYY5KzyhOqVKMKb;  // string | The unique identifier for the upload token you want to delete. Deleting a token will make it so the token can no longer be used for authentication.
                          var apiUploadTokensInstance = apiInstance.UploadTokens();
                          try
                          {
                              // Delete an upload token
                              apiUploadTokensInstance.deleteToken(uploadToken);
                          }
                          catch (ApiException  e)
                          {
                              Debug.Print("Exception when calling UploadTokensApi.deleteToken: " + e.Message );
                              Debug.Print("Status Code: "+ e.ErrorCode);
                              Debug.Print(e.StackTrace);
                          }
                      }
                  }
              }
          - language: php
            code: |-
              <?php
              // First install the api client: "composer require api-video/php-api-client"
              // Documentation: https://github.com/apivideo/api.video-php-client/blob/main/docs/Api/UploadTokensApi.md#getToken

              require __DIR__ . '/vendor/autoload.php';

              $client = new \ApiVideo\Client\Client(
                  'https://ws.api.video',
                  'YOUR_API_KEY',
                  new \Symfony\Component\HttpClient\Psr18Client()
              ); 

              $uploadTokenId = 'to1tcmSFHeYY5KzyhOqVKMKb'; // The unique identifier for the token you want information about.
              $uploadToken = $client->uploadTokens()->getToken($uploadTokenId); 
          - language: swift
            code: |
              // First install the api client: https://github.com/apivideo/api.video-swift-client#getting-started
              // Documentation: https://github.com/apivideo/api.video-swift-client/blob/main/docs/UploadTokensAPI.md#deleteToken
  /upload:
    post:
      tags:
        - Videos
      summary: Upload with an delegated upload token
      description: Uploading a video with the delegated upload token.
      x-client-description:
        default: 'This method allows you to send a video using an upload token. Upload tokens are especially useful when the upload is done from the client side. If you want to upload a video from your server-side application, you''d better use the [standard upload method](#upload).'
      operationId: POST_upload
      parameters:
        - name: token
          in: query
          description: The unique identifier for the token you want to use to upload a video.
          required: true
          style: form
          explode: true
          schema:
            type: string
          example: to1tcmSFHeYY5KzyhOqVKMKb
        - name: Content-Range
          in: header
          description: 'Content-Range represents the range of bytes that will be returned as a result of the request. Byte ranges are inclusive, meaning that bytes 0-999 represents the first 1000 bytes in a file or object.'
          required: false
          style: simple
          explode: false
          schema:
            pattern: '^bytes [0-9]*-[0-9]*\/[0-9]*$'
            type: string
          example: 'Content-Range: bytes 200-100/5000'
          x-client-ignore: true
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/token-upload-payload'
      responses:
        '201':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/video'
              examples:
                response:
                  value:
                    videoId: vi4k0jvEUuaTdRAEjQ4Jfrgz
                    playerId: pl45KFKdlddgk654dspkze
                    title: Maths video
                    description: An amazing video explaining the string theory
                    language: 'en'
                    languageOrigin: 'api'
                    public: false
                    panoramic: false
                    tags:
                      - maths
                      - string theory
                      - video
                    metadata:
                      - key: Author
                        value: John Doe
                      - key: Format
                        value: Tutorial
                    publishedAt: '2024-07-14T23:36:07+00:00'
                    discarded: false
                    discardedAt: null
                    deletesAt: null
                    source:
                      uri: /videos/vi4k0jvEUuaTdRAEjQ4Jfrgz/source
                    assets:
                      iframe: '<iframe src="https://embed.api.video/vod/vi4blUQJFrYWbaG44NChkH27" width="100%" height="100%" frameborder="0" scrolling="no" allowfullscreen=""></iframe>'
                      player: 'https://embed.api.video/vod/vi4blUQJFrYWbaG44NChkH27'
                      hls: 'https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/hls/manifest.m3u8'
                      thumbnail: 'https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/thumbnail.jpg'
                      mp4: 'https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/mp4/source.mp4'
        '400':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/bad-request'
        '429':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/too-many-requests'
              examples:
                Too many requests:
                  value:
                    type: 'https://docs.api.video/reference/too-many-requests'
                    title: Too many requests.
                    status: 429
      security: []
      x-client-action: uploadWithUploadToken
      x-client-chunk-upload: true
      x-doctave:
        code-samples:
          - language: go
            code: |
              // First install the go client with "go get github.com/apivideo/api.video-go-client"
              // Documentation: https://github.com/apivideo/api.video-go-client/blob/main/docs/VideosApi.md#uploadWithUploadToken
          - language: node
            code: |
              // First install the "@api.video/nodejs-client" npm package
              // Documentation: https://github.com/apivideo/api.video-nodejs-client/blob/main/doc/api/VideosApi.md#uploadWithUploadToken

              const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" });

              const token = 'to4k0jvEUuaTdRAEjQ4Jfrgz'; // Enter the unique identifier for the token you want to use to upload a video.
              const file = './my-video.mp4'; // The path to the video you would like to upload. The path must be local. If you want to use a video from an online source, you must use the "/videos" endpoint and add the "source" parameter when you create a new video.
                    
              const video = await client.videos.uploadWithUploadToken(token, file);
          - language: python
            code: |
              # First install the api client with "pip install api.video"
              # Documentation: https://github.com/apivideo/api.video-python-client/blob/main/docs/VideosApi.md#uploadWithUploadToken
          - language: java
            code: |
              // First add the "video.api:java-api-client" maven dependency to your project
              // Documentation: https://github.com/apivideo/api.video-java-client/blob/main/docs/VideosApi.md#uploadWithUploadToken
          - language: android
            code: |
              // First add the "video.api:android-api-client" maven dependency to your project
              // Documentation: https://github.com/apivideo/api.video-android-client/blob/main/docs/VideosApi.md#uploadWithUploadToken

              VideosApiStore.initialize()
              
              val workManager = WorkManager.getInstance(context) // WorkManager comes from package "androidx.work:work-runtime"

              val token = "to1tcmSFHeYY5KzyhOqVKMKb" // The unique identifier for the token you want to use to upload a video.
              val file = File("/path/to/file") // The path to the video you want to upload.

              workManager.uploadWithUploadToken(token, file) // Dispatch the upload with the WorkManager
          - language: csharp
            code: |
              // First add the "ApiVideo" NuGet package to your project
              // Documentation: https://github.com/apivideo/api.video-csharp-client/blob/main/docs/VideosApi.md#uploadWithUploadToken
          - language: php
            code: |-
              <?php
              // First install the api client: "composer require api-video/php-api-client"
              // Documentation: https://github.com/apivideo/api.video-php-client/blob/main/docs/Api/VideosApi.md#pickThumbnail

              require __DIR__ . '/vendor/autoload.php';

              $client = new \ApiVideo\Client\Client(
                  'https://ws.api.video',
                  'YOUR_API_KEY',
                  new \Symfony\Component\HttpClient\Psr18Client()
              );
               
              $videoId = 'vi4k0jvEUuaTdRAEjQ4Jfrgz'; // Unique identifier of the video you want to add a thumbnail to, where you use a section of your video as the thumbnail.

              $video = $client->videos()->pickThumbnail($videoId, (new \ApiVideo\Client\Model\VideoThumbnailPickPayload())
                  ->setTimecode("00:01:00.000")); // Frame in video to be used as a placeholder before the video plays. 
          - language: swift
            code: |
              // First install the api client: https://github.com/apivideo/api.video-swift-client#getting-started
              // Documentation: https://github.com/apivideo/api.video-swift-client/blob/main/docs/VideosAPI.md#uploadWithUploadToken
  /live-streams:
    get:
      tags:
        - Live Streams
      summary: List all live streams
      description: Get the list of livestreams on the workspace.
      operationId: GET_live-streams
      parameters:
        - name: streamKey
          in: query
          description: The unique stream key that allows you to stream videos.
          required: false
          style: form
          explode: true
          schema:
            type: string
          example: dw-dew8-q6w9-k67w-1ws8
        - name: name
          in: query
          description: You can filter live streams by their name or a part of their name.
          required: false
          style: form
          explode: true
          schema:
            type: string
          example: My Video
        - name: sortBy
          in: query
          description: |
            Enables you to sort live stream results. Allowed attributes: `name`, `createdAt`, `updatedAt`.
            `name` - the name of the live stream.
            `createdAt` - the time a live stream was created.
            `updatedAt` - the time a live stream was last updated.
            
            When using `createdAt` or `updatedAt`, the API sorts the results based on the ATOM UTC time format.
          required: false
          style: form
          explode: true
          schema:
            type: string
            enum: [name, createdAt, updatedAt]
          example: createdAt
        - name: sortOrder
          in: query
          description: 'Allowed: asc, desc. Ascending for date and time means that earlier values precede later ones. Descending means that later values preced earlier ones. For title, it is 0-9 and A-Z ascending and Z-A, 9-0 descending.'
          required: false
          style: form
          explode: true
          schema:
            type: string
            enum:
              - asc
              - desc
          example: desc
        - $ref: '#/components/parameters/current-page'
        - $ref: '#/components/parameters/page-size'
      responses:
        '200':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/live-stream-list-response'
              examples:
                response:
                  value:
                    data:
                      - liveStreamId: li400mYKSgQ6xs7taUeSaEKr
                        createdAt: '2020-01-31T10:17:47+00:00'
                        updatedAt: '2020-03-09T13:19:43+00:00'
                        streamKey: 30087931-229e-42cf-b5f9-e91bcc1f7332
                        restreams:
                        - name: YouTube
                          serverUrl: rtmp://youtube.broadcast.example.com
                          streamKey: cc1b4df0-d1c5-4064-a8f9-9f0368385188
                        - name: Twitch
                          serverUrl: rtmp://twitch.broadcast.example.com
                          streamKey: cc1b4df0-d1c5-4064-a8f9-9f0368385188
                        name: Live Stream From the browser
                        public: true
                        broadcasting: false
                        assets:
                          iframe: '<iframe src="https://embed.api.video/live/li400mYKSgQ6xs7taUeSaEKr" width="100%" height="100%" frameborder="0" scrolling="no" allowfullscreen=""></iframe>'
                          player: 'https://embed.api.video/live/li400mYKSgQ6xs7taUeSaEKr'
                          hls: 'https://live.api.video/li400mYKSgQ6xs7taUeSaEKr.m3u8'
                          thumbnail: 'https://live.api.video/li400mYKSgQ6xs7taUeSaEKr/thumbnail.jpg'
                      - liveStreamId: li4pqNqGUkhKfWcBGpZVLRY5
                        createdAt: '2020-07-29T10:45:35+00:00'
                        updatedAt: '2020-07-29T10:45:35+00:00'
                        streamKey: cc1b4df0-d1c5-4064-a8f9-9f0368385135
                        restreams:
                        - name: YouTube
                          serverUrl: rtmp://youtube.broadcast.example.com
                          streamKey: cc1b4df0-d1c5-4064-a8f9-9f0368385135
                        - name: Twitch
                          serverUrl: rtmp://twitch.broadcast.example.com
                          streamKey: cc1b4df0-d1c5-4064-a8f9-9f0368385135
                        name: Live From New York
                        public: true
                        broadcasting: false
                        assets:
                          iframe: '<iframe src="https://embed.api.video/live/li4pqNqGUkhKfWcBGpZVLRY5" width="100%" height="100%" frameborder="0" scrolling="no" allowfullscreen=""></iframe>'
                          player: 'https://embed.api.video/live/li4pqNqGUkhKfWcBGpZVLRY5'
                          hls: 'https://live.api.video/li4pqNqGUkhKfWcBGpZVLRY5.m3u8'
                          thumbnail: 'https://live.api.video/li4pqNqGUkhKfWcBGpZVLRY5/thumbnail.jpg'
                    pagination:
                      currentPage: 1
                      currentPageItems: 19
                      pageSize: 25
                      pagesTotal: 1
                      itemsTotal: 19
                      links:
                        - rel: self
                          uri: /live-streams?currentPage=1&pageSize=25
                        - rel: first
                          uri: /live-streams?currentPage=1&pageSize=25
                        - rel: last
                          uri: /live-streams?currentPage=1&pageSize=25
        '429':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/too-many-requests'
              examples:
                Too many requests:
                  value:
                    type: 'https://docs.api.video/reference/too-many-requests'
                    title: Too many requests.
                    status: 429
      security:
        - apiKey: []
      x-client-action: list
      x-group-parameters: true
      x-client-paginated: true
      x-optional-object: true
      x-doctave:
        code-samples:
          - language: go
            code: |
              // First install the go client with "go get github.com/apivideo/api.video-go-client"
              // Documentation: https://github.com/apivideo/api.video-go-client/blob/main/docs/LiveStreamsApi.md#list

              package main
                
                import (
                    "context"
                    "fmt"
                    "os"
                    apivideosdk "github.com/apivideo/api.video-go-client"
                )
                
                func main() {
                    client := apivideosdk.ClientBuilder("YOUR_API_KEY").Build()
                    // if you rather like to use the sandbox environment:
                    // client := apivideosdk.SandboxClientBuilder("YOUR_SANDBOX_API_KEY").Build()
                    req := apivideosdk.LiveStreamsApiListRequest{}
                    
                    req.StreamKey("30087931-229e-42cf-b5f9-e91bcc1f7332") // string | The unique stream key that allows you to stream videos.
                    req.Name("My Video") // string | You can filter live streams by their name or a part of their name.
                    req.SortBy("createdAt") // string | Enables you to sort live stream results. Allowed attributes: `name`, `createdAt`, `updatedAt`.
                    req.SortOrder("desc") // string | Allowed: asc, desc. Ascending for date and time means that earlier values precede later ones. Descending means that later values preced earlier ones. For title, it is 0-9 and A-Z ascending and Z-A, 9-0 descending.
                    req.CurrentPage(int32(2)) // int32 | Choose the number of search results to return per page. Minimum value: 1 (default to 1)
                    req.PageSize(int32(30)) // int32 | Results per page. Allowed values 1-100, default is 25. (default to 25)
                
                    res, err := client.LiveStreams.List(req)
                    
                
                    if err != nil {
                        fmt.Fprintf(os.Stderr, "Error when calling `LiveStreams.List``: %v\
              ", err)
                    }
                    // response from `List`: LiveStreamListResponse
                    fmt.Fprintf(os.Stdout, "Response from `LiveStreams.List`: %v\
              ", res)
                }
          - language: node
            code: |
              // First install the "@api.video/nodejs-client" npm package
              // Documentation: https://github.com/apivideo/api.video-nodejs-client/blob/main/doc/api/LiveStreamsApi.md#list

              const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" });

              // retrieve the first page of all livestreams
              const liveStreams = await client.liveStreams.list({ });

              // retrieve the livestreams having a given name
              const liveStreams2 = await client.liveStreams.list({
                name: 'My livestream'
              });

              // retrieve the livestreams having a given stream key
              const liveStreams2 = await client.liveStreams.list({
                streamKey:'30087931-229e-42cf-b5f9-e91bcc1f7332'
              });

              // retrieve the second page of 30 items sorted by name desc
              const liveStreams3 = await client.liveStreams.list({
                sortBy: 'name',
                sortOrder: 'desc',
                currentPage: 2,
                pageSize: 30
              });
          - language: python
            code: |
              # First install the api client with "pip install api.video"
              # Documentation: https://github.com/apivideo/api.video-python-client/blob/main/docs/LiveStreamsApi.md#list

              import apivideo
              from apivideo.api import live_streams_api
              from apivideo.model.live_stream import LiveStream
              from pprint import pprint

              # Enter a context with an instance of the API client
              with apivideo.AuthenticatedApiClient(__API_KEY__) as api_client:
                  # Create an instance of the API class
                  api_instance = live_streams_api.LiveStreamsApi(api_client)
                  live_stream_id = "li400mYKSgQ6xs7taUeSaEKr" # str | The unique ID for the live stream you want to watch.

                  # example passing only required values which don't have defaults set
                  try:
                      # Show live stream
                      api_response = api_instance.get(live_stream_id)
                      pprint(api_response)
                  except apivideo.ApiException as e:
                      print("Exception when calling LiveStreamsApi->get: %s\n" % e)
          - language: java
            code: |
              // First add the "video.api:java-api-client" maven dependency to your project
              // Documentation: https://github.com/apivideo/api.video-java-client/blob/main/docs/LiveStreamsApi.md#list

              import video.api.client.ApiVideoClient;
              import video.api.client.api.ApiException;
              import video.api.client.api.models.*;
              import video.api.client.api.clients.LiveStreamsApi;
              import java.util.*;

              public class Example {
                public static void main(String[] args) {
                  ApiVideoClient client = new ApiVideoClient("YOUR_API_KEY");
                  // if you rather like to use the sandbox environment:
                  // ApiVideoClient client = new ApiVideoClient("YOUR_SANDBOX_API_KEY", ApiVideoClient.Environment.SANDBOX);

                  LiveStreamsApi apiInstance = client.liveStreams();
                  
                  String streamKey = "30087931-229e-42cf-b5f9-e91bcc1f7332"; // The unique stream key that allows you to stream videos.
                  String name = "My Video"; // You can filter live streams by their name or a part of their name.
                  String sortBy = "createdAt"; // Enables you to sort live stream results. Allowed attributes: `name`, `createdAt`, `updatedAt`.
                  String sortOrder = "desc"; // Allowed: asc, desc. Ascending for date and time means that earlier values precede later ones. Descending means that later values preced earlier ones. For title, it is 0-9 and A-Z ascending and Z-A, 9-0 descending.
                  Integer currentPage = 1; // Choose the number of search results to return per page. Minimum value: 1
                  Integer pageSize = 25; // Results per page. Allowed values 1-100, default is 25.

                  try {
                    Page<LiveStream> result = apiInstance.list()
                          .streamKey(streamKey)
                          .name(name)
                          .sortBy(sortBy)
                          .sortOrder(sortOrder)
                          .currentPage(currentPage)
                          .pageSize(pageSize)
                          .execute();
                    System.out.println(result);
                  } catch (ApiException e) {
                    System.err.println("Exception when calling LiveStreamsApi#list");
                    System.err.println("Status code: " + e.getCode());
                    System.err.println("Reason: " + e.getMessage());
                    System.err.println("Response headers: " + e.getResponseHeaders());
                    e.printStackTrace();
                  }
                }
              }
          - language: csharp
            code: |
              // First add the "ApiVideo" NuGet package to your project
              // Documentation: https://github.com/apivideo/api.video-csharp-client/blob/main/docs/LiveStreamsApi.md#list

              using System.Diagnostics;
              using ApiVideo.Client;

              namespace Example
              {
                  public class getExample
                  {
                      public static void Main()
                      {
                          var basePath = ApiVideoClient.Client.Environment.SANDBOX;
                          var apiKey = "YOUR_API_KEY";

                          var apiInstance = new ApiVideoClient(apiKey,basePath);

                          var liveStreamId = li400mYKSgQ6xs7taUeSaEKr;  // string | The unique ID for the live stream you want to watch.
                          var apiLiveStreamsInstance = apiInstance.LiveStreams();
                          try
                          {
                              // Show live stream
                              LiveStream result = apiLiveStreamsInstance.get(liveStreamId);
                              Debug.WriteLine(result);
                          }
                          catch (ApiException  e)
                          {
                              Debug.Print("Exception when calling LiveStreamsApi.get: " + e.Message );
                              Debug.Print("Status Code: "+ e.ErrorCode);
                              Debug.Print(e.StackTrace);
                          }
                      }
                  }
              }
          - language: php
            code: |-
              <?php
              // First install the api client: "composer require api-video/php-api-client"
              // Documentation: https://github.com/apivideo/api.video-php-client/blob/main/docs/Api/LiveStreamsApi.md#list

              require __DIR__ . '/vendor/autoload.php';

              $client = new \ApiVideo\Client\Client(
                  'https://ws.api.video',
                  'YOUR_API_KEY',
                  new \Symfony\Component\HttpClient\Psr18Client()
              ); 

              // retrieve the first page of all livestreams
              $liveStreams = $client->liveStreams()->list();

              // retrieve the livestreams having a given name
              $liveStreams2 = $client->liveStreams()->list(array(
                  'name' => 'My livestream'
              ));

              // retrieve the livestreams having a given stream key
              $liveStreams2 = $client->liveStreams()->list(array(
                'streamKey' => '30087931-229e-42cf-b5f9-e91bcc1f7332'
              ));

              // retrieve the second page of 30 items sorted by name desc
              $liveStreams3 = $client->liveStreams()->list(array(
                  'sortBy' => 'name',
                  'sortOrder' => 'desc',
                  'currentPage' => 2,
                  'pageSize' => 30
              )); 
          - language: swift
            code: |
              // First install the api client: https://github.com/apivideo/api.video-swift-client#getting-started
              // Documentation: https://github.com/apivideo/api.video-swift-client/blob/main/docs/LiveStreamsAPI.md#list
    post:
      tags:
        - Live Streams
      summary: Create live stream
      description: Creates a livestream object.
      operationId: POST_live-streams
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/live-stream-creation-payload'
      responses:
        '200':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/live-stream'
              examples:
                live-stream-response-example:
                  $ref: '#/components/examples/live-stream-response-example'
        '400':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/bad-request'
              examples:
                Empty field in restreams array:
                  description: This error occurs when a field is empty in the `restreams` array in your request.
                  value:
                    type: https://docs.api.video/reference/invalid-attribute
                    title: An attribute is invalid.
                    status: 400
                    detail: This value should not be blank.
                    name: restreams[0][name]
                Missing app name in serverUrl:
                  description: This error occurs when the app name is missing from `serverURL` in the `restreams` array.
                  value:
                    type: https://docs.api.video/reference/invalid-attribute
                    title: An attribute is invalid.
                    status: 400
                    detail: 'Missing app name: [rtmp|rtmps]://[host]/[app name].'
                    name: restreams[0][serverUrl]
                Incorrect URL in serverUrl:
                  description: This error occurs when the URL you set in `serverURL` is not `rtmps` or `rtmp`.
                  value:
                    type: https://docs.api.video/reference/invalid-attribute
                    title: An attribute is invalid.
                    status: 400
                    detail: 'RTMP URL should have the following format: [rtmp|rtmps]://[host]/[app name].'
                    name: restreams[0][serverUrl]
                Too many restream destinations:
                  description: This error occurs when you set more than 5 restream destinations.
                  value:
                    type: https://docs.api.video/reference/invalid-attribute
                    title: An attribute is invalid.
                    status: 400
                    detail: This collection should contain 5 elements or less.
                    name: restreams
                null field in the restreams array:
                  description: This error occurs when a field is sent as `null` in the `restreams` array in your request.
                  value:
                    type: https://docs.api.video/reference/invalid-attribute
                    title: An attribute is invalid.
                    status: 400
                    detail: This value should not be null.
                    name: restreams[0][name]
        '429':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/too-many-requests'
              examples:
                Too many requests:
                  value:
                    type: 'https://docs.api.video/reference/too-many-requests'
                    title: Too many requests.
                    status: 429
      security:
        - apiKey: []
      x-client-action: create
      x-doctave:
        code-samples:
          - language: go
            code: |
              // First install the go client with "go get github.com/apivideo/api.video-go-client"
              // Documentation: https://github.com/apivideo/api.video-go-client/blob/main/docs/LiveStreamsApi.md#create

                                
              // instantiate the client 
              client := apivideosdk.ClientBuilder("YOUR_API_KEY").Build()

              liveStreamCreationPayload := apivideosdk.LiveStreamCreationPayload{}
              liveStreamCreationPayload.SetName("My Live Stream Video") // Add a name for your live stream here.
              liveStreamCreationPayload.SetPublic(true) // Whether your video can be viewed by everyone, or requires authentication to see it.
              liveStreamCreationPayload.SetPlayerId("pl4f4ferf5erfr5zed4fsdd") // The unique identifier for the player.
              liveStreamCreatePayload.SetRestreams([]RestreamsRequestObject{{Name: "My RTMP server", ServerUrl: "rtmp://my.broadcast.example.com/app", StreamKey: "dw-dew8-q6w9-k67w-1ws8"}}) // Use this parameter to add, edit, or remove RTMP services where you want to restream a live stream. The list can only contain up to 5 destinations.

              res, err := client.LiveStreams.Create(liveStreamCreationPayload)

              if err != nil {
                  fmt.Fprintf(os.Stderr, "Error when calling `LiveStreams.Create``: %v", err)
              }

              fmt.Fprintf(os.Stdout, "Response from `LiveStreams.Create`: %v", res)
          - language: node
            code: |
              // First install the "@api.video/nodejs-client" npm package
              // Documentation: https://github.com/apivideo/api.video-nodejs-client/blob/main/doc/api/LiveStreamsApi.md#create

              const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" });

              const liveStreamCreationPayload = {
                  name: "My Live Stream", // Add a name for your live stream here.
                  _public: true, // Whether your video can be viewed by everyone, or requires authentication to see it. 
                  playerId: "pl4f4ferf5erfr5zed4fsdd", // The unique identifier for the player.
                  restreams: [ // Use this parameter to add, edit, or remove RTMP services where you want to restream a live stream. The list can only contain up to 5 destinations.
                    {
                      streamKey: "dw-dew8-q6w9-k67w-1ws8",
                      serverUrl: "rtmp://my.broadcast.example.com/app",
                      name: "My RTMP server",
                    },
                  ],
              }; 

              const liveStream = await client.liveStreams.create(liveStreamCreationPayload);
          - language: python
            code: |
              # First install the api client with "pip install api.video"
              # Documentation: https://github.com/apivideo/api.video-python-client/blob/main/docs/LiveStreamsApi.md#create

              from apivideo.api.live_streams_api import LiveStreamsApi
              from apivideo.model.live_stream_creation_payload import LiveStreamCreationPayload
              from apivideo import AuthenticatedApiClient, ApiException

              with AuthenticatedApiClient("YOUR_API_KEY") as api_client:
                  live_stream_creation_payload = LiveStreamCreationPayload(
                      name="My Live Stream Video",
                      public=True,
                      player_id="pl4f4ferf5erfr5zed4fsdd",
                      restreams=[
                          RestreamsRequestObject(
                              name="My RTMP server",
                              server_url="rtmp://my.broadcast.example.com/app",
                              stream_key="dw-dew8-q6w9-k67w-1ws8",
                          ),
                      ],
                  ) # LiveStreamCreationPayload | 

                  try:
                      live_stream = LiveStreamsApi(api_client).create(live_stream_creation_payload)
                      print(live_stream)
                  except ApiException as e:
                      print("Exception when calling LiveStreamsApi->create: %s" % e)
          - language: java
            code: |
              // First add the "video.api:java-api-client" maven dependency to your project
              // Documentation: https://github.com/apivideo/api.video-java-client/blob/main/docs/LiveStreamsApi.md#create

                                
              // instantiate the client 
              ApiVideoClient client = new ApiVideoClient("YOUR_API_KEY");

              LiveStreamCreationPayload liveStreamCreationPayload = new LiveStreamCreationPayload(); 
              liveStreamCreationPayload.setName("My Live Stream Video"); // Add a name for your live stream here.
              liveStreamCreationPayload.setPublic(); // Whether your video can be viewed by everyone, or requires authentication to see it.
              liveStreamCreationPayload.setPlayerId("pl4f4ferf5erfr5zed4fsdd"); // The unique identifier for the player.
              liveStreamCreationPayload.setRestreams(Collections.singletonList(new RestreamsRequestObject() // Use this parameter to add, edit, or remove RTMP services where you want to restream a live stream. The list can only contain up to 5 destinations.
                    .name("My RTMP server")
                    .serverUrl("rtmp://my.broadcast.example.com/app")
                    .streamKey("dw-dew8-q6w9-k67w-1ws8")));


              try {
                  LiveStream liveStream = client.liveStreams().create(liveStreamCreationPayload);
                  System.out.println(liveStream);
              } catch (ApiException e) {
                  e.printStackTrace();
              }
          - language: csharp
            code: |
              // First add the "ApiVideo" NuGet package to your project
              // Documentation: https://github.com/apivideo/api.video-csharp-client/blob/main/docs/LiveStreamsApi.md#create

                                
              var apiVideoClient = new ApiVideoClient("YOUR_API_KEY");

              var liveStreamCreationPayload = new LiveStreamCreationPayload()
              {
                  name = "My Live Stream Video",
                  _public = true,
                  playerid = "pl4f4ferf5erfr5zed4fsdd",
                  restreams = new List<RestreamsRequestObject>(){
                      new RestreamsRequestObject(){name="My RTMP server", streamKey="dw-dew8-q6w9-k67w-1ws8", serverUrl="rtmp://my.broadcast.example.com/app" }
                  }
              };

              try
              {
                  var liveStream = apiVideoClient.LiveStreams().create(liveStreamCreationPayload);
              }
              catch (ApiException e)
              {
                  // Manage create error here
              }
          - language: php
            code: |
              <?php
              // First install the api client: "composer require api-video/php-api-client"
              // Documentation: https://github.com/apivideo/api.video-php-client/blob/main/docs/Api/LiveStreamsApi.md#create

              require __DIR__ . '/vendor/autoload.php';

              $client = new \ApiVideo\Client\Client(
                  'https://ws.api.video',
                  'YOUR_API_KEY',
                  new \Symfony\Component\HttpClient\Psr18Client()
              );

              $liveStream = $client->liveStreams()->create((new \ApiVideo\Client\Model\LiveStreamCreationPayload())
                  ->setName("My Live Stream Video") // Add a name for your live stream here.
                  ->setPublic(true) // Whether your video can be viewed by everyone, or requires authentication to see it. 
                  ->setPlayerId("pl4f4ferf5erfr5zed4fsdd")); // The unique identifier for the player.
                  ->setRestreams(array(  // Use this parameter to add, edit, or remove RTMP services where you want to restream a live stream. The list can only contain up to 5 destinations.
                      new RestreamsRequestObject(['name' => 'My RTMP server', 'serverUrl' => 'rtmp://my.broadcast.example.com/app', 'streamKey' => 'dw-dew8-q6w9-k67w-1ws8'])));
          - language: swift
            code: |
              // First install the api client: https://github.com/apivideo/api.video-swift-client#getting-started
              // Documentation: https://github.com/apivideo/api.video-swift-client/blob/main/docs/LiveStreamsAPI.md#create

              ApiVideoClient.apiKey = "YOUR_API_KEY"

              let liveStreamCreationPayload = LiveStreamCreationPayload(
                  name: "My Live Stream Video",
                  _public: true,
                  playerId: "pl4f4ferf5erfr5zed4fsdd",
                  restreams: [RestreamsRequestObject(
                      name: "My RTMP server",
                      serverUrl: "rtmp://my.broadcast.example.com/app",
                      streamKey: "dw-dew8-q6w9-k67w-1ws8"
                  )]
              )

              LiveStreamsAPI.create(liveStreamCreationPayload: liveStreamCreationPayload) { liveStream, error in
                 if let liveStream = liveStream  {
                     // Do something with the livestream
                 }
                 if let error = error {
                    // Manage create error here
                 }
              }
  '/live-streams/{liveStreamId}':
    get:
      tags:
        - Live Streams
      summary: Retrieve live stream
      description: Get a livestream by id.
      operationId: GET_live-streams-liveStreamId
      parameters:
        - name: liveStreamId
          in: path
          description: The unique ID for the live stream you want to watch.
          required: true
          style: simple
          explode: false
          schema:
            type: string
          example: li400mYKSgQ6xs7taUeSaEKr
      responses:
        '200':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/live-stream'
              examples:
                live-stream-response-example:
                  $ref: '#/components/examples/live-stream-response-example'
        '429':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/too-many-requests'
              examples:
                Too many requests:
                  value:
                    type: 'https://docs.api.video/reference/too-many-requests'
                    title: Too many requests.
                    status: 429
      security:
        - apiKey: []
      x-client-action: get
      x-doctave:
        code-samples:
          - language: go
            code: |
              // First install the go client with "go get github.com/apivideo/api.video-go-client"
              // Documentation: https://github.com/apivideo/api.video-go-client/blob/main/docs/LiveStreamsApi.md#get

              package main

              import (
                  "context"
                  "fmt"
                  "os"
                  apivideosdk "github.com/apivideo/api.video-go-client"
              )

              func main() {
                  client := apivideosdk.ClientBuilder("YOUR_API_KEY").Build()
                  // if you rather like to use the sandbox environment:
                  // client := apivideosdk.SandboxClientBuilder("YOUR_SANDBOX_API_KEY").Build()
                      
                  liveStreamId := "li400mYKSgQ6xs7taUeSaEKr" // string | The unique ID for the live stream you want to watch.

                  
                  res, err := client.LiveStreams.Get(liveStreamId)

                  if err != nil {
                      fmt.Fprintf(os.Stderr, "Error when calling `LiveStreams.Get``: %v\
              ", err)
                  }
                  // response from `Get`: LiveStream
                  fmt.Fprintf(os.Stdout, "Response from `LiveStreams.Get`: %v\
              ", res)
              }
          - language: node
            code: |
              // First install the "@api.video/nodejs-client" npm package
              // Documentation: https://github.com/apivideo/api.video-nodejs-client/blob/main/doc/api/LiveStreamsApi.md#get

              const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" });

              const liveStreamId = 'li400mYKSgQ6xs7taUeSaEKr'; // The unique ID for the live stream you want to retrieve.

              const liveStream = await client.liveStreams.get(liveStreamId);
          - language: python
            code: |
              # First install the api client with "pip install api.video"
              # Documentation: https://github.com/apivideo/api.video-python-client/blob/main/docs/LiveStreamsApi.md#get

              import apivideo
              from apivideo.api import live_streams_api
              from apivideo.model.live_stream import LiveStream
              from pprint import pprint

              # Enter a context with an instance of the API client
              with apivideo.AuthenticatedApiClient(__API_KEY__) as api_client:
                  # Create an instance of the API class
                  api_instance = live_streams_api.LiveStreamsApi(api_client)
                  live_stream_id = "li400mYKSgQ6xs7taUeSaEKr" # str | The unique ID for the live stream you want to watch.

                  # example passing only required values which don't have defaults set
                  try:
                      # Show live stream
                      api_response = api_instance.get(live_stream_id)
                      pprint(api_response)
                  except apivideo.ApiException as e:
                      print("Exception when calling LiveStreamsApi->get: %s\n" % e)
          - language: java
            code: |
              // First add the "video.api:java-api-client" maven dependency to your project
              // Documentation: https://github.com/apivideo/api.video-java-client/blob/main/docs/LiveStreamsApi.md#get

              import video.api.client.ApiVideoClient;
              import video.api.client.api.ApiException;
              import video.api.client.api.models.*;
              import video.api.client.api.clients.LiveStreamsApi;
              import java.util.*;

              public class Example {
                public static void main(String[] args) {
                  ApiVideoClient client = new ApiVideoClient("YOUR_API_KEY");
                  // if you rather like to use the sandbox environment:
                  // ApiVideoClient client = new ApiVideoClient("YOUR_SANDBOX_API_KEY", ApiVideoClient.Environment.SANDBOX);

                  LiveStreamsApi apiInstance = client.liveStreams();
                  
                  String liveStreamId = "li400mYKSgQ6xs7taUeSaEKr"; // The unique ID for the live stream you want to watch.

                  try {
                    LiveStream result = apiInstance.get(liveStreamId);
                    System.out.println(result);
                  } catch (ApiException e) {
                    System.err.println("Exception when calling LiveStreamsApi#get");
                    System.err.println("Status code: " + e.getCode());
                    System.err.println("Reason: " + e.getMessage());
                    System.err.println("Response headers: " + e.getResponseHeaders());
                    e.printStackTrace();
                  }
                }
              }
          - language: csharp
            code: |
              // First add the "ApiVideo" NuGet package to your project
              // Documentation: https://github.com/apivideo/api.video-csharp-client/blob/main/docs/LiveStreamsApi.md#get

              import video.api.client.ApiVideoClient;
              import video.api.client.api.ApiException;
              import video.api.client.api.models.*;
              import video.api.client.api.clients.LiveStreamsApi;
              import java.util.*;

              public class Example {
                public static void main(String[] args) {
                  ApiVideoClient client = new ApiVideoClient("YOUR_API_KEY");
                  // if you rather like to use the sandbox environment:
                  // ApiVideoClient client = new ApiVideoClient("YOUR_SANDBOX_API_KEY", ApiVideoClient.Environment.SANDBOX);

                  LiveStreamsApi apiInstance = client.liveStreams();
                  
                  String liveStreamId = "li400mYKSgQ6xs7taUeSaEKr"; // The unique ID for the live stream you want to watch.

                  try {
                    LiveStream result = apiInstance.get(liveStreamId);
                    System.out.println(result);
                  } catch (ApiException e) {
                    System.err.println("Exception when calling LiveStreamsApi#get");
                    System.err.println("Status code: " + e.getCode());
                    System.err.println("Reason: " + e.getMessage());
                    System.err.println("Response headers: " + e.getResponseHeaders());
                    e.printStackTrace();
                  }
                }
              }
          - language: csharp
            code: |
              // First add the "ApiVideo" NuGet package to your project
              // Documentation: https://github.com/apivideo/api.video-csharp-client/blob/main/docs/LiveStreamsApi.md#get

              using System.Diagnostics;
              using ApiVideo.Client;

              namespace Example
              {
                  public class getExample
                  {
                      public static void Main()
                      {
                          var basePath = ApiVideoClient.Client.Environment.SANDBOX;
                          var apiKey = "YOUR_API_KEY";

                          var apiInstance = new ApiVideoClient(apiKey,basePath);

                          var liveStreamId = li400mYKSgQ6xs7taUeSaEKr;  // string | The unique ID for the live stream you want to watch.
                          var apiLiveStreamsInstance = apiInstance.LiveStreams();
                          try
                          {
                              // Show live stream
                              LiveStream result = apiLiveStreamsInstance.get(liveStreamId);
                              Debug.WriteLine(result);
                          }
                          catch (ApiException  e)
                          {
                              Debug.Print("Exception when calling LiveStreamsApi.get: " + e.Message );
                              Debug.Print("Status Code: "+ e.ErrorCode);
                              Debug.Print(e.StackTrace);
                          }
                      }
                  }
              }
          - language: php
            code: |
              <?php
              // First install the api client: "composer require api-video/php-api-client"
              // Documentation: https://github.com/apivideo/api.video-php-client/blob/main/docs/Api/LiveStreamsApi.md#get

              require __DIR__ . '/vendor/autoload.php';

              $client = new \ApiVideo\Client\Client(
                  'https://ws.api.video',
                  'YOUR_API_KEY',
                  new \Symfony\Component\HttpClient\Psr18Client()
              ); 

              $liveStreamId = 'li400mYKSgQ6xs7taUeSaEKr'; // The unique ID for the live stream you want to retrieve.
              $liveStream = $client->liveStreams()->get($liveStreamId);
          - language: swift
            code: |
              // First install the api client: https://github.com/apivideo/api.video-swift-client#getting-started
              // Documentation: https://github.com/apivideo/api.video-swift-client/blob/main/docs/LiveStreamsAPI.md#get
    delete:
      tags:
        - Live Streams
      summary: Delete a live stream
      description: 'If you do not need a live stream any longer, you can send a request to delete it. All you need is the liveStreamId.'
      operationId: DELETE_live-streams-liveStreamId
      parameters:
        - name: liveStreamId
          in: path
          description: The unique ID for the live stream that you want to remove.
          required: true
          style: simple
          explode: false
          schema:
            type: string
          example: li400mYKSgQ6xs7taUeSaEKr
      responses:
        '204':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: No Content
        '429':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/too-many-requests'
              examples:
                Too many requests:
                  value:
                    type: 'https://docs.api.video/reference/too-many-requests'
                    title: Too many requests.
                    status: 429
      security:
        - apiKey: []
      x-client-action: delete
      x-doctave:
        code-samples:
          - language: go
            code: |
              // First install the go client with "go get github.com/apivideo/api.video-go-client"
              // Documentation: https://github.com/apivideo/api.video-go-client/blob/main/docs/LiveStreamsApi.md#delete

              package main

              import (
                  "context"
                  "fmt"
                  "os"
                  apivideosdk "github.com/apivideo/api.video-go-client"
              )

              func main() {
                  client := apivideosdk.ClientBuilder("YOUR_API_KEY").Build()
                  // if you rather like to use the sandbox environment:
                  // client := apivideosdk.SandboxClientBuilder("YOUR_SANDBOX_API_KEY").Build()
                      
                  liveStreamId := "li400mYKSgQ6xs7taUeSaEKr" // string | The unique ID for the live stream that you want to remove.

                  
                  err := client.LiveStreams.Delete(liveStreamId)

                  if err != nil {
                      fmt.Fprintf(os.Stderr, "Error when calling `LiveStreams.Delete``: %v\
              ", err)
                  }
              }
          - language: node
            code: |-
              // First install the "@api.video/nodejs-client" npm package
              // Documentation: https://github.com/apivideo/api.video-nodejs-client/blob/main/doc/api/LiveStreamsApi.md#delete

              const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" });

              const liveStreamId = 'li400mYKSgQ6xs7taUeSaEKr'; // The unique identifier of the live stream whose thumbnail you want to delete.

              const liveStream = await client.liveStreams.deleteThumbnail(liveStreamId);
                  
          - language: python
            code: |
              # First install the api client with "pip install api.video"
              # Documentation: https://github.com/apivideo/api.video-python-client/blob/main/docs/LiveStreamsApi.md#delete

              import apivideo
              from apivideo.api import live_streams_api
              from pprint import pprint

              # Enter a context with an instance of the API client
              with apivideo.AuthenticatedApiClient(__API_KEY__) as api_client:
                  # Create an instance of the API class
                  api_instance = live_streams_api.LiveStreamsApi(api_client)
                  live_stream_id = "li400mYKSgQ6xs7taUeSaEKr" # str | The unique ID for the live stream that you want to remove.

                  # example passing only required values which don't have defaults set
                  try:
                      # Delete a live stream
                      api_instance.delete(live_stream_id)
                  except apivideo.ApiException as e:
                      print("Exception when calling LiveStreamsApi->delete: %s\n" % e)
          - language: java
            code: |
              // First add the "video.api:java-api-client" maven dependency to your project
              // Documentation: https://github.com/apivideo/api.video-java-client/blob/main/docs/LiveStreamsApi.md#delete

                import video.api.client.ApiVideoClient;
                import video.api.client.api.ApiException;
                import video.api.client.api.models.*;
                import video.api.client.api.clients.LiveStreamsApi;
                import java.util.*;
                
                public class Example {
                  public static void main(String[] args) {
                    ApiVideoClient client = new ApiVideoClient("YOUR_API_KEY");
                    // if you rather like to use the sandbox environment:
                    // ApiVideoClient client = new ApiVideoClient("YOUR_SANDBOX_API_KEY", ApiVideoClient.Environment.SANDBOX);
                
                    LiveStreamsApi apiInstance = client.liveStreams();
                    
                    String liveStreamId = "li400mYKSgQ6xs7taUeSaEKr"; // The unique ID for the live stream that you want to remove.
                
                    try {
                      apiInstance.delete(liveStreamId);
                    } catch (ApiException e) {
                      System.err.println("Exception when calling LiveStreamsApi#delete");
                      System.err.println("Status code: " + e.getCode());
                      System.err.println("Reason: " + e.getMessage());
                      System.err.println("Response headers: " + e.getResponseHeaders());
                      e.printStackTrace();
                    }
                  }
                }
          - language: csharp
            code: |
              // First add the "ApiVideo" NuGet package to your project
              // Documentation: https://github.com/apivideo/api.video-csharp-client/blob/main/docs/LiveStreamsApi.md#delete

              using System.Diagnostics;
              using ApiVideo.Client;

              namespace Example
              {
                  public class deleteExample
                  {
                      public static void Main()
                      {
                          var basePath = ApiVideoClient.Client.Environment.SANDBOX;
                          var apiKey = "YOUR_API_KEY";

                          var apiInstance = new ApiVideoClient(apiKey,basePath);

                          var liveStreamId = li400mYKSgQ6xs7taUeSaEKr;  // string | The unique ID for the live stream that you want to remove.
                          var apiLiveStreamsInstance = apiInstance.LiveStreams();
                          try
                          {
                              // Delete a live stream
                              apiLiveStreamsInstance.delete(liveStreamId);
                          }
                          catch (ApiException  e)
                          {
                              Debug.Print("Exception when calling LiveStreamsApi.delete: " + e.Message );
                              Debug.Print("Status Code: "+ e.ErrorCode);
                              Debug.Print(e.StackTrace);
                          }
                      }
                  }
              }
          - language: php
            code: |
              <?php
              // First install the api client: "composer require api-video/php-api-client"
              // Documentation: https://github.com/apivideo/api.video-php-client/blob/main/docs/Api/LiveStreamsApi.md#delete

              require __DIR__ . '/vendor/autoload.php';

              $client = new \ApiVideo\Client\Client(
                  'https://ws.api.video',
                  'YOUR_API_KEY',
                  new \Symfony\Component\HttpClient\Psr18Client()
              ); 

              $liveStreamId = 'li400mYKSgQ6xs7taUeSaEKr'; // The unique identifier of the live stream whose thumbnail you want to delete.
              $liveStream = $client->liveStreams()->deleteThumbnail($liveStreamId); 
          - language: swift
            code: |
              // First install the api client: https://github.com/apivideo/api.video-swift-client#getting-started
              // Documentation: https://github.com/apivideo/api.video-swift-client/blob/main/docs/LiveStreamsAPI.md#delete
    patch:
      tags:
        - Live Streams
      summary: Update a live stream
      description: Updates the livestream object.
      operationId: PATCH_live-streams-liveStreamId
      parameters:
        - name: liveStreamId
          in: path
          description: 'The unique ID for the live stream that you want to update information for such as player details.'
          required: true
          style: simple
          explode: false
          schema:
            type: string
          example: li400mYKSgQ6xs7taUeSaEKr
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/live-stream-update-payload'
      responses:
        '200':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/live-stream'
              examples:
                live-stream-response-example:
                  $ref: '#/components/examples/live-stream-response-example'
        '400':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/bad-request'
              examples:
                Empty field in restreams array:
                  description: This error occurs when a field is empty in the `restreams` array in your request.
                  value:
                    type: https://docs.api.video/reference/invalid-attribute
                    title: An attribute is invalid.
                    status: 400
                    detail: This value should not be blank.
                    name: restreams[0][name]
                Missing app name in serverUrl:
                  description: This error occurs when the app name is missing from `serverURL` in the `restreams` array.
                  value:
                    type: https://docs.api.video/reference/invalid-attribute
                    title: An attribute is invalid.
                    status: 400
                    detail: 'Missing app name: [rtmp|rtmps]://[host]/[app name].'
                    name: restreams[0][serverUrl]
                Incorrect URL in serverUrl:
                  description: This error occurs when the URL you set in `serverURL` is not `rtmps` or `rtmp`.
                  value:
                    type: https://docs.api.video/reference/invalid-attribute
                    title: An attribute is invalid.
                    status: 400
                    detail: 'RTMP URL should have the following format: [rtmp|rtmps]://[host]/[app name].'
                    name: restreams[0][serverUrl]
                Too many restream destinations:
                  description: This error occurs when you set more than 5 restream destinations.
                  value:
                    type: https://docs.api.video/reference/invalid-attribute
                    title: An attribute is invalid.
                    status: 400
                    detail: This collection should contain 5 elements or less.
                    name: restreams
                null field in the restreams array:
                  description: This error occurs when a field is sent as `null` in the `restreams` array in your request.
                  value:
                    type: https://docs.api.video/reference/invalid-attribute
                    title: An attribute is invalid.
                    status: 400
                    detail: This value should not be null.
                    name: restreams[0][name]
        '429':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/too-many-requests'
              examples:
                Too many requests:
                  value:
                    type: 'https://docs.api.video/reference/too-many-requests'
                    title: Too many requests.
                    status: 429
      security:
        - apiKey: []
      x-client-action: update
      x-doctave:
        code-samples:
          - language: go
            code: |
              // First install the go client with "go get github.com/apivideo/api.video-go-client"
              // Documentation: https://github.com/apivideo/api.video-go-client/blob/main/docs/LiveStreamsApi.md#update

              package main

              import (
                  "context"
                  "fmt"
                  "os"
                  apivideosdk "github.com/apivideo/api.video-go-client"
              )

              func main() {
                  client := apivideosdk.ClientBuilder("YOUR_API_KEY").Build()
                  // if you rather like to use the sandbox environment:
                  // client := apivideosdk.SandboxClientBuilder("YOUR_SANDBOX_API_KEY").Build()
                      
                  liveStreamId := "li400mYKSgQ6xs7taUeSaEKr" // string | The unique ID for the live stream that you want to update information for such as player details.
                  liveStreamUpdatePayload := apivideosdk.LiveStreamUpdatePayload{}
                  liveStreamUpdatePayload.SetName("My Live Stream Video") // The name you want to use for your live stream.
                  liveStreamUpdatePayload.SetPublic(true) // Whether your video can be viewed by everyone, or requires authentication to see it.
                  liveStreamUpdatePayload.SetPlayerId("pl4f4ferf5erfr5zed4fsdd") // The unique ID for the player associated with a live stream that you want to update.
                  liveStreamUpdatePayload.SetRestreams([]RestreamsRequestObject{{Name: "My RTMP server", ServerUrl: "rtmp://my.broadcast.example.com/app", StreamKey: "dw-dew8-q6w9-k67w-1ws8"}}) // Use this parameter to add, edit, or remove RTMP services where you want to restream a live stream. The list can only contain up to 5 destinations. This operation updates all restream destinations in the same request. If you do not want to modify an existing restream destination, you need to include it in your request, otherwise it is removed.

                  res, err := client.LiveStreams.Update(liveStreamId, liveStreamUpdatePayload)

                  if err != nil {
                      fmt.Fprintf(os.Stderr, "Error when calling `LiveStreams.Update``: %v\
              ", err)
                  }
                  // response from `Update`: LiveStream
                  fmt.Fprintf(os.Stdout, "Response from `LiveStreams.Update`: %v\
              ", res)
              }
          - language: node
            code: |
              // First install the "@api.video/nodejs-client" npm package
              // Documentation: https://github.com/apivideo/api.video-nodejs-client/blob/main/doc/api/LiveStreamsApi.md#update

              const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" });

              const liveStreamId = 'li400mYKSgQ6xs7taUeSaEKr'; // The unique ID for the live stream that you want to update information for such as player details.
              const liveStreamUpdatePayload = {
                name: "My Live Stream Video", // The name you want to use for your live stream.
                _public: true, // Whether your video can be viewed by everyone, or requires authentication to see it. 
                playerId: "pl45KFKdlddgk654dspkze", // The unique ID for the player associated with a live stream that you want to update.
                restreams: [ // Use this parameter to add, edit, or remove RTMP services where you want to restream a live stream. The list can only contain up to 5 destinations.
                  {
                    streamKey: "dw-dew8-q6w9-k67w-1ws8",
                    serverUrl: "rtmp://my.broadcast.example.com/app",
                    name: "My RTMP server",
                  },
                ],
              };

              const liveStream = await client.liveStreams.update(liveStreamId, liveStreamUpdatePayload); 
          - language: python
            code: |
              # First install the api client with "pip install api.video"
              # Documentation: https://github.com/apivideo/api.video-python-client/blob/main/docs/LiveStreamsApi.md#update

              import apivideo
              from apivideo.api import live_streams_api
              from apivideo.model.bad_request import BadRequest
              from apivideo.model.live_stream_update_payload import LiveStreamUpdatePayload
              from apivideo.model.live_stream import LiveStream
              from pprint import pprint

              # Enter a context with an instance of the API client
              with apivideo.AuthenticatedApiClient(__API_KEY__) as api_client:
                  # Create an instance of the API class
                  api_instance = live_streams_api.LiveStreamsApi(api_client)
                  live_stream_id = "li400mYKSgQ6xs7taUeSaEKr" # str | The unique ID for the live stream that you want to update information for such as player details.
                  live_stream_update_payload = LiveStreamUpdatePayload(
                      name="My Live Stream Video",
                      public=True,
                      player_id="pl45KFKdlddgk654dspkze",
                      restreams=[
                          RestreamsRequestObject(
                              name="My RTMP server",
                              server_url="rtmp://my.broadcast.example.com",
                              stream_key="dw-dew8-q6w9-k67w-1ws8",
                          ),
                      ],
                  ) # LiveStreamUpdatePayload | 

                  # example passing only required values which don't have defaults set
                  try:
                      # Update a live stream
                      api_response = api_instance.update(live_stream_id, live_stream_update_payload)
                      pprint(api_response)
                  except apivideo.ApiException as e:
                      print("Exception when calling LiveStreamsApi->update: %s\
              " % e)
          - language: java
            code: |
              // First add the "video.api:java-api-client" maven dependency to your project
              // Documentation: https://github.com/apivideo/api.video-java-client/blob/main/docs/LiveStreamsApi.md#update

              import video.api.client.ApiVideoClient;
              import video.api.client.api.ApiException;
              import video.api.client.api.models.*;
              import video.api.client.api.clients.LiveStreamsApi;
              import java.util.*;

              public class Example {
                public static void main(String[] args) {
                  ApiVideoClient client = new ApiVideoClient("YOUR_API_KEY");
                  // if you rather like to use the sandbox environment:
                  // ApiVideoClient client = new ApiVideoClient("YOUR_SANDBOX_API_KEY", ApiVideoClient.Environment.SANDBOX);

                  LiveStreamsApi apiInstance = client.liveStreams();
                  
                  String liveStreamId = "li400mYKSgQ6xs7taUeSaEKr"; // The unique ID for the live stream that you want to update information for such as player details.
                  LiveStreamUpdatePayload liveStreamUpdatePayload = new LiveStreamUpdatePayload(); // 
                  liveStreamUpdatePayload.setName("My Live Stream Video"); // The name you want to use for your live stream.
                  liveStreamUpdatePayload.setPublic(); // Whether your video can be viewed by everyone, or requires authentication to see it. A setting of false will require a unique token for each view.
                  liveStreamUpdatePayload.setPlayerId("pl45KFKdlddgk654dspkze"); // The unique ID for the player associated with a live stream that you want to update.
                  liveStreamUpdatePayload.setRestreams(Collections.singletonList(new RestreamsRequestObject() // Use this parameter to add, edit, or remove RTMP services where you want to restream a live stream. The list can only contain up to 5 destinations. This operation updates all restream destinations in the same request. If you do not want to modify an existing restream destination, you need to include it in your request, otherwise it is removed.
                        .name("My RTMP server")
                        .serverUrl("rtmp://my.broadcast.example.com/app")
                        .streamKey("dw-dew8-q6w9-k67w-1ws8")));


                  try {
                    LiveStream result = apiInstance.update(liveStreamId, liveStreamUpdatePayload);
                    System.out.println(result);
                  } catch (ApiException e) {
                    System.err.println("Exception when calling LiveStreamsApi#update");
                    System.err.println("Status code: " + e.getCode());
                    System.err.println("Reason: " + e.getMessage());
                    System.err.println("Response headers: " + e.getResponseHeaders());
                    e.printStackTrace();
                  }
                }
              }
          - language: csharp
            code: |
              // First add the "ApiVideo" NuGet package to your project
              // Documentation: https://github.com/apivideo/api.video-csharp-client/blob/main/docs/LiveStreamsApi.md#update

              using System.Diagnostics;
              using ApiVideo.Client;

              namespace Example
              {
                  public class updateExample
                  {
                      public static void Main()
                      {
                          var basePath = ApiVideoClient.Client.Environment.SANDBOX;
                          var apiKey = "YOUR_API_KEY";

                          var apiInstance = new ApiVideoClient(apiKey,basePath);

                          var liveStreamId = li400mYKSgQ6xs7taUeSaEKr;  // string | The unique ID for the live stream that you want to update information for such as player details.
                          var liveStreamUpdatePayload = new LiveStreamUpdatePayload(); // LiveStreamUpdatePayload | 
                          var apiLiveStreamsInstance = apiInstance.LiveStreams();
                          try
                          {
                              // Update a live stream
                              LiveStream result = apiLiveStreamsInstance.update(liveStreamId, liveStreamUpdatePayload);
                              Debug.WriteLine(result);
                          }
                          catch (ApiException  e)
                          {
                              Debug.Print("Exception when calling LiveStreamsApi.update: " + e.Message );
                              Debug.Print("Status Code: "+ e.ErrorCode);
                              Debug.Print(e.StackTrace);
                          }
                      }
                  }
              }
          - language: php
            code: |-
              <?php
              // First install the api client: "composer require api-video/php-api-client"
              // Documentation: https://github.com/apivideo/api.video-php-client/blob/main/docs/Api/LiveStreamsApi.md#update

              require __DIR__ . '/vendor/autoload.php';

              $client = new \ApiVideo\Client\Client(
                  'https://ws.api.video',
                  'YOUR_API_KEY',
                  new \Symfony\Component\HttpClient\Psr18Client()
              ); 

              $liveStreamId = 'li400mYKSgQ6xs7taUeSaEKr'; // The unique ID for the live stream that you want to update information for such as player details.

              $liveStreamUpdatePayload = (new \ApiVideo\Client\Model\LiveStreamUpdatePayload())
                  ->setName("My Live Stream Video") // The name you want to use for your live stream.)
                  ->setPublic(true) // Whether your video can be viewed by everyone, or requires authentication to see it. )
                  ->setPlayerId("pl45KFKdlddgk654dspkze") // The unique ID for the player associated with a live stream that you want to update.)
                  ->setRestreams(array(
                    new RestreamsRequestObject(['name' => 'My RTMP server', 'serverUrl' => 'rtmp://my.broadcast.example.com/app', 'streamKey' => 'dw-dew8-q6w9-k67w-1ws8'])));


              $liveStream = $client->liveStreams()->update($liveStreamId, $liveStreamUpdatePayload); 
          - language: swift
            code: |
              // First install the api client: https://github.com/apivideo/api.video-swift-client#getting-started
              // Documentation: https://github.com/apivideo/api.video-swift-client/blob/main/docs/LiveStreamsAPI.md#update

              ApiVideoClient.apiKey = "YOUR_API_KEY"

              let liveStreamId = "li400mYKSgQ6xs7taUeSaEKr" // String | The unique ID for the live stream that you want to update information for such as player details.
              let liveStreamUpdatePayload = LiveStreamUpdatePayload(
                  name: "My Live Stream Video",
                  _public: true,
                  playerId: "pl4f4ferf5erfr5zed4fsdd",
                  restreams: [RestreamsRequestObject(
                      name: "My RTMP server",
                      serverUrl: "rtmp://my.broadcast.example.com/app",
                      streamKey: "dw-dew8-q6w9-k67w-1ws8"
                  )]
              )

              LiveStreamsAPI.update(liveStreamId: liveStreamId, liveStreamUpdatePayload: liveStreamUpdatePayload) { liveStream, error in
                 if let liveStream = liveStream  {
                     // Do something with the livestream
                 }
                 if let error = error {
                    // Manage update error here
                 }
              }
  '/live-streams/{liveStreamId}/thumbnail':
    post:
      tags:
        - Live Streams
      summary: Upload a thumbnail
      description: Upload the thumbnail for the livestream.
      operationId: POST_live-streams-liveStreamId-thumbnail
      parameters:
        - name: liveStreamId
          in: path
          description: The unique ID for the live stream you want to upload.
          required: true
          style: simple
          explode: false
          schema:
            type: string
          example: vi4k0jvEUuaTdRAEjQ4Jfrgz
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/live-stream-thumbnail-upload-payload'
      responses:
        '201':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/live-stream'
        '400':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/bad-request'
              examples:
                response:
                  value:
                    status: 400
                    type: 'https://docs.api.video/reference/uploaded-file-extension-invalid'
                    title: 'Only [jpeg, jpg, JPG, JPEG] extensions are supported.'
                    name: file
        '404':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/not-found'
              examples:
                response:
                  value:
                    type: 'https://docs.api.video/reference/resource-not-found'
                    title: The requested resource was not found.
                    name: liveStreamId
                    status: 404
        '429':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/too-many-requests'
              examples:
                Too many requests:
                  value:
                    type: 'https://docs.api.video/reference/too-many-requests'
                    title: Too many requests.
                    status: 429
      security:
        - apiKey: []
      x-client-action: uploadThumbnail
      x-doctave:
        code-samples:
          - language: go
            code: |
              // First install the go client with "go get github.com/apivideo/api.video-go-client"
              // Documentation: https://github.com/apivideo/api.video-go-client/blob/main/docs/LiveStreamsApi.md#uploadThumbnail

              package main

              import (
                  "context"
                  "fmt"
                  "os"
                  apivideosdk "github.com/apivideo/api.video-go-client"
              )

              func main() {
                  client := apivideosdk.ClientBuilder("YOUR_API_KEY").Build()
                  // if you rather like to use the sandbox environment:
                  // client := apivideosdk.SandboxClientBuilder("YOUR_SANDBOX_API_KEY").Build()
                      
                  liveStreamId := "vi4k0jvEUuaTdRAEjQ4Jfrgz" // string | The unique ID for the live stream you want to upload.
                  file := os.NewFile(1234, "some_file") // *os.File | The image to be added as a thumbnail.

                  
                  res, err := client.LiveStreams.UploadThumbnailFile(liveStreamId, file)

                  // you can also use a Reader instead of a File:
                  // client.LiveStreams.UploadThumbnail(liveStreamId, fileName, fileReader)

                  if err != nil {
                      fmt.Fprintf(os.Stderr, "Error when calling `LiveStreams.UploadThumbnail``: %v\
              ", err)
                  }
                  // response from `UploadThumbnail`: LiveStream
                  fmt.Fprintf(os.Stdout, "Response from `LiveStreams.UploadThumbnail`: %v\
              ", res)
              }
          - language: node
            code: |
              // First install the "@api.video/nodejs-client" npm package
              // Documentation: https://github.com/apivideo/api.video-nodejs-client/blob/main/doc/api/LiveStreamsApi.md#uploadThumbnail

              const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" });

              const liveStreamId = 'vi4k0jvEUuaTdRAEjQ4Jfrgz'; // The unique ID for the live stream you want to upload.
              const file = './thumbnail.jpg'; // The image to be added as a thumbnail.

              const livestream = await client.liveStreams.uploadThumbnail(liveStreamId, file);
          - language: python
            code: |
              # First install the api client with "pip install api.video"
              # Documentation: https://github.com/apivideo/api.video-python-client/blob/main/docs/LiveStreamsApi.md#uploadThumbnail

              import apivideo
              from apivideo.api import live_streams_api
              from apivideo.model.bad_request import BadRequest
              from apivideo.model.not_found import NotFound
              from apivideo.model.live_stream import LiveStream
              from pprint import pprint

              # Enter a context with an instance of the API client
              with apivideo.AuthenticatedApiClient(__API_KEY__) as api_client:
                  # Create an instance of the API class
                  api_instance = live_streams_api.LiveStreamsApi(api_client)
                  live_stream_id = "vi4k0jvEUuaTdRAEjQ4Jfrgz" # str | The unique ID for the live stream you want to upload.
                  file = open('/path/to/file', 'rb') # file_type | The image to be added as a thumbnail.

                  # example passing only required values which don't have defaults set
                  try:
                      # Upload a thumbnail
                      api_response = api_instance.upload_thumbnail(live_stream_id, file)
                      pprint(api_response)
                  except apivideo.ApiException as e:
                      print("Exception when calling LiveStreamsApi->upload_thumbnail: %s\n" % e)
          - language: java
            code: |
              // First add the "video.api:java-api-client" maven dependency to your project
              // Documentation: https://github.com/apivideo/api.video-java-client/blob/main/docs/LiveStreamsApi.md#uploadThumbnail

              import video.api.client.ApiVideoClient;
              import video.api.client.api.ApiException;
              import video.api.client.api.models.*;
              import video.api.client.api.clients.LiveStreamsApi;
              import java.util.*;

              public class Example {
                public static void main(String[] args) {
                  ApiVideoClient client = new ApiVideoClient("YOUR_API_KEY");
                  // if you rather like to use the sandbox environment:
                  // ApiVideoClient client = new ApiVideoClient("YOUR_SANDBOX_API_KEY", ApiVideoClient.Environment.SANDBOX);

                  LiveStreamsApi apiInstance = client.liveStreams();
                  
                  String liveStreamId = "vi4k0jvEUuaTdRAEjQ4Jfrgz"; // The unique ID for the live stream you want to upload.
                  File file = new File("/path/to/file"); // The image to be added as a thumbnail.

                  try {
                    LiveStream result = apiInstance.uploadThumbnail(liveStreamId, file);
                    System.out.println(result);
                  } catch (ApiException e) {
                    System.err.println("Exception when calling LiveStreamsApi#uploadThumbnail");
                    System.err.println("Status code: " + e.getCode());
                    System.err.println("Reason: " + e.getMessage());
                    System.err.println("Response headers: " + e.getResponseHeaders());
                    e.printStackTrace();
                  }
                }
              }
          - language: csharp
            code: |
              // First add the "ApiVideo" NuGet package to your project
              // Documentation: https://github.com/apivideo/api.video-csharp-client/blob/main/docs/LiveStreamsApi.md#uploadThumbnail

              using System.Diagnostics;
              using ApiVideo.Client;

              namespace Example
              {
                  public class uploadThumbnailExample
                  {
                      public static void Main()
                      {
                          var basePath = ApiVideoClient.Client.Environment.SANDBOX;
                          var apiKey = "YOUR_API_KEY";

                          var apiInstance = new ApiVideoClient(apiKey,basePath);

                          var liveStreamId = vi4k0jvEUuaTdRAEjQ4Jfrgz;  // string | The unique ID for the live stream you want to upload.
                          var file = BINARY_DATA_HERE;  // System.IO.Stream | The image to be added as a thumbnail.
                          var apiLiveStreamsInstance = apiInstance.LiveStreams();
                          try
                          {
                              // Upload a thumbnail
                              LiveStream result = apiLiveStreamsInstance.uploadThumbnail(liveStreamId, file);
                              Debug.WriteLine(result);
                          }
                          catch (ApiException  e)
                          {
                              Debug.Print("Exception when calling LiveStreamsApi.uploadThumbnail: " + e.Message );
                              Debug.Print("Status Code: "+ e.ErrorCode);
                              Debug.Print(e.StackTrace);
                          }
                      }
                  }
              }
          - language: php
            code: |-
              <?php
              // First install the api client: "composer require api-video/php-api-client"
              // Documentation: https://github.com/apivideo/api.video-php-client/blob/main/docs/Api/LiveStreamsApi.md#uploadThumbnail

              require __DIR__ . '/vendor/autoload.php';

              $client = new \ApiVideo\Client\Client(
                  'https://ws.api.video',
                  'YOUR_API_KEY',
                  new \Symfony\Component\HttpClient\Psr18Client()
              ); 

              $liveStreamId = 'vi4k0jvEUuaTdRAEjQ4Jfrgz'; // The unique ID for the live stream you want to upload.
              $file = new SplFileObject(__DIR__ . './thumbnail.jpg'); // The image to be added as a thumbnail.

              $livestream = $client->liveStreams()->uploadThumbnail($liveStreamId, $file); 
          - language: swift
            code: |
              // First install the api client: https://github.com/apivideo/api.video-swift-client#getting-started
              // Documentation: https://github.com/apivideo/api.video-swift-client/blob/main/docs/LiveStreamsAPI.md#uploadThumbnail
    delete:
      tags:
        - Live Streams
      summary: Delete a thumbnail
      description: Send the unique identifier for a live stream to delete its thumbnail.
      operationId: DELETE_live-streams-liveStreamId-thumbnail
      parameters:
        - name: liveStreamId
          in: path
          description: The unique identifier of the live stream whose thumbnail you want to delete.
          required: true
          style: simple
          explode: false
          schema:
            type: string
          example: li400mYKSgQ6xs7taUeSaEKr
      responses:
        '200':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/live-stream'
        '404':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/not-found'
              examples:
                response:
                  value:
                    type: 'https://docs.api.video/reference/resource-not-found'
                    title: The requested resource was not found.
                    name: liveStreamId
                    status: 404
        '429':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/too-many-requests'
              examples:
                Too many requests:
                  value:
                    type: 'https://docs.api.video/reference/too-many-requests'
                    title: Too many requests.
                    status: 429
      security:
        - apiKey: []
      x-client-action: deleteThumbnail
      x-doctave:
        code-samples:
          - language: go
            code: |
              // First install the go client with "go get github.com/apivideo/api.video-go-client"
              // Documentation: https://github.com/apivideo/api.video-go-client/blob/main/docs/LiveStreamsApi.md#deleteThumbnail

              package main

              import (
                  "context"
                  "fmt"
                  "os"
                  apivideosdk "github.com/apivideo/api.video-go-client"
              )

              func main() {
                  client := apivideosdk.ClientBuilder("YOUR_API_KEY").Build()
                  // if you rather like to use the sandbox environment:
                  // client := apivideosdk.SandboxClientBuilder("YOUR_SANDBOX_API_KEY").Build()
                      
                  liveStreamId := "li400mYKSgQ6xs7taUeSaEKr" // string | The unique identifier for the live stream you want to delete. 

                  
                  res, err := client.LiveStreams.DeleteThumbnail(liveStreamId)

                  if err != nil {
                      fmt.Fprintf(os.Stderr, "Error when calling `LiveStreams.DeleteThumbnail``: %v\
              ", err)
                  }
                  // response from `DeleteThumbnail`: LiveStream
                  fmt.Fprintf(os.Stdout, "Response from `LiveStreams.DeleteThumbnail`: %v\
              ", res)
              }
          - language: node
            code: |-
              // First install the "@api.video/nodejs-client" npm package
              // Documentation: https://github.com/apivideo/api.video-nodejs-client/blob/main/doc/api/LiveStreamsApi.md#deleteThumbnail

              const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" });

              const liveStreamId = 'li400mYKSgQ6xs7taUeSaEKr'; // The unique ID for the live stream whose thumbnail you want to delete.

              const liveStream = await client.liveStreams.deleteThumbnail(liveStreamId); 
          - language: python
            code: |
              # First install the api client with "pip install api.video"
              # Documentation: https://github.com/apivideo/api.video-python-client/blob/main/docs/LiveStreamsApi.md#deleteThumbnail

              import apivideo
              from apivideo.api import live_streams_api
              from apivideo.model.not_found import NotFound
              from apivideo.model.live_stream import LiveStream
              from pprint import pprint

              # Enter a context with an instance of the API client
              with apivideo.AuthenticatedApiClient(__API_KEY__) as api_client:
                  # Create an instance of the API class
                  api_instance = live_streams_api.LiveStreamsApi(api_client)
                  live_stream_id = "li400mYKSgQ6xs7taUeSaEKr" # str | The unique identifier for the live stream you want to delete. 

                  # example passing only required values which don't have defaults set
                  try:
                      # Delete a thumbnail
                      api_response = api_instance.delete_thumbnail(live_stream_id)
                      pprint(api_response)
                  except apivideo.ApiException as e:
                      print("Exception when calling LiveStreamsApi->delete_thumbnail: %s\
              " % e)
          - language: java
            code: |
              // First add the "video.api:java-api-client" maven dependency to your project
              // Documentation: https://github.com/apivideo/api.video-java-client/blob/main/docs/LiveStreamsApi.md#deleteThumbnail

              import video.api.client.ApiVideoClient;
              import video.api.client.api.ApiException;
              import video.api.client.api.models.*;
              import video.api.client.api.clients.LiveStreamsApi;
              import java.util.*;

              public class Example {
                public static void main(String[] args) {
                  ApiVideoClient client = new ApiVideoClient("YOUR_API_KEY");
                  // if you rather like to use the sandbox environment:
                  // ApiVideoClient client = new ApiVideoClient("YOUR_SANDBOX_API_KEY", ApiVideoClient.Environment.SANDBOX);

                  LiveStreamsApi apiInstance = client.liveStreams();
                  
                  String liveStreamId = "li400mYKSgQ6xs7taUeSaEKr"; // The unique identifier for the live stream you want to delete. 

                  try {
                    LiveStream result = apiInstance.deleteThumbnail(liveStreamId);
                    System.out.println(result);
                  } catch (ApiException e) {
                    System.err.println("Exception when calling LiveStreamsApi#deleteThumbnail");
                    System.err.println("Status code: " + e.getCode());
                    System.err.println("Reason: " + e.getMessage());
                    System.err.println("Response headers: " + e.getResponseHeaders());
                    e.printStackTrace();
                  }
                }
              }
          - language: csharp
            code: |
              // First add the "ApiVideo" NuGet package to your project
              // Documentation: https://github.com/apivideo/api.video-csharp-client/blob/main/docs/LiveStreamsApi.md#deleteThumbnail

              using System.Diagnostics;
              using ApiVideo.Client;

              namespace Example
              {
                  public class deleteThumbnailExample
                  {
                      public static void Main()
                      {
                          var basePath = ApiVideoClient.Client.Environment.SANDBOX;
                          var apiKey = "YOUR_API_KEY";

                          var apiInstance = new ApiVideoClient(apiKey,basePath);

                          var liveStreamId = li400mYKSgQ6xs7taUeSaEKr;  // string | The unique identifier for the live stream you want to delete. 
                          var apiLiveStreamsInstance = apiInstance.LiveStreams();
                          try
                          {
                              // Delete a thumbnail
                              LiveStream result = apiLiveStreamsInstance.deleteThumbnail(liveStreamId);
                              Debug.WriteLine(result);
                          }
                          catch (ApiException  e)
                          {
                              Debug.Print("Exception when calling LiveStreamsApi.deleteThumbnail: " + e.Message );
                              Debug.Print("Status Code: "+ e.ErrorCode);
                              Debug.Print(e.StackTrace);
                          }
                      }
                  }
              }
          - language: php
            code: |-
              <?php
              // First install the api client: "composer require api-video/php-api-client"
              // Documentation: https://github.com/apivideo/api.video-php-client/blob/main/docs/Api/LiveStreamsApi.md#get

              require __DIR__ . '/vendor/autoload.php';

              $client = new \ApiVideo\Client\Client(
                  'https://ws.api.video',
                  'YOUR_API_KEY',
                  new \Symfony\Component\HttpClient\Psr18Client()
              ); 

              $liveStreamId = 'li400mYKSgQ6xs7taUeSaEKr'; // The unique ID for the live stream you want to watch.
              $liveStream = $client->liveStreams()->get(liveStreamId); 
          - language: swift
            code: |
              // First install the api client: https://github.com/apivideo/api.video-swift-client#getting-started
              // Documentation: https://github.com/apivideo/api.video-swift-client/blob/main/docs/LiveStreamsAPI.md#deleteThumbnail
  '/live-streams/{liveStreamId}/complete':
    put:
      tags:
        - Live Streams
      summary: Complete a live stream
      description: |
        Request the completion of a live stream that is currently running. This operation is asynchronous and the live stream will stop after a few seconds. 
        
        The API adds the `EXT-X-ENDLIST` tag to the live stream's HLS manifest. This stops the live stream on the player and also stops the recording of the live stream. The API keeps the incoming connection from the streamer open for at most 1 minute, which can be used to terminate the stream.
      operationId: PUT_live-streams-liveStreamId-complete
      parameters:
        - name: liveStreamId
          in: path
          description: The unique ID for the live stream you want to complete.
          required: true
          style: simple
          explode: false
          schema:
            type: string
          example: vi4k0jvEUuaTdRAEjQ4Jfrgz
      responses:
        '202':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Accepted
        '404':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/not-found'
              examples:
                response:
                  value:
                    type: 'https://docs.api.video/reference/resource-not-found'
                    title: The requested resource was not found.
                    name: liveStreamId
                    status: 404
        '429':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/too-many-requests'
              examples:
                Too many requests:
                  value:
                    type: 'https://docs.api.video/reference/too-many-requests'
                    title: Too many requests.
                    status: 429
      security:
        - apiKey: []
      x-client-action: complete
      x-doctave:
        code-samples:
  '/videos/{videoId}/captions/{language}':
    get:
      tags:
        - Captions
      summary: Retrieve a caption
      description: Retrieve a caption for a video in a specific language.
      x-client-description:
        default: |-
          Retrieve a caption for a video in a specific language. If the language is available, the caption is returned. Otherwise, you will get a error indicating the caption was not found.
          Tutorials that use the [captions endpoint](https://api.video/blog/endpoints/captions).
      operationId: GET_videos-videoId-captions-language
      parameters:
        - name: videoId
          in: path
          description: The unique identifier for the video you want captions for.
          required: true
          style: simple
          explode: false
          schema:
            type: string
          example: vi4k0jvEUuaTdRAEjQ4Prklg
        - name: language
          in: path
          description: |-
            A valid language identifier using IETF language tags. You can use primary subtags like `en` (English), extended subtags like `fr-CA` (French, Canada), or region subtags like `zh-Hans-CN` (Simplified Chinese used in the PRC).

            - This parameter **only accepts dashes for separators**, for example `fr-CA`. If you use a different separator in your request, the API returns an error.
            - When the value in your request does not match any covered language, the API returns an error.
            - You can find the list of supported tags [here](https://docs.api.video/vod/add-captions#supported-caption-language-tags).
          required: true
          style: simple
          explode: false
          schema:
            type: string
          example: en
      responses:
        '200':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/caption'
              examples:
                response:
                  value:
                    uri: /videos/vi3N6cDinStg3oBbN79GklWS/captions/en
                    src: 'https://cdn.api.video/vod/vi3N6cDinStg3oBbN79GklWS/captions/en.vtt'
                    srclang: en
                    languageName: English
                    default: false
        '400':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Bad request error
          content:
            application/json:
              schema:
                title: Bad request error
                $ref: '#/components/schemas/bad-request'
              examples:
                Invalid language formatting:
                  description: This error occurs when the language tag you provided contains characters other than letters and dashes.
                  value:
                    type: https://docs.api.video/reference/invalid-attribute
                    title: An attribute is invalid.
                    status: 400
                    detail: The "language" attribute must contain only letters and dashes (for example "fr", "fr-BE").
                    name: language
                Invalid language:
                  description: This error occurs when the language tag you provided does not match any supported language.
                  value:
                    type: https://docs.api.video/reference/invalid-attribute
                    title: An attribute is invalid.
                    status: 400
                    detail: The "language" attribute is not valid.
                    name: language
        '404':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/not-found'
        '429':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/too-many-requests'
              examples:
                Too many requests:
                  value:
                    type: 'https://docs.api.video/reference/too-many-requests'
                    title: Too many requests.
                    status: 429
      security:
        - apiKey: []
      x-client-action: get
      x-doctave:
        code-samples:
          - language: go
            code: |
              // First install the go client with "go get github.com/apivideo/api.video-go-client"
              // Documentation: https://github.com/apivideo/api.video-go-client/blob/main/docs/CaptionsApi.md#get

              package main

              import (
                  "context"
                  "fmt"
                  "os"
                  apivideosdk "github.com/apivideo/api.video-go-client"
              )

              func main() {
                  client := apivideosdk.ClientBuilder("YOUR_API_KEY").Build()
                  // if you rather like to use the sandbox environment:
                  // client := apivideosdk.SandboxClientBuilder("YOUR_SANDBOX_API_KEY").Build()
                      
                  videoId := "vi4k0jvEUuaTdRAEjQ4Prklg" // string | The unique identifier for the video you want captions for.
                  language := "en" // string | A valid language identifier using IETF language tags. You can use primary subtags like `en` (English), extended subtags like `fr-CA` (French, Canada), or region subtags like `zh-Hans-CN` (Simplified Chinese used in the PRC).

                  
                  res, err := client.Captions.Get(videoId, language)

                  if err != nil {
                      fmt.Fprintf(os.Stderr, "Error when calling `Captions.Get``: %v\
              ", err)
                  }
                  // response from `Get`: Caption
                  fmt.Fprintf(os.Stdout, "Response from `Captions.Get`: %v\
              ", res)
              }
          - language: node
            code: |
              // First install the "@api.video/nodejs-client" npm package
              // Documentation: https://github.com/apivideo/api.video-nodejs-client/blob/main/doc/api/CaptionsApi.md#get

              const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" });

              const videoId = 'vi4k0jvEUuaTdRAEjQ4Prklg'; // The unique identifier for the video you want captions for.
              const language = 'en'; // A valid language identifier using IETF language tags. You can use primary subtags like `en` (English), extended subtags like `fr-CA` (French, Canada), or region subtags like `zh-Hans-CN` (Simplified Chinese used in the PRC).

              const caption = await client.captions.get(videoId, language);
          - language: python
            code: |
              # First install the api client with "pip install api.video"
              # Documentation: https://github.com/apivideo/api.video-python-client/blob/main/docs/CaptionsApi.md#get

              import apivideo
              from apivideo.api import captions_api
              from apivideo.model.not_found import NotFound
              from apivideo.model.caption import Caption
              from pprint import pprint

              # Enter a context with an instance of the API client
              with apivideo.AuthenticatedApiClient(__API_KEY__) as api_client:
                  # Create an instance of the API class
                  api_instance = captions_api.CaptionsApi(api_client)
                  video_id = "vi4k0jvEUuaTdRAEjQ4Prklg" # str | The unique identifier for the video you want captions for.
                  language = "en" # str | A valid language identifier using IETF language tags. You can use primary subtags like `en` (English), extended subtags like `fr-CA` (French, Canada), or region subtags like `zh-Hans-CN` (Simplified Chinese used in the PRC).

                  # example passing only required values which don't have defaults set
                  try:
                      # Show a caption
                      api_response = api_instance.get(video_id, language)
                      pprint(api_response)
                  except apivideo.ApiException as e:
                      print("Exception when calling CaptionsApi->get: %s\n" % e)
          - language: java
            code: |
              // First add the "video.api:java-api-client" maven dependency to your project
              // Documentation: https://github.com/apivideo/api.video-java-client/blob/main/docs/CaptionsApi.md#get

              import video.api.client.ApiVideoClient;
              import video.api.client.api.ApiException;
              import video.api.client.api.models.*;
              import video.api.client.api.clients.CaptionsApi;
              import java.util.*;

              public class Example {
                public static void main(String[] args) {
                  ApiVideoClient client = new ApiVideoClient("YOUR_API_KEY");
                  // if you rather like to use the sandbox environment:
                  // ApiVideoClient client = new ApiVideoClient("YOUR_SANDBOX_API_KEY", ApiVideoClient.Environment.SANDBOX);

                  CaptionsApi apiInstance = client.captions();
                  
                  String videoId = "vi4k0jvEUuaTdRAEjQ4Prklg"; // The unique identifier for the video you want captions for.
                  String language = "en"; // A valid language identifier using IETF language tags. You can use primary subtags like `en` (English), extended subtags like `fr-CA` (French, Canada), or region subtags like `zh-Hans-CN` (Simplified Chinese used in the PRC).

                  try {
                    Caption result = apiInstance.get(videoId, language);
                    System.out.println(result);
                  } catch (ApiException e) {
                    System.err.println("Exception when calling CaptionsApi#get");
                    System.err.println("Status code: " + e.getCode());
                    System.err.println("Reason: " + e.getMessage());
                    System.err.println("Response headers: " + e.getResponseHeaders());
                    e.printStackTrace();
                  }
                }
              }
          - language: csharp
            code: |
              // First add the "ApiVideo" NuGet package to your project
              // Documentation: https://github.com/apivideo/api.video-csharp-client/blob/main/docs/CaptionsApi.md#get

              using System.Diagnostics;
              using ApiVideo.Client;

              namespace Example
              {
                  public class getExample
                  {
                      public static void Main()
                      {
                          var basePath = ApiVideoClient.Client.Environment.SANDBOX;
                          var apiKey = "YOUR_API_KEY";

                          var apiInstance = new ApiVideoClient(apiKey,basePath);

                          var videoId = vi4k0jvEUuaTdRAEjQ4Prklg;  // string | The unique identifier for the video you want captions for.
                          var language = en;  // string | A valid language identifier using IETF language tags. You can use primary subtags like `en` (English), extended subtags like `fr-CA` (French, Canada), or region subtags like `zh-Hans-CN` (Simplified Chinese used in the PRC).
                          var apiCaptionsInstance = apiInstance.Captions();
                          try
                          {
                              // Show a caption
                              Caption result = apiCaptionsInstance.get(videoId, language);
                              Debug.WriteLine(result);
                          }
                          catch (ApiException  e)
                          {
                              Debug.Print("Exception when calling CaptionsApi.get: " + e.Message );
                              Debug.Print("Status Code: "+ e.ErrorCode);
                              Debug.Print(e.StackTrace);
                          }
                      }
                  }
              }
          - language: php
            code: |-
              <?php
              // First install the api client: "composer require api-video/php-api-client"
              // Documentation: https://github.com/apivideo/api.video-php-client/blob/main/docs/Api/CaptionsApi.md#get

              require __DIR__ . '/vendor/autoload.php';

              $videoId = 'vi4k0jvEUuaTdRAEjQ4Prklg'; // The unique identifier for the video you want captions for.
              $language = 'en'; // A valid language identifier using IETF language tags. You can use primary subtags like `en` (English), extended subtags like `fr-CA` (French, Canada), or region subtags like `zh-Hans-CN` (Simplified Chinese used in the PRC).

              $client->captions()->get($videoId, $language); 
          - language: swift
            code: |
              // First install the api client: https://github.com/apivideo/api.video-swift-client#getting-started
              // Documentation: https://github.com/apivideo/api.video-swift-client/blob/main/docs/CaptionsAPI.md#get
    post:
      tags:
        - Captions
      summary: Upload a caption
      description: 'Upload a VTT file to add captions to your video. More information can be found [here](https://docs.api.video/vod/add-captions)'
      operationId: POST_videos-videoId-captions-language
      parameters:
        - name: videoId
          in: path
          description: The unique identifier for the video you want to add a caption to.
          required: true
          style: simple
          explode: false
          schema:
            type: string
          example: vi4k0jvEUuaTdRAEjQ4Prklg
        - name: language
          in: path
          description: |-
            A valid language identifier using IETF language tags. You can use primary subtags like `en` (English), extended subtags like `fr-CA` (French, Canada), or region subtags like `zh-Hans-CN` (Simplified Chinese used in the PRC).

            - This parameter **only accepts dashes for separators**, for example `fr-CA`. If you use a different separator in your request, the API returns an error.
            - When the value in your request does not match any covered language, the API returns an error.
            - You can find the list of supported tags [here](https://docs.api.video/vod/add-captions#supported-caption-language-tags).
          required: true
          style: simple
          explode: false
          schema:
            type: string
          example: en
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/captions-upload-payload'
      responses:
        '200':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/caption'
              examples:
                response:
                  value:
                    uri: /videos/vi3N6cDinStg3oBbN79GklWS/captions/en
                    src: 'https://cdn.api.video/vod/vi3N6cDinStg3oBbN79GklWS/captions/en.vtt'
                    srclang: en
                    languageName: English
                    default: false
        '400':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Bad request error
          content:
            application/json:
              schema:
                title: Bad request error
                $ref: '#/components/schemas/bad-request'
              examples:
                Invalid language formatting:
                  description: This error occurs when the language tag you provided contains characters other than letters and dashes.
                  value:
                    type: https://docs.api.video/reference/invalid-attribute
                    title: An attribute is invalid.
                    status: 400
                    detail: The "language" attribute must contain only letters and dashes (for example "fr", "fr-BE").
                    name: language
                Invalid language:
                  description: This error occurs when the language tag you provided does not match any supported language.
                  value:
                    type: https://docs.api.video/reference/invalid-attribute
                    title: An attribute is invalid.
                    status: 400
                    detail: The "language" attribute is not valid.
                    name: language
        '404':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/not-found'
        '429':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/too-many-requests'
              examples:
                Too many requests:
                  value:
                    type: 'https://docs.api.video/reference/too-many-requests'
                    title: Too many requests.
                    status: 429
      security:
        - apiKey: []
      x-client-action: upload
      x-doctave:
        code-samples:
          - language: go
            code: |
              // First install the go client with "go get github.com/apivideo/api.video-go-client"
              // Documentation: https://github.com/apivideo/api.video-go-client/blob/main/docs/CaptionsApi.md#upload

              package main

              import (
                  "context"
                  "fmt"
                  "os"
                  apivideosdk "github.com/apivideo/api.video-go-client"
              )

              func main() {
                  client := apivideosdk.ClientBuilder("YOUR_API_KEY").Build()
                  // if you rather like to use the sandbox environment:
                  // client := apivideosdk.SandboxClientBuilder("YOUR_SANDBOX_API_KEY").Build()
                      
                  videoId := "vi4k0jvEUuaTdRAEjQ4Prklg" // string | The unique identifier for the video you want to add a caption to.
                  language := "en" // string | A valid language identifier using IETF language tags. You can use primary subtags like `en` (English), extended subtags like `fr-CA` (French, Canada), or region subtags like `zh-Hans-CN` (Simplified Chinese used in the PRC).
                  file := os.NewFile(1234, "some_file") // *os.File | The video text track (VTT) you want to upload.

                  
                  res, err := client.Captions.UploadFile(videoId, language, file)

                  // you can also use a Reader instead of a File:
                  // client.Captions.Upload(videoId, language, fileName, fileReader)

                  if err != nil {
                      fmt.Fprintf(os.Stderr, "Error when calling `Captions.Upload``: %v\
              ", err)
                  }
                  // response from `Upload`: Caption
                  fmt.Fprintf(os.Stdout, "Response from `Captions.Upload`: %v\
              ", res)
              }
          - language: node
            code: |-
              // First install the "@api.video/nodejs-client" npm package
              // Documentation: https://github.com/apivideo/api.video-nodejs-client/blob/main/doc/api/CaptionsApi.md#upload

              const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" });

              const videoId = 'vi4k0jvEUuaTdRAEjQ4Prklg'; // The unique identifier for the video you want to add a caption to.
              const language = 'en'; // A valid language identifier using IETF language tags. You can use primary subtags like `en` (English), extended subtags like `fr-CA` (French, Canada), or region subtags like `zh-Hans-CN` (Simplified Chinese used in the PRC).
              const file = './en.vtt'; // The video text track (VTT) you want to upload.

              const caption = await client.captions.upload(videoId, language, file); 
          - language: python
            code: |
              # First install the api client with "pip install api.video"
              # Documentation: https://github.com/apivideo/api.video-python-client/blob/main/docs/CaptionsApi.md#upload

              import apivideo
              from apivideo.api import captions_api
              from apivideo.model.bad_request import BadRequest
              from apivideo.model.not_found import NotFound
              from apivideo.model.caption import Caption
              from pprint import pprint

              # Enter a context with an instance of the API client
              with apivideo.AuthenticatedApiClient(__API_KEY__) as api_client:
                  # Create an instance of the API class
                  api_instance = captions_api.CaptionsApi(api_client)
                  video_id = "vi4k0jvEUuaTdRAEjQ4Prklg" # str | The unique identifier for the video you want to add a caption to.
                  language = "en" # str | A valid language identifier using IETF language tags. You can use primary subtags like `en` (English), extended subtags like `fr-CA` (French, Canada), or region subtags like `zh-Hans-CN` (Simplified Chinese used in the PRC).
                  file = open('/path/to/file', 'rb') # file_type | The video text track (VTT) you want to upload.

                  # example passing only required values which don't have defaults set
                  try:
                      # Upload a caption
                      api_response = api_instance.upload(video_id, language, file)
                      pprint(api_response)
                  except apivideo.ApiException as e:
                      print("Exception when calling CaptionsApi->upload: %s\n" % e)
          - language: java
            code: |
              // First add the "video.api:java-api-client" maven dependency to your project
              // Documentation: https://github.com/apivideo/api.video-java-client/blob/main/docs/CaptionsApi.md#upload

              import video.api.client.ApiVideoClient;
              import video.api.client.api.ApiException;
              import video.api.client.api.models.*;
              import video.api.client.api.clients.CaptionsApi;
              import java.util.*;

              public class Example {
                public static void main(String[] args) {
                  ApiVideoClient client = new ApiVideoClient("YOUR_API_KEY");
                  // if you rather like to use the sandbox environment:
                  // ApiVideoClient client = new ApiVideoClient("YOUR_SANDBOX_API_KEY", ApiVideoClient.Environment.SANDBOX);

                  CaptionsApi apiInstance = client.captions();
                  
                  String videoId = "vi4k0jvEUuaTdRAEjQ4Prklg"; // The unique identifier for the video you want captions for.
                  String language = "en"; // A valid language identifier using IETF language tags. You can use primary subtags like `en` (English), extended subtags like `fr-CA` (French, Canada), or region subtags like `zh-Hans-CN` (Simplified Chinese used in the PRC).

                  try {
                    Caption result = apiInstance.get(videoId, language);
                    System.out.println(result);
                  } catch (ApiException e) {
                    System.err.println("Exception when calling CaptionsApi#get");
                    System.err.println("Status code: " + e.getCode());
                    System.err.println("Reason: " + e.getMessage());
                    System.err.println("Response headers: " + e.getResponseHeaders());
                    e.printStackTrace();
                  }
                }
              }
          - language: csharp
            code: |
              // First add the "ApiVideo" NuGet package to your project
              // Documentation: https://github.com/apivideo/api.video-csharp-client/blob/main/docs/CaptionsApi.md#upload

              using System.Diagnostics;
              using ApiVideo.Client;

              namespace Example
              {
                  public class uploadExample
                  {
                      public static void Main()
                      {
                          var basePath = ApiVideoClient.Client.Environment.SANDBOX;
                          var apiKey = "YOUR_API_KEY";

                          var apiInstance = new ApiVideoClient(apiKey,basePath);

                          var videoId = vi4k0jvEUuaTdRAEjQ4Prklg;  // string | The unique identifier for the video you want to add a caption to.
                          var language = en;  // string | A valid language identifier using IETF language tags. You can use primary subtags like `en` (English), extended subtags like `fr-CA` (French, Canada), or region subtags like `zh-Hans-CN` (Simplified Chinese used in the PRC).
                          var file = BINARY_DATA_HERE;  // System.IO.Stream | The video text track (VTT) you want to upload.
                          var apiCaptionsInstance = apiInstance.Captions();
                          try
                          {
                              // Upload a caption
                              Caption result = apiCaptionsInstance.upload(videoId, language, file);
                              Debug.WriteLine(result);
                          }
                          catch (ApiException  e)
                          {
                              Debug.Print("Exception when calling CaptionsApi.upload: " + e.Message );
                              Debug.Print("Status Code: "+ e.ErrorCode);
                              Debug.Print(e.StackTrace);
                          }
                      }
                  }
              }
          - language: php
            code: |-
              <?php
              // First install the api client: "composer require api-video/php-api-client"
              // Documentation: https://github.com/apivideo/api.video-php-client/blob/main/docs/Api/CaptionsApi.md#upload

              require __DIR__ . '/vendor/autoload.php';

              $videoId = 'vi4k0jvEUuaTdRAEjQ4Prklg'; // The unique identifier for the video you want to add a caption to.
              $language = 'en'; // A valid language identifier using IETF language tags. You can use primary subtags like `en` (English), extended subtags like `fr-CA` (French, Canada), or region subtags like `zh-Hans-CN` (Simplified Chinese used in the PRC).
              $file = new SplFileObject(__DIR__ . '/en.vtt'); // The video text track (VTT) you want to upload.

              $caption = $client->captions()->upload($videoId, $language, $file); 
          - language: swift
            code: |
              // First install the api client: https://github.com/apivideo/api.video-swift-client#getting-started
              // Documentation: https://github.com/apivideo/api.video-swift-client/blob/main/docs/CaptionsAPI.md#upload
    delete:
      tags:
        - Captions
      summary: Delete a caption
      description: Delete a caption in a specific language by by video id.
      operationId: DELETE_videos-videoId-captions-language
      parameters:
        - name: videoId
          in: path
          description: The unique identifier for the video you want to delete a caption from.
          required: true
          style: simple
          explode: false
          schema:
            type: string
          example: vi4k0jvEUuaTdRAEjQ4Prklgc
        - name: language
          in: path
          description: |-
            A valid language identifier using IETF language tags. You can use primary subtags like `en` (English), extended subtags like `fr-CA` (French, Canada), or region subtags like `zh-Hans-CN` (Simplified Chinese used in the PRC).

            - This parameter **only accepts dashes for separators**, for example `fr-CA`. If you use a different separator in your request, the API returns an error.
            - When the value in your request does not match any covered language, the API returns an error.
            - You can find the list of supported tags [here](https://docs.api.video/vod/add-captions#supported-caption-language-tags).
          required: true
          style: simple
          explode: false
          schema:
            type: string
          example: en
      responses:
        '204':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: No Content
        '400':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Bad request error
          content:
            application/json:
              schema:
                title: Bad request error
                $ref: '#/components/schemas/bad-request'
              examples:
                Invalid language formatting:
                  description: This error occurs when the language tag you provided contains characters other than letters and dashes.
                  value:
                    type: https://docs.api.video/reference/invalid-attribute
                    title: An attribute is invalid.
                    status: 400
                    detail: The "language" attribute must contain only letters and dashes (for example "fr", "fr-BE").
                    name: language
                Invalid language:
                  description: This error occurs when the language tag you provided does not match any supported language.
                  value:
                    type: https://docs.api.video/reference/invalid-attribute
                    title: An attribute is invalid.
                    status: 400
                    detail: The "language" attribute is not valid.
                    name: language
        '404':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/not-found'
        '429':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/too-many-requests'
              examples:
                Too many requests:
                  value:
                    type: 'https://docs.api.video/reference/too-many-requests'
                    title: Too many requests.
                    status: 429
      security:
        - apiKey: []
      x-client-action: delete
      x-doctave:
        code-samples:
          - language: go
            code: |
              // First install the go client with "go get github.com/apivideo/api.video-go-client"
              // Documentation: https://github.com/apivideo/api.video-go-client/blob/main/docs/CaptionsApi.md#delete

              package main

              import (
                  "context"
                  "fmt"
                  "os"
                  apivideosdk "github.com/apivideo/api.video-go-client"
              )

              func main() {
                  client := apivideosdk.ClientBuilder("YOUR_API_KEY").Build()
                  // if you rather like to use the sandbox environment:
                  // client := apivideosdk.SandboxClientBuilder("YOUR_SANDBOX_API_KEY").Build()
                      
                  videoId := "vi4k0jvEUuaTdRAEjQ4Prklgc" // string | The unique identifier for the video you want to delete a caption from.
                  language := "en" // string | A valid language identifier using IETF language tags. You can use primary subtags like `en` (English), extended subtags like `fr-CA` (French, Canada), or region subtags like `zh-Hans-CN` (Simplified Chinese used in the PRC).

                  
                  err := client.Captions.Delete(videoId, language)

                  if err != nil {
                      fmt.Fprintf(os.Stderr, "Error when calling `Captions.Delete``: %v\
              ", err)
                  }
              }
          - language: node
            code: |-
              // First install the "@api.video/nodejs-client" npm package
              // Documentation: https://github.com/apivideo/api.video-nodejs-client/blob/main/doc/api/CaptionsApi.md#delete

              const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" });

              const videoId = 'vi4k0jvEUuaTdRAEjQ4Prklgc'; // The unique identifier for the video you want to delete a caption from.
              const language = 'en'; // A valid language identifier using IETF language tags. You can use primary subtags like `en` (English), extended subtags like `fr-CA` (French, Canada), or region subtags like `zh-Hans-CN` (Simplified Chinese used in the PRC).

              await client.captions.delete(videoId, language);
               
          - language: python
            code: |
              # First install the api client with "pip install api.video"
              # Documentation: https://github.com/apivideo/api.video-python-client/blob/main/docs/CaptionsApi.md#delete

              import apivideo
              from apivideo.api import captions_api
              from apivideo.model.not_found import NotFound
              from pprint import pprint

              # Enter a context with an instance of the API client
              with apivideo.AuthenticatedApiClient(__API_KEY__) as api_client:
                  # Create an instance of the API class
                  api_instance = captions_api.CaptionsApi(api_client)
                  video_id = "vi4k0jvEUuaTdRAEjQ4Prklgc" # str | The unique identifier for the video you want to delete a caption from.
                  language = "en" # str | A valid language identifier using IETF language tags. You can use primary subtags like `en` (English), extended subtags like `fr-CA` (French, Canada), or region subtags like `zh-Hans-CN` (Simplified Chinese used in the PRC).

                  # example passing only required values which don't have defaults set
                  try:
                      # Delete a caption
                      api_instance.delete(video_id, language)
                  except apivideo.ApiException as e:
                      print("Exception when calling CaptionsApi->delete: %s\n" % e)
          - language: java
            code: |
              // First add the "video.api:java-api-client" maven dependency to your project
              // Documentation: https://github.com/apivideo/api.video-java-client/blob/main/docs/CaptionsApi.md#delete

              import video.api.client.ApiVideoClient;
              import video.api.client.api.ApiException;
              import video.api.client.api.models.*;
              import video.api.client.api.clients.CaptionsApi;
              import java.util.*;

              public class Example {
                public static void main(String[] args) {
                  ApiVideoClient client = new ApiVideoClient("YOUR_API_KEY");
                  // if you rather like to use the sandbox environment:
                  // ApiVideoClient client = new ApiVideoClient("YOUR_SANDBOX_API_KEY", ApiVideoClient.Environment.SANDBOX);

                  CaptionsApi apiInstance = client.captions();
                  
                  String videoId = "vi4k0jvEUuaTdRAEjQ4Prklgc"; // The unique identifier for the video you want to delete a caption from.
                  String language = "en"; // A valid language identifier using IETF language tags. You can use primary subtags like `en` (English), extended subtags like `fr-CA` (French, Canada), or region subtags like `zh-Hans-CN` (Simplified Chinese used in the PRC).

                  try {
                    apiInstance.delete(videoId, language);
                  } catch (ApiException e) {
                    System.err.println("Exception when calling CaptionsApi#delete");
                    System.err.println("Status code: " + e.getCode());
                    System.err.println("Reason: " + e.getMessage());
                    System.err.println("Response headers: " + e.getResponseHeaders());
                    e.printStackTrace();
                  }
                }
              }
          - language: csharp
            code: |
              // First add the "ApiVideo" NuGet package to your project
              // Documentation: https://github.com/apivideo/api.video-csharp-client/blob/main/docs/CaptionsApi.md#delete

              using System.Diagnostics;
              using ApiVideo.Client;

              namespace Example
              {
                  public class deleteExample
                  {
                      public static void Main()
                      {
                          var basePath = ApiVideoClient.Client.Environment.SANDBOX;
                          var apiKey = "YOUR_API_KEY";

                          var apiInstance = new ApiVideoClient(apiKey,basePath);

                          var videoId = vi4k0jvEUuaTdRAEjQ4Prklgc;  // string | The unique identifier for the video you want to delete a caption from.
                          var language = en;  // string | A valid language identifier using IETF language tags. You can use primary subtags like `en` (English), extended subtags like `fr-CA` (French, Canada), or region subtags like `zh-Hans-CN` (Simplified Chinese used in the PRC).
                          var apiCaptionsInstance = apiInstance.Captions();
                          try
                          {
                              // Delete a caption
                              apiCaptionsInstance.delete(videoId, language);
                          }
                          catch (ApiException  e)
                          {
                              Debug.Print("Exception when calling CaptionsApi.delete: " + e.Message );
                              Debug.Print("Status Code: "+ e.ErrorCode);
                              Debug.Print(e.StackTrace);
                          }
                      }
                  }
              }
          - language: php
            code: |-
              <?php
              // First install the api client: "composer require api-video/php-api-client"
              // Documentation: https://github.com/apivideo/api.video-php-client/blob/main/docs/Api/CaptionsApi.md#delete

              require __DIR__ . '/vendor/autoload.php';

              $videoId = 'vi4k0jvEUuaTdRAEjQ4Prklgc'; // The unique identifier for the video you want to delete a caption from.
              $language = 'en'; // A valid language identifier using IETF language tags. You can use primary subtags like `en` (English), extended subtags like `fr-CA` (French, Canada), or region subtags like `zh-Hans-CN` (Simplified Chinese used in the PRC).

              $client->captions()->delete($videoId, $language); 
          - language: swift
            code: |
              // First install the api client: https://github.com/apivideo/api.video-swift-client#getting-started
              // Documentation: https://github.com/apivideo/api.video-swift-client/blob/main/docs/CaptionsAPI.md#delete
    patch:
      tags:
        - Captions
      summary: Update a caption
      description: Update caption settings.
      x-client-description:
        default: 'To have the captions on automatically, use this method to set default: true.'
      operationId: PATCH_videos-videoId-captions-language
      parameters:
        - name: videoId
          in: path
          description: The unique identifier for the video you want to have automatic captions for.
          required: true
          style: simple
          explode: false
          schema:
            type: string
          example: vi4k0jvEUuaTdRAEjQ4Prklg
        - name: language
          in: path
          description: |-
            A valid language identifier using IETF language tags. You can use primary subtags like `en` (English), extended subtags like `fr-CA` (French, Canada), or region subtags like `zh-Hans-CN` (Simplified Chinese used in the PRC).

            - This parameter **only accepts dashes for separators**, for example `fr-CA`. If you use a different separator in your request, the API returns an error.
            - When the value in your request does not match any covered language, the API returns an error.
            - You can find the list of supported tags [here](https://docs.api.video/vod/add-captions#supported-caption-language-tags).
          required: true
          style: simple
          explode: false
          schema:
            type: string
          example: en
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/captions-update-payload'
      responses:
        '200':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/caption'
              examples:
                response:
                  value:
                    uri: /videos/vi3N6cDinStg3oBbN79GklWS/captions/en
                    src: 'https://cdn.api.video/vod/vi3N6cDinStg3oBbN79GklWS/captions/en.vtt'
                    srclang: en
                    languageName: English
                    default: true
        '400':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Bad request error
          content:
            application/json:
              schema:
                title: Bad request error
                $ref: '#/components/schemas/bad-request'
              examples:
                Invalid language formatting:
                  description: This error occurs when the language tag you provided contains characters other than letters and dashes.
                  value:
                    type: https://docs.api.video/reference/invalid-attribute
                    title: An attribute is invalid.
                    status: 400
                    detail: The "language" attribute must contain only letters and dashes (for example "fr", "fr-BE").
                    name: language
                Invalid language:
                  description: This error occurs when the language tag you provided does not match any supported language.
                  value:
                    type: https://docs.api.video/reference/invalid-attribute
                    title: An attribute is invalid.
                    status: 400
                    detail: The "language" attribute is not valid.
                    name: language
        '404':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/not-found'
              examples:
                response:
                  value:
                    type: Lorem sit culpa non
                    title: sunt do fugiat tempor
                    name: irure mollit aute
                    status: 85925135
        '429':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/too-many-requests'
              examples:
                Too many requests:
                  value:
                    type: 'https://docs.api.video/reference/too-many-requests'
                    title: Too many requests.
                    status: 429
      security:
        - apiKey: []
      x-client-action: update
      x-doctave:
        code-samples:
          - language: go
            code: |
              // First install the go client with "go get github.com/apivideo/api.video-go-client"
              // Documentation: https://github.com/apivideo/api.video-go-client/blob/main/docs/CaptionsApi.md#update

              package main

              import (
                  "context"
                  "fmt"
                  "os"
                  apivideosdk "github.com/apivideo/api.video-go-client"
              )

              func main() {
                  client := apivideosdk.ClientBuilder("YOUR_API_KEY").Build()
                  // if you rather like to use the sandbox environment:
                  // client := apivideosdk.SandboxClientBuilder("YOUR_SANDBOX_API_KEY").Build()
                      
                  videoId := "vi4k0jvEUuaTdRAEjQ4Prklg" // string | The unique identifier for the video you want to have automatic captions for.
                  language := "en" // string | A valid language identifier using IETF language tags. You can use primary subtags like `en` (English), extended subtags like `fr-CA` (French, Canada), or region subtags like `zh-Hans-CN` (Simplified Chinese used in the PRC).
                  captionsUpdatePayload := *apivideosdk.NewCaptionsUpdatePayload() // CaptionsUpdatePayload | 

                  
                  res, err := client.Captions.Update(videoId, language, captionsUpdatePayload)

                  if err != nil {
                      fmt.Fprintf(os.Stderr, "Error when calling `Captions.Update``: %v\
              ", err)
                  }
                  // response from `Update`: Caption
                  fmt.Fprintf(os.Stdout, "Response from `Captions.Update`: %v\
              ", res)
              }
          - language: node
            code: |
              // First install the "@api.video/nodejs-client" npm package
              // Documentation: https://github.com/apivideo/api.video-nodejs-client/blob/main/doc/api/CaptionsApi.md#update

              const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" });

              const videoId = 'vi4k0jvEUuaTdRAEjQ4Prklg'; // The unique identifier for the video you want to have automatic captions for.
              const language = 'en'; // A valid language identifier using IETF language tags. You can use primary subtags like `en` (English), extended subtags like `fr-CA` (French, Canada), or region subtags like `zh-Hans-CN` (Simplified Chinese used in the PRC).
              const captionsUpdatePayload = {
                _default: true,
              }; 
               
              const caption = await client.captions.update(videoId, language, captionsUpdatePayload);
                      
          - language: python
            code: |
              # First install the api client with "pip install api.video"
              # Documentation: https://github.com/apivideo/api.video-python-client/blob/main/docs/CaptionsApi.md#update

              import apivideo
              from apivideo.api import captions_api
              from apivideo.model.bad_request import BadRequest
              from apivideo.model.captions_update_payload import CaptionsUpdatePayload
              from apivideo.model.not_found import NotFound
              from apivideo.model.caption import Caption
              from pprint import pprint

              # Enter a context with an instance of the API client
              with apivideo.AuthenticatedApiClient(__API_KEY__) as api_client:
                  # Create an instance of the API class
                  api_instance = captions_api.CaptionsApi(api_client)
                  video_id = "vi4k0jvEUuaTdRAEjQ4Prklg" # str | The unique identifier for the video you want to have automatic captions for.
                  language = "en" # str | A valid language identifier using IETF language tags. You can use primary subtags like `en` (English), extended subtags like `fr-CA` (French, Canada), or region subtags like `zh-Hans-CN` (Simplified Chinese used in the PRC).
                  captions_update_payload = CaptionsUpdatePayload(
                      default=True,
                  ) # CaptionsUpdatePayload | 

                  # example passing only required values which don't have defaults set
                  try:
                      # Update caption
                      api_response = api_instance.update(video_id, language, captions_update_payload)
                      pprint(api_response)
                  except apivideo.ApiException as e:
                      print("Exception when calling CaptionsApi->update: %s\
              " % e)
          - language: java
            code: |
              // First add the "video.api:java-api-client" maven dependency to your project
              // Documentation: https://github.com/apivideo/api.video-java-client/blob/main/docs/CaptionsApi.md#update

              import video.api.client.ApiVideoClient;
              import video.api.client.api.ApiException;
              import video.api.client.api.models.*;
              import video.api.client.api.clients.CaptionsApi;
              import java.util.*;

              public class Example {
                public static void main(String[] args) {
                  ApiVideoClient client = new ApiVideoClient("YOUR_API_KEY");
                  // if you rather like to use the sandbox environment:
                  // ApiVideoClient client = new ApiVideoClient("YOUR_SANDBOX_API_KEY", ApiVideoClient.Environment.SANDBOX);

                  CaptionsApi apiInstance = client.captions();
                  
                  String videoId = "vi4k0jvEUuaTdRAEjQ4Prklg"; // The unique identifier for the video you want to have automatic captions for.
                  String language = "en"; // A valid language identifier using IETF language tags. You can use primary subtags like `en` (English), extended subtags like `fr-CA` (French, Canada), or region subtags like `zh-Hans-CN` (Simplified Chinese used in the PRC).
                  CaptionsUpdatePayload captionsUpdatePayload = new CaptionsUpdatePayload(); // 
                  captionsUpdatePayload.setDefault(); // 


                  try {
                    Caption result = apiInstance.update(videoId, language, captionsUpdatePayload);
                    System.out.println(result);
                  } catch (ApiException e) {
                    System.err.println("Exception when calling CaptionsApi#update");
                    System.err.println("Status code: " + e.getCode());
                    System.err.println("Reason: " + e.getMessage());
                    System.err.println("Response headers: " + e.getResponseHeaders());
                    e.printStackTrace();
                  }
                }
              }
          - language: csharp
            code: |
              // First add the "ApiVideo" NuGet package to your project
              // Documentation: https://github.com/apivideo/api.video-csharp-client/blob/main/docs/CaptionsApi.md#update

              using System.Diagnostics;
              using ApiVideo.Client;

              namespace Example
              {
                  public class updateExample
                  {
                      public static void Main()
                      {
                          var basePath = ApiVideoClient.Client.Environment.SANDBOX;
                          var apiKey = "YOUR_API_KEY";

                          var apiInstance = new ApiVideoClient(apiKey,basePath);

                          var videoId = vi4k0jvEUuaTdRAEjQ4Prklg;  // string | The unique identifier for the video you want to have automatic captions for.
                          var language = en;  // string | A valid language identifier using IETF language tags. You can use primary subtags like `en` (English), extended subtags like `fr-CA` (French, Canada), or region subtags like `zh-Hans-CN` (Simplified Chinese used in the PRC).
                          var captionsUpdatePayload = new CaptionsUpdatePayload(); // CaptionsUpdatePayload | 
                          var apiCaptionsInstance = apiInstance.Captions();
                          try
                          {
                              // Update caption
                              Caption result = apiCaptionsInstance.update(videoId, language, captionsUpdatePayload);
                              Debug.WriteLine(result);
                          }
                          catch (ApiException  e)
                          {
                              Debug.Print("Exception when calling CaptionsApi.update: " + e.Message );
                              Debug.Print("Status Code: "+ e.ErrorCode);
                              Debug.Print(e.StackTrace);
                          }
                      }
                  }
              }
          - language: php
            code: |-
              <?php
              // First install the api client: "composer require api-video/php-api-client"
              // Documentation: https://github.com/apivideo/api.video-php-client/blob/main/docs/Api/CaptionsApi.md#update

              require __DIR__ . '/vendor/autoload.php';

              $videoId = 'vi4k0jvEUuaTdRAEjQ4Prklg'; // The unique identifier for the video you want to have automatic captions for.
              $language = 'en'; // A valid language identifier using IETF language tags. You can use primary subtags like `en` (English), extended subtags like `fr-CA` (French, Canada), or region subtags like `zh-Hans-CN` (Simplified Chinese used in the PRC).

              $captionsUpdatePayload = (new \ApiVideo\Client\Model\CaptionsUpdatePayload())
                  ->setDefault(true);
               
              $caption = $client->captions()->update($videoId, $language, $captionsUpdatePayload); 
          - language: swift
            code: |
              // First install the api client: https://github.com/apivideo/api.video-swift-client#getting-started
              // Documentation: https://github.com/apivideo/api.video-swift-client/blob/main/docs/CaptionsAPI.md#update
  '/videos/{videoId}/captions':
    get:
      tags:
        - Captions
      summary: List video captions
      description: Retrieve a list of available captions by video id.
      operationId: GET_videos-videoId-captions
      parameters:
        - name: videoId
          in: path
          description: The unique identifier for the video you want to retrieve a list of captions for.
          required: true
          style: simple
          explode: false
          schema:
            type: string
          example: vi4k0jvEUuaTdRAEjQ4Prklg
        - $ref: '#/components/parameters/current-page'
        - $ref: '#/components/parameters/page-size'
      responses:
        '200':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/captions-list-response'
              examples:
                response:
                  value:
                    data:
                      - uri: /videos/vi3N6cDinStg3oBbN79GklWS/captions/en
                        src: 'https://cdn.api.video/vod/vi3N6cDinStg3oBbN79GklWS/captions/en.vtt'
                        srclang: en
                        languageName: English
                        default: false
                      - uri: /videos/vi3N6cDinStg3oBbN79GklWS/captions/fr
                        src: 'https://cdn.api.video/vod/vi3N6cDinStg3oBbN79GklWS/captions/fr.vtt'
                        srclang: fr
                        languageName: Française
                        default: false
                    pagination:
                      currentPage: 1
                      currentPageItems: 2
                      pageSize: 25
                      pagesTotal: 1
                      itemsTotal: 2
                      links:
                        - rel: self
                          uri: /videos/vi3N6cDinStg3oBbN79GklWS/captions?currentPage=1&pageSize=25
                        - rel: first
                          uri: /videos/vi3N6cDinStg3oBbN79GklWS/captions?currentPage=1&pageSize=25
                        - rel: last
                          uri: /videos/vi3N6cDinStg3oBbN79GklWS/captions?currentPage=1&pageSize=25
        '404':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/not-found'
        '429':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/too-many-requests'
              examples:
                Too many requests:
                  value:
                    type: 'https://docs.api.video/reference/too-many-requests'
                    title: Too many requests.
                    status: 429
      security:
        - apiKey: []
      x-client-action: list
      x-group-parameters: true
      x-client-paginated: true
      x-doctave:
        code-samples:
          - language: go
            code: |
              // First install the go client with "go get github.com/apivideo/api.video-go-client"
              // Documentation: https://github.com/apivideo/api.video-go-client/blob/main/docs/CaptionsApi.md#list

              package main

              import (
                  "context"
                  "fmt"
                  "os"
                  apivideosdk "github.com/apivideo/api.video-go-client"
              )

              func main() {
                  client := apivideosdk.ClientBuilder("YOUR_API_KEY").Build()
                  // if you rather like to use the sandbox environment:
                  // client := apivideosdk.SandboxClientBuilder("YOUR_SANDBOX_API_KEY").Build()
                      
                  videoId := "vi4k0jvEUuaTdRAEjQ4Prklg" // string | The unique identifier for the video you want captions for.
                  language := "en" // string | A valid language identifier using IETF language tags. You can use primary subtags like `en` (English), extended subtags like `fr-CA` (French, Canada), or region subtags like `zh-Hans-CN` (Simplified Chinese used in the PRC).

                  
                  res, err := client.Captions.Get(videoId, language)

                  if err != nil {
                      fmt.Fprintf(os.Stderr, "Error when calling `Captions.Get``: %v\
              ", err)
                  }
                  // response from `Get`: Caption
                  fmt.Fprintf(os.Stdout, "Response from `Captions.Get`: %v\
              ", res)
              }
          - language: node
            code: |-
              // First install the "@api.video/nodejs-client" npm package
              // Documentation: https://github.com/apivideo/api.video-nodejs-client/blob/main/doc/api/CaptionsApi.md#list

              const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" });

              const captions = await client.captions.list({
                videoId 'vi4k0jvEUuaTdRAEjQ4Prklg', // The unique identifier for the video you want to retrieve a list of captions for.
                currentPage: 2, // Choose the number of search results to return per page. Minimum value: 1
                pageSize: 30, // Results per page. Allowed values 1-100, default is 25.
              ); 
          - language: python
            code: |
              # First install the api client with "pip install api.video"
              # Documentation: https://github.com/apivideo/api.video-python-client/blob/main/docs/CaptionsApi.md#list

              import apivideo
              from apivideo.api import captions_api
              from apivideo.model.not_found import NotFound
              from apivideo.model.caption import Caption
              from pprint import pprint

              # Enter a context with an instance of the API client
              with apivideo.AuthenticatedApiClient(__API_KEY__) as api_client:
                  # Create an instance of the API class
                  api_instance = captions_api.CaptionsApi(api_client)
                  video_id = "vi4k0jvEUuaTdRAEjQ4Prklg" # str | The unique identifier for the video you want captions for.
                  language = "en" # str | A valid language identifier using IETF language tags. You can use primary subtags like `en` (English), extended subtags like `fr-CA` (French, Canada), or region subtags like `zh-Hans-CN` (Simplified Chinese used in the PRC).

                  # example passing only required values which don't have defaults set
                  try:
                      # Show a caption
                      api_response = api_instance.get(video_id, language)
                      pprint(api_response)
                  except apivideo.ApiException as e:
                      print("Exception when calling CaptionsApi->get: %s\n" % e)
          - language: java
            code: |
              // First add the "video.api:java-api-client" maven dependency to your project
              // Documentation: https://github.com/apivideo/api.video-java-client/blob/main/docs/CaptionsApi.md#list

              import video.api.client.ApiVideoClient;
              import video.api.client.api.ApiException;
              import video.api.client.api.models.*;
              import video.api.client.api.clients.CaptionsApi;
              import java.util.*;

              public class Example {
                public static void main(String[] args) {
                  ApiVideoClient client = new ApiVideoClient("YOUR_API_KEY");
                  // if you rather like to use the sandbox environment:
                  // ApiVideoClient client = new ApiVideoClient("YOUR_SANDBOX_API_KEY", ApiVideoClient.Environment.SANDBOX);

                  CaptionsApi apiInstance = client.captions();
                  
                  String videoId = "vi4k0jvEUuaTdRAEjQ4Prklg"; // The unique identifier for the video you want captions for.
                  String language = "en"; // A valid language identifier using IETF language tags. You can use primary subtags like `en` (English), extended subtags like `fr-CA` (French, Canada), or region subtags like `zh-Hans-CN` (Simplified Chinese used in the PRC).

                  try {
                    Caption result = apiInstance.get(videoId, language);
                    System.out.println(result);
                  } catch (ApiException e) {
                    System.err.println("Exception when calling CaptionsApi#get");
                    System.err.println("Status code: " + e.getCode());
                    System.err.println("Reason: " + e.getMessage());
                    System.err.println("Response headers: " + e.getResponseHeaders());
                    e.printStackTrace();
                  }
                }
              }
          - language: csharp
            code: |
              // First add the "ApiVideo" NuGet package to your project
              // Documentation: https://github.com/apivideo/api.video-csharp-client/blob/main/docs/CaptionsApi.md#list

              using System.Diagnostics;
              using ApiVideo.Client;

              namespace Example
              {
                  public class getExample
                  {
                      public static void Main()
                      {
                          var basePath = ApiVideoClient.Client.Environment.SANDBOX;
                          var apiKey = "YOUR_API_KEY";

                          var apiInstance = new ApiVideoClient(apiKey,basePath);

                          var videoId = vi4k0jvEUuaTdRAEjQ4Prklg;  // string | The unique identifier for the video you want captions for.
                          var language = en;  // string | A valid language identifier using IETF language tags. You can use primary subtags like `en` (English), extended subtags like `fr-CA` (French, Canada), or region subtags like `zh-Hans-CN` (Simplified Chinese used in the PRC).
                          var apiCaptionsInstance = apiInstance.Captions();
                          try
                          {
                              // Show a caption
                              Caption result = apiCaptionsInstance.get(videoId, language);
                              Debug.WriteLine(result);
                          }
                          catch (ApiException  e)
                          {
                              Debug.Print("Exception when calling CaptionsApi.get: " + e.Message );
                              Debug.Print("Status Code: "+ e.ErrorCode);
                              Debug.Print(e.StackTrace);
                          }
                      }
                  }
              }
          - language: php
            code: |-
              <?php
              // First install the api client: "composer require api-video/php-api-client"
              // Documentation: https://github.com/apivideo/api.video-php-client/blob/main/docs/Api/CaptionsApi.md#list

              require __DIR__ . '/vendor/autoload.php';

              $videoId = 'vi4k0jvEUuaTdRAEjQ4Prklg'; // The unique identifier for the video you want to retrieve a list of captions for.

              $captions = $client->captions()->list($videoId, array(
                  'currentPage' => 2, // Choose the number of search results to return per page. Minimum value: 1)
                  'pageSize' => 30 // Results per page. Allowed values 1-100, default is 25.)
              )); 
          - language: swift
            code: |
              // First install the api client: https://github.com/apivideo/api.video-swift-client#getting-started
              // Documentation: https://github.com/apivideo/api.video-swift-client/blob/main/docs/CaptionsAPI.md#list
  '/videos/{videoId}/chapters/{language}':
    get:
      tags:
        - Chapters
      summary: Retrieve a chapter
      description: 'Retrieve a chapter for by video id in a specific language. '
      operationId: GET_videos-videoId-chapters-language
      parameters:
        - name: videoId
          in: path
          description: The unique identifier for the video you want to show a chapter for.
          required: true
          style: simple
          explode: false
          schema:
            type: string
          example: vi4k0jvEUuaTdRAEjQ4Jfrgz
        - name: language
          in: path
          description: 'A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation.'
          required: true
          style: simple
          explode: false
          schema:
            type: string
          example: en
      responses:
        '200':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/chapter'
              examples:
                response:
                  value:
                    uri: /videos/vi3N6cDinStg3oBbN79GklWS/chapters/fr
                    src: 'https://cdn.api.video/vod/vi3N6cDinStg3oBbN79GklWS/chapters/fr.vtt'
                    language: fr
        '404':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/not-found'
        '429':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/too-many-requests'
              examples:
                Too many requests:
                  value:
                    type: 'https://docs.api.video/reference/too-many-requests'
                    title: Too many requests.
                    status: 429
      security:
        - apiKey: []
      x-client-action: get
      x-doctave:
        code-samples:
          - language: go
            code: |
              // First install the go client with "go get github.com/apivideo/api.video-go-client"
              // Documentation: https://github.com/apivideo/api.video-go-client/blob/main/docs/ChaptersApi.md#get

              package main

              import (
                  "context"
                  "fmt"
                  "os"
                  apivideosdk "github.com/apivideo/api.video-go-client"
              )

              func main() {
                  client := apivideosdk.ClientBuilder("YOUR_API_KEY").Build()
                  // if you rather like to use the sandbox environment:
                  // client := apivideosdk.SandboxClientBuilder("YOUR_SANDBOX_API_KEY").Build()
                      
                  videoId := "vi4k0jvEUuaTdRAEjQ4Jfrgz" // string | The unique identifier for the video you want to show a chapter for.
                  language := "en" // string | A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation.

                  
                  res, err := client.Chapters.Get(videoId, language)

                  if err != nil {
                      fmt.Fprintf(os.Stderr, "Error when calling `Chapters.Get``: %v\
              ", err)
                  }
                  // response from `Get`: Chapter
                  fmt.Fprintf(os.Stdout, "Response from `Chapters.Get`: %v\
              ", res)
              }
          - language: node
            code: |-
              // First install the "@api.video/nodejs-client" npm package
              // Documentation: https://github.com/apivideo/api.video-nodejs-client/blob/main/doc/api/ChaptersApi.md#get

              const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" });

              const videoId = 'vi4k0jvEUuaTdRAEjQ4Jfrgz'; // The unique identifier for the video you want to show a chapter for.
              const language = 'en'; // A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation.

              const chapter = await client.chapters.get(videoId, language); 
          - language: python
            code: |
              # First install the api client with "pip install api.video"
              # Documentation: https://github.com/apivideo/api.video-python-client/blob/main/docs/ChaptersApi.md#get

              import apivideo
              from apivideo.api import chapters_api
              from apivideo.model.not_found import NotFound
              from apivideo.model.chapter import Chapter
              from pprint import pprint

              # Enter a context with an instance of the API client
              with apivideo.AuthenticatedApiClient(__API_KEY__) as api_client:
                  # Create an instance of the API class
                  api_instance = chapters_api.ChaptersApi(api_client)
                  video_id = "vi4k0jvEUuaTdRAEjQ4Jfrgz" # str | The unique identifier for the video you want to show a chapter for.
                  language = "en" # str | A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation.

                  # example passing only required values which don't have defaults set
                  try:
                      # Show a chapter
                      api_response = api_instance.get(video_id, language)
                      pprint(api_response)
                  except apivideo.ApiException as e:
                      print("Exception when calling ChaptersApi->get: %s\n" % e)
          - language: java
            code: |
              // First add the "video.api:java-api-client" maven dependency to your project
              // Documentation: https://github.com/apivideo/api.video-java-client/blob/main/docs/ChaptersApi.md#get

              import video.api.client.ApiVideoClient;
              import video.api.client.api.ApiException;
              import video.api.client.api.models.*;
              import video.api.client.api.clients.ChaptersApi;
              import java.util.*;

              public class Example {
                public static void main(String[] args) {
                  ApiVideoClient client = new ApiVideoClient("YOUR_API_KEY");
                  // if you rather like to use the sandbox environment:
                  // ApiVideoClient client = new ApiVideoClient("YOUR_SANDBOX_API_KEY", ApiVideoClient.Environment.SANDBOX);

                  ChaptersApi apiInstance = client.chapters();
                  
                  String videoId = "vi4k0jvEUuaTdRAEjQ4Jfrgz"; // The unique identifier for the video you want to show a chapter for.
                  String language = "en"; // A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation.

                  try {
                    Chapter result = apiInstance.get(videoId, language);
                    System.out.println(result);
                  } catch (ApiException e) {
                    System.err.println("Exception when calling ChaptersApi#get");
                    System.err.println("Status code: " + e.getCode());
                    System.err.println("Reason: " + e.getMessage());
                    System.err.println("Response headers: " + e.getResponseHeaders());
                    e.printStackTrace();
                  }
                }
              }
          - language: csharp
            code: |
              // First add the "ApiVideo" NuGet package to your project
              // Documentation: https://github.com/apivideo/api.video-csharp-client/blob/main/docs/ChaptersApi.md#get

              using System.Diagnostics;
              using ApiVideo.Client;

              namespace Example
              {
                  public class getExample
                  {
                      public static void Main()
                      {
                          var basePath = ApiVideoClient.Client.Environment.SANDBOX;
                          var apiKey = "YOUR_API_KEY";

                          var apiInstance = new ApiVideoClient(apiKey,basePath);

                          var videoId = vi4k0jvEUuaTdRAEjQ4Jfrgz;  // string | The unique identifier for the video you want to show a chapter for.
                          var language = en;  // string | A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation.
                          var apiChaptersInstance = apiInstance.Chapters();
                          try
                          {
                              // Show a chapter
                              Chapter result = apiChaptersInstance.get(videoId, language);
                              Debug.WriteLine(result);
                          }
                          catch (ApiException  e)
                          {
                              Debug.Print("Exception when calling ChaptersApi.get: " + e.Message );
                              Debug.Print("Status Code: "+ e.ErrorCode);
                              Debug.Print(e.StackTrace);
                          }
                      }
                  }
              }
          - language: php
            code: |-
              <?php
              // First install the api client: "composer require api-video/php-api-client"
              // Documentation: https://github.com/apivideo/api.video-php-client/blob/main/docs/Api/ChaptersApi.md#delete

              require __DIR__ . '/vendor/autoload.php';

              $videoId = 'vi4k0jvEUuaTdRAEjQ4Jfrgz'; // The unique identifier for the video you want to delete a chapter from.
              $language = 'en'; // A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation.

              $client->chapters()->delete($videoId, $language); 
          - language: swift
            code: |
              // First install the api client: https://github.com/apivideo/api.video-swift-client#getting-started
              // Documentation: https://github.com/apivideo/api.video-swift-client/blob/main/docs/ChaptersAPI.md#get
    post:
      tags:
        - Chapters
      summary: Upload a chapter
      description: |-
        Upload a VTT file to add chapters to your video.
        Chapters help break the video into sections. Read our [tutorial](https://api.video/blog/tutorials/adding-chapters-to-your-videos/) for more details.
      operationId: POST_videos-videoId-chapters-language
      parameters:
        - name: videoId
          in: path
          description: The unique identifier for the video you want to upload a chapter for.
          required: true
          style: simple
          explode: false
          schema:
            type: string
          example: vi4k0jvEUuaTdRAEjQ4Jfrgz
        - name: language
          in: path
          description: 'A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation.'
          required: true
          style: simple
          explode: false
          schema:
            type: string
          example: en
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/chapters-update-payload'
      responses:
        '200':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/chapter'
              examples:
                response:
                  value:
                    uri: /videos/vi3N6cDinStg3oBbN79GklWS/chapters/fr
                    src: 'https://cdn.api.video/vod/vi3N6cDinStg3oBbN79GklWS/chapters/fr.vtt'
                    language: fr
        '400':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/bad-request'
        '404':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/not-found'
        '429':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/too-many-requests'
              examples:
                Too many requests:
                  value:
                    type: 'https://docs.api.video/reference/too-many-requests'
                    title: Too many requests.
                    status: 429
      security:
        - apiKey: []
      x-client-action: upload
      x-doctave:
        code-samples:
          - language: go
            code: |
              // First install the go client with "go get github.com/apivideo/api.video-go-client"
              // Documentation: https://github.com/apivideo/api.video-go-client/blob/main/docs/ChaptersApi.md#upload

              package main

              import (
                  "context"
                  "fmt"
                  "os"
                  apivideosdk "github.com/apivideo/api.video-go-client"
              )

              func main() {
                  client := apivideosdk.ClientBuilder("YOUR_API_KEY").Build()
                  // if you rather like to use the sandbox environment:
                  // client := apivideosdk.SandboxClientBuilder("YOUR_SANDBOX_API_KEY").Build()
                      
                  videoId := "vi4k0jvEUuaTdRAEjQ4Jfrgz" // string | The unique identifier for the video you want to upload a chapter for.
                  language := "en" // string | A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation.
                  file := os.NewFile(1234, "some_file") // *os.File | The VTT file describing the chapters you want to upload.

                  
                  res, err := client.Chapters.UploadFile(videoId, language, file)

                  // you can also use a Reader instead of a File:
                  // client.Chapters.Upload(videoId, language, fileName, fileReader)

                  if err != nil {
                      fmt.Fprintf(os.Stderr, "Error when calling `Chapters.Upload``: %v\
              ", err)
                  }
                  // response from `Upload`: Chapter
                  fmt.Fprintf(os.Stdout, "Response from `Chapters.Upload`: %v\
              ", res)
              }
          - language: node
            code: |
              // First install the "@api.video/nodejs-client" npm package
              // Documentation: https://github.com/apivideo/api.video-nodejs-client/blob/main/doc/api/ChaptersApi.md#upload

              const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" });

              const videoId = 'vi4k0jvEUuaTdRAEjQ4Jfrgz'; // The unique identifier for the video you want to upload a chapter for.
              const language = 'en'; // A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation.
              const file = './en.vtt'; // The VTT file describing the chapters you want to upload.

              const chapter = await client.chapters.upload(videoId, language, file); 
          - language: python
            code: |
              # First install the api client with "pip install api.video"
              # Documentation: https://github.com/apivideo/api.video-python-client/blob/main/docs/ChaptersApi.md#upload

              import apivideo
              from apivideo.api import chapters_api
              from apivideo.model.bad_request import BadRequest
              from apivideo.model.not_found import NotFound
              from apivideo.model.chapter import Chapter
              from pprint import pprint

              # Enter a context with an instance of the API client
              with apivideo.AuthenticatedApiClient(__API_KEY__) as api_client:
                  # Create an instance of the API class
                  api_instance = chapters_api.ChaptersApi(api_client)
                  video_id = "vi4k0jvEUuaTdRAEjQ4Jfrgz" # str | The unique identifier for the video you want to upload a chapter for.
                  language = "en" # str | A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation.
                  file = open('/path/to/file', 'rb') # file_type | The VTT file describing the chapters you want to upload.

                  # example passing only required values which don't have defaults set
                  try:
                      # Upload a chapter
                      api_response = api_instance.upload(video_id, language, file)
                      pprint(api_response)
                  except apivideo.ApiException as e:
                      print("Exception when calling ChaptersApi->upload: %s\n" % e)
          - language: java
            code: |
              // First add the "video.api:java-api-client" maven dependency to your project
              // Documentation: https://github.com/apivideo/api.video-java-client/blob/main/docs/ChaptersApi.md#upload

              import video.api.client.ApiVideoClient;
              import video.api.client.api.ApiException;
              import video.api.client.api.models.*;
              import video.api.client.api.clients.ChaptersApi;
              import java.util.*;

              public class Example {
                public static void main(String[] args) {
                  ApiVideoClient client = new ApiVideoClient("YOUR_API_KEY");
                  // if you rather like to use the sandbox environment:
                  // ApiVideoClient client = new ApiVideoClient("YOUR_SANDBOX_API_KEY", ApiVideoClient.Environment.SANDBOX);

                  ChaptersApi apiInstance = client.chapters();
                  
                  String videoId = "vi4k0jvEUuaTdRAEjQ4Jfrgz"; // The unique identifier for the video you want to upload a chapter for.
                  String language = "en"; // A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation.
                  File file = new File("/path/to/file"); // The VTT file describing the chapters you want to upload.

                  try {
                    Chapter result = apiInstance.upload(videoId, language, file);
                    System.out.println(result);
                  } catch (ApiException e) {
                    System.err.println("Exception when calling ChaptersApi#upload");
                    System.err.println("Status code: " + e.getCode());
                    System.err.println("Reason: " + e.getMessage());
                    System.err.println("Response headers: " + e.getResponseHeaders());
                    e.printStackTrace();
                  }
                }
              }
          - language: csharp
            code: |
              // First add the "ApiVideo" NuGet package to your project
              // Documentation: https://github.com/apivideo/api.video-csharp-client/blob/main/docs/ChaptersApi.md#upload

              using System.Diagnostics;
              using ApiVideo.Client;

              namespace Example
              {
                  public class uploadExample
                  {
                      public static void Main()
                      {
                          var basePath = ApiVideoClient.Client.Environment.SANDBOX;
                          var apiKey = "YOUR_API_KEY";

                          var apiInstance = new ApiVideoClient(apiKey,basePath);

                          var videoId = vi4k0jvEUuaTdRAEjQ4Jfrgz;  // string | The unique identifier for the video you want to upload a chapter for.
                          var language = en;  // string | A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation.
                          var file = BINARY_DATA_HERE;  // System.IO.Stream | The VTT file describing the chapters you want to upload.
                          var apiChaptersInstance = apiInstance.Chapters();
                          try
                          {
                              // Upload a chapter
                              Chapter result = apiChaptersInstance.upload(videoId, language, file);
                              Debug.WriteLine(result);
                          }
                          catch (ApiException  e)
                          {
                              Debug.Print("Exception when calling ChaptersApi.upload: " + e.Message );
                              Debug.Print("Status Code: "+ e.ErrorCode);
                              Debug.Print(e.StackTrace);
                          }
                      }
                  }
              }
          - language: php
            code: |-
              <?php
              // First install the api client: "composer require api-video/php-api-client"
              // Documentation: https://github.com/apivideo/api.video-php-client/blob/main/docs/Api/ChaptersApi.md#upload

              require __DIR__ . '/vendor/autoload.php';

              $videoId = 'vi4k0jvEUuaTdRAEjQ4Jfrgz'; // The unique identifier for the video you want to upload a chapter for.
              $language = 'en'; // A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation.
              $file = new SplFileObject(__DIR__ . '/en.vtt'); // The VTT file describing the chapters you want to upload.

              $chapter = $client->chapters()->upload($videoId, $language, $file); 
          - language: swift
            code: |
              // First install the api client: https://github.com/apivideo/api.video-swift-client#getting-started
              // Documentation: https://github.com/apivideo/api.video-swift-client/blob/main/docs/ChaptersAPI.md#upload
    delete:
      tags:
        - Chapters
      summary: Delete a chapter
      description: Delete a chapter in a specific language by providing the video ID for the video you want to delete the chapter from and the language the chapter is in.
      operationId: DELETE_videos-videoId-chapters-language
      parameters:
        - name: videoId
          in: path
          description: The unique identifier for the video you want to delete a chapter from.
          required: true
          style: simple
          explode: false
          schema:
            type: string
          example: vi4k0jvEUuaTdRAEjQ4Jfrgz
        - name: language
          in: path
          description: 'A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation.'
          required: true
          style: simple
          explode: false
          schema:
            type: string
          example: en
      responses:
        '204':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: No Content
        '404':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/not-found'
        '429':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/too-many-requests'
              examples:
                Too many requests:
                  value:
                    type: 'https://docs.api.video/reference/too-many-requests'
                    title: Too many requests.
                    status: 429
      security:
        - apiKey: []
      x-client-action: delete
      x-doctave:
        code-samples:
          - language: go
            code: |
              // First install the go client with "go get github.com/apivideo/api.video-go-client"
              // Documentation: https://github.com/apivideo/api.video-go-client/blob/main/docs/ChaptersApi.md#delete

              package main

              import (
                  "context"
                  "fmt"
                  "os"
                  apivideosdk "github.com/apivideo/api.video-go-client"
              )

              func main() {
                  client := apivideosdk.ClientBuilder("YOUR_API_KEY").Build()
                  // if you rather like to use the sandbox environment:
                  // client := apivideosdk.SandboxClientBuilder("YOUR_SANDBOX_API_KEY").Build()
                      
                  videoId := "vi4k0jvEUuaTdRAEjQ4Jfrgz" // string | The unique identifier for the video you want to delete a chapter from.
                  language := "en" // string | A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation.

                  
                  err := client.Chapters.Delete(videoId, language)

                  if err != nil {
                      fmt.Fprintf(os.Stderr, "Error when calling `Chapters.Delete``: %v\
              ", err)
                  }
              }
          - language: node
            code: |-
              // First install the "@api.video/nodejs-client" npm package
              // Documentation: https://github.com/apivideo/api.video-nodejs-client/blob/main/doc/api/ChaptersApi.md#delete

              const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" });

              const videoId = 'vi4k0jvEUuaTdRAEjQ4Jfrgz'; // The unique identifier for the video you want to delete a chapter from.
              const language = 'en'; // A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation.

              await client.chapters.delete(videoId, language); 
          - language: python
            code: |
              # First install the api client with "pip install api.video"
              # Documentation: https://github.com/apivideo/api.video-python-client/blob/main/docs/ChaptersApi.md#delete

              import apivideo
              from apivideo.api import chapters_api
              from apivideo.model.not_found import NotFound
              from pprint import pprint

              # Enter a context with an instance of the API client
              with apivideo.AuthenticatedApiClient(__API_KEY__) as api_client:
                  # Create an instance of the API class
                  api_instance = chapters_api.ChaptersApi(api_client)
                  video_id = "vi4k0jvEUuaTdRAEjQ4Jfrgz" # str | The unique identifier for the video you want to delete a chapter from.
                  language = "en" # str | A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation.

                  # example passing only required values which don't have defaults set
                  try:
                      # Delete a chapter
                      api_instance.delete(video_id, language)
                  except apivideo.ApiException as e:
                      print("Exception when calling ChaptersApi->delete: %s\n" % e)
          - language: java
            code: |
              // First add the "video.api:java-api-client" maven dependency to your project
              // Documentation: https://github.com/apivideo/api.video-java-client/blob/main/docs/ChaptersApi.md#delete

              import video.api.client.ApiVideoClient;
              import video.api.client.api.ApiException;
              import video.api.client.api.models.*;
              import video.api.client.api.clients.ChaptersApi;
              import java.util.*;

              public class Example {
                public static void main(String[] args) {
                  ApiVideoClient client = new ApiVideoClient("YOUR_API_KEY");
                  // if you rather like to use the sandbox environment:
                  // ApiVideoClient client = new ApiVideoClient("YOUR_SANDBOX_API_KEY", ApiVideoClient.Environment.SANDBOX);

                  ChaptersApi apiInstance = client.chapters();
                  
                  String videoId = "vi4k0jvEUuaTdRAEjQ4Jfrgz"; // The unique identifier for the video you want to delete a chapter from.
                  String language = "en"; // A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation.

                  try {
                    apiInstance.delete(videoId, language);
                  } catch (ApiException e) {
                    System.err.println("Exception when calling ChaptersApi#delete");
                    System.err.println("Status code: " + e.getCode());
                    System.err.println("Reason: " + e.getMessage());
                    System.err.println("Response headers: " + e.getResponseHeaders());
                    e.printStackTrace();
                  }
                }
              }
          - language: csharp
            code: |
              // First add the "ApiVideo" NuGet package to your project
              // Documentation: https://github.com/apivideo/api.video-csharp-client/blob/main/docs/ChaptersApi.md#delete

              using System.Diagnostics;
              using ApiVideo.Client;

              namespace Example
              {
                  public class deleteExample
                  {
                      public static void Main()
                      {
                          var basePath = ApiVideoClient.Client.Environment.SANDBOX;
                          var apiKey = "YOUR_API_KEY";

                          var apiInstance = new ApiVideoClient(apiKey,basePath);

                          var videoId = vi4k0jvEUuaTdRAEjQ4Jfrgz;  // string | The unique identifier for the video you want to delete a chapter from.
                          var language = en;  // string | A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation.
                          var apiChaptersInstance = apiInstance.Chapters();
                          try
                          {
                              // Delete a chapter
                              apiChaptersInstance.delete(videoId, language);
                          }
                          catch (ApiException  e)
                          {
                              Debug.Print("Exception when calling ChaptersApi.delete: " + e.Message );
                              Debug.Print("Status Code: "+ e.ErrorCode);
                              Debug.Print(e.StackTrace);
                          }
                      }
                  }
              }
          - language: php
            code: |-
              <?php
              // First install the api client: "composer require api-video/php-api-client"
              // Documentation: https://github.com/apivideo/api.video-php-client/blob/main/docs/Api/ChaptersApi.md#delete

              require __DIR__ . '/vendor/autoload.php';

              $videoId = 'vi4k0jvEUuaTdRAEjQ4Jfrgz'; // The unique identifier for the video you want to delete a chapter from.
              $language = 'en'; // A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation.

              $client->chapters()->delete($videoId, $language); 
          - language: swift
            code: |
              // First install the api client: https://github.com/apivideo/api.video-swift-client#getting-started
              // Documentation: https://github.com/apivideo/api.video-swift-client/blob/main/docs/ChaptersAPI.md#delete
  '/videos/{videoId}/chapters':
    get:
      tags:
        - Chapters
      summary: List video chapters
      description: Retrieve a list of all chapters for by video id.
      operationId: GET_videos-videoId-chapters
      parameters:
        - name: videoId
          in: path
          description: The unique identifier for the video you want to retrieve a list of chapters for.
          required: true
          style: simple
          explode: false
          schema:
            type: string
          example: vi4k0jvEUuaTdRAEjQ4Jfrgz
        - $ref: '#/components/parameters/current-page'
        - $ref: '#/components/parameters/page-size'
      responses:
        '200':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/chapters-list-response'
              examples:
                response:
                  value:
                    data:
                      - uri: /videos/vi3N6cDinStg3oBbN79GklWS/chapters/fr
                        src: 'https://cdn.api.video/vod/vi3N6cDinStg3oBbN79GklWS/chapters/fr.vtt'
                        language: fr
                      - uri: /videos/vi3N6cDinStg3oBbN79GklWS/chapters/en
                        src: 'https://cdn.api.video/vod/vi3N6cDinStg3oBbN79GklWS/chapters/en.vtt'
                        language: en
                    pagination:
                      currentPage: 1
                      currentPageItems: 2
                      pageSize: 25
                      pagesTotal: 1
                      itemsTotal: 2
                      links:
                        - rel: self
                          uri: /videos/vi3N6cDinStg3oBbN79GklWS/chapters?currentPage=1&pageSize=25
                        - rel: first
                          uri: /videos/vi3N6cDinStg3oBbN79GklWS/chapters?currentPage=1&pageSize=25
                        - rel: last
                          uri: /videos/vi3N6cDinStg3oBbN79GklWS/chapters?currentPage=1&pageSize=25
        '404':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/not-found'
        '429':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/too-many-requests'
              examples:
                Too many requests:
                  value:
                    type: 'https://docs.api.video/reference/too-many-requests'
                    title: Too many requests.
                    status: 429
      security:
        - apiKey: []
      x-client-action: list
      x-group-parameters: true
      x-client-paginated: true
      x-doctave:
        code-samples:
          - language: go
            code: |
              // First install the go client with "go get github.com/apivideo/api.video-go-client"
              // Documentation: https://github.com/apivideo/api.video-go-client/blob/main/docs/ChaptersApi.md#list

              package main

              import (
                  "context"
                  "fmt"
                  "os"
                  apivideosdk "github.com/apivideo/api.video-go-client"
              )

              func main() {
                  client := apivideosdk.ClientBuilder("YOUR_API_KEY").Build()
                  // if you rather like to use the sandbox environment:
                  // client := apivideosdk.SandboxClientBuilder("YOUR_SANDBOX_API_KEY").Build()
                      
                  videoId := "vi4k0jvEUuaTdRAEjQ4Jfrgz" // string | The unique identifier for the video you want to show a chapter for.
                  language := "en" // string | A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation.

                  
                  res, err := client.Chapters.Get(videoId, language)

                  if err != nil {
                      fmt.Fprintf(os.Stderr, "Error when calling `Chapters.Get``: %v\
              ", err)
                  }
                  // response from `Get`: Chapter
                  fmt.Fprintf(os.Stdout, "Response from `Chapters.Get`: %v\
              ", res)
              }
          - language: node
            code: |-
              // First install the "@api.video/nodejs-client" npm package
              // Documentation: https://github.com/apivideo/api.video-nodejs-client/blob/main/doc/api/ChaptersApi.md#list

              const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" });

              const captions = await client.chapters.list({
                videoId 'vi4k0jvEUuaTdRAEjQ4Prklg', // The unique identifier for the video you want to retrieve a list of chapters for.
                currentPage: 2, // Choose the number of search results to return per page. Minimum value: 1
                pageSize: 30, // Results per page. Allowed values 1-100, default is 25.
              );  
          - language: python
            code: |
              # First install the api client with "pip install api.video"
              # Documentation: https://github.com/apivideo/api.video-python-client/blob/main/docs/ChaptersApi.md#list

              import apivideo
              from apivideo.api import chapters_api
              from apivideo.model.not_found import NotFound
              from apivideo.model.chapter import Chapter
              from pprint import pprint

              # Enter a context with an instance of the API client
              with apivideo.AuthenticatedApiClient(__API_KEY__) as api_client:
                  # Create an instance of the API class
                  api_instance = chapters_api.ChaptersApi(api_client)
                  video_id = "vi4k0jvEUuaTdRAEjQ4Jfrgz" # str | The unique identifier for the video you want to show a chapter for.
                  language = "en" # str | A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation.

                  # example passing only required values which don't have defaults set
                  try:
                      # Show a chapter
                      api_response = api_instance.get(video_id, language)
                      pprint(api_response)
                  except apivideo.ApiException as e:
                      print("Exception when calling ChaptersApi->get: %s\n" % e)
          - language: java
            code: |
              // First add the "video.api:java-api-client" maven dependency to your project
              // Documentation: https://github.com/apivideo/api.video-java-client/blob/main/docs/ChaptersApi.md#list

              import video.api.client.ApiVideoClient;
              import video.api.client.api.ApiException;
              import video.api.client.api.models.*;
              import video.api.client.api.clients.ChaptersApi;
              import java.util.*;

              public class Example {
                public static void main(String[] args) {
                  ApiVideoClient client = new ApiVideoClient("YOUR_API_KEY");
                  // if you rather like to use the sandbox environment:
                  // ApiVideoClient client = new ApiVideoClient("YOUR_SANDBOX_API_KEY", ApiVideoClient.Environment.SANDBOX);

                  ChaptersApi apiInstance = client.chapters();
                  
                  String videoId = "vi4k0jvEUuaTdRAEjQ4Jfrgz"; // The unique identifier for the video you want to show a chapter for.
                  String language = "en"; // A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation.

                  try {
                    Chapter result = apiInstance.get(videoId, language);
                    System.out.println(result);
                  } catch (ApiException e) {
                    System.err.println("Exception when calling ChaptersApi#get");
                    System.err.println("Status code: " + e.getCode());
                    System.err.println("Reason: " + e.getMessage());
                    System.err.println("Response headers: " + e.getResponseHeaders());
                    e.printStackTrace();
                  }
                }
              }
          - language: csharp
            code: |
              // First add the "ApiVideo" NuGet package to your project
              // Documentation: https://github.com/apivideo/api.video-csharp-client/blob/main/docs/ChaptersApi.md#list

              using System.Diagnostics;
              using ApiVideo.Client;

              namespace Example
              {
                  public class getExample
                  {
                      public static void Main()
                      {
                          var basePath = ApiVideoClient.Client.Environment.SANDBOX;
                          var apiKey = "YOUR_API_KEY";

                          var apiInstance = new ApiVideoClient(apiKey,basePath);

                          var videoId = vi4k0jvEUuaTdRAEjQ4Jfrgz;  // string | The unique identifier for the video you want to show a chapter for.
                          var language = en;  // string | A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation.
                          var apiChaptersInstance = apiInstance.Chapters();
                          try
                          {
                              // Show a chapter
                              Chapter result = apiChaptersInstance.get(videoId, language);
                              Debug.WriteLine(result);
                          }
                          catch (ApiException  e)
                          {
                              Debug.Print("Exception when calling ChaptersApi.get: " + e.Message );
                              Debug.Print("Status Code: "+ e.ErrorCode);
                              Debug.Print(e.StackTrace);
                          }
                      }
                  }
              }
          - language: php
            code: |-
              <?php
              // First install the api client: "composer require api-video/php-api-client"
              // Documentation: https://github.com/apivideo/api.video-php-client/blob/main/docs/Api/ChaptersApi.md#list

              require __DIR__ . '/vendor/autoload.php';

              $videoId = 'vi4k0jvEUuaTdRAEjQ4Prklg'; // The unique identifier for the video you want to retrieve a list of chapters for.

              $captions = $client->chapters()->list($videoId, array(
                  'currentPage' => 2, // Choose the number of search results to return per page. Minimum value: 1)
                  'pageSize' => 30 // Results per page. Allowed values 1-100, default is 25.)
              )); 
          - language: swift
            code: |
              // First install the api client: https://github.com/apivideo/api.video-swift-client#getting-started
              // Documentation: https://github.com/apivideo/api.video-swift-client/blob/main/docs/ChaptersAPI.md#list
  /players:
    get:
      tags:
        - Player Themes
      summary: List all player themes
      description: 'Retrieve a list of all the player themes you created, as well as details about each one.'
      operationId: GET_players
      parameters:
        - name: sortBy
          in: query
          description: createdAt is the time the player was created. updatedAt is the time the player was last updated. The time is presented in ATOM UTC format.
          required: false
          style: form
          explode: true
          schema:
            type: string
            enum:
              - name
              - createdAt
              - updatedAt
          example: createdAt
        - name: sortOrder
          in: query
          description: 'Allowed: asc, desc. Ascending for date and time means that earlier values precede later ones. Descending means that later values preced earlier ones.'
          required: false
          style: form
          explode: true
          schema:
            type: string
            enum:
              - asc
              - desc
          example: asc
        - $ref: '#/components/parameters/current-page'
        - $ref: '#/components/parameters/page-size'
      responses:
        '200':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/player-themes-list-response'
              examples:
                response:
                  value:
                    data:
                      - playerId: pl4fgtjy4tjyKDK545DRdfg
                        createdAt: '2020-01-13T10:09:17+00:00'
                        updatedAt: '2020-01-13T10:09:17+00:00'
                        text: 'rgba(255, 255, 255, .95)'
                        link: 'rgba(255, 0, 0, .95)'
                        linkHover: 'rgba(255, 255, 255, .75)'
                        linkActive: 'rgba(255, 0, 0, .75)'
                        trackPlayed: 'rgba(255, 255, 255, .95)'
                        trackUnplayed: 'rgba(255, 255, 255, .1)'
                        trackBackground: 'rgba(0, 0, 0, 0)'
                        backgroundTop: 'rgba(72, 4, 45, 1)'
                        backgroundBottom: 'rgba(94, 95, 89, 1)'
                        backgroundText: 'rgba(255, 255, 255, .95)'
                        enableApi: false
                        enableControls: false
                        forceAutoplay: false
                        hideTitle: false
                        forceLoop: false
                      - playerId: pl54fgtjy4tjyKDK45DRdfg
                        createdAt: '2020-01-13T10:09:17+00:00'
                        updatedAt: '2020-01-13T10:09:17+00:00'
                        text: 'rgba(255, 255, 255, .95)'
                        link: 'rgba(255, 0, 0, .95)'
                        linkHover: 'rgba(255, 255, 255, .75)'
                        linkActive: 'rgba(255, 0, 0, .75)'
                        trackPlayed: 'rgba(255, 255, 255, .95)'
                        trackUnplayed: 'rgba(255, 255, 255, .1)'
                        trackBackground: 'rgba(0, 0, 0, 0)'
                        backgroundTop: 'rgba(72, 4, 45, 1)'
                        backgroundBottom: 'rgba(94, 95, 89, 1)'
                        backgroundText: 'rgba(255, 255, 255, .95)'
                        enableApi: true
                        enableControls: true
                        forceAutoplay: true
                        hideTitle: false
                        forceLoop: false
                    pagination:
                      currentPage: 1
                      pageSize: 25
                      pagesTotal: 1
                      itemsTotal: 4
                      currentPageItems: 4
                      links:
                        - rel: self
                          uri: 'https://ws.api.video/players?currentPage=1'
                        - rel: first
                          uri: 'https://ws.api.video/players?currentPage=1'
                        - rel: last
                          uri: 'https://ws.api.video/players?currentPage=1'
        '400':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/bad-request'
              examples:
                response:
                  value:
                    title: This parameter is out of the allowed range of values.
                    name: page
                    status: 400
                    range:
                      min: 1
                    problems:
                      - title: This parameter is out of the allowed range of values.
                        name: page
                        range:
                          min: 1
                      - title: This parameter is out of the allowed range of values.
                        name: pageSize
                        range:
                          min: 10
                          max: 100
        '429':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/too-many-requests'
              examples:
                Too many requests:
                  value:
                    type: 'https://docs.api.video/reference/too-many-requests'
                    title: Too many requests.
                    status: 429
      security:
        - apiKey: []
      x-client-action: list
      x-group-parameters: true
      x-client-paginated: true
      x-optional-object: true
      x-doctave:
        code-samples:
          - language: go
            code: |
              // First install the go client with "go get github.com/apivideo/api.video-go-client"
              // Documentation: https://github.com/apivideo/api.video-go-client/blob/main/docs/PlayerThemesApi.md#list

              package main

              import (
                  "context"
                  "fmt"
                  "os"
                  apivideosdk "github.com/apivideo/api.video-go-client"
              )

              func main() {
                  client := apivideosdk.ClientBuilder("YOUR_API_KEY").Build()
                  // if you rather like to use the sandbox environment:
                  // client := apivideosdk.SandboxClientBuilder("YOUR_SANDBOX_API_KEY").Build()
                  req := apivideosdk.PlayerThemesApiListRequest{}
                  
                  req.SortBy("createdAt") // string | createdAt is the time the player was created. updatedAt is the time the player was last updated. The time is presented in ATOM UTC format.
                  req.SortOrder("asc") // string | Allowed: asc, desc. Ascending for date and time means that earlier values precede later ones. Descending means that later values preced earlier ones.
                  req.CurrentPage(int32(2)) // int32 | Choose the number of search results to return per page. Minimum value: 1 (default to 1)
                  req.PageSize(int32(30)) // int32 | Results per page. Allowed values 1-100, default is 25. (default to 25)

                  res, err := client.PlayerThemes.List(req)
                  

                  if err != nil {
                      fmt.Fprintf(os.Stderr, "Error when calling `PlayerThemes.List``: %v\
              ", err)
                  }
                  // response from `List`: PlayerThemesListResponse
                  fmt.Fprintf(os.Stdout, "Response from `PlayerThemes.List`: %v\
              ", res)
              }
          - language: node
            code: |-
              // First install the "@api.video/nodejs-client" npm package
              // Documentation: https://github.com/apivideo/api.video-nodejs-client/blob/main/doc/api/PlayerThemesApi.md#list

              const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" });

              const sortBy = 'createdAt'; // createdAt is the time the player was created. updatedAt is the time the player was last updated. The time is presented in ATOM UTC format.
              const sortOrder = 'asc'; // Allowed: asc, desc. Ascending for date and time means that earlier values precede later ones. Descending means that later values preced earlier ones.
              const currentPage = 2; // Choose the number of search results to return per page. Minimum value: 1
              const pageSize = 30; // Results per page. Allowed values 1-100, default is 25.

              // PlayerThemesListResponse
              const playerThemes = await client.playerThemes.list({ sortBy, sortOrder, currentPage, pageSize }); 
          - language: python
            code: |
              # First install the api client with "pip install api.video"
              # Documentation: https://github.com/apivideo/api.video-python-client/blob/main/docs/PlayerThemesApi.md#list

              import apivideo
              from apivideo.api import player_themes_api
              from apivideo.model.bad_request import BadRequest
              from apivideo.model.player_themes_list_response import PlayerThemesListResponse
              from pprint import pprint

              # Enter a context with an instance of the API client
              with apivideo.AuthenticatedApiClient(__API_KEY__) as api_client:
                  # Create an instance of the API class
                  api_instance = player_themes_api.PlayerThemesApi(api_client)
                  sort_by = "createdAt" # str | createdAt is the time the player was created. updatedAt is the time the player was last updated. The time is presented in ATOM UTC format. (optional)
                  sort_order = "asc" # str | Allowed: asc, desc. Ascending for date and time means that earlier values precede later ones. Descending means that later values preced earlier ones. (optional)
                  current_page = 2 # int | Choose the number of search results to return per page. Minimum value: 1 (optional) if omitted the server will use the default value of 1
                  page_size = 30 # int | Results per page. Allowed values 1-100, default is 25. (optional) if omitted the server will use the default value of 25

                  # example passing only required values which don't have defaults set
                  # and optional values
                  try:
                      # List all players
                      api_response = api_instance.list(sort_by=sort_by, sort_order=sort_order, current_page=current_page, page_size=page_size)
                      pprint(api_response)
                  except apivideo.ApiException as e:
                      print("Exception when calling PlayerThemesApi->list: %s\n" % e)
          - language: java
            code: |
              // First add the "video.api:java-api-client" maven dependency to your project
              // Documentation: https://github.com/apivideo/api.video-java-client/blob/main/docs/PlayerThemesApi.md#list

              import video.api.client.ApiVideoClient;
              import video.api.client.api.ApiException;
              import video.api.client.api.models.*;
              import video.api.client.api.clients.PlayerThemesApi;
              import java.util.*;

              public class Example {
                public static void main(String[] args) {
                  ApiVideoClient client = new ApiVideoClient("YOUR_API_KEY");
                  // if you rather like to use the sandbox environment:
                  // ApiVideoClient client = new ApiVideoClient("YOUR_SANDBOX_API_KEY", ApiVideoClient.Environment.SANDBOX);

                  PlayerThemesApi apiInstance = client.playerThemes();
                  
                  String sortBy = "createdAt"; // createdAt is the time the player was created. updatedAt is the time the player was last updated. The time is presented in ATOM UTC format.
                  String sortOrder = "asc"; // Allowed: asc, desc. Ascending for date and time means that earlier values precede later ones. Descending means that later values preced earlier ones.
                  Integer currentPage = 1; // Choose the number of search results to return per page. Minimum value: 1
                  Integer pageSize = 25; // Results per page. Allowed values 1-100, default is 25.

                  try {
                    Page<PlayerTheme> result = apiInstance.list()
                          .sortBy(sortBy)
                          .sortOrder(sortOrder)
                          .currentPage(currentPage)
                          .pageSize(pageSize)
                          .execute();
                    System.out.println(result);
                  } catch (ApiException e) {
                    System.err.println("Exception when calling PlayerThemesApi#list");
                    System.err.println("Status code: " + e.getCode());
                    System.err.println("Reason: " + e.getMessage());
                    System.err.println("Response headers: " + e.getResponseHeaders());
                    e.printStackTrace();
                  }
                }
              }
          - language: csharp
            code: |
              // First add the "ApiVideo" NuGet package to your project
              // Documentation: https://github.com/apivideo/api.video-csharp-client/blob/main/docs/PlayerThemesApi.md#list

              using System.Diagnostics;
              using ApiVideo.Client;

              namespace Example
              {
                  public class listExample
                  {
                      public static void Main()
                      {
                          var basePath = ApiVideoClient.Client.Environment.SANDBOX;
                          var apiKey = "YOUR_API_KEY";

                          var apiInstance = new ApiVideoClient(apiKey,basePath);

                          var sortBy = createdAt;  // string | createdAt is the time the player was created. updatedAt is the time the player was last updated. The time is presented in ATOM UTC format. (optional) 
                          var sortOrder = asc;  // string | Allowed: asc, desc. Ascending for date and time means that earlier values precede later ones. Descending means that later values preced earlier ones. (optional) 
                          var currentPage = 2;  // int? | Choose the number of search results to return per page. Minimum value: 1 (optional)  (default to 1)
                          var pageSize = 30;  // int? | Results per page. Allowed values 1-100, default is 25. (optional)  (default to 25)
                          var apiPlayerThemesInstance = apiInstance.PlayerThemes();
                          try
                          {
                              // List all players
                              PlayerThemesListResponse result = apiPlayerThemesInstance.list(sortBy, sortOrder, currentPage, pageSize);
                              Debug.WriteLine(result);
                          }
                          catch (ApiException  e)
                          {
                              Debug.Print("Exception when calling PlayerThemesApi.list: " + e.Message );
                              Debug.Print("Status Code: "+ e.ErrorCode);
                              Debug.Print(e.StackTrace);
                          }
                      }
                  }
              }
          - language: php
            code: |-
              <?php
              // First install the api client: "composer require api-video/php-api-client"
              // Documentation: https://github.com/apivideo/api.video-php-client/blob/main/docs/Api/PlayerThemesApi.md#list

              require __DIR__ . '/vendor/autoload.php';

              $playerThemes = $client->playerThemes()->list(array(
                  'sortBy' => 'createdAt', // createdAt is the time the player was created. updatedAt is the time the player was last updated. The time is presented in ATOM UTC format.
                  'sortOrder' => 'asc', // ->setAllowed(asc, desc. Ascending for date and time means that earlier values precede later ones. Descending means that later values preced earlier ones.)
                  'currentPage' => 2, // Choose the number of search results to return per page. Minimum ->setvalue(1)
                  'pageSize' => 30 // Results per page. Allowed values 1-100, default is 25.
              )); 
          - language: swift
            code: |
              // First install the api client: https://github.com/apivideo/api.video-swift-client#getting-started
              // Documentation: https://github.com/apivideo/api.video-swift-client/blob/main/docs/PlayerThemesAPI.md#list
    post:
      tags:
        - Player Themes
      summary: Create a player
      description: 'Create a player for your video, and customise it.'
      operationId: POST_players
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/player-theme-creation-payload'
        required: true
      responses:
        '201':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/player-theme'
              examples:
                response:
                  value:
                    playerId: pl45d5vFFGrfdsdsd156dGhh
                    createdAt: '2020-01-13T10:09:17+00:00'
                    updatedAt: '2020-01-13T10:09:17+00:00'
                    text: 'rgba(255, 255, 255, .95)'
                    link: 'rgba(255, 0, 0, .95)'
                    linkHover: 'rgba(255, 255, 255, .75)'
                    linkActive: 'rgba(255, 0, 0, .75)'
                    trackPlayed: 'rgba(255, 255, 255, .95)'
                    trackUnplayed: 'rgba(255, 255, 255, .1)'
                    trackBackground: 'rgba(0, 0, 0, 0)'
                    backgroundTop: 'rgba(72, 4, 45, 1)'
                    backgroundBottom: 'rgba(94, 95, 89, 1)'
                    backgroundText: 'rgba(255, 255, 255, .95)'
                    enableApi: false
                    enableControls: false
                    forceAutoplay: false
                    hideTitle: false
                    forceLoop: false
        '429':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/too-many-requests'
              examples:
                Too many requests:
                  value:
                    type: 'https://docs.api.video/reference/too-many-requests'
                    title: Too many requests.
                    status: 429
      security:
        - apiKey: []
      x-client-action: create
      x-doctave:
        code-samples:
          - language: go
            code: |
              // First install the go client with "go get github.com/apivideo/api.video-go-client"
              // Documentation: https://github.com/apivideo/api.video-go-client/blob/main/docs/PlayerThemesApi.md#create

              package main

              import (
                  "context"
                  "fmt"
                  "os"
                  apivideosdk "github.com/apivideo/api.video-go-client"
              )

              func main() {
                  client := apivideosdk.ClientBuilder("YOUR_API_KEY").Build()
                  // if you rather like to use the sandbox environment:
                  // client := apivideosdk.SandboxClientBuilder("YOUR_SANDBOX_API_KEY").Build()
                      
                  playerThemeCreationPayload := *apivideosdk.NewPlayerThemeCreationPayload() // PlayerThemeCreationPayload | 

                  
                  res, err := client.PlayerThemes.Create(playerThemeCreationPayload)

                  if err != nil {
                      fmt.Fprintf(os.Stderr, "Error when calling `PlayerThemes.Create``: %v\
              ", err)
                  }
                  // response from `Create`: PlayerTheme
                  fmt.Fprintf(os.Stdout, "Response from `PlayerThemes.Create`: %v\
              ", res)
              }
          - language: node
            code: |-
              // First install the "@api.video/nodejs-client" npm package
              // Documentation: https://github.com/apivideo/api.video-nodejs-client/blob/main/doc/api/PlayerThemesApi.md#create

              const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" });

              const playerThemeCreationPayload = {
                text: "rgba(255, 255, 255, 1)", // RGBA color for timer text. Default: rgba(255, 255, 255, 1)
                link: "rgba(255, 255, 255, 1)", // RGBA color for all controls. Default: rgba(255, 255, 255, 1)
                linkHover: "rgba(255, 255, 255, 1)", // RGBA color for all controls when hovered. Default: rgba(255, 255, 255, 1)
                trackPlayed: "rgba(255, 255, 255, 1)", // RGBA color playback bar: played content. Default: rgba(88, 131, 255, .95)
                trackUnplayed: "rgba(255, 255, 255, 1)", // RGBA color playback bar: downloaded but unplayed (buffered) content. Default: rgba(255, 255, 255, .35)
                trackBackground: "rgba(255, 255, 255, 1)", // RGBA color playback bar: background. Default: rgba(255, 255, 255, .2)
                backgroundTop: "rgba(255, 255, 255, 1)", // RGBA color: top 50% of background. Default: rgba(0, 0, 0, .7)
                backgroundBottom: "rgba(255, 255, 255, 1)", // RGBA color: bottom 50% of background. Default: rgba(0, 0, 0, .7)
                backgroundText: "rgba(255, 255, 255, 1)", // RGBA color for title text. Default: rgba(255, 255, 255, 1)
                enableApi: true, // enable/disable player SDK access. Default: true
                enableControls: true, // enable/disable player controls. Default: true
                forceAutoplay: true, // enable/disable player autoplay. Default: false
                hideTitle: true, // enable/disable title. Default: false
                forceLoop: true, // enable/disable looping. Default: false
              }; 
               
              const playerTheme = await client.playerThemes.create(playerThemeCreationPayload); 
          - language: python
            code: |
              # First install the api client with "pip install api.video"
              # Documentation: https://github.com/apivideo/api.video-python-client/blob/main/docs/PlayerThemesApi.md#create

              import apivideo
              from apivideo.api import player_themes_api
              from apivideo.model.player_theme_creation_payload import PlayerThemeCreationPayload
              from apivideo.model.player_theme import PlayerTheme
              from pprint import pprint

              # Enter a context with an instance of the API client
              with apivideo.AuthenticatedApiClient(__API_KEY__) as api_client:
                  # Create an instance of the API class
                  api_instance = player_themes_api.PlayerThemesApi(api_client)
                  player_theme_creation_payload = PlayerThemeCreationPayload(
                      text="text_example",
                      link="link_example",
                      link_hover="link_hover_example",
                      track_played="track_played_example",
                      track_unplayed="track_unplayed_example",
                      track_background="track_background_example",
                      background_top="background_top_example",
                      background_bottom="background_bottom_example",
                      background_text="background_text_example",
                      enable_api=True,
                      enable_controls=True,
                      force_autoplay=False,
                      hide_title=False,
                      force_loop=False,
                  ) # PlayerThemeCreationPayload | 

                  # example passing only required values which don't have defaults set
                  try:
                      # Create a player
                      api_response = api_instance.create(player_theme_creation_payload)
                      pprint(api_response)
                  except apivideo.ApiException as e:
                      print("Exception when calling PlayerThemesApi->create: %s\
              " % e)
          - language: java
            code: |
              // First add the "video.api:java-api-client" maven dependency to your project
              // Documentation: https://github.com/apivideo/api.video-java-client/blob/main/docs/PlayerThemesApi.md#create

              import video.api.client.ApiVideoClient;
              import video.api.client.api.ApiException;
              import video.api.client.api.models.*;
              import video.api.client.api.clients.PlayerThemesApi;
              import java.util.*;

              public class Example {
                public static void main(String[] args) {
                  ApiVideoClient client = new ApiVideoClient("YOUR_API_KEY");
                  // if you rather like to use the sandbox environment:
                  // ApiVideoClient client = new ApiVideoClient("YOUR_SANDBOX_API_KEY", ApiVideoClient.Environment.SANDBOX);

                  PlayerThemesApi apiInstance = client.playerThemes();
                  
                  PlayerThemeCreationPayload playerThemeCreationPayload = new PlayerThemeCreationPayload(); // 
                  playerThemeCreationPayload.setText(""null""); // RGBA color for timer text. Default: rgba(255, 255, 255, 1)
                  playerThemeCreationPayload.setLink(""null""); // RGBA color for all controls. Default: rgba(255, 255, 255, 1)
                  playerThemeCreationPayload.setLinkHover(""null""); // RGBA color for all controls when hovered. Default: rgba(255, 255, 255, 1)
                  playerThemeCreationPayload.setTrackPlayed(""null""); // RGBA color playback bar: played content. Default: rgba(88, 131, 255, .95)
                  playerThemeCreationPayload.setTrackUnplayed(""null""); // RGBA color playback bar: downloaded but unplayed (buffered) content. Default: rgba(255, 255, 255, .35)
                  playerThemeCreationPayload.setTrackBackground(""null""); // RGBA color playback bar: background. Default: rgba(255, 255, 255, .2)
                  playerThemeCreationPayload.setBackgroundTop(""null""); // RGBA color: top 50% of background. Default: rgba(0, 0, 0, .7)
                  playerThemeCreationPayload.setBackgroundBottom(""null""); // RGBA color: bottom 50% of background. Default: rgba(0, 0, 0, .7)
                  playerThemeCreationPayload.setBackgroundText(""null""); // RGBA color for title text. Default: rgba(255, 255, 255, 1)
                  playerThemeCreationPayload.setEnableApi(); // enable/disable player SDK access. Default: true
                  playerThemeCreationPayload.setEnableControls(); // enable/disable player controls. Default: true
                  playerThemeCreationPayload.setForceAutoplay(); // enable/disable player autoplay. Default: false
                  playerThemeCreationPayload.setHideTitle(); // enable/disable title. Default: false
                  playerThemeCreationPayload.setForceLoop(); // enable/disable looping. Default: false


                  try {
                    PlayerTheme result = apiInstance.create(playerThemeCreationPayload);
                    System.out.println(result);
                  } catch (ApiException e) {
                    System.err.println("Exception when calling PlayerThemesApi#create");
                    System.err.println("Status code: " + e.getCode());
                    System.err.println("Reason: " + e.getMessage());
                    System.err.println("Response headers: " + e.getResponseHeaders());
                    e.printStackTrace();
                  }
                }
              }
          - language: csharp
            code: |
              // First add the "ApiVideo" NuGet package to your project
              // Documentation: https://github.com/apivideo/api.video-csharp-client/blob/main/docs/PlayerThemesApi.md#create

              using System.Diagnostics;
              using ApiVideo.Client;

              namespace Example
              {
                  public class createExample
                  {
                      public static void Main()
                      {
                          var basePath = ApiVideoClient.Client.Environment.SANDBOX;
                          var apiKey = "YOUR_API_KEY";

                          var apiInstance = new ApiVideoClient(apiKey,basePath);

                          var playerThemeCreationPayload = new PlayerThemeCreationPayload(); // PlayerThemeCreationPayload | 
                          var apiPlayerThemesInstance = apiInstance.PlayerThemes();
                          try
                          {
                              // Create a player
                              PlayerTheme result = apiPlayerThemesInstance.create(playerThemeCreationPayload);
                              Debug.WriteLine(result);
                          }
                          catch (ApiException  e)
                          {
                              Debug.Print("Exception when calling PlayerThemesApi.create: " + e.Message );
                              Debug.Print("Status Code: "+ e.ErrorCode);
                              Debug.Print(e.StackTrace);
                          }
                      }
                  }
              }
          - language: php
            code: |-
              <?php
              // First install the api client: "composer require api-video/php-api-client"
              // Documentation: https://github.com/apivideo/api.video-php-client/blob/main/docs/Api/PlayerThemesApi.md#create

              require __DIR__ . '/vendor/autoload.php';

              $playerThemeCreationPayload = (new \ApiVideo\Client\Model\PlayerThemeCreationPayload())
                  ->setText("rgba(255, 255, 255, 1)") // RGBA color for timer text. Default: rgba(255, 255, 255, 1))
                  ->setLink("rgba(255, 255, 255, 1)") // RGBA color for all controls. Default: rgba(255, 255, 255, 1))
                  ->setLinkHover("rgba(255, 255, 255, 1)") // RGBA color for all controls when hovered. Default: rgba(255, 255, 255, 1))
                  ->setTrackPlayed("rgba(255, 255, 255, 1)") // RGBA color playback bar: played content. Default: rgba(88, 131, 255, .95))
                  ->setTrackUnplayed("rgba(255, 255, 255, 1)") // RGBA color playback bar: downloaded but unplayed (buffered) content. Default: rgba(255, 255, 255, .35))
                  ->setTrackBackground("rgba(255, 255, 255, 1)") // RGBA color playback bar: background. Default: rgba(255, 255, 255, .2))
                  ->setBackgroundTop("rgba(255, 255, 255, 1)") // RGBA color: top 50% of background. Default: rgba(0, 0, 0, .7))
                  ->setBackgroundBottom("rgba(255, 255, 255, 1)") // RGBA color: bottom 50% of background. Default: rgba(0, 0, 0, .7))
                  ->setBackgroundText("rgba(255, 255, 255, 1)") // RGBA color for title text. Default: rgba(255, 255, 255, 1))
                  ->setEnableApi(true) // enable/disable player SDK access. Default: true)
                  ->setEnableControls(true) // enable/disable player controls. Default: true)
                  ->setForceAutoplay(true) // enable/disable player autoplay. Default: false)
                  ->setHideTitle(true) // enable/disable title. Default: false)
                  ->setForceLoop(true); // enable/disable looping. Default: false)

              $playerTheme = $client->playerThemes()->create($playerThemeCreationPayload); 
          - language: swift
            code: |+
              // First install the api client: https://github.com/apivideo/api.video-swift-client#getting-started
              // Documentation: https://github.com/apivideo/api.video-swift-client/blob/main/docs/PlayerThemesAPI.md#create

              ApiVideoClient.apiKey = "YOUR_API_KEY"

              let videoCreationPayload = PlayerThemeCreationPayload(
                text = "rgba(255, 0, 0, 1)", // RGBA color for timer text. Default: rgba(255, 255, 255, 1)
                link = "rgba(0, 0, 255, 1)", // RGBA color for all controls. Default: rgba(255, 255, 255, 1)
                linkHover = "rgba(0, 255, 255, 1)", // RGBA color for all controls when hovered. Default: rgba(255, 255, 255, 1)
                trackPlayed = "rgba(255, 0, 255, 1)", // RGBA color playback bar: played content. Default: rgba(88, 131, 255, .95)
                trackUnplayed = "rgba(255, 255, 255, 1)", // RGBA color playback bar: downloaded but unplayed (buffered) content. Default: rgba(255, 255, 255, .35)
                trackBackground = "rgba(255, 255, 255, 1)", // RGBA color playback bar: background. Default: rgba(255, 255, 255, .2)
                backgroundTop = "rgba(0, 255, 255, 1)", // RGBA color: top 50% of background. Default: rgba(0, 0, 0, .7)
                backgroundBottom = "rgba(255, 255, 255, 1)", // RGBA color: bottom 50% of background. Default: rgba(0, 0, 0, .7)
                backgroundText = "rgba(255, 255, 255, 1)", // RGBA color for title text. Default: rgba(255, 255, 255, 1)
                enableApi = true, // enable/disable player SDK access. Default: true
                enableControls = true, // enable/disable player controls. Default: true
                forceAutoplay = true, // enable/disable player autoplay. Default: false
                hideTitle = true, // enable/disable title. Default: false
                forceLoop = true // enable/disable looping. Default: false
              )


              PlayerThemesAPI.create(playerThemeCreationPayload: playerThemeCreationPayload) { (response, error) in
                  
              }
  '/players/{playerId}':
    get:
      tags:
        - Player Themes
      summary: Retrieve a player
      description: Retreive a player theme by player id.
      operationId: GET_players-playerId
      parameters:
        - name: playerId
          in: path
          description: 'The unique identifier for the player you want to retrieve. '
          required: true
          style: simple
          explode: false
          schema:
            type: string
          example: pl45d5vFFGrfdsdsd156dGhh
      responses:
        '200':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/player-theme'
              examples:
                response:
                  value:
                    playerId: pl45d5vFFGrfdsdsd156dGhh
                    createdAt: '2020-01-13T10:09:17+00:00'
                    updatedAt: '2020-01-13T11:12:14+00:00'
                    text: 'rgba(255, 255, 255, .95)'
                    link: 'rgba(255, 0, 0, .95)'
                    linkHover: 'rgba(255, 255, 255, .75)'
                    linkActive: 'rgba(255, 0, 0, .75)'
                    trackPlayed: 'rgba(255, 255, 255, .95)'
                    trackUnplayed: 'rgba(255, 255, 255, .1)'
                    trackBackground: 'rgba(0, 0, 0, 0)'
                    backgroundTop: 'rgba(72, 4, 45, 1)'
                    backgroundBottom: 'rgba(94, 95, 89, 1)'
                    backgroundText: 'rgba(255, 255, 255, .95)'
                    enableApi: false
                    enableControls: false
                    forceAutoplay: false
                    hideTitle: false
                    forceLoop: false
        '404':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/not-found'
              examples:
                response:
                  value:
                    type: 'https://docs.api.video/reference/resource-not-found'
                    title: The requested resource was not found.
                    name: playerId
                    status: 404
        '429':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/too-many-requests'
              examples:
                Too many requests:
                  value:
                    type: 'https://docs.api.video/reference/too-many-requests'
                    title: Too many requests.
                    status: 429
      security:
        - apiKey: []
      x-client-action: get
      x-doctave:
        code-samples:
          - language: go
            code: |
              // First install the go client with "go get github.com/apivideo/api.video-go-client"
              // Documentation: https://github.com/apivideo/api.video-go-client/blob/main/docs/PlayerThemesApi.md#get

              package main

              import (
                  "context"
                  "fmt"
                  "os"
                  apivideosdk "github.com/apivideo/api.video-go-client"
              )

              func main() {
                  client := apivideosdk.ClientBuilder("YOUR_API_KEY").Build()
                  // if you rather like to use the sandbox environment:
                  // client := apivideosdk.SandboxClientBuilder("YOUR_SANDBOX_API_KEY").Build()
                      
                  playerId := "pl45d5vFFGrfdsdsd156dGhh" // string | The unique identifier for the player you want to retrieve. 

                  
                  res, err := client.PlayerThemes.Get(playerId)

                  if err != nil {
                      fmt.Fprintf(os.Stderr, "Error when calling `PlayerThemes.Get``: %v\
              ", err)
                  }
                  // response from `Get`: PlayerTheme
                  fmt.Fprintf(os.Stdout, "Response from `PlayerThemes.Get`: %v\
              ", res)
              }
          - language: node
            code: |-
              // First install the "@api.video/nodejs-client" npm package
              // Documentation: https://github.com/apivideo/api.video-nodejs-client/blob/main/doc/api/PlayerThemesApi.md#get

              const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" });

              const playerId = 'pl45d5vFFGrfdsdsd156dGhh'; // The unique identifier for the player you want to retrieve. 
              const playerTheme = await client.playerThemes.get(playerId); 
          - language: python
            code: |
              # First install the api client with "pip install api.video"
              # Documentation: https://github.com/apivideo/api.video-python-client/blob/main/docs/PlayerThemesApi.md#get

              import apivideo
              from apivideo.api import player_themes_api
              from apivideo.model.not_found import NotFound
              from apivideo.model.player_theme import PlayerTheme
              from pprint import pprint

              # Enter a context with an instance of the API client
              with apivideo.AuthenticatedApiClient(__API_KEY__) as api_client:
                  # Create an instance of the API class
                  api_instance = player_themes_api.PlayerThemesApi(api_client)
                  player_id = "pl45d5vFFGrfdsdsd156dGhh" # str | The unique identifier for the player you want to retrieve. 

                  # example passing only required values which don't have defaults set
                  try:
                      # Show a player
                      api_response = api_instance.get(player_id)
                      pprint(api_response)
                  except apivideo.ApiException as e:
                      print("Exception when calling PlayerThemesApi->get: %s\
              " % e)
          - language: java
            code: |
              // First add the "video.api:java-api-client" maven dependency to your project
              // Documentation: https://github.com/apivideo/api.video-java-client/blob/main/docs/PlayerThemesApi.md#get

              import video.api.client.ApiVideoClient;
              import video.api.client.api.ApiException;
              import video.api.client.api.models.*;
              import video.api.client.api.clients.PlayerThemesApi;
              import java.util.*;

              public class Example {
                public static void main(String[] args) {
                  ApiVideoClient client = new ApiVideoClient("YOUR_API_KEY");
                  // if you rather like to use the sandbox environment:
                  // ApiVideoClient client = new ApiVideoClient("YOUR_SANDBOX_API_KEY", ApiVideoClient.Environment.SANDBOX);

                  PlayerThemesApi apiInstance = client.playerThemes();
                  
                  String playerId = "pl45d5vFFGrfdsdsd156dGhh"; // The unique identifier for the player you want to retrieve. 

                  try {
                    PlayerTheme result = apiInstance.get(playerId);
                    System.out.println(result);
                  } catch (ApiException e) {
                    System.err.println("Exception when calling PlayerThemesApi#get");
                    System.err.println("Status code: " + e.getCode());
                    System.err.println("Reason: " + e.getMessage());
                    System.err.println("Response headers: " + e.getResponseHeaders());
                    e.printStackTrace();
                  }
                }
              }
          - language: csharp
            code: |
              // First add the "ApiVideo" NuGet package to your project
              // Documentation: https://github.com/apivideo/api.video-csharp-client/blob/main/docs/PlayerThemesApi.md#get

              using System.Diagnostics;
              using ApiVideo.Client;

              namespace Example
              {
                  public class getExample
                  {
                      public static void Main()
                      {
                          var basePath = ApiVideoClient.Client.Environment.SANDBOX;
                          var apiKey = "YOUR_API_KEY";

                          var apiInstance = new ApiVideoClient(apiKey,basePath);

                          var playerId = pl45d5vFFGrfdsdsd156dGhh;  // string | The unique identifier for the player you want to retrieve. 
                          var apiPlayerThemesInstance = apiInstance.PlayerThemes();
                          try
                          {
                              // Show a player
                              PlayerTheme result = apiPlayerThemesInstance.get(playerId);
                              Debug.WriteLine(result);
                          }
                          catch (ApiException  e)
                          {
                              Debug.Print("Exception when calling PlayerThemesApi.get: " + e.Message );
                              Debug.Print("Status Code: "+ e.ErrorCode);
                              Debug.Print(e.StackTrace);
                          }
                      }
                  }
              }
          - language: php
            code: |-
              <?php
              // First install the api client: "composer require api-video/php-api-client"
              // Documentation: https://github.com/apivideo/api.video-php-client/blob/main/docs/Api/PlayerThemesApi.md#get

              require __DIR__ . '/vendor/autoload.php';

              $playerId = 'pl45d5vFFGrfdsdsd156dGhh'; // The unique identifier for the player you want to retrieve. 
              $playerTheme = $client->playerThemes()->get($playerId);  
          - language: swift
            code: |
              // First install the api client: https://github.com/apivideo/api.video-swift-client#getting-started
              // Documentation: https://github.com/apivideo/api.video-swift-client/blob/main/docs/PlayerThemesAPI.md#get
    delete:
      tags:
        - Player Themes
      summary: Delete a player
      description: Delete a player if you no longer need it. You can delete any player that you have the player ID for.
      operationId: DELETE_players-playerId
      parameters:
        - name: playerId
          in: path
          description: The unique identifier for the player you want to delete.
          required: true
          style: simple
          explode: false
          schema:
            type: string
          example: pl45d5vFFGrfdsdsd156dGhh
      responses:
        '204':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: No Content
        '404':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/not-found'
              examples:
                response:
                  value:
                    type: 'https://docs.api.video/reference/resource-not-found'
                    title: The requested resource was not found.
                    name: playerId
                    status: 404
        '429':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/too-many-requests'
              examples:
                Too many requests:
                  value:
                    type: 'https://docs.api.video/reference/too-many-requests'
                    title: Too many requests.
                    status: 429
      security:
        - apiKey: []
      x-client-action: delete
      x-doctave:
        code-samples:
          - language: go
            code: |
              // First install the go client with "go get github.com/apivideo/api.video-go-client"
              // Documentation: https://github.com/apivideo/api.video-go-client/blob/main/docs/PlayerThemesApi.md#delete

              package main

              import (
                  "context"
                  "fmt"
                  "os"
                  apivideosdk "github.com/apivideo/api.video-go-client"
              )

              func main() {
                  client := apivideosdk.ClientBuilder("YOUR_API_KEY").Build()
                  // if you rather like to use the sandbox environment:
                  // client := apivideosdk.SandboxClientBuilder("YOUR_SANDBOX_API_KEY").Build()
                      
                  playerId := "pl45d5vFFGrfdsdsd156dGhh" // string | The unique identifier for the player you want to delete.

                  
                  err := client.PlayerThemes.Delete(playerId)

                  if err != nil {
                      fmt.Fprintf(os.Stderr, "Error when calling `PlayerThemes.Delete``: %v\
              ", err)
                  }
              }
          - language: node
            code: |-
              // First install the "@api.video/nodejs-client" npm package
              // Documentation: https://github.com/apivideo/api.video-nodejs-client/blob/main/doc/api/PlayerThemesApi.md#delete

              const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" });

              const playerId = 'pl45d5vFFGrfdsdsd156dGhh'; // The unique identifier for the player you want to delete.
              await client.playerThemes.delete(playerId); 
          - language: python
            code: |
              # First install the api client with "pip install api.video"
              # Documentation: https://github.com/apivideo/api.video-python-client/blob/main/docs/PlayerThemesApi.md#delete

              import apivideo
              from apivideo.api import player_themes_api
              from apivideo.model.not_found import NotFound
              from pprint import pprint

              # Enter a context with an instance of the API client
              with apivideo.AuthenticatedApiClient(__API_KEY__) as api_client:
                  # Create an instance of the API class
                  api_instance = player_themes_api.PlayerThemesApi(api_client)
                  player_id = "pl45d5vFFGrfdsdsd156dGhh" # str | The unique identifier for the player you want to delete.

                  # example passing only required values which don't have defaults set
                  try:
                      # Delete a player
                      api_instance.delete(player_id)
                  except apivideo.ApiException as e:
                      print("Exception when calling PlayerThemesApi->delete: %s\n" % e)
          - language: java
            code: |
              // First add the "video.api:java-api-client" maven dependency to your project
              // Documentation: https://github.com/apivideo/api.video-java-client/blob/main/docs/PlayerThemesApi.md#delete

              import video.api.client.ApiVideoClient;
              import video.api.client.api.ApiException;
              import video.api.client.api.models.*;
              import video.api.client.api.clients.PlayerThemesApi;
              import java.util.*;

              public class Example {
                public static void main(String[] args) {
                  ApiVideoClient client = new ApiVideoClient("YOUR_API_KEY");
                  // if you rather like to use the sandbox environment:
                  // ApiVideoClient client = new ApiVideoClient("YOUR_SANDBOX_API_KEY", ApiVideoClient.Environment.SANDBOX);

                  PlayerThemesApi apiInstance = client.playerThemes();
                  
                  String playerId = "pl45d5vFFGrfdsdsd156dGhh"; // The unique identifier for the player you want to delete.

                  try {
                    apiInstance.delete(playerId);
                  } catch (ApiException e) {
                    System.err.println("Exception when calling PlayerThemesApi#delete");
                    System.err.println("Status code: " + e.getCode());
                    System.err.println("Reason: " + e.getMessage());
                    System.err.println("Response headers: " + e.getResponseHeaders());
                    e.printStackTrace();
                  }
                }
              }
          - language: csharp
            code: |
              // First add the "ApiVideo" NuGet package to your project
              // Documentation: https://github.com/apivideo/api.video-csharp-client/blob/main/docs/PlayerThemesApi.md#delete

              using System.Diagnostics;
              using ApiVideo.Client;

              namespace Example
              {
                  public class deleteExample
                  {
                      public static void Main()
                      {
                          var basePath = ApiVideoClient.Client.Environment.SANDBOX;
                          var apiKey = "YOUR_API_KEY";

                          var apiInstance = new ApiVideoClient(apiKey,basePath);

                          var playerId = pl45d5vFFGrfdsdsd156dGhh;  // string | The unique identifier for the player you want to delete.
                          var apiPlayerThemesInstance = apiInstance.PlayerThemes();
                          try
                          {
                              // Delete a player
                              apiPlayerThemesInstance.delete(playerId);
                          }
                          catch (ApiException  e)
                          {
                              Debug.Print("Exception when calling PlayerThemesApi.delete: " + e.Message );
                              Debug.Print("Status Code: "+ e.ErrorCode);
                              Debug.Print(e.StackTrace);
                          }
                      }
                  }
              }
          - language: php
            code: |-
              <?php
              // First install the api client: "composer require api-video/php-api-client"
              // Documentation: https://github.com/apivideo/api.video-php-client/blob/main/docs/Api/PlayerThemesApi.md#delete

              require __DIR__ . '/vendor/autoload.php';

              $playerId = 'pl45d5vFFGrfdsdsd156dGhh'; // The unique identifier for the player you want to delete.
              $client->playerThemes()->delete($playerId);  
          - language: swift
            code: |
              // First install the api client: https://github.com/apivideo/api.video-swift-client#getting-started
              // Documentation: https://github.com/apivideo/api.video-swift-client/blob/main/docs/PlayerThemesAPI.md#delete
    patch:
      tags:
        - Player Themes
      summary: Update a player
      description: |-
        Use a player ID to update specific details for a player. 
        NOTE: It may take up to 10 min before the new player configuration is available from our CDN.
      operationId: PATCH_players-playerId
      parameters:
        - name: playerId
          in: path
          description: The unique identifier for the player.
          required: true
          style: simple
          explode: false
          schema:
            type: string
          example: pl45d5vFFGrfdsdsd156dGhh
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/player-theme-update-payload'
        required: true
      responses:
        '200':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/player-theme'
              examples:
                response:
                  value:
                    playerId: pl45d5vFFGrfdsdsd156dGhh
                    createdAt: '2020-01-13T10:09:17+00:00'
                    updatedAt: '2020-01-13T11:12:14+00:00'
                    text: 'rgba(255, 255, 255, .95)'
                    link: 'rgba(255, 0, 0, .95)'
                    linkHover: 'rgba(255, 255, 255, .75)'
                    linkActive: 'rgba(255, 0, 0, .75)'
                    trackPlayed: 'rgba(255, 255, 255, .95)'
                    trackUnplayed: 'rgba(255, 255, 255, .1)'
                    trackBackground: 'rgba(0, 0, 0, 0)'
                    backgroundTop: 'rgba(72, 4, 45, 1)'
                    backgroundBottom: 'rgba(94, 95, 89, 1)'
                    backgroundText: 'rgba(255, 255, 255, .95)'
                    enableApi: false
                    enableControls: false
                    forceAutoplay: false
                    hideTitle: false
                    forceLoop: false
        '404':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/not-found'
              examples:
                response:
                  value:
                    type: 'https://docs.api.video/reference/resource-not-found'
                    title: The requested resource was not found.
                    name: playerId
                    status: 404
        '429':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/too-many-requests'
              examples:
                Too many requests:
                  value:
                    type: 'https://docs.api.video/reference/too-many-requests'
                    title: Too many requests.
                    status: 429
      security:
        - apiKey: []
      x-client-action: update
      x-doctave:
        code-samples:
          - language: go
            code: |
              // First install the go client with "go get github.com/apivideo/api.video-go-client"
              // Documentation: https://github.com/apivideo/api.video-go-client/blob/main/docs/PlayerThemesApi.md#update

              package main

              import (
                  "context"
                  "fmt"
                  "os"
                  apivideosdk "github.com/apivideo/api.video-go-client"
              )

              func main() {
                  client := apivideosdk.ClientBuilder("YOUR_API_KEY").Build()
                  // if you rather like to use the sandbox environment:
                  // client := apivideosdk.SandboxClientBuilder("YOUR_SANDBOX_API_KEY").Build()
                      
                  playerId := "pl45d5vFFGrfdsdsd156dGhh" // string | The unique identifier for the player.
                  playerThemeUpdatePayload := *apivideosdk.NewPlayerThemeUpdatePayload() // PlayerThemeUpdatePayload | 

                  
                  res, err := client.PlayerThemes.Update(playerId, playerThemeUpdatePayload)

                  if err != nil {
                      fmt.Fprintf(os.Stderr, "Error when calling `PlayerThemes.Update``: %v\
              ", err)
                  }
                  // response from `Update`: PlayerTheme
                  fmt.Fprintf(os.Stdout, "Response from `PlayerThemes.Update`: %v\
              ", res)
              }
          - language: node
            code: |-
              // First install the "@api.video/nodejs-client" npm package
              // Documentation: https://github.com/apivideo/api.video-nodejs-client/blob/main/doc/api/PlayerThemesApi.md#update

              const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" });

              const playerId = 'pl45d5vFFGrfdsdsd156dGhh'; // The unique identifier for the player.
              const playerThemeUpdatePayload = {
                text: "rgba(255, 255, 255, 1)", // RGBA color for timer text. Default: rgba(255, 255, 255, 1)
                link: "rgba(255, 255, 255, 1)", // RGBA color for all controls. Default: rgba(255, 255, 255, 1)
                linkHover: "rgba(255, 255, 255, 1)", // RGBA color for all controls when hovered. Default: rgba(255, 255, 255, 1)
                trackPlayed: "rgba(255, 255, 255, 1)", // RGBA color playback bar: played content. Default: rgba(88, 131, 255, .95)
                trackUnplayed: "rgba(255, 255, 255, 1)", // RGBA color playback bar: downloaded but unplayed (buffered) content. Default: rgba(255, 255, 255, .35)
                trackBackground: "rgba(255, 255, 255, 1)", // RGBA color playback bar: background. Default: rgba(255, 255, 255, .2)
                backgroundTop: "rgba(255, 255, 255, 1)", // RGBA color: top 50% of background. Default: rgba(0, 0, 0, .7)
                backgroundBottom: "rgba(255, 255, 255, 1)", // RGBA color: bottom 50% of background. Default: rgba(0, 0, 0, .7)
                backgroundText: "rgba(255, 255, 255, 1)", // RGBA color for title text. Default: rgba(255, 255, 255, 1)
                enableApi: true, // enable/disable player SDK access. Default: true
                enableControls: true, // enable/disable player controls. Default: true
                forceAutoplay: true, // enable/disable player autoplay. Default: false
                hideTitle: true, // enable/disable title. Default: false
                forceLoop: true, // enable/disable looping. Default: false
              }; 

              const playerTheme = await client.playerThemes.update(playerId, playerThemeUpdatePayload); 
          - language: python
            code: |
              # First install the api client with "pip install api.video"
              # Documentation: https://github.com/apivideo/api.video-python-client/blob/main/docs/PlayerThemesApi.md#update

              import apivideo
              from apivideo.api import player_themes_api
              from apivideo.model.not_found import NotFound
              from apivideo.model.player_theme import PlayerTheme
              from apivideo.model.player_theme_update_payload import PlayerThemeUpdatePayload
              from pprint import pprint

              # Enter a context with an instance of the API client
              with apivideo.AuthenticatedApiClient(__API_KEY__) as api_client:
                  # Create an instance of the API class
                  api_instance = player_themes_api.PlayerThemesApi(api_client)
                  player_id = "pl45d5vFFGrfdsdsd156dGhh" # str | The unique identifier for the player.
                  player_theme_update_payload = PlayerThemeUpdatePayload(
                      text="text_example",
                      link="link_example",
                      link_hover="link_hover_example",
                      track_played="track_played_example",
                      track_unplayed="track_unplayed_example",
                      track_background="track_background_example",
                      background_top="background_top_example",
                      background_bottom="background_bottom_example",
                      background_text="background_text_example",
                      enable_api=True,
                      enable_controls=True,
                      force_autoplay=True,
                      hide_title=True,
                      force_loop=True,
                  ) # PlayerThemeUpdatePayload | 

                  # example passing only required values which don't have defaults set
                  try:
                      # Update a player
                      api_response = api_instance.update(player_id, player_theme_update_payload)
                      pprint(api_response)
                  except apivideo.ApiException as e:
                      print("Exception when calling PlayerThemesApi->update: %s\
              " % e)
          - language: java
            code: |
              // First add the "video.api:java-api-client" maven dependency to your project
              // Documentation: https://github.com/apivideo/api.video-java-client/blob/main/docs/PlayerThemesApi.md#update

              import video.api.client.ApiVideoClient;
              import video.api.client.api.ApiException;
              import video.api.client.api.models.*;
              import video.api.client.api.clients.PlayerThemesApi;
              import java.util.*;

              public class Example {
                public static void main(String[] args) {
                  ApiVideoClient client = new ApiVideoClient("YOUR_API_KEY");
                  // if you rather like to use the sandbox environment:
                  // ApiVideoClient client = new ApiVideoClient("YOUR_SANDBOX_API_KEY", ApiVideoClient.Environment.SANDBOX);

                  PlayerThemesApi apiInstance = client.playerThemes();
                  
                  String playerId = "pl45d5vFFGrfdsdsd156dGhh"; // The unique identifier for the player.
                  PlayerThemeUpdatePayload playerThemeUpdatePayload = new PlayerThemeUpdatePayload(); // 
                  playerThemeUpdatePayload.setText(""null""); // RGBA color for timer text. Default: rgba(255, 255, 255, 1)
                  playerThemeUpdatePayload.setLink(""null""); // RGBA color for all controls. Default: rgba(255, 255, 255, 1)
                  playerThemeUpdatePayload.setLinkHover(""null""); // RGBA color for all controls when hovered. Default: rgba(255, 255, 255, 1)
                  playerThemeUpdatePayload.setTrackPlayed(""null""); // RGBA color playback bar: played content. Default: rgba(88, 131, 255, .95)
                  playerThemeUpdatePayload.setTrackUnplayed(""null""); // RGBA color playback bar: downloaded but unplayed (buffered) content. Default: rgba(255, 255, 255, .35)
                  playerThemeUpdatePayload.setTrackBackground(""null""); // RGBA color playback bar: background. Default: rgba(255, 255, 255, .2)
                  playerThemeUpdatePayload.setBackgroundTop(""null""); // RGBA color: top 50% of background. Default: rgba(0, 0, 0, .7)
                  playerThemeUpdatePayload.setBackgroundBottom(""null""); // RGBA color: bottom 50% of background. Default: rgba(0, 0, 0, .7)
                  playerThemeUpdatePayload.setBackgroundText(""null""); // RGBA color for title text. Default: rgba(255, 255, 255, 1)
                  playerThemeUpdatePayload.setEnableApi(); // enable/disable player SDK access. Default: true
                  playerThemeUpdatePayload.setEnableControls(); // enable/disable player controls. Default: true
                  playerThemeUpdatePayload.setForceAutoplay(); // enable/disable player autoplay. Default: false
                  playerThemeUpdatePayload.setHideTitle(); // enable/disable title. Default: false
                  playerThemeUpdatePayload.setForceLoop(); // enable/disable looping. Default: false


                  try {
                    PlayerTheme result = apiInstance.update(playerId, playerThemeUpdatePayload);
                    System.out.println(result);
                  } catch (ApiException e) {
                    System.err.println("Exception when calling PlayerThemesApi#update");
                    System.err.println("Status code: " + e.getCode());
                    System.err.println("Reason: " + e.getMessage());
                    System.err.println("Response headers: " + e.getResponseHeaders());
                    e.printStackTrace();
                  }
                }
              }
          - language: csharp
            code: |
              // First add the "ApiVideo" NuGet package to your project
              // Documentation: https://github.com/apivideo/api.video-csharp-client/blob/main/docs/PlayerThemesApi.md#update

              using System.Diagnostics;
              using ApiVideo.Client;

              namespace Example
              {
                  public class updateExample
                  {
                      public static void Main()
                      {
                          var basePath = ApiVideoClient.Client.Environment.SANDBOX;
                          var apiKey = "YOUR_API_KEY";

                          var apiInstance = new ApiVideoClient(apiKey,basePath);

                          var playerId = pl45d5vFFGrfdsdsd156dGhh;  // string | The unique identifier for the player.
                          var playerThemeUpdatePayload = new PlayerThemeUpdatePayload(); // PlayerThemeUpdatePayload | 
                          var apiPlayerThemesInstance = apiInstance.PlayerThemes();
                          try
                          {
                              // Update a player
                              PlayerTheme result = apiPlayerThemesInstance.update(playerId, playerThemeUpdatePayload);
                              Debug.WriteLine(result);
                          }
                          catch (ApiException  e)
                          {
                              Debug.Print("Exception when calling PlayerThemesApi.update: " + e.Message );
                              Debug.Print("Status Code: "+ e.ErrorCode);
                              Debug.Print(e.StackTrace);
                          }
                      }
                  }
              }
          - language: php
            code: |-
              <?php
              // First install the api client: "composer require api-video/php-api-client"
              // Documentation: https://github.com/apivideo/api.video-php-client/blob/main/docs/Api/PlayerThemesApi.md#update

              require __DIR__ . '/vendor/autoload.php';


              $playerId = 'pl45d5vFFGrfdsdsd156dGhh'; // The unique identifier for the player.
              $playerThemeUpdatePayload = (new \ApiVideo\Client\Model\PlayerThemeUpdatePayload())
                  ->setText("rgba(255, 255, 255, 1)") // RGBA color for timer text. Default: rgba(255, 255, 255, 1))
                  ->setLink("rgba(255, 255, 255, 1)") // RGBA color for all controls. Default: rgba(255, 255, 255, 1))
                  ->setLinkHover("rgba(255, 255, 255, 1)") // RGBA color for all controls when hovered. Default: rgba(255, 255, 255, 1))
                  ->setTrackPlayed("rgba(255, 255, 255, 1)") // RGBA color playback bar: played content. Default: rgba(88, 131, 255, .95))
                  ->setTrackUnplayed("rgba(255, 255, 255, 1)") // RGBA color playback bar: downloaded but unplayed (buffered) content. Default: rgba(255, 255, 255, .35))
                  ->setTrackBackground("rgba(255, 255, 255, 1)") // RGBA color playback bar: background. Default: rgba(255, 255, 255, .2))
                  ->setBackgroundTop("rgba(255, 255, 255, 1)") // RGBA color: top 50% of background. Default: rgba(0, 0, 0, .7))
                  ->setBackgroundBottom("rgba(255, 255, 255, 1)") // RGBA color: bottom 50% of background. Default: rgba(0, 0, 0, .7))
                  ->setBackgroundText("rgba(255, 255, 255, 1)") // RGBA color for title text. Default: rgba(255, 255, 255, 1))
                  ->setEnableApi(true) // enable/disable player SDK access. Default: true)
                  ->setEnableControls(true) // enable/disable player controls. Default: true)
                  ->setForceAutoplay(true) // enable/disable player autoplay. Default: false)
                  ->setHideTitle(true) // enable/disable title. Default: false)
                  ->setForceLoop(true); // enable/disable looping. Default: false)


              $playerTheme = $client->playerThemes()->update($playerId, $playerThemeUpdatePayload); 
          - language: swift
            code: |
              // First install the api client: https://github.com/apivideo/api.video-swift-client#getting-started
              // Documentation: https://github.com/apivideo/api.video-swift-client/blob/main/docs/PlayerThemesAPI.md#update
  '/players/{playerId}/logo':
    post:
      tags:
        - Player Themes
      summary: Upload a logo
      description: |
          Upload an image file as a logo for your player. The image should fit within these constraints:
          - The image mime type must be `image/jpeg` or `image/png`. api.video recommends using `png` images with transparent background.
          - The image size should be a maximum of 200px width x 100px.
          - The file size should be a maximum of 100 KiB.
      operationId: POST_players-playerId-logo
      parameters:
        - name: playerId
          in: path
          description: The unique identifier for the player.
          required: true
          style: simple
          explode: false
          schema:
            type: string
          example: pl14Db6oMJRH6SRVoOwORacK
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/player-theme-upload-logo-payload'
      responses:
        '201':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/player-theme'
        '400':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/bad-request'
              examples:
                response:
                  value:
                    status: 400
                    type: 'https://docs.api.video/reference/uploaded-file-extension-invalid'
                    title: 'Only [''jpg'', ''JPG'', ''jpeg'', ''JPEG'', ''png'', ''PNG''] extensions are supported.'
                    name: file
        '404':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/not-found'
              examples:
                response:
                  value:
                    type: 'https://docs.api.video/reference/resource-not-found'
                    title: The requested resource was not found.
                    name: playerId
                    status: 404
        '429':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/too-many-requests'
              examples:
                Too many requests:
                  value:
                    type: 'https://docs.api.video/reference/too-many-requests'
                    title: Too many requests.
                    status: 429
      security:
        - apiKey: []
      x-client-action: uploadLogo
      x-doctave:
        code-samples:
          - language: go
            code: |
              // First install the go client with "go get github.com/apivideo/api.video-go-client"
              // Documentation: https://github.com/apivideo/api.video-go-client/blob/main/docs/PlayerThemesApi.md#uploadLogo

              package main

              import (
                  "context"
                  "fmt"
                  "os"
                  apivideosdk "github.com/apivideo/api.video-go-client"
              )

              func main() {
                  client := apivideosdk.ClientBuilder("YOUR_API_KEY").Build()
                  // if you rather like to use the sandbox environment:
                  // client := apivideosdk.SandboxClientBuilder("YOUR_SANDBOX_API_KEY").Build()
                      
                  playerId := "pl14Db6oMJRH6SRVoOwORacK" // string | The unique identifier for the player.
                  file := os.NewFile(1234, "some_file") // *os.File | The name of the file you want to use for your logo.
                  link := "link_example" // string | A public link that you want to advertise in your player. For example, you could add a link to your company. When a viewer clicks on your logo, they will be taken to this address.

                  
                  res, err := client.PlayerThemes.UploadLogoFile(playerId, file)

                  // you can also use a Reader instead of a File:
                  // client.PlayerThemes.UploadLogo(playerId, fileName, fileReader)

                  if err != nil {
                      fmt.Fprintf(os.Stderr, "Error when calling `PlayerThemes.UploadLogo``: %v\
              ", err)
                  }
                  // response from `UploadLogo`: PlayerTheme
                  fmt.Fprintf(os.Stdout, "Response from `PlayerThemes.UploadLogo`: %v\
              ", res)
              }
          - language: node
            code: |
              // First install the "@api.video/nodejs-client" npm package
              // Documentation: https://github.com/apivideo/api.video-nodejs-client/blob/main/doc/api/PlayerThemesApi.md#uploadLogo

              const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" });

              const playerId = 'pl14Db6oMJRH6SRVoOwORacK'; // The unique identifier for the player.
              const file = './company-logo.jpg'; // The name of the file you want to use for your logo.
              const link = 'https://my-company.org'; // A public link that you want to advertise in your player. For example, you could add a link to your company. When a viewer clicks on your logo, they will be taken to this address.

              const playerTheme = await client.playerThemes.uploadLogo(playerId, file, link); 
          - language: python
            code: |
              # First install the api client with "pip install api.video"
              # Documentation: https://github.com/apivideo/api.video-python-client/blob/main/docs/PlayerThemesApi.md#uploadLogo

              import apivideo
              from apivideo.api import player_themes_api
              from apivideo.model.bad_request import BadRequest
              from apivideo.model.not_found import NotFound
              from apivideo.model.player_theme import PlayerTheme
              from pprint import pprint

              # Enter a context with an instance of the API client
              with apivideo.AuthenticatedApiClient(__API_KEY__) as api_client:
                  # Create an instance of the API class
                  api_instance = player_themes_api.PlayerThemesApi(api_client)
                  player_id = "pl14Db6oMJRH6SRVoOwORacK" # str | The unique identifier for the player.
                  file = open('/path/to/file', 'rb') # file_type | The name of the file you want to use for your logo.
                  link = "https://my-company.com" # str | A public link that you want to advertise in your player. For example, you could add a link to your company. When a viewer clicks on your logo, they will be taken to this address. (optional)

                  # example passing only required values which don't have defaults set
                  try:
                      # Upload a logo
                      api_response = api_instance.upload_logo(player_id, file)
                      pprint(api_response)
                  except apivideo.ApiException as e:
                      print("Exception when calling PlayerThemesApi->upload_logo: %s\n" % e)

                  # example passing only required values which don't have defaults set
                  # and optional values
                  try:
                      # Upload a logo
                      api_response = api_instance.upload_logo(player_id, file, link=link)
                      pprint(api_response)
                  except apivideo.ApiException as e:
                      print("Exception when calling PlayerThemesApi->upload_logo: %s\n" % e)
          - language: java
            code: |
              // First add the "video.api:java-api-client" maven dependency to your project
              // Documentation: https://github.com/apivideo/api.video-java-client/blob/main/docs/PlayerThemesApi.md#uploadLogo

              import video.api.client.ApiVideoClient;
              import video.api.client.api.ApiException;
              import video.api.client.api.models.*;
              import video.api.client.api.clients.PlayerThemesApi;
              import java.util.*;

              public class Example {
                public static void main(String[] args) {
                  ApiVideoClient client = new ApiVideoClient("YOUR_API_KEY");
                  // if you rather like to use the sandbox environment:
                  // ApiVideoClient client = new ApiVideoClient("YOUR_SANDBOX_API_KEY", ApiVideoClient.Environment.SANDBOX);

                  PlayerThemesApi apiInstance = client.playerThemes();
                  
                  String playerId = "pl14Db6oMJRH6SRVoOwORacK"; // The unique identifier for the player.
                  File file = new File("/path/to/file"); // The name of the file you want to use for your logo.
                  String link = "link_example"; // A public link that you want to advertise in your player. For example, you could add a link to your company. When a viewer clicks on your logo, they will be taken to this address.

                  try {
                    PlayerTheme result = apiInstance.uploadLogo(playerId, file, link);
                    System.out.println(result);
                  } catch (ApiException e) {
                    System.err.println("Exception when calling PlayerThemesApi#uploadLogo");
                    System.err.println("Status code: " + e.getCode());
                    System.err.println("Reason: " + e.getMessage());
                    System.err.println("Response headers: " + e.getResponseHeaders());
                    e.printStackTrace();
                  }
                }
              }
          - language: csharp
            code: |
              // First add the "ApiVideo" NuGet package to your project
              // Documentation: https://github.com/apivideo/api.video-csharp-client/blob/main/docs/PlayerThemesApi.md#uploadLogo

              using System.Diagnostics;
              using ApiVideo.Client;

              namespace Example
              {
                  public class uploadLogoExample
                  {
                      public static void Main()
                      {
                          var basePath = ApiVideoClient.Client.Environment.SANDBOX;
                          var apiKey = "YOUR_API_KEY";

                          var apiInstance = new ApiVideoClient(apiKey,basePath);

                          var playerId = pl14Db6oMJRH6SRVoOwORacK;  // string | The unique identifier for the player.
                          var file = BINARY_DATA_HERE;  // System.IO.Stream | The name of the file you want to use for your logo.
                          var link = link_example;  // string | A public link that you want to advertise in your player. For example, you could add a link to your company. When a viewer clicks on your logo, they will be taken to this address. (optional) 
                          var apiPlayerThemesInstance = apiInstance.PlayerThemes();
                          try
                          {
                              // Upload a logo
                              PlayerTheme result = apiPlayerThemesInstance.uploadLogo(playerId, file, link);
                              Debug.WriteLine(result);
                          }
                          catch (ApiException  e)
                          {
                              Debug.Print("Exception when calling PlayerThemesApi.uploadLogo: " + e.Message );
                              Debug.Print("Status Code: "+ e.ErrorCode);
                              Debug.Print(e.StackTrace);
                          }
                      }
                  }
              }
          - language: php
            code: |-
              <?php
              // First install the api client: "composer require api-video/php-api-client"
              // Documentation: https://github.com/apivideo/api.video-php-client/blob/main/docs/Api/PlayerThemesApi.md#uploadLogo

              require __DIR__ . '/vendor/autoload.php';

              $playerId = 'pl14Db6oMJRH6SRVoOwORacK'; // The unique identifier for the player.
              $file = new SplFileObject(__DIR__ . '/company-logo.jpg'); // The name of the file you want to use for your logo.
              $link = 'https://my-company.org'; // A public link that you want to advertise in your player. For example, you could add a link to your company. When a viewer clicks on your logo, they will be taken to this address.

              $playerTheme = $client->playerThemes()->uploadLogo($playerId, $file, $link); 
          - language: swift
            code: |
              // First install the api client: https://github.com/apivideo/api.video-swift-client#getting-started
              // Documentation: https://github.com/apivideo/api.video-swift-client/blob/main/docs/PlayerThemesAPI.md#uploadLogo
    delete:
      tags:
        - Player Themes
      summary: Delete logo
      description: Delete the logo associated to a player.
      operationId: DELETE_players-playerId-logo
      parameters:
        - name: playerId
          in: path
          description: The unique identifier for the player.
          required: true
          style: simple
          explode: false
          schema:
            type: string
          example: pl14Db6oMJRH6SRVoOwORacK
      responses:
        '204':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: No Content
        '404':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/not-found'
              examples:
                response:
                  value:
                    type: 'https://docs.api.video/reference/resource-not-found'
                    title: The requested resource was not found.
                    name: playerId
                    status: 404
        '429':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/too-many-requests'
              examples:
                Too many requests:
                  value:
                    type: 'https://docs.api.video/reference/too-many-requests'
                    title: Too many requests.
                    status: 429
      security:
        - apiKey: []
      x-client-action: deleteLogo
      x-doctave:
        code-samples:
          - language: go
            code: |
              // First install the go client with "go get github.com/apivideo/api.video-go-client"
              // Documentation: https://github.com/apivideo/api.video-go-client/blob/main/docs/PlayerThemesApi.md#deleteLogo

              package main

              import (
                  "context"
                  "fmt"
                  "os"
                  apivideosdk "github.com/apivideo/api.video-go-client"
              )

              func main() {
                  client := apivideosdk.ClientBuilder("YOUR_API_KEY").Build()
                  // if you rather like to use the sandbox environment:
                  // client := apivideosdk.SandboxClientBuilder("YOUR_SANDBOX_API_KEY").Build()
                      
                  playerId := "pl14Db6oMJRH6SRVoOwORacK" // string | The unique identifier for the player.

                  
                  err := client.PlayerThemes.DeleteLogo(playerId)

                  if err != nil {
                      fmt.Fprintf(os.Stderr, "Error when calling `PlayerThemes.DeleteLogo``: %v\
              ", err)
                  }
              }
          - language: node
            code: |-
              // First install the "@api.video/nodejs-client" npm package
              // Documentation: https://github.com/apivideo/api.video-nodejs-client/blob/main/doc/api/PlayerThemesApi.md#deleteLogo

              const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" });

              const playerId = 'pl45d5vFFGrfdsdsd156dGhh'; // The unique identifier for the player whose logo you want to delete.
              await client.playerThemes.deleteLogo(playerId); 
          - language: python
            code: |
              # First install the api client with "pip install api.video"
              # Documentation: https://github.com/apivideo/api.video-python-client/blob/main/docs/PlayerThemesApi.md#deleteLogo

              import apivideo
              from apivideo.api import player_themes_api
              from apivideo.model.not_found import NotFound
              from pprint import pprint

              # Enter a context with an instance of the API client
              with apivideo.AuthenticatedApiClient(__API_KEY__) as api_client:
                  # Create an instance of the API class
                  api_instance = player_themes_api.PlayerThemesApi(api_client)
                  player_id = "pl14Db6oMJRH6SRVoOwORacK" # str | The unique identifier for the player.

                  # example passing only required values which don't have defaults set
                  try:
                      # Delete logo
                      api_instance.delete_logo(player_id)
                  except apivideo.ApiException as e:
                      print("Exception when calling PlayerThemesApi->delete_logo: %s\n" % e)
          - language: java
            code: |
              // First add the "video.api:java-api-client" maven dependency to your project
              // Documentation: https://github.com/apivideo/api.video-java-client/blob/main/docs/PlayerThemesApi.md#deleteLogo

              import video.api.client.ApiVideoClient;
              import video.api.client.api.ApiException;
              import video.api.client.api.models.*;
              import video.api.client.api.clients.PlayerThemesApi;
              import java.util.*;

              public class Example {
                public static void main(String[] args) {
                  ApiVideoClient client = new ApiVideoClient("YOUR_API_KEY");
                  // if you rather like to use the sandbox environment:
                  // ApiVideoClient client = new ApiVideoClient("YOUR_SANDBOX_API_KEY", ApiVideoClient.Environment.SANDBOX);

                  PlayerThemesApi apiInstance = client.playerThemes();
                  
                  String playerId = "pl14Db6oMJRH6SRVoOwORacK"; // The unique identifier for the player.

                  try {
                    apiInstance.deleteLogo(playerId);
                  } catch (ApiException e) {
                    System.err.println("Exception when calling PlayerThemesApi#deleteLogo");
                    System.err.println("Status code: " + e.getCode());
                    System.err.println("Reason: " + e.getMessage());
                    System.err.println("Response headers: " + e.getResponseHeaders());
                    e.printStackTrace();
                  }
                }
              }
          - language: csharp
            code: |
              // First add the "ApiVideo" NuGet package to your project
              // Documentation: https://github.com/apivideo/api.video-csharp-client/blob/main/docs/PlayerThemesApi.md#deleteLogo

              using System.Diagnostics;
              using ApiVideo.Client;

              namespace Example
              {
                  public class deleteLogoExample
                  {
                      public static void Main()
                      {
                          var basePath = ApiVideoClient.Client.Environment.SANDBOX;
                          var apiKey = "YOUR_API_KEY";

                          var apiInstance = new ApiVideoClient(apiKey,basePath);

                          var playerId = pl14Db6oMJRH6SRVoOwORacK;  // string | The unique identifier for the player.
                          var apiPlayerThemesInstance = apiInstance.PlayerThemes();
                          try
                          {
                              // Delete logo
                              apiPlayerThemesInstance.deleteLogo(playerId);
                          }
                          catch (ApiException  e)
                          {
                              Debug.Print("Exception when calling PlayerThemesApi.deleteLogo: " + e.Message );
                              Debug.Print("Status Code: "+ e.ErrorCode);
                              Debug.Print(e.StackTrace);
                          }
                      }
                  }
              }
          - language: php
            code: |-
              <?php
              // First install the api client: "composer require api-video/php-api-client"
              // Documentation: https://github.com/apivideo/api.video-php-client/blob/main/docs/Api/PlayerThemesApi.md#deleteLogo

              require __DIR__ . '/vendor/autoload.php';

              $playerId = 'pl45d5vFFGrfdsdsd156dGhh'; // The unique identifier for the player whose logo you want to delete.
              $client->playerThemes()->deleteLogo($playerId); 
          - language: swift
            code: |
              // First install the api client: https://github.com/apivideo/api.video-swift-client#getting-started
              // Documentation: https://github.com/apivideo/api.video-swift-client/blob/main/docs/PlayerThemesAPI.md#deleteLogo
  '/data/metrics/{metric}/{aggregation}':
    get:
      tags:
      - Analytics
      summary: Retrieve aggregated metrics
      description: Retrieve time-based and countable metrics like average watch time or the number of impressions over a certain period of time.
      operationId: GET_aggregated-metrics
      parameters:
      - name: metric
        in: path
        description: |
          Use this path parameter to select a metric that you want analytics for.

          - `play` is the number of times your content has been played. You can use the aggregations `count`, `rate`, and `total` with the `play` metric.
          - `start` is the number of times playback was started. You can use the aggregation `count` with this metric.
          - `end` is the number of times playback has ended with the content watch until the end. You can use the aggregation `count` with this metric.
          - `impression` is the number of times your content has been loaded and was ready for playback. You can use the aggregation `count` with this metric.
          - `impression-time` is the time in milliseconds that your content was loading for until the first video frame is displayed. You can use the aggregations `average` and `sum` with this metric.
          - `watch-time` is the cumulative time in seconds that the user has spent watching your content. You can use the aggregations `average` and `sum` with this metric.
          - `ccv`: is the number of concurrent viewers, or users watching at the same time.
          - `view`: the total number of viewers until this point in time.
        required: true
        style: simple
        explode: false
        schema:
          type: string
          enum: 
            - play
            - start
            - end
            - impression
            - impression-time
            - watch-time
            - ccv
            - view
      - name: aggregation
        in: path
        description: |
          Use this path parameter to define a way of collecting data for the metric that you want analytics for.

          - `count` returns the overall number of events for the `play` metric.
          - `rate` returns the ratio that calculates the number of plays your content receives divided by its impressions. This aggregation can be used only with the `play` metric.
          - `total` calculates the total number of events for the `play` metric. 
          - `average` calculates an average value for the selected metric.
          - `sum` adds up the total value of the select metric.
          - `peak` shows the highest value of the `ccv` metric in the timeframe of your request. You can use this aggregation only with the `ccv` metric.
          - `live` shows the highest value of the `ccv` metric from the last 20 seconds. You can use this aggregation only with the `ccv` metric.
        style: simple
        explode: false
        required: true
        schema:
          type: string
          enum:
            - count
            - rate
            - total
            - average
            - sum
            - peak
            - live
      - name: from
        in: query
        description: |
          Use this query parameter to define the starting date-time of the period you want analytics for.

          - If you do not set a value for `from`, the default assigned value is 1 day ago, based on the `to` parameter.
          - The maximum value is 30 days ago.
          - The value you provide should follow the ATOM date-time format: `2024-02-05T00:00:00+01:00`
          - The API ignores this parameter when you call `/data/metrics/play/total`.
        style: form
        explode: false
        schema:
          type: string
          format: date-time
        example: 2024-02-05T00:00:00+01:00
      - name: to
        in: query
        description: |
          Use this query parameter to define the ending date-time of the period you want analytics for.

          - If you do not set a value for `to`, the default assigned value is `now`.
          - The API ignores this parameter when you call `/data/metrics/play/total`.
          - The value for `to` is a non-inclusive value: the API returns data **before** the date-time that you set.
        style: form
        explode: false
        schema:
          type: string
          format: date-time
        example: 2024-02-06T00:00:00+01:00
      - name: unique
        in: query
        description: |
          Use this query parameter to control how viewer data is counted:

          - `true` means that a single user watching multiple times counts as 1 unique viewer
          - `false` means that all views count, even if from the same user.

          The API accepts this parameter only when you use the `ccv` or `view` metric.          
          
          Viewers are unique for 1 day.

          The API determines uniqueness based on a viewer's `user-agent` and IP address. This means that the API can filter viewers using multiple tabs to watch the same video multiple times, but cannot filter for viewers who use multiple browsers to watch the same content multiple times.
        style: form
        explode: false
        schema:
          type: boolean
        example: true
      - name: viewDuration
        in: query
        description: | 
          Use this query parameter to define how many seconds a view has to last to be counted in analytics data.

          - You can only use this parameter with the `view` metric.
          - The accepted values are `3s`, `5s`, `10s`, and `30s`. 
          - If you do not set this parameter, the API defaults to `5s`.
        style: form
        explode: false
        schema:
          type: string
          enum:
            - 3s
            - 5s
            - 10s
            - 30s
        example: 5s
      - $ref: '#/components/parameters/filterBy'
      responses:
        '200':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/analytics-aggregated-metrics-response'
              examples:
                Impression time from a certain date:
                  value:
                    context:
                      metric: impression
                      aggregation: count
                      timeframe:
                          from: 2024-05-28T11:15:07+00:00
                          to: 2024-05-29T11:15:07+00:00
                    data: 346.5
        '400':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Bad request error
          content:
            application/json:
              schema:
                title: Bad request error
                $ref: '#/components/schemas/analytics-plays-400-error'
              examples:
                Invalid attribute:
                  description: This error occurs when a parameter you provided does not exist, or isn't correct for this endpoint, has an invalid value.
                  value:
                    type: https://docs.api.video/reference/invalid-attribute
                    title: An attribute is invalid.
                    status: 400
                    detail: This value must be of type string.
                    name: metric
                Invalid query parameter:
                  description: This error occurs when a query parameter you provided does not exist, isn't correct for this endpoint, or has an invalid value.
                  value:
                    type: https://docs.api.video/reference/request-invalid-query-parameter
                    title: A query parameter is invalid.
                    status: 400
                    detail: This field was not expected.
                    name: from:2024-05-20T09:15:05+02:00
                Referrer too long:
                  description: Occurs when the value of `referrer` in your query is too long.
                  value:
                    type: https://docs.api.video/reference/request-invalid-query-parameter
                    title: A query parameter is invalid.
                    status: 400
                    detail: This value should not contain more than 2048 characters.
                    name: filterBy[referrer]
                Invalid view duration:
                  description: Occurs when the value of `viewDuration` is incorrect.
                  value:
                    type: https://docs.api.video/reference/request-invalid-query-parameter
                    title: A query parameter is invalid.
                    status: 400
                    detail: This view duration is invalid. Use one of "3s", "5s", "10s", "30s".
                    name: viewDuration
        '404':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Unrecognized request URL
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/unrecognized-request-url'
              examples:
                Unrecognized request URL:
                  value:
                    type: 'https://docs.api.video/reference/unrecognized-request-url'
                    title: Unrecognized request URL.
                    status: 404
        '429':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/too-many-requests'
              examples:
                Too many requests:
                  value:
                    type: 'https://docs.api.video/reference/too-many-requests'
                    title: Too many requests.
                    status: 429
      security:
      - apiKey: []
      x-client-action: getAggregatedMetrics
      x-group-parameters: true
      x-doctave:
        code-samples:
          - language: java
            code: |
              FilterBy2 filterBy = new FilterBy2();
        
              filterBy.setBrowser(Collections.singletonList("Chrome"));
              filterBy.setContinent(Arrays.asList(FilterBy2.ContinentEnum.NA, FilterBy2.ContinentEnum.EU));
              filterBy.setMediaType(FilterBy2.MediaTypeEnum.VIDEO);
              filterBy.setTag("test");


              AnalyticsAggregatedMetricsResponse res = apiClient.analytics().getAggregatedMetrics("play", "total").filterBy(filterBy).execute();
              System.out.println(res.getData());
          - language: node
            code: |
              const res = await client.analytics.getAggregatedMetrics({
                aggregation: 'total',
                metric: 'play',
                filterBy: {
                  browser: ['chrome', 'firefox'],
                  continent: ['EU', 'AF'],
                  tag: 'test',
                },
              });
              console.log(res.data);
          - language: csharp
            code: |
              FilterBy2 filterBy = new FilterBy2
              {
                  continent = new List<string> { "EU", "US" },
                  devicetype = new List<string> { "phone" },
                  tag = "test"
              };
              AnalyticsAggregatedMetricsResponse res = apiClient.Analytics()
                  .getAggregatedMetrics("play", "total").From(new DateTime(2024, 7, 1)).FilterBy(filterBy).execute();
          - language: go
            code: |
              res, err := cl.Analytics.GetAggregatedMetrics("play", "day", AnalyticsApiGetAggregatedMetricsRequest{
                filterBy: &FilterBy2{
                  Continent: &[]string{"EU", "AA"},
                  DeviceType: &[]string{"computer", "phone"},
                  Tag: PtrString("tag"),
                },
              })
          - language: python
            code: |
              res = self.api.get_aggregated_metrics(metric='play', aggregation='count', filter_by=FilterBy2(
                      device_type=["computer", "phone"],
                      tag="test",
                  ),
              )
          - language: swift
            code: |
              AnalyticsAPI.getAggregatedMetrics(
                      metric: .play,
                      aggregation: .total,
                      filterBy: FilterBy2(
                          continent: [.an, .eu],
                          tag: "test"
                      )
                  ) { analytics, error in
                      // ...
                  }
  '/data/buckets/{metric}/{breakdown}':
    get:
      tags:
      - Analytics
      summary: Retrieve metrics in a breakdown of dimensions
      description: Retrieve detailed analytics play-rate and number of impressions segmented by dimensions like country or device type.
      operationId: GET_metrics-breakdown
      parameters:
      - name: metric
        in: path
        description: |
          Use this path parameter to select a metric that you want analytics for.

          - `play` is the number of times your content has been played.
          - `play-rate` is the ratio that calculates the number of plays your content receives divided by its impressions.
          - `play-total` is the total number of times a specific content has been played. You can only use the `media-id` breakdown with this metric.
          - `start` is the number of times playback was started.
          - `end` is the number of times playback has ended with the content watch until the end.
          - `impression` is the number of times your content has been loaded and was ready for playback.
          - `ccv-peak` is the highest number of concurrent viewers in the timeframe of your request.
          - `ccv-average` is the average number of concurrent viewers in the timeframe of your request.
          - `view` is the total number of viewers until this point in time.
        required: true
        style: simple
        explode: false
        schema:
          type: string
          enum: 
            - play
            - play-rate
            - play-total
            - start
            - end
            - impression
            - ccv-peak
            - ccv-average
            - view
      - name: breakdown
        in: path
        description: |
          Use this path parameter to define a dimension for segmenting analytics data. You must use `kebab-case` for path parameters.

          These are the available dimensions:
          
          - `media-id`: Returns analytics based on the unique identifiers of a video or a live stream.
          - `media-type`: Returns analytics based on the type of content. Possible values: `video` and `live-stream`. 
          - `continent`: Returns analytics based on the viewers' continent. The list of supported continents names are based on the [GeoNames public database](https://www.geonames.org/countries/). Possible values are: `AS`, `AF`, `NA`, `SA`, `AN`, `EU`, `AZ`. 
          - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/).
          - `device-type`: Returns analytics based on the type of device used by the viewers. Response values can include: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`.
          - `operating-system`: Returns analytics based on the operating system used by the viewers. Response values can include `windows`, `mac osx`, `android`, `ios`, `linux`.
          - `browser`: Returns analytics based on the browser used by the viewers. Response values can include `chrome`, `firefox`, `edge`, `opera`.
          - `referrer`: Returns the URL where the view originates from, for example a website where the video is embedded. View events from Android and iOS return empty strings as the value for `referrer`.
        style: simple
        explode: false
        required: true
        schema:
          type: string
          enum:
            - media-id
            - media-type
            - continent
            - country
            - device-type
            - operating-system
            - browser
            - referrer
      - name: from
        in: query
        description: |
          Use this query parameter to define the starting date-time of the period you want analytics for.

          - If you do not set a value for `from`, the default assigned value is 1 day ago, based on the `to` parameter.
          - The maximum value is 30 days ago.
          - The value you provide should follow the ATOM date-time format: `2024-02-05T00:00:00+01:00`
        style: form
        explode: false
        schema:
          type: string
          format: date-time
        example: 2024-02-05T00:00:00+01:00
      - name: to
        in: query
        description: |
          Use this query parameter to define the ending date-time of the period you want analytics for.

          - If you do not set a value for `to`, the default assigned value is `now`.
          - The value for `to` is a non-inclusive value: the API returns data **before** the date-time that you set.
        style: form
        explode: false
        schema:
          type: string
          format: date-time
        example: 2024-02-06T00:00:00+01:00
      - name: sortBy
        in: query
        description: |
          Use this parameter to choose which field the API will use to sort the analytics data.

          These are the available fields to sort by:

          - `metricValue`: Sorts the results based on the **metric** you selected in your request.
          - `dimensionValue`: Sorts the results based on the **dimension** you selected in your request.
        style: form
        explode: false
        schema:
          type: string
          enum:
            - metricValue
            - dimensionValue
        example: metricValue
      - name: sortOrder
        in: query
        description: |
          Use this parameter to define the sort order of results.

          These are the available sort orders:

          - `asc`: Sorts the results in ascending order: `A to Z` and `0 to 9`.
          - `desc`: Sorts the results in descending order: `Z to A` and `9 to 0`.
        required: false
        style: form
        explode: false
        schema:
          type: string
          enum: 
            - asc
            - desc
        example: asc
      - name: unique
        in: query
        description: |
          Use this query parameter to control how viewer data is counted:

          - `true` means that a single user watching multiple times counts as 1 unique viewer
          - `false` means that all views count, even if from the same user.

          The API accepts this parameter only when you use the `ccv-peak`, `ccv-average`, or `view` metric.          
          
          Viewers are unique for 1 day.

          The API determines uniqueness based on a viewer's `user-agent` and IP address. This means that the API can filter viewers using multiple tabs to watch the same video multiple times, but cannot filter for viewers who use multiple browsers to watch the same content multiple times.
        style: form
        explode: false
        schema:
          type: boolean
        example: true
      - name: viewDuration
        in: query
        description: | 
          Use this query parameter to define how many seconds a view has to last to be counted in analytics data.

          - You can only use this parameter together with the `view` metric.
          - The accepted values are `3s`, `5s`, `10s`, and `30s`. 
          - If you do not set this parameter, the API defaults to `5s`.
        style: form
        explode: false
        schema:
          type: string
          enum:
            - 3s
            - 5s
            - 10s
            - 30s
      - $ref: '#/components/parameters/filterBy'
      - $ref: '#/components/parameters/current-page'
      - $ref: '#/components/parameters/page-size'
      responses:
        '200':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/analytics-metrics-breakdown-response'
              examples:
                Number of plays in a country over a specific timeframe:
                  value:
                    context:
                      metric: play
                      breakdown: country
                      timeframe:
                        from: '2024-04-28T07:15:05+00:00'
                        to: '2024-05-29T11:25:37+00:00'
                    data:
                    - metricValue: 7
                      dimensionValue: FR
                    pagination:
                      currentPage: 1
                      currentPageItems: 1
                      pageSize: 25
                      pagesTotal: 1
                      itemsTotal: 1
                      links:
                      - rel: self
                        uri: "/data/buckets/play/country?from=2024-04-28T09%3A15%3A05%2B02%3A00&currentPage=1&pageSize=25"
                      - rel: first
                        uri: "/data/buckets/play/country?from=2024-04-28T09%3A15%3A05%2B02%3A00&currentPage=1&pageSize=25"
                      - rel: last
                        uri: "/data/buckets/play/country?from=2024-04-28T09%3A15%3A05%2B02%3A00&currentPage=1&pageSize=25"
        '400':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Bad request error
          content:
            application/json:
              schema:
                title: Bad request error
                $ref: '#/components/schemas/analytics-plays-400-error'
              examples:
                Invalid attribute:
                  description: This error occurs when a parameter you provided does not exist, or isn't correct for this endpoint, has an invalid value.
                  value:
                    type: https://docs.api.video/reference/invalid-attribute
                    title: An attribute is invalid.
                    status: 400
                    detail: This value must be of type string.
                    name: metric
                Invalid query parameter:
                  description: This error occurs when a query parameter you provided does not exist, isn't correct for this endpoint, or has an invalid value.
                  value:
                    type: https://docs.api.video/reference/request-invalid-query-parameter
                    title: A query parameter is invalid.
                    status: 400
                    detail: This field was not expected.
                    name: from:2024-05-20T09:15:05+02:00
                Referrer too long:
                  description: Occurs when the value of `referrer` in your query is too long.
                  value:
                    type: https://docs.api.video/reference/request-invalid-query-parameter
                    title: A query parameter is invalid.
                    status: 400
                    detail: This value should not contain more than 2048 characters.
                    name: filterBy[referrer]
                Invalid view duration:
                  description: Occurs when the value of `viewDuration` is incorrect.
                  value:
                    type: https://docs.api.video/reference/request-invalid-query-parameter
                    title: A query parameter is invalid.
                    status: 400
                    detail: This view duration is invalid. Use one of "3s", "5s", "10s", "30s".
                    name: viewDuration
        '404':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Unrecognized request URL
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/unrecognized-request-url'
              examples:
                Unrecognized request URL:
                  value:
                    type: 'https://docs.api.video/reference/unrecognized-request-url'
                    title: Unrecognized request URL.
                    status: 404
        '429':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/too-many-requests'
              examples:
                Too many requests:
                  value:
                    type: 'https://docs.api.video/reference/too-many-requests'
                    title: Too many requests.
                    status: 429
      security:
      - apiKey: []
      x-client-action: getMetricsBreakdown
      x-group-parameters: true
      x-client-paginated: true
      x-doctave:
        code-samples:
          - language: java
            code: |
              FilterBy2 filterBy = new FilterBy2();

              filterBy.setBrowser(Collections.singletonList("Chrome"));
              filterBy.setContinent(Arrays.asList(FilterBy2.ContinentEnum.NA, FilterBy2.ContinentEnum.EU));
              filterBy.setMediaType(FilterBy2.MediaTypeEnum.VIDEO);
              filterBy.setTag("test");

              Page<AnalyticsMetricsBreakdownResponseData> res = apiClient.analytics().getMetricsBreakdown("play", "media-id").filterBy(filterBy).pageSize(30).execute();
              for (AnalyticsMetricsBreakdownResponseData item : res.getItems()) {
                  System.out.println(item.getDimensionValue() + ": " + item.getMetricValue());
              }
          - language: node
            code: |
              const res = await client.analytics.getMetricsBreakdown({
                breakdown: 'continent',
                metric: 'play',
                filterBy: {
                  browser: ['chrome', 'firefox'],
                  continent: ['EU', 'AF'],
                  tag: 'test',
                },
              });
              console.log(res.data);
          - language: csharp
            code: |
              FilterBy2 filterBy = new FilterBy2
              {
                  continent = new List<string> { "EU", "US" },
                  devicetype = new List<string> { "phone" },
                  tag = "test"
              };
              Page<AnalyticsMetricsBreakdownResponseData> page = apiClient.Analytics()
                  .getMetricsBreakdown("play", "continent").From(new DateTime(2024, 7, 1)).FilterBy(filterBy).execute();
          - language: go
            code: |
              res, err := cl.Analytics.GetMetricsBreakdown("play", "continent", AnalyticsApiGetMetricsBreakdownRequest{
                filterBy: &FilterBy2{
                  Continent: &[]string{"EU", "AA"},
                  DeviceType: &[]string{"computer", "phone"},
                  Tag: 	PtrString("tag"),
                },
              })
          - language: python
            code: |
              res = self.api.get_metrics_breakdown(metric='play', breakdown='continent', filter_by=FilterBy2(
                      device_type=["computer", "phone"],
                      tag="test",
                  ),
              )
          - language: swift
            code: |
              AnalyticsAPI.getMetricsBreakdown(
                  metric: .play,
                  breakdown: .browser,
                  filterBy: FilterBy2(
                      continent: [.an, .eu],
                      tag: "test"
                  )
              ) { analytics, error in
                  // ...
              }
  '/data/timeseries/{metric}':
    get:
      tags:
      - Analytics
      summary: Retrieve metrics over time
      description: Retrieve countable metrics like the number of plays or impressions, grouped by the time at which they occurred
      operationId: GET_metrics-over-time
      parameters:
      - name: metric
        in: path
        description: |
          Use this path parameter to select a metric that you want analytics for.

          - `play` is the number of times your content has been played.
          - `play-rate` is the ratio that calculates the number of plays your content receives divided by its impressions.
          - `start` is the number of times playback was started.
          - `end` is the number of times playback has ended with the content watch until the end.
          - `impression` is the number of times your content has been loaded and was ready for playback.
          - `ccv-peak` is the highest number of concurrent viewers in the timeframe of your request.
          - `ccv-average` is the average number of concurrent viewers in the timeframe of your request.
          - `view` is the total number of viewers. 
        required: true
        style: simple
        explode: false
        schema:
          type: string
          enum: 
            - play
            - play-rate
            - start
            - end
            - impression
            - ccv-peak
            - ccv-average
            - view
      - name: from
        in: query
        description: |
          Use this query parameter to define the starting date-time of the period you want analytics for.

          - If you do not set a value for `from`, the default assigned value is 1 day ago, based on the `to` parameter.
          - The maximum value is 30 days ago.
          - The value you provide should follow the ATOM date-time format: `2024-02-05T00:00:00+01:00`
        style: form
        explode: false
        schema:
          type: string
          format: date-time
        example: 2024-02-05T00:00:00+01:00
      - name: to
        in: query
        description: |
          Use this query parameter to define the ending date-time of the period you want analytics for.

          - If you do not set a value for `to`, the default assigned value is `now`.
          - The value for `to` is a non-inclusive value: the API returns data **before** the date-time that you set.
        style: form
        explode: false
        schema:
          type: string
          format: date-time
        example: 2024-02-06T00:00:00+01:00
      - name: interval
        in: query
        description: |
          Use this query parameter to define the granularity of the data. Possible values: `minute`, `hour`, `day`.

          - If you do not set a value for `interval`, and the period you set using the `from` and `to` parameters is less than or equals to 2 days, then the default assigned value is `hour`. Otherwise the API sets it to `day`.
          - When you set `minute` as interval, the timeframe you define with the `from` and `to` parameters must be less than 60 minutes.
        style: form
        explode: false
        schema:
          type: string
          enum: [minute, hour, day]
        example: hour
      - name: sortBy
        in: query
        description: |
          Use this parameter to choose which field the API will use to sort the analytics data.

          These are the available fields to sort by:

          - `metricValue`: Sorts the results based on the **metric** you selected in your request.
          - `emittedAt`: Sorts the results based on the **timestamp** of the event in ATOM date-time format.
        style: form
        explode: false
        schema:
          type: string
          enum:
            - metricValue
            - emittedAt
        example: metricValue
      - name: sortOrder
        in: query
        description: |
          Use this parameter to define the sort order of results.

          These are the available sort orders:

          - `asc`: Sorts the results in ascending order: `A to Z` and `0 to 9`.
          - `desc`: Sorts the results in descending order: `Z to A` and `9 to 0`.
        required: false
        style: form
        explode: false
        schema:
          type: string
          enum: 
            - asc
            - desc
        example: asc
      - name: unique
        in: query
        description: |
          Use this query parameter to control how viewer data is counted:

          - `true` means that a single user watching multiple times counts as 1 unique viewer
          - `false` means that all views count, even if from the same user.

          The API accepts this parameter only when you use the `ccv-peak`, `ccv-average`, or `view` metric.          
          
          Viewers are unique for 1 day.

          The API determines uniqueness based on a viewer's `user-agent` and IP address. This means that the API can filter viewers using multiple tabs to watch the same video multiple times, but cannot filter for viewers who use multiple browsers to watch the same content multiple times.
        style: form
        explode: false
        schema:
          type: boolean
        example: true
      - name: viewDuration
        in: query
        description: | 
          Use this query parameter to define how many seconds a view has to last to be counted in analytics data.

          - You can only use this parameter together with the `view` metric.
          - The accepted values are `3s`, `5s`, `10s`, and `30s`. 
          - If you do not set this parameter, the API defaults to `5s`.
        style: form
        explode: false
        schema:
          type: string
          enum:
            - 3s
            - 5s
            - 10s
            - 30s
      - $ref: '#/components/parameters/filterBy'
      - $ref: '#/components/parameters/current-page'
      - $ref: '#/components/parameters/page-size'
      responses:
        '200':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/analytics-metrics-over-time-response'
              examples:
                Impression time from a certain date:
                  value:
                    context:
                      metric: play
                      interval: hour
                      timeframe:
                        from: '2024-05-28T11:08:39+00:00'
                        to: '2024-05-29T11:08:39+00:00'
                    data:
                    - emittedAt: '2024-05-29T07+00:00:00:00'
                      metricValue: 2
                    - emittedAt: '2024-05-29T08+00:00:00:00'
                      metricValue: 1
                    - emittedAt: '2024-05-29T09+00:00:00:00'
                      metricValue: 1
                    pagination:
                      currentPage: 1
                      currentPageItems: 3
                      pageSize: 25
                      pagesTotal: 1
                      itemsTotal: 3
                      links:
                      - rel: self
                        uri: "/data/timeseries/play?currentPage=1&pageSize=25"
                      - rel: first
                        uri: "/data/timeseries/play?currentPage=1&pageSize=25"
                      - rel: last
                        uri: "/data/timeseries/play?currentPage=1&pageSize=25"
        '400':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Bad request error
          content:
            application/json:
              schema:
                title: Bad request error
                $ref: '#/components/schemas/analytics-plays-400-error'
              examples:
                Invalid attribute:
                  description: This error occurs when a parameter you provided does not exist, or isn't correct for this endpoint, has an invalid value.
                  value:
                    type: https://docs.api.video/reference/invalid-attribute
                    title: An attribute is invalid.
                    status: 400
                    detail: This value must be of type string.
                    name: metric
                Invalid query parameter:
                  description: This error occurs when a query parameter you provided does not exist, isn't correct for this endpoint, or has an invalid value.
                  value:
                    type: https://docs.api.video/reference/request-invalid-query-parameter
                    title: A query parameter is invalid.
                    status: 400
                    detail: This field was not expected.
                    name: from:2024-05-20T09:15:05+02:00
                Invalid interval:
                  description: Occurs when the value you set for `interval` is not `minute`, `hour`, or `day`.
                  value:
                    type: https://docs.api.video/reference/request-invalid-query-parameter
                    title: A query parameter is invalid.
                    status: 400
                    detail: This interval is invalid. Use one of "minute", "hour", "day".
                    name: interval
                Timeframe does not match interval:
                  description: Occurs when you set `minute` as interval, and a timeframe that is longer than 60 minutes.
                  value:
                    type: https://docs.api.video/reference/request-invalid-query-parameter
                    title: A query parameter is invalid.
                    status: 400
                    detail: This interval cannot be used with a timeframe over 60 minutes.
                    name: interval
                Referrer too long:
                  description: Occurs when the value of `referrer` in your query is too long.
                  value:
                    type: https://docs.api.video/reference/request-invalid-query-parameter
                    title: A query parameter is invalid.
                    status: 400
                    detail: This value should not contain more than 2048 characters.
                    name: filterBy[referrer]
                Invalid view duration:
                  description: Occurs when the value of `viewDuration` is incorrect.
                  value:
                    type: https://docs.api.video/reference/request-invalid-query-parameter
                    title: A query parameter is invalid.
                    status: 400
                    detail: This view duration is invalid. Use one of "3s", "5s", "10s", "30s".
                    name: viewDuration
        '404':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Unrecognized request URL
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/unrecognized-request-url'
              examples:
                Unrecognized request URL:
                  value:
                    type: 'https://docs.api.video/reference/unrecognized-request-url'
                    title: Unrecognized request URL.
                    status: 404
        '429':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/too-many-requests'
              examples:
                Too many requests:
                  value:
                    type: 'https://docs.api.video/reference/too-many-requests'
                    title: Too many requests.
                    status: 429
      security:
      - apiKey: []
      x-client-action: getMetricsOverTime
      x-group-parameters: true
      x-client-paginated: true
      x-doctave:
        code-samples:
              - language: java
                code: |
                  FilterBy2 filterBy = new FilterBy2();

                  filterBy.setBrowser(Collections.singletonList("Chrome"));
                  filterBy.setContinent(Arrays.asList(FilterBy2.ContinentEnum.NA, FilterBy2.ContinentEnum.EU));
                  filterBy.setMediaType(FilterBy2.MediaTypeEnum.VIDEO);
                  filterBy.setTag("test");

                  Page<AnalyticsMetricsOverTimeResponseData> res = apiClient.analytics().getMetricsOverTime("play").filterBy(filterBy).pageSize(30).execute();
                  for (AnalyticsMetricsOverTimeResponseData item : res.getItems()) {
                      System.out.println(item.getEmittedAt() + ": " + item.getMetricValue());
                  }
              - language: node
                code: |
                  const res = await client.analytics.getMetricsOverTime({
                    metric: 'play',
                    filterBy: {
                      mediaType: 'video',
                      browser: ['chrome', 'firefox'],
                      continent: ['EU', 'AF'],
                      tag: "test",
                    },
                  });

                  console.log(res);
              - language: csharp
                code: |
                  FilterBy2 filterBy = new FilterBy2
                  {
                      continent = new List<string> { "EU", "US" },
                      devicetype = new List<string> { "phone" },
                      tag = "test"
                  };
                  Page<AnalyticsMetricsOverTimeResponseData> res = apiClient.Analytics()
                      .getMetricsOverTime("play").From(new DateTime(2024, 7, 1)).FilterBy(filterBy).execute();
              - language: go
                code: |
                  res, err := cl.Analytics.GetMetricsOverTime("play", AnalyticsApiGetMetricsOverTimeRequest{
                    filterBy: &FilterBy2{
                      Continent: &[]string{"EU", "AA"},
                      DeviceType: &[]string{"computer", "phone"},
                      Tag: 	PtrString("tag"),
                    },
                  })
              - language: python
                code: |
                  res = self.api.get_metrics_over_time(metric='play', filter_by=FilterBy2(
                          device_type=["computer", "phone"],
                          tag="test",
                      ),
                  )
              - language: swift
                code: |
                  AnalyticsAPI.getMetricsOverTime(
                          metric: .play,
                          filterBy: FilterBy2(
                              continent: [.an, .eu],
                              tag: "test"
                          )
                      ) { analytics, error in
                          // ...
                      }
  /webhooks:
    get:
      tags:
        - Webhooks
      summary: List all webhooks
      description: Retrieve a list of all webhooks configured for the current workspace.
      x-client-description:
        default: |-
          Thie method returns a list of your webhooks (with all their details). 
          You can filter what the webhook list that the API returns using the parameters described below.
      operationId: LIST-webhooks
      parameters:
        - name: events
          in: query
          description: The webhook event that you wish to filter on.
          required: false
          style: form
          explode: true
          schema:
            type: string
          example: video.encoding.quality.completed
        - $ref: '#/components/parameters/current-page'
        - $ref: '#/components/parameters/page-size'
      responses:
        '200':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/webhooks-list-response'
              examples:
                response:
                  value:
                    data:
                      - webhookId: webhook_XXXXXXXXXXXXXXX
                        createdAt: '2021-01-08T14:12:18+00:00'
                        events:
                          - video.encoding.quality.completed
                        url: 'http://clientnotificationserver.com/notif?myquery=query'
                        signatureSecret: 'sig_sec_Abcd12348RLP7VPLi7nYVh'
                      - webhookId: webhook_XXXXXXXXXYYYYYY
                        createdAt: '2021-01-12T12:12:12+00:00'
                        events:
                          - video.encoding.quality.completed
                        url: 'http://clientnotificationserver.com/notif?myquery=query2'
                        signatureSecret: 'sig_sec_Abcd12358RLP7VPLi7nYVy'
                    pagination:
                      currentPage: 1
                      pageSize: 25
                      pagesTotal: 1
                      itemsTotal: 2
                      currentPageItems: 2
                      links:
                        - rel: self
                          uri: 'https://ws.api.video/webhooks?currentPage=1'
                        - rel: first
                          uri: 'https://ws.api.video/webhooks?currentPage=1'
                        - rel: last
                          uri: 'https://ws.api.video/webhooks?currentPage=1'
        '429':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/too-many-requests'
              examples:
                Too many requests:
                  value:
                    type: 'https://docs.api.video/reference/too-many-requests'
                    title: Too many requests.
                    status: 429
      security:
        - apiKey: []
      x-group-parameters: true
      x-client-paginated: true
      x-optional-object: true
      x-client-action: list
      x-doctave:
        code-samples:
          - language: go
            code: |
              // First install the go client with "go get github.com/apivideo/api.video-go-client"
              // Documentation: https://github.com/apivideo/api.video-go-client/blob/main/docs/WebhooksApi.md#list

              package main

              import (
                  "context"
                  "fmt"
                  "os"
                  apivideosdk "github.com/apivideo/api.video-go-client"
              )

              func main() {
                  client := apivideosdk.ClientBuilder("YOUR_API_KEY").Build()
                  // if you rather like to use the sandbox environment:
                  // client := apivideosdk.SandboxClientBuilder("YOUR_SANDBOX_API_KEY").Build()
                  req := apivideosdk.WebhooksApiListRequest{}
                  
                  req.Events("video.encoding.quality.completed") // string | The webhook event that you wish to filter on.
                  req.CurrentPage(int32(2)) // int32 | Choose the number of search results to return per page. Minimum value: 1 (default to 1)
                  req.PageSize(int32(30)) // int32 | Results per page. Allowed values 1-100, default is 25. (default to 25)

                  res, err := client.Webhooks.List(req)
                  

                  if err != nil {
                      fmt.Fprintf(os.Stderr, "Error when calling `Webhooks.List``: %v\
              ", err)
                  }
                  // response from `List`: WebhooksListResponse
                  fmt.Fprintf(os.Stdout, "Response from `Webhooks.List`: %v\
              ", res)
              }
          - language: node
            code: |-
              // First install the "@api.video/nodejs-client" npm package
              // Documentation: https://github.com/apivideo/api.video-nodejs-client/blob/main/doc/api/WebhooksApi.md#list

              const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" });

              const events = 'video.encoding.quality.completed'; // The webhook event that you wish to filter on.
              const currentPage = 2; // Choose the number of search results to return per page. Minimum value: 1
              const pageSize = 30; // Results per page. Allowed values 1-100, default is 25.
               
              const webhooks = await client.webhooks.list({ events, currentPage, pageSize }); 
          - language: python
            code: |
              # First install the api client with "pip install api.video"
              # Documentation: https://github.com/apivideo/api.video-python-client/blob/main/docs/WebhooksApi.md#list

              import apivideo
              from apivideo.api import webhooks_api
              from apivideo.model.webhooks_list_response import WebhooksListResponse
              from pprint import pprint

              # Enter a context with an instance of the API client
              with apivideo.AuthenticatedApiClient(__API_KEY__) as api_client:
                  # Create an instance of the API class
                  api_instance = webhooks_api.WebhooksApi(api_client)
                  events = "video.encoding.quality.completed" # str | The webhook event that you wish to filter on. (optional)
                  current_page = 2 # int | Choose the number of search results to return per page. Minimum value: 1 (optional) if omitted the server will use the default value of 1
                  page_size = 30 # int | Results per page. Allowed values 1-100, default is 25. (optional) if omitted the server will use the default value of 25

                  # example passing only required values which don't have defaults set
                  # and optional values
                  try:
                      # List all webhooks
                      api_response = api_instance.list(events=events, current_page=current_page, page_size=page_size)
                      pprint(api_response)
                  except apivideo.ApiException as e:
                      print("Exception when calling WebhooksApi->list: %s\n" % e)
          - language: java
            code: |
              // First add the "video.api:java-api-client" maven dependency to your project
              // Documentation: https://github.com/apivideo/api.video-java-client/blob/main/docs/WebhooksApi.md#list

              import video.api.client.ApiVideoClient;
              import video.api.client.api.ApiException;
              import video.api.client.api.models.*;
              import video.api.client.api.clients.WebhooksApi;
              import java.util.*;

              public class Example {
                public static void main(String[] args) {
                  ApiVideoClient client = new ApiVideoClient("YOUR_API_KEY");
                  // if you rather like to use the sandbox environment:
                  // ApiVideoClient client = new ApiVideoClient("YOUR_SANDBOX_API_KEY", ApiVideoClient.Environment.SANDBOX);

                  WebhooksApi apiInstance = client.webhooks();
                  
                  String events = "video.encoding.quality.completed"; // The webhook event that you wish to filter on.
                  Integer currentPage = 1; // Choose the number of search results to return per page. Minimum value: 1
                  Integer pageSize = 25; // Results per page. Allowed values 1-100, default is 25.

                  try {
                    Page<Webhook> result = apiInstance.list()
                          .events(events)
                          .currentPage(currentPage)
                          .pageSize(pageSize)
                          .execute();
                    System.out.println(result);
                  } catch (ApiException e) {
                    System.err.println("Exception when calling WebhooksApi#list");
                    System.err.println("Status code: " + e.getCode());
                    System.err.println("Reason: " + e.getMessage());
                    System.err.println("Response headers: " + e.getResponseHeaders());
                    e.printStackTrace();
                  }
                }
              }
          - language: csharp
            code: |
              // First add the "ApiVideo" NuGet package to your project
              // Documentation: https://github.com/apivideo/api.video-csharp-client/blob/main/docs/WebhooksApi.md#list

              using System.Diagnostics;
              using ApiVideo.Client;

              namespace Example
              {
                  public class listExample
                  {
                      public static void Main()
                      {
                          var basePath = ApiVideoClient.Client.Environment.SANDBOX;
                          var apiKey = "YOUR_API_KEY";

                          var apiInstance = new ApiVideoClient(apiKey,basePath);

                          var events = video.encoding.quality.completed;  // string | The webhook event that you wish to filter on. (optional) 
                          var currentPage = 2;  // int? | Choose the number of search results to return per page. Minimum value: 1 (optional)  (default to 1)
                          var pageSize = 30;  // int? | Results per page. Allowed values 1-100, default is 25. (optional)  (default to 25)
                          var apiWebhooksInstance = apiInstance.Webhooks();
                          try
                          {
                              // List all webhooks
                              WebhooksListResponse result = apiWebhooksInstance.list(events, currentPage, pageSize);
                              Debug.WriteLine(result);
                          }
                          catch (ApiException  e)
                          {
                              Debug.Print("Exception when calling WebhooksApi.list: " + e.Message );
                              Debug.Print("Status Code: "+ e.ErrorCode);
                              Debug.Print(e.StackTrace);
                          }
                      }
                  }
              }
          - language: php
            code: |-
              // First install the "@api.video/nodejs-client" npm package
              // Documentation: https://github.com/apivideo/api.video-nodejs-client/blob/main/doc/api/WebhooksApi.md#list

              const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" });

              const events = 'video.encoding.quality.completed'; // The webhook event that you wish to filter on.
              const currentPage = 2; // Choose the number of search results to return per page. Minimum value: 1
              const pageSize = 30; // Results per page. Allowed values 1-100, default is 25.

              // WebhooksListResponse
              const webhooks = await client.webhooks.list({ events, currentPage, pageSize }); 
          - language: swift
            code: |
              // First install the api client: https://github.com/apivideo/api.video-swift-client#getting-started
              // Documentation: https://github.com/apivideo/api.video-swift-client/blob/main/docs/WebhooksAPI.md#list
    post:
      tags:
        - Webhooks
      summary: Create Webhook
      description: |-
        Webhooks can push notifications to your server, rather than polling api.video for changes. We currently offer four events: 
        * `video.encoding.quality.completed` Occurs when a new video is uploaded into your account, it will be encoded into several different HLS and mp4 qualities. When each version is encoded, your webhook will get a notification.  It will look like ```{ "type": "video.encoding.quality.completed", "emittedAt": "2021-01-29T16:46:25.217+01:00", "videoId": "viXXXXXXXX", "encoding": "hls", "quality": "720p"} ```. This request says that the 720p HLS encoding was completed.
        * `live-stream.broadcast.started`  When a live stream begins broadcasting, the broadcasting parameter changes from false to true, and this webhook fires.
        * `live-stream.broadcast.ended`  This event fires when a live stream has finished broadcasting.
        * `video.source.recorded`  This event occurs when a live stream is recorded and submitted for encoding.
        * `video.caption.generated`  This event occurs when an automatic caption has been generated.
        * `video.summary.generated`  This event occurs when an automatic summary has been generated.
      operationId: POST-webhooks
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/webhooks-creation-payload'
      responses:
        '201':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/webhook'
              examples:
                response:
                  value:
                    webhookId: webhook_XXXXXXXXXXXXXXX
                    createdAt: '2021-01-08T14:12:18+00:00'
                    events:
                      - video.encoding.quality.completed
                    url: 'http://clientnotificationserver.com/notif?myquery=query'
        '400':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/bad-request'
              examples:
                response:
                  value:
                    type: 'https://docs.api.video/reference/attribute-required'
                    events: This attribute is required.
                    name: events
                    status: 400
                    problems:
                      - type: 'https://docs.api.video/reference/attribute-required'
                        title: This attribute is required.
                        name: events
                      - type: 'https://docs.api.video/reference/attribute-required'
                        title: This attribute is required.
                        name: url
                      - type: 'https://docs.api.video/reference/invalid-attribute'
                        title: This attribute must be an array.
                        name: events
        '429':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/too-many-requests'
              examples:
                Too many requests:
                  value:
                    type: 'https://docs.api.video/reference/too-many-requests'
                    title: Too many requests.
                    status: 429
      security:
        - apiKey: []
      x-client-action: create
      x-doctave:
        code-samples:
          - language: go
            code: |
              // First install the go client with "go get github.com/apivideo/api.video-go-client"
              // Documentation: https://github.com/apivideo/api.video-go-client/blob/main/docs/WebhooksApi.md#create

              package main

              import (
                  "context"
                  "fmt"
                  "os"
                  apivideosdk "github.com/apivideo/api.video-go-client"
              )

              func main() {
                  client := apivideosdk.ClientBuilder("YOUR_API_KEY").Build()
                  // if you rather like to use the sandbox environment:
                  // client := apivideosdk.SandboxClientBuilder("YOUR_SANDBOX_API_KEY").Build()
                      
                  webhooksCreationPayload := *apivideosdk.NewWebhooksCreationPayload([]string{"Events_example"}, "https://example.com/webhooks") // WebhooksCreationPayload | 

                  
                  res, err := client.Webhooks.Create(webhooksCreationPayload)

                  if err != nil {
                      fmt.Fprintf(os.Stderr, "Error when calling `Webhooks.Create``: %v\
              ", err)
                  }
                  // response from `Create`: Webhook
                  fmt.Fprintf(os.Stdout, "Response from `Webhooks.Create`: %v\
              ", res)
              }
          - language: node
            code: |-
              // First install the "@api.video/nodejs-client" npm package
              // Documentation: https://github.com/apivideo/api.video-nodejs-client/blob/main/doc/api/WebhooksApi.md#create

              const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" });

              const webhooksCreationPayload = {
                events: ["video.encoding.quality.completed"], // A list of the webhooks that you are subscribing to. There are Currently four webhook options: * ```video.encoding.quality.completed```  Occurs when a new video is uploaded into your account, it will be encoded into several different HLS and mp4 qualities. When each version is encoded, your webhook will get a notification.  It will look like ```{ "type": "video.encoding.quality.completed", "emittedAt": "2021-01-29T16:46:25.217+01:00", "videoId": "viXXXXXXXX", "encoding": "hls", "quality": "720p"} ```. This request says that the 720p HLS encoding was completed. * ```live-stream.broadcast.started```  When a lives tream begins broadcasting, the broadcasting parameter changes from false to true, and this webhook fires. * ```live-stream.broadcast.ended```  This event fires when the live stream has finished broadcasting, and the broadcasting parameter flips from false to true. * ```video.source.recorded```  Occurs when a live stream is recorded and submitted for encoding.
                url: "https://example.com/webhooks", // The url to which HTTP notifications are sent. It could be any http or https URL.
              }; 

              const webhook = await client.webhooks.create(webhooksCreationPayload); 
          - language: python
            code: |
              # First install the api client with "pip install api.video"
              # Documentation: https://github.com/apivideo/api.video-python-client/blob/main/docs/WebhooksApi.md#create

              import apivideo
              from apivideo.api import webhooks_api
              from apivideo.model.bad_request import BadRequest
              from apivideo.model.webhook import Webhook
              from apivideo.model.webhooks_creation_payload import WebhooksCreationPayload
              from pprint import pprint

              # Enter a context with an instance of the API client
              with apivideo.AuthenticatedApiClient(__API_KEY__) as api_client:
                  # Create an instance of the API class
                  api_instance = webhooks_api.WebhooksApi(api_client)
                  webhooks_creation_payload = WebhooksCreationPayload(
                      events=["video.encoding.quality.completed"],
                      url="https://example.com/webhooks",
                  ) # WebhooksCreationPayload | 

                  # example passing only required values which don't have defaults set
                  try:
                      # Create Webhook
                      api_response = api_instance.create(webhooks_creation_payload)
                      pprint(api_response)
                  except apivideo.ApiException as e:
                      print("Exception when calling WebhooksApi->create: %s\
              " % e)
          - language: java
            code: |
              // First add the "video.api:java-api-client" maven dependency to your project
              // Documentation: https://github.com/apivideo/api.video-java-client/blob/main/docs/WebhooksApi.md#create

              import video.api.client.ApiVideoClient;
              import video.api.client.api.ApiException;
              import video.api.client.api.models.*;
              import video.api.client.api.clients.WebhooksApi;
              import java.util.*;

              public class Example {
                public static void main(String[] args) {
                  ApiVideoClient client = new ApiVideoClient("YOUR_API_KEY");
                  // if you rather like to use the sandbox environment:
                  // ApiVideoClient client = new ApiVideoClient("YOUR_SANDBOX_API_KEY", ApiVideoClient.Environment.SANDBOX);

                  WebhooksApi apiInstance = client.webhooks();
                  
                  WebhooksCreationPayload webhooksCreationPayload = new WebhooksCreationPayload(); // 
                  webhooksCreationPayload.setEvents(Arrays.asList("video.encoding.quality.completed")); 
                  webhooksCreationPayload.setUrl("https://example.com/webhooks"); // The the url to which HTTP notifications are sent. It could be any http or https URL.


                  try {
                    Webhook result = apiInstance.create(webhooksCreationPayload);
                    System.out.println(result);
                  } catch (ApiException e) {
                    System.err.println("Exception when calling WebhooksApi#create");
                    System.err.println("Status code: " + e.getCode());
                    System.err.println("Reason: " + e.getMessage());
                    System.err.println("Response headers: " + e.getResponseHeaders());
                    e.printStackTrace();
                  }
                }
              }
          - language: csharp
            code: |
              // First add the "ApiVideo" NuGet package to your project
              // Documentation: https://github.com/apivideo/api.video-csharp-client/blob/main/docs/WebhooksApi.md#create

              using System.Diagnostics;
              using ApiVideo.Client;

              namespace Example
              {
                  public class createExample
                  {
                      public static void Main()
                      {
                          var basePath = ApiVideoClient.Client.Environment.SANDBOX;
                          var apiKey = "YOUR_API_KEY";

                          var apiInstance = new ApiVideoClient(apiKey,basePath);

                          var webhooksCreationPayload = new WebhooksCreationPayload(); // WebhooksCreationPayload | 
                          var apiWebhooksInstance = apiInstance.Webhooks();
                          try
                          {
                              // Create Webhook
                              Webhook result = apiWebhooksInstance.create(webhooksCreationPayload);
                              Debug.WriteLine(result);
                          }
                          catch (ApiException  e)
                          {
                              Debug.Print("Exception when calling WebhooksApi.create: " + e.Message );
                              Debug.Print("Status Code: "+ e.ErrorCode);
                              Debug.Print(e.StackTrace);
                          }
                      }
                  }
              }
          - language: php
            code: |-
              <?php
              // First install the api client: "composer require api-video/php-api-client"
              // Documentation: https://github.com/apivideo/api.video-php-client/blob/main/docs/Api/WebhooksApi.md#create

              require __DIR__ . '/vendor/autoload.php';

              $webhooksCreationPayload = (new \ApiVideo\Client\Model\WebhooksCreationPayload())
                  ->setEvents(['video.encoding.quality.completed']) // A list of the webhooks that you are subscribing to. There are Currently four webhook options: * ```video.encoding.quality.completed```  Occurs when a new video is uploaded into your account, it will be encoded into several different HLS and mp4 qualities. When each version is encoded, your webhook will get a notification.  It will look like ```{ "type": "video.encoding.quality.completed", "emittedAt": "2021-01-29T16:46:25.217+01:00", "videoId": "viXXXXXXXX", "encoding": "hls", "quality": "720p"} ```. This request says that the 720p HLS encoding was completed. * ```live-stream.broadcast.started```  When a lives tream begins broadcasting, the broadcasting parameter changes from false to true, and this webhook fires. * ```live-stream.broadcast.ended```  This event fires when the live stream has finished broadcasting, and the broadcasting parameter flips from false to true. * ```video.source.recorded```  Occurs when a live stream is recorded and submitted for encoding.)
                  ->setUrl("https://example.com/webhooks"); // The url to which HTTP notifications are sent. It could be any http or https URL.)

              $webhook = $client->webhooks()->create($webhooksCreationPayload); 
          - language: swift
            code: |+
              // First install the api client: https://github.com/apivideo/api.video-swift-client#getting-started
              // Documentation: https://github.com/apivideo/api.video-swift-client/blob/main/docs/WebhooksAPI.md#create

              ApiVideoClient.apiKey = "YOUR_API_KEY"

              let webhooksCreationPayload = webhooks-creation-payload(events: ["events_example"], url: "url_example")

              WebhooksAPI.create(webhooksCreationPayload: webhooksCreationPayload) { (response, error) in
               
              }
  '/webhooks/{webhookId}':
    get:
      tags:
        - Webhooks
      summary: Retrieve Webhook details
      description: Retrieve webhook details by id.
      operationId: GET-Webhook
      parameters:
        - name: webhookId
          in: path
          description: The unique webhook you wish to retreive details on.
          required: true
          style: simple
          explode: false
          schema:
            type: string
      responses:
        '200':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/webhook'
              examples:
                response:
                  value:
                    webhookId: webhook_XXXXXXXXXXXXXXX
                    createdAt: '2021-01-08T14:12:18+00:00'
                    events:
                      - video.encoding.quality.completed
                    url: 'http://clientnotificationserver.com/notif?myquery=query'
        '429':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/too-many-requests'
              examples:
                Too many requests:
                  value:
                    type: 'https://docs.api.video/reference/too-many-requests'
                    title: Too many requests.
                    status: 429
      security:
        - apiKey: []
      x-client-action: get
      x-doctave:
        code-samples:
          - language: go
            code: |
              // First install the go client with "go get github.com/apivideo/api.video-go-client"
              // Documentation: https://github.com/apivideo/api.video-go-client/blob/main/docs/WebhooksApi.md#get

              package main

              import (
                  "context"
                  "fmt"
                  "os"
                  apivideosdk "github.com/apivideo/api.video-go-client"
              )

              func main() {
                  client := apivideosdk.ClientBuilder("YOUR_API_KEY").Build()
                  // if you rather like to use the sandbox environment:
                  // client := apivideosdk.SandboxClientBuilder("YOUR_SANDBOX_API_KEY").Build()
                      
                  webhookId := "webhookId_example" // string | The unique webhook you wish to retreive details on.

                  
                  res, err := client.Webhooks.Get(webhookId)

                  if err != nil {
                      fmt.Fprintf(os.Stderr, "Error when calling `Webhooks.Get``: %v\
              ", err)
                  }
                  // response from `Get`: Webhook
                  fmt.Fprintf(os.Stdout, "Response from `Webhooks.Get`: %v\
              ", res)
              }
          - language: node
            code: |-
              // First install the "@api.video/nodejs-client" npm package
              // Documentation: https://github.com/apivideo/api.video-nodejs-client/blob/main/doc/api/WebhooksApi.md#get

              const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" });

              const webhookId = 'webhookId_example'; // The unique webhook you wish to retreive details on.

              const webhook = await client.webhooks.get(webhookId); 
          - language: python
            code: |
              # First install the api client with "pip install api.video"
              # Documentation: https://github.com/apivideo/api.video-python-client/blob/main/docs/WebhooksApi.md#get

              import apivideo
              from apivideo.api import webhooks_api
              from apivideo.model.webhook import Webhook
              from pprint import pprint

              # Enter a context with an instance of the API client
              with apivideo.AuthenticatedApiClient(__API_KEY__) as api_client:
                  # Create an instance of the API class
                  api_instance = webhooks_api.WebhooksApi(api_client)
                  webhook_id = "webhookId_example" # str | The unique webhook you wish to retreive details on.

                  # example passing only required values which don't have defaults set
                  try:
                      # Show Webhook details
                      api_response = api_instance.get(webhook_id)
                      pprint(api_response)
                  except apivideo.ApiException as e:
                      print("Exception when calling WebhooksApi->get: %s\n" % e)
          - language: java
            code: |
              // First add the "video.api:java-api-client" maven dependency to your project
              // Documentation: https://github.com/apivideo/api.video-java-client/blob/main/docs/WebhooksApi.md#get

              import video.api.client.ApiVideoClient;
              import video.api.client.api.ApiException;
              import video.api.client.api.models.*;
              import video.api.client.api.clients.WebhooksApi;
              import java.util.*;

              public class Example {
                public static void main(String[] args) {
                  ApiVideoClient client = new ApiVideoClient("YOUR_API_KEY");
                  // if you rather like to use the sandbox environment:
                  // ApiVideoClient client = new ApiVideoClient("YOUR_SANDBOX_API_KEY", ApiVideoClient.Environment.SANDBOX);

                  WebhooksApi apiInstance = client.webhooks();
                  
                  String webhookId = "webhookId_example"; // The unique webhook you wish to retreive details on.

                  try {
                    Webhook result = apiInstance.get(webhookId);
                    System.out.println(result);
                  } catch (ApiException e) {
                    System.err.println("Exception when calling WebhooksApi#get");
                    System.err.println("Status code: " + e.getCode());
                    System.err.println("Reason: " + e.getMessage());
                    System.err.println("Response headers: " + e.getResponseHeaders());
                    e.printStackTrace();
                  }
                }
              }
          - language: csharp
            code: |
              // First add the "ApiVideo" NuGet package to your project
              // Documentation: https://github.com/apivideo/api.video-csharp-client/blob/main/docs/WebhooksApi.md#get

              using System.Diagnostics;
              using ApiVideo.Client;

              namespace Example
              {
                  public class getExample
                  {
                      public static void Main()
                      {
                          var basePath = ApiVideoClient.Client.Environment.SANDBOX;
                          var apiKey = "YOUR_API_KEY";

                          var apiInstance = new ApiVideoClient(apiKey,basePath);

                          var webhookId = webhookId_example;  // string | The unique webhook you wish to retreive details on.
                          var apiWebhooksInstance = apiInstance.Webhooks();
                          try
                          {
                              // Show Webhook details
                              Webhook result = apiWebhooksInstance.get(webhookId);
                              Debug.WriteLine(result);
                          }
                          catch (ApiException  e)
                          {
                              Debug.Print("Exception when calling WebhooksApi.get: " + e.Message );
                              Debug.Print("Status Code: "+ e.ErrorCode);
                              Debug.Print(e.StackTrace);
                          }
                      }
                  }
              }
          - language: php
            code: |-
              <?php
              // First install the api client: "composer require api-video/php-api-client"
              // Documentation: https://github.com/apivideo/api.video-php-client/blob/main/docs/Api/WebhooksApi.md#get

              require __DIR__ . '/vendor/autoload.php';

              $webhookId = 'webhookId_example'; // The unique webhook you wish to retreive details on.

              $webhook = $client->webhooks()->get($webhookId);  
          - language: swift
            code: |
              // First install the api client: https://github.com/apivideo/api.video-swift-client#getting-started
              // Documentation: https://github.com/apivideo/api.video-swift-client/blob/main/docs/WebhooksAPI.md#get
    delete:
      tags:
        - Webhooks
      summary: Delete a Webhook
      description: This endpoint will delete the indicated webhook.
      x-client-description:
        default: This method will delete the indicated webhook.
      operationId: DELETE-webhook
      parameters:
        - name: webhookId
          in: path
          description: The webhook you wish to delete.
          required: true
          style: simple
          explode: false
          schema:
            type: string
      responses:
        '204':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: No Content
        '404':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/not-found'
              examples:
                response:
                  value:
                    type: 'https://docs.api.video/reference/resource-not-found'
                    title: The requested resource was not found.
                    name: webhookId
                    status: 404
        '429':
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: The request limit per minute.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: The number of available requests left for the current time window.
            X-RateLimit-Retry-After:
              schema:
                type: integer
              description: The number of seconds left until the current rate limit window resets.
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/too-many-requests'
              examples:
                Too many requests:
                  value:
                    type: 'https://docs.api.video/reference/too-many-requests'
                    title: Too many requests.
                    status: 429
      security:
        - apiKey: []
      x-client-action: delete
      x-doctave:
        code-samples:
          - language: go
            code: |
              // First install the go client with "go get github.com/apivideo/api.video-go-client"
              // Documentation: https://github.com/apivideo/api.video-go-client/blob/main/docs/WebhooksApi.md#delete

              package main

              import (
                  "context"
                  "fmt"
                  "os"
                  apivideosdk "github.com/apivideo/api.video-go-client"
              )

              func main() {
                  client := apivideosdk.ClientBuilder("YOUR_API_KEY").Build()
                  // if you rather like to use the sandbox environment:
                  // client := apivideosdk.SandboxClientBuilder("YOUR_SANDBOX_API_KEY").Build()
                      
                  webhookId := "webhookId_example" // string | The webhook you wish to delete.

                  
                  err := client.Webhooks.Delete(webhookId)

                  if err != nil {
                      fmt.Fprintf(os.Stderr, "Error when calling `Webhooks.Delete``: %v\
              ", err)
                  }
              }
          - language: node
            code: |-
              // First install the "@api.video/nodejs-client" npm package
              // Documentation: https://github.com/apivideo/api.video-nodejs-client/blob/main/doc/api/WebhooksApi.md#delete

              const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" });

              const webhookId = 'webhookId_example'; // The webhook you wish to delete.
              await client.webhooks.delete(webhookId); 
          - language: python
            code: |
              # First install the api client with "pip install api.video"
              # Documentation: https://github.com/apivideo/api.video-python-client/blob/main/docs/WebhooksApi.md#delete

              import apivideo
              from apivideo.api import webhooks_api
              from apivideo.model.not_found import NotFound
              from pprint import pprint

              # Enter a context with an instance of the API client
              with apivideo.AuthenticatedApiClient(__API_KEY__) as api_client:
                  # Create an instance of the API class
                  api_instance = webhooks_api.WebhooksApi(api_client)
                  webhook_id = "webhookId_example" # str | The webhook you wish to delete.

                  # example passing only required values which don't have defaults set
                  try:
                      # Delete a Webhook
                      api_instance.delete(webhook_id)
                  except apivideo.ApiException as e:
                      print("Exception when calling WebhooksApi->delete: %s\n" % e)
          - language: java
            code: |
              // First add the "video.api:java-api-client" maven dependency to your project
              // Documentation: https://github.com/apivideo/api.video-java-client/blob/main/docs/WebhooksApi.md#delete

              import video.api.client.ApiVideoClient;
              import video.api.client.api.ApiException;
              import video.api.client.api.models.*;
              import video.api.client.api.clients.WebhooksApi;
              import java.util.*;

              public class Example {
                public static void main(String[] args) {
                  ApiVideoClient client = new ApiVideoClient("YOUR_API_KEY");
                  // if you rather like to use the sandbox environment:
                  // ApiVideoClient client = new ApiVideoClient("YOUR_SANDBOX_API_KEY", ApiVideoClient.Environment.SANDBOX);

                  WebhooksApi apiInstance = client.webhooks();
                  
                  String webhookId = "webhookId_example"; // The webhook you wish to delete.

                  try {
                    apiInstance.delete(webhookId);
                  } catch (ApiException e) {
                    System.err.println("Exception when calling WebhooksApi#delete");
                    System.err.println("Status code: " + e.getCode());
                    System.err.println("Reason: " + e.getMessage());
                    System.err.println("Response headers: " + e.getResponseHeaders());
                    e.printStackTrace();
                  }
                }
              }
          - language: csharp
            code: |
              // First add the "ApiVideo" NuGet package to your project
              // Documentation: https://github.com/apivideo/api.video-csharp-client/blob/main/docs/WebhooksApi.md#delete

              using System.Diagnostics;
              using ApiVideo.Client;

              namespace Example
              {
                  public class deleteExample
                  {
                      public static void Main()
                      {
                          var basePath = ApiVideoClient.Client.Environment.SANDBOX;
                          var apiKey = "YOUR_API_KEY";

                          var apiInstance = new ApiVideoClient(apiKey,basePath);

                          var webhookId = webhookId_example;  // string | The webhook you wish to delete.
                          var apiWebhooksInstance = apiInstance.Webhooks();
                          try
                          {
                              // Delete a Webhook
                              apiWebhooksInstance.delete(webhookId);
                          }
                          catch (ApiException  e)
                          {
                              Debug.Print("Exception when calling WebhooksApi.delete: " + e.Message );
                              Debug.Print("Status Code: "+ e.ErrorCode);
                              Debug.Print(e.StackTrace);
                          }
                      }
                  }
              }
          - language: php
            code: |-
              <?php
              // First install the api client: "composer require api-video/php-api-client"
              // Documentation: https://github.com/apivideo/api.video-php-client/blob/main/docs/Api/WebhooksApi.md#delete

              require __DIR__ . '/vendor/autoload.php';

              $webhookId = 'webhookId_example'; // The webhook you wish to delete.
              $client->webhooks()->delete($webhookId);  
          - language: swift
            code: |
              // First install the api client: https://github.com/apivideo/api.video-swift-client#getting-started
              // Documentation: https://github.com/apivideo/api.video-swift-client/blob/main/docs/WebhooksAPI.md#delete
components:
  examples:
    live-stream-response-example:
      value:
        liveStreamId: li4pqNqGUkhKfWcBGpZVLRY5
        createdAt: '2020-07-29T10:45:35+00:00'
        updatedAt: '2020-07-29T10:45:35+00:00'
        streamKey: cc1b4df0-d1c5-4064-a8f9-9f0368385135
        restreams:
        - name: YouTube
          serverUrl: rtmp://youtube.broadcast.example.com
          streamKey: cc1b4df0-d1c5-4064-a8f9-9f0368385135
        - name: Twitch
          serverUrl: rtmp://twitch.broadcast.example.com
          streamKey: cc1b4df0-d1c5-4064-a8f9-9f0368385135
        name: Live From New York
        public: true
        broadcasting: false
        assets:
          iframe: '<iframe src="https://embed.api.video/live/li4pqNqGUkhKfWcBGpZVLRY5" width="100%" height="100%" frameborder="0" scrolling="no" allowfullscreen=""></iframe>'
          player: 'https://embed.api.video/live/li4pqNqGUkhKfWcBGpZVLRY5'
          hls: 'https://live.api.video/li4pqNqGUkhKfWcBGpZVLRY5.m3u8'
          thumbnail: 'https://live.api.video/li4pqNqGUkhKfWcBGpZVLRY5/thumbnail.jpg'
  schemas:
    link:
      type: object
      properties:
        rel:
          type: string
        uri:
          type: string
    access-token:
      title: AccessToken
      type: object
      properties:
        access_token:
          type: string
          description: The access token containing security credentials allowing you to acccess the API. The token lasts for one hour.
          example: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6IjUyZWM4NWUyMjFkODZjOWI0NDQ5NzBhMjQwMzUyOWQ4MDQyNGQ3ZmJjYjFlYWM2MjVlM2VkMjI2YWRlNTcxMDY2NDUyZDc0NjdhN2E4NjI0In0.eyJhdWQiOiJsaWJjYXN0IiwianRpIjoiNTJlYzg1ZTIyMWQ4NmM5YjQ0NDk3MGEyNDAzNTI5ZDgwNDI0ZDdmYmNiMWVhYzYyNWUzZWQyMjZhZGU1NzEwNjY0NTJkNzQ2N2E3YTg2MjQiLCJpYXQiOjE1MjUyNzYxNDcsIm5iZiI6MTUyNTI3NjE0NywiZXhwIjoxNTI1Mjc5NzQ3LCJzdWIiOiJ1c01vbml0b3IiLCJzY29wZXMiOlsibW9uaXRvci5saWJjYXN0LmNvbSJdLCJjb250ZXh0Ijp7InVzZXIiOiJ1c01vbml0b3IiLCJwcm9qZWN0IjoicHJNb25pdG9yIiwibWVtYmVyIjoibWVNb25pdG9yIn19.rUvishDNyJLNlI4W5VmguNecm5KD2uZgPkKJQbaqw-cJbSrVxkSbiKYtk_E3cz3WT7-IS2yFTsYN3uIo5Rbit8_HftweyEp2bdBRI8yjR6oZZ1sNJJXswISN1i2kk4r-aaxu7Xxf_LtsjOMUj_YZsvcc2nqBXPKjHbJCJryx3DDJaIcymOqao7nhQaCCQyrQooAXNTYs4E9fWN1dC_x2O-zok5TuG-xhEW-umwxfSUMWNgSTkz38ACceQ0PCJSgB3jqjDH4MwC7B3ppEPZuK5E6JhKeyRlalswRyYq3UQPnVeMTam7YQHsuTgbehF6WySW8i44o7V_MCe9hjPdp-WA
        token_type:
          type: string
          description: The type of token you have.
          default: bearer
        refresh_token:
          type: string
          description: A token you can use to get the next access token when your current access token expires.
          example: def50200a28d88fb9aaa921be78eeb5604b071101a334899a7d5fc7492cf8ea752962ddc8961fe5c126101d4ecacd980396eb2fd494995b812dffcb98256c4277f790d1f658fc2d2e34f350740544e5232d69d68d34c648271d706c5e7049adac0b1832d0fdf71809715cc7e97fa63f65966deadb501a55ff469b0fd23a637cb6acbe9d9b8594a17f09efc2efeed82984764a0065d5e29c950c7b081a61ba2aaa192be3085c400ee37eac50fa9320ce2cfe8916c8165418d23e9f91b6a5c8515e1d74ee193a5a1ca01954fbff27361c20184240be2359e0afbed0bf1c762cf872450b5e8b5d4704f4fd9583e4470adc98409dd42965709712806bd9019378a72eea0b4912ce684ffd833db5806ab84174f905db2a75380071d004615c944bb8f8c4045cce7234c2be9a2330522cf7f067b8e58f57cffb6edb4b7ef91313e12bcde47e5e76ceee7fa52990132288f345d33ed917ae4fd54b7284f8964d898e97e1ee3bc4157f75d7fee63976e4be66ac1ec32ef74afa533f0eb593523f226cbec57d196ac8962
        expires_in:
          type: integer
          description: Lists the time in seconds when your access token expires. It lasts for one hour.
      example:
        access_token: est
        token_type: qui nulla l
        refresh_token: cillum
        expires_in: 3600
    pagination:
      title: Pagination
      required:
        - links
      type: object
      properties:
        itemsTotal:
          type: integer
          description: Total number of items that exist.
          readOnly: true
        pagesTotal:
          type: integer
          description: Number of items listed in the current page.
          readOnly: true
        pageSize:
          type: integer
          description: Maximum number of item per page.
          readOnly: true
        currentPage:
          type: integer
          description: The current page index.
          readOnly: true
        currentPageItems:
          type: integer
          description: The number of items on the current page.
          readOnly: true
        links:
          type: array
          items:
            $ref: '#/components/schemas/pagination-link'
      example:
        itemsTotal: 123
        pagesTotal: 7
        pageSize: 20
        currentPage: 3
        currentPageItems: 20
        links:
          first:
            rel: first
            uri: /videos/search?currentPage=1&pageSize=20
          previous:
            rel: previous
            uri: /videos/search?currentPage=2&pageSize=20
          next:
            rel: next
            uri: /videos/search?currentPage=4&pageSize=20
          last:
            rel: last
            uri: /videos/search?currentPage=6&pageSize=20
    bad-request:
      title: BadRequest
      type: object
      properties:
        type:
          description: A link to the error documentation.
          type: string
        title:
          description: A description of the error that occurred.
          type: string
        name:
          description: The name of the parameter that caused the error.
          type: string
        status:
          description: The HTTP status code.
          type: integer
        problems:
          description: Returns any additional problems in the request in an array of objects.
          uniqueItems: true
          type: array
          items:
            $ref: '#/components/schemas/additional-bad-request-errors'
    additional-bad-request-errors:
      title: BadRequest
      type: object
      properties:
        type:
          description: A link to the error documentation.
          type: string
        title:
          description: A description of the error that occurred.
          type: string
        name:
          description: The name of the parameter that caused the error.
          type: string
        status:
          description: The HTTP status code.
          type: integer
    not-found:
      title: NotFound
      type: object
      properties:
        type:
          description: A link to the error documentation.
          type: string
        title:
          description: A description of the error that occurred.
          type: string
        name:
          description: The name of the parameter that caused the error.
          type: string
        status:
          description: The HTTP status code.
          type: integer
    too-many-requests:
      title: TooManyRequests
      type: object
      properties:
        type:
          description: A link to the error documentation.
          type: string
        title:
          description: A description of the error that occurred.
          type: string
        status:
          description: The HTTP status code.
          type: integer
    403-error-schema:
      title: 403 Forbidden
      type: object
      properties:
        type:
          description: A link to the error documentation.
          type: string
        title:
          description: A description of the error that occurred.
          type: string
        name:
          description: The name of the parameter that caused the error.
          type: string
          nullable: true
        status:
          description: The HTTP status code.
          type: integer
    video:
      title: Video
      type: object
      properties:
        videoId:
          type: string
          description: The unique identifier of the video object.
          example: vi4k0jvEUuaTdRAEjQ4Prklg
        createdAt:
          type: string
          format: date-time
          description: 'When a video was created, presented in ATOM UTC format.'
          example: '2024-05-28T11:15:07+00:00'
        title:
          type: string
          description: |
            The title of the video content.
          example: Maths video
        description:
          type: string
          description: |
            A description for the video content.
          example: An amazing video explaining string theory.
        publishedAt:
          type: string
          description: The date and time the API created the video. Date and time are provided using ATOM UTC format.
          format: date-time
          example: '2024-05-28T11:15:07+00:00'
        updatedAt:
          type: string
          description: The date and time the video was updated. Date and time are provided using ATOM UTC format.
          format: date-time
          example: '2024-05-28T11:15:07+00:00'
        discardedAt:
          type: string
          description: The date and time the video was discarded. The API populates this field only if you have the Video Restore feature enabled and discard a video. Date and time are provided using ATOM UTC format.
          format: date-time
          example: '2024-05-28T11:15:07+00:00'
          nullable: true
        deletesAt:
          type: string
          description: The date and time the video will be permanently deleted. The API populates this field only if you have the Video Restore feature enabled and discard a video. Discarded videos are pemanently deleted after 90 days. Date and time are provided using ATOM UTC format.
          format: date-time
          example: '2024-05-28T11:15:07+00:00'
          nullable: true
        discarded:
          type: boolean
          description: Returns `true` for videos you discarded when you have the Video Restore feature enabled. Returns `false` for every other video.
        language:
          type: string
          description: Returns the language of a video in [IETF language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format. You can set the language during video creation via the API, otherwise it is detected automatically.
          example: en
        languageOrigin:
          nullable: true
          type: string
          enum: [api, auto]
          description: |-
            Returns the origin of the last update on the video's `language` attribute.

            - `api` means that the last update was requested from the API.
            - `auto` means that the last update was done automatically by the API.
          example: api
        tags:
          type: array
          description: |
            One array of tags (each tag is a string) in order to categorize a video. Tags may include spaces. 
          example: '"tags": ["maths", "string theory", "video"]'
          items:
            type: string
        metadata:
          type: array
          description: |
            Metadata you can use to categorise and filter videos. Metadata is a list of dictionaries, where each dictionary represents a key value pair for categorising a video.
          example: '[{"key":"Author", "value":"John Doe"}, {"key":"Format", "value":"Tutorial"}]'
          items:
            $ref: '#/components/schemas/metadata'
        source:
          $ref: '#/components/schemas/video-source'
        assets:
          $ref: '#/components/schemas/video-assets'
        playerId:
          type: string
          description: |
            The id of the player that will be applied on the video.
          example: pl45KFKdlddgk654dspkze
        public:
          type: boolean
          description: |
            Defines if the content is publicly reachable or if a unique token is needed for each play session. Default is true. Tutorials on [private videos](https://api.video/blog/endpoints/private-videos/).
          example: false
        panoramic:
          type: boolean
          description: |
            Defines if video is panoramic.
          example: false
        mp4Support:
          type: boolean
          description: |
            This lets you know whether mp4 is supported. If enabled, an mp4 URL will be provided in the response for the video.
          example: true
      required:
        - videoId
      example:
        videoId: vi4k0jvEUuaTdRAEjQ4Jfrgz
        title: Maths video
        description: An amazing video explaining the string theory
        language: 'en'
        languageOrigin: 'api'
        tags:
          - maths
          - string theory
          - video
        metadata:
          - key: Author
            value: John Doe
          - key: Format
            value: Tutorial
        createdAt: '2024-03-03T12:52:03+00:00'
        publishedAt: '2024-07-14T23:36:07+00:00'
        discarded: false
        discardedAt: null
        deletesAt: null
        actions:
          - video_delete
          - video_download
          - video_update
    list-tags-response:
      title: Tags
      type: object
      properties:
        data:
          type: array
          items:            
            type: object
            properties:
              value:
                description: Returns the value of a video tag used in your project.
                type: string
              videoCount:
                description: Returns the number of times a video tag is used.
                type: integer
        pagination:
          $ref: '#/components/schemas/pagination'
    watermark:
      title: Watermark
      type: object
      properties:
        watermarkId:
          type: string
          description: The unique identifier of the watermark.
          example: watermark_1BWr2L5MTQwxGkuxKjzh6i
        createdAt:
          type: string
          format: date-time
          description: 'When the watermark was created, presented in ATOM UTC format.'
          example: '2019-06-24T11:45:01+00:00'
    watermarks-list-response:
      title: Watermarks
      required:
        - data
        - pagination
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/watermark'
        pagination:
          $ref: '#/components/schemas/pagination'
    watermark-upload-payload:
      title: WatermarkUploadPayload
      required:
        - file
      type: object
      properties:
        file:
          type: string
          description: The `.jpg` or `.png` image to be added as a watermark.
          format: binary
    player-theme:
      type: object
      properties:
        name:
          type: string
          description: The name of the player theme
        text:
          type: string
          description: 'RGBA color for timer text. Default: rgba(255, 255, 255, 1)'
        link:
          type: string
          description: 'RGBA color for all controls. Default: rgba(255, 255, 255, 1)'
        linkHover:
          type: string
          description: 'RGBA color for all controls when hovered. Default: rgba(255, 255, 255, 1)'
        linkActive:
          type: string
          description: RGBA color for the play button when hovered.
        trackPlayed:
          type: string
          description: 'RGBA color playback bar: played content. Default: rgba(88, 131, 255, .95)'
        trackUnplayed:
          type: string
          description: 'RGBA color playback bar: downloaded but unplayed (buffered) content. Default: rgba(255, 255, 255, .35)'
        trackBackground:
          type: string
          description: 'RGBA color playback bar: background. Default: rgba(255, 255, 255, .2)'
        backgroundTop:
          type: string
          description: 'RGBA color: top 50% of background. Default: rgba(0, 0, 0, .7)'
        backgroundBottom:
          type: string
          description: 'RGBA color: bottom 50% of background. Default: rgba(0, 0, 0, .7)'
        backgroundText:
          type: string
          description: 'RGBA color for title text. Default: rgba(255, 255, 255, 1)'
        enableApi:
          type: boolean
          description: 'enable/disable player SDK access. Default: true'
        enableControls:
          type: boolean
          description: 'enable/disable player controls. Default: true'
        forceAutoplay:
          type: boolean
          description: 'enable/disable player autoplay. Default: false'
        hideTitle:
          type: boolean
          description: 'enable/disable title. Default: false'
        forceLoop:
          type: boolean
          description: 'enable/disable looping. Default: false'
        playerId:
          type: string
          example: pl45KFKdlddgk654dspkze
        createdAt:
          type: string
          description: 'When the player was created, presented in ATOM UTC format.'
          format: date-time
          example: '2020-01-31T10:17:47+00:00'
        updatedAt:
          type: string
          description: 'When the player was last updated, presented in ATOM UTC format.'
          format: date-time
          example: '2020-01-31T10:18:47+00:00'
        assets:
          type: object
          properties:
            logo:
              type: string
              description: The name of the file containing the logo you want to use.
              example: mylogo.jpg
            link:
              type: string
              description: The path to the file containing your logo.
              example: path/to/my/logo/mylogo.jpg
      title: PlayerTheme
      required:
        - playerId
    player-theme-creation-payload:
      title: PlayerThemeCreationPayload
      type: object
      properties:
        name:
          type: string
          maxLength: 100
          description: Add a name for your player theme here.
        text:
          type: string
          description: 'RGBA color for timer text. Default: rgba(255, 255, 255, 1)'
        link:
          type: string
          description: 'RGBA color for all controls. Default: rgba(255, 255, 255, 1)'
        linkHover:
          type: string
          description: 'RGBA color for all controls when hovered. Default: rgba(255, 255, 255, 1)'
        linkActive:
          type: string
          description: RGBA color for the play button when hovered.
        trackPlayed:
          type: string
          description: 'RGBA color playback bar: played content. Default: rgba(88, 131, 255, .95)'
        trackUnplayed:
          type: string
          description: 'RGBA color playback bar: downloaded but unplayed (buffered) content. Default: rgba(255, 255, 255, .35)'
        trackBackground:
          type: string
          description: 'RGBA color playback bar: background. Default: rgba(255, 255, 255, .2)'
        backgroundTop:
          type: string
          description: 'RGBA color: top 50% of background. Default: rgba(0, 0, 0, .7)'
        backgroundBottom:
          type: string
          description: 'RGBA color: bottom 50% of background. Default: rgba(0, 0, 0, .7)'
        backgroundText:
          type: string
          description: 'RGBA color for title text. Default: rgba(255, 255, 255, 1)'
        enableApi:
          type: boolean
          description: 'enable/disable player SDK access. Default: true'
          default: true
        enableControls:
          type: boolean
          description: 'enable/disable player controls. Default: true'
          default: true
        forceAutoplay:
          type: boolean
          description: 'enable/disable player autoplay. Default: false'
          default: false
        hideTitle:
          type: boolean
          description: 'enable/disable title. Default: false'
          default: false
        forceLoop:
          type: boolean
          description: 'enable/disable looping. Default: false'
          default: false
      example:
        name: My nice theme
        assets:
          logo: 'https://cdn.api.video/player/pl14Db6oMJRH6SRVoOwORacK/logo.png'
          link: 'https://api.video'
        shapeMargin: 10
        shapeRadius: 3
        shapeAspect: flat
        shapeBackgroundTop: 'rgba(50, 50, 50, .7)'
        shapeBackgroundBottom: 'rgba(50, 50, 50, .8)'
        text: 'rgba(255, 255, 255, .95)'
        link: 'rgba(255, 0, 0, .95)'
        linkHover: 'rgba(255, 255, 255, .75)'
        linkActive: 'rgba(255, 0, 0, .75)'
        trackPlayed: 'rgba(255, 255, 255, .95)'
        trackUnplayed: 'rgba(255, 255, 255, .1)'
        trackBackground: 'rgba(0, 0, 0, 0)'
        backgroundTop: 'rgba(72, 4, 45, 1)'
        backgroundBottom: 'rgba(94, 95, 89, 1)'
        backgroundText: 'rgba(255, 255, 255, .95)'
        language: en
        enableApi: true
        enableControls: true
        forceAutoplay: false
        hideTitle: false
        forceLoop: false
    player-theme-update-payload:
      title: PlayerThemeUpdatePayload
      type: object
      properties:
        name:
          type: string
          maxLength: 100
          description: Add a name for your player theme here.
        text:
          type: string
          description: 'RGBA color for timer text. Default: rgba(255, 255, 255, 1)'
        link:
          type: string
          description: 'RGBA color for all controls. Default: rgba(255, 255, 255, 1)'
        linkHover:
          type: string
          description: 'RGBA color for all controls when hovered. Default: rgba(255, 255, 255, 1)'
        linkActive:
          type: string
          description: RGBA color for the play button when hovered.
        trackPlayed:
          type: string
          description: 'RGBA color playback bar: played content. Default: rgba(88, 131, 255, .95)'
        trackUnplayed:
          type: string
          description: 'RGBA color playback bar: downloaded but unplayed (buffered) content. Default: rgba(255, 255, 255, .35)'
        trackBackground:
          type: string
          description: 'RGBA color playback bar: background. Default: rgba(255, 255, 255, .2)'
        backgroundTop:
          type: string
          description: 'RGBA color: top 50% of background. Default: rgba(0, 0, 0, .7)'
        backgroundBottom:
          type: string
          description: 'RGBA color: bottom 50% of background. Default: rgba(0, 0, 0, .7)'
        backgroundText:
          type: string
          description: 'RGBA color for title text. Default: rgba(255, 255, 255, 1)'
        enableApi:
          type: boolean
          description: 'enable/disable player SDK access. Default: true'
        enableControls:
          type: boolean
          description: 'enable/disable player controls. Default: true'
        forceAutoplay:
          type: boolean
          description: 'enable/disable player autoplay. Default: false'
        hideTitle:
          type: boolean
          description: 'enable/disable title. Default: false'
        forceLoop:
          type: boolean
          description: 'enable/disable looping. Default: false'
    caption:
      title: Caption
      type: object
      properties:
        uri:
          type: string
          description: 'The unique resource identifier of the uploaded caption.'
          example: '/videos/vi1111DinStg3oBbN79GklWS/captions/sr-Cyrl'
        src:
          type: string
          description: 'A direct URL to the uploaded caption file.'
          example: 'https://cdn.api.video/vod/vi1111DinStg3oBbN79GklWS/captions/sr-Cyrl.vtt'
        srclang:
          type: string
          description: 'Indicates the language of the uploaded caption file using IETF language tags.'
          example: 'sr-Cyrl'
        languageName:
          type: string
          description: 'Returns the native name of the caption language in UTF-8 encoding.'
          example: 'српски (ћирилица)'
        default:
          type: boolean
          description: 'Whether you will have subtitles or not. True for yes you will have subtitles, false for no you will not have subtitles.'
          example: false
          default: false

    live-stream:
      title: LiveStream
      type: object
      properties:
        liveStreamId:
          type: string
          description: The unique identifier for the live stream. Live stream IDs begin with "li."
          example: li400mYKSgQ6xs7taUeSaEKr
        name:
          type: string
          description: The name of your live stream.
          example: My Live Stream
        streamKey:
          type: string
          description: 'The unique, private stream key that you use to begin streaming.'
          example: dw-dew8-q6w9-k67w-1ws8
        public:
          type: boolean
          description: 'Whether your video can be viewed by everyone, or requires authentication to see it. A setting of false will require a unique token for each view. Learn more about the Private Video feature [here](https://docs.api.video/delivery/video-privacy-access-management).'
          example: true
        assets:
          $ref: '#/components/schemas/live-stream-assets'
        playerId:
          type: string
          description: The unique identifier for the player.
          example: pl45d5vFFGrfdsdsd156dGhh
        broadcasting:
          type: boolean
          description: 'Whether or not you are broadcasting the live video you recorded for others to see. True means you are broadcasting to viewers, false means you are not.'
          example: true
        restreams:
          description: Returns the list of restream destinations.
          type: array
          items:
            $ref: '#/components/schemas/restreams-response-object'
        createdAt:
          type: string
          description: 'When the player was created, presented in ATOM UTC format.'
          format: date-time
          example: '2020-01-31T10:17:47+00:00'
        updatedAt:
          type: string
          description: 'When the player was last updated, presented in ATOM UTC format.'
          format: date-time
          example: '2020-01-31T10:18:47+00:00'
      required:
        - liveStreamId
        - restreams
    player-session-event:
      title: PlayerSessionEvent
      type: object
      properties:
        type:
          type: string
          description: 'Possible values are: ready, play, pause, resume, seek.backward, seek.forward, end'
          example: play
        emittedAt:
          type: string
          description: 'When an event occurred, presented in ATOM UTC format.'
          format: date-time
          example: '2019-06-24T11:45:01+00:00'
        at:
          type: integer
        from:
          type: integer
        to:
          type: integer
    webhook:
      title: Webhook
      type: object
      properties:
        webhookId:
          type: string
          description: A unique identifier of the webhook you subscribed to.
          example: webhook_XXXXXXXXXXXXXXX
        createdAt:
          type: string
          description: 'The time and date when you created this webhook subscription, in ATOM UTC format.'
          format: date-time
          example: '2019-06-24T11:45:01+00:00'
        events:
          type: array
          description: A list of events that you subscribed to. When these events occur, the API triggers a webhook call to the URL you provided.
          example: '["video.encoding.quality.completed"]'
          items:
            type: string
            enum: ['live-stream.broadcast.started', 'live-stream.broadcast.ended', 'video.source.recorded', 'video.encoding.quality.completed', 'video.caption.generated', 'video.summary.generated']
        url:
          type: string
          description: The URL where the API sends the webhook.
          example: 'http://clientnotificationserver.com/notif?myquery=query'
        signatureSecret:
          type: string
          description: A secret key for the webhook you subscribed to. You can use it to verify the origin of the webhook call that you receive.
    video-status:
      title: VideoStatus
      type: object
      properties:
        ingest:
          $ref: '#/components/schemas/video-status-ingest'
        encoding:
          $ref: '#/components/schemas/video-status-encoding'
      example:
        ingest:
          status: uploaded
          filesize: 273579401
          receivedBytes:
            - to: 134217727
              from: 0
              total: 273579401
            - to: 268435455
              from: 134217728
              total: 273579401
            - to: 273579400
              from: 268435456
              total: 273579401
        encoding:
          playable: true
          qualities:
            - quality: 240p
              status: encoded
            - quality: 360p
              status: encoded
            - quality: 480p
              status: encoded
            - quality: 720p
              status: encoded
            - quality: 1080p
              status: encoding
            - quality: 2160p
              status: waiting
          metadata:
            width: 424
            height: 240
            bitrate: 411.218
            duration: 4176
            framerate: 24
            samplerate: 48000
            videoCodec: h264
            audioCodec: aac
            aspectRatio: 16/9
    quality:
      title: Quality
      type: object
      properties:
        type:
          type: string
          description: The type of video (hls or mp4).
          example: hls
          enum:
            - hls
            - mp4
        quality:
          type: string
          description: 'The quality of the video you have, in pixels. Choices include 360p, 480p, 720p, 1080p, and 2160p.'
          example: 720p
          enum:
            - 240p
            - 360p
            - 480p
            - 720p
            - 1080p
            - 2160p
        status:
          type: string
          description: The status of your video. Statuses include waiting - the video is waiting to be encoded. encoding - the video is in the process of being encoded. encoded - the video was successfully encoded. failed - the video failed to be encoded.
          enum:
            - waiting
            - encoding
            - encoded
            - failed
    bytes-range:
      title: BytesRange
      type: object
      properties:
        from:
          type: integer
          description: The starting point for the range of bytes for a chunk of a video.
          example: 0
        to:
          type: integer
          description: The ending point for the range of bytes for a chunk of a video.
          example: 9999
        total:
          type: integer
          description: The total number of expected bytes.
          example: 10000
    chapter:
      title: Chapter
      type: object
      properties:
        uri:
          type: string
        src:
          type: string
          description: 'The link to your VTT file, which contains your chapters information for the video.'
          example: 'https://cdn.api.video/vod/vi3N6cDinStg3oBbN79GklWS/chapters/fr.vtt'
        language:
          type: string
    upload-token:
      title: UploadToken
      type: object
      properties:
        token:
          type: string
          description: The unique identifier for the token you will use to authenticate an upload.
          example: to1tcmSFHeYY5KzyhOqVKMKb
        ttl:
          maximum: 2147483647
          minimum: 0
          type: integer
          description: Time-to-live - how long the upload token is valid for.
        createdAt:
          type: string
          description: 'When the token was created, displayed in ATOM UTC format.'
          format: date-time
          example: '2019-12-16T08:25:51+00:00'
        expiresAt:
          type: string
          description: 'When the token expires, displayed in ATOM UTC format.'
          format: date-time
          example: '2019-12-16T09:25:51+00:00'
          nullable: true
    authenticate-payload:
      title: ApiKey
      required:
        - apiKey
      type: object
      properties:
        apiKey:
          type: string
          description: 'Your account API key. You can use your sandbox API key, or you can use your production API key.'
      example:
        apiKey: 9VxMaPgsaFg7EBqmuspSzF7
    refresh-token-payload:
      title: RefreshToken
      required:
        - refreshToken
      type: object
      properties:
        refreshToken:
          type: string
          description: |
            The refresh token is either the first refresh token you received when you authenticated with the auth/api-key endpoint, or it's the refresh token from the last time you used the auth/refresh endpoint. Place this in the body of your request to obtain a new access token (which is valid for an hour) and a new refresh token.
      example:
        refreshToken: def502005346d9cc2bd79a7793ab5bdabfefcaabfbb8c253f14733f1262077e1a3f38c4751d6d20f590c3784e531a82adc11f05fc1949aa46d5575aaa99cb84b9334ba66ac773576b5d7a418937ae337de62811d086dd42ad1164b12f87d67be6ffea18f2d50be9b95697b21c4d3c4372849bdb2287259cb80541570e913691a08b2fa33c85885930de15cebea627fc09f0255562ab3d39d87d4ff8fc02b00e252afcd480421dec7de9d1411176bcf669c527762e22294b453bc9ea06e9fa8ba5b873feb2ee14ce0a6a6ddd4b78c580631e210e9b9387265dc2bec9478a66a09dcdce1c40d2f856689e9d81742c9628a0b87b359e0b218ea1f07427eef89f999e47af89792f598e05847bd008fddc32ee63f4a601ffb4cd2ad08977f1c854ec358238322c918f05aa5a41f8a171dee497218408abc8283473f6112aeed7310815416a0fa36c63667e0ed014fa40b8992891bf58bae400d901c01450101c88f4978938ad138adc19cfe5698d60fd82cb27c586f6a8f70f4393c7c9e579df8739d46d249fb76d7
    videos-list-response:
      title: Videos
      required:
        - data
        - pagination
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/video'
        pagination:
          $ref: '#/components/schemas/pagination'
    metadata:
      title: Metadata
      type: object
      properties:
        key:
          type: string
          description: The constant that defines the data set.
          example: Color
        value:
          type: string
          description: A variable which belongs to the data set.
          example: Green
      x-client-all-args-constructor: true
    video-creation-payload:
      title: VideoCreationPayload
      type: object
      example:
        title: Maths video
        description: An amazing video explaining string theory.
        public: false
        panoramic: false
        mp4Support: true
        playerId: pl45KFKdlddgk654dspkze
        language: en
        transcript: true
        transcriptSummary: true
        transcriptSummaryAttributes:
          - abstract
          - takeaways
        tags:
          - maths
          - string theory
          - video
        metadata:
          - key: Author
            value: John Doe
          - key: Format
            value: Tutorial
        watermark:
          id: watermark_1BWr2L5MTQwxGkuxKjzh6i
          bottom: 10px
          right: 10px
          width: 50%
          opacity: 70%
      properties:
        title:
          type: string
          description: The title of your new video.
          example: Maths video
        description:
          type: string
          description: A brief description of your video.
          example: A video about string theory.
        source:
          type: string
          description: 'You can either add a video already on the web, by entering the URL of the video, or you can also enter the `videoId` of one of the videos you already have on your api.video acccount, and this will generate a copy of your video. Creating a copy of a video can be especially useful if you want to keep your original video and trim or apply a watermark onto the copy you would create.'
          example: 'https://www.myvideo.url.com/video.mp4 OR vi4k0jvEUuaTdRAEjQ4JfOyl'
        public:
          type: boolean
          description: 'Default: True. If set to `false` the video will become private. More information on private videos can be found [here](https://docs.api.video/delivery/video-privacy-access-management)'
          example: true
          default: true
        panoramic:
          type: boolean
          description: Indicates if your video is a 360/immersive video.
          example: false
          default: false
        mp4Support:
          type: boolean
          description: Enables mp4 version in addition to streamed version.
          example: true
          default: true
        playerId:
          type: string
          description: The unique identification number for your video player.
          example: pl45KFKdlddgk654dspkze
        tags:
          type: array
          description: A list of tags you want to use to describe your video.
          example: '["maths", "string theory", "video"]'
          items:
            type: string
        metadata:
          type: array
          description: 'A list of key value pairs that you use to provide metadata for your video.'
          example: '[{"key": "Author", "value": "John Doe"}]'
          items:
            $ref: '#/components/schemas/metadata'
        clip:
          $ref: '#/components/schemas/video-clip'
        watermark:
          $ref: '#/components/schemas/video-watermark'
        language:
          type: string
          nullable: true
          enum: [ar, ca, cs, da, de, el, en, es, fa, fi, fr, he, hi, hr, hu, it, ja, ko, ml, nl, nn, no, pl, pt, ru, sk, sl, te, tr, uk, ur, vi, zh]
          example: fr
          description: |-
            Use this parameter to set the language of the video. When this parameter is set, the API creates a transcript of the video using the language you specify. You must use the [IETF language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.

            `language` is a permanent attribute of the video. You can update it to another language using the [`PATCH /videos/{videoId}`](https://docs.api.video/reference/api/Videos#update-a-video-object) operation. This triggers the API to generate a new transcript using a different language.
        transcript:
          type: boolean
          description: |-
            Use this parameter to enable transcription. 
            
            - When `true`, the API generates a transcript for the video.
            - The default value is `false`.
            - If you define a video language using the `language` parameter, the API uses that language to transcribe the video. If you do not define a language, the API detects it based on the video. 
            - When the API generates a transcript, it will be available as a caption for the video.
        transcriptSummary:
          type: boolean
          description: |-
            Use this parameter to enable summarization. We recommend using this parameter together with `transcript: true`.
            
            - When `true`, the API generates a summary for the video, based on the transcription.
            - The default value is `false`.
            - If you define a video language using the `language` parameter, the API uses that language to summarize the video. If you do not define a language, the API detects it based on the video.
        transcriptSummaryAttributes:
          description: Use this parameter to define the elements of a summary that you want to generate. If you do not define this parameter, the API generates a full summary with all attributes. The possible values are `abstract` and `takeaways`.
          type: array
          items:
            type: string
            enum: [abstract, takeaways]
      required:
        - title
    summary-creation-payload:
      required:
        - videoId
      type: object
      properties:
        videoId:
          type: string
          description: Create a summary of a video using the video ID.
          example: vi4k0jvEUuaTdRAEjQ4Jfrgz
        origin:
          type: string
          enum: [auto]
          description: |-
            Use this parameter to define how the API generates the summary. The only allowed value is `auto`, which means that the API generates a summary automatically.

            If you do not set this parameter, **the API will not generate a summary automatically**.

            In this case, `sourceStatus` will return `missing`, and you have to manually add a summary using the `PATCH /summaries/{summaryId}/source` endpoint operation.
          example: auto
        attributes:
          description: Use this parameter to define the elements of a summary that you want to generate. If you do not define this parameter, the API generates a full summary with all attributes. The possible values are `abstract` and `takeaways`.
          type: array
          items:
            type: string
            enum: [abstract, takeaways]
    summary-update-payload:
      type: object
      properties:
        abstract:
          type: string
          description: A short outline of the contents of the video.
          example: 'In this lecture, we discuss how complicated quantum theory is, using the famous example of Schrödingers cat. We also discuss practical applications like quantum computing.'
        takeaways:
          type: array
          description: A list of 3 key points from the video, in chronological order.
          maxItems: 3
          items:
            type: string
          example:
          - Quantum theory is complicated.
          - Schrödinger's cat is neither dead, nor alive.
          - Quantum computers are super cool.
    conflict-error:
      type: object
      properties:
          type:
            description: A link to the error documentation.
            type: string
          title:
            description: A description of the error that occurred.
            type: string
          name:
            description: The name of the parameter that caused the error.
            type: string
          status:
            description: The HTTP status code.
            type: integer
          detail:
            description:  A solution for the error.
            type: string
    summary-source:
      type: object
      properties:
        abstract:
          type: string
          description: A short outline of the contents of the video. The length of an `abstract` depends on the amount of content in a video that can be transcribed. The API condenses the contents into minimum 20, maximum 300 words.
          example: 'In this lecture, we discuss how complicated quantum theory is, using the famous example of Schrödingers cat. We also discuss practical applications like quantum computing.'
        takeaways:
          type: array
          description: A list of 3 key points from the video, in chronological order.
          maxItems: 3
          items:
            type: string
          example:
          - Quantum theory is complicated.
          - Schrödinger's cat is neither dead, nor alive.
          - Quantum computers are super cool.
    summaries-list-response:
      type: object
      title: Summaries
      properties:
        data:
          type: array
          description: An array of summary objects.
          items:
            $ref: '#/components/schemas/summary'
        pagination:
          $ref: '#/components/schemas/pagination'
      required:
        - data
        - pagination
    summary:
      type: object
      properties:        
        summaryId:
          type: string
          description: The unique identifier of the summary object.
          example: 'summary_1CGHWuXjhxmeH4WiZ51234'
        createdAt:
          description: Returns the date and time when the summary was created in ATOM date-time format.
          type: string
          format: date-time
          example: '2024-05-28T11:15:07+00:00'
        updatedAt:
          description: Returns the date and time when the summary was last updated in ATOM date-time format.
          type: string
          format: date-time
          example: '2024-05-28T11:15:07+00:00'
        videoId:
          type: string
          description: The unique identifier of the video object.
          example: 'vi4k0jvEUuaTdRAEjQ4Prklg'
        origin:
          type: string
          enum: 
            - api
            - auto
          description:  |-
            Returns the origin of how the summary was created.

            - `api` means that no summary was generated automatically. You can add summary manually using the `PATCH /summaries/{summaryId}/source` endpoint operation. Until this happens, `sourceStatus` returns `missing`.
            - `auto` means that the API generated the summary automatically.
        sourceStatus:
          type: string
          description: |-
            Returns the current status of summary generation.
            
            `missing`: the input for a summary is not present.
            `waiting` : the input video is being processed and a summary will be generated.
            `failed`: a technical issue prevented summary generation.
            `completed`: the summary is generated.
            `unprocessable`: the API rules the source video to be unsuitable for summary generation. An example for this is an input video that has no audio.
          enum: [missing, waiting, failed, completed, unprocessable]
    video-upload-payload:
      required:
        - file
      type: object
      properties:
        file:
          type: string
          description: 'The path to the video you would like to upload. The path must be local. If you want to use a video from an online source, you must use the "/videos" endpoint and add the "source" parameter when you create a new video.'
          format: binary
          x-client-chunk-upload: 'true'
          example: '@/path/to/video.mp4'
    video-thumbnail-pick-payload:
      title: ThumbnailPickPayload
      required:
        - timecode
      type: object
      properties:
        timecode:
          pattern: '\d{2}:\d{2}:\d{2}(\.\d{2})?'
          type: string
          description: |-
            Frame in video to be used as a placeholder before the video plays. 
            Example: '"00:01:00.000" for 1 minute into the video.'
            Valid Patterns: 
            "hh:mm:ss.ms"
            "hh:mm:ss:frameNumber"
            "124" (integer value is reported as seconds) 
            If selection is out of range, "00:00:00.00" will be chosen.
      example:
        timecode: '00:00:00.000'
    video-thumbnail-upload-payload:
      title: VideoThumbnailUploadPayload
      required:
        - file
      type: object
      properties:
        file:
          type: string
          description: 'The image to be added as a thumbnail. The mime type should be image/jpeg, image/png or image/webp. The max allowed size is 8 MiB.'
          format: binary
    video-update-payload:
      title: VideoUpdatePayload
      type: object
      properties:
        playerId:
          type: string
          x-optional-nullable: true
          description: The unique ID for the player you want to associate with your video.
          example: pl4k0jvEUuaTdRAEjQ4Jfrgz
        title:
          type: string
          description: The title you want to use for your video.
        description:
          type: string
          description: A brief description of the video.
          example: A film about good books.
        public:
          type: boolean
          description: 'Whether the video is publicly available or not. False means it is set to private. Default is true. Tutorials on [private videos](https://api.video/blog/endpoints/private-videos/).'
          example: true
        panoramic:
          type: boolean
          description: Whether the video is a 360 degree or immersive video.
          example: false
        mp4Support:
          type: boolean
          description: Whether the player supports the mp4 format.
          example: true
        tags:
          type: array
          description: A list of terms or words you want to tag the video with. Make sure the list includes all the tags you want as whatever you send in this list will overwrite the existing list for the video.
          example: '["maths", "string theory", "video"]'
          items:
            type: string
        metadata:
          type: array
          description: 'A list (array) of dictionaries where each dictionary contains a key value pair that describes the video. As with tags, you must send the complete list of metadata you want as whatever you send here will overwrite the existing metadata for the video.'
          items:
            $ref: '#/components/schemas/metadata'
        language:
          type: string
          nullable: true
          enum: [ar, ca, cs, da, de, el, en, es, fa, fi, fr, he, hi, hr, hu, it, ja, ko, ml, nl, nn, no, pl, pt, ru, sk, sl, te, tr, uk, ur, vi, zh]
          example: fr
          description: |-
            Use this parameter to set the language of the video. When this parameter is set, the API creates a transcript of the video using the language you specify. You must use the [IETF language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.

            `language` is a permanent attribute of the video. You can update it to another language using the [`PATCH /videos/{videoId}`](https://docs.api.video/reference/api/Videos#update-a-video-object) operation. This triggers the API to generate a new transcript using a different language.
        transcript:
          type: boolean
          description: |-
            Use this parameter to enable transcription. 
            
            - When `true`, the API generates a transcript for the video.
            - The default value is `false`.
            - If you define a video language using the `language` parameter, the API uses that language to transcribe the video. If you do not define a language, the API detects it based on the video. 
            - When the API generates a transcript, it will be available as a caption for the video.
        transcriptSummary:
          type: boolean
          description: |-
            Use this parameter to enable summarization. 
            
            - When `true`, the API generates a summary for the video, based on the transcription.
            - The default value is `false`.
            - If you define a video language using the `language` parameter, the API uses that language to summarize the video. If you do not define a language, the API detects it based on the video.
        transcriptSummaryAttributes:
          description: Use this parameter to define the elements of a summary that you want to generate. If you do not define this parameter, the API generates a full summary with all attributes. The possible values are `abstract` and `takeaways`.
          type: array
          items:
            type: string
            enum: [abstract, takeaways]
      example:
        playerId: pl45KFKdlddgk654dspkze
        title: String theory
        description: An amazing video explaining the string theory
        public: false
        language: 'en'
        transcript: true
        transcriptSummary: true
        transcriptSummaryAttributes:
          - abstract
          - takeaways
        panoramic: false
        mp4Support: true
        tags:
          - maths
          - string theory
          - video
        metadata:
          - key: Author
            value: John Doe
          - key: Format
            value: Tutorial
    discarded-video-update-payload:
      title: DiscardedVideoUpdatePayload
      type: object
      properties:
        discarded:
          description: Use this parameter to restore a discarded video when you have the Video Restore feature enabled. This parameter only accepts `false` as a value!
          type: boolean
      example:
        discarded: false
    token-list-response:
      title: UploadTokens
      required:
        - data
        - pagination
      type: object
      properties:
        data:
          title: uploadToken
          type: array
          items:
            $ref: '#/components/schemas/upload-token'
        pagination:
          $ref: '#/components/schemas/pagination'
    token-creation-payload:
      title: TokenCreationPayload
      type: object
      properties:
        ttl:
          maximum: 2147483647
          minimum: 0
          type: integer
          description: Time in seconds that the token will be active. A value of 0 means that the token has no exipration date. The default is to have no expiration.
          default: 0
      example:
        ttl: 3600
    token-upload-payload:
      title: tokenUploadPayload
      required:
        - file
      type: object
      properties:
        file:
          type: string
          description: The path to the video you want to upload.
          format: binary
          x-client-chunk-upload: 'true'
          example: path/to/video/video.mp4
        videoId:
          type: string
          description: The video id returned by the first call to this endpoint in a large video upload scenario.
          x-client-ignore: true
          x-client-copy-from-response: true
    live-stream-list-response:
      title: LiveStreams
      required:
        - data
        - pagination
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/live-stream'
        pagination:
          $ref: '#/components/schemas/pagination'
    live-stream-creation-payload:
      title: LiveStreamCreationPayload
      required:
        - name
      type: object
      properties:
        name:
          type: string
          description: Add a name for your live stream here.
          example: My Live Stream Video
        public:
          type: boolean
          description: 'Whether your video can be viewed by everyone, or requires authentication to see it. A setting of false will require a unique token for each view. Learn more about the Private Video feature [here](https://docs.api.video/delivery/video-privacy-access-management).'
        playerId:
          type: string
          description: The unique identifier for the player.
          example: pl4f4ferf5erfr5zed4fsdd
        restreams:
          description: Use this parameter to add, edit, or remove `RTMPS` or `RTMP` services where you want to restream a live stream. The list can only contain up to 5 destinations.
          maxItems: 5
          type: array
          items:
            $ref: '#/components/schemas/restreams-request-object'
      example:
        name: Test live
        playerId: pl4f4ferf5erfr5zed4fsdd
        restreams:
           - name: YouTube
             serverUrl: rtmp://youtube.broadcast.example.com
             streamKey: dw-dew8-q6w9-k67w-1ws8
           - name: Twitch
             serverUrl: rtmp://twitch.broadcast.example.com
             streamKey: dw-dew8-q6w9-k67w-1ws8
    live-stream-update-payload:
      title: LiveStreamUpdatePayload
      type: object
      properties:
        name:
          type: string
          description: The name you want to use for your live stream.
          example: My Live Stream Video
        public:
          type: boolean
          description: 'Whether your video can be viewed by everyone, or requires authentication to see it. A setting of false will require a unique token for each view. Learn more about the Private Video feature [here](https://docs.api.video/delivery/video-privacy-access-management).'
        playerId:
          type: string
          description: The unique ID for the player associated with a live stream that you want to update.
          example: pl45KFKdlddgk654dspkze
        restreams:
          description: Use this parameter to add, edit, or remove `RTMPS` or `RTMP` services where you want to restream a live stream. The list can only contain up to 5 destinations. This operation updates all restream destinations in the same request. If you do not want to modify an existing restream destination, you need to include it in your request, otherwise it is removed.
          maxItems: 5
          type: array
          items:
            $ref: '#/components/schemas/restreams-request-object'
    restreams-request-object:
      title: Restreams request object
      description: Adding restream destinations is optional. However, if you set a restream destination, you must provide all attributes for each destination.
      type: object
      required:
      - name
      - serverUrl
      - streamKey
      properties:
        name:
          description: Use this parameter to define a name for the restream destination.
          type: string
          example: My restream server
        serverUrl:
          description: Use this parameter to set the `RTMPS` or `RTMP` server URL of the restream destination.
          type: string
          example: rtmp://my.broadcast.example.com/app
        streamKey:
          description: Use this parameter to provide the unique key of the live stream that you want to restream.
          type: string
          example: dw-dew8-q6w9-k67w-1ws8
    restreams-response-object:
      title: Restreams response object
      type: object
      properties:
        name:
          description: Returns the name of a restream destination.
          type: string
          example: My restream server
        serverUrl:
          description: Returns the server URL of a restream destination.
          type: string
          example: rtmp://my.broadcast.example.com/app
        streamKey:
          description: Returns the unique key of the live stream that is set up for restreaming.
          type: string
          example: dw-dew8-q6w9-k67w-1ws8
    captions-upload-payload:
      title: CaptionsUploadPayload
      required:
        - file
      type: object
      properties:
        file:
          type: string
          description: The video text track (VTT) you want to upload.
          format: binary
    live-stream-thumbnail-upload-payload:
      title: LiveStreamThumbnailUploadPayload
      required:
        - file
      type: object
      properties:
        file:
          type: string
          description: 'The image to be added as a thumbnail. The mime type should be image/jpeg, image/png or image/webp. The max allowed size is 8 MiB.'
          format: binary
    captions-update-payload:
      title: CaptionsUpdatePayload
      type: object
      properties:
        default:
          description: Set this parameter to `true` to define a caption as the default for a video.
          type: boolean
    captions-list-response:
      title: VideoCaptions
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/caption'
        pagination:
          $ref: '#/components/schemas/pagination'
      required:
        - data
        - pagination
    chapters-update-payload:
      title: ChaptersUpdatePayload
      required:
        - file
      type: object
      properties:
        file:
          type: string
          description: The VTT file describing the chapters you want to upload.
          format: binary
    chapters-list-response:
      title: VideoChapters
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/chapter'
        pagination:
          $ref: '#/components/schemas/pagination'
      required:
        - data
        - pagination
    player-themes-list-response:
      title: PlayerThemes
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/player-theme'
        pagination:
          $ref: '#/components/schemas/pagination'
      required:
        - data
        - pagination
    player-theme-upload-logo-payload:
      title: PlayerThemeUploadLogoPayload
      required:
        - file
      type: object
      properties:
        file:
          type: string
          description: The name of the file you want to use for your logo.
          format: binary
          example: mylogo.jpg
        link:
          type: string
          format: string
          description: 'A public link that you want to advertise in your player. For example, you could add a link to your company. When a viewer clicks on your logo, they will be taken to this address.'
          example: 'https://my-company.com'
    analytics-plays-response:
      title: Play event analytics response
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/analytics-data'
        pagination:
          $ref: '#/components/schemas/pagination'
      required:
      - data
      - pagination
    analytics-data:
      title: Play event analytics data
      type: object
      properties:
        value:
          description: Shows a value for the property you have specified for `dimension` in your request. For example, if you requested `dimension=videoId`, each `value` field in the response returns a different videoId.
          type: string
          example: vi3q7HxhApxRF1c8F8r6VeaI
        plays:
          description: Shows the number of play events for one specific `value`.
          type: integer
          example: '100'
      required:
      - value
      - plays
    analytics-plays-400-error:
      type: object
      properties:
        type:
          description: A link to the error documentation.
          type: string
        title:
          description: A description of the error that occurred.
          type: string
        status:
          description: The HTTP status code.
          type: integer
        detail:
          description: A solution for the error.
          type: string
        name:
          description: The name of the parameter that caused the error.
          type: string
    analytics-aggregated-metrics-response:
      title: Analytics response for aggregated metrics
      type: object
      properties:
        context:
          type: object
          properties:
            metric:
              description: Returns the metric and relevant parameters you selected.
              type: string
              enum: 
                - play
                - start
                - end
                - impression
                - impression-time
                - watch-time
                - ccv
                - unique-ccv
                - view-3
                - view-5
                - view-10
                - view-30
                - unique-view
                - unique-view-3
                - unique-view-5
                - unique-view-10
                - unique-view-30
              example: impression
            aggregation:
              description: Returns the aggregation you selected.
              type: string
              enum:
                - count
                - rate
                - total
                - average
                - sum
              example: count
            timeframe:
              description: Returns the starting and ending date-times of the period you want analytics for.
              type: object
              properties:
                from:
                  description: Returns the starting date-time of the period you want analytics for in ATOM date-time format.
                  type: string
                  format: date-time
                  example: '2024-05-28T11:15:07+00:00'
                to:
                  description: Returns the starting date-time of the period you want analytics for in ATOM date-time format.
                  type: string
                  format: date-time
                  example: '2024-05-29T11:15:07+00:00'
        data:
          type: number
          format: float
          example: '356.2'
      required:
        - context
        - data
    analytics-metrics-breakdown-response:
      title: Analytics response for metrics breakdown by dimension
      type: object
      properties:
        context:
          type: object
          properties:
            metric:
              description: Returns the metric and relevant parameters you selected.
              type: string
              enum: 
                - play
                - play-rate
                - start
                - end
                - impression
                - ccv-average
                - ccv-peak
                - unique-ccv-average
                - unique-ccv-peak
                - view-3
                - view-5
                - view-10
                - view-30
                - unique-view
                - unique-view-3
                - unique-view-5
                - unique-view-10
                - unique-view-30
              example: impression
            breakdown:
              description: Returns the dimension you selected.
              type: string
              enum:
                - media-id
                - media-type
                - continent
                - country
                - device-type
                - operating-system
                - browser
              example: country
            timeframe:
              description: Returns the starting and ending date-times of the period you want analytics for.
              type: object
              properties:
                from:
                  description: Returns the starting date-time of the period you want analytics for in ATOM date-time format.
                  type: string
                  format: date-time
                  example: '2024-05-28T11:15:07+00:00'
                to:
                  description: Returns the starting date-time of the period you want analytics for in ATOM date-time format.
                  type: string
                  format: date-time
                  example: '2024-05-29T11:15:07+00:00'
        data:
          description: Returns an array of dimensions and their respective metrics.
          type: array
          items:            
            type: object
            properties:
              dimensionValue:
                description: Returns a specific value for the dimension you selected, based on the data. For example if you select `continent` as a dimension, then `dimensionValue` returns values like `EU` or "AZ".
                type: string
              metricValue:
                description: Returns the data for a specific dimension value.
                type: number
                format: float
        pagination:
          $ref: '#/components/schemas/pagination'
      required:
      - context
      - data
      - pagination
    analytics-metrics-over-time-response:
      title: Analytics response for metrics over time
      type: object
      properties:
        context:
          type: object
          properties:
            metric:
              description: Returns the metric and relevant parameters you selected.
              type: string
              enum: 
                - play
                - play-rate
                - start
                - end
                - impression
                - ccv-average
                - ccv-peak
                - unique-ccv-average
                - unique-ccv-peak
                - view-3
                - view-5
                - view-10
                - view-30
                - unique-view
                - unique-view-3
                - unique-view-5
                - unique-view-10
                - unique-view-30
              example: impression
            interval:
              description: Returns the interval you selected.
              type: string
              enum:
                - minute
                - hour
                - day
              example: day
            timeframe:
              description: Returns the starting and ending date-times of the period you want analytics for.
              type: object
              properties:
                from:
                  description: Returns the starting date-time of the period you want analytics for in ATOM date-time format.
                  type: string
                  format: date-time
                  example: '2024-05-28T11:15:07+00:00'
                to:
                  description: Returns the starting date-time of the period you want analytics for in ATOM date-time format.
                  type: string
                  format: date-time
                  example: '2024-05-29T11:15:07+00:00'
        data:
          description: Returns an array of metrics and the timestamps.
          type: array
          items:
            type: object
            properties:
              emittedAt:
                description: Returns the timestamp of the event that belongs to a specific metric in ATOM date-time format. For example, if you set `play` with an `hour` interval in your request, then `emittedAt` returns the hourly timestamps of every play event within the timeframe you defined.
                type: string
              metricValue:
                description: Returns the data for a specific metric value.
                type: number
                format: float
        pagination:
          $ref: '#/components/schemas/pagination'
      required:
      - context
      - data
      - pagination
    unrecognized-request-url:
      title: Unrecognized request URL
      type: object
      properties:
        type:
          description: A link to the error documentation.
          type: string
        title:
          description: A description of the error that occurred.
          type: string
        status:
          description: The HTTP status code.
          type: integer
    webhooks-list-response:
      title: Webhooks
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/webhook'
        pagination:
          $ref: '#/components/schemas/pagination'
      required:
        - data
        - pagination
    webhooks-creation-payload:
      title: WebhooksCreationPayload
      required:
        - events
        - url
      type: object
      properties:
        events:
          type: array
          description: |-
            An array of webhook events that you want to subscribe to.
          example:
            - video.encoding.quality.completed
          items:
            type: string
            enum: ['live-stream.broadcast.started', 'live-stream.broadcast.ended', 'video.source.recorded', 'video.encoding.quality.completed', 'video.caption.generated', 'video.summary.generated']
        url:
          type: string
          description: The the url to which HTTP notifications are sent. It could be any http or https URL.
          example: 'https://example.com/webhooks'
      example:
        events:
          - video.encoding.quality.completed
        url: 'http://clientnotificationserver.com/notif?myquery=query'
    pagination-link:
      title: PaginationLink
      type: object
      properties:
        rel:
          type: string
        uri:
          type: string
          format: uri
    video-watermark:
      type: object
      properties:
        id:
          type: string
          description: id of the watermark
          example: watermark_1BWr2L5MTQwxGkuxKjzh6i
        top:
          type: string
          description: Distance expressed in px or % between the top-border of the video and the watermark-image.
          example: 10px
        left:
          type: string
          description: Distance expressed in px or % between the left-border of the video and the watermark-image.
          example: 10px
        bottom:
          type: string
          description: Distance expressed in px or % between the bottom-border of the video and the watermark-image.
          example: 10px
        right:
          type: string
          description: Distance expressed in px or % between the right-border of the video and the watermark-image.
          example: 10px
        width:
          type: string
          description: 'Width of the watermark-image relative to the video if expressed in %. Otherwise a fixed width. NOTE: To keep intrinsic watermark-image width use `initial`.'
          example: initial
        height:
          type: string
          description: 'Height of the watermark-image relative to the video if expressed in %. Otherwise a fixed height. NOTE: To keep intrinsic watermark-image height use `initial`.'
          example: initial
        opacity:
          type: string
          description: Opacity expressed in % only to specify the degree of the watermark-image transparency with the video.
          example: 70%
    video-clip:
      type: object
      description: |-
        Use this object to create a smaller clip from a video you upload. 
        - You can only create video clips in the same request where you create the video container.
        - You cannot update the starting or ending timestamps of a video clip after you created the video container.
        - When you upload a video file into a container where you defined a starting and ending timestamp, the API trims the video according to those timestamps to create a clip.
      properties:
        startTimecode:
          type: string
          description: The timestamp that defines the beginning of the video clip you want to create. The value must follow the `HH:MM:SS` format.
          pattern: '^(?:\d{2,3}:[0-5]\d:[0-5]\d(?:\.\d{1,3}|\:\d{1,2})?|\d{1,7})$'
          example: 00:01:15
        endTimecode:
          type: string
          description: The timestamp that defines the end of the video clip you want to create. The value must follow the `HH:MM:SS` format.
          pattern: '^(?:\d{2,3}:[0-5]\d:[0-5]\d(?:\.\d{1,3}|\:\d{1,2})?|\d{1,7})$'
          example: 00:02:33
    video-source-live-stream-link:
      type: object
      properties:
        rel:
          type: string
        uri:
          type: string
    video-source-live-stream:
      type: object
      properties:
        liveStreamId:
          type: string
          description: The unique identifier for the live stream.
          example: li400mYKSgQ6xs7taUeSaEKr
        links:
          type: array
          items:
            $ref: '#/components/schemas/video-source-live-stream-link'
      description: This appears if the video is from a Live Record.
    video-source:
      title: VideoSource
      type: object
      properties:
        uri:
          type: string
          description: The URL where the video is stored.
          example: /videos/vi4k0jvEUuaTdRAEjQ4Prklg/source
        type:
          type: string
        liveStream:
          $ref: '#/components/schemas/video-source-live-stream'
      description: Source information about the video.
    video-assets:
      title: VideoAssets
      type: object
      properties:
        hls:
          type: string
          description: 'This is the manifest URL. For HTTP Live Streaming (HLS), when a HLS video stream is initiated, the first file to download is the manifest. This file has the extension M3U8, and provides the video player with information about the various bitrates available for streaming.'
          format: uri
        iframe:
          type: string
          description: Code to use video from a third party website
          example: <iframe src="//embed.api.video/c188ed58-3403-46a2-b91b-44603d10b2c9?token=831a9bd9-9f50-464c-a369-8e9d914371ae" width="100%" height="100%" frameborder="0" scrolling="no" allowfullscreen=""></iframe>
        player:
          type: string
          description: Raw url of the player.
          format: uri
          example: 'https://embed.api.video/1b9d6ae8-8f57-4b6d-8552-d636926b4f5f?token=831a9bd9-9f50-464c-a369-8e9d914371ae'
        thumbnail:
          type: string
          description: Poster of the video.
          format: uri
          example: 'https://cdn.api.video/stream/831a9bd9-9f50-464c-a369-8e9d914371ae/thumbnail.jpg'
        mp4:
          type: string
          description: Available only if mp4Support is enabled. Raw mp4 url.
          format: uri
          example: 'https://cdn.api.video/vod/vi4k0jvEUuaTdRAEjQ4Jfrgz/token/8fd70443-d9f0-45d2-b01c-12c8cfc707c9/mp4/source.mp4'
      description: Collection of details about the video object that you can use to work with the video object.
    live-stream-assets:
      title: LiveStreamAssets
      type: object
      properties:
        hls:
          type: string
          description: The http live streaming (HLS) link for your live video stream.
          format: uri
          example: 'https://live.api.video/li4pqNqGUkhKfWcBGpZVLRY5.m3u8'
        iframe:
          type: string
          description: The embed code for the iframe containing your live video stream.
          example: '<iframe src=\"https://embed.api.video/live/li4pqNqGUkhKfWcBGpZVLRY5\" width=\"100%\" height=\"100%\" frameborder=\"0\" scrolling=\"no\" allowfullscreen=\"\"></iframe>'
        player:
          type: string
          description: A link to the video player that is playing your live stream.
          format: uri
          example: 'https://embed.api.video/live/li400mYKSgQ6xs7taUeSaEKr'
        thumbnail:
          type: string
          description: A link to the thumbnail for your video.
          format: uri
          example: 'https://live.api.video/li400mYKSgQ6xs7taUeSaEKr/thumbnail.jpg'
    video-status-ingest:
      title: VideoStatusIngest
      type: object
      properties:
        status:
          type: string
          description:  |
            There are four possible statuses depending on how you provide a video file:
            - `uploading` - the API is gathering the video source file from an upload.
            - `uploaded` - the video file is fully uploaded.
            - `ingesting` - the API is gathering the video source file from either a URL, or from cloning.
            - `ingested` - the video file is fully stored.
          example: uploaded
          enum:
            - uploading
            - uploaded
            - ingesting
            - ingested
        filesize:
          type: integer
          description: The size of your file in bytes.
          nullable: true
          example: 200000
        receivedBytes:
          type: array
          description: 'The total number of bytes received, listed for each chunk of the upload.'
          items:
            $ref: '#/components/schemas/bytes-range'
        receivedParts:
          type: object
          properties:
            parts:
              type: array
              description: 'The parts that have been uploaded, ordered. For example, if part 2 was sent before part 1, and both have been uploaded, the output will be [1, 2].'
              example: '[1, 2, 3]'
              items:
                type: integer
            total:
              type: integer
              nullable: true
              description: Contains the number of expected parts. The total will be listed as "null" until the total number of parts is known.
              example: 3
      description: 'Details about the capturing, transferring, and storing of your video for use immediately or in the future.'
    video-status-encoding-metadata:
      title: VideoStatusEncodingMetadata
      type: object
      properties:
        width:
          type: integer
          description: The width of the video in pixels.
          nullable: true
        height:
          type: integer
          description: The height of the video in pixels.
          nullable: true
        bitrate:
          type: number
          description: The number of bits processed per second.
          nullable: true
        duration:
          type: integer
          description: The length of the video.
          nullable: true
        framerate:
          type: integer
          description: The frequency with which consecutive images or frames appear on a display. Shown in this API as frames per second (fps).
          nullable: true
          example: 60
        samplerate:
          type: integer
          description: 'How many samples per second a digital audio system uses to record an audio signal. The higher the rate, the higher the frequencies that can be recorded. They are presented in this API using hertz.'
          nullable: true
          example: 48000
        videoCodec:
          type: string
          description: 'The method used to compress and decompress digital video. API Video supports all codecs in the libavcodec library. '
          nullable: true
        audioCodec:
          type: string
          description: The method used to compress and decompress digital audio for your video.
          nullable: true
        aspectRatio:
          nullable: true
          type: string
    video-status-encoding:
      title: VideoStatusEncoding
      type: object
      properties:
        playable:
          type: boolean
          description: Whether the video is playable or not.
          example: true
        qualities:
          type: array
          description: Available qualities the video can be viewed in.
          items:
            $ref: '#/components/schemas/quality'
        metadata:
          $ref: '#/components/schemas/video-status-encoding-metadata'
  parameters:
    filterBy:
      name: filterBy
      description: |
          Use this parameter to filter the API's response based on different data dimensions. You can serialize filters in your query to receive more detailed breakdowns of your analytics.

          - If you do not set a value for `filterBy`, the API returns the full dataset for your project.
          - The API only accepts the `mediaId` and `mediaType` filters when you call `/data/metrics/play/total` or `/data/buckets/play-total/media-id`.
          
          These are the available breakdown dimensions:
          
          - `mediaId`: Returns analytics based on the unique identifiers of a video or a live stream.
          - `mediaType`: Returns analytics based on the type of content. Possible values: `video` and `live-stream`. 
          - `continent`: Returns analytics based on the viewers' continent. The list of supported continents names are based on the [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for example `EU`. Possible values are: `AS`, `AF`, `NA`, `SA`, `AN`, `EU`, `AZ`. 
          - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for example `FR`.
          - `deviceType`: Returns analytics based on the type of device used by the viewers. Response values can include: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`.
          - `operatingSystem`: Returns analytics based on the operating system used by the viewers. Response values can include `windows`, `mac osx`, `android`, `ios`, `linux`.
          - `browser`: Returns analytics based on the browser used by the viewers. Response values can include `chrome`, `firefox`, `edge`, `opera`.
          - `tag`: Returns analytics for videos using this tag. This filter only accepts a single value and is case sensitive. Read more about tagging your videos [here](https://docs.api.video/vod/tags-metadata).
          - `referrer`: Filters data based on the URL where the view is originating from. Accepts an empty string as a value to filter view events where no referrer is available.
      in: query
      required: false
      example: filterBy[country]=FR&filterBy[operatingSystem]=windows&filterBy[browser][]=firefox&filterBy[browser][]=chrome&filterBy[tag]=Cool videos
      style: deepObject
      x-is-deep-object: true
      explode: true
      schema:
        x-is-deep-object: true
        type: object
        properties:
          mediaId:
            type: array
            items:
              type: string
            description: Returns analytics based on the unique identifiers of a video or a live stream.
            example: ['vi4blUQJFrYWbaG44NChkH27']
          mediaType:
            type: string
            enum: [video, live-stream]
            example: video
          continent:
            type: array
            items:
              type: string
              enum: [AS, AF, NA, SA, AN, EU, AZ]
            description: Returns analytics based on the viewers' continent. The list of supported continents names are based on the [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for example `EU`.
            example: ['EU']
          country:
            description: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). You must use the ISO-3166 alpha2 format, for example `FR`.
            type: array
            items:
              type: string
            example: ['FR']
          deviceType:
            type: array
            items:
              type: string
            description: 'Returns analytics based on the type of device used by the viewers. Response values can include: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`.'
            example: ['computer']
          operatingSystem:
            type: array
            items:
              type: string
            description: Returns analytics based on the operating system used by the viewers. Response values can include `windows`, `mac osx`, `android`, `ios`, `linux`.
            example: ['windows']
          browser:
            description: Returns analytics based on the browser used by the viewers. Response values can include `chrome`, `firefox`, `edge`, `opera`.
            type: array
            items:
              type: string
            example: ['firefox']
          tag:
            type: string
            description: Returns analytics for videos using this tag. This filter only accepts a single value and is case sensitive. Read more about tagging your videos [here](https://docs.api.video/vod/tags-metadata).
            example: Cool videos
          referrer:
            type: array
            items:
              type: string
              format: uri
              maxLength: 2048
            description: |-
              Filters data based on the URL where the view is originating from. This filter parameter accepts an empty string to filter view events where no referrer is available.

              - The API filters for exact matches. Include the trailing `/` characters if needed.
              - The URLs you add must be URL encoded.
            example: ['https%3A%2F%2Fmy-awesome-videos.com']
    current-page:
      name: currentPage
      in: query
      description: 'Choose the number of search results to return per page. Minimum value: 1'
      required: false
      style: form
      explode: true
      schema:
        type: integer
        default: 1
      example: 2
    page-size:
      name: pageSize
      in: query
      description: 'Results per page. Allowed values 1-100, default is 25.'
      required: false
      style: form
      explode: true
      schema:
        type: integer
        default: 25
      example: 30
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
    apiKey:
      type: http
      scheme: basic
x-client-base-paths:
  production: 'https://ws.api.video'
  sandbox: 'https://sandbox.api.video'
x-doctave:
  explorer-enabled: true
  proxy-enabled: true
  samples-enabled: true
  samples-languages:
    - curl
    - go
    - node
    - php
    - python
x-webhooks:
  live-stream.broadcast.started:
    post:
      tags:
        - Webhooks
      summary: Live stream started
      description: This webhook triggers when a live stream broadcast is started.
      operationId: POST-webhooks
      parameters:
        - in: header
          name: X-Api-Video-WebhookID
          schema:
            type: string
          description: The unique ID of your webhook.
          required: true
        - in: header
          name: X-Api-Video-Signature
          schema:
            type: string
          description: The webhook's body encrypted using the webhook's signature secret, in HMAC SHA256. Use this hash to verify that api.video is the origin of this webhook notification.
          required: true
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                type:
                  type: string
                  description: The name of the webhook event that occurred.
                  example: live-stream.broadcast.started
                emittedAt:
                  description: Returns the date-time when the webhook event occurred.
                  type: string
                  format: date-time
                  example: '2024-08-151T10:18:47+00:00'
                liveStreamId:
                  description: The ID of the live stream that started broadcasting.
                  type: string
                  example: li400mYKSgQ6xs7taUeSaEap
      responses:
        '202':
          summary: Accepted
          description: Your webhook server may return this response to api.video to signal that the webhook is accepted.
  live-stream.broadcast.ended:
    post:
      tags:
        - Webhooks
      summary: Live stream ended
      description: This webhook triggers when a live stream broadcast is ended.
      operationId: POST-webhooks
      parameters:
        - in: header
          name: X-Api-Video-WebhookID
          schema:
            type: string
          description: The unique ID of your webhook.
          required: true
        - in: header
          name: X-Api-Video-Signature
          schema:
            type: string
          description: The webhook's body encrypted using the webhook's signature secret, in HMAC SHA256. Use this hash to verify that api.video is the origin of this webhook notification.
          required: true
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                type:
                  type: string
                  description: The name of the webhook event that occurred.
                  example: live-stream.broadcast.ended
                emittedAt:
                  description: Returns the date-time when the webhook event occurred.
                  type: string
                  format: date-time
                  example: '2024-08-151T10:18:47+00:00'
                liveStreamId:
                  description: The ID of the live stream that ended broadcasting.
                  type: string
                  example: li400mYKSgQ6xs7taUeSaEap
      responses:
        '202':
          summary: Accepted
          description: Your webhook server may return this response to api.video to signal that the webhook is accepted.
  video.source.recorded:
    post:
      tags:
        - Webhooks
      summary: Video source recorded
      description: This webhook triggers when a live stream broadcast is completed and the recording of the stream is ready for transcoding. This means that the video is in queue for transcoding.
      operationId: POST-webhooks
      parameters:
        - in: header
          name: X-Api-Video-WebhookID
          schema:
            type: string
          description: The unique ID of your webhook.
          required: true
        - in: header
          name: X-Api-Video-Signature
          schema:
            type: string
          description: The webhook's body encrypted using the webhook's signature secret, in HMAC SHA256. Use this hash to verify that api.video is the origin of this webhook notification.
          required: true
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                type:
                  type: string
                  description: The name of the webhook event that occurred.
                  example: video.source.recorded
                emittedAt:
                  description: Returns the date-time when the webhook event occurred.
                  type: string
                  format: date-time
                  example: '2024-08-151T10:18:47+00:00'
                liveStreamId:
                  description: The ID of the live stream that ended broadcasting.
                  type: string
                  example: li400mYKSgQ6xs7taUeSaEap
                videoId:
                  description: The video ID of the live stream recording.
                  type: string
                  example: vi4blUQJFrYWbaG44NChkH11
      responses:
        '202':
          summary: Accepted
          description: Your webhook server may return this response to api.video to signal that the webhook is accepted.
  video.encoding.quality.completed:
    post:
      tags:
        - Webhooks
      summary: Video encoding completed
      description: This webhook triggers when a new video is uploaded into your account, and all HLS and mp4 quality versions are encoded.
      operationId: POST-webhooks
      parameters:
        - in: header
          name: X-Api-Video-WebhookID
          schema:
            type: string
          description: The unique ID of your webhook.
          required: true
        - in: header
          name: X-Api-Video-Signature
          schema:
            type: string
          description: The webhook's body encrypted using the webhook's signature secret, in HMAC SHA256. Use this hash to verify that api.video is the origin of this webhook notification.
          required: true
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                type:
                  type: string
                  description: The name of the webhook event that occurred.
                  example: video.encoding.quality.completed
                emittedAt:
                  description: Returns the date-time when the webhook event occurred.
                  type: string
                  format: date-time
                  example: '2024-08-151T10:18:47+00:00'
                videoId:
                  description: The ID of the video where a certain quality version's encoding is finished.
                  type: string
                  example: vi4blUQJFrYWbaG44NChkH11
                encoding:
                  description: The type of encoding that is finished.
                  type: string
                  enum: [hls, mp4]
                  example: hls
                quality:
                  description: The quality version of encoding that is finished.
                  type: string
                  enum: [240p, 360p, 480p, 720p, 1080p]
                  example: 1080p
      responses:
        '202':
          summary: Accepted
          description: Your webhook server may return this response to api.video to signal that the webhook is accepted.
  video.caption.generated:
    post:
      tags:
        - Webhooks
      summary: Video caption generated
      description: This webhook triggers when the API finishes generating a caption for a video.
      operationId: POST-webhooks
      parameters:
        - in: header
          name: X-Api-Video-WebhookID
          schema:
            type: string
          description: The unique ID of your webhook.
          required: true
        - in: header
          name: X-Api-Video-Signature
          schema:
            type: string
          description: The webhook's body encrypted using the webhook's signature secret, in HMAC SHA256. Use this hash to verify that api.video is the origin of this webhook notification.
          required: true
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                type:
                  type: string
                  description: The name of the webhook event that occurred.
                  example: video.caption.generated
                emittedAt:
                  description: Returns the date-time when the webhook event occurred.
                  type: string
                  format: date-time
                  example: '2024-08-151T10:18:47+00:00'
                videoId:
                  description: The ID of the video for which the caption was generated.
                  type: string
                  example: vi4blUQJFrYWbaG44NCh1234
                captionId:
                  description: The ID of the caption that was generated.
                  type: string
                  example: caption_1CHAfLFHT5B5EV4vzT1234
                generationMode:
                  description: Returns the method used to generate the caption. `transcript` means that the caption was generated based on the transcription of the video. Learn more about transcripts [here](https://docs.api.video/vod/generate-transcripts).
                  type: string
                  enum: [transcript]
                  example: transcript
                language:
                  description: Returns the language of the captions in [IETF language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.
                  example: en
                  type: string
                  enum: [ar, ca, cs, da, de, el, en, es, fa, fi, fr, he, hi, hr, hu, it, ja, ko, ml, nl, nn, no, pl, pt, ru, sk, sl, te, tr, uk, ur, vi, zh]
      responses:
        '202':
          summary: Accepted
          description: Your webhook server may return this response to api.video to signal that the webhook is accepted.
  video.summary.generated:
    post:
      tags:
        - Webhooks
      summary: Video summary generated
      description: This webhook triggers when the API finishes generating a summary for a video.
      operationId: POST-webhooks
      parameters:
        - in: header
          name: X-Api-Video-WebhookID
          schema:
            type: string
          description: The unique ID of your webhook.
          required: true
        - in: header
          name: X-Api-Video-Signature
          schema:
            type: string
          description: The webhook's body encrypted using the webhook's signature secret, in HMAC SHA256. Use this hash to verify that api.video is the origin of this webhook notification.
          required: true
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                type:
                  type: string
                  description: The name of the webhook event that occurred.
                  example: video.summary.generated
                emittedAt:
                  description: Returns the date-time when the webhook event occurred.
                  type: string
                  format: date-time
                  example: '2024-08-151T10:18:47+00:00'
                videoId:
                  description: The ID of the video for which the summary was generated.
                  type: string
                  example: vi4blUQJFrYWbaG44NCh1234
                summaryId:
                  description: The ID of the summary that was generated.
                  type: string
                  example: summary_1CGyYoB9XCgBk4iQna8ocT
      responses:
        '202':
          summary: Accepted
          description: Your webhook server may return this response to api.video to signal that the webhook is accepted.