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

require 'vendor/autoload.php';

use Dub;
use Dub\Models\Operations;

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

$request = new Operations\GetTagsRequest(
    page: 1,
    pageSize: 50,
);

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

if ($response->linkTagSchemaOutputs !== 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

Query Parameters

sortBy
enum<string>
default:name

The field to sort the tags by.

Available options:
name,
createdAt
sortOrder
enum<string>
default:asc

The order to sort the tags by.

Available options:
asc,
desc

The search term to filter the tags by.

ids

IDs of tags to filter by.

page
number

The page number for pagination.

Required range: x > 0
Example:

1

pageSize
number
default:100

The number of items per page.

Required range: 0 < x <= 100
Example:

50

Response

A list of tags

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