Tags
Tags are tenant-scoped labels you can attach to components, journeys, and pages. Use them to group related items (e.g. "high-touch", "experiment-2026-q4") so list views, the agent API, and ad-hoc searches all share one taxonomy.
The agent API exposes only the catalog of tags. Attaching and detaching tags from individual entities is done through the in-app UI today — we'll add v1 endpoints for that in a future release.
Listing and reading tags requires the read scope; creating, updating, and deleting tags requires the admin scope.
Endpoints
GET /api/v1/tags
Scoped secret API key — send an sk_live_… value (keys issued before the typed format carry a bare pk_<hex> prefix and are also secret; they still work). A publishable pk_live_…/pk_test_… key is browser-safe, carries no scopes, and is refused by every endpoint in this spec with publishable_key_not_allowed. Coarse scopes: read, commerce, admin (admin covers everything below). Narrow per-resource scopes: journeys|pages :read|write|publish|delete, productsets :read|write|publish|delete, components|rules :read|write|delete, context :read (read-only context tier), catalog :read|write-native. publish is never implied by write.
Max items to return (1–100, default 20)
20Number of items to skip (default 0)
0Paginated list of tags
API key missing or invalid
GET /api/v1/tags HTTP/1.1
Host: api.peakcommerce.app
X-API-Key: YOUR_API_KEY
Accept: */*
{
"data": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "text",
"slug": "text",
"description": "text",
"color": "text",
"isActive": true,
"createdAt": "2026-01-01T00:00:00.000Z",
"updatedAt": "2026-01-01T00:00:00.000Z"
}
],
"pagination": {
"total": 1,
"limit": 1,
"offset": 1,
"hasMore": true
},
"requestId": "text"
}Notes, examples, or caveats for GET /tags go here.
POST /api/v1/tags
Scoped secret API key — send an sk_live_… value (keys issued before the typed format carry a bare pk_<hex> prefix and are also secret; they still work). A publishable pk_live_…/pk_test_… key is browser-safe, carries no scopes, and is refused by every endpoint in this spec with publishable_key_not_allowed. Coarse scopes: read, commerce, admin (admin covers everything below). Narrow per-resource scopes: journeys|pages :read|write|publish|delete, productsets :read|write|publish|delete, components|rules :read|write|delete, context :read (read-only context tier), catalog :read|write-native. publish is never implied by write.
Lowercase alphanumeric with hyphens. Derived from name when omitted.
^[a-z0-9]+(?:-[a-z0-9]+)*$Hex color in #RRGGBB form
^#[0-9a-fA-F]{6}$Tag created
A tenant-scoped taxonomy tag. Slugs are unique per tenant.
Lowercase alphanumeric with hyphens, unique within the tenant
Hex color in #RRGGBB form
Validation error
A tag with that slug already exists (slug_conflict)
POST /api/v1/tags HTTP/1.1
Host: api.peakcommerce.app
X-API-Key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 81
{
"name": "text",
"slug": "text",
"description": "text",
"color": "text",
"isActive": true
}{
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "text",
"slug": "text",
"description": "text",
"color": "text",
"isActive": true,
"createdAt": "2026-01-01T00:00:00.000Z",
"updatedAt": "2026-01-01T00:00:00.000Z"
}Notes, examples, or caveats for POST /tags go here.
DELETE /api/v1/tags/{id}
Delete a tag. Tags still assigned to items are protected — pass ?force=1 to delete anyway and drop the assignments.
Scoped secret API key — send an sk_live_… value (keys issued before the typed format carry a bare pk_<hex> prefix and are also secret; they still work). A publishable pk_live_…/pk_test_… key is browser-safe, carries no scopes, and is refused by every endpoint in this spec with publishable_key_not_allowed. Coarse scopes: read, commerce, admin (admin covers everything below). Narrow per-resource scopes: journeys|pages :read|write|publish|delete, productsets :read|write|publish|delete, components|rules :read|write|delete, context :read (read-only context tier), catalog :read|write-native. publish is never implied by write.
Tag ID
Pass 1 to delete a tag that is still in use
Tag deleted
No content
Tag not found
Tag is still assigned to items (tag_in_use) — retry with ?force=1
DELETE /api/v1/tags/{id} HTTP/1.1
Host: api.peakcommerce.app
X-API-Key: YOUR_API_KEY
Accept: */*
No content
Notes, examples, or caveats for DELETE /tags/{id} go here.
GET /api/v1/tags/{id}
Scoped secret API key — send an sk_live_… value (keys issued before the typed format carry a bare pk_<hex> prefix and are also secret; they still work). A publishable pk_live_…/pk_test_… key is browser-safe, carries no scopes, and is refused by every endpoint in this spec with publishable_key_not_allowed. Coarse scopes: read, commerce, admin (admin covers everything below). Narrow per-resource scopes: journeys|pages :read|write|publish|delete, productsets :read|write|publish|delete, components|rules :read|write|delete, context :read (read-only context tier), catalog :read|write-native. publish is never implied by write.
Tag ID
Tag details
A tenant-scoped taxonomy tag. Slugs are unique per tenant.
Lowercase alphanumeric with hyphens, unique within the tenant
Hex color in #RRGGBB form
Tag not found
GET /api/v1/tags/{id} HTTP/1.1
Host: api.peakcommerce.app
X-API-Key: YOUR_API_KEY
Accept: */*
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "text",
"slug": "text",
"description": "text",
"color": "text",
"isActive": true,
"createdAt": "2026-01-01T00:00:00.000Z",
"updatedAt": "2026-01-01T00:00:00.000Z"
}Notes, examples, or caveats for GET /tags/{id} go here.
PATCH /api/v1/tags/{id}
Update a tag (partial update). Changing the slug is rejected if it collides with another tag.
Scoped secret API key — send an sk_live_… value (keys issued before the typed format carry a bare pk_<hex> prefix and are also secret; they still work). A publishable pk_live_…/pk_test_… key is browser-safe, carries no scopes, and is refused by every endpoint in this spec with publishable_key_not_allowed. Coarse scopes: read, commerce, admin (admin covers everything below). Narrow per-resource scopes: journeys|pages :read|write|publish|delete, productsets :read|write|publish|delete, components|rules :read|write|delete, context :read (read-only context tier), catalog :read|write-native. publish is never implied by write.
Tag ID
^[a-z0-9]+(?:-[a-z0-9]+)*$^#[0-9a-fA-F]{6}$Tag updated
A tenant-scoped taxonomy tag. Slugs are unique per tenant.
Lowercase alphanumeric with hyphens, unique within the tenant
Hex color in #RRGGBB form
Validation error
Tag not found
A tag with that slug already exists (slug_conflict)
PATCH /api/v1/tags/{id} HTTP/1.1
Host: api.peakcommerce.app
X-API-Key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 81
{
"name": "text",
"slug": "text",
"description": "text",
"color": "text",
"isActive": true
}{
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "text",
"slug": "text",
"description": "text",
"color": "text",
"isActive": true,
"createdAt": "2026-01-01T00:00:00.000Z",
"updatedAt": "2026-01-01T00:00:00.000Z"
}Notes, examples, or caveats for PATCH /tags/{id} go here.
Last updated
Was this helpful?
