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

Reset card layout

DELETE /v1/crm/card-config/:entityTypeId

Removes the explicit layout of the chosen scope. After the reset, the card returns to the built-in default layout, and GET for that scope returns data: null.

Path parameter

Parameter Type Required Description
ParameterentityTypeId Typenumber Requiredyes DescriptionCRM object type:
1 — lead
2 — deal
3 — contact
4 — company
7 — quote
31 — invoice
smart process — numeric type ID from GET /v1/smart-processes, field entityTypeId

Query or body parameters

Accepted in the query string or in the body. If a parameter is passed in both, the body value takes precedence.

Parameter Type Required Description
Parameterscope Typestring Requiredno DescriptionLayout scope: P — personal (default), C — common
ParameteruserId Typenumber Requiredno DescriptionEmployee whose personal layout to reset. Defaults to the API key owner. Only meaningful with scope=P. Source: GET /v1/users
ParameterdealCategoryId Typenumber Requiredno DescriptionDeal pipeline, deals only (entityTypeId=2). Source: GET /v1/categories/2
ParametercategoryId Typenumber Requiredno DescriptionSmart process pipeline, smart processes only. Source: GET /v1/categories/:entityTypeId
ParameterleadCustomerType Typenumber Requiredno DescriptionLead type, leads only (entityTypeId=1): 1 — simple, 2 — repeat

Examples

curl — personal key

Terminal
curl -X DELETE "https://vibecode.bitrix24.com/v1/crm/card-config/2?scope=C&dealCategoryId=9" \
  -H "X-Api-Key: YOUR_API_KEY"

curl — OAuth application

Terminal
curl -X DELETE "https://vibecode.bitrix24.com/v1/crm/card-config/2?scope=C&dealCategoryId=9" \
  -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/crm/card-config/2?scope=C&dealCategoryId=9', {
  method: 'DELETE',
  headers: { 'X-Api-Key': 'YOUR_API_KEY' },
})

const { success, data } = await res.json()
console.log('Layout reset:', data.reset)

JavaScript — OAuth application

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/crm/card-config/2?scope=C&dealCategoryId=9', {
  method: 'DELETE',
  headers: {
    'X-Api-Key': 'YOUR_APP_KEY',
    'Authorization': 'Bearer USER_SESSION_TOKEN',
  },
})

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

Response fields

Field Type Description
Fieldsuccess Typeboolean DescriptionAlways true on success
Fielddata Typeobject DescriptionReset result
Fielddata.entityTypeId Typenumber DescriptionObject type from the path
Fielddata.scope Typestring DescriptionScope that was reset: P or C
Fielddata.reset Typeboolean DescriptionAlways true on success

Response example

JSON
{
  "success": true,
  "data": {
    "entityTypeId": 2,
    "scope": "C",
    "reset": true
  }
}

Error response example

400 — invalid scope value:

JSON
{
  "success": false,
  "error": {
    "code": "INVALID_SCOPE",
    "message": "scope must be \"P\" (personal) or \"C\" (common)."
  }
}

Errors

HTTP Code Description
HTTP400 CodeINVALID_ENTITY_TYPE_ID DescriptionentityTypeId in the path is not a positive integer
HTTP400 CodeINVALID_SCOPE Descriptionscope is not P or C
HTTP400 CodeINVALID_USER_ID DescriptionuserId is not a positive integer
HTTP400 CodeINVALID_DEAL_CATEGORY_ID DescriptiondealCategoryId is not a positive integer
HTTP400 CodeINVALID_CATEGORY_ID DescriptioncategoryId is not a positive integer
HTTP400 CodeINVALID_LEAD_CUSTOMER_TYPE DescriptionleadCustomerType is not 1 or 2
HTTP502 CodeCRM_CARD_CONFIG_RESET_FAILED DescriptionBitrix24 did not confirm the reset — for example, insufficient permissions or the target scope is unavailable
HTTP422 CodeBITRIX_ERROR DescriptionBitrix24 did not recognize the object type. The message is in error.message
HTTP403 CodeWRITE_BLOCKED_READONLY_KEY DescriptionThe app key is in read-only mode — writes are blocked
HTTP403 CodeSCOPE_DENIED DescriptionThe API key does not have the crm scope
HTTP401 CodeTOKEN_MISSING DescriptionThe API key has no configured tokens

For the full list of common API errors, see Errors.

Known specifics

Resetting a nonexistent layout succeeds. If there was no explicit configuration for the scope, the method still returns reset: true. No separate "was there a layout" check is required.

After a reset, GET returns null. The scope shows the built-in default layout again, and GET for it returns data: null.

See also