Mandate .authorize
Let an agent act as you inside one Limit, until a date you set.
- Action class
- None
- Approval
- Runs on its own
- Emits
Mandate.authorized- Price
- Free
POST https: //api.sb/ {your-domain}/ mandates/ authorize
Gives your agent a standing approval: one Verb, inside one Limit, until the date you set. The hub’s definition of Mandate.authorize.
Inputs
| Name | Type | Default | Meaning |
|---|---|---|---|
agent | Agent | Required | The agent that receives your standing approval. |
verb | string | Required | The Verb it covers, as Noun.verb. |
limit | Limit | Required | The bound your standing approval holds to. |
for | Party | null | The person the agent acts for, under delegation: the principal and author of record. Unset: the caller is the principal. |
channels | Channel[] | [] | The Channels it may send through. Empty: the Channels the Agent’s Permissions already allow. |
topics | string[] | [] | What it may send about; a send outside them becomes an Approval. Empty: no send becomes an Approval for its topic. |
approve | json | null | The approval rule for one-way sends, such as the first 20 waiting for an Approval. Unset: the approval rule by action class on the hub’s approvals page applies. |
window | string | null | The delay window each one-way send waits, as a duration. Unset: each Verb’s own delay window. |
expiresAt | datetime | now + 60d | When your standing approval lapses. Unset: 60 days after it is authorized. |
Outputs
| Field | Type | What null means |
|---|---|---|
mandate | Mandate | Never null. |
mandate.status | string | Never null: active once authorized; in try mode, the status it would take. |
mandate.limit | Limit | Never null: the Limit every Action under it is checked against before it runs. |
mandate.expiresAt | datetime | Never null: a standing approval always lapses, at the date sent or 60 days out. |
Effects
- Action class
None: no approval rule names it, so it runs within its seat’s Permissions and Limits
- Modes
try: Checks the Limit against the authorizer’s own Permissions and returns your standing approval as it would stand; nothing is granted.send: Returns a pending Action while its delay window runs; the Agent acts under your standing approval onceMandate.authorizedfires.do: Holds the call for the Mode’s hold time, then returns202with the pending Action if the window is still open.
- Idempotency
Only with a key: the same
Idempotency-Keyand input return the first Action, and the same key with other input returns409. A repeat without a key grants a second standing approval; every Action names the one it ran under.- Saved or shared
The standing approval keeps its principal, so every Action under it records whom it acted for.
Mandate.revokeends it at once.- Emits
Mandate.authorizedwith{ mandate,agent, verb, limit, expiresAt } - Performed by
- Price
Free on your own account: the platform charges nothing for the call.
On each Venue
None.
What try does
None.
Refuses when
This call has no refusals of its own. Every call through an account can also meet the shared account refusals: grant-missing, needs-reauth, account-not-connected, over-mandate, quota-reached, venue-rejected.
When it waits
| Fact | Value |
|---|---|
send returns | A pending Action, reason:, while its delay window runs. |
| Delivered by | Mandate.authorized |
Example
Let my paid media agent open the LinkedIn test without asking me, up to
$100 of spend, until November 30. To retry, send the same Idempotency-Key: the retry returns the first answer for $0. A new key reads again.
Test values
A sk_test_ key answers these the same way every time, at $0 (every test value).
| Test value | Always returns | What it is for |
|---|---|---|
limit: | {"status": | A test authorizer holds a $5,000 spend Permission, so a wider Limit comes back narrowed to it: a standing approval never widens a Permission. |
maxCost: | Refuses with max-cost | Any priced call with a maxCost of 0.0001 is refused before it spends: the price is above the cap. |
rate-limited.test | Refuses with rate-limited | Any call naming this hostname answers 429 with Retry-After, so your retry logic runs. |
sources-busy.test | Refuses with sources-busy | Any call naming this hostname answers 503 as if every route were busy, and nothing is spent. |
Used by
- Workflows: Ad test setup
- Jobs: Earn first links · Publish and post · Reach out · Run ads