Skip to main content
POST
/
tags
PHP
declare(strict_types=1);

require 'vendor/autoload.php';

use Dub;

$sdk = Dub\Dub::builder()
    ->setSecurity(
        'DUB_API_KEY'
    )
    ->build();



$response = $sdk->tags->create(
    request: $request
);

if ($response->linkTagSchemaOutput !== null) {
    // handle response
}
{
  "id": "<string>",
  "name": "<string>"
}

Documentation Index

Fetch the complete documentation index at: https://dub.co/llms.txt

Use this file to discover all available pages before exploring further.

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, brown, gray.

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

The name of the tag to create.

Minimum string length: 1

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,
brown,
gray,
pink