# Log in user with password

> **Legacy.** This endpoint is kept for existing integrations. Use the current API reference for new work.

This page documents `POST /auth/login`.

- Endpoint: `POST https://api.returning.ai/auth/login`
- Section: Legacy / Authentication
- Authentication: `Authorization: Bearer <API_KEY>` (Community API key)
- Retries: Repeating login will not mount the route.
- Guide: generated from the published specification
- Last updated: 26 Sep 2026
- Web page: https://docs.returning.ai/api-reference/legacy-authentication/log-in-user-with-password

## Authentication

- Header: `Authorization: Bearer <API_KEY>`

Password login is not the community API-key flow. A valid community key does not make this route exist.

## Behaviour

That login route is **not mounted** on `https://api.returning.ai`.

Do not use it for broker user ingestion. Create members with [Create New User](https://docs.returning.ai/api-reference/users/create-user.md) and look them up with [Get User Data](https://docs.returning.ai/api-reference/users/get-user-data.md).

**Replacement:** Server-to-server integrations authenticate with a community API key. There is no public password-login contract on this gateway.

## Request

### Headers

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Authorization` | `string` | Yes | API key. (`Bearer <API_KEY>`) |
| `Content-Type` | `string` | Yes | Request body format. (`application/json`) |

### Body

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `email` | `string` | Yes | User email address. |
| `password` | `string` | Yes | - |
| `host` | `string` | No | - |

### Watch for

- Legacy Authentication pages describe an application login that this public API gateway does not serve.
- `GET /api/secureAuth` also 404s.
- Register is the same class of unmounted route.

### Example request

```bash
curl --request POST \
  --url https://api.returning.ai/auth/login \
  --header 'Authorization: Bearer <API_KEY>' \
  --header 'Content-Type: application/json' \
  --data '{
    "email": "savade@koletter.com",
    "password": "@Password123",
    "host": "ic.genesiv.com"
  }'
```

### More examples

There is no success example.

- `POST /v1/auth/login` → HTML `404` `Cannot POST /api/secureAuth/login`
- `POST /auth/login` → `404`

## Response

This POST has no success response on `https://api.returning.ai`.

### Response fields

| Field | Type | Presence | Description |
| --- | --- | --- | --- |
| `meta` | `object` | always | - |
| `meta.success` | `boolean` | always | - |
| `meta.message` | `string` | always | - |
| `meta.devMessage` | `string` | always | - |
| `body` | `object` | always | - |
| `accessToken` | `string` | always | - |
| `refreshToken` | `string` | always | - |

### Example response (200)

```json
{
  "meta": {
    "success": true,
    "message": "Login success",
    "devMessage": "Login success"
  },
  "body": {
    "accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjE0NTA3NSIsImlhdCI6MTc0NjAwMTY1MywiZXhwIjoxNzQ2MDg4MDUzfQ.a-ee52XuvMtnV4tGgapFDNOh8kvGxswvzMJujSUFLxU",
    "refreshToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjE0NTA3NSIsImlhdCI6MTc0NjAwMTY1MywiZXhwIjoxNzQ2NjA2NDUzfQ.Vuy6Va2QdkwPpsLpx1rurIkv9EcxM1zJapXz0Vj9f_U"
  }
}
```

## Errors

### Fix the request

| Status | Code | What to do |
| --- | --- | --- |
| 400 | - | Invalid request. Check required parameters, body fields, file format, pagination values, and ObjectId values. |
| 401 | - | Invalid credentials, disabled account, or authentication token problem. |

### Retry with backoff

| Status | Code | What to do |
| --- | --- | --- |
| 500 | - | Unexpected Returning.AI service error. |

**Retries:** Repeating login will not mount the route. Do not send real passwords at this host to test it.

## Next step

- [Getting Started](https://dev.returning.ai/getting-started): Create a community API key and call a `/v1` read.
