#Contact fields

GET /v1/contacts/fields

Returns the full list of available fields, including user fields (ufCrm_*).

#Examples

#curl — personal key

Terminal
curl "https://vibecode.bitrix24.tech/v1/contacts/fields" \
  -H "X-Api-Key: YOUR_API_KEY"

#curl — OAuth app

Terminal
curl "https://vibecode.bitrix24.tech/v1/contacts/fields" \
  -H "X-Api-Key: YOUR_APP_KEY" \
  -H "Authorization: Bearer USER_SESSION_TOKEN"

#JavaScript — personal key

javascript
const res = await fetch('https://vibecode.bitrix24.tech/v1/contacts/fields', {
  headers: {
    'X-Api-Key': 'YOUR_API_KEY',
  },
})

const { success, data } = await res.json()
console.log('Fields:', Object.keys(data).length)

#JavaScript — OAuth app

javascript
const res = await fetch('https://vibecode.bitrix24.tech/v1/contacts/fields', {
  headers: {
    'X-Api-Key': 'YOUR_APP_KEY',
    'Authorization': 'Bearer USER_SESSION_TOKEN',
  },
})

const { success, data } = await res.json()

#Response fields

Field Type RO Description
id number yes Contact ID
name string First name
lastName string Last name
secondName string Middle name
phone multifield Phone. On input (POST/PATCH) accepts string | string[] | object[]; on output — aliases phone/phoneWork/phoneMobile/… plus the full fm[]. ⚠ PATCH only adds new records — old phone entries are not removed (a B24 crm.item.update specific). See Update contact. ⚠ The B24-native UPPER form [{ "VALUE": "...", "VALUE_TYPE": "WORK" }] is not accepted — it returns 400 INVALID_MULTIFIELD_SHAPE. Use camelCase: [{ "value": "...", "typeId": "WORK" }].
email multifield Email. On input accepts string | string[] | object[]; on output — aliases email/emailWork/emailHome/emailMailing plus the full fm[]. ⚠ PATCH only adds new records — old email entries are not removed (a B24 crm.item.update specific). ⚠ The B24-native UPPER form [{ "VALUE": "...", "VALUE_TYPE": "WORK" }] is not accepted — it returns 400 INVALID_MULTIFIELD_SHAPE. Use camelCase: [{ "value": "...", "typeId": "WORK" }].
companyId number Company ID. Lookup: GET /v1/companies
post string Position
comments string Comment
typeId string Contact type. List: GET /v1/statuses?filter[entityId]=CONTACT_TYPE
sourceId string Source. List: GET /v1/statuses?filter[entityId]=SOURCE
sourceDescription string Source description
assignedById number Assigned user. List: GET /v1/users
createdBy number yes Creator. Lookup: GET /v1/users
updatedBy number yes Who modified. Lookup: GET /v1/users
createdAt datetime yes Creation date
updatedAt datetime yes Modification date
opened boolean Available to everyone
export boolean Export allowed
leadId number Source lead ID
honorific string Salutation. List: GET /v1/statuses?filter[entityId]=HONORIFIC

User fields (ufCrm_*) are also returned in responses and accepted on create/update.

#Available includes

The GET /v1/contacts/fields endpoint returns a list of available includes: company, requisite.

Usage example: Get contacts.

More about include: Related data.

#Response example

JSON
{
  "success": true,
  "data": {
    "fields": {
      "id": { "type": "number", "readonly": true },
      "name": { "type": "string", "readonly": false },
      "assignedById": { "type": "number", "readonly": false }
    },
    "batch": ["create", "update", "delete"]
  }
}

3 of many fields shown. Full list in the table above.

#Error response example

404 — not found:

JSON
{
  "success": false,
  "error": {
    "code": "ENTITY_NOT_FOUND",
    "message": "Item not found"
  }
}

#Errors

HTTP Code Description
403 SCOPE_DENIED API key lacks the crm scope
401 TOKEN_MISSING API key has no configured tokens

Full list of common API errors — Errors.

#See also