Archive Custom Field
POST /v1/custom-fields/{field_id}/archive
POST
/v1/custom-fields/{field_id}/archive
Archive (soft-disable) a field. Existing entity data is preserved. If the field was searchable, enqueues DROP INDEX CONCURRENTLY.
Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” field_id
required
Field Id
string
Request Body required
Section titled “Request Body required ” TenantFieldSchemaArchive
Request body to archive (soft-disable) a custom field definition.
Archiving sets is_active=False, hiding the field from the UI and validation. Existing JSONB values on entity rows are preserved — no data is lost and the field can be restored.
object
confirm
required
Confirm
Must be True. Acknowledges that the field will be hidden from the UI but existing data is preserved.
boolean
Responses
Section titled “ Responses ”Successful Response
Response[TenantFieldSchemaRead]
object
data
required
TenantFieldSchemaRead
Full representation of a TenantFieldSchema record.
object
id
required
Id
string format: uuid
created_at
required
Created At
string format: date-time
updated_at
required
Updated At
string format: date-time
workos_org_id
required
Workos Org Id
string
entity_type
required
Entity Type
string
field_key
required
Field Key
string
label
required
Label
string
field_type
required
FieldType
Supported custom field types. These drive both validation logic and frontend component rendering. Adding a new type here requires matching handling in validator.py.
string
options
Any of:
Array<string>
null
is_required
required
Is Required
boolean
is_searchable
required
Is Searchable
boolean
is_active
required
Is Active
boolean
sort_order
required
Sort Order
integer
version
required
Version
integer
Validation Error
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context