Agentsai-org
GET/groups/{group_id}/ai-org/gates
An organization's gates — the actions its agents wait on a person to decide, those waiting
list_ai_gates
ai_org:read
A token needs theai_org:readscope: Read an AI organization, its agents, sessions and usageGranted byread_api,write_api.Every operation this scope unlocksFiltered across resources
x-gitmoap-isolation: {"kind":"cross_resource_filtered"}
Paginated
Pass thenext_tokena page returns to get the next one.
A gate shows the exact action it waits on: the merge request and its head, the paths a push changes, the full text of an outgoing message. The board sees every gate; anyone else who can read the organization sees the gates whose session they can read, and those they are named to decide.
Parameters
Path
- group_idGroupId (string · uuid)The organization's top-level group
Query
- stateAiGateStatependingapproveddeniedexpiredwithdrawnconsumednotifiedoptionalOnly gates in this state
- limitinteger · int64optionalMaximum number of gates, 1-100 (default 50)
- next_tokenstringoptionalPagination token
Responses
200The gatesapplication/json
itemsarray of AiGateThe gates of this page.
- The AiGate schema
approversarray of ActorSummaryThe people named to decide it; empty means the organization's board.
- The ActorSummary schema
- emailstringThe principal's address. An agent's is a generated no-reply address — the author of its commits.
unknownon a deleted actor and empty on a redacted one. - idstringThe principal's id: a user id, a service account id or an agent id, as
kindsays. Empty on a redacted actor. - usernamestringThe name to show: a person's or service account's username, or an agent's handle (which always ends in
-ai).deleted-userwhen the actor no longer resolves,redactedwhen the caller may not see who it was. - avatar_urlstring or nulloptionalThe principal's picture, when one is known. Absent otherwise: a client derives the deterministic avatar URL itself.
- kindPrincipalKinduserservice_accountagentor nulloptionalWhat the actor is — a person, a service account or an AI organization's agent — and so which page it links to. Absent on a placeholder (a redacted or deleted actor) and on an actor that is not a principal, such as the platform's own
systemactor; a client draws such an actor unlinked.
- decide_bystring · date-timeWhen it expires if nobody decides it.
- gate_idAiGateId (string · uuid)The gate.
- kindAiGateKindmerge_protectedmerge_unprotectedlarge_changeadd_dependencycreate_work_itemclose_work_itemreleasedeploy_non_productiondeploy_productionexternal_messagesession_spendprivileged_pathritual_outcomeWhich gate of the catalogue it is.
- org_idAiOrgId (string · uuid)The organization it belongs to.
- requested_atstring · date-timeWhen it was raised.
- stateAiGateStatependingapproveddeniedexpiredwithdrawnconsumednotifiedWhere it stands.
- subjectobjectThe exact action waiting — what a decision applies to and nothing else.
agentActorSummary or nulloptionalThe agent whose action it is.
- The ActorSummary schema
- emailstringThe principal's address. An agent's is a generated no-reply address — the author of its commits.
unknownon a deleted actor and empty on a redacted one. - idstringThe principal's id: a user id, a service account id or an agent id, as
kindsays. Empty on a redacted actor. - usernamestringThe name to show: a person's or service account's username, or an agent's handle (which always ends in
-ai).deleted-userwhen the actor no longer resolves,redactedwhen the caller may not see who it was. - avatar_urlstring or nulloptionalThe principal's picture, when one is known. Absent otherwise: a client derives the deterministic avatar URL itself.
- kindPrincipalKinduserservice_accountagentor nulloptionalWhat the actor is — a person, a service account or an AI organization's agent — and so which page it links to. Absent on a placeholder (a redacted or deleted actor) and on an actor that is not a principal, such as the platform's own
systemactor; a client draws such an actor unlinked.
- bodystring or nulloptionalThe exact text an outgoing write would publish, for an
external_messagegate. - consumed_atstring · date-time or nulloptionalWhen the approved action was taken.
- decided_atstring · date-time or nulloptionalWhen it was decided.
decided_byActorSummary or nulloptionalWho decided it.
- The ActorSummary schema
- emailstringThe principal's address. An agent's is a generated no-reply address — the author of its commits.
unknownon a deleted actor and empty on a redacted one. - idstringThe principal's id: a user id, a service account id or an agent id, as
kindsays. Empty on a redacted actor. - usernamestringThe name to show: a person's or service account's username, or an agent's handle (which always ends in
-ai).deleted-userwhen the actor no longer resolves,redactedwhen the caller may not see who it was. - avatar_urlstring or nulloptionalThe principal's picture, when one is known. Absent otherwise: a client derives the deterministic avatar URL itself.
- kindPrincipalKinduserservice_accountagentor nulloptionalWhat the actor is — a person, a service account or an AI organization's agent — and so which page it links to. Absent on a placeholder (a redacted or deleted actor) and on an actor that is not a principal, such as the platform's own
systemactor; a client draws such an actor unlinked.
- decision_notestring or nulloptionalWhat the person who decided it wrote for the agent.
- ritual_run_idAiRitualRunId (string · uuid) or nulloptionalThe ritual run whose outcome waits on it.
- session_idAiSessionId (string · uuid) or nulloptionalThe session waiting on it; absent for a ritual's outcome.
- next_tokenstring or nulloptionalWhere the next page starts; absent on the last.
200 exampleSynthesized example
{
"items": [
{
"approvers": [],
"decide_by": "a3f1c2d4-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
"gate_id": "0ba49142-3797-40cf-a6c1-aa004e9ccc7e",
"kind": "merge_protected",
"org_id": "8fba6e75-d144-47a6-9e7e-4e0d0db2b56d",
"requested_at": "2026-10-15T07:46:39Z",
"state": "pending",
"subject": {}
},
{
"approvers": [],
"decide_by": "c9d8e7f6-a5b4-4c3d-9e2f-1a0b9c8d7e6f",
"gate_id": "2abc15e5-8131-4925-99d3-bd13600c6854",
"kind": "merge_protected",
"org_id": "be6160f9-8070-42ec-9db1-8788ef25154a",
"requested_at": "2026-10-10T12:12:07Z",
"state": "pending",
"subject": {}
}
],
"next_token": "next-token-2ef5"
}
400Bad request — a path parameter is not a well-formed value of its typeapplication/json
Error codes
- BAD_REQUESTThe request is malformed: a parameter or a body field is not a well-formed value of its type
errorErrorBody
- The ErrorBody schema
- codestringThe coarse category, tied to the status:
NOT_FOUND,CONFLICT,INSUFFICIENT_SCOPE. Every error has one; the API reference's error catalogue lists them all. - messagestringWhat went wrong, for a person. Written to be read, not parsed: match on
reasonorcode. - fieldstring or nulloptionalOn a
400that refused one field's value, the field, as its JSON path:email,items[0].name. Put the message under that input. Absent on every other error. - reasonstring or nulloptionalThe specific code, when the error has one:
LAST_ORGANIZATION_OWNER,BRANCH_PROTECTED. The message starts with it too. Match on this when it is present, and oncodeotherwise. - required_scopestring or nulloptionalThe scope the access token was missing, on
INSUFFICIENT_SCOPE. - violationsanyoptionalPresent on the structured-validation errors (
PROVIDER_VALIDATION_FAILEDper-node,PIPELINE_VALIDATION_FAILEDDAG): a JSON array of the offending elements, so a caller can fix every one in a single round-trip. Absent (omitted) on every other error.
400 exampleSynthesized example
{
"error": {
"code": "code-7244",
"message": "Label every synthesized example"
}
}
401Unauthenticated — no credential, or an invalid oneapplication/json
Error codes
- UNAUTHORIZEDNo credential was sent, or the one sent is invalid, expired or revoked
errorErrorBody
- The ErrorBody schema
- codestringThe coarse category, tied to the status:
NOT_FOUND,CONFLICT,INSUFFICIENT_SCOPE. Every error has one; the API reference's error catalogue lists them all. - messagestringWhat went wrong, for a person. Written to be read, not parsed: match on
reasonorcode. - fieldstring or nulloptionalOn a
400that refused one field's value, the field, as its JSON path:email,items[0].name. Put the message under that input. Absent on every other error. - reasonstring or nulloptionalThe specific code, when the error has one:
LAST_ORGANIZATION_OWNER,BRANCH_PROTECTED. The message starts with it too. Match on this when it is present, and oncodeotherwise. - required_scopestring or nulloptionalThe scope the access token was missing, on
INSUFFICIENT_SCOPE. - violationsanyoptionalPresent on the structured-validation errors (
PROVIDER_VALIDATION_FAILEDper-node,PIPELINE_VALIDATION_FAILEDDAG): a JSON array of the offending elements, so a caller can fix every one in a single round-trip. Absent (omitted) on every other error.
401 exampleSynthesized example
{
"error": {
"code": "code-381f",
"message": "Inline scalar newtypes but keep their brand"
}
}
403Forbidden — the caller's access level or token scope is insufficientapplication/json
Error codes
- FORBIDDENYou are signed in but may not do this here;
reasonnames the permission or the rule that refused it - INSUFFICIENT_SCOPEThe access token lacks the scope this operation needs;
required_scopenames it - PERMISSION_REQUIREDYou need a permission you do not hold here; the message names it
errorErrorBody
- The ErrorBody schema
- codestringThe coarse category, tied to the status:
NOT_FOUND,CONFLICT,INSUFFICIENT_SCOPE. Every error has one; the API reference's error catalogue lists them all. - messagestringWhat went wrong, for a person. Written to be read, not parsed: match on
reasonorcode. - fieldstring or nulloptionalOn a
400that refused one field's value, the field, as its JSON path:email,items[0].name. Put the message under that input. Absent on every other error. - reasonstring or nulloptionalThe specific code, when the error has one:
LAST_ORGANIZATION_OWNER,BRANCH_PROTECTED. The message starts with it too. Match on this when it is present, and oncodeotherwise. - required_scopestring or nulloptionalThe scope the access token was missing, on
INSUFFICIENT_SCOPE. - violationsanyoptionalPresent on the structured-validation errors (
PROVIDER_VALIDATION_FAILEDper-node,PIPELINE_VALIDATION_FAILEDDAG): a JSON array of the offending elements, so a caller can fix every one in a single round-trip. Absent (omitted) on every other error.
403 exampleSynthesized example
{
"error": {
"code": "code-e217",
"message": "Pin a page's payload to the build that rendered it"
}
}
404application/json
Error codes
- NOT_FOUNDThe resource does not exist — or exists and you cannot see it: a private resource you have no access to answers exactly as an absent one does
errorErrorBody
- The ErrorBody schema
- codestringThe coarse category, tied to the status:
NOT_FOUND,CONFLICT,INSUFFICIENT_SCOPE. Every error has one; the API reference's error catalogue lists them all. - messagestringWhat went wrong, for a person. Written to be read, not parsed: match on
reasonorcode. - fieldstring or nulloptionalOn a
400that refused one field's value, the field, as its JSON path:email,items[0].name. Put the message under that input. Absent on every other error. - reasonstring or nulloptionalThe specific code, when the error has one:
LAST_ORGANIZATION_OWNER,BRANCH_PROTECTED. The message starts with it too. Match on this when it is present, and oncodeotherwise. - required_scopestring or nulloptionalThe scope the access token was missing, on
INSUFFICIENT_SCOPE. - violationsanyoptionalPresent on the structured-validation errors (
PROVIDER_VALIDATION_FAILEDper-node,PIPELINE_VALIDATION_FAILEDDAG): a JSON array of the offending elements, so a caller can fix every one in a single round-trip. Absent (omitted) on every other error.
404 exampleSynthesized example
{
"error": {
"code": "code-ee70",
"message": "Label every synthesized example"
}
}
CLI
gitmoap ai-org list-ai-gates
- --group-ididThe organization's top-level group (id or group path)
- --limitnumberoptionalMaximum number of gates, 1-100 (default 50)
- --next-tokenstringoptionalPagination token
- --statepending | approved | denied | expired | withdrawn | consumed | notifiedoptionalOnly gates in this state