> ## Documentation Index
> Fetch the complete documentation index at: https://docs.instaview.sk/llms.txt
> Use this file to discover all available pages before exploring further.

# Delete Contact Field

> Removes the definition. The values already stored on your contacts are LEFT IN PLACE and simply stop being returned, so nothing is irreversibly lost — define the key again and they reappear. What the delete does break is any agent flow still using `{{contact.<key>}}`: the token resolves to an empty string from now on, and the response names those agents.

Removes one of your contact-field definitions. The values stay where they are.

## Overview

```javascript theme={null}
DELETE /contact-fields/{id}
```

```json theme={null}
{
  "id": "9c22...",
  "key": "order_number",
  "deleted": true,
  "referencedBy": [
    { "id": "a1b2...", "name": "Renewal outreach" }
  ]
}
```

## What is and is not lost

<Info>
  **The stored values are not deleted.** They stop being returned by
  [Get Contact](/api-reference/contacts/get-contact), because that endpoint
  filters to keys the catalog still knows. Define the same key again and the values reappear.

  Scrubbing them would mean two losses for one action — the token stops resolving *and* the data
  is gone — and only one of those is reversible.
</Info>

What the delete **does** break is any agent still using the token. `{{contact.order_number}}`
in a saved flow resolves to an empty string from now on, and nothing else in the system would
have told you. So the response names those agents in `referencedBy`.

Treat a non-empty `referencedBy` as work to do: open each agent and remove or replace the token.
An empty array means nothing referenced the field.

## Seeded fields cannot be deleted

A field with `isSystem: true` belongs to the platform. `DELETE` on one is a `403`. If you had
defined your own field shadowing it, deleting yours simply reveals the seeded field again.

## Scopes

`write:contacts` — **not** `delete:contacts`. This removes schema, not a contact, and the
values already stored deliberately survive it; requiring the delete scope would imply the
opposite.

## Error Scenarios

* **403 Forbidden**: a seeded field; or the key lacks `write:contacts`
* **404 Not Found**: no such field in your company's catalog

## Related Resources

<CardGroup cols={2}>
  <Card title="List Contact Fields" icon="list" href="/api-reference/contact-fields/list-contact-fields">
    Find the field's id
  </Card>

  <Card title="Update Contact Field" icon="pen" href="/api-reference/contact-fields/update-contact-field">
    Change it instead of removing it
  </Card>
</CardGroup>


## OpenAPI

````yaml DELETE /contact-fields/{id}
openapi: 3.0.0
info:
  title: InstaView API
  description: |-
    InstaView API Documentation

    ## Authentication

    All endpoints require API key authentication using Bearer token:
    ```
    Authorization: Bearer sk_your_api_key_here
    ```

    ## API Key Management

    The API Key module provides comprehensive key management for:
    - **Direct Client Keys**: Company-scoped keys for your applications
    - **ATS Partner Keys**: Resource-scoped keys for ATS integrations

    ### Key Features
    - HMAC-SHA256 hashing for API key storage
    - Configurable rate limiting
    - Comprehensive audit logging
    - Company-level isolation
    - Resource scoping for ATS partners
  version: 1.0.0
  contact: {}
servers:
  - url: https://api.instaview.sk
    description: Production API Gateway
security: []
tags: []
paths:
  /contact-fields/{id}:
    delete:
      tags:
        - Public Contact Fields
      summary: Delete a contact field (public API)
      description: >-
        Removes the definition. The values already stored on your contacts are
        LEFT IN PLACE and simply stop being returned, so nothing is irreversibly
        lost — define the key again and they reappear. What the delete does
        break is any agent flow still using `{{contact.<key>}}`: the token
        resolves to an empty string from now on, and the response names those
        agents.
      operationId: PublicContactFieldsController_deleteContactField_v1
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
        - name: companyId
          required: false
          in: query
          description: >-
            Required for ATS API keys to specify which company to access.
            Ignored for standard company API keys.
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicContactFieldDeletionDto'
        '403':
          description: A seeded field, which the platform owns
        '404':
          description: No such field in your company's catalog
      security:
        - bearer: []
        - bearer: []
components:
  schemas:
    PublicContactFieldDeletionDto:
      type: object
      properties:
        id:
          type: string
          description: Id of the deleted field
          format: uuid
        key:
          type: string
          description: Key of the deleted field
          example: order_number
        deleted:
          type: boolean
          description: Always true; a failed delete answers with an error status
          example: true
        referencedBy:
          description: >-
            Agents whose saved flow still references `{{contact.<key>}}`. The
            token now resolves to an empty string in their calls. Empty when
            nothing referenced the field.
          type: array
          items:
            $ref: '#/components/schemas/PublicContactFieldReferenceDto'
      required:
        - id
        - key
        - deleted
        - referencedBy
    PublicContactFieldReferenceDto:
      type: object
      properties:
        id:
          type: string
          description: Agent id
          format: uuid
        name:
          type: string
          description: Agent name
          example: Renewal outreach
      required:
        - id
        - name
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      description: API key for authentication using Bearer scheme

````