# Desactivar usuario

Desactive usuarios en su comercio fácilmente. Esta funcionalidad le permite revocar el acceso a Trazo para usuarios específicos. Al desactivar una cuenta de usuario, se eliminan sus roles, privilegios y cualquier otro acceso al sistema. Asegúrese de realizar esta acción solo cuando sea necesario, para mantener la seguridad y la correcta administración de usuarios en su plataforma.

## Ruta

<mark style="color:red;">`DELETE`</mark> `/v1/merchant/team/{phone|email}`

## **Encabezado**

| Name                                                   | Value            |
| ------------------------------------------------------ | ---------------- |
| `Content-Type`                                         | application/json |
| `x-auth-token`*<mark style="color:red;">**\***</mark>* | {token}          |

## **Respuesta**

{% tabs %}
{% tab title="200" %}

```json
{
    "message": "The user has been successfully deactivated.",
    "updated_at": "2024-08-27T13:06:48+00:00"
}
```

{% endtab %}

{% tab title="400" %}

```json
{
    "error": "The user with 573112223333 is not registered in the system."
}
```

{% endtab %}
{% endtabs %}

## Ejemplo

{% tabs %}
{% tab title="cURL" %}

```bash
curl --location --request DELETE '{{base_url}}/v1/merchant/team/573112223333' \
--header 'x-auth-token: {{token}}'
```

{% endtab %}

{% tab title="NodeJS (Axios)" %}

```javascript
const axios = require('axios');

let config = {
  method: 'delete',
  maxBodyLength: Infinity,
  url: `${base_url}/v1/merchant/team/573112223333`,
  headers: { 
    'x-auth-token': token //Añadir token
  }
};

axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});

```

{% endtab %}

{% tab title="Python" %}

```python
import requests

url = f"{base_url}/v1/merchant/team/573112223333"

payload = {}
headers = {
  'x-auth-token': token #Añadir token
}

response = requests.request("DELETE", url, headers=headers, data=payload)

print(response.text)

```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.qentaz.com/documentation/equipo/desactivar-usuario.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
