Custom Attributes API
Reference for the Custom Attributes endpoint group — 5 endpoints.
Generated from the live OpenAPI spec. Re-run _generate_api_reference.py after backend changes.
Authentication#
All endpoints require a Bearer JWT in the Authorization header unless noted otherwise. See Concepts → Tokens and scopes and Reference → OAuth endpoints for how to obtain one.
Endpoints#
GET /api/v1/tenants/{tenant_id}/attributes#
List Attributes
List custom attribute definitions for the tenant.
Parameters:
| Name | In | Required | Type | Description |
|---|---|---|---|---|
tenant_id |
path | yes | string |
|
page |
query | no | integer |
|
per_page |
query | no | integer |
|
entity_type |
query | no | string | null |
Responses:
| Status | Body |
|---|---|
200 |
application/json → PaginatedResponse_CustomAttributeResponse_ |
422 |
application/json → HTTPValidationError |
POST /api/v1/tenants/{tenant_id}/attributes#
Create Attribute
Create a new custom attribute definition.
Parameters:
| Name | In | Required | Type | Description |
|---|---|---|---|---|
tenant_id |
path | yes | string |
Request body:
Required.
application/json→CustomAttributeCreate
Responses:
| Status | Body |
|---|---|
201 |
application/json → ApiResponse_CustomAttributeResponse_ |
422 |
application/json → HTTPValidationError |
DELETE /api/v1/tenants/{tenant_id}/attributes/{attribute_id}#
Delete Attribute
Delete a custom attribute definition.
Note: This will NOT delete actual attribute values from entities. Those values will become orphaned and can be cleaned up separately.
Parameters:
| Name | In | Required | Type | Description |
|---|---|---|---|---|
tenant_id |
path | yes | string |
|
attribute_id |
path | yes | string |
Responses:
| Status | Body |
|---|---|
204 |
Successful Response |
422 |
application/json → HTTPValidationError |
GET /api/v1/tenants/{tenant_id}/attributes/{attribute_id}#
Get Attribute
Get a custom attribute definition by ID.
Parameters:
| Name | In | Required | Type | Description |
|---|---|---|---|---|
tenant_id |
path | yes | string |
|
attribute_id |
path | yes | string |
Responses:
| Status | Body |
|---|---|
200 |
application/json → ApiResponse_CustomAttributeResponse_ |
422 |
application/json → HTTPValidationError |
PATCH /api/v1/tenants/{tenant_id}/attributes/{attribute_id}#
Update Attribute
Update a custom attribute definition.
Parameters:
| Name | In | Required | Type | Description |
|---|---|---|---|---|
tenant_id |
path | yes | string |
|
attribute_id |
path | yes | string |
Request body:
Required.
application/json→CustomAttributeUpdate
Responses:
| Status | Body |
|---|---|
200 |
application/json → ApiResponse_CustomAttributeResponse_ |
422 |
application/json → HTTPValidationError |
Schemas#
Definitions for every type referenced by the endpoints above. Schema-to-schema references on this page link within the page; cross-page references would require visiting the linked page.
ApiResponse_CustomAttributeResponse_#
| Field | Type | Required | Description |
|---|---|---|---|
data |
CustomAttributeResponse |
yes | |
meta |
MetaResponse |
no |
CustomAttributeCreate#
Schema for creating a custom attribute definition.
| Field | Type | Required | Description |
|---|---|---|---|
name |
string |
yes | |
display_name |
string |
yes | |
entity_type |
string |
yes | |
data_type |
string |
yes | |
required |
boolean |
no | Default: False |
searchable |
boolean |
no | Default: False |
visible_in_ui |
boolean |
no | Default: True |
include_in_token |
boolean |
no | Default: False |
default_value |
any | null |
no | |
validation_rules |
object | null |
no |
CustomAttributeResponse#
Custom attribute definition response.
| Field | Type | Required | Description |
|---|---|---|---|
id |
string |
yes | |
name |
string |
yes | |
display_name |
string |
yes | |
description |
string | null |
no | |
entity_type |
string |
yes | |
data_type |
string |
yes | |
required |
boolean |
no | Default: False |
searchable |
boolean |
no | Default: False |
visible_in_ui |
boolean |
no | Default: True |
include_in_token |
boolean |
no | Default: False |
default_value |
any | null |
no | |
validation_rules |
object | null |
no | |
created_at |
string (date-time) |
yes | |
updated_at |
string (date-time) | null |
no |
CustomAttributeUpdate#
Schema for updating a custom attribute definition.
| Field | Type | Required | Description |
|---|---|---|---|
display_name |
string | null |
no | |
required |
boolean | null |
no | |
searchable |
boolean | null |
no | |
visible_in_ui |
boolean | null |
no | |
include_in_token |
boolean | null |
no | |
default_value |
any | null |
no | |
validation_rules |
object | null |
no |
HTTPValidationError#
| Field | Type | Required | Description |
|---|---|---|---|
detail |
array of ValidationError |
no |
MetaResponse#
Metadata included in API responses.
| Field | Type | Required | Description |
|---|---|---|---|
request_id |
string | null |
no | |
timestamp |
string (date-time) |
no |
PaginatedResponse_CustomAttributeResponse_#
| Field | Type | Required | Description |
|---|---|---|---|
data |
array of CustomAttributeResponse |
yes | |
pagination |
PaginationMeta |
yes | |
meta |
MetaResponse |
no |
PaginationMeta#
Pagination metadata.
| Field | Type | Required | Description |
|---|---|---|---|
page |
integer |
yes | |
per_page |
integer |
yes | |
total_items |
integer |
yes | |
total_pages |
integer |
yes |
ValidationError#
| Field | Type | Required | Description |
|---|---|---|---|
loc |
array of string | integer |
yes | |
msg |
string |
yes | |
type |
string |
yes |