Sign up for free

Watermarks

get

List all watermarks

List all watermarks associated with your workspace.

sortBystring

Allowed: createdAt. You can search by the time watermark were created at.

Example
"createdAt"
sortOrderstring

Allowed: asc, desc. asc is ascending and sorts from A to Z. desc is descending and sorts from Z to A.

Example
"asc"
currentPageint

Choose the number of search results to return per page. Minimum value: 1

Default
1
Example
2
pageSizeint

Results per page. Allowed values 1-100, default is 25.

Default
25
Example
30

Responses

Request examples

// 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

Response examples

Success

{
  "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"
      }
    ]
  }
}
post

Upload a watermark

Create a new watermark by uploading a JPG or a PNG image.

filefile

required

The .jpg or .png image to be added as a watermark.

Responses

Request examples

// 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)
}

Response examples

Success

{
  "watermarkId": "watermark_1BWr2L5MTQwxGkuxKjzh6i",
  "createdAt": "2020-03-03T12:52:03+00:00"
}
delete

Delete a watermark

Delete a watermark.

watermarkIdstring

required

The watermark ID for the watermark you want to delete.

Example
"watermark_1BWr2L5MTQwxGkuxKjzh6i"

Responses

Request examples

// 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);

Response examples

No Content

Empty response

Was this page helpful?