flagon-io/g1t

public

Git for AI scale: a forge for thousands of agents working on the same code at once.

g1t/apps/api/src/reference.json

3,681 lines105,447 bytesCodeBlame
{
	"device_code": {
		"request": {
			"client_name": "Claude Code"
		},
		"response": {
			"device_code": "Gm3k…",
			"user_code": "WDJB-MJHT",
			"verification_uri": "https://g1t.sh/device",
			"verification_uri_complete": "https://g1t.sh/device?code=WDJB-MJHT",
			"expires_in": 900,
			"interval": 5
		}
	},
	"device_token": {
		"request": {
			"device_code": "Gm3k…"
		},
		"response": {
			"status": "approved",
			"token": "g1t_…",
			"username": "syntaqx",
			"verified": true
		}
	},
	"whoami": {
		"response": {
			"id": "usr_01kkntcg1eeb98j62xjm7eh09p",
			"username": "syntaqx",
			"kind": "user",
			"verified": true,
			"workspaces": [
				{
					"slug": "acme",
					"role": "member",
					"base_permission": "write"
				},
				{
					"slug": "flagon-io",
					"role": "owner",
					"base_permission": "write"
				}
			]
		},
		"notes": "`kind` is `user`, `workspace` for a [workspace access token](/guides/workspaces/#workspace-access-tokens), or `agent` for the token a g1t agent works with. For a workspace token, `username` is the workspace's slug and `workspaces` holds only that workspace. Each workspace carries its `base_permission`: what a member gets on each of its repositories (owners have Admin). Roles given on single repositories are in `grants`, each with `repo_id`, `workspace` and `role`; it is left out when there are none. See [Access and roles](/guides/access-and-roles/)."
	},
	"create_workspace": {
		"request": {
			"slug": "acme-labs",
			"name": "Acme Labs"
		},
		"response": {
			"id": "wsp_01m43teqa9em6bje0bhvdj4jkb",
			"slug": "acme-labs",
			"name": "Acme Labs",
			"description": null,
			"created_at": "2026-10-04T16:02:51.337Z",
			"member_count": 1,
			"base_permission": "write"
		},
		"notes": "`base_permission` is what every member gets on each of its repositories: `write` until an owner changes it with `PATCH /workspaces/{workspace}`. See [Access and roles](/guides/access-and-roles/)."
	},
	"delete_workspace": {
		"request": {
			"confirm": "acme-labs"
		},
		"response": true,
		"notes": "Refused with `409` while the workspace holds repositories or projects, and with `402` while billing cannot settle it, each with a message that says what to do. See [Delete a workspace](/guides/workspaces/#delete-a-workspace)."
	},
	"list_emails": {
		"response": {
			"emails": [
				{
					"email": "ada@example.com",
					"verified": true,
					"primary": true,
					"backup": false,
					"created_at": "2026-09-01T10:00:00.000Z",
					"verified_at": "2026-09-01T10:02:11.000Z"
				},
				{
					"email": "ada@acme.com",
					"verified": true,
					"primary": false,
					"backup": true,
					"created_at": "2026-10-02T09:30:00.000Z",
					"verified_at": "2026-10-02T09:31:40.000Z"
				},
				{
					"email": "ada.l@example.org",
					"verified": false,
					"primary": false,
					"backup": false,
					"created_at": "2026-10-05T14:12:03.000Z",
					"verified_at": null
				}
			],
			"private_email": true,
			"block_private_pushes": false,
			"noreply": "6c1d0efg+ada@users.noreply.g1t.sh",
			"commit_email": "6c1d0efg+ada@users.noreply.g1t.sh",
			"limit": 10
		},
		"notes": "Your primary address comes first, then confirmed addresses, then unconfirmed ones. Any confirmed address signs you in, can reset your password and attributes commits to you. See [Email addresses](/guides/authentication/#email-addresses)."
	},
	"add_email": {
		"request": {
			"email": "ada.l@example.org",
			"password": "…"
		},
		"response": {
			"emails": [
				{
					"email": "ada@example.com",
					"verified": true,
					"primary": true,
					"backup": false,
					"created_at": "2026-09-01T10:00:00.000Z",
					"verified_at": "2026-09-01T10:02:11.000Z"
				},
				{
					"email": "ada@acme.com",
					"verified": true,
					"primary": false,
					"backup": true,
					"created_at": "2026-10-02T09:30:00.000Z",
					"verified_at": "2026-10-02T09:31:40.000Z"
				},
				{
					"email": "ada.l@example.org",
					"verified": false,
					"primary": false,
					"backup": false,
					"created_at": "2026-10-05T14:12:03.000Z",
					"verified_at": null
				}
			],
			"private_email": true,
			"block_private_pushes": false,
			"noreply": "6c1d0efg+ada@users.noreply.g1t.sh",
			"commit_email": "6c1d0efg+ada@users.noreply.g1t.sh",
			"limit": 10
		},
		"notes": "Answers `403` with code `reauth_required` when `password` is missing or wrong, and `409` when another account has confirmed the address. The new address stays unconfirmed until its link is followed."
	},
	"remove_email": {
		"request": {
			"password": "…"
		},
		"response": {
			"emails": [
				{
					"email": "ada@example.com",
					"verified": true,
					"primary": true,
					"backup": false,
					"created_at": "2026-09-01T10:00:00.000Z",
					"verified_at": "2026-09-01T10:02:11.000Z"
				},
				{
					"email": "ada@acme.com",
					"verified": true,
					"primary": false,
					"backup": true,
					"created_at": "2026-10-02T09:30:00.000Z",
					"verified_at": "2026-10-02T09:31:40.000Z"
				},
				{
					"email": "ada.l@example.org",
					"verified": false,
					"primary": false,
					"backup": false,
					"created_at": "2026-10-05T14:12:03.000Z",
					"verified_at": null
				}
			],
			"private_email": true,
			"block_private_pushes": false,
			"noreply": "6c1d0efg+ada@users.noreply.g1t.sh",
			"commit_email": "6c1d0efg+ada@users.noreply.g1t.sh",
			"limit": 10
		},
		"notes": "Give the address in the path, URL-encoded: `DELETE /user/emails/ada.l%40example.org`. Answers `409` for your primary address or your last confirmed one."
	},
	"update_email_settings": {
		"request": {
			"primary": "ada@acme.com",
			"password": "…"
		},
		"response": {
			"emails": [
				{
					"email": "ada@example.com",
					"verified": true,
					"primary": true,
					"backup": false,
					"created_at": "2026-09-01T10:00:00.000Z",
					"verified_at": "2026-09-01T10:02:11.000Z"
				},
				{
					"email": "ada@acme.com",
					"verified": true,
					"primary": false,
					"backup": true,
					"created_at": "2026-10-02T09:30:00.000Z",
					"verified_at": "2026-10-02T09:31:40.000Z"
				},
				{
					"email": "ada.l@example.org",
					"verified": false,
					"primary": false,
					"backup": false,
					"created_at": "2026-10-05T14:12:03.000Z",
					"verified_at": null
				}
			],
			"private_email": true,
			"block_private_pushes": false,
			"noreply": "6c1d0efg+ada@users.noreply.g1t.sh",
			"commit_email": "6c1d0efg+ada@users.noreply.g1t.sh",
			"limit": 10
		},
		"notes": "Only the fields given change. `primary` and `backup` need `password`; `private_email` and `block_private_pushes` do not."
	},
	"list_invites": {
		"response": {
			"mode": "invite",
			"allowance": {
				"limit": 5,
				"used": 2,
				"remaining": 3
			},
			"workspaces": [
				{
					"slug": "acme-labs",
					"allowance": {
						"limit": 20,
						"used": 4,
						"remaining": 16
					}
				}
			],
			"invites": [
				{
					"id": "inv_01kp2x7m8n9q0r1s2t3v4w5x6y",
					"code": "g1t-k7m2-q9xd-4hpw-…",
					"hint": "g1t-k7m2",
					"email": "ada@example.com",
					"kind": "account",
					"workspace": null,
					"status": "pending",
					"charged_to": "user",
					"invited_by": "syntaqx",
					"redeemed_by": null,
					"created_at": "2026-10-05T17:00:00.000Z",
					"expires_at": "2026-11-04T17:00:00.000Z",
					"redeemed_at": null,
					"revoked_at": null
				},
				{
					"id": "inv_01kp1v3c4d5e6f7g8h9j0k1m2n",
					"code": null,
					"hint": "g1t-p3rt",
					"email": null,
					"kind": "account",
					"workspace": null,
					"status": "redeemed",
					"charged_to": "user",
					"invited_by": "syntaqx",
					"redeemed_by": "grace",
					"created_at": "2026-10-02T09:12:40.000Z",
					"expires_at": "2026-11-01T09:12:40.000Z",
					"redeemed_at": "2026-10-02T11:30:05.000Z",
					"revoked_at": null
				}
			]
		},
		"notes": "`allowance.limit` and `allowance.remaining` are null when you have no limit. A revoked or expired invite that was never used is not counted. Ask for more at hey@flagon.io with the subject `[g1t Invites]`. See [Invites](/guides/authentication/#invites)."
	},
	"create_invite": {
		"request": {
			"email": "ada@example.com"
		},
		"response": {
			"id": "inv_01kp2x7m8n9q0r1s2t3v4w5x6y",
			"code": "g1t-k7m2-q9xd-4hpw-…",
			"hint": "g1t-k7m2",
			"email": "ada@example.com",
			"kind": "account",
			"workspace": null,
			"status": "pending",
			"charged_to": "user",
			"invited_by": "syntaqx",
			"redeemed_by": null,
			"created_at": "2026-10-05T17:00:00.000Z",
			"expires_at": "2026-11-04T17:00:00.000Z",
			"redeemed_at": null,
			"revoked_at": null
		},
		"notes": "Refused with `402` (`limit`) when you have no invites left, with `409` when you already have a pending invite for that address or it already has a g1t account, and with `403` for an agent's or a workspace's token. The code is returned in full; send people the link `https://g1t.sh/invite/<code>`."
	},
	"revoke_invite": {
		"response": {
			"id": "inv_01kp2x7m8n9q0r1s2t3v4w5x6y",
			"code": null,
			"hint": "g1t-k7m2",
			"email": "ada@example.com",
			"kind": "account",
			"workspace": null,
			"status": "revoked",
			"charged_to": "user",
			"invited_by": "syntaqx",
			"redeemed_by": null,
			"created_at": "2026-10-05T17:00:00.000Z",
			"expires_at": "2026-11-04T17:00:00.000Z",
			"redeemed_at": null,
			"revoked_at": "2026-10-06T08:00:00.000Z"
		}
	},
	"list_workspace_invites": {
		"response": [
			{
				"id": "inv_01kp2x7m8n9q0r1s2t3v4w5x6y",
				"code": "g1t-k7m2-q9xd-4hpw-…",
				"hint": "g1t-k7m2",
				"email": "ada@example.com",
				"kind": "account",
				"workspace": "acme-labs",
				"status": "pending",
				"charged_to": "workspace",
				"invited_by": "syntaqx",
				"redeemed_by": null,
				"created_at": "2026-10-05T17:00:00.000Z",
				"expires_at": "2026-11-04T17:00:00.000Z",
				"redeemed_at": null,
				"revoked_at": null
			},
			{
				"id": "inv_01kp1z9y8x7w6v5t4s3r2q1p0n",
				"code": "g1t-k7m2-q9xd-4hpw-…",
				"hint": "g1t-w2vb",
				"email": "linus@example.com",
				"kind": "workspace",
				"workspace": "acme-labs",
				"status": "pending",
				"charged_to": "none",
				"invited_by": "syntaqx",
				"redeemed_by": null,
				"created_at": "2026-10-05T17:00:00.000Z",
				"expires_at": "2026-11-04T17:00:00.000Z",
				"redeemed_at": null,
				"revoked_at": null
			}
		]
	},
	"invite_member": {
		"request": {
			"email": "ada@example.com"
		},
		"response": {
			"id": "inv_01kp2x7m8n9q0r1s2t3v4w5x6y",
			"code": "g1t-k7m2-q9xd-4hpw-…",
			"hint": "g1t-k7m2",
			"email": "ada@example.com",
			"kind": "account",
			"workspace": "acme-labs",
			"status": "pending",
			"charged_to": "workspace",
			"invited_by": "syntaqx",
			"redeemed_by": null,
			"created_at": "2026-10-05T17:00:00.000Z",
			"expires_at": "2026-11-04T17:00:00.000Z",
			"redeemed_at": null,
			"revoked_at": null
		},
		"notes": "`kind` is `workspace` when the address already has a g1t account (`charged_to` is then `none`), and `account` when accepting makes one. Both answers look alike to the caller on purpose: the invite is emailed either way."
	},
	"revoke_workspace_invite": {
		"response": {
			"id": "inv_01kp2x7m8n9q0r1s2t3v4w5x6y",
			"code": null,
			"hint": "g1t-k7m2",
			"email": "ada@example.com",
			"kind": "account",
			"workspace": "acme-labs",
			"status": "revoked",
			"charged_to": "workspace",
			"invited_by": "syntaqx",
			"redeemed_by": null,
			"created_at": "2026-10-05T17:00:00.000Z",
			"expires_at": "2026-11-04T17:00:00.000Z",
			"redeemed_at": null,
			"revoked_at": "2026-10-06T08:00:00.000Z"
		}
	},
	"list_repos": {
		"query": {
			"q": "hello"
		},
		"response": [
			{
				"id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
				"namespace": "flagon-io",
				"name": "hello",
				"description": "A tiny service that says hello.",
				"is_private": false,
				"owner_id": "usr_01kkntcg1eeb98j62xjm7eh09p",
				"default_branch": "main",
				"fork_of": null,
				"protected": true,
				"created_at": "2026-09-28T14:11:52.640Z",
				"website": "https://hello.g1t.page",
				"archived_at": null
			}
		],
		"notes": "Returns at most 50 repositories, newest first. Forks made for pull requests are left out."
	},
	"create_repo": {
		"request": {
			"workspace": "flagon-io",
			"name": "hello-cli",
			"description": "Command-line client for hello.",
			"private": false
		},
		"response": {
			"id": "rep_01m43tk1jhehztx23drs87f5fc",
			"namespace": "flagon-io",
			"name": "hello-cli",
			"description": "Command-line client for hello.",
			"is_private": false,
			"owner_id": "usr_01kkntcg1eeb98j62xjm7eh09p",
			"default_branch": "main",
			"fork_of": null,
			"protected": false,
			"created_at": "2026-10-04T16:05:12.913Z",
			"website": "https://hello.g1t.page",
			"archived_at": null
		},
		"notes": "`owner_id` is the id of the person who created the repository. With `import_url`, `default_branch` is the default branch of the repository copied."
	},
	"get_repo": {
		"response": {
			"id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
			"namespace": "flagon-io",
			"name": "hello",
			"description": "A tiny service that says hello.",
			"is_private": false,
			"owner_id": "usr_01kkntcg1eeb98j62xjm7eh09p",
			"default_branch": "main",
			"fork_of": null,
			"protected": true,
			"created_at": "2026-09-28T14:11:52.640Z",
			"website": "https://hello.g1t.page",
			"archived_at": null
		}
	},
	"update_repo": {
		"request": {
			"description": "Says hello, politely.",
			"website": "hello.g1t.page",
			"default_branch": "trunk",
			"protected": true
		},
		"response": {
			"id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
			"namespace": "flagon-io",
			"name": "hello",
			"description": "Says hello, politely.",
			"is_private": false,
			"owner_id": "usr_01kkntcg1eeb98j62xjm7eh09p",
			"default_branch": "trunk",
			"fork_of": null,
			"protected": true,
			"created_at": "2026-09-28T14:11:52.640Z",
			"topics": [
				"http",
				"example"
			],
			"website": "https://hello.g1t.page",
			"archived_at": null
		},
		"notes": "Only the fields given change. `website` gets `https://` when no scheme is given; an empty string clears it. `default_branch` must name a branch that exists (`422` otherwise); it is changed after the other fields. `description`, `website`, `topics` and `protected` need the Maintain role or higher, and `private` and `default_branch` the Admin role (`403` otherwise, saying which role). Changing `private` here needs no confirmation; `POST /repos/{owner}/{name}/visibility` asks for one. Making it private is refused with `402` when a free workspace's private storage has no room for it. See [Managing a repository](/guides/managing-repositories/) and [Access and roles](/guides/access-and-roles/)."
	},
	"transfer_repo": {
		"request": {
			"to": "flagon-io"
		},
		"response": {
			"id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
			"namespace": "flagon-io",
			"name": "hello",
			"description": "A tiny service that says hello.",
			"is_private": false,
			"owner_id": "usr_01kkntcg1eeb98j62xjm7eh09p",
			"default_branch": "main",
			"fork_of": null,
			"protected": true,
			"created_at": "2026-09-28T14:11:52.640Z",
			"website": "https://hello.g1t.page",
			"archived_at": null
		},
		"notes": "The repository at its new address. Refused with `409` when the destination already has a repository of that name, `403` unless you own both workspaces, and `402` when a free destination has no room for a private repository. The old address redirects. See [Transferring a repository](/guides/transferring-repositories/)."
	},
	"rename_repo": {
		"request": {
			"name": "greeter"
		},
		"response": {
			"id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
			"namespace": "flagon-io",
			"name": "greeter",
			"description": "A tiny service that says hello.",
			"is_private": false,
			"owner_id": "usr_01kkntcg1eeb98j62xjm7eh09p",
			"default_branch": "main",
			"fork_of": null,
			"protected": true,
			"created_at": "2026-09-28T14:11:52.640Z",
			"topics": [
				"http",
				"example"
			],
			"website": "https://hello.g1t.page",
			"archived_at": null
		},
		"notes": "The repository under its new name. Needs the Admin role (`403` otherwise). Refused with `409` when the workspace already has a repository of that name, a recently deleted one included, and with `422` when the name is not valid. The old address redirects. See [Rename a repository](/guides/managing-repositories/#rename-a-repository)."
	},
	"rename_branch": {
		"params": {
			"owner": "flagon-io",
			"name": "hello",
			"branch": "feature/login"
		},
		"request": {
			"new_name": "feature/sign-in"
		},
		"response": {
			"id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
			"namespace": "flagon-io",
			"name": "hello",
			"description": "A tiny service that says hello.",
			"is_private": false,
			"owner_id": "usr_01kkntcg1eeb98j62xjm7eh09p",
			"default_branch": "main",
			"fork_of": null,
			"protected": true,
			"created_at": "2026-09-28T14:11:52.640Z",
			"topics": [
				"http",
				"example"
			],
			"website": "https://hello.g1t.page",
			"archived_at": null
		},
		"notes": "The repository after the rename; renaming the default branch changes `default_branch`. Send a branch name with slashes URL-encoded, as one path segment. Refused with `404` when there is no such branch, `409` when a branch named `new_name` exists, `422` when `new_name` is not a valid branch name, and `403` without the Write role, or without the Admin role for the default branch. See [Rename a branch](/guides/managing-repositories/#rename-a-branch)."
	},
	"set_repo_visibility": {
		"request": {
			"private": true,
			"confirm": "flagon-io/hello"
		},
		"response": {
			"id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
			"namespace": "flagon-io",
			"name": "hello",
			"description": "A tiny service that says hello.",
			"is_private": true,
			"owner_id": "usr_01kkntcg1eeb98j62xjm7eh09p",
			"default_branch": "main",
			"fork_of": null,
			"protected": true,
			"created_at": "2026-09-28T14:11:52.640Z",
			"topics": [
				"http",
				"example"
			],
			"website": "https://hello.g1t.page",
			"archived_at": null
		},
		"notes": "Needs the Admin role (`403` otherwise). Refused with `422` when `confirm` is not the repository's full name, and with `402` when a free workspace's private storage has no room for it. See [Change who can see a repository](/guides/managing-repositories/#change-who-can-see-a-repository)."
	},
	"archive_repo": {
		"response": {
			"id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
			"namespace": "flagon-io",
			"name": "hello",
			"description": "A tiny service that says hello.",
			"is_private": false,
			"owner_id": "usr_01kkntcg1eeb98j62xjm7eh09p",
			"default_branch": "main",
			"fork_of": null,
			"protected": true,
			"created_at": "2026-09-28T14:11:52.640Z",
			"topics": [
				"http",
				"example"
			],
			"website": "https://hello.g1t.page",
			"archived_at": "2026-10-05T09:30:00.000Z"
		},
		"notes": "The repository, with `archived_at` set. Needs the Admin role (`403` otherwise). See [Archive a repository](/guides/managing-repositories/#archive-a-repository)."
	},
	"unarchive_repo": {
		"response": {
			"id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
			"namespace": "flagon-io",
			"name": "hello",
			"description": "A tiny service that says hello.",
			"is_private": false,
			"owner_id": "usr_01kkntcg1eeb98j62xjm7eh09p",
			"default_branch": "main",
			"fork_of": null,
			"protected": true,
			"created_at": "2026-09-28T14:11:52.640Z",
			"topics": [
				"http",
				"example"
			],
			"website": "https://hello.g1t.page",
			"archived_at": null
		},
		"notes": "The repository, with `archived_at` null. Needs the Admin role (`403` otherwise)."
	},
	"delete_repo": {
		"request": {
			"confirm": "flagon-io/hello"
		},
		"response": {
			"id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
			"namespace": "flagon-io",
			"name": "hello",
			"description": "A tiny service that says hello.",
			"is_private": false,
			"deleted_at": "2026-10-05T09:30:00.000Z",
			"deleted_by": "syntaqx",
			"purge_after": "2026-11-04T09:30:00.000Z"
		},
		"notes": "The deleted repository and when it will be purged, 30 days on. Owners of the workspace only (`403`), whatever their role on the repository. Refused with `422` when `confirm` is not its full name. Its name stays taken until it is purged. See [Delete a repository](/guides/managing-repositories/#delete-a-repository)."
	},
	"list_deleted_repos": {
		"params": {
			"workspace": "flagon-io"
		},
		"response": [
			{
				"id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
				"namespace": "flagon-io",
				"name": "hello",
				"description": "A tiny service that says hello.",
				"is_private": false,
				"deleted_at": "2026-10-05T09:30:00.000Z",
				"deleted_by": "syntaqx",
				"purge_after": "2026-11-04T09:30:00.000Z"
			}
		],
		"notes": "Newest first. Empty for anyone who is not an owner of the workspace."
	},
	"restore_repo": {
		"response": {
			"id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
			"namespace": "flagon-io",
			"name": "hello",
			"description": "A tiny service that says hello.",
			"is_private": false,
			"owner_id": "usr_01kkntcg1eeb98j62xjm7eh09p",
			"default_branch": "main",
			"fork_of": null,
			"protected": true,
			"created_at": "2026-09-28T14:11:52.640Z",
			"topics": [
				"http",
				"example"
			],
			"website": "https://hello.g1t.page",
			"archived_at": null
		},
		"notes": "The repository, back at its address. Name it by the path it had. Owners only (`403`); `404` when no deleted repository had that path, or it has been purged. See [Restore a repository](/guides/managing-repositories/#restore-a-repository)."
	},
	"purge_repo": {
		"request": {
			"confirm": "flagon-io/hello"
		},
		"response": true,
		"notes": "Permanent: it cannot be restored afterwards, and its name is free again. Only a deleted repository can be purged (`404` otherwise). Owners only (`403`); `422` when `confirm` is not its full name."
	},
	"get_repo_settings": {
		"response": {
			"auto_merge": false,
			"require_up_to_date": false,
			"required_approvals": 0,
			"count_agent_approvals": true,
			"allow_ignoring_checks": true,
			"agent_review": true,
			"max_revisions": 2,
			"merge_queue": false,
			"updated_by": null,
			"updated_at": null
		}
	},
	"update_repo_settings": {
		"request": {
			"required_approvals": 1,
			"count_agent_approvals": false,
			"merge_queue": true
		},
		"response": {
			"auto_merge": false,
			"require_up_to_date": false,
			"required_approvals": 1,
			"count_agent_approvals": false,
			"allow_ignoring_checks": true,
			"agent_review": true,
			"max_revisions": 2,
			"merge_queue": true,
			"updated_by": "syntaqx",
			"updated_at": "2026-10-04T16:20:37.508Z"
		},
		"notes": "`required_approvals` is at most 6 and `max_revisions` at most 5. See [what a repository can ask for](/guides/g1t-agents/#what-a-repository-can-ask-for)."
	},
	"list_events": {
		"query": {
			"before": "evt_01m43t2a6c9e3g7j1m5q9t3x7b"
		},
		"response": [
			{
				"id": "evt_01m43smh3ve52vkcna207vqctf",
				"type": "pull.opened",
				"source": "work",
				"time": "2026-10-01T18:20:02.117Z",
				"repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
				"actor": "usr_01kkntcg1eeb98j62xjm7eh09p",
				"data": {
					"pull_id": "pr_01m43smh3vexsr5pmp60qwv0vs",
					"repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
					"number": 14,
					"issue": 12,
					"agent": "claude-code"
				}
			},
			{
				"id": "evt_01m43shrzpf2vt5rxbb02z0xjt",
				"type": "issue.opened",
				"source": "work",
				"time": "2026-10-01T18:04:11.482Z",
				"repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
				"actor": "usr_01kkntcg1eeb98j62xjm7eh09p",
				"data": {
					"issue_id": "iss_01m43shrzpfe49x74ga7sj1c6v",
					"repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
					"number": 12,
					"title": "Greeting should name the caller"
				}
			}
		],
		"notes": "Returns 50 events a page. To page back, send the `id` of the last event you have as `before`. `actor` is a user id, and `data` depends on `type`."
	},
	"list_issues": {
		"query": {
			"state": "open",
			"label": "feature"
		},
		"response": [
			{
				"id": "iss_01m43shrzpfe49x74ga7sj1c6v",
				"repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
				"number": 12,
				"title": "Greeting should name the caller",
				"body": "Take a name from the first argument; fall back to world.",
				"labels": [
					"feature"
				],
				"checks": [
					"cargo test"
				],
				"state": "open",
				"reason": null,
				"resolved_by": null,
				"author": {
					"id": "usr_01kkntcg1eeb98j62xjm7eh09p",
					"username": "syntaqx",
					"kind": "user",
					"verified": false,
					"workspaces": []
				},
				"created_at": "2026-10-01T18:04:11.482Z",
				"updated_at": "2026-10-01T18:04:11.482Z",
				"closed_at": null,
				"pull_count": 1,
				"comment_count": 0,
				"assignees": [],
				"blocked_by": [],
				"queued": false,
				"agent": "claude-code"
			}
		],
		"notes": "Returns at most 100 issues, newest first. `comment_count` counts comments, not events such as \"opened #14 for this\"."
	},
	"create_issue": {
		"request": {
			"title": "Greeting should name the caller",
			"body": "Take a name from the first argument; fall back to world.",
			"labels": [
				"feature"
			],
			"checks": [
				"cargo test"
			]
		},
		"response": {
			"id": "iss_01m43shrzpfe49x74ga7sj1c6v",
			"repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
			"number": 12,
			"title": "Greeting should name the caller",
			"body": "Take a name from the first argument; fall back to world.",
			"labels": [
				"feature"
			],
			"checks": [
				"cargo test"
			],
			"state": "open",
			"reason": null,
			"resolved_by": null,
			"author": {
				"id": "usr_01kkntcg1eeb98j62xjm7eh09p",
				"username": "syntaqx",
				"kind": "user",
				"verified": false,
				"workspaces": []
			},
			"created_at": "2026-10-01T18:04:11.482Z",
			"updated_at": "2026-10-01T18:04:11.482Z",
			"closed_at": null,
			"pull_count": 0,
			"comment_count": 0,
			"assignees": [],
			"blocked_by": [],
			"queued": false,
			"agent": null
		},
		"notes": "Labels are lowercased. A label not used before is created."
	},
	"get_issue": {
		"response": {
			"issue": {
				"id": "iss_01m43shrzpfe49x74ga7sj1c6v",
				"repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
				"number": 12,
				"title": "Greeting should name the caller",
				"body": "Take a name from the first argument; fall back to world.",
				"labels": [
					"feature"
				],
				"checks": [
					"cargo test"
				],
				"state": "closed",
				"reason": "completed",
				"resolved_by": 14,
				"author": {
					"id": "usr_01kkntcg1eeb98j62xjm7eh09p",
					"username": "syntaqx",
					"kind": "user",
					"verified": false,
					"workspaces": []
				},
				"created_at": "2026-10-01T18:04:11.482Z",
				"updated_at": "2026-10-01T18:52:17.093Z",
				"closed_at": "2026-10-01T18:52:17.093Z",
				"pull_count": 2,
				"comment_count": 0,
				"assignees": [],
				"blocked_by": [],
				"queued": false,
				"agent": null
			},
			"pulls": [
				{
					"id": "pr_01m43sjq8tcz5rbm2a7k4d9e6w",
					"repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
					"number": 13,
					"issue": 12,
					"title": "Greeting should name the caller",
					"body": null,
					"agent": "claude-code",
					"runtime": "external",
					"status": "closed",
					"fork": {
						"namespace": "pulls",
						"name": "pr_01m43sjq8tcz5rbm2a7k4d9e6w"
					},
					"fork_repo_id": "rep_01m43smh5xd7aw2kq9tv0b4c8e",
					"branch": null,
					"head_commit": null,
					"merge_base": null,
					"merged_by": null,
					"merged_at": null,
					"superseded_by": 14,
					"check_status": null,
					"files": [],
					"assignees": [],
					"reviewers": [],
					"author": {
						"id": "usr_01kkntcg1eeb98j62xjm7eh09p",
						"username": "syntaqx",
						"kind": "user",
						"verified": false,
						"workspaces": []
					},
					"created_at": "2026-10-01T18:20:02.117Z",
					"updated_at": "2026-10-01T18:20:02.117Z"
				},
				{
					"id": "pr_01m43smh3vexsr5pmp60qwv0vs",
					"repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
					"number": 14,
					"issue": 12,
					"title": "Greeting should name the caller",
					"body": "Reads a name from the first argument. `hello ana` prints \"Hello, ana!\".",
					"agent": "claude-code",
					"runtime": "external",
					"status": "merged",
					"fork": {
						"namespace": "pulls",
						"name": "pr_01m43smh3vexsr5pmp60qwv0vs"
					},
					"fork_repo_id": "rep_01m43smh5xd7aw2kq9tv0b4c8e",
					"branch": null,
					"head_commit": "9f2c4e1a7b3d5f60812a4c6e8b0d2f4a6c8e0b13",
					"merge_base": "3a7e9c1b5d2f4a6c8e0b2d4f6a8c0e2b4d6f8a1c",
					"merged_by": "syntaqx",
					"merged_at": "2026-10-01T18:52:17.093Z",
					"superseded_by": null,
					"check_status": "passed",
					"files": [
						{
							"path": "src/main.rs",
							"additions": 6,
							"deletions": 2
						}
					],
					"assignees": [],
					"reviewers": [
						"ana"
					],
					"author": {
						"id": "usr_01kkntcg1eeb98j62xjm7eh09p",
						"username": "syntaqx",
						"kind": "user",
						"verified": false,
						"workspaces": []
					},
					"created_at": "2026-10-01T18:20:02.117Z",
					"updated_at": "2026-10-01T18:52:17.093Z"
				}
			],
			"comments": [
				{
					"id": "cmt_01m43sr2b7d5f0j6k3n8p1q4v9",
					"kind": "event",
					"author": {
						"id": "usr_01kkntcg1eeb98j62xjm7eh09p",
						"username": "syntaqx",
						"kind": "user",
						"verified": false,
						"workspaces": []
					},
					"body": "opened #14 for this",
					"path": null,
					"line": null,
					"verdict": null,
					"created_at": "2026-10-01T18:20:02.141Z"
				}
			]
		},
		"notes": "A closed issue says how it was closed: `reason` is `completed` or `not_planned`, and `resolved_by` is the number of the pull request whose merge closed it. Each pull request made for it is listed; one closed because another was merged has `superseded_by` set."
	},
	"update_issue": {
		"request": {
			"labels": [
				"feature",
				"good first issue"
			],
			"assignees": [
				"syntaqx"
			]
		},
		"response": {
			"id": "iss_01m43shrzpfe49x74ga7sj1c6v",
			"repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
			"number": 12,
			"title": "Greeting should name the caller",
			"body": "Take a name from the first argument; fall back to world.",
			"labels": [
				"feature",
				"good first issue"
			],
			"checks": [
				"cargo test"
			],
			"state": "open",
			"reason": null,
			"resolved_by": null,
			"author": {
				"id": "usr_01kkntcg1eeb98j62xjm7eh09p",
				"username": "syntaqx",
				"kind": "user",
				"verified": false,
				"workspaces": []
			},
			"created_at": "2026-10-01T18:04:11.482Z",
			"updated_at": "2026-10-01T18:09:47.305Z",
			"closed_at": null,
			"pull_count": 0,
			"comment_count": 0,
			"assignees": [
				"syntaqx"
			],
			"blocked_by": [],
			"queued": false,
			"agent": null
		}
	},
	"close_issue": {
		"request": {
			"reason": "not_planned"
		},
		"response": {
			"id": "iss_01m43shrzpfe49x74ga7sj1c6v",
			"repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
			"number": 12,
			"title": "Greeting should name the caller",
			"body": "Take a name from the first argument; fall back to world.",
			"labels": [
				"feature"
			],
			"checks": [
				"cargo test"
			],
			"state": "closed",
			"reason": "not_planned",
			"resolved_by": null,
			"author": {
				"id": "usr_01kkntcg1eeb98j62xjm7eh09p",
				"username": "syntaqx",
				"kind": "user",
				"verified": false,
				"workspaces": []
			},
			"created_at": "2026-10-01T18:04:11.482Z",
			"updated_at": "2026-10-01T19:30:00.214Z",
			"closed_at": "2026-10-01T19:30:00.214Z",
			"pull_count": 0,
			"comment_count": 0,
			"assignees": [],
			"blocked_by": [],
			"queued": false,
			"agent": null
		}
	},
	"reopen_issue": {
		"response": {
			"id": "iss_01m43shrzpfe49x74ga7sj1c6v",
			"repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
			"number": 12,
			"title": "Greeting should name the caller",
			"body": "Take a name from the first argument; fall back to world.",
			"labels": [
				"feature"
			],
			"checks": [
				"cargo test"
			],
			"state": "open",
			"reason": null,
			"resolved_by": null,
			"author": {
				"id": "usr_01kkntcg1eeb98j62xjm7eh09p",
				"username": "syntaqx",
				"kind": "user",
				"verified": false,
				"workspaces": []
			},
			"created_at": "2026-10-01T18:04:11.482Z",
			"updated_at": "2026-10-01T19:41:52.830Z",
			"closed_at": null,
			"pull_count": 0,
			"comment_count": 0,
			"assignees": [],
			"blocked_by": [],
			"queued": false,
			"agent": null
		}
	},
	"assign_issue": {
		"request": {
			"instructions": "Keep the change to src/main.rs."
		},
		"response": {
			"id": "pr_01m43smh3vexsr5pmp60qwv0vs",
			"repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
			"number": 14,
			"issue": 12,
			"title": "Greeting should name the caller",
			"body": null,
			"agent": "g1t-agent",
			"runtime": "hosted",
			"status": "draft",
			"fork": {
				"namespace": "pulls",
				"name": "pr_01m43smh3vexsr5pmp60qwv0vs"
			},
			"fork_repo_id": "rep_01m43smh5xd7aw2kq9tv0b4c8e",
			"branch": null,
			"head_commit": null,
			"merge_base": null,
			"merged_by": null,
			"merged_at": null,
			"superseded_by": null,
			"check_status": null,
			"files": [],
			"assignees": [],
			"reviewers": [],
			"author": {
				"id": "usr_01kkntcg1eeb98j62xjm7eh09p",
				"username": "syntaqx",
				"kind": "user",
				"verified": false,
				"workspaces": []
			},
			"created_at": "2026-10-01T18:20:02.117Z",
			"updated_at": "2026-10-01T18:20:02.117Z"
		},
		"notes": "The response is the pull request the g1t agent opened, still a draft. Follow it with [get a pull request](/reference/api/pull-requests/get-pull-request/): `lifecycle` says what the agent is doing."
	},
	"add_comment": {
		"request": {
			"body": "Should an empty name fall back to \"world\"?"
		},
		"response": {
			"id": "cmt_01m43sv4c8e2g6j0m4q8t2x6a1",
			"kind": "comment",
			"author": {
				"id": "usr_01kkntcg1eeb98j62xjm7eh09p",
				"username": "syntaqx",
				"kind": "user",
				"verified": true,
				"workspaces": [
					{
						"slug": "flagon-io",
						"role": "owner"
					}
				]
			},
			"body": "Should an empty name fall back to \"world\"?",
			"path": null,
			"line": null,
			"verdict": null,
			"created_at": "2026-10-01T18:12:30.551Z"
		}
	},
	"list_labels": {
		"response": [
			"bug",
			"feature",
			"docs",
			"chore",
			"question",
			"good first issue"
		],
		"notes": "The five default labels come first, then the others used on the repository's issues, alphabetically."
	},
	"plan_work": {
		"request": {
			"brief": "Greet people by name, from the command line and the web page."
		},
		"response": {
			"plan_id": "pln_01m43s9c4e8g2j6m0q4t8x2b6d"
		}
	},
	"get_plan": {
		"params": {
			"plan": "pln_01m43s9c4e8g2j6m0q4t8x2b6d"
		},
		"response": {
			"id": "pln_01m43s9c4e8g2j6m0q4t8x2b6d",
			"repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
			"brief": "Greet people by name, from the command line and the web page.",
			"status": "ready",
			"summary": "Name parsing first, then the two places that print the greeting.",
			"issues": [
				{
					"title": "Greeting should name the caller",
					"body": "Accept an optional name in `greet()` and use it.",
					"labels": [
						"feature"
					],
					"checks": [
						"cargo test"
					],
					"files": [
						"src/greet.rs"
					],
					"depends_on": [],
					"number": null
				},
				{
					"title": "Show the caller's name on the web page",
					"body": "Read `?name=` and pass it to `greet()`.",
					"labels": [
						"feature"
					],
					"checks": [
						"cargo test"
					],
					"files": [
						"src/web.rs"
					],
					"depends_on": [
						1
					],
					"number": null
				}
			],
			"error": null,
			"author": {
				"id": "usr_01kkntcg1eeb98j62xjm7eh09p",
				"username": "syntaqx",
				"kind": "user",
				"verified": false,
				"workspaces": []
			},
			"created_at": "2026-10-01T17:58:40.006Z",
			"finished_at": "2026-10-01T18:01:12.774Z",
			"progress": [],
			"exchanges": []
		},
		"notes": "A plan still `planning` after 20 minutes is reported as `failed`. `progress` follows each issue once the plan is applied."
	},
	"apply_plan": {
		"params": {
			"plan": "pln_01m43s9c4e8g2j6m0q4t8x2b6d"
		},
		"request": {
			"assign": true
		},
		"response": {
			"id": "pln_01m43s9c4e8g2j6m0q4t8x2b6d",
			"repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
			"brief": "Greet people by name, from the command line and the web page.",
			"status": "applied",
			"summary": "Name parsing first, then the two places that print the greeting.",
			"issues": [
				{
					"title": "Greeting should name the caller",
					"body": "Accept an optional name in `greet()` and use it.",
					"labels": [
						"feature"
					],
					"checks": [
						"cargo test"
					],
					"files": [
						"src/greet.rs"
					],
					"depends_on": [],
					"number": 12
				},
				{
					"title": "Show the caller's name on the web page",
					"body": "Read `?name=` and pass it to `greet()`.",
					"labels": [
						"feature"
					],
					"checks": [
						"cargo test"
					],
					"files": [
						"src/web.rs"
					],
					"depends_on": [
						1
					],
					"number": 13
				}
			],
			"error": null,
			"author": {
				"id": "usr_01kkntcg1eeb98j62xjm7eh09p",
				"username": "syntaqx",
				"kind": "user",
				"verified": false,
				"workspaces": []
			},
			"created_at": "2026-10-01T17:58:40.006Z",
			"finished_at": "2026-10-01T18:01:12.774Z",
			"progress": [],
			"exchanges": []
		},
		"notes": "Each opened issue's `number` is filled in. Issues left out with `keep` stay `null`."
	},
	"list_pull_requests": {
		"query": {
			"state": "open"
		},
		"response": [
			{
				"id": "pr_01m43smh3vexsr5pmp60qwv0vs",
				"repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
				"number": 14,
				"issue": 12,
				"title": "Greeting should name the caller",
				"body": "Reads a name from the first argument. `hello ana` prints \"Hello, ana!\".",
				"agent": "claude-code",
				"runtime": "external",
				"status": "open",
				"fork": {
					"namespace": "pulls",
					"name": "pr_01m43smh3vexsr5pmp60qwv0vs"
				},
				"fork_repo_id": "rep_01m43smh5xd7aw2kq9tv0b4c8e",
				"branch": null,
				"head_commit": "9f2c4e1a7b3d5f60812a4c6e8b0d2f4a6c8e0b13",
				"merge_base": null,
				"merged_by": null,
				"merged_at": null,
				"superseded_by": null,
				"check_status": "passed",
				"files": [
					{
						"path": "src/main.rs",
						"additions": 6,
						"deletions": 2
					}
				],
				"assignees": [],
				"reviewers": [
					"ana"
				],
				"author": {
					"id": "usr_01kkntcg1eeb98j62xjm7eh09p",
					"username": "syntaqx",
					"kind": "user",
					"verified": false,
					"workspaces": []
				},
				"created_at": "2026-10-01T18:20:02.117Z",
				"updated_at": "2026-10-01T18:35:44.902Z"
			}
		],
		"notes": "Returns at most 100 pull requests, newest first. `check_status` is `queued`, `running`, `passed`, `failed`, `errored`, or `null` when no checks have run against the head."
	},
	"create_pull_request": {
		"request": {
			"issue": 12,
			"agent": "claude-code"
		},
		"response": {
			"pull": {
				"id": "pr_01m43smh3vexsr5pmp60qwv0vs",
				"repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
				"number": 14,
				"issue": 12,
				"title": "Greeting should name the caller",
				"body": null,
				"agent": "claude-code",
				"runtime": "external",
				"status": "draft",
				"fork": {
					"namespace": "pulls",
					"name": "pr_01m43smh3vexsr5pmp60qwv0vs"
				},
				"fork_repo_id": "rep_01m43smh5xd7aw2kq9tv0b4c8e",
				"branch": null,
				"head_commit": null,
				"merge_base": null,
				"merged_by": null,
				"merged_at": null,
				"superseded_by": null,
				"check_status": null,
				"files": [],
				"assignees": [],
				"reviewers": [],
				"author": {
					"id": "usr_01kkntcg1eeb98j62xjm7eh09p",
					"username": "syntaqx",
					"kind": "user",
					"verified": false,
					"workspaces": []
				},
				"created_at": "2026-10-01T18:20:02.117Z",
				"updated_at": "2026-10-01T18:20:02.117Z"
			},
			"git": {
				"remote": "https://g1t.sh/pulls/pr_01m43smh3vexsr5pmp60qwv0vs.git",
				"username": "syntaqx",
				"password": "your g1t access token"
			}
		},
		"notes": "`title` defaults to the issue's title, and is required when there is no `issue`. Push to `git.remote` with your username and an access token as the password.\n\nSend `branch` to open the pull request from a branch already pushed to the repository. No fork is made, `fork` is `null`, `git.remote` is the repository itself, and the pull request is `open` at once."
	},
	"get_pull_request": {
		"response": {
			"pull": {
				"id": "pr_01m43smh3vexsr5pmp60qwv0vs",
				"repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
				"number": 14,
				"issue": 12,
				"title": "Greeting should name the caller",
				"body": "Reads a name from the first argument. `hello ana` prints \"Hello, ana!\".",
				"agent": "claude-code",
				"runtime": "external",
				"status": "open",
				"fork": {
					"namespace": "pulls",
					"name": "pr_01m43smh3vexsr5pmp60qwv0vs"
				},
				"fork_repo_id": "rep_01m43smh5xd7aw2kq9tv0b4c8e",
				"branch": null,
				"head_commit": "9f2c4e1a7b3d5f60812a4c6e8b0d2f4a6c8e0b13",
				"merge_base": null,
				"merged_by": null,
				"merged_at": null,
				"superseded_by": null,
				"check_status": "passed",
				"files": [
					{
						"path": "src/main.rs",
						"additions": 6,
						"deletions": 2
					}
				],
				"assignees": [],
				"reviewers": [
					"ana"
				],
				"author": {
					"id": "usr_01kkntcg1eeb98j62xjm7eh09p",
					"username": "syntaqx",
					"kind": "user",
					"verified": false,
					"workspaces": []
				},
				"created_at": "2026-10-01T18:20:02.117Z",
				"updated_at": "2026-10-01T18:35:44.902Z"
			},
			"issue": {
				"id": "iss_01m43shrzpfe49x74ga7sj1c6v",
				"repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
				"number": 12,
				"title": "Greeting should name the caller",
				"body": "Take a name from the first argument; fall back to world.",
				"labels": [
					"feature"
				],
				"checks": [
					"cargo test"
				],
				"state": "open",
				"reason": null,
				"resolved_by": null,
				"author": {
					"id": "usr_01kkntcg1eeb98j62xjm7eh09p",
					"username": "syntaqx",
					"kind": "user",
					"verified": false,
					"workspaces": []
				},
				"created_at": "2026-10-01T18:04:11.482Z",
				"updated_at": "2026-10-01T18:20:02.117Z",
				"closed_at": null,
				"pull_count": 1,
				"comment_count": 0,
				"assignees": [],
				"blocked_by": [],
				"queued": false,
				"agent": "claude-code"
			},
			"comments": [
				{
					"id": "cmt_01m43st6d0f4h8k2n6r0v4z8c2",
					"kind": "event",
					"author": {
						"id": "usr_01kkntcg1eeb98j62xjm7eh09p",
						"username": "syntaqx",
						"kind": "user",
						"verified": false,
						"workspaces": []
					},
					"body": "marked this ready for review",
					"path": null,
					"line": null,
					"verdict": null,
					"created_at": "2026-10-01T18:33:10.420Z"
				}
			],
			"checks": {
				"id": "chk_01m43sw8e2g6j0m4q8t2x6a0c4",
				"head_commit": "9f2c4e1a7b3d5f60812a4c6e8b0d2f4a6c8e0b13",
				"status": "passed",
				"results": [
					{
						"command": "cargo test",
						"passed": true,
						"exit_code": 0,
						"output": "test result: ok. 3 passed; 0 failed",
						"duration_ms": 18234
					}
				],
				"error": null,
				"created_at": "2026-10-01T18:33:11.002Z",
				"finished_at": "2026-10-01T18:35:44.902Z"
			},
			"overlaps": [],
			"behind": false,
			"review_pending": false,
			"lifecycle": null,
			"landing": false,
			"stalled": null,
			"messages": [
				{
					"id": "msg_01m43tx5egeh4t3f9zcnjenqvz",
					"author": "syntaqx",
					"body": "Keep \"world\" as the default when no name is given.",
					"created_at": "2026-10-01T18:25:00.310Z",
					"delivered_at": "2026-10-01T18:25:31.007Z",
					"kind": "message",
					"from_number": null,
					"to_number": 14,
					"answer": null,
					"declined": false
				}
			],
			"statuses": []
		},
		"notes": "| Field | |\n| --- | --- |\n| `pull.files` | The files it changes, with lines added and removed. |\n| `checks` | The latest run of the acceptance checks against its head, with each command's output. |\n| `overlaps` | Other pull requests in progress that change the same files. |\n| `behind` | Whether the default branch has moved since it was made. |\n| `landing` | Whether it is being brought up to date to land. |\n| `lifecycle` | For a pull request the g1t agent is seeing through: its stage, such as `working`, `checking`, `reviewing` or `needs_you`. |\n| `comments` | Comments, reviews and events, with `path`, `line` and `verdict`. |\n| `messages` | Messages sent to the agent working on it. |\n| `statuses` | Commit statuses reported for its head, such as workflow runs. |\n| `mergeable` | Whether it merges cleanly into its target: `clean`, `conflicting`, `checking` (being worked out) or `unknown`. Worked out ahead of time whenever it or its target moves. |\n| `conflicts` | When `mergeable` is `conflicting`, the files that conflict. Resolve them by merging the target in, or have the g1t agent do it. |\n| `earlierChecks` | Earlier runs of the acceptance checks, newest first, without their output. |\n\nChecks are started by g1t, not through the API. They run when a pull request becomes ready for review and again when its head moves."
	},
	"get_pull_request_changes": {
		"response": {
			"base": "3a7e9c1b5d2f4a6c8e0b2d4f6a8c0e2b4d6f8a1c",
			"head": "9f2c4e1a7b3d5f60812a4c6e8b0d2f4a6c8e0b13",
			"files": [
				{
					"path": "src/main.rs",
					"status": "modified",
					"additions": 1,
					"deletions": 1,
					"binary": false,
					"hunks": [
						{
							"lines": [
								{
									"kind": "context",
									"old": 3,
									"new": 3,
									"text": "fn main() {"
								},
								{
									"kind": "delete",
									"old": 4,
									"new": null,
									"text": "    println!(\"Hello, world!\");"
								},
								{
									"kind": "add",
									"old": null,
									"new": 4,
									"text": "    println!(\"Hello, {}!\", std::env::args().nth(1).unwrap_or(\"world\".into()));"
								},
								{
									"kind": "context",
									"old": 5,
									"new": 5,
									"text": "}"
								}
							]
						}
					]
				}
			],
			"truncated": false
		},
		"notes": "A file's `status` is `added`, `modified` or `deleted`. A binary file has no `hunks`. In a line, `old` is `null` when it was added and `new` is `null` when it was deleted."
	},
	"mark_pull_request_ready": {
		"request": {
			"summary": "Reads a name from the first argument. `hello ana` prints \"Hello, ana!\"."
		},
		"response": {
			"id": "pr_01m43smh3vexsr5pmp60qwv0vs",
			"repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
			"number": 14,
			"issue": 12,
			"title": "Greeting should name the caller",
			"body": "Reads a name from the first argument. `hello ana` prints \"Hello, ana!\".",
			"agent": "claude-code",
			"runtime": "external",
			"status": "open",
			"fork": {
				"namespace": "pulls",
				"name": "pr_01m43smh3vexsr5pmp60qwv0vs"
			},
			"fork_repo_id": "rep_01m43smh5xd7aw2kq9tv0b4c8e",
			"branch": null,
			"head_commit": "9f2c4e1a7b3d5f60812a4c6e8b0d2f4a6c8e0b13",
			"merge_base": null,
			"merged_by": null,
			"merged_at": null,
			"superseded_by": null,
			"check_status": null,
			"files": [
				{
					"path": "src/main.rs",
					"additions": 6,
					"deletions": 2
				}
			],
			"assignees": [],
			"reviewers": [],
			"author": {
				"id": "usr_01kkntcg1eeb98j62xjm7eh09p",
				"username": "syntaqx",
				"kind": "user",
				"verified": false,
				"workspaces": []
			},
			"created_at": "2026-10-01T18:20:02.117Z",
			"updated_at": "2026-10-01T18:33:10.398Z"
		}
	},
	"review_pull_request": {
		"request": {
			"verdict": "request_changes",
			"body": "Trim the name before using it."
		},
		"response": {
			"id": "cmt_01m43sx9f3h7k1n5r9v3z7d1g5",
			"kind": "comment",
			"author": {
				"id": "usr_01kz9d3f7h1k5n9r3v7z1c5g9b",
				"username": "ana",
				"kind": "user",
				"verified": true,
				"workspaces": [
					{
						"slug": "flagon-io",
						"role": "member"
					}
				]
			},
			"body": "Trim the name before using it.",
			"path": null,
			"line": null,
			"verdict": "request_changes",
			"created_at": "2026-10-01T18:40:05.019Z"
		}
	},
	"merge_pull_request": {
		"request": {
			"keep_issue_open": false
		},
		"response": {
			"id": "pr_01m43smh3vexsr5pmp60qwv0vs",
			"repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
			"number": 14,
			"issue": 12,
			"title": "Greeting should name the caller",
			"body": "Reads a name from the first argument. `hello ana` prints \"Hello, ana!\".",
			"agent": "claude-code",
			"runtime": "external",
			"status": "merged",
			"fork": {
				"namespace": "pulls",
				"name": "pr_01m43smh3vexsr5pmp60qwv0vs"
			},
			"fork_repo_id": "rep_01m43smh5xd7aw2kq9tv0b4c8e",
			"branch": null,
			"head_commit": "9f2c4e1a7b3d5f60812a4c6e8b0d2f4a6c8e0b13",
			"merge_base": "3a7e9c1b5d2f4a6c8e0b2d4f6a8c0e2b4d6f8a1c",
			"merged_by": "syntaqx",
			"merged_at": "2026-10-01T18:52:17.093Z",
			"superseded_by": null,
			"check_status": "passed",
			"files": [
				{
					"path": "src/main.rs",
					"additions": 6,
					"deletions": 2
				}
			],
			"assignees": [],
			"reviewers": [
				"ana"
			],
			"author": {
				"id": "usr_01kkntcg1eeb98j62xjm7eh09p",
				"username": "syntaqx",
				"kind": "user",
				"verified": false,
				"workspaces": []
			},
			"created_at": "2026-10-01T18:20:02.117Z",
			"updated_at": "2026-10-01T18:52:17.093Z"
		},
		"notes": "A draft, or one whose checks have not passed, answers `409`. A pull request still `open` in the response has not landed yet: `landing` is true on it while it is brought up to date, and [get the merge queue](/reference/api/pull-requests/get-merge-queue/) shows it waiting in the [merge queue](/guides/merge-queue/). Merging records the pull request in the issue's `resolved_by` and sets `superseded_by` on the pull requests it closes."
	},
	"close_pull_request": {
		"response": {
			"id": "pr_01m43smh3vexsr5pmp60qwv0vs",
			"repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
			"number": 14,
			"issue": 12,
			"title": "Greeting should name the caller",
			"body": "Reads a name from the first argument. `hello ana` prints \"Hello, ana!\".",
			"agent": "claude-code",
			"runtime": "external",
			"status": "closed",
			"fork": {
				"namespace": "pulls",
				"name": "pr_01m43smh3vexsr5pmp60qwv0vs"
			},
			"fork_repo_id": "rep_01m43smh5xd7aw2kq9tv0b4c8e",
			"branch": null,
			"head_commit": "9f2c4e1a7b3d5f60812a4c6e8b0d2f4a6c8e0b13",
			"merge_base": null,
			"merged_by": null,
			"merged_at": null,
			"superseded_by": null,
			"check_status": null,
			"files": [
				{
					"path": "src/main.rs",
					"additions": 6,
					"deletions": 2
				}
			],
			"assignees": [],
			"reviewers": [],
			"author": {
				"id": "usr_01kkntcg1eeb98j62xjm7eh09p",
				"username": "syntaqx",
				"kind": "user",
				"verified": false,
				"workspaces": []
			},
			"created_at": "2026-10-01T18:20:02.117Z",
			"updated_at": "2026-10-01T19:02:48.760Z"
		}
	},
	"get_merge_queue": {
		"response": {
			"enabled": true,
			"active": [
				{
					"id": "qen_01m43rn0qsft1tpap1awkewzbb",
					"number": 14,
					"title": "Greeting should name the caller",
					"agent": "claude-code",
					"state": "testing",
					"ahead": [],
					"base_commit": "3a7e9c1b5d2f4a6c8e0b2d4f6a8c0e2b4d6f8a1c",
					"combined_commit": null,
					"error": null,
					"results": [],
					"enqueued_by": "syntaqx",
					"created_at": "2026-10-04T15:31:20.441Z",
					"finished_at": null
				}
			],
			"recent": [
				{
					"id": "qen_01m43khqjmeb5a1magayrnk63z",
					"number": 11,
					"title": "Fix trailing newline in greeting",
					"agent": "g1t-agent",
					"state": "landed",
					"ahead": [],
					"base_commit": "4b1d7e9c2a5f8e3d6c0b9a7e5d3c1b8a6f4e2d0c",
					"combined_commit": "c3e8a1f6d4b2097e5c3a1f8d6b4e2c0a9f7d5b3e",
					"error": null,
					"results": [
						{
							"command": "cargo test",
							"passed": true,
							"exit_code": 0,
							"output": "test result: ok. 12 passed; 0 failed\n",
							"duration_ms": 48211
						}
					],
					"enqueued_by": "g1t",
					"created_at": "2026-10-04T14:02:09.876Z",
					"finished_at": "2026-10-04T14:09:55.102Z"
				}
			]
		},
		"notes": "An entry's `state` is `waiting`, `testing`, `passed`, `failed`, `landed` or `removed`. `active` is in queue order; `recent` holds at most 20, newest first."
	},
	"message_agent": {
		"request": {
			"body": "Keep \"world\" as the default when no name is given."
		},
		"response": {
			"id": "msg_01m43tx5egeh4t3f9zcnjenqvz",
			"author": "syntaqx",
			"body": "Keep \"world\" as the default when no name is given.",
			"created_at": "2026-10-01T18:25:00.310Z",
			"delivered_at": null,
			"kind": "message",
			"from_number": null,
			"to_number": 14,
			"answer": null,
			"declined": false
		},
		"notes": "The response is the message. `delivered_at` is set once the agent has read it."
	},
	"answer_message": {
		"params": {
			"id": "msg_01m43t66tde8hs2vpxhh3v8tqw"
		},
		"request": {
			"body": "No. greet() keeps its name; only greet_named() is added."
		},
		"response": {
			"id": "msg_01m43t66tde8hs2vpxhh3v8tqw",
			"author": "g1t-agent",
			"body": "Are you renaming greet() in src/lib.rs? I need to call it from #16.",
			"created_at": "2026-10-01T18:58:12.301Z",
			"delivered_at": "2026-10-01T18:58:40.117Z",
			"kind": "question",
			"from_number": 16,
			"to_number": 14,
			"answer": "No. greet() keeps its name; only greet_named() is added.",
			"declined": false
		},
		"notes": "The response is the question or handoff that was answered, with `answer` and `declined` filled in."
	},
	"take_messages": {
		"response": [
			{
				"id": "msg_01m43tx5egeh4t3f9zcnjenqvz",
				"author": "syntaqx",
				"body": "Keep \"world\" as the default when no name is given.",
				"created_at": "2026-10-01T18:25:00.310Z",
				"delivered_at": "2026-10-01T18:25:31.007Z",
				"kind": "message",
				"from_number": null,
				"to_number": 14,
				"answer": null,
				"declined": false
			}
		],
		"notes": "Only a g1t agent's token can take messages. They come oldest first, and each is marked delivered."
	},
	"read_session": {
		"query": {
			"after": 0
		},
		"response": [
			{
				"seq": 1,
				"kind": "prompt",
				"text": "Make the greeting name the caller (issue #12).",
				"tool": null,
				"commit": null,
				"at": "2026-10-01T18:21:00.004Z"
			},
			{
				"seq": 2,
				"kind": "tool_call",
				"text": "cargo test",
				"tool": "bash",
				"commit": "9f2c4e1a7b3d5f60812a4c6e8b0d2f4a6c8e0b13",
				"at": "2026-10-01T18:30:12.660Z"
			}
		]
	},
	"record_session": {
		"request": {
			"entries": [
				{
					"kind": "message",
					"text": "Reading src/main.rs."
				},
				{
					"kind": "tool_call",
					"text": "cargo test",
					"tool": "bash"
				}
			]
		},
		"response": {
			"count": 2
		},
		"notes": "Up to 200 entries can be appended per request. Each is recorded against the pull request's head commit at the time. See [sessions and why-blame](/guides/why-blame/)."
	},
	"list_workflows": {
		"response": [
			{
				"id": "wfl_01kpw2c5d8e1f4g7h0j3k6m9np",
				"path": ".g1t/workflows/ci.yml",
				"name": "CI",
				"events": [
					"push",
					"pull_request",
					"workflow_dispatch"
				],
				"state": "active",
				"error": null,
				"notes": [
					{
						"severity": "unsupported",
						"job": "test",
						"message": "`services` containers (such as a database) are not started on g1t yet."
					}
				],
				"dispatch": {
					"debug": {
						"description": "Verbose logs",
						"type": "boolean",
						"default": false
					}
				},
				"last_run": {
					"id": "run_01kpx7b3c6d9e2f5g8h1j4k7mr",
					"workflow_id": "wfl_01kpw2c5d8e1f4g7h0j3k6m9np",
					"path": ".g1t/workflows/ci.yml",
					"name": "CI",
					"title": "Greeting should name the caller",
					"number": 12,
					"attempt": 1,
					"event": "push",
					"ref": "refs/heads/main",
					"sha": "9f2c4e1a7b3d5f60812a4c6e8b0d2f4a6c8e0b13",
					"pull": null,
					"status": "completed",
					"conclusion": "success",
					"error": null,
					"actor": "syntaqx",
					"created_at": "2026-10-04T15:42:07.318Z",
					"started_at": "2026-10-04T15:42:09.020Z",
					"finished_at": "2026-10-04T15:44:31.877Z"
				}
			},
			{
				"id": "wfl_01kpw2c5d8e1f4g7h0j3k6m9nq",
				"path": ".g1t/workflows/nightly.yml",
				"name": "Nightly",
				"events": [
					"schedule"
				],
				"state": "disabled",
				"error": null,
				"notes": [],
				"dispatch": null,
				"last_run": null
			}
		],
		"notes": "`state` is `active` or `disabled`. `dispatch` holds the `workflow_dispatch` inputs, or is `null` when the workflow cannot be run by hand. See [GitHub Actions](/guides/actions/)."
	},
	"list_workflow_runs": {
		"query": {
			"workflow": "ci.yml",
			"branch": "main",
			"per_page": 20
		},
		"response": [
			{
				"id": "run_01kpx7b3c6d9e2f5g8h1j4k7mr",
				"workflow_id": "wfl_01kpw2c5d8e1f4g7h0j3k6m9np",
				"path": ".g1t/workflows/ci.yml",
				"name": "CI",
				"title": "Greeting should name the caller",
				"number": 12,
				"attempt": 1,
				"event": "push",
				"ref": "refs/heads/main",
				"sha": "9f2c4e1a7b3d5f60812a4c6e8b0d2f4a6c8e0b13",
				"pull": null,
				"status": "completed",
				"conclusion": "success",
				"error": null,
				"actor": "syntaqx",
				"created_at": "2026-10-04T15:42:07.318Z",
				"started_at": "2026-10-04T15:42:09.020Z",
				"finished_at": "2026-10-04T15:44:31.877Z"
			}
		],
		"notes": "A run's `status` is `queued`, `pending` (waiting for its concurrency group), `in_progress` or `completed`; `conclusion` is set once it completes."
	},
	"list_runs_of_workflow": {
		"params": {
			"workflow": "ci.yml"
		},
		"query": {
			"branch": "main",
			"per_page": 20
		},
		"response": [
			{
				"id": "run_01kpx7b3c6d9e2f5g8h1j4k7mr",
				"workflow_id": "wfl_01kpw2c5d8e1f4g7h0j3k6m9np",
				"path": ".g1t/workflows/ci.yml",
				"name": "CI",
				"title": "Greeting should name the caller",
				"number": 12,
				"attempt": 1,
				"event": "push",
				"ref": "refs/heads/main",
				"sha": "9f2c4e1a7b3d5f60812a4c6e8b0d2f4a6c8e0b13",
				"pull": null,
				"status": "completed",
				"conclusion": "success",
				"error": null,
				"actor": "syntaqx",
				"created_at": "2026-10-04T15:42:07.318Z",
				"started_at": "2026-10-04T15:42:09.020Z",
				"finished_at": "2026-10-04T15:44:31.877Z"
			}
		]
	},
	"get_workflow_run": {
		"params": {
			"id": "run_01kpx7b3c6d9e2f5g8h1j4k7mr"
		},
		"response": {
			"run": {
				"id": "run_01kpx7b3c6d9e2f5g8h1j4k7mr",
				"workflow_id": "wfl_01kpw2c5d8e1f4g7h0j3k6m9np",
				"path": ".g1t/workflows/ci.yml",
				"name": "CI",
				"title": "Greeting should name the caller",
				"number": 12,
				"attempt": 1,
				"event": "push",
				"ref": "refs/heads/main",
				"sha": "9f2c4e1a7b3d5f60812a4c6e8b0d2f4a6c8e0b13",
				"pull": null,
				"status": "completed",
				"conclusion": "failure",
				"error": null,
				"actor": "syntaqx",
				"created_at": "2026-10-04T15:42:07.318Z",
				"started_at": "2026-10-04T15:42:09.020Z",
				"finished_at": "2026-10-04T15:44:31.877Z"
			},
			"jobs": [
				{
					"id": "job_01kpx7b3d0e4f8g2h6j0k4m8ns",
					"run_id": "run_01kpx7b3c6d9e2f5g8h1j4k7mr",
					"key": "test",
					"name": "test",
					"needs": [],
					"status": "completed",
					"conclusion": "failure",
					"steps": [
						{
							"number": 1,
							"name": "Run actions/checkout@v4",
							"status": "completed",
							"conclusion": "success",
							"started_at": "2026-10-04T15:42:10.101Z",
							"finished_at": "2026-10-04T15:42:12.433Z"
						},
						{
							"number": 2,
							"name": "Run cargo test",
							"status": "completed",
							"conclusion": "failure",
							"started_at": "2026-10-04T15:42:12.440Z",
							"finished_at": "2026-10-04T15:44:30.902Z"
						}
					],
					"annotations": [
						{
							"level": "error",
							"message": "assertion failed: greeting names the caller",
							"title": "greet",
							"file": "src/main.rs",
							"line": 41
						}
					],
					"reason": null,
					"started_at": "2026-10-04T15:42:09.020Z",
					"finished_at": "2026-10-04T15:44:31.002Z"
				},
				{
					"id": "job_01kpx7b3d0e4f8g2h6j0k4m8nt",
					"run_id": "run_01kpx7b3c6d9e2f5g8h1j4k7mr",
					"key": "deploy",
					"name": "deploy",
					"needs": [
						"test"
					],
					"status": "completed",
					"conclusion": "skipped",
					"steps": [],
					"annotations": [],
					"reason": "A job it needs did not succeed.",
					"started_at": null,
					"finished_at": "2026-10-04T15:44:31.877Z"
				}
			],
			"notes": [
				{
					"severity": "unsupported",
					"job": "test",
					"message": "`services` containers (such as a database) are not started on g1t yet."
				}
			]
		}
	},
	"get_job_logs": {
		"params": {
			"job": "job_01kpx7b3d0e4f8g2h6j0k4m8ns"
		},
		"query": {
			"after": 0
		},
		"response": {
			"chunks": [
				{
					"seq": 1,
					"step": 0,
					"text": "Preparing the sandbox\n"
				},
				{
					"seq": 2,
					"step": 2,
					"text": "> cargo test\ntest greet ... FAILED\n"
				}
			],
			"done": true
		},
		"notes": "Returns at most 500 chunks. Step 0 is the job's setup. While `done` is false, call again with the last `seq` as `after`."
	},
	"dispatch_workflow": {
		"params": {
			"workflow": "ci.yml"
		},
		"request": {
			"ref": "main",
			"inputs": {
				"debug": true
			}
		},
		"response": {
			"id": "run_01kpx8d4e7f0g3h6j9k2m5n8pq",
			"workflow_id": "wfl_01kpw2c5d8e1f4g7h0j3k6m9np",
			"path": ".g1t/workflows/ci.yml",
			"name": "CI",
			"title": "CI run by syntaqx",
			"number": 13,
			"attempt": 1,
			"event": "workflow_dispatch",
			"ref": "refs/heads/main",
			"sha": "9f2c4e1a7b3d5f60812a4c6e8b0d2f4a6c8e0b13",
			"pull": null,
			"status": "queued",
			"conclusion": null,
			"error": null,
			"actor": "syntaqx",
			"created_at": "2026-10-04T16:30:00.512Z",
			"started_at": null,
			"finished_at": null
		}
	},
	"cancel_workflow_run": {
		"params": {
			"id": "run_01kpx7b3c6d9e2f5g8h1j4k7mr"
		},
		"response": {
			"id": "run_01kpx7b3c6d9e2f5g8h1j4k7mr",
			"workflow_id": "wfl_01kpw2c5d8e1f4g7h0j3k6m9np",
			"path": ".g1t/workflows/ci.yml",
			"name": "CI",
			"title": "Greeting should name the caller",
			"number": 12,
			"attempt": 1,
			"event": "push",
			"ref": "refs/heads/main",
			"sha": "9f2c4e1a7b3d5f60812a4c6e8b0d2f4a6c8e0b13",
			"pull": null,
			"status": "completed",
			"conclusion": "cancelled",
			"error": null,
			"actor": "syntaqx",
			"created_at": "2026-10-04T15:42:07.318Z",
			"started_at": "2026-10-04T15:42:09.020Z",
			"finished_at": "2026-10-04T15:44:31.877Z"
		}
	},
	"rerun_workflow_run": {
		"params": {
			"id": "run_01kpx7b3c6d9e2f5g8h1j4k7mr"
		},
		"request": {
			"failed_only": true
		},
		"response": {
			"id": "run_01kpx7b3c6d9e2f5g8h1j4k7mr",
			"workflow_id": "wfl_01kpw2c5d8e1f4g7h0j3k6m9np",
			"path": ".g1t/workflows/ci.yml",
			"name": "CI",
			"title": "Greeting should name the caller",
			"number": 12,
			"attempt": 2,
			"event": "push",
			"ref": "refs/heads/main",
			"sha": "9f2c4e1a7b3d5f60812a4c6e8b0d2f4a6c8e0b13",
			"pull": null,
			"status": "queued",
			"conclusion": null,
			"error": null,
			"actor": "syntaqx",
			"created_at": "2026-10-04T15:42:07.318Z",
			"started_at": null,
			"finished_at": null
		},
		"notes": "The run keeps its id; `attempt` goes up by one."
	},
	"rerun_failed_jobs": {
		"params": {
			"id": "run_01kpx7b3c6d9e2f5g8h1j4k7mr"
		},
		"response": {
			"id": "run_01kpx7b3c6d9e2f5g8h1j4k7mr",
			"workflow_id": "wfl_01kpw2c5d8e1f4g7h0j3k6m9np",
			"path": ".g1t/workflows/ci.yml",
			"name": "CI",
			"title": "Greeting should name the caller",
			"number": 12,
			"attempt": 2,
			"event": "push",
			"ref": "refs/heads/main",
			"sha": "9f2c4e1a7b3d5f60812a4c6e8b0d2f4a6c8e0b13",
			"pull": null,
			"status": "queued",
			"conclusion": null,
			"error": null,
			"actor": "syntaqx",
			"created_at": "2026-10-04T15:42:07.318Z",
			"started_at": null,
			"finished_at": null
		}
	},
	"update_workflow": {
		"params": {
			"workflow": "nightly.yml"
		},
		"request": {
			"enabled": false
		},
		"response": {
			"id": "wfl_01kpw2c5d8e1f4g7h0j3k6m9nq",
			"path": ".g1t/workflows/nightly.yml",
			"name": "Nightly",
			"events": [
				"schedule"
			],
			"state": "disabled",
			"error": null,
			"notes": [],
			"dispatch": null,
			"last_run": null
		}
	},
	"enable_workflow": {
		"params": {
			"workflow": "nightly.yml"
		},
		"response": {
			"id": "wfl_01kpw2c5d8e1f4g7h0j3k6m9nq",
			"path": ".g1t/workflows/nightly.yml",
			"name": "Nightly",
			"events": [
				"schedule"
			],
			"state": "active",
			"error": null,
			"notes": [],
			"dispatch": null,
			"last_run": null
		}
	},
	"disable_workflow": {
		"params": {
			"workflow": "nightly.yml"
		},
		"response": {
			"id": "wfl_01kpw2c5d8e1f4g7h0j3k6m9nq",
			"path": ".g1t/workflows/nightly.yml",
			"name": "Nightly",
			"events": [
				"schedule"
			],
			"state": "disabled",
			"error": null,
			"notes": [],
			"dispatch": null,
			"last_run": null
		}
	},
	"list_actions_secrets": {
		"response": [
			{
				"id": "set_01kpv9q4r7s0t3v6w9x2y5z8ab",
				"name": "NPM_TOKEN",
				"kind": "secret",
				"value": null,
				"scope": "workspace",
				"updated_at": "2026-10-01T09:12:44.020Z",
				"available_to": [
					"workflows"
				],
				"environments": [],
				"projects": [],
				"note": null,
				"updated_by": "syntaqx"
			},
			{
				"id": "set_01kpv9q4r7s0t3v6w9x2y5z8ac",
				"name": "STRIPE_KEY",
				"kind": "secret",
				"value": null,
				"scope": "project",
				"updated_at": "2026-10-04T15:42:07.318Z",
				"available_to": [
					"workflows",
					"deployments"
				],
				"environments": [
					"production"
				],
				"projects": [],
				"note": "Rotate in the Stripe dashboard.",
				"updated_by": "syntaqx"
			}
		],
		"notes": "Values are never returned. A repository's list includes the workspace's rows that reach it, with `scope` set to `workspace`. Empty `environments` means every environment."
	},
	"list_actions_secrets_for_workspace": {
		"params": {
			"workspace": "flagon-io"
		},
		"response": [
			{
				"id": "set_01kpv9q4r7s0t3v6w9x2y5z8ab",
				"name": "NPM_TOKEN",
				"kind": "secret",
				"value": null,
				"scope": "workspace",
				"updated_at": "2026-10-04T15:42:07.318Z",
				"available_to": [
					"workflows"
				],
				"environments": [],
				"projects": [],
				"note": null,
				"updated_by": "syntaqx"
			}
		],
		"notes": "Values are never returned. A repository's list includes the workspace's rows that reach it, with `scope` set to `workspace`. Empty `environments` means every environment."
	},
	"set_actions_secret": {
		"params": {
			"setting": "STRIPE_KEY"
		},
		"request": {
			"value": "sk_live_…",
			"available_to": [
				"workflows",
				"deployments"
			],
			"environments": [
				"production"
			]
		},
		"response": {
			"id": "set_01kpv9q4r7s0t3v6w9x2y5z8ac",
			"name": "STRIPE_KEY",
			"kind": "secret",
			"value": null,
			"scope": "project",
			"updated_at": "2026-10-04T15:42:07.318Z",
			"available_to": [
				"workflows",
				"deployments"
			],
			"environments": [
				"production"
			],
			"projects": [],
			"note": null,
			"updated_by": "syntaqx"
		},
		"notes": "Keys are uppercased. See [secrets and variables](/guides/secrets-and-variables/)."
	},
	"set_actions_secret_for_workspace": {
		"params": {
			"workspace": "flagon-io",
			"setting": "NPM_TOKEN"
		},
		"request": {
			"value": "npm_…",
			"projects": [
				"hello"
			]
		},
		"response": {
			"id": "set_01kpv9q4r7s0t3v6w9x2y5z8ac",
			"name": "NPM_TOKEN",
			"kind": "secret",
			"value": null,
			"scope": "workspace",
			"updated_at": "2026-10-04T15:42:07.318Z",
			"available_to": [
				"workflows"
			],
			"environments": [],
			"projects": [
				"hello"
			],
			"note": null,
			"updated_by": "syntaqx"
		}
	},
	"delete_actions_secret": {
		"params": {
			"setting": "STRIPE_KEY"
		},
		"response": true
	},
	"delete_actions_secret_for_workspace": {
		"params": {
			"workspace": "flagon-io",
			"setting": "NPM_TOKEN"
		},
		"response": true
	},
	"list_actions_variables": {
		"response": [
			{
				"id": "set_01kpv9q4r7s0t3v6w9x2y5z8ad",
				"name": "NODE_VERSION",
				"kind": "variable",
				"value": "20",
				"scope": "project",
				"updated_at": "2026-10-04T15:42:07.318Z",
				"available_to": [
					"workflows",
					"deployments"
				],
				"environments": [],
				"projects": [],
				"note": null,
				"updated_by": "syntaqx"
			}
		],
		"notes": "A repository's list includes the workspace's rows that reach it, with `scope` set to `workspace`. Empty `environments` means every environment."
	},
	"list_actions_variables_for_workspace": {
		"params": {
			"workspace": "flagon-io"
		},
		"response": [
			{
				"id": "set_01kpv9q4r7s0t3v6w9x2y5z8ad",
				"name": "NODE_VERSION",
				"kind": "variable",
				"value": "20",
				"scope": "workspace",
				"updated_at": "2026-10-04T15:42:07.318Z",
				"available_to": [
					"workflows",
					"deployments"
				],
				"environments": [],
				"projects": [],
				"note": null,
				"updated_by": "syntaqx"
			}
		]
	},
	"set_actions_variable": {
		"request": {
			"setting": "NODE_VERSION",
			"value": "20"
		},
		"response": {
			"id": "set_01kpv9q4r7s0t3v6w9x2y5z8ad",
			"name": "NODE_VERSION",
			"kind": "variable",
			"value": "20",
			"scope": "project",
			"updated_at": "2026-10-04T15:42:07.318Z",
			"available_to": [
				"workflows",
				"deployments"
			],
			"environments": [],
			"projects": [],
			"note": null,
			"updated_by": "syntaqx"
		},
		"notes": "GitHub's clients send the key as `name`; that is accepted too."
	},
	"set_actions_variable_for_workspace": {
		"params": {
			"workspace": "flagon-io"
		},
		"request": {
			"setting": "NODE_VERSION",
			"value": "20"
		},
		"response": {
			"id": "set_01kpv9q4r7s0t3v6w9x2y5z8ad",
			"name": "NODE_VERSION",
			"kind": "variable",
			"value": "20",
			"scope": "workspace",
			"updated_at": "2026-10-04T15:42:07.318Z",
			"available_to": [
				"workflows",
				"deployments"
			],
			"environments": [],
			"projects": [],
			"note": null,
			"updated_by": "syntaqx"
		}
	},
	"update_actions_variable": {
		"params": {
			"setting": "NODE_VERSION"
		},
		"request": {
			"value": "22"
		},
		"response": {
			"id": "set_01kpv9q4r7s0t3v6w9x2y5z8ad",
			"name": "NODE_VERSION",
			"kind": "variable",
			"value": "22",
			"scope": "project",
			"updated_at": "2026-10-04T15:42:07.318Z",
			"available_to": [
				"workflows",
				"deployments"
			],
			"environments": [],
			"projects": [],
			"note": null,
			"updated_by": "syntaqx"
		}
	},
	"update_actions_variable_for_workspace": {
		"params": {
			"workspace": "flagon-io",
			"setting": "NODE_VERSION"
		},
		"request": {
			"value": "22"
		},
		"response": {
			"id": "set_01kpv9q4r7s0t3v6w9x2y5z8ad",
			"name": "NODE_VERSION",
			"kind": "variable",
			"value": "22",
			"scope": "workspace",
			"updated_at": "2026-10-04T15:42:07.318Z",
			"available_to": [
				"workflows",
				"deployments"
			],
			"environments": [],
			"projects": [],
			"note": null,
			"updated_by": "syntaqx"
		}
	},
	"delete_actions_variable": {
		"params": {
			"setting": "NODE_VERSION"
		},
		"response": true
	},
	"delete_actions_variable_for_workspace": {
		"params": {
			"workspace": "flagon-io",
			"setting": "NODE_VERSION"
		},
		"response": true
	},
	"list_webhooks": {
		"response": [
			{
				"id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd",
				"scope": "repo",
				"workspace": "flagon-io",
				"repo": "flagon-io/hello",
				"url": "https://hooks.example.com/g1t",
				"events": [
					"git.push",
					"pull.merged"
				],
				"active": true,
				"secret_hint": "…9c2e",
				"created_by": "syntaqx",
				"created_at": "2026-10-04T15:42:07.318Z",
				"last_status": "delivered",
				"last_delivered_at": "2026-10-04T15:42:07.611Z"
			}
		]
	},
	"list_webhooks_for_workspace": {
		"params": {
			"workspace": "flagon-io"
		},
		"response": [
			{
				"id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd",
				"scope": "workspace",
				"workspace": "flagon-io",
				"repo": null,
				"url": "https://hooks.example.com/g1t",
				"events": [
					"git.push",
					"pull.merged"
				],
				"active": true,
				"secret_hint": "…9c2e",
				"created_by": "syntaqx",
				"created_at": "2026-10-04T15:42:07.318Z",
				"last_status": "delivered",
				"last_delivered_at": "2026-10-04T15:42:07.611Z"
			}
		]
	},
	"create_webhook": {
		"request": {
			"url": "https://hooks.example.com/g1t",
			"events": [
				"git.push",
				"pull.merged"
			]
		},
		"response": {
			"hook": {
				"id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd",
				"scope": "repo",
				"workspace": "flagon-io",
				"repo": "flagon-io/hello",
				"url": "https://hooks.example.com/g1t",
				"events": [
					"git.push",
					"pull.merged"
				],
				"active": true,
				"secret_hint": "…9c2e",
				"created_by": "syntaqx",
				"created_at": "2026-10-04T15:42:07.318Z",
				"last_status": "delivered",
				"last_delivered_at": "2026-10-04T15:42:07.611Z"
			},
			"secret": "whsec_…"
		},
		"notes": "A ping is sent before the response, so `last_status` is usually set already. When g1t made the signing secret, `secret` holds it: it is shown only this once. See [webhooks](/guides/webhooks/)."
	},
	"create_webhook_for_workspace": {
		"params": {
			"workspace": "flagon-io"
		},
		"request": {
			"url": "https://hooks.example.com/g1t"
		},
		"response": {
			"hook": {
				"id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd",
				"scope": "workspace",
				"workspace": "flagon-io",
				"repo": null,
				"url": "https://hooks.example.com/g1t",
				"events": [
					"*"
				],
				"active": true,
				"secret_hint": "…9c2e",
				"created_by": "syntaqx",
				"created_at": "2026-10-04T15:42:07.318Z",
				"last_status": "delivered",
				"last_delivered_at": "2026-10-04T15:42:07.611Z"
			},
			"secret": "whsec_…"
		},
		"notes": "A ping is sent before the response, so `last_status` is usually set already. When g1t made the signing secret, `secret` holds it: it is shown only this once. See [webhooks](/guides/webhooks/)."
	},
	"update_webhook": {
		"params": {
			"id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd"
		},
		"request": {
			"active": false
		},
		"response": {
			"id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd",
			"scope": "repo",
			"workspace": "flagon-io",
			"repo": "flagon-io/hello",
			"url": "https://hooks.example.com/g1t",
			"events": [
				"git.push",
				"pull.merged"
			],
			"active": false,
			"secret_hint": "…9c2e",
			"created_by": "syntaqx",
			"created_at": "2026-10-04T15:42:07.318Z",
			"last_status": "delivered",
			"last_delivered_at": "2026-10-04T15:42:07.611Z"
		}
	},
	"update_webhook_for_workspace": {
		"params": {
			"workspace": "flagon-io",
			"id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd"
		},
		"request": {
			"active": false
		},
		"response": {
			"id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd",
			"scope": "workspace",
			"workspace": "flagon-io",
			"repo": null,
			"url": "https://hooks.example.com/g1t",
			"events": [
				"git.push",
				"pull.merged"
			],
			"active": false,
			"secret_hint": "…9c2e",
			"created_by": "syntaqx",
			"created_at": "2026-10-04T15:42:07.318Z",
			"last_status": "delivered",
			"last_delivered_at": "2026-10-04T15:42:07.611Z"
		}
	},
	"delete_webhook": {
		"params": {
			"id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd"
		},
		"response": true
	},
	"delete_webhook_for_workspace": {
		"params": {
			"workspace": "flagon-io",
			"id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd"
		},
		"response": true
	},
	"ping_webhook": {
		"params": {
			"id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd"
		},
		"response": {
			"id": "dlv_01kpx5p9v2j7k3m8n4p5q6r7st",
			"hook_id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd",
			"event_id": "",
			"event": "ping",
			"status": "delivered",
			"attempts": 1,
			"response_status": 200,
			"response_body": "ok",
			"error": null,
			"duration_ms": 184,
			"payload": "{\"hook\":{\"events\":[\"git.push\",\"pull.merged\"],\"id\":\"hk_01kpx5p9s4h0t1w6x8y2a3b4cd\",\"url\":\"https://hooks.example.com/g1t\"},\"message\":\"g1t will send this webhook's events here.\",\"time\":\"2026-10-04T16:01:12.440Z\",\"type\":\"ping\"}",
			"created_at": "2026-10-04T16:01:12.440Z",
			"delivered_at": "2026-10-04T16:01:12.631Z",
			"next_attempt_at": null
		},
		"notes": "`payload` is the JSON that was sent, as a string."
	},
	"ping_webhook_for_workspace": {
		"params": {
			"workspace": "flagon-io",
			"id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd"
		},
		"response": {
			"id": "dlv_01kpx5p9v2j7k3m8n4p5q6r7st",
			"hook_id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd",
			"event_id": "",
			"event": "ping",
			"status": "delivered",
			"attempts": 1,
			"response_status": 200,
			"response_body": "ok",
			"error": null,
			"duration_ms": 184,
			"payload": "{\"hook\":{\"events\":[\"git.push\",\"pull.merged\"],\"id\":\"hk_01kpx5p9s4h0t1w6x8y2a3b4cd\",\"url\":\"https://hooks.example.com/g1t\"},\"message\":\"g1t will send this webhook's events here.\",\"time\":\"2026-10-04T16:01:12.440Z\",\"type\":\"ping\"}",
			"created_at": "2026-10-04T16:01:12.440Z",
			"delivered_at": "2026-10-04T16:01:12.631Z",
			"next_attempt_at": null
		}
	},
	"list_webhook_deliveries": {
		"params": {
			"id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd"
		},
		"response": [
			{
				"id": "dlv_01kpx6a2b3c4d5e6f7g8h9j0kz",
				"hook_id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd",
				"event_id": "",
				"event": "ping",
				"status": "pending",
				"attempts": 1,
				"response_status": 503,
				"response_body": "Service Unavailable",
				"error": null,
				"duration_ms": 212,
				"payload": "{\"hook\":{\"events\":[\"git.push\",\"pull.merged\"],\"id\":\"hk_01kpx5p9s4h0t1w6x8y2a3b4cd\",\"url\":\"https://hooks.example.com/g1t\"},\"message\":\"g1t will send this webhook's events here.\",\"time\":\"2026-10-04T16:01:12.440Z\",\"type\":\"ping\"}",
				"created_at": "2026-10-04T16:20:03.100Z",
				"delivered_at": null,
				"next_attempt_at": "2026-10-04T16:21:03.312Z"
			},
			{
				"id": "dlv_01kpx5p9v2j7k3m8n4p5q6r7st",
				"hook_id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd",
				"event_id": "",
				"event": "ping",
				"status": "delivered",
				"attempts": 1,
				"response_status": 200,
				"response_body": "ok",
				"error": null,
				"duration_ms": 184,
				"payload": "{\"hook\":{\"events\":[\"git.push\",\"pull.merged\"],\"id\":\"hk_01kpx5p9s4h0t1w6x8y2a3b4cd\",\"url\":\"https://hooks.example.com/g1t\"},\"message\":\"g1t will send this webhook's events here.\",\"time\":\"2026-10-04T16:01:12.440Z\",\"type\":\"ping\"}",
				"created_at": "2026-10-04T16:01:12.440Z",
				"delivered_at": "2026-10-04T16:01:12.631Z",
				"next_attempt_at": null
			}
		],
		"notes": "Returns at most 50, newest first. `status` is `pending`, `delivered` or `failed`; `next_attempt_at` is set while it is pending."
	},
	"list_webhook_deliveries_for_workspace": {
		"params": {
			"workspace": "flagon-io",
			"id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd"
		},
		"response": [
			{
				"id": "dlv_01kpx6a2b3c4d5e6f7g8h9j0kz",
				"hook_id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd",
				"event_id": "",
				"event": "ping",
				"status": "pending",
				"attempts": 1,
				"response_status": 503,
				"response_body": "Service Unavailable",
				"error": null,
				"duration_ms": 212,
				"payload": "{\"hook\":{\"events\":[\"git.push\",\"pull.merged\"],\"id\":\"hk_01kpx5p9s4h0t1w6x8y2a3b4cd\",\"url\":\"https://hooks.example.com/g1t\"},\"message\":\"g1t will send this webhook's events here.\",\"time\":\"2026-10-04T16:01:12.440Z\",\"type\":\"ping\"}",
				"created_at": "2026-10-04T16:20:03.100Z",
				"delivered_at": null,
				"next_attempt_at": "2026-10-04T16:21:03.312Z"
			},
			{
				"id": "dlv_01kpx5p9v2j7k3m8n4p5q6r7st",
				"hook_id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd",
				"event_id": "",
				"event": "ping",
				"status": "delivered",
				"attempts": 1,
				"response_status": 200,
				"response_body": "ok",
				"error": null,
				"duration_ms": 184,
				"payload": "{\"hook\":{\"events\":[\"git.push\",\"pull.merged\"],\"id\":\"hk_01kpx5p9s4h0t1w6x8y2a3b4cd\",\"url\":\"https://hooks.example.com/g1t\"},\"message\":\"g1t will send this webhook's events here.\",\"time\":\"2026-10-04T16:01:12.440Z\",\"type\":\"ping\"}",
				"created_at": "2026-10-04T16:01:12.440Z",
				"delivered_at": "2026-10-04T16:01:12.631Z",
				"next_attempt_at": null
			}
		]
	},
	"redeliver_webhook": {
		"params": {
			"id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd",
			"delivery": "dlv_01kpx6a2b3c4d5e6f7g8h9j0kz"
		},
		"response": {
			"id": "dlv_01kpx6c8d1e2f3g4h5j6k7m8np",
			"hook_id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd",
			"event_id": "",
			"event": "ping",
			"status": "delivered",
			"attempts": 1,
			"response_status": 200,
			"response_body": "ok",
			"error": null,
			"duration_ms": 171,
			"payload": "{\"hook\":{\"events\":[\"git.push\",\"pull.merged\"],\"id\":\"hk_01kpx5p9s4h0t1w6x8y2a3b4cd\",\"url\":\"https://hooks.example.com/g1t\"},\"message\":\"g1t will send this webhook's events here.\",\"time\":\"2026-10-04T16:01:12.440Z\",\"type\":\"ping\"}",
			"created_at": "2026-10-04T16:25:40.007Z",
			"delivered_at": "2026-10-04T16:25:40.178Z",
			"next_attempt_at": null
		},
		"notes": "The response is the new delivery."
	},
	"redeliver_webhook_for_workspace": {
		"params": {
			"workspace": "flagon-io",
			"id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd",
			"delivery": "dlv_01kpx6a2b3c4d5e6f7g8h9j0kz"
		},
		"response": {
			"id": "dlv_01kpx6c8d1e2f3g4h5j6k7m8np",
			"hook_id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd",
			"event_id": "",
			"event": "ping",
			"status": "delivered",
			"attempts": 1,
			"response_status": 200,
			"response_body": "ok",
			"error": null,
			"duration_ms": 171,
			"payload": "{\"hook\":{\"events\":[\"git.push\",\"pull.merged\"],\"id\":\"hk_01kpx5p9s4h0t1w6x8y2a3b4cd\",\"url\":\"https://hooks.example.com/g1t\"},\"message\":\"g1t will send this webhook's events here.\",\"time\":\"2026-10-04T16:01:12.440Z\",\"type\":\"ping\"}",
			"created_at": "2026-10-04T16:25:40.007Z",
			"delivered_at": "2026-10-04T16:25:40.178Z",
			"next_attempt_at": null
		}
	},
	"list_integrations": {
		"params": {
			"workspace": "flagon-io"
		},
		"response": [
			{
				"id": "con_01kpx3m7q2f8r9t4v6w0y1z2ab",
				"workspace": "flagon-io",
				"provider": "anthropic",
				"kind": "models",
				"name": "Anthropic",
				"config": {
					"assign": false,
					"write_back": true
				},
				"secret_hint": "…3f9a",
				"webhook_url": null,
				"created_by": "syntaqx",
				"created_at": "2026-10-04T15:42:07.318Z",
				"last_used_at": "2026-10-04T15:42:08.102Z",
				"last_error": null,
				"models": [
					"claude-haiku-4-5",
					"claude-sonnet-4-5"
				]
			},
			{
				"id": "con_01kpx4n8r3g9s0v5w7x1z2a3bc",
				"workspace": "flagon-io",
				"provider": "jira",
				"kind": "tracker",
				"name": "Jira",
				"config": {
					"assign": false,
					"write_back": true,
					"site": "https://acme.atlassian.net",
					"email": "syntaqx@example.com",
					"keys": [
						"TECH"
					]
				},
				"secret_hint": "…x7Qe",
				"webhook_url": null,
				"created_by": "syntaqx",
				"created_at": "2026-10-04T15:42:07.318Z",
				"last_used_at": null,
				"last_error": null,
				"models": []
			}
		],
		"notes": "`kind` is `models`, `alerts` or `tracker`. `secret_hint` shows the end of the secret; the secret itself is never returned. `webhook_url` is where an alert source sends its alerts."
	},
	"connect_integration": {
		"params": {
			"workspace": "flagon-io"
		},
		"request": {
			"provider": "webhook",
			"config": {
				"repo": "flagon-io/hello",
				"label": "bug"
			}
		},
		"response": {
			"connection": {
				"id": "con_01kpx4n8r3g9s0v5w7x1z2a3bd",
				"workspace": "flagon-io",
				"provider": "webhook",
				"kind": "alerts",
				"name": "Webhook",
				"config": {
					"repo": "flagon-io/hello",
					"label": "bug",
					"assign": false,
					"write_back": true
				},
				"secret_hint": null,
				"webhook_url": "https://api.g1t.sh/hooks/con_01kpx4n8r3g9s0v5w7x1z2a3bd",
				"created_by": "syntaqx",
				"created_at": "2026-10-04T15:42:07.318Z",
				"last_used_at": null,
				"last_error": null,
				"models": []
			},
			"signing_secret": "g1ts_9f2c4a7e1b0d3c6f8a2e5b7d9c1f4a6e8b0d2c4f6a8e1b3d"
		},
		"notes": "`signing_secret` is set only when g1t made it, for `datadog` and `webhook`, and is shown only this once. A model provider is tested as it is connected. See [integrations](/guides/integrations/) and [model providers](/guides/models/)."
	},
	"disconnect_integration": {
		"params": {
			"workspace": "flagon-io",
			"id": "con_01kpx3m7q2f8r9t4v6w0y1z2ab"
		},
		"response": true
	},
	"test_integration": {
		"params": {
			"workspace": "flagon-io",
			"id": "con_01kpx3m7q2f8r9t4v6w0y1z2ab"
		},
		"response": {
			"ok": true,
			"message": "Anthropic accepted the key and offers 9 models."
		},
		"notes": "Credentials that do not work still answer `200`, with `ok` false and `message` saying what went wrong."
	},
	"get_model_routes": {
		"params": {
			"workspace": "flagon-io"
		},
		"response": [
			{
				"task": "default",
				"connection_id": "con_01kpx3m7q2f8r9t4v6w0y1z2ab",
				"model": "claude-sonnet-4-5"
			},
			{
				"task": "review",
				"connection_id": null,
				"model": null
			}
		]
	},
	"set_model_routes": {
		"params": {
			"workspace": "flagon-io"
		},
		"request": {
			"routes": [
				{
					"task": "default",
					"connection_id": "con_01kpx3m7q2f8r9t4v6w0y1z2ab",
					"model": "claude-sonnet-4-5"
				},
				{
					"task": "review",
					"connection_id": null
				}
			]
		},
		"response": [
			{
				"task": "default",
				"connection_id": "con_01kpx3m7q2f8r9t4v6w0y1z2ab",
				"model": "claude-sonnet-4-5"
			},
			{
				"task": "review",
				"connection_id": null,
				"model": null
			}
		],
		"notes": "The response is the routes as saved, ordered by task."
	},
	"get_context": {
		"query": {
			"reference": "TECH-1234"
		},
		"response": {
			"provider": "jira",
			"key": "TECH-1234",
			"title": "Checkout fails for EU cards",
			"url": "https://acme.atlassian.net/browse/TECH-1234",
			"status": "In Progress",
			"body": "Customers with 3DS cards see a 500 at /pay.",
			"fetched_at": "2026-10-04T15:42:07.318Z"
		}
	},
	"import_issue": {
		"request": {
			"reference": "TECH-1234"
		},
		"response": {
			"number": 42,
			"item": {
				"provider": "jira",
				"key": "TECH-1234",
				"title": "Checkout fails for EU cards",
				"url": "https://acme.atlassian.net/browse/TECH-1234",
				"status": "In Progress",
				"body": "Customers with 3DS cards see a 500 at /pay.",
				"fetched_at": "2026-10-04T15:42:07.318Z"
			},
			"created": true
		},
		"notes": "`created` is false when the ticket was imported before; `number` is then that issue."
	},
	"remember": {
		"request": {
			"text": "The tests need TZ=UTC or the date tests fail.",
			"scope": "project",
			"kind": "gotcha",
			"from_number": 14
		},
		"response": {
			"id": "mem_01m43v8q2w3e4r5t6y7u8i9o0p",
			"scope": "project",
			"workspace": "flagon-io",
			"repo": {
				"namespace": "flagon-io",
				"name": "hello"
			},
			"text": "The tests need TZ=UTC or the date tests fail.",
			"kind": "gotcha",
			"source": {
				"kind": "run",
				"run_id": "arn_01m43v2c1p9k8d7e6f5a4b3c2d",
				"repo": {
					"namespace": "flagon-io",
					"name": "hello"
				},
				"number": 14
			},
			"created_by": "g1t-agent",
			"pinned": false,
			"created_at": "2026-10-01T18:40:12.000Z",
			"updated_at": "2026-10-01T18:40:12.000Z",
			"last_used_at": null
		},
		"notes": "Text that looks like a key, a token or a password is refused with `invalid`: memory is read by every agent in the workspace. Saving the same text again in the same scope returns the memory already kept."
	},
	"recall": {
		"query": {
			"q": "pnpm"
		},
		"response": {
			"project": [],
			"workspace": [
				{
					"id": "mem_01m43t0a1s2d3f4g5h6j7k8l9z",
					"scope": "workspace",
					"workspace": "flagon-io",
					"repo": null,
					"text": "We use pnpm everywhere, never npm or yarn.",
					"kind": "convention",
					"source": {
						"kind": "person",
						"run_id": null,
						"repo": null,
						"number": null
					},
					"created_by": "syntaqx",
					"pinned": true,
					"created_at": "2026-10-01T18:40:12.000Z",
					"updated_at": "2026-10-01T18:40:12.000Z",
					"last_used_at": null
				}
			]
		},
		"notes": "Anyone who can read the repository gets its project memory; `workspace` is filled only for members of the workspace, and is empty for anyone else. Each memory returned is marked used, which keeps it near the front of what agents are given."
	},
	"search": {
		"query": {
			"q": "parse_query language:rust repo:acme/web",
			"type": "code"
		},
		"response": {
			"query": "parse_query repo:acme/web language:rust",
			"type": "code",
			"counts": {
				"repositories": 0,
				"code": 2,
				"issues": 0,
				"pulls": 0,
				"people": 0
			},
			"page": 1,
			"per_page": 20,
			"more": false,
			"hits": [
				{
					"kind": "code",
					"title": "src/search/query.rs",
					"url": "/acme/web/blob/main/src/search/query.rs#L42",
					"repo": "acme/web",
					"private": false,
					"description": null,
					"snippet": [],
					"lines": [
						{
							"number": 41,
							"parts": [
								{
									"text": "/// Reads a query typed into the search box.",
									"highlight": false
								}
							]
						},
						{
							"number": 42,
							"parts": [
								{
									"text": "pub fn ",
									"highlight": false
								},
								{
									"text": "parse_query",
									"highlight": true
								},
								{
									"text": "(text: &str) -> Query {",
									"highlight": false
								}
							]
						},
						{
							"number": 43,
							"parts": [
								{
									"text": "    let mut query = Query::default();",
									"highlight": false
								}
							]
						}
					],
					"path": "src/search/query.rs",
					"language": "rust",
					"ref": "main",
					"number": null,
					"state": null,
					"author": null,
					"labels": [],
					"topics": [],
					"slug": null,
					"avatar": null,
					"updated_at": null
				}
			],
			"notes": []
		},
		"notes": "`q` takes words, `\"exact phrases\"`, `-words` to leave out, and qualifiers: `repo:owner/name`, `org:` (or `workspace:`), `language:`, `path:` (a glob when it has `*`), `is:issue`, `is:pr`, `is:open`, `is:closed`, `is:merged`, `is:draft`, `is:public`, `is:private`, `author:` and `label:`; most can be left out with a leading `-`, as in `-label:wontfix`. `type` is `repositories`, `code`, `issues`, `pulls` or `people`; without it, `path:` means code, `is:pr` pull requests, `is:open`, `author:` or `label:` issues, and anything else repositories. `counts` says how many results each type has, up to 1,000. Each result's `snippet` (or, for code, each of its `lines`) is a list of parts, `highlight` true where the query matched. Code is searched on default branches and needs a word of three characters or more, unless the query names a `repo:`. Public content is returned to anyone, without a token; private content only to people who can read it (members of its workspace, and people given a role on the repository), checked when the search runs, so a repository made private, or a role taken away, stops appearing at once. A g1t agent's token can search too."
	},
	"search_context": {
		"params": {
			"workspace": "acme"
		},
		"query": {
			"q": "how do we run the web tests",
			"project": "web"
		},
		"response": {
			"query": "how do we run the web tests",
			"mode": "semantic",
			"hits": [
				{
					"kind": "memory",
					"id": "mem_01m4a0c2b7k3f9d1e5g8h2j6k4",
					"title": "Gotcha",
					"snippet": "The date tests fail unless TZ=UTC.",
					"project": "web",
					"url": "/acme/web/memory",
					"score": 0.82,
					"source": "AGENTS.md",
					"by": "g1t",
					"updated_at": "2026-10-04T21:10:02.000Z"
				},
				{
					"kind": "doc",
					"id": "ent_5f0c2a9e41d7b3c86a1e2f40:2",
					"title": "Web (README.md)",
					"snippet": "## Testing Run npm test. The end-to-end tests need the api running locally…",
					"project": "web",
					"url": "/acme/web/blob/main/README.md",
					"score": 0.77,
					"source": "README.md",
					"by": null,
					"updated_at": "2026-10-04T20:58:41.000Z"
				},
				{
					"kind": "project",
					"id": "ent_9b1d6f0a2c3e4b5d6e7f8a9b",
					"title": "web",
					"snippet": "The storefront. Written in TypeScript. Packages: @acme/web. Uses api. Owned by ana.",
					"project": "web",
					"url": "/acme/web",
					"score": 0.71,
					"source": "catalog",
					"by": null,
					"updated_at": "2026-10-04T20:58:41.000Z"
				}
			]
		},
		"notes": "Give `workspace`, or `repo` as `owner/name` for its workspace. `kinds` narrows to some of `project`, `app`, `api`, `package`, `language`, `owner`, `environment`, `integration`, `doc`, `memory`, `issue` and `pull`; in a URL, comma-separated. `mode` is `text` when the search index could not answer and words were matched instead. Memory is returned only to members of the workspace and its agents; anything from a private project, only to those who can read it (members, unless the base permission is None, and people given a role on its repository). A g1t agent searches its own workspace only."
	},
	"get_entity": {
		"params": {
			"workspace": "acme",
			"kind": "project",
			"id": "web"
		},
		"response": {
			"entity": {
				"id": "ent_9b1d6f0a2c3e4b5d6e7f8a9b",
				"workspace": "acme",
				"kind": "project",
				"key": "web",
				"name": "web",
				"summary": "The storefront. Written in TypeScript. Packages: @acme/web. Uses api. Owned by ana.",
				"project": "web",
				"private": true,
				"data": {
					"repo": "acme/web",
					"root_dir": "",
					"default_branch": "main",
					"languages": [
						"TypeScript"
					],
					"owners": [
						"ana"
					],
					"tests": true,
					"test_commands": [
						"npm test"
					],
					"production_url": "https://web--acme.g1t.page"
				},
				"source": "scan",
				"ref": "/acme/web",
				"updated_at": "2026-10-04T20:58:41.000Z"
			},
			"relations": [
				{
					"kind": "depends_on",
					"direction": "out",
					"entity": {
						"id": "ent_0a7c3e5b9d1f2a4c6e8b0d2f",
						"workspace": "acme",
						"kind": "project",
						"key": "api",
						"name": "api",
						"summary": "The public API. Written in Rust.",
						"project": "api",
						"private": true,
						"data": {},
						"source": "scan",
						"ref": "/acme/api",
						"updated_at": "2026-10-04T20:57:12.000Z"
					}
				},
				{
					"kind": "owned_by",
					"direction": "out",
					"entity": {
						"id": "ent_3c5e7a9b1d2f4a6c8e0b2d4f",
						"workspace": "acme",
						"kind": "owner",
						"key": "ana",
						"name": "ana",
						"summary": null,
						"project": null,
						"private": false,
						"data": {},
						"source": "scan",
						"ref": "/u/ana",
						"updated_at": "2026-10-04T20:58:41.000Z"
					}
				}
			]
		},
		"notes": "`id` is the entry's id, or its key: a project's or app's slug, `npm:<name>` (or `cargo:`, `go:`, `pypi:`) for a package, a username for an owner, `<project>/production` for an environment. `data` depends on the kind: a package's version and dependencies, an API's routes, an app's production address."
	},
	"list_collaborators": {
		"response": {
			"repo": "flagon-io/hello",
			"base_permission": "write",
			"people": [
				{
					"username": "syntaqx",
					"name": "Chase Pierce",
					"avatar": null,
					"role": "admin",
					"source": "owner",
					"direct": null,
					"workspace_role": "owner"
				},
				{
					"username": "linus",
					"name": null,
					"avatar": null,
					"role": "maintain",
					"source": "direct",
					"direct": "maintain",
					"workspace_role": "member"
				},
				{
					"username": "grace",
					"name": "Grace Hopper",
					"avatar": null,
					"role": "write",
					"source": "base",
					"direct": null,
					"workspace_role": "member"
				},
				{
					"username": "ada",
					"name": "Ada Lovelace",
					"avatar": null,
					"role": "triage",
					"source": "direct",
					"direct": "triage",
					"workspace_role": null
				}
			],
			"invitations": [
				{
					"id": "rin_01kp3c4d5e6f7g8h9j0k1m2n3p",
					"repo": "flagon-io/hello",
					"repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
					"invitee": "alan",
					"email": null,
					"role": "write",
					"invited_by": "syntaqx",
					"inviter_avatar": null,
					"status": "pending",
					"created_at": "2026-10-05T17:00:00.000Z",
					"expires_at": "2026-10-12T17:00:00.000Z"
				},
				{
					"id": "rin_01kp3d7e8f9g0h1j2k3m4n5p6q",
					"repo": "flagon-io/hello",
					"repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
					"invitee": null,
					"email": "joan@example.com",
					"role": "read",
					"invited_by": "syntaqx",
					"inviter_avatar": null,
					"status": "pending",
					"created_at": "2026-10-05T17:00:00.000Z",
					"expires_at": "2026-10-12T17:00:00.000Z"
				}
			],
			"viewer_role": "admin",
			"can_manage": true
		},
		"notes": "Owners are listed with `source` `owner`, members with the base permission with `base`, and anyone given a role on this repository with `direct`; `role` is the highest of these, and `direct` shows a direct role even when ownership or the base permission gives more. `workspace_role` null means an outside collaborator. Anyone can read a public repository, which is not listed. `invitations` is empty unless you have the Admin role (`can_manage`). Refused with `403` below the Write role, and `404` for a private repository you cannot see. See [Access and roles](/guides/access-and-roles/)."
	},
	"add_collaborator": {
		"request": {
			"invitee": "ada",
			"role": "triage"
		},
		"response": {
			"result": "invited",
			"invitation": {
				"id": "rin_01kp3e9f0g1h2j3k4m5n6p7q8r",
				"repo": "flagon-io/hello",
				"repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
				"invitee": "ada",
				"email": null,
				"role": "triage",
				"invited_by": "syntaqx",
				"inviter_avatar": null,
				"status": "pending",
				"created_at": "2026-10-05T17:00:00.000Z",
				"expires_at": "2026-10-12T17:00:00.000Z"
			}
		},
		"notes": "`invitee` is a username or an email address. A member of the workspace answers `{\"result\": \"granted\", \"collaborator\": {…}}` with the role already given, shown as list_collaborators shows a person. Anyone else answers `{\"result\": \"invited\", \"invitation\": {…}}`: the invitation is emailed and waits 7 days, and the role is theirs once they accept it. An email address without an account gets an invitation with `email` set and `invitee` null, and an invite that makes the account and accepts in one step. Refused with `404` when no account has that username, `409` when they already have a role of their own or a pending invitation (change it with update_collaborator), and `403` without the Admin role, from an agent's or a workspace's token, or when the person does not meet what the workspace asks of everyone with access. The `repo.collaborator_added` webhook event is sent once they have the role. See [Access and roles](/guides/access-and-roles/)."
	},
	"update_collaborator": {
		"params": {
			"owner": "flagon-io",
			"name": "hello",
			"username": "ada"
		},
		"request": {
			"role": "write"
		},
		"response": {
			"username": "ada",
			"name": "Ada Lovelace",
			"avatar": null,
			"role": "write",
			"source": "direct",
			"direct": "write",
			"workspace_role": null
		},
		"notes": "Changes a direct role, or the role of the person's pending invitation. `404` when they have neither: an owner's Admin and a member's base permission are not changed here. Changing a direct role sends the `repo.collaborator_role_changed` webhook event. See [Access and roles](/guides/access-and-roles/)."
	},
	"remove_collaborator": {
		"params": {
			"owner": "flagon-io",
			"name": "hello",
			"username": "ada"
		},
		"response": true,
		"notes": "Takes away a direct role. Anyone may remove their own, to leave a repository. `404` when the person has no role of their own on it. A member keeps the workspace's base permission. Sends the `repo.collaborator_removed` webhook event. See [Access and roles](/guides/access-and-roles/)."
	},
	"get_collaborator_permission": {
		"params": {
			"owner": "flagon-io",
			"name": "hello",
			"username": "ada"
		},
		"response": {
			"username": "ada",
			"role": "triage",
			"source": "direct",
			"capabilities": [
				"read",
				"participate",
				"triage"
			]
		},
		"notes": "`capabilities` lists what the role allows, in the table's order: `read`, `participate`, `triage`, `push`, `merge`, `run`, `manage_settings`, `manage_protection`, `manage_integrations`, `manage_access`, `administer` and `delete` (which also takes an owner of the workspace). `role` and `source` are null, and `capabilities` empty, for someone with no role. Refused with `403` below the Write role, unless you ask about yourself. See [Access and roles](/guides/access-and-roles/)."
	},
	"list_repo_invitations": {
		"response": [
			{
				"id": "rin_01kp3c4d5e6f7g8h9j0k1m2n3p",
				"repo": "flagon-io/hello",
				"repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
				"invitee": "alan",
				"email": null,
				"role": "write",
				"invited_by": "syntaqx",
				"inviter_avatar": null,
				"status": "pending",
				"created_at": "2026-10-05T17:00:00.000Z",
				"expires_at": "2026-10-12T17:00:00.000Z"
			},
			{
				"id": "rin_01kp3d7e8f9g0h1j2k3m4n5p6q",
				"repo": "flagon-io/hello",
				"repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
				"invitee": null,
				"email": "joan@example.com",
				"role": "read",
				"invited_by": "syntaqx",
				"inviter_avatar": null,
				"status": "pending",
				"created_at": "2026-10-05T17:00:00.000Z",
				"expires_at": "2026-10-12T17:00:00.000Z"
			}
		],
		"notes": "Pending invitations only, newest first. `email` is set for an invitation sent to an address that had no account. Refused with `403` without the Admin role. See [Access and roles](/guides/access-and-roles/)."
	},
	"revoke_repo_invitation": {
		"params": {
			"owner": "flagon-io",
			"name": "hello",
			"id": "rin_01kp3c4d5e6f7g8h9j0k1m2n3p"
		},
		"response": {
			"id": "rin_01kp3c4d5e6f7g8h9j0k1m2n3p",
			"repo": "flagon-io/hello",
			"repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
			"invitee": "alan",
			"email": null,
			"role": "write",
			"invited_by": "syntaqx",
			"inviter_avatar": null,
			"status": "revoked",
			"created_at": "2026-10-05T17:00:00.000Z",
			"expires_at": "2026-10-12T17:00:00.000Z"
		},
		"notes": "`404` when there is no pending invitation with that id on this repository."
	},
	"list_my_repo_invitations": {
		"response": [
			{
				"id": "rin_01kp3e9f0g1h2j3k4m5n6p7q8r",
				"repo": "flagon-io/hello",
				"repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
				"invitee": "ada",
				"email": null,
				"role": "triage",
				"invited_by": "syntaqx",
				"inviter_avatar": null,
				"status": "pending",
				"created_at": "2026-10-05T17:00:00.000Z",
				"expires_at": "2026-10-12T17:00:00.000Z"
			}
		],
		"notes": "Invitations sent to your username, and to any of your confirmed addresses before you had an account, newest first. Accept one with `PATCH /user/repository_invitations/{id}`, or decline it with `DELETE`. Expired and answered ones are left out."
	},
	"accept_repo_invitation": {
		"params": {
			"id": "rin_01kp3e9f0g1h2j3k4m5n6p7q8r"
		},
		"response": {
			"id": "rin_01kp3e9f0g1h2j3k4m5n6p7q8r",
			"repo": "flagon-io/hello",
			"repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
			"invitee": "ada",
			"email": null,
			"role": "triage",
			"invited_by": "syntaqx",
			"inviter_avatar": null,
			"status": "accepted",
			"created_at": "2026-10-05T17:00:00.000Z",
			"expires_at": "2026-10-12T17:00:00.000Z"
		},
		"notes": "The role is yours at once. `404` when you have no pending invitation with that id (it may have expired or been revoked), and `403` when your account does not meet what the workspace asks of everyone with access, such as two-factor authentication, with a message that says what to turn on. See [Access and roles](/guides/access-and-roles/)."
	},
	"decline_repo_invitation": {
		"params": {
			"id": "rin_01kp3e9f0g1h2j3k4m5n6p7q8r"
		},
		"response": {
			"id": "rin_01kp3e9f0g1h2j3k4m5n6p7q8r",
			"repo": "flagon-io/hello",
			"repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
			"invitee": "ada",
			"email": null,
			"role": "triage",
			"invited_by": "syntaqx",
			"inviter_avatar": null,
			"status": "declined",
			"created_at": "2026-10-05T17:00:00.000Z",
			"expires_at": "2026-10-12T17:00:00.000Z"
		},
		"notes": "`404` when you have no pending invitation with that id."
	},
	"set_base_permission": {
		"params": {
			"workspace": "flagon-io"
		},
		"request": {
			"base_permission": "read"
		},
		"response": {
			"workspace": "flagon-io",
			"base_permission": "read"
		},
		"notes": "`base_permission` is `none`, `read`, `write` (the default) or `admin`. Owners keep Admin, and a role given on a repository directly still counts where it is higher. Refused with `403` for anyone but an owner signed in as a person. See [Access and roles](/guides/access-and-roles/)."
	},
	"list_outside_collaborators": {
		"params": {
			"workspace": "flagon-io"
		},
		"response": [
			{
				"username": "ada",
				"name": "Ada Lovelace",
				"avatar": null,
				"repos": [
					{
						"repo": "flagon-io/docs",
						"role": "write"
					},
					{
						"repo": "flagon-io/hello",
						"role": "triage"
					}
				]
			}
		],
		"notes": "By username, each with the repositories they have a role on. Refused with `403` for anyone but an owner. See [Access and roles](/guides/access-and-roles/)."
	}
}