# Check the code a customer typed and start a session the project's server holds

`POST /customer-accounts/auth/verify` · Rivier · contacts

Check the code a customer typed and start a session the project's server holds: an access token (minutes) and a refresh token. Every wrong code gets the same answer.

- Scope: contacts:write
- Sdk: contacts.customerAuth.verify
- Cli: contacts customer auth verify

## Request body

`application/json`

```json
{
  "type": "object",
  "properties": {
    "project": {
      "type": "string",
      "minLength": 1,
      "maxLength": 80
    },
    "email": {
      "type": "string",
      "format": "email",
      "maxLength": 254
    },
    "code": {
      "type": "string",
      "pattern": "^\\d{8}$"
    },
    "ip": {
      "type": "string",
      "maxLength": 64
    },
    "userAgent": {
      "type": "string",
      "maxLength": 200
    }
  },
  "required": [
    "email",
    "code"
  ],
  "additionalProperties": false
}
```

## Responses

- `200`: Success
- `400`: The request was malformed
- `401`: No valid credential
- `403`: The credential lacks the scope, origin or address
- `429`: Over the key's rate limit; see Retry-After

## Example

```sh
curl -X POST 'https://api.rivier.ai/customer-accounts/auth/verify' \
  -H 'Authorization: Bearer $KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "email": "name@example.com",
  "code": "string"
}'
```
