## Deprecate User Passwords

### Endpoint

`POST /v2.0/users/deprecatepassword`

### Example Requests
#### cURL
```bash
curl --request POST \
  --url https://api-trial.cognigy.ai/new/v2.0/users/deprecatepassword \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "userId": "<string>"
}
'```

#### Python
```python
import requests

url = "https://api-trial.cognigy.ai/new/v2.0/users/deprecatepassword"

payload = { "userId": "<string>" }
headers = {
    "X-API-Key": "<api-key>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
```

#### JavaScript (Fetch)
```javascript
const options = {
  method: 'POST',
  headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
  body: JSON.stringify({userId: '<string>'})
};

fetch('https://api-trial.cognigy.ai/new/v2.0/users/deprecatepassword', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
```

### Common Errors

- **400 Bad Request**: Validation failed. Missing payload.
- **401 Unauthorized**: Invalid API key.
- **403 Forbidden**: Access denied.
- **404 Not Found**: Resource not found.
- **500 Internal Server Error**: An unexpected error has occurred.

### Request Body

- `userId`: Required string length: 24. Must match pattern: `^[a-z0-9]{24}$`.

### Response

- **204 No Content**: The password(s) was/were deprecated.
