Skip to content
GitmoapAPIBeta
Agentsai-org
POST/groups/{group_id}/ai-org/revisions/{number}/decline

Decline a revision an agent proposed. Nothing it proposed takes effect, and it stays in the

decline_ai_org_revision
  • ai_org:approve
    A token needs the ai_org:approve scope: Publish an AI organization's revisions and resume what was pausedEvery operation this scope unlocks
  • Audited · mutation

    x-gitmoap-audit: {"kind":"audited","arg":"mutation"}

Takes ai_org.approve and a person. Only a revision in the proposed state can be declined; anything else is a conflict.

Parameters

Path
  • group_idGroupId (string · uuid)The organization's top-level group
  • numberinteger · int64The proposed revision

Responses

200The declined revisionapplication/json
  • author_kindAiRevisionAuthorpersonagentplatform
  • bodyOrgConfig
    • The OrgConfig schema
    • autonomyAutonomyConfig
      • The AutonomyConfig schema
      • levelAutonomyLevelsupervisedgatedautonomousHow much an organization may do without asking: a named preset for every gate, each of which can still be set on its own.
      • approversarray of GateApproversoptionalWho decides each gate; a gate not named here is decided by the board.
      • gate_expiry_hoursinteger · int32optional0–∞How long a gate waits for a person before it expires and the agent is told.
      • gatesarray of GateOverrideoptional
      • large_changeLargeChangeThresholdoptionalThe size above which a change raises large_change.
    • budgetsBudgets
      • The Budgets schema
      • org_monthly_cap_microsinteger · int640–∞All model usage and fees of the organization per calendar month in UTC. Required.
      • agent_daily_cap_microsinteger · int64 or nulloptional0–∞What one agent may spend in a UTC day.
      • session_alert_microsinteger · int64 or nulloptional0–∞What a session may spend before continuing needs the session_spend gate; $25 when absent.
      • session_cap_microsinteger · int64 or nulloptional0–∞What one session may spend.
    • structureOrgStructure
      • The OrgStructure schema
      • levelStructureLevelL1L2L3The organization's shape: L1 is engineers in one squad, L2 adds squads each led by a product owner, L3 adds a director across the squads.
      • boardarray of UserId (string · uuid)optionalBesides the root group's Owners, who are always on it.
    • agentsarray of AgentConfigoptional
      • The AgentConfig schema
      • display_nameAgentDisplayName (string)
      • handleAgentHandle (string)
      • keyAgentKey (string)
      • positionPositionengineerreviewerproduct_ownerdirectorrelease_managertechnical_writerAn agent's job, which decides what it may do and which model tier it uses by default.
      • squadSquadKey (string)
      • profileAgentProfileoptional
      • specialisationSpecialisationbackendfrontendinfrastructurecli_and_toolingqualityor nulloptionalAn engineer's specialisation, which shapes the work it is given.
      • wip_limitinteger · int32 or nulloptional0–∞
    • calendarCalendarConfigoptionalThe organization's time zone and cycles.
      • The CalendarConfig schema
      • cycle_cadenceCadenceId (string · uuid) or nulloptionalThe iteration cadence, in the organization's root group, whose iterations are its cycles. A ritual held at a cycle's start, middle or end needs one.
      • time_zoneTimeZoneName (string)optionalThe organization's time zone.
    • communicationCommunicationConfigoptionalHow the organization's agents talk.
      • The CommunicationConfig schema
      • agent_messages_per_channel_hourinteger · int32optional0–∞The most messages one agent posts in one org channel in an hour.
      • question_timeout_hoursinteger · int32optional0–∞How long a question to a person waits before it escalates to the board — the people who can answer what the people asked did not; a product owner is an agent, and answers no question put to a person.
    • handoffsarray of HandoffoptionalWhere the open work of the agents this revision retires goes.
      • The Handoff schema
      • fromAgentKey (string)The agent this revision retires.
      • toAgentKey (string)The agent of this revision that takes its open work.
    • modelsarray of PositionRoutingoptionalPinned.
      • The PositionRouting schema
      • positionPositionengineerreviewerproduct_ownerdirectorrelease_managertechnical_writerAn agent's job, which decides what it may do and which model tier it uses by default.
      • tierAiModelTiermost_capablestandardeconomicalA model tier: the most capable, the standard, or the economical model in the organization's region.
      • modelAiModelKey (string) or nulloptionalAn exact model, which stays exact until the provider retires it.
    • pipelinesPipelinePolicyoptionalOrdered.
      • The PipelinePolicy schema
      • agent_codeAgentCodeTrustuntrustedtrustedoptionalWhether a run of code an agent wrote, or a run an agent started, gets the repository's connections, secrets, cloud roles and build cache.
    • positionsarray of PositionOverrideoptionalThe positions under the organization's own names, and their defaults.
      • The PositionOverride schema
      • positionPositionengineerreviewerproduct_ownerdirectorrelease_managertechnical_writerThe built-in position this renames or re-defaults. Its behaviour does not change.
      • titlePositionTitle (string) or nulloptionalThe organization's word for the position.
      • wip_limitinteger · int32 or nulloptional0–∞Sessions an agent of the position runs at once, unless the agent says otherwise.
    • ritualsarray of RitualConfigoptionalThe organization's rituals (rituals.md). Adding or removing one is structural; its content is pinned; its budget is ordered.
      • The RitualConfig schema
      • cadenceRitualCadenceWhen it runs.
      • keyRitualKey (string)The key the revision names the ritual by.
      • kindRitualKindstand_upplanningrefinementreviewretrospectivearchitecture_reviewreleasereplenishmentdigestWhat the ritual does.
      • nameRitualName (string)The organization's word for it.
      • scopeRitualScopeWhom it is for.
      • budget_microsinteger · int64 or nulloptional0–∞The most one run may spend, in millionths of a dollar; $5 when absent. A run reaching it ends early and applies nothing it had not finished.
      • facilitatorRitualFacilitator or nulloptionalWho runs it and writes its outcome; the kind's when absent.
      • outputsarray of RitualOutput: one of digest | assignments | cycle_selection | revision_proposal | decision_record | questions or nulloptionalWhat a run may produce, within what the kind allows; all of it when absent.
      • participantsarray of Position: one of engineer | reviewer | product_owner | director | release_manager | technical_writer or nulloptionalThe positions that contribute before the facilitator writes; the kind's when absent.
      • peopleRitualPeopleoptionalWhat people do in it.
      • skip_whenSkipWhennevernothing_changedor nulloptionalWhen a run is skipped without calling a model; the kind's when absent.
      • timeboxRitualTimebox or nulloptionalHow many turns a run's sessions may take; the kind's when absent.
    • squadsarray of SquadConfigoptional
      • The SquadConfig schema
      • keySquadKey (string)
      • leadAgentKey (string)The agent that leads the squad, a member of it.
      • nameSquadName (string)
      • backlogSquadBacklogoptionalThe squad's backlog.
      • repositoriesarray of RepositoryId (string · uuid)optionalThe repositories the squad owns. Its agents are granted these and nothing else, and its channel, memory and digests are readable by whoever can read every one of them.
      • reviewSquadReviewoptionalWho reviews the merge requests the squad's agents open.
    • trackerTrackerConfigoptional
    • triggersTriggerAllowListoptional
  • body_digeststringHex SHA-256 of the canonical body; two revisions with one digest are one configuration.
  • created_atstring · date-time
  • created_byActorSummary
    • The ActorSummary schema
    • emailstringThe principal's address. An agent's is a generated no-reply address — the author of its commits. unknown on 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 kind says. 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-user when the actor no longer resolves, redacted when 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 system actor; a client draws such an actor unlinked.
  • numberinteger · int64
  • org_idAiOrgId (string · uuid)
  • revision_idAiOrgRevisionId (string · uuid)
  • stateAiRevisionStatedraftproposedpublishedsupersededdeclined
  • updated_atstring · date-time
  • notestring or nulloptionalWhat a proposed revision changes and why, as the agent that proposed it wrote.
  • parent_numberinteger · int64 or nulloptionalThe revision this one was edited from.
  • published_atstring · date-time or nulloptional
  • published_byActorSummary or nulloptional
    • The ActorSummary schema
    • emailstringThe principal's address. An agent's is a generated no-reply address — the author of its commits. unknown on 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 kind says. 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-user when the actor no longer resolves, redacted when 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 system actor; a client draws such an actor unlinked.
200 exampleSynthesized example
{
"author_kind": "person",
"body": {
"autonomy": {
"level": "supervised",
"approvers": [
{
"gate": "merge_protected",
"users": []
},
{
"gate": "merge_protected",
"users": []
}
],
"gate_expiry_hours": 28,
"gates": [
{
"gate": "merge_protected",
"setting": "ask"
},
{
"gate": "merge_protected",
"setting": "ask"
}
],
"large_change": {
"files": 6,
"lines": 59
}
},
"budgets": {
"org_monthly_cap_micros": 34,
"agent_daily_cap_micros": 53,
"session_alert_micros": 29,
"session_cap_micros": 25
},
"structure": {
"level": "L1",
"board": [
"c9d8e7f6-a5b4-4c3d-9e2f-1a0b9c8d7e6f"
]
},
"agents": [
{
"display_name": "Tomás Reyes",
"handle": "handle-640f",
"key": "key-4f7d",
"position": "engineer",
"squad": "squad-ca52"
},
{
"display_name": "Mara Okafor",
"handle": "handle-1f8f",
"key": "key-379e",
"position": "engineer",
"squad": "squad-08e4"
}
],
"calendar": {
"cycle_cadence": "0342a91e-571d-4fac-967f-1c95221b45ef",
"time_zone": "time-zone-3e4e"
},
"communication": {
"agent_messages_per_channel_hour": 66,
"question_timeout_hours": 48
},
"handoffs": [
{
"from": "from-e296",
"to": "to-ac7c"
}
],
"models": [
{
"position": "engineer",
"tier": "most_capable"
},
{
"position": "engineer",
"tier": "most_capable"
}
],
"pipelines": {
"agent_code": "untrusted"
},
"positions": [
{
"position": "engineer"
},
{
"position": "engineer"
}
],
"rituals": [
{
"cadence": {
"at": "at-d371",
"every": "day"
},
"key": "key-f0c2",
"kind": "stand_up",
"name": "payments-api",
"scope": {
"squad": "squad-5b3f"
}
}
],
"squads": [
{
"key": "key-b8fa",
"lead": "lead-70d1",
"name": "payments-api"
},
{
"key": "key-ba51",
"lead": "lead-dbe2",
"name": "payments-api"
}
],
"tracker": {
"kind": "gitmoap"
},
"triggers": {
"principals": [
"ba765608-c246-405b-a17c-d30f5da5ef7d",
"97a7c493-7410-4d0b-b0b8-91ebdea76073"
]
}
},
"body_digest": "body-digest-9630",
"created_at": "2026-10-15T13:59:58Z",
"created_by": {
"email": "mara@acme.example",
"id": "id-5597",
"username": "mara",
"avatar_url": "https://gitmoap.example/acme/4b32dea8",
"kind": "user"
},
"number": 17,
"org_id": "7322ffdf-9efe-4d03-a1a8-6b4298f93d45",
"revision_id": "b471415f-9011-41b6-96cc-8e139c15de76",
"state": "draft",
"updated_at": "2026-10-12T20:36:06Z",
"note": "note-4e5c",
"parent_number": 61,
"published_at": "2026-10-15T17:04:52Z",
"published_by": {
"email": "mara@acme.example",
"id": "id-2be5",
"username": "mara",
"avatar_url": "https://gitmoap.example/acme/93686274",
"kind": "user"
}
}
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 reason or code.
    • fieldstring or nulloptionalOn a 400 that 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 on code otherwise.
    • required_scopestring or nulloptionalThe scope the access token was missing, on INSUFFICIENT_SCOPE.
    • violationsanyoptionalPresent on the structured-validation errors (PROVIDER_VALIDATION_FAILED per-node, PIPELINE_VALIDATION_FAILED DAG): 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-a965",
"message": "Stream pipeline status into the run header"
}
}
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 reason or code.
    • fieldstring or nulloptionalOn a 400 that 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 on code otherwise.
    • required_scopestring or nulloptionalThe scope the access token was missing, on INSUFFICIENT_SCOPE.
    • violationsanyoptionalPresent on the structured-validation errors (PROVIDER_VALIDATION_FAILED per-node, PIPELINE_VALIDATION_FAILED DAG): 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-9ccc",
"message": "Draw the region map from operation density"
}
}
403Forbidden — the caller's access level or token scope is insufficientapplication/json
Error codes
  • FORBIDDENYou are signed in but may not do this here; reason names the permission or the rule that refused it
  • INSUFFICIENT_SCOPEThe access token lacks the scope this operation needs; required_scope names 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 reason or code.
    • fieldstring or nulloptionalOn a 400 that 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 on code otherwise.
    • required_scopestring or nulloptionalThe scope the access token was missing, on INSUFFICIENT_SCOPE.
    • violationsanyoptionalPresent on the structured-validation errors (PROVIDER_VALIDATION_FAILED per-node, PIPELINE_VALIDATION_FAILED DAG): 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-c2c2",
"message": "Label every synthesized example"
}
}
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 reason or code.
    • fieldstring or nulloptionalOn a 400 that 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 on code otherwise.
    • required_scopestring or nulloptionalThe scope the access token was missing, on INSUFFICIENT_SCOPE.
    • violationsanyoptionalPresent on the structured-validation errors (PROVIDER_VALIDATION_FAILED per-node, PIPELINE_VALIDATION_FAILED DAG): 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-d41b",
"message": "Inline scalar newtypes but keep their brand"
}
}
409It is not a proposed revisionapplication/json
Error codes
  • CONFLICTThe request conflicts with the resource's current state; reason says how
  • LEGAL_ACCEPTANCE_REQUIREDAccept the current Terms of Service before changing anything; reading stays open
  • 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 reason or code.
    • fieldstring or nulloptionalOn a 400 that 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 on code otherwise.
    • required_scopestring or nulloptionalThe scope the access token was missing, on INSUFFICIENT_SCOPE.
    • violationsanyoptionalPresent on the structured-validation errors (PROVIDER_VALIDATION_FAILED per-node, PIPELINE_VALIDATION_FAILED DAG): 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.
409 exampleSynthesized example
{
"error": {
"code": "code-0f47",
"message": "Pin a page's payload to the build that rendered it"
}
}

CLI

gitmoap ai-org decline-ai-org-revision

  • --group-ididThe organization's top-level group (id or group path)
  • --numbernumberThe proposed revision