Newest first: each version of the mail trigger, what it was from createdAt on, who made it (createdBy) and why (cause). Registering makes version 1, and each change makes the next (a PATCH that alters it, or a take-over to another owner): a PATCH that changes nothing makes none, nor do pausing, resuming or deleting. A version never changes once made. A new mail’s run uses the newest when it starts, and keeps it whatever later edits make (the run’s trigger.version). A mail trigger from before versions has none until its next change or its next look at the mailbox. Whoever can read the mail trigger can read its versions. A removed mail trigger’s versions stay: ?includeUnregistered=true lists them, each with unregisteredAt.
With true, a removed trigger too, carrying unregisteredAt. Default: false (triggers that are still there).
limit
integer
default: 25>= 1<= 100
1..100. Default 25.
cursor
string
Where the previous page ended: its nextCursor, as it came. A runtime that seals cursors takes one only for the same list, filters and caller, within a day; otherwise 400 bad-input, and the list starts again without it. Absent → first page.
One version of a mail trigger: what it was from createdAt until the next. A new mail’s run uses the newest when it starts, and keeps it.
object
triggerId
required
string
version
required
Counts from 1, one more for each version.
integer
>= 1
createdAt
required
stringformat: date-time
createdBy
Who made the change, as audit records name an actor (user:<id>, service_account:<id>, …). Absent on a version the runtime made (first-fire, unversioned-edit, pin).
string
cause
required
What made the version: register (the trigger’s first), edit (a change to it), owner (a take-over to another owner), first-fire (the runtime’s, at the first fire of a trigger from before versions, or a mail trigger’s first look at its mailbox), unversioned-edit (the runtime’s, at a fire or a mail trigger’s look at its mailbox, or just before an edit or take-over, when the trigger’s definition isn’t its newest version’s, as when a release from before versions changed it during an upgrade) or pin (the runtime’s, when it fixed a mail trigger to the one connection it could use).
When the trigger was removed: only on a removed trigger’s version. A trigger’s versions are never removed one by one: they stay as long as the trigger does.
stringformat: date-time
definition
required
What a mail trigger’s version runs, as whom, and which mailbox it reads at what pace, as its record names them, and never its state (status, next or last fire).
object
flowId
Run a flow (with flowVersion).
string
>= 1 characters
flowVersion
string
>= 1 characters
agentId
Run an agent (instead of a flow): at agentVersion, else its pinned version.
string
>= 1 characters
agentVersion
string
>= 1 characters
projectId
required
The trigger’s project: its runs are this project’s.
stringformat: uuid
owner
required
Who its runs act as, with their connections. A service account owns a shared trigger, on the company’s mailbox: one named with runAsServiceAccountId, or the project’s own (runAsProject, isProjectAccount). A person owns a personal one: every trigger on a person’s mailbox, and one on the company’s mailbox registered without either. No edit moves it; only a take-over (POST …/owner) does.
object
kind
required
string
Allowed values: userservice
id
required
string
displayName
The owner’s name at the time of the response: the person’s display name, or the service account’s name. Absent when it can’t be read (no directory, a removed account) and from a runtime before Kindgi 0.1.6: show the id then.
string
isProjectAccount
Set when the owner is the trigger’s project’s own service account (runAsProject): the trigger is shared, and runs as the project. Show it as “This project”. Absent otherwise.
boolean
mailbox
required
The mailbox a mail trigger reads: its app (google: Gmail; microsoft: Outlook) and whose it is (company: the company’s mailbox, through the company connection of that app connectionId names; person: the trigger owner’s own, through their connection).
object
app
required
string
Allowed values: googlemicrosoft
as
required
string
Allowed values: companyperson
connectionId
The connection it reads the mailbox with. With as: company, it must be one of the project’s candidates of the app (GET /v1/connection-choices/candidates); a person’s own live connection of the app is 400 bad-input, and any other 404 connection-not-found. Not named, the project’s only one is stored, so another connection added later doesn’t change what the trigger reads; with several, it’s 409 connection-not-chosen, and with none, nothing is stored. With as: person, it must be the owner’s own live connection of the app, and any other is 404 connection-not-found. Not named, their main is stored, else their only one; with several and no main, it’s 409 connection-not-chosen, which counts them; with none, nothing is stored. A new owner clears it, and the next poll stores theirs. Another connectionId, or one named where there was none, is another mailbox. The mailbox it reads now, sent again with none, is the same mailbox: it keeps the one it reads with, or stores the one the rules above give. Absent from a trigger that names none.
stringformat: uuid
folder
The Gmail label id, or the Outlook folder id or well-known name, it watches. Absent: the inbox.
string
>= 1 characters<= 512 characters
pollSeconds
required
How often it looks for new mail, in seconds (default 60).
integer
>= 30<= 3600
runsPerHour
required
The most runs its mail starts in an hour (default 60). Past it, a mail’s fire is refused (detail starts over-limit:), and that mail doesn’t run later.
integer
>= 1<= 600
label
required
string | null
toolsAllowedUnattended
The tools whose calls in this trigger’s runs don’t wait for a person’s yes, though a run a mail started asks for one for every call that changes something or uses its mailbox. Absent: none. Each tool by its id, with no wildcard or pattern, and only tools this trigger’s flow or agent calls. It lifts only that wait: the workspace’s approval rules, the agent’s own rules, the permission check (as the trigger’s owner) and the tool’s own limits all still apply.
rate-limit-exceeded with details.limit: "api-requests", on a runtime that sets workspace limits (Kindgi Cloud): this workspace’s limit on API requests a minute is reached, so the request wasn’t run; Retry-After says when to send it again.
Media typeapplication/json
object
error
required
object
code
required
Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).
string
message
required
string
details
Optional, kind-specific.
object
key
additional properties
any
requestId
required
Server-assigned request id; also echoed via X-Request-Id header.
The database was too busy to answer in time (database-busy), or the authorization store couldn’t be reached (authz-backend-unavailable); Retry-After (whole seconds) says when to try again.
Media typeapplication/json
object
error
required
object
code
required
Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).
string
message
required
string
details
Optional, kind-specific.
object
key
additional properties
any
requestId
required
Server-assigned request id; also echoed via X-Request-Id header.