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

Delete address

DELETE /v1/addresses/:typeId/:entityTypeId/:entityId

Deletes an address by the three key values: typeId, entityTypeId, entityId. A deleted address cannot be restored via the API — create a new one if needed.

Parameters

Parameter Type Required Description
ParametertypeId (path) Typenumber Requiredyes DescriptionAddress type. Examples: 1 — actual, 6 — legal, 8 — postal, 11 — delivery
ParameterentityTypeId (path) Typenumber Requiredyes DescriptionOwner type: 8 — requisite, 3 — contact, 4 — company, 1 — lead
ParameterentityId (path) Typenumber Requiredyes DescriptionID of the address owner. For a requisite — the ID from GET /v1/requisites

Examples

curl — personal key

Terminal
curl -X DELETE "https://vibecode.bitrix24.com/v1/addresses/11/8/1" \
  -H "X-Api-Key: YOUR_API_KEY"

curl — OAuth application

Terminal
curl -X DELETE "https://vibecode.bitrix24.com/v1/addresses/11/8/1" \
  -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/addresses/11/8/1', {
  method: 'DELETE',
  headers: {
    'X-Api-Key': 'YOUR_API_KEY',
  },
})

const { success, data } = await res.json()
if (success && data.deleted) {
  console.log('Address deleted')
}

JavaScript — OAuth application

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/addresses/11/8/1', {
  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 DescriptionDeletion confirmation with an echo of the key
Fielddata.typeId Typenumber DescriptionAddress type from the path
Fielddata.entityTypeId Typenumber DescriptionOwner type from the path
Fielddata.entityId Typenumber DescriptionOwner ID from the path
Fielddata.deleted Typeboolean DescriptionAlways true on successful deletion

Response example

JSON
{
  "success": true,
  "data": {
    "typeId": 11,
    "entityTypeId": 8,
    "entityId": 1,
    "deleted": true
  }
}

Error response example

403 — no crm scope:

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

Errors

HTTP Code Description
HTTP400 CodeINVALID_COMPOSITE_KEY DescriptionOne or more of the path parameters typeId, entityTypeId, entityId is not a positive integer
HTTP404 CodeNOT_FOUND DescriptionAn address with this composite key was not found
HTTP422 CodeBITRIX_ERROR DescriptionBitrix24 rejected the deletion of an existing address
HTTP403 CodeSCOPE_DENIED DescriptionThe key lacks the crm scope. This endpoint requires 'crm' scope
HTTP401 CodeTOKEN_MISSING DescriptionX-Api-Key is missing or the key has no configured tokens

Full list of common API errors — Errors.

Known specifics

The response is 200 JSON, not 204. Deleting an address returns 200 OK with a JSON body where data.deleted equals true, not 204 No Content.

A company's or contact's address is stored on its requisite. For a company (4) and a contact (3), the address is attached to their requisite. A deletion by the company or contact composite key automatically removes the address from the matching requisite, so you can delete the address by the same key you created and read it with. For a requisite (8) and a lead (1), the key matches the storage location.

Address not found — 404. If no address exists for the composite key, the endpoint returns 404 NOT_FOUND and does not perform the deletion.

See also