Skip to main content
PATCH
/
tags
/
{id}
Python
from dub import Dub


with Dub(
    token="DUB_API_KEY",
) as d_client:

    res = d_client.tags.update(id="<id>")

    # Handle response
    print(res)
declare(strict_types=1);

require 'vendor/autoload.php';

use Dub;

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



$response = $sdk->tags->update(
id: '<id>',
requestBody: $requestBody

);

if ($response->linkTagSchema !== null) {
// handle response
}
package main

import(
"context"
dubgo "github.com/dubinc/dub-go"
"log"
)

func main() {
ctx := context.Background()

s := dubgo.New(
dubgo.WithSecurity("DUB_API_KEY"),
)

res, err := s.Tags.Update(ctx, "<id>", nil)
if err != nil {
log.Fatal(err)
}
if res != nil {
// handle response
}
}
require 'dub'

Models = ::OpenApiSDK::Models
s = ::OpenApiSDK::Dub.new(
security: Models::Shared::Security.new(
token: 'DUB_API_KEY',
),
)

res = s.tags.update(id: '<id>')

unless res.nil?
# handle response
end
import { Dub } from "dub";

const dub = new Dub({
token: "DUB_API_KEY",
});

async function run() {
const result = await dub.tags.update("<id>");

console.log(result);
}

run();
curl --request PATCH \
--url https://api.dub.co/tags/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"tag": "<string>"
}
'
const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', tag: '<string>'})
};

fetch('https://api.dub.co/tags/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
HttpResponse<String> response = Unirest.patch("https://api.dub.co/tags/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"tag\": \"<string>\"\n}")
.asString();
{
  "id": "<string>",
  "name": "<string>"
}
{
"error": {
"code": "bad_request",
"message": "The requested resource was not found.",
"doc_url": "https://dub.co/docs/api-reference/errors#bad-request"
}
}
{
"error": {
"code": "unauthorized",
"message": "The requested resource was not found.",
"doc_url": "https://dub.co/docs/api-reference/errors#unauthorized"
}
}
{
"error": {
"code": "forbidden",
"message": "The requested resource was not found.",
"doc_url": "https://dub.co/docs/api-reference/errors#forbidden"
}
}
{
"error": {
"code": "not_found",
"message": "The requested resource was not found.",
"doc_url": "https://dub.co/docs/api-reference/errors#not-found"
}
}
{
"error": {
"code": "conflict",
"message": "The requested resource was not found.",
"doc_url": "https://dub.co/docs/api-reference/errors#conflict"
}
}
{
"error": {
"code": "invite_expired",
"message": "The requested resource was not found.",
"doc_url": "https://dub.co/docs/api-reference/errors#invite-expired"
}
}
{
"error": {
"code": "unprocessable_entity",
"message": "The requested resource was not found.",
"doc_url": "https://dub.co/docs/api-reference/errors#unprocessable-entity"
}
}
{
"error": {
"code": "rate_limit_exceeded",
"message": "The requested resource was not found.",
"doc_url": "https://dub.co/docs/api-reference/errors#rate-limit_exceeded"
}
}
{
"error": {
"code": "internal_server_error",
"message": "The requested resource was not found.",
"doc_url": "https://dub.co/docs/api-reference/errors#internal-server_error"
}
}

Authorizations

Authorization
string
header
required

Default authentication mechanism

Path Parameters

id
string
required

The ID of the tag to update.

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.

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

The name of the tag to create.

Minimum string length: 1

Response

The updated 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,
pink