Skip to content

Labels

The Labels API enables you to categorize and organize resources such as apps, groups, entitlements, and collections. You can create, update, and assign key-value labels to resources to support automation, streamline configuration, and simplify the management of access reviews and requests.

Create a label

Request

OAuth 2.0 scope:
  • okta.governance.labels.manage
Admin roles:
  • SUPER_ADMIN

Creates a label that includes the key name of the label and its values

Bodyapplication/jsonrequired
namestring, [ 1 .. 50 ] charactersrequired

Key name of the label

valuesArray of objects, <= 10 items(label-value-create)required

List of label values

POST
/governance/api/v1/labels
curl -i -X POST \
  https://okta-subdomain.pixtulate.com/governance/api/v1/labels \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "Compliance",
    "values": [
      {
        "name": "SOX",
        "metadata": {
          "additionalProperties": {
            "backgroundColor": "blue"
          }
        }
      },
      {
        "name": "PII",
        "metadata": {
          "additionalProperties": {
            "backgroundColor": "yellow"
          }
        }
      }
    ]
  }'

Responses

Resource label created successfully

Headers
X-Rate-Limit-Limitinteger, >= 1required

The rate-limit ceiling for the current request

Example:60
X-Rate-Limit-Remaininginteger, >= 0required

The number of requests left for the current rate-limit window

Example:60
X-Rate-Limit-Resetinteger, >= 0required

The time when the rate limit resets, specified in UTC epoch time (in seconds)

Example:1609459200
Bodyapplication/json
labelIdstring, = 20 characters(label-id)required

The ID of a label

namestring, [ 1 .. 50 ] charactersrequired

Key name of the label

valuesArray of objects, <= 10 items(label-value)required

List of label values

Response
{ "labelId": "lbco3v6xlwdtEX2il1d6", "name": "Compliance", "values": [ {}, {} ], "_links": { "self": {} } }