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

# Supprimer un champ personnalisé

> Removes a custom field from the API: it disappears from the list, its values are no longer returned on people, and writing to it with `custom_attributes` returns `CUSTOM_ATTRIBUTE_KEY_UNKNOWN`. The stored values are kept, and creating a field with the same label and type restores it with them. Built-in fields and fields synced from a CRM integration cannot be deleted.

<Note>
  **Scope requis :** `CRM_DELETE`
</Note>

Retire le champ de l'API. Il disparaît de [Lister les champs personnalisés](/fr/v2/api-reference/crm/list-attributes), ses valeurs ne sont plus renvoyées sur les personnes, et y écrire via `custom_attributes` renvoie `CUSTOM_ATTRIBUTE_KEY_UNKNOWN`.

Renvoie `204 No Content`.

<Note>
  Les valeurs stockées sur les personnes sont conservées. Créer un champ avec le même label et le même type via [Créer un champ personnalisé](/fr/v2/api-reference/crm/create-attribute) restaure le champ et ses valeurs. Le champ garde son emplacement dans les [limites](/fr/v2/api-reference/crm/attributes-overview#limites) jusque-là. C'est différent de [Supprimer un attribut d'entreprise](/fr/v2/api-reference/crm/delete-company-attribute), qui efface les valeurs.
</Note>

Les champs synchronisés depuis une intégration CRM ne peuvent pas être supprimés. Supprimez-les dans le CRM connecté. Les champs natifs comme `name` ou `company` ne peuvent pas être supprimés non plus.

## Erreurs

| Statut | Code | Quand |
| - | - | - |
| `400` | `ATTRIBUTE_BUILT_IN` | La clé est celle d'un champ natif, pas d'un champ personnalisé |
| `403` | `API_KEY_INSUFFICIENT_SCOPE` | La clé n'a pas le scope `CRM_DELETE` |
| `404` | `TEAM_NOT_FOUND` | L'espace de travail n'utilise pas le nouveau modèle de contacts |
| `404` | `ATTRIBUTE_NOT_FOUND` | Aucun champ avec cette clé, ou le champ est déjà supprimé |
| `409` | `ATTRIBUTE_MANAGED_BY_INTEGRATION` | Le champ est géré par une intégration CRM |


## OpenAPI

````yaml DELETE /v2/api/crm/attributes/{key}
openapi: 3.0.3
info:
  title: Allo API
  description: >-
    Allo API provides programmatic access to your Allo account, allowing you to
    manage webhooks, retrieve calls and contacts, and send SMS messages.


    All requests to `/v1/api/**` endpoints automatically go through quota
    checking and scope validation.
  version: 1.0.0
  contact:
    name: Allo Support
servers:
  - url: https://api.withallo.com
    description: Production server
security: []
tags:
  - name: Summary Templates
    description: >-
      Manage call summary templates that control how AI-generated call summaries
      are structured for your team.
  - name: Webhooks
    description: >-
      Manage webhook endpoints to receive real-time notifications about events
      in your Allo account. Each endpoint subscribes to one or more event topics
      and is verified with a signing secret.
  - name: Calls
    description: >-
      Retrieve and search call records with filtering and pagination. Filter
      calls by your Allo phone number.
  - name: Contacts
    description: >-
      Search and retrieve contact information with sorting and pagination.
      Includes engagement level tracking.
  - name: SMS
    description: Send SMS messages to phone numbers using your Allo numbers.
  - name: Phone Numbers
    description: Retrieve information about your Allo phone numbers.
  - name: Analytics
    description: Pre-computed call metrics, team performance, and outbound dial funnel
  - name: CRM
    description: Manage people, companies, and deals in your CRM.
  - name: Notes
    description: >-
      Internal team notes on conversations and CRM people, with @mention
      support. Notes are never visible to the contact.
  - name: Threads
    description: >-
      Team discussion threads attached to a conversation item (call, SMS, or
      conversation note). One thread per item.
  - name: AI Receptionist
    description: >-
      Read and write the AI receptionist configuration of a phone line: business
      details, voice, prompt, capabilities, business hours, transfer rules,
      scheduling calendars and knowledge sources.
paths:
  /v2/api/crm/attributes/{key}:
    delete:
      tags:
        - CRM
      summary: Delete custom contact field
      description: >-
        Removes a custom field from the API: it disappears from the list, its
        values are no longer returned on people, and writing to it with
        `custom_attributes` returns `CUSTOM_ATTRIBUTE_KEY_UNKNOWN`. The stored
        values are kept, and creating a field with the same label and type
        restores it with them. Built-in fields and fields synced from a CRM
        integration cannot be deleted.
      operationId: deleteCrmAttribute
      parameters:
        - name: key
          in: path
          required: true
          description: Field key, as returned by the list endpoint
          schema:
            type: string
            example: lead_status
      responses:
        '204':
          description: Field deleted
        '400':
          $ref: '#/components/responses/ApiValidationError'
        '401':
          $ref: '#/components/responses/ApiUnauthorized'
        '403':
          $ref: '#/components/responses/ApiForbidden'
        '404':
          $ref: '#/components/responses/ApiNotFound'
        '409':
          $ref: '#/components/responses/ApiConflict'
        '429':
          $ref: '#/components/responses/ApiRateLimited'
      security:
        - ApiKeyAuth: []
components:
  responses:
    ApiValidationError:
      description: Invalid request parameters
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    ApiUnauthorized:
      description: Invalid or missing API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    ApiForbidden:
      description: API key lacks the required scope or access to the resource
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    ApiNotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    ApiConflict:
      description: Conflict with existing resource
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    ApiRateLimited:
      description: Rate limit exceeded
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
  schemas:
    ApiError:
      type: object
      properties:
        error:
          type: object
          properties:
            type:
              type: string
            code:
              type: string
            message:
              type: string
            retryable:
              type: boolean
            request_id:
              type: string
            retry_after_seconds:
              type: integer
              nullable: true
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.