POST
/
tags
JavaScript
import Codeqr from '@codeqr/ts';

const client = new Codeqr({
  apiKey: 'My API Key',
});

const tag = await client.tags.create({ tag: 'x' });

console.log(tag.id);
{
  "id": "<string>",
  "name": "<string>",
  "color": "red"
}

Authorizations

Authorization
string
header
required

Default authentication mechanism

Body

application/json
tag
string
required

The name of the tag to create.

Minimum length: 1
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

Response

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