---
title: "Set the grants of an assignee"
method: PUT
path: "/api/assistant/grants"
tags: ["Mailzero Assistant"]
---

# Set the grants of an assignee

`PUT /api/assistant/grants`

## Request

- Base URL: `https://domani.run`
- URL: `https://domani.run/api/assistant/grants`
- Auth: HTTP bearer

Attach grants to an agent identity or a workspace member; they replace the assignee's previous grants and cap every rule that hands them matters. Requires `assistant:write`; an agent token is refused.

## Request body

- object
  - `assignee_type` 'agent' | 'member', required
  - `assignee_ref` string, required: The agent identity slug, or the member's user id
  - `grants` AssistantGrants, required: Caps on the effects of a level: who an outward effect may reach, how many effects a day, when, how much model spend, which risk classes without an approver, and a required approver. On a rule and on an assignee, the stricter wins
    - `recipients` object
      - `mode` 'correspondents' | 'domains' | 'anyone', required: The matter's correspondents (the default), listed domains, or anyone
      - `domains` string[]
    - `volume` object
      - `effects_per_day` integer, required
    - `schedule` object
      - `hours` integer[]: Start (inclusive) and end (exclusive) hour
      - `days` integer[]: Sunday is zero
      - `timezone` string: An IANA zone; UTC when absent
    - `spend` object
      - `usd_per_day` number
      - `usd_per_matter` number
    - `risk` object
      - `allow` string[]: Risk classes the assignee may act on; none by default
      - `financial_threshold_usd` number: Amounts below this do not make a matter financial
    - `approver` object
      - `member_id` string, required

## Response `200`

The grants

- AssistantAssigneeGrants: The grants attached to an assignee, on top of every rule that hands them matters
  - `assignee` object, required
    - `type` 'agent' | 'member', required
    - `ref` string, required
    - `name` string, nullable
  - `grants` AssistantGrants, required: Caps on the effects of a level: who an outward effect may reach, how many effects a day, when, how much model spend, which risk classes without an approver, and a required approver. On a rule and on an assignee, the stricter wins
    - `recipients` object
      - `mode` 'correspondents' | 'domains' | 'anyone', required: The matter's correspondents (the default), listed domains, or anyone
      - `domains` string[]
    - `volume` object
      - `effects_per_day` integer, required
    - `schedule` object
      - `hours` integer[]: Start (inclusive) and end (exclusive) hour
      - `days` integer[]: Sunday is zero
      - `timezone` string: An IANA zone; UTC when absent
    - `spend` object
      - `usd_per_day` number
      - `usd_per_matter` number
    - `risk` object
      - `allow` string[]: Risk classes the assignee may act on; none by default
      - `financial_threshold_usd` number: Amounts below this do not make a matter financial
    - `approver` object
      - `member_id` string, required
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, required

## Other responses

- `400`: Invalid grants
- `401`: Missing or invalid API key
- `404`: No such agent or member
- `429`: Rate limit exceeded - wait and retry

---

[API](https://skmtc.dev/domani/apis/domani-run-api.md) · [All operations](https://skmtc.dev/domani/apis/domani-run-api/llms.txt) · [OpenAPI document](https://skmtc.dev/domani/apis/domani-run-api/revisions/7679f8159533?raw)
