# Arrange roles (/docs/reference/Rest-API/api-docs/roles/arrangeTemplateRoles)


{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}

## PATCH /v2/roles/{template_id}

`PATCH https://api.verdocs.com/v2/roles/{template_id}`

### Path parameters

- `template_id` (string, uuid, required): The template ID.

### Request body

Content type `application/json`, required. Body Parameters.

- `roles` (IRolePosition[], required): The roles to move, each with its new step (sequence) and optionally its place within the step (order).
  - `name` (string, required): The role's name.
  - `order` (integer): The role's place within its step, for display. Leave it out to keep the role's current order.
  - `sequence` (integer, required): The step the role acts in. Roles that share a step are invited together.

### Responses

#### 200: Success

Content type `application/json`.

Type: `IRole[]`

- `id` (string): Used only by the Web SDK during builder processes. Not stored in the backend.
- `name_locked` (boolean, required): If set, the recipient will not be allowed to change their legal name.
- `order` (integer, required): The order indicates the order in which recipients are listed in a single "level" of the workflow. Note that recipients at the same level may act in parallel despite this value. However, it can often be useful to visually arrange recipients to match related business processes so this field allows for that.
- `sequence` (integer, required): The sequence number indicates the order in which Roles act. Multiple roles may have the same sequence number, in which case they may act in parallel. (e.g. all Roles at sequence 2 will receive invites once all Recipients at sequence 1 have signed.).

#### 400: Request Error

Content type `application/json`.

- `status` (string, required): Always set to "ERROR". One of: `"ERROR"`.
- `error` (string, required): Description of the error that occurred.

#### 401: Access Denied

Content type `application/json`.

- `status` (string, required): Always set to "ERROR". One of: `"ERROR"`.
- `error` (string, required): Description of the error that occurred.

#### 404: Not Found

Content type `application/json`.

- `status` (string, required): Always set to "ERROR". One of: `"ERROR"`.
- `error` (string, required): Description of the error that occurred.

#### 406: Invalid Parameter

Content type `application/json`.

- `status` (string, required): Always set to "ERROR". One of: `"ERROR"`.
- `error` (string, required): Description of the error that occurred.

### Example request

```bash
curl -X PATCH "https://api.verdocs.com/v2/roles/TEMPLATE_ID" \
    -H "Authorization: Bearer ACCESS_TOKEN" \
    -H "content-type: application/json" \
    -d '{"param": "value"}'
```
