--- title: "DELETE | Disable LDAP server by [id]" slug: "api-v2-delete-ldap-server" updated: 2026-11-03T14:57:58Z published: 2026-11-03T14:57:58Z canonical: "docs.senhasegura.io/api-v2-delete-ldap-server" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.senhasegura.io/llms.txt > Use this file to discover all available pages before exploring further. # DELETE | Disable LDAP server by [id] ## Description Disable an LDAP/AD server connection profile in the Segura™ platform. The operation is a soft delete: the record is kept and the server leaves the authentication chain. --- ## Prerequisites - An application with the **Users** authorization granted by the administrator in A2A, and its resource permission set to **Read and write**. For more information, access [How to manage authorizations in A2A](/v4-2/docs/how-to-manage-authorizations-in-a2a). - A valid OAuth 2.0 access token. For more information, access [How to authenticate an application in A2A](/v4-2/docs/how-to-authenticate-an-application-in-a2a). - No active group synchronization references the server. --- ## Request `DELETE` `/api/v2/iam/ldap-servers/{id}` ### Path parameters | Field | Type | Required | Description | | --- | --- | --- | --- | | `id` | integer | Yes | Unique identification code of the LDAP server. **Note:** this value is assigned by Segura™ in [POST \| Create LDAP server](/v4-2/docs/api-v2-post-create-ldap-server). | Attention This endpoint does not check `If-Match`, unlike [PUT | Update LDAP server by [id]](/v4-2/docs/api-v2-put-update-ldap-server) and [PATCH | Partially update LDAP server by [id]](/v4-2/docs/api-v2-patch-update-ldap-server). It deletes the server even when the server changed after it was read, and it ignores an `If-Match` header sent with the request. --- ### Example request `DELETE` `{{url}}/api/v2/iam/ldap-servers/7` --- ## Response ``` HTTP/1.1 204 No Content ``` The response has no body. Attention The server is disabled, not removed. A later [GET | List an LDAP server by [id]](/v4-2/docs/api-v2-get-list-an-ldap-server) request returns `200 OK` with `active` set to `false`, and the server still appears in [GET | List all LDAP servers](/v4-2/docs/api-v2-get-list-all-ldap-servers) when the listing is not filtered by state. To put the server back in the authentication chain, access [POST | Activate LDAP server](/v4-2/docs/api-v2-post-activate-ldap-server). --- ## Errors | HTTP code | Message | Possible cause | Solution | | --- | --- | --- | --- | | `401` | `api.auth.unauthorized` | The access token is missing or has expired. | Request a new access token. | | `404` | `api.resource.not_found` | The server does not exist. | Check the identification code sent in the path. | | `409` | `api.resource.in_use` | An active group synchronization still references the server. | Deactivate or remove every group synchronization bound to the server, then resend the request. | | `429` | `api.rate_limit.exceeded` | The request rate limit was exceeded. | Reduce the request rate and try again. | ### Example error response `409` group synchronizations still reference the server: ``` { "code": "api.resource.in_use", "message": "LDAP server is referenced by active sync groups.", "details": [ { "code": "ldap_server.in_use.sync_groups" } ] } ``` For authentication error messages and the `403` versus `404` policy, access [API v2 - Conventions and shared behaviors](/v4-2/docs/api-v2-conventions-and-shared-behaviors).