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

# Login

> Authenticate with your credentials and receive a Bearer token.

## Overview

Authenticates a user with their email and password. On success, returns a JWT Bearer token you can use to authorize subsequent requests.

## Request

**Method**: `POST`
**URL**: `/api/v1/auth/login`

### Headers

| Header       | Value            |
| ------------ | ---------------- |
| Content-Type | application/json |

### Body parameters

<ParamField body="email" type="string" required>
  The email address associated with your account.
</ParamField>

<ParamField body="password" type="string" required>
  Your account password.
</ParamField>

## Response

<ResponseField name="access_token" type="string">
  The JWT Bearer token to include in the `Authorization` header of authenticated requests.
</ResponseField>

<ResponseField name="token_type" type="string">
  Always `"bearer"`.
</ResponseField>

## Example

<CodeGroup>
  ```bash curl theme={null}
  curl -X POST https://api.pingback.live/api/v1/auth/login \
    -H "Content-Type: application/json" \
    -d '{
      "email": "jane@example.com",
      "password": "securepassword123"
    }'
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('https://api.pingback.live/api/v1/auth/login', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    body: JSON.stringify({
      email: 'jane@example.com',
      password: 'securepassword123',
    }),
  });
  const data = await response.json();
  // data.access_token is your Bearer token
  ```
</CodeGroup>

### Response example

```json theme={null}
{
  "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
  "token_type": "bearer"
}
```

## Errors

| Status | Meaning                                    |
| ------ | ------------------------------------------ |
| 401    | Unauthorized — incorrect email or password |
| 422    | Validation error — missing required fields |
