Skip to main content
PATCH
/
tag
/
:id
Update tag
curl --request PATCH \
  --url https://api.h0p.co/tag/:id \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "name": "social-media-2024",
  "color": "#8B5CF6"
}
'
{
  "id": "01933eb8-541f-7000-a9f4-e4eee80ff04e",
  "organizationId": "01933eb8-541f-7000-a9f4-e4eee80ff04e",
  "name": "social-media",
  "color": "#10B981",
  "createdAt": "2024-01-15T10:30:00Z",
  "updatedAt": "2024-01-16T14:20:00Z"
}

Authorizations

x-api-key
string
header
required

API Key authentication for programmatic access.

How to use:

  1. Create an API key from your dashboard settings
  2. Include the key in the x-api-key header with each request
  3. API keys have granular permissions (domains, shortLinks, files, stats, apiKeys)

Example:

curl -H "x-api-key: your-api-key-here" https://api.h0p.co/short-link/list

Types of API keys:

  • User keys: Linked to your user account (one per organization)
  • Bot keys: Autonomous machine users (one per organization)

Security notes:

  • Keep your API keys secure and never commit them to version control
  • API keys cannot access authentication endpoints (/auth/*)
  • Keys can be revoked at any time from the dashboard

Path Parameters

id
string<uuid>
required

Unique identifier in UUID v7 format

Example:

"01933eb8-541f-7000-a9f4-e4eee80ff04e"

Body

application/json

Fields to update (partial update supported)

Tag update request

name
string

New tag name

Required string length: 1 - 30
Example:

"social-media-2024"

color
string

New tag color (hex)

Pattern: ^#[0-9A-Fa-f]{6}$
Example:

"#8B5CF6"

Response

Tag successfully retrieved

Complete tag object

id
string<uuid>
required

Tag UUID

Example:

"01933eb8-541f-7000-a9f4-e4eee80ff04e"

organizationId
string<uuid>
required

Organization UUID

Example:

"01933eb8-541f-7000-a9f4-e4eee80ff04e"

name
string
required

Tag name

Required string length: 1 - 30
Example:

"social-media"

color
string | null
required

Tag color (hex)

Pattern: ^#[0-9A-Fa-f]{6}$
Example:

"#10B981"

createdAt
string<date-time>
required

Creation timestamp

Example:

"2024-01-15T10:30:00Z"

updatedAt
string<date-time>
required

Last update timestamp

Example:

"2024-01-16T14:20:00Z"