Archive field
archive_fieldRemove a custom field's DEFINITION by object_type + key. DESTRUCTIVE — call once to get a preview (the field's label and type), then again with confirm:true. The definition leaves the object's schema, describe_schema and every picker; values records already hold under that key are NOT deleted — they stay as harmless orphans no surface reads, and reappear if a field with the same key is defined again. Only admin-defined custom fields can be removed (a built-in field isn't one); an unknown key answers with the object's custom field keys. Returns the removed definition.
When to use: When an admin retires a custom field they no longer use. Preview first, then confirm; the definition goes, while values already stored under its key stay as orphans and return if the key is ever defined again.
Example: Remove the old 'region' custom field from accounts.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | The custom field's key (from describe_schema), not its label. | |
| confirm | No | Omit for a preview of what will be removed; pass true to remove the definition. | |
| object_type | Yes | Object key the field belongs to (built-in or custom, from describe_schema). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | No | ||
| note | No | ||
| field | No | ||
| archived | No | ||
| object_type | No | ||
| known_fields | No | ||
| requires_confirm | No |