Skip to main content
POST
Create a label

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
name
string
initialVersionText
string
description
string

Optional description for the initial version.

disabled
boolean

Optional: initial disabled state (default false).

labelEvalOptions
object

LabelEvalOptions are options that can be set per-label to control evaluation behavior. Field numbers/types intentionally mirror PolicyEvalOptions for parity.

globalContext
string

Optional global context to store on the initial label version.

Response

A successful response.

valid
boolean
error
object
label
object

Label is a first-class, referenceable label entity (V2). Labels can be policy-scoped (policy_id set) or independent (policy_id empty). Policy-scoped labels are uniquely identified by (customer_id, name, policy_id). Independent labels are uniquely identified by (customer_id, name).

labelVersion
object

LabelVersion is an immutable snapshot of a label's DSL + compiled representation.