Skip to content

Archive Custom Field

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.

field_id
required
Field Id
string
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

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
Allowed values: text textarea number currency date boolean select multi_select url
options
Any of:
Array<string>
description
Any of:
string
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
meta
ResponseMeta

Metadata included in every response envelope.

object
request_id
Any of:
string
organization_id
Any of:
string

Validation Error

HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object