# Contacts customer auth code

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

Send a customer a sign-in code, from the project's own server (a platform on its own domain). The same rules as the hosted form: sign-up as the project allows, limits per address and per network (pass the customer's ip).

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

## Request body

`application/json`

```json
{
  "type": "object",
  "properties": {
    "project": {
      "type": "string",
      "minLength": 1,
      "maxLength": 80
    },
    "email": {
      "type": "string",
      "format": "email",
      "maxLength": 254
    },
    "locale": {
      "type": "string",
      "maxLength": 12
    },
    "name": {
      "type": "string",
      "maxLength": 120
    },
    "ip": {
      "type": "string",
      "maxLength": 64
    },
    "userAgent": {
      "type": "string",
      "maxLength": 200
    }
  },
  "required": [
    "email"
  ],
  "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/code' \
  -H 'Authorization: Bearer $KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "email": "name@example.com"
}'
```
