# Workspace connected business person token

`POST /connected-businesses/{id}/person-tokens` · Rivier · workspace

Exchange the code a person of the business came back with for a person token (once, within five minutes; it lasts 30 minutes). Calls with the platform's key, the business header and x-rivier-person: <token> may confirm or decline a booking, as that person's act. Only where the business granted bookings:decide.

- Scope: workspace:admin
- Graphql: Mutation.workspaceConnectedBusinessPersonToken
- Sdk: workspace.connectedBusiness.personToken
- Cli: workspace connected business person token

## Parameters

- `id` (path, required), string

## Request body

`application/json`

```json
{
  "type": "object",
  "properties": {
    "code": {
      "type": "string",
      "minLength": 10,
      "maxLength": 200
    }
  },
  "required": [
    "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/connected-businesses/{id}/person-tokens' \
  -H 'Authorization: Bearer $KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "code": "string"
}'
```
