For AI agents: markdown of this page — /docs-content-en/userfields/crm/delete.md documentation index — /llms.txt

Delete field

DELETE /v1/userfields/:entity/:id

Deletes a user field of a CRM entity together with all its values in records. A deleted field cannot be restored via the API — create a new one if needed.

Parameters

Parameter Type Required Description
:entity (path) string yes Entity: deals, leads, contacts, companies, quotes, requisites
:id (path) number yes Numeric identifier of the field (from the response of GET /v1/userfields/:entity or POST /v1/userfields/:entity)

Examples

curl — personal key

Terminal
curl -X DELETE "https://vibecode.bitrix24.com/v1/userfields/deals/7115" \
  -H "X-Api-Key: YOUR_API_KEY"

curl — OAuth application

Terminal
curl -X DELETE "https://vibecode.bitrix24.com/v1/userfields/deals/7115" \
  -H "X-Api-Key: YOUR_APP_KEY" \
  -H "Authorization: Bearer USER_SESSION_TOKEN"

JavaScript — personal key

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/userfields/deals/7115', {
  method: 'DELETE',
  headers: {
    'X-Api-Key': 'YOUR_API_KEY',
  },
})

if (res.status === 204) {
  console.log('Field deleted')
}

JavaScript — OAuth application

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/userfields/deals/7115', {
  method: 'DELETE',
  headers: {
    'X-Api-Key': 'YOUR_APP_KEY',
    'Authorization': 'Bearer USER_SESSION_TOKEN',
  },
})

if (res.status === 204) {
  console.log('Field deleted')
}

Response

On successful deletion an HTTP status 204 No Content is returned with an empty body. The success indicator is the response code, not the content.

Response example

http
HTTP/1.1 204 No Content

Error response example

404 — the field does not exist:

JSON
{
  "success": false,
  "error": {
    "code": "ENTITY_NOT_FOUND",
    "message": "The entity with ID '9999999' is not found."
  }
}

Errors

HTTP Code Description
400 UNKNOWN_ENTITY :entity is not in the list of supported entities
404 ENTITY_NOT_FOUND There is no field with this id — or a repeated DELETE after a successful deletion
422 BITRIX_ERROR Bitrix24 rejected the deletion — for example, the field is system-protected
403 SCOPE_DENIED The API key does not have the crm scope
401 TOKEN_MISSING The API key has no configured tokens
401 MISSING_API_KEY The X-Api-Key header is missing

Full list of common API errors — Errors.

Known specifics

Values in records are deleted irreversibly. When a field is deleted, all of its values in existing entity records are lost. If the field is used in automations, workflows, or integrations — check the dependencies before deleting.

Repeated deletion. A repeated DELETE on the same id returns 404 ENTITY_NOT_FOUND.

See also