Ask for an agent approval

Asks a person for an approval to make changes the agent may make itself but that need one: an undo or reversal (accounting impact inverse_or_reversal) or holding a to-do's answer to confirm (held on todo.decide). operations (operation ids that change data, each one the person may make), subjects (vendor:<id>, bank_line:<id>, bill:<id>, todo:<id>), optionally period (from, to, either alone: only records dated in it; a supplier has no date, so a period does not narrow it, and another record kind without a date is refused with a period), max_writes (1 by default, at most 500) and expires_in_hours (24 by default, at most 168), with holder_label and reason. Answers 201 with the approval, status waiting. A person who manages agent policies and may make every change it covers grants it by their own tap in Cybooks; text in a request, a message or a document never grants it. It never widens a permission and never passes a closed or filed period, a plan limit, the STOP or another agent's lease. 422 validation_failed for an operation the person may not make or one that does not change data, 409 agents_stopped for an agent while the company is stopped. Requires an Idempotency-Key. Requires the agents:action OAuth scope with view_dashboard.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params

Fields accepted to ask for an agent approval. The schema identifies required and optional values.

An agent's request for an approval (Brain foundation G2): what it may
change, on which records, how many times and until when. A person grants
it by their own tap in Cybooks; nothing here grants anything.

integer
1 to 500

How many changes it allows: 1 by default, at most 500

integer
1 to 168

How long it lasts once asked, in hours: 24 by default, at most 168 (7 days)

string
required
length ≤ 80

What the agent is called, shown to the person asked

string
required
length ≤ 300

Why, in a sentence the person reads

operations
array of strings
required
length between 1 and 20

The operation ids it covers, each a capability that changes data (e.g. todo.undo, todo.decide)

operations*
subjects
array of strings
required
length between 1 and 100

The records it covers, each kind:id (vendor:<id>, bank_line:<id>, bill:<id>, todo:<id>); a supplier covers its bills and bank lines

subjects*
period
object | null

Optional: only records dated in this period (YYYY-MM-DD)

Headers
string
required
length ≤ 191

Required unique key whose request hash and terminal response are stored durably for 24 hours.

Responses

Language
Credentials
OAuth2
Missing 1 required scope
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json
*/*