Attributes

Attributes are key-value pairs hanging off an organization. They hold whatever business data belongs with a customer record, subscription tier, external system ids, feature flags, without anyone extending the core schema for it.

Groups carry attributes too, with the same shape and the same upsert semantics, under /groups/{group_id}/attributes.

Attribute endpoints

MethodEndpointDescription
GET/realms/{realm_name}/organizations/{organization_id}/attributesList all attributes for an organization
PUT/realms/{realm_name}/organizations/{organization_id}/attributes/{key}Upsert an attribute by key
DELETE/realms/{realm_name}/organizations/{organization_id}/attributes/{key}Delete an attribute by key

Upsert semantics

PUT upserts by key. An existing key has its value overwritten; a new key is created. There is no separate create endpoint.

{
  "value": "enterprise"
}

Both key and value are required. An empty or missing value is rejected.

Attribute fields

FieldTypeConstraintsDescription
idUUID v7generatedIdentifier
organization_idUUIDgeneratedThe organization this attribute belongs to
keyString1 to 255 characters, requiredAttribute name
valueStringrequiredAttribute value
created_atDateTime (UTC)generatedSet on the first upsert, and left alone on overwrites

Several attributes at once

A typical organization might carry several attributes:

[
  {
    "id": "01936b2e-aaaa-7000-abcd-000000000001",
    "organization_id": "01936b2e-1234-7000-abcd-000000000001",
    "key": "plan",
    "value": "enterprise",
    "created_at": "2026-01-15T09:00:00Z"
  },
  {
    "id": "01936b2e-bbbb-7000-abcd-000000000002",
    "organization_id": "01936b2e-1234-7000-abcd-000000000001",
    "key": "stripe_customer_id",
    "value": "cus_Qx8mN2kLpR4t",
    "created_at": "2026-01-15T09:01:00Z"
  },
  {
    "id": "01936b2e-cccc-7000-abcd-000000000003",
    "organization_id": "01936b2e-1234-7000-abcd-000000000001",
    "key": "feature_advanced_reporting",
    "value": "true",
    "created_at": "2026-03-01T14:30:00Z"
  }
]

Real-World Uses

Key patternExample valueUse case
planfree, pro, enterpriseGate features by subscription tier
stripe_customer_idcus_Qx8mN2kLpR4tLink to billing provider
salesforce_account_id001Dn00000KjlHSIAZLink to CRM record
feature_<name>true / falsePer-org feature flags
max_seats50Enforce seat limits in application logic
onboarded_at2026-01-15Track onboarding completion

Values are always strings

Attributes store strings only. Numeric values (50), booleans (true), and dates (2026-01-15) are stored as their string representations. Your application is responsible for parsing them back to the appropriate type.