> ## Documentation Index
> Fetch the complete documentation index at: https://docs.qash.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Send login code

> Send a one-time email verification code to start a user login.

<Note>
  Requires `X-Api-Key` and `X-Api-Secret` headers. See [Authentication](/api-reference/users/introduction#authentication) for details.
</Note>

This is step 1 of the current login flow. It sends a 6-digit one-time code to the user's registered email address. Call [Verify login code](/api-reference/users/verify-otp) next with the code the user received.

<Warning>
  The user must already be `active` — meaning KYC has been approved — before they can log in. Calling this for a `pending` or `kyc_required` user still sends the code, but [verification](/api-reference/users/verify-otp) will fail with `User account is {status}`. Complete the [onboarding flow](/guides/partner-integration) first.
</Warning>

## Request

```http theme={null}
POST /api/v1/partner/auth/send
X-Api-Key: <your-api-key>
X-Api-Secret: <your-api-secret>
Content-Type: application/json
```

```json theme={null}
{
  "email": "juan@example.com"
}
```

| Field   | Type   | Required | Description                        |
| ------- | ------ | -------- | ---------------------------------- |
| `email` | string | Yes      | The email the user registered with |

## Response — 200 OK

```json theme={null}
{
  "success": true
}
```

The response does not indicate whether the email exists in your partner scope — this is intentional and prevents account enumeration. If the email is not registered, no code is sent, but the response still returns `success: true`.

## Errors

| Status | Error                         | Cause                                                                         |
| ------ | ----------------------------- | ----------------------------------------------------------------------------- |
| `401`  | `Invalid partner credentials` | Wrong `X-Api-Key` or `X-Api-Secret`                                           |
| `429`  | `Rate limit exceeded`         | Too many code requests for this user in a short window — wait before retrying |

<Note>
  Codes expire after a few minutes. If the user doesn't complete verification in time, call this endpoint again to send a fresh code.
</Note>
