# Delegate Reviewers

| Method   | Operation               | syntax                                     |
| -------- | ----------------------- | ------------------------------------------ |
| **GET**  | List User Delegations   | `/api/preview/awf/delegation/users`        |
| **POST** | Add User Delegations    | `/api/preview/awf/delegation/users:add`    |
| **POST** | Remove User Delegations | `/api/preview/awf/delegation/users:remove` |

Administrators can configure delegate reviewers for [managers](/4yItIzMvkpAvMVFAamTf/features/access-reviews/configuration/managers-and-resource-owners.md) who would otherwise be assigned or auto-assigned to certification results. Specifying a delegate reviewer for another Veza user allows them to fulfill the responsibilities of that user — for example, if a manager is on leave, out-of-office, or otherwise unavailable.

* Any certification items assigned to the original reviewer are also assigned to the delegated reviewer.
* Delegate reviewers are notified of the assignment and receive notifications in place of the original reviewer. They can review and sign-off on any results assigned to the original reviewer.
* The original reviewer can still act on results, but will not receive assignment or reminder emails.

### Examples

#### Add user delegations

```bash
curl -X POST 'https://{{VezaURL}}/api/preview/awf/delegation/users:add' \
-H 'authorization: Bearer '$TOKEN \
-d @configuration.json
```

The JSON payload contain pairs of original and delegate [Workflow Users](/4yItIzMvkpAvMVFAamTf/developers/api/workflows/parameters.md#workflowuser). You can use [List Reviewer Infos](/4yItIzMvkpAvMVFAamTf/developers/api/workflows/listreviewerinfo.md) to get all the required details for reviewers assigned to a certification.

**Add delegation for Veza system users:**

```json
{
  "values": [
    {
      "original_user": {
        "user_type": "localCookieUser",
        "id": "2cdfb6e9-6f20-4198-925c-a045a3d690a0",
        "email": "original_reviewer@veza.com",
        "name": "External User"
      },
      "delegate_user": {
        "user_type": "localCookieUser",
        "id": "b8678b1b-0f31-40e4-9842-47b272694354",
        "email": "delegate_reviewer@veza.com",
        "name": "External User"
      }
    }
  ]
}
```

A successful response will be empty.

You can map both local Veza users and identities from an [integrated identity provider](/4yItIzMvkpAvMVFAamTf/features/access-reviews/configuration/global-idp-settings.md).

**Add delegation for Okta users (with IdP settings configured):**

```json
{
  "values": [
    {
      "original_user": {
        "user_type": "OktaUser",
        "id": "00upa6s0hSGtl1eGL5d5",
        "email": "Abel_Maclead@veza.com",
        "name": "Abel_Maclead@veza.com"
      },
      "delegate_user": {
        "user_type": "OktaUser",
        "id": "00u6h8rl61RiosYzi5d7",
        "email": "adam_lee@veza.com",
        "name": "adam_lee@veza.com"
      }
    }
  ]
}
```

Note that this assumes the IdP setting are configured to use "idp\_unique\_id" to correlate identities, as in the Okta example [here](/4yItIzMvkpAvMVFAamTf/features/access-reviews/configuration/global-idp-settings.md#examples).

#### List user delegations

```bash
curl 'https://{{VezaURL}}/api/preview/awf/delegation/users' \
-H 'authorization: Bearer '$TOKEN
```

A successful response will list all configured delegations, contained in a `values` array:

```json
{
  "values": [
    {
      "original_user": {
        "user_type": "localCookieUser",
        "id": "2cdfb6e9-6f20-4198-925c-a045a3d690a0",
        "email": "original_reviewer@veza.com",
        "name": "Resource Manager"
      },
      "delegate_user": {
        "user_type": "localCookieUser",
        "id": "52c38da6-3b2e-44e9-9787-88ffa5ef398c",
        "email": "delegate_reviewer@veza.com",
        "name": "Backup Manager"
      }
    }
  ]
}
```

#### Remove user delegations

To remove delegations, post the configuration to `/api/preview/awf/delegation/users:remove`.

```shell
curl -X POST 'https://{{VezaURL}}/api/preview/awf/delegation/users:remove' \
-H 'authorization: Bearer '$TOKEN \
-d @configuration/to/remove.json
```

A successful response will be empty.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.veza.com/4yItIzMvkpAvMVFAamTf/developers/api/workflows/delegatereviewers.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
