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

Delete a CRM card layout

DELETE /v1/crm/card-layouts/:entityType/:layoutId

Delete a named CRM card layout. It cannot be restored through the API, so create a new one if needed.

These methods are rolling out — introduced in crm 26.1700.0. Cloud availability also depends on Bitrix24 enabling this capability. Until it is enabled for your Bitrix24 account, the API returns 422 METHOD_NOT_YET_AVAILABLE with error.release.

Requires crm scope. Writes require READWRITE.

Parameters

Parameter Type Required Default Description
ParameterentityType (path) Typestring Requiredyes Default— DescriptionType from the section index.
ParameterlayoutId (path) Typestring Requiredyes Default— DescriptionID from the layout list, common or personal layout.
ParametercategoryId (query) Typeinteger Requiredyes Default— DescriptionCategory from GET /v1/categories, 0 is accepted.
ParameteruserId (query) Typeinteger Requiredno Default— DescriptionEmployee from the user list. Omit to use the calling employee.

Examples

curl — personal key

Terminal
curl -X DELETE "https://vibecode.bitrix24.com/v1/crm/card-layouts/deal/11?categoryId=0" \
  -H "X-Api-Key: YOUR_API_KEY"

curl — OAuth application

Terminal
curl -X DELETE "https://vibecode.bitrix24.com/v1/crm/card-layouts/deal/11?categoryId=0" \
  -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-layouts/deal/11?categoryId=0', {
  method: 'DELETE',
  headers: {"X-Api-Key": "YOUR_API_KEY"},
});
console.log(res.status === 204);

JavaScript — OAuth application

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/crm/card-layouts/deal/11?categoryId=0', {
  method: 'DELETE',
  headers: {"X-Api-Key": "YOUR_APP_KEY", "Authorization": "Bearer USER_SESSION_TOKEN"},
});
console.log(res.status === 204);

Response

Successful deletion: 204 No Content, empty body. Check the HTTP status.

Response example

http
HTTP/1.1 204 No Content

Error response example

400 — category omitted:

JSON
{
  "success": false,
  "error": {
    "code": "MISSING_REQUIRED_FIELDS",
    "message": "categoryId is required"
  }
}

Errors

HTTP Code Description
HTTP400 CodeMISSING_REQUIRED_FIELDS DescriptionCategory or required body fields missing.
HTTP400 CodeINVALID_PARAMS DescriptionUnsupported entity selector or malformed parameters.
HTTP400 CodeUNKNOWN_FILTER_FIELD DescriptionUnknown query parameter.
HTTP401 CodeMISSING_API_KEY DescriptionAPI key missing.
HTTP401 CodeTOKEN_MISSING DescriptionBitrix24 credentials missing.
HTTP403 CodeSCOPE_DENIED DescriptionThe key lacks crm scope.
HTTP404 CodeENTITY_NOT_FOUND DescriptionBitrix24 reported a missing layout.
HTTP403 CodeWRITE_BLOCKED_READONLY_KEY DescriptionThe key blocks writes to Bitrix24.
HTTP422 CodeMETHOD_NOT_YET_AVAILABLE DescriptionCapability disabled or method unavailable. error.release names the release.
HTTP422 CodeBITRIX_ERROR DescriptionBitrix24 refusal. Original code in error.b24Code, text in error.message.
HTTP502 CodeBITRIX_UNAVAILABLE DescriptionNo valid response from Bitrix24. After a write error, reread before retrying.

Common errors: Errors.

See also