Skip to main content
POST
Create a label

Authorizations

Authorization
string
header
required

A ZeroGen API key: zg_ for a live key, zg_test_ for a test key.

Headers

Idempotency-Key
string

Makes retries safe: a retry with the same key and body returns the first response for 24 hours instead of repeating the work. Reusing a key with a different body returns 409.

Required string length: 1 - 255
Pattern: ^[\x21-\x7e]+$

Body

application/json
name
string
required
Required string length: 1 - 40
description
string
Maximum string length: 280
color
enum<string>

One of the preset colors: Red #ef4444, Orange #f97316, Amber #f59e0b, Yellow #eab308, Lime #84cc16, Green #22c55e, Teal #14b8a6, Cyan #06b6d4, Blue #3b82f6, Indigo #6366f1, Violet #8b5cf6, Pink #ec4899.

Available options:
#ef4444,
#f97316,
#f59e0b,
#eab308,
#84cc16,
#22c55e,
#14b8a6,
#06b6d4,
#3b82f6,
#6366f1,
#8b5cf6,
#ec4899

Response

The new label.

id
string
required
name
string
required
description
string | null
required
color
string
required
archived
boolean
required
assetCount
integer
Required range: 0 <= x <= 9007199254740991