# A customer token

`POST /platform-customers/{id}/tokens` · Rivier · contacts

A customer token: the platform vouches, with its secret key, for one of its customers whom its own sign-in has recognised, for a few minutes (10 by default, at most 60), naming one connected business or none. Rivier keeps only its hash.

- Scope: contacts:write
- Graphql: Mutation.contactsPlatformCustomerToken
- Sdk: contacts.platformCustomer.token
- Cli: contacts platform customer token

## Parameters

- `id` (path, required), string

## Request body

`application/json`

```json
{
  "type": "object",
  "properties": {
    "connectionId": {
      "type": "string",
      "format": "uuid"
    },
    "minutes": {
      "type": "integer",
      "minimum": 1,
      "maximum": 60,
      "default": 10
    }
  },
  "additionalProperties": false
}
```

## Responses

- `201`: 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/platform-customers/{id}/tokens' \
  -H 'Authorization: Bearer $KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "connectionId": "string",
  "minutes": 10
}'
```
