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

Contacts

CRM contact management: create, retrieve, update, delete, filter.

Bitrix24 API: crm.item.* Scope: crm

Create contact

POST /v1/contacts

Creates a new contact in CRM.

Request fields (body)

Parameter Type Description
Parametername Typestring DescriptionFirst name, at most 50 Unicode code points. Longer values are rejected before writing; the name is not truncated.
ParameterlastName Typestring DescriptionLast name
ParametersecondName Typestring DescriptionMiddle name
Parameterphone Typestring | string[] | object[] DescriptionPhone. Accepts three forms: a string "+1...", an array of strings ["+1...", "+1..."], or an array of objects [{ "value": "+1...", "typeId": "WORK" }, …]. typeId: WORK | HOME | MOBILE | OTHER (default WORK). Important: the UPPER form [{ "VALUE": "...", "VALUE_TYPE": "WORK" }] is not accepted — it returns 400 INVALID_MULTIFIELD_SHAPE. Use camelCase: [{ "value": "...", "typeId": "WORK" }]
Parameteremail Typestring | string[] | object[] DescriptionEmail. Accepts three forms: a string "a@b.com", an array of strings ["a@b.com", "b@c.com"], or an array of objects [{ "value": "a@b.com", "typeId": "WORK" }, …]. typeId: WORK | HOME | MAILING | OTHER (default WORK). Important: the UPPER form [{ "VALUE": "...", "VALUE_TYPE": "WORK" }] is not accepted — it returns 400 INVALID_MULTIFIELD_SHAPE. Use camelCase: [{ "value": "...", "typeId": "WORK" }]
ParametercompanyId Typenumber DescriptionCompany ID. Lookup: GET /v1/companies
Parameterpost Typestring DescriptionPosition
Parametercomments Typestring DescriptionComment
ParametertypeId Typestring DescriptionContact type. List: GET /v1/statuses?filter[entityId]=CONTACT_TYPE
ParametersourceId Typestring DescriptionSource. List: GET /v1/statuses?filter[entityId]=SOURCE
ParametersourceDescription Typestring DescriptionSource description
ParameterassignedById Typenumber DescriptionAssigned user. List: GET /v1/users
Parameteropened Typeboolean DescriptionAvailable to everyone
ParameterleadId Typenumber DescriptionID of the lead the contact was created from
ParameterufCrm* Typeper field schema DescriptionA user field of the Bitrix24 account, for example ufCrmProjectCode. The actual name and type are in the schema GET /v1/contacts/fields, and the value format for each type is in User fields (UF). An enumeration field takes the option ID from the field's items array in the schema, and a multiple field takes an array of such IDs. If you send the option label VALUE instead of the ID, the value is lost: a single-value field gets 0. A number that is not among the options is stored as is. Neither the label nor a non-existent ID raises an error, and the request returns 201, so map the label to its ID on your side and check the stored value of this field in the response data

Full list of fields: GET /v1/contacts/fields.

Examples

curl — personal key

Terminal
curl -X POST https://vibecode.bitrix24.com/v1/contacts \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "John",
    "lastName": "Brown",
    "phone": "+12025550123",
    "email": "john@example.com",
    "companyId": 15,
    "post": "Manager",
    "typeId": "CLIENT"
  }'

curl — OAuth application

Terminal
curl -X POST https://vibecode.bitrix24.com/v1/contacts \
  -H "X-Api-Key: YOUR_APP_KEY" \
  -H "Authorization: Bearer USER_SESSION_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "John",
    "lastName": "Brown",
    "phone": "+12025550124",
    "email": "john@example.com",
    "companyId": 15,
    "post": "Manager",
    "typeId": "CLIENT"
  }'

JavaScript — personal key

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/contacts', {
  method: 'POST',
  headers: {
    'X-Api-Key': 'YOUR_API_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    name: 'John',
    lastName: 'Brown',
    phone: '+12025550125',
    email: 'john@example.com',
    companyId: 15,
    post: 'Manager',
    typeId: 'CLIENT',
  }),
})

const { success, data } = await res.json()
console.log('Contact ID:', data.id)

JavaScript — OAuth application

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/contacts', {
  method: 'POST',
  headers: {
    'X-Api-Key': 'YOUR_APP_KEY',
    'Authorization': 'Bearer USER_SESSION_TOKEN',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    name: 'John',
    lastName: 'Brown',
    phone: '+12025550126',
    email: 'john@example.com',
    companyId: 15,
    post: 'Manager',
    typeId: 'CLIENT',
  }),
})

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

Alternative form — array of objects with explicit `typeId`

If you need to specify multiple values or an explicit type (HOME, MOBILE):

JSON
{
  "phone": [
    { "value": "+12025550127", "typeId": "WORK" },
    { "value": "+12025550123", "typeId": "MOBILE" }
  ],
  "email": [
    { "value": "work@example.com", "typeId": "WORK" },
    { "value": "personal@example.com", "typeId": "HOME" }
  ]
}

Response fields

Field Type Description
Fieldsuccess Typeboolean Descriptiontrue when the request succeeds
Fielddata Typeobject DescriptionThe created contact with all fields, including the ufCrm* user fields. All fields — Contact fields
Fielddata.id Typenumber DescriptionID of the created contact
Fielddata.name Typestring DescriptionFirst name, at most 50 Unicode code points. Longer values are rejected before writing. The name is not truncated
Fielddata.lastName Typestring DescriptionLast name
Fielddata.companyId Typenumber DescriptionCompany ID
Fielddata.assignedById Typenumber DescriptionAssigned user
Fielddata.createdBy Typenumber DescriptionCreator
Fielddata.createdTime Typedatetime DescriptionCreation date
Fielddata.updatedTime Typedatetime DescriptionModification date
Fielddata.typeId Typestring DescriptionContact type
Fielddata.sourceId Typestring DescriptionSource

The contact card URL in Bitrix24 is built from id:

https://<portal>.bitrix24.com/crm/contact/details/<id>/

<portal> — the Bitrix24 portal domain. Access is restricted by the employee's permissions in Bitrix24.

Response example

JSON
{
  "success": true,
  "data": {
    "id": 2457,
    "name": "John",
    "lastName": "Brown",
    "secondName": null,
    "companyId": 15,
    "assignedById": 1,
    "createdBy": 1,
    "createdTime": "2026-04-15T12:26:17+00:00",
    "updatedTime": "2026-04-15T12:26:17+00:00",
    "opened": true,
    "typeId": "CLIENT",
    "sourceId": "CALL",
    "post": "Manager"
  }
}

Error response example

403 — no scope:

JSON
{
  "success": false,
  "error": {
    "code": "SCOPE_DENIED",
    "message": "This endpoint requires 'crm' scope"
  }
}

Errors

HTTP Code Description
HTTP403 CodeSCOPE_DENIED DescriptionAPI key lacks the crm scope
HTTP401 CodeTOKEN_MISSING DescriptionAPI key has no configured tokens
HTTP400 CodeINVALID_REQUEST DescriptionInvalid fields
HTTP400 CodeREADONLY_FIELD DescriptionThe request body contains a read-only field, such as shortName. Such fields are marked in the RO column of Contact fields
HTTP400 CodeINVALID_MULTIFIELD_SHAPE DescriptionWrong shape for phone or email: the form with upper-case VALUE / VALUE_TYPE keys is not accepted; the expected form is [{ "value", "typeId" }]. The same code is returned when phone or email holds an object without value — for example empty or with keys such as n0, 0 or 011 — or a number or true/false, on its own or as an array item, or when the raw fm is not an array, for example a string, a number, an empty object or an object keyed by type such as PHONE: fm is accepted only as an array [{ "typeId", "valueType", "value" }]. The request is refused and nothing is written
HTTP400 CodeMULTIFIELD_ID_NOT_SUPPORTED Descriptionphone, email or the raw fm[] contains an object with an id field. There is nothing to address on create: Bitrix24 assigns multifield row IDs itself, so the request is refused and nothing is written. The same refusal applies when fm, phone or email is sent as an object keyed by row IDs ({"fm": {"11": {…}}})

Full list of common API errors — Errors.

See also