Untuk ejen AI: markdown halaman ini — /docs-content-en/entities/pages/cards/remove.md indeks dokumentasi — /llms.txt
Artikel dokumentasi kini tersedia dalam bahasa Inggeris.
Remove a card by index
DELETE /v1/pages/:pageId/blocks/:blockId/cards/:index
The required path index starts at zero; pass selector in query without @N. Bitrix24 without an index would remove the last card. Removal is permanent outside block history; removing the last card is allowed. A missing card returns 404 ENTITY_NOT_FOUND.
Requires the landing scope; READONLY keys receive 403 before mutation. Page-scoped actions check that the block belongs to the page.
Optional query scope: KNOWLEDGE, GROUP or MAINPAGE for that page context; omit for a regular site. IDs must be positive safe integers.
Examples
curl — personal key
curl -X DELETE "https://vibecode.bitrix24.com/v1/pages/42/blocks/50/cards/1?selector=.landing-block-card" \
-H "X-Api-Key: YOUR_API_KEY"
JavaScript — personal key
const response = await fetch("https://vibecode.bitrix24.com/v1/pages/42/blocks/50/cards/1?selector=.landing-block-card", {
method: "DELETE",
headers: {"X-Api-Key": "YOUR_API_KEY"},
})
const result = await response.json()
if (!response.ok) throw new Error(result.error.message)
console.log(result.data)
curl — OAuth application
curl -X DELETE "https://vibecode.bitrix24.com/v1/pages/42/blocks/50/cards/1?selector=.landing-block-card" \
-H "X-Api-Key: YOUR_APP_KEY" \
-H "Authorization: Bearer USER_SESSION_TOKEN"
JavaScript — OAuth application
const response = await fetch("https://vibecode.bitrix24.com/v1/pages/42/blocks/50/cards/1?selector=.landing-block-card", {
method: "DELETE",
headers: {"X-Api-Key": "YOUR_APP_KEY", "Authorization": "Bearer USER_SESSION_TOKEN"},
})
const result = await response.json()
if (!response.ok) throw new Error(result.error.message)
console.log(result.data)
Response
{
"success": true,
"data": {
"cards": {
".landing-block-card": [
{
"index": 0,
"content": "<div class=\"landing-block-card\">Example</div>"
}
]
}
}
}
A refusal after mutation does not undo the Bitrix24 action. On 422/502 after dispatch, read the block first; retrying clone/add can create another card.
Errors
| HTTP | Code |
|---|---|
| 400 | INVALID_PARAMS / MISSING_REQUIRED_FIELDS / INVALID_SCOPE |
| 401 | MISSING_API_KEY / INVALID_API_KEY / TOKEN_MISSING |
| 403 | SCOPE_DENIED / WRITE_BLOCKED_READONLY_KEY / BITRIX_ACCESS_DENIED |
| 404 | ENTITY_NOT_FOUND |
| 409 | PORTAL_ADDRESS_CHANGED / LANDING_MODULE_NOT_ENABLED |
| 422 | BITRIX_ERROR / BITRIX_NO_EFFECT |
| 429 | RATE_LIMITED |
| 502 | BITRIX_ERROR |
| 503 | SERVICE_UNAVAILABLE |