# Deactivate user

`DELETE https://api.agilitycredit.net/scim/v2/{tenantId}/Users/{userId}`

Docs page: https://apidocs.agilitycredit.com/sso/scim-api/delete-user · Tag: Users

Soft-deletes (deactivates) the user. The record is retained so a subsequent
`POST /Users` with the same `userName` reactivates the user rather than creating
a duplicate.

Authentication: `Authorization: Bearer <api key>`.

## Parameters

| Name | In | Required | Description |
| --- | --- | --- | --- |
| `userId` | path | yes | Server-assigned user id, returned in the `id` field on creation. |

## Responses

| Status | Description | Body |
| --- | --- | --- |
| 204 | User deactivated. |  |
| 404 | Resource not found. | Error |
| 503 | SCIM provisioning is disabled on the tenant. | Error |

### Error bodies

404:

```json
{
  "schemas": [
    "urn:ietf:params:scim:api:messages:2.0:Error"
  ],
  "status": "404",
  "detail": "User not found"
}
```

503:

```json
{
  "schemas": [
    "urn:ietf:params:scim:api:messages:2.0:Error"
  ],
  "status": "503",
  "detail": "SCIM provisioning is disabled for this tenant"
}
```
