> ## Documentation Index
> Fetch the complete documentation index at: https://crm-social.exuratech.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Set a direct password

> Allow the user to define a password for direct access to Social Trading.

When SSO creates a user, ExuraCopy assigns a random password that is not shared with either the CRM or the user. `PATCH /api/v1/users/password` replaces it with a password selected by the customer.

> [!NOTE]
>
> The user can continue accessing Social Trading through SSO after setting a direct password.

## Request

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
curl -X PATCH "https://social-api.example.com/api/v1/users/password" \
  -H "Authorization: Bearer YOUR_CRM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "external_reference": "crm-user-127",
    "new_password": "Use-A-Strong-Unique-Password"
  }'
```

The CRM must identify the user through `external_reference`. Do not depend on ExuraCopy's internal `user_id` for this workflow.

## Response

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "user_id": 42,
  "email": "customer@example.com",
  "external_reference": "crm-user-127",
  "password_changed": true,
  "updated_at": "2026-07-22T18:05:00Z"
}
```

## Secure handling

* Collect the password through a protected CRM form.
* Require confirmation and apply your own complexity rules.
* Do not record the value in logs, analytics, traces, or screenshots.
* Send it only once from the backend to ExuraCopy.

If the API responds with `404`, first run the SSO workflow to create or link the user.

> [card] [Previous: SSO session](https://crm-social.exuratech.com/guides/sso.md)
>
> Return to the user creation and access workflow.

> [card] [Next: Retrieve the wallet](https://crm-social.exuratech.com/guides/wallet.md)
>
> Obtain the user's authoritative balance.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.