# POST /v4/auth/login

_Merkl API_

Authenticate a user and set a JWT cookie for session management.

## Request body

**`application/json`**
```json
{
  "type": "object",
  "properties": {
    "address": {
      "minLength": 1,
      "type": "string"
    },
    "message": {
      "type": "string"
    },
    "signature": {
      "minLength": 1,
      "type": "string"
    },
    "chainId": {
      "description": "Chain ID of the wallet",
      "type": "number"
    }
  },
  "required": [
    "address",
    "message",
    "signature"
  ]
}
```
**`application/x-www-form-urlencoded`**
```json
{
  "type": "object",
  "properties": {
    "address": {
      "minLength": 1,
      "type": "string"
    },
    "message": {
      "type": "string"
    },
    "signature": {
      "minLength": 1,
      "type": "string"
    },
    "chainId": {
      "description": "Chain ID of the wallet",
      "type": "number"
    }
  },
  "required": [
    "address",
    "message",
    "signature"
  ]
}
```
**`multipart/form-data`**
```json
{
  "type": "object",
  "properties": {
    "address": {
      "minLength": 1,
      "type": "string"
    },
    "message": {
      "type": "string"
    },
    "signature": {
      "minLength": 1,
      "type": "string"
    },
    "chainId": {
      "description": "Chain ID of the wallet",
      "type": "number"
    }
  },
  "required": [
    "address",
    "message",
    "signature"
  ]
}
```

## Responses

- **200** Response for status 200

## Example request

```bash
curl -X POST "https://api.merkl.xyz//v4/auth/login" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ ... }'
```