Skip to content

Rules API

Always-do-this rules the owner states, and the ones the assistant finds in what the owner already did.

The same operations are in the interactive API reference, and the whole contract is in the OpenAPI document.

GET/v1/rule-forms

Rules stated and proposed

Rule forms, newest first. A form is a rule said back in plain words; it is made only when the owner confirms it. The rules in force are under /v1/miniself/standing-rules. Needs miniself:read.

Scope rule-forms:read. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
statequerystringNoOnly forms in this state.
limitqueryintegerNoHow many. Default 50.
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.

POST/v1/rule-forms

State a rule

Checks the rule, gives it an end date (90 days when none is named, at most a year) and says it back in plain words. Nothing is made until the form is confirmed. The owner's limits only take away from what the kind of thing may be granted. Needs the right to change settings.

Scope rule-forms:write. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.

GET/v1/rule-forms/{id}

One rule form

The form with the words the owner reads. Needs miniself:read.

Scope rule-forms:read. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
idpathstringYesThe id.
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.

POST/v1/rule-forms/{id}/confirm

Say yes to a rule

Makes the rule now, or when the cooling-off of a payee added only days ago is over. A rule that would end before then is refused. Confirming twice makes one rule. Needs the right to change settings.

Scope rule-forms:write. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
idpathstringYesThe id.
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.

POST/v1/rule-forms/{id}/decline

Say no to a rule

Closes a form nobody confirmed. A proposal behind it is not made again for a while. Needs the right to change settings.

Scope rule-forms:write. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
idpathstringYesThe id.
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.

POST/v1/rule-forms/{id}/withdraw

Take a rule back

Ends a rule that was made or is waiting: its grant is revoked and the assistant asks again. Needs the right to change settings.

Scope rule-forms:write. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
idpathstringYesThe id.
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.

GET/v1/rule-proposals

Rules the assistant found

Rules found in the owner's own answers: the same approval given at least five times for one kind of thing and one counterparty in the last 90 days, with no other answer for the pair, no rule already covering it, and nothing the owner turned down lately. Needs miniself:read.

Scope rule-proposals:read. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
statequerystringNoDefault pending.
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.

POST/v1/rule-proposals/scan

Look for rules now

Reads the answers already given and keeps what they support as proposals. Running it again finds the same ones. Needs the right to change settings.

Scope rule-proposals:write. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.

POST/v1/rule-proposals/form

Turn a finding into a form

Makes the form the owner reads and confirms, with the end date and the words. Asking again returns the form already made. Needs the right to change settings.

Scope rule-proposals:write. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.

GET/v1/rule-proposals/form/{id}

Rule made from a proposal

The rule form that came from a proposal, as the create call returned it. Needs miniself:read.

Scope rule-proposals:read. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
idpathstringYesThe id.
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.

POST/v1/rule-proposals/decline

Turn a finding down

The finding is not made again for 90 days. Needs the right to change settings.

Scope rule-proposals:write. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
AirFone-VersionheaderstringNoThe API version to use, as a date. Defaults to the version the account was pinned to.