POST
/
tags
require 'dub'


s = ::OpenApiSDK::Dub.new
s.config_security(
  ::OpenApiSDK::Shared::Security.new(
    token: "DUB_API_KEY",
  )
)


req = ::OpenApiSDK::Operations::CreateTagRequestBody.new()
    
res = s.tags.create(req)

if ! res.tag_schema.nil?
  # handle response
end
{
  "id": "<string>",
  "name": "<string>",
  "color": "red"
}

Authorizations

Authorization
string
header
required

Default authentication mechanism

Body

application/json
name
string

The name of the tag to create.

Required string length: 1 - 50
color
enum<string>

The color of the tag. If not provided, a random color will be used from the list: red, yellow, green, blue, purple, pink, brown.

Available options:
red,
yellow,
green,
blue,
purple,
pink,
brown
tag
string
deprecated

The name of the tag to create.

Minimum length: 1

Response

201
application/json
The created tag
id
string
required

The unique ID of the tag.

name
string
required

The name of the tag.

color
enum<string>
required

The color of the tag.

Available options:
red,
yellow,
green,
blue,
purple,
pink,
brown