# Pick the next assignee in a rotation

Of the accounts named in `accounts`, the one who has gone longest without `role` on this page. It reads the assignment trail the activity log already holds, so it stays right when somebody assigns a record by hand — the round-robin half of the shipped assign-new-records rule.

Access class: `def:read`.

## Endpoint

`GET /v1/definitions/{key}/rows/assignees/next`

## Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| key | path | string | Yes |
| body | query | null | No |
| params | query | object | No |
| query | query | object | No |

## Responses

### 200

the action's answer

Content type: `application/json`.

```json
{
  "data": {
    "accountId": "",
    "candidates": 1,
    "lastAssignedAt": "string",
    "role": "string"
  }
}
```

### default

a refusal: `{"error": "<what a person needs to read>"}`. 401 no credential, 402 the plan does not include this, 403 the seat does not, 404 the thing does not exist or is not yours to see.

Content type: `application/json`.

```json
{
  "error": "string"
}
```
