Mandate .authorize
POST /{namespace}/mandates/authorize
Authorize grants an Agent a standing Mandate to perform a Verb within a Limit, without asking each time.
- Noun
- Mandate
- Mode
do- Event
Mandate.authorized
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
agent | Agent | required | The agent that receives the Mandate. |
verb | string | required | The Verb it covers, as Noun.verb. |
limit | Limit | required | The bound the Mandate holds to. |
for | Party | The person the agent acts for, under delegation: the principal and author of record. | |
channels | list of Channel | The Channels it may send through. | |
topics | string[] | What it may send about; a send outside them becomes an Approval. | |
approve | json | The approval rule for one-way sends, such as the first 20 waiting for an Approval. | |
window | string | The delay window each one-way send waits, as a duration. | |
expiresAt | datetime | When the Mandate lapses. |
Outputs
| Output | Type | Required | Description |
|---|---|---|---|
mandate | Mandate | required | The active Mandate. |
Effects
- Emits
Mandate.authorized. - Performed by the Treasurer.
- One-way (money): it waits out its delay window, and runs in the
sendanddomodes. - Never widens a Permission past the authorizer’s own.
Refuses when
| Check | Error | Fix | Then call |
|---|---|---|---|
| The input does not match the schema of the operation. | invalid-input | Read the schema of the operation, then send every required field with the right type. | Mandate.authorize |
| The key is valid, but its scopes do not allow this operation. | forbidden | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | Mandate.authorize |
When it waits
| Gate | Default |
|---|---|
| Decision class | Medium: one-way, bounded (money) |
| Delay window | 1 business hour, in which a watcher can pause, redirect or cancel it; then it runs. |
| Limit | The spend Limit of the Permission or Mandate it runs under. |
| Over the Limit | It waits pending for an Approval from the Founder. Approved, it runs; refused, it ends refused with limit-exceeded; unanswered by its deadline, it ends canceled. |