Skip to content

g1t/apps/api/src/reference.json

11,185 lines353,566 bytesCodeBlame
1{
2 "device_code": {
3 "request": {
4 "client_name": "Claude Code"
5 },
6 "response": {
7 "device_code": "Gm3k…",
8 "user_code": "WDJB-MJHT",
9 "verification_uri": "https://g1t.sh/device",
10 "verification_uri_complete": "https://g1t.sh/device?code=WDJB-MJHT",
11 "expires_in": 900,
12 "interval": 5
13 }
14 },
15 "device_token": {
16 "request": {
17 "device_code": "Gm3k…"
18 },
19 "response": {
20 "status": "approved",
21 "token": "g1t_…",
22 "username": "syntaqx",
23 "verified": true
24 }
25 },
26 "whoami": {
27 "response": {
28 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
29 "username": "syntaqx",
30 "kind": "user",
31 "verified": true,
32 "workspaces": [
33 {
34 "slug": "acme",
35 "role": "member",
36 "base_permission": "write"
37 },
38 {
39 "slug": "flagon-io",
40 "role": "owner",
41 "base_permission": "write"
42 }
43 ],
44 "token": {
45 "token_id": "tok_01kkntd3p2v8x6ym5r0c1q7a9e",
46 "scopes": [
47 "repo:read",
48 "issues:read",
49 "issues:write",
50 "pull_requests:read",
51 "pull_requests:write"
52 ]
53 }
54 },
55 "notes": "`token` is what the access token you called with may do: its `scopes` (left out for full access) and `legacy` when it was made before tokens had scopes. A token reaches every workspace and repository whoever it acts as can; its scopes say what it may do there. See [Scopes](/guides/authentication/#scopes). `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/)."
56 },
57 "create_workspace": {
58 "request": {
59 "slug": "acme-labs",
60 "name": "Acme Labs"
61 },
62 "response": {
63 "id": "wsp_01m43teqa9em6bje0bhvdj4jkb",
64 "slug": "acme-labs",
65 "name": "Acme Labs",
66 "description": null,
67 "created_at": "2026-10-04T16:02:51.337Z",
68 "member_count": 1,
69 "base_permission": "read",
70 "team_creation": "members",
71 "members_can_create_public_repositories": true,
72 "members_can_create_private_repositories": true,
73 "members_can_change_repo_visibility": true,
74 "members_can_delete_repositories": false,
75 "members_can_invite_outside_collaborators": true,
76 "two_factor_requirement_enabled": false
77 },
78 "notes": "`base_permission` is what every member gets on each of its repositories: `read` for a new workspace until an owner changes it with `PATCH /workspaces/{workspace}` or `PUT /workspaces/{workspace}/base_permission`. See [Access and roles](/guides/access-and-roles/). `team_creation` is who may create its teams: `members` (any member) until an owner sets `owners` with `PATCH /workspaces/{workspace}`. A new workspace is free, and each person owns at most one free workspace: while you own one, this answers `402` with `payment_required` and says which, until it is on the plan or deleted. See [One free workspace per person](/guides/usage-and-billing/#one-free-workspace-per-person)."
79 },
80 "get_workspace": {
81 "params": {
82 "workspace": "acme-labs"
83 },
84 "response": {
85 "id": "wsp_01m43teqa9em6bje0bhvdj4jkb",
86 "slug": "acme-labs",
87 "name": "Acme Labs",
88 "description": "Rockets, and the software that flies them.",
89 "created_at": "2026-10-04T16:02:51.337Z",
90 "member_count": 3,
91 "base_permission": "write",
92 "team_creation": "members",
93 "members_can_create_public_repositories": true,
94 "members_can_create_private_repositories": true,
95 "members_can_change_repo_visibility": true,
96 "members_can_delete_repositories": false,
97 "members_can_invite_outside_collaborators": true,
98 "two_factor_requirement_enabled": false
99 },
100 "notes": "`team_creation` is who may create its teams: `members` (any member, the default) or `owners`. The `members_can_…` fields are its [member privileges](/guides/workspaces/#member-privileges), and `two_factor_requirement_enabled` whether it [requires two-factor authentication](/guides/authentication/#require-two-factor-authentication). Change it, and the rest, with [`PATCH /workspaces/{workspace}`](/reference/api/workspaces/update-workspace/). `404` for anyone who is not a member. See [Workspaces](/guides/workspaces/)."
101 },
102 "update_workspace": {
103 "params": {
104 "workspace": "acme-labs"
105 },
106 "request": {
107 "name": "Acme Labs",
108 "description": "Rockets, and the software that flies them.",
109 "team_creation": "owners",
110 "members_can_delete_repositories": true
111 },
112 "response": {
113 "id": "wsp_01m43teqa9em6bje0bhvdj4jkb",
114 "slug": "acme-labs",
115 "name": "Acme Labs",
116 "description": "Rockets, and the software that flies them.",
117 "created_at": "2026-10-04T16:02:51.337Z",
118 "member_count": 3,
119 "base_permission": "write",
120 "team_creation": "owners",
121 "members_can_create_public_repositories": true,
122 "members_can_create_private_repositories": true,
123 "members_can_change_repo_visibility": true,
124 "members_can_delete_repositories": true,
125 "members_can_invite_outside_collaborators": true,
126 "two_factor_requirement_enabled": false
127 },
128 "notes": "Only the fields given change. `name` is the display name; the slug, the first part of the workspace's addresses, stays as it is. `base_permission` needs the `access:admin` scope as well as `workspace:admin`; [`set_base_permission`](/reference/api/access/set-base-permission/) sets it alone. `team_creation` is `members` (any member may create a team, the default) or `owners`; teams already made stay. The `members_can_…` fields are the workspace's member privileges: who may create public and private repositories, and whether members with the Admin role on a repository may change its visibility, delete or transfer it, and invite outside collaborators. `two_factor_requirement_enabled` holds everyone without two-factor authentication out of the workspace until they turn it on, and needs it on your own account first. Refused with `403` for anyone but an owner signed in as a person. Recorded in the [audit log](/guides/audit-log/). See [Workspaces](/guides/workspaces/)."
129 },
130 "list_members": {
131 "params": {
132 "workspace": "acme-labs"
133 },
134 "response": [
135 {
136 "username": "ada",
137 "role": "owner",
138 "org_roles": [],
139 "two_factor": true,
140 "name": "Ada Lovelace",
141 "avatar": null
142 },
143 {
144 "username": "grace",
145 "role": "member",
146 "org_roles": [
147 "security_manager"
148 ],
149 "two_factor": false,
150 "name": "Grace Hopper",
151 "avatar": null
152 }
153 ],
154 "notes": "Owners first, then by username. `two_factor` is shown to owners only, and is `null` for anyone else. `403` for anyone who is not a member. See [Workspaces](/guides/workspaces/#members-and-owners)."
155 },
156 "update_member": {
157 "params": {
158 "workspace": "acme-labs",
159 "username": "grace"
160 },
161 "request": {
162 "role": "member",
163 "org_roles": [
164 "security_manager"
165 ]
166 },
167 "response": {
168 "username": "grace",
169 "role": "member",
170 "org_roles": [
171 "security_manager"
172 ],
173 "two_factor": null,
174 "name": "Grace Hopper",
175 "avatar": null
176 },
177 "notes": "Only the fields given change; `org_roles` replaces the list. `409` when it would leave the workspace without an owner. Refused with `403` for anyone but an owner signed in as a person. Recorded in the [audit log](/guides/audit-log/) as `member.role_changed`, `member.org_role_added` or `member.org_role_removed`. See [Workspaces](/guides/workspaces/#members-and-owners)."
178 },
179 "remove_member": {
180 "params": {
181 "workspace": "acme-labs",
182 "username": "grace"
183 },
184 "response": true,
185 "notes": "Their roles on the workspace's repositories and their place in its teams go with them. Your own username is leaving, as [`leave_workspace`](/reference/api/members/leave-workspace/). `409` for the last owner. Recorded as `member.removed`."
186 },
187 "transfer_ownership": {
188 "params": {
189 "workspace": "acme-labs"
190 },
191 "request": {
192 "username": "grace"
193 },
194 "response": true,
195 "notes": "`username` becomes an owner and you a member, in one step. Recorded as `workspace.ownership_transferred`."
196 },
197 "leave_workspace": {
198 "params": {
199 "workspace": "acme-labs"
200 },
201 "response": true,
202 "notes": "`409` for the last owner: make another member an owner first, or delete the workspace. Recorded as `member.left`."
203 },
204 "delete_workspace": {
205 "request": {
206 "confirm": "acme-labs"
207 },
208 "response": true,
209 "notes": "Refused with `402` while billing cannot settle it, with a message that says what to do, and with `403` for anyone but an owner signed in as a person, or for a protected workspace. Its repositories, projects and apps go with it; g1t's support can restore it for 30 days. See [Delete a workspace](/guides/workspaces/#delete-a-workspace)."
210 },
211 "list_emails": {
212 "response": {
213 "emails": [
214 {
215 "email": "ada@example.com",
216 "verified": true,
217 "primary": true,
218 "backup": false,
219 "created_at": "2026-09-01T10:00:00.000Z",
220 "verified_at": "2026-09-01T10:02:11.000Z"
221 },
222 {
223 "email": "ada@acme.com",
224 "verified": true,
225 "primary": false,
226 "backup": true,
227 "created_at": "2026-10-02T09:30:00.000Z",
228 "verified_at": "2026-10-02T09:31:40.000Z"
229 },
230 {
231 "email": "ada.l@example.org",
232 "verified": false,
233 "primary": false,
234 "backup": false,
235 "created_at": "2026-10-05T14:12:03.000Z",
236 "verified_at": null
237 }
238 ],
239 "private_email": true,
240 "block_private_pushes": false,
241 "noreply": "6c1d0efg+ada@users.noreply.g1t.sh",
242 "commit_email": "6c1d0efg+ada@users.noreply.g1t.sh",
243 "limit": 10
244 },
245 "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)."
246 },
247 "add_email": {
248 "request": {
249 "email": "ada.l@example.org",
250 "password": "…"
251 },
252 "response": {
253 "emails": [
254 {
255 "email": "ada@example.com",
256 "verified": true,
257 "primary": true,
258 "backup": false,
259 "created_at": "2026-09-01T10:00:00.000Z",
260 "verified_at": "2026-09-01T10:02:11.000Z"
261 },
262 {
263 "email": "ada@acme.com",
264 "verified": true,
265 "primary": false,
266 "backup": true,
267 "created_at": "2026-10-02T09:30:00.000Z",
268 "verified_at": "2026-10-02T09:31:40.000Z"
269 },
270 {
271 "email": "ada.l@example.org",
272 "verified": false,
273 "primary": false,
274 "backup": false,
275 "created_at": "2026-10-05T14:12:03.000Z",
276 "verified_at": null
277 }
278 ],
279 "private_email": true,
280 "block_private_pushes": false,
281 "noreply": "6c1d0efg+ada@users.noreply.g1t.sh",
282 "commit_email": "6c1d0efg+ada@users.noreply.g1t.sh",
283 "limit": 10
284 },
285 "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."
286 },
287 "remove_email": {
288 "request": {
289 "password": "…"
290 },
291 "response": {
292 "emails": [
293 {
294 "email": "ada@example.com",
295 "verified": true,
296 "primary": true,
297 "backup": false,
298 "created_at": "2026-09-01T10:00:00.000Z",
299 "verified_at": "2026-09-01T10:02:11.000Z"
300 },
301 {
302 "email": "ada@acme.com",
303 "verified": true,
304 "primary": false,
305 "backup": true,
306 "created_at": "2026-10-02T09:30:00.000Z",
307 "verified_at": "2026-10-02T09:31:40.000Z"
308 },
309 {
310 "email": "ada.l@example.org",
311 "verified": false,
312 "primary": false,
313 "backup": false,
314 "created_at": "2026-10-05T14:12:03.000Z",
315 "verified_at": null
316 }
317 ],
318 "private_email": true,
319 "block_private_pushes": false,
320 "noreply": "6c1d0efg+ada@users.noreply.g1t.sh",
321 "commit_email": "6c1d0efg+ada@users.noreply.g1t.sh",
322 "limit": 10
323 },
324 "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."
325 },
326 "update_email_settings": {
327 "request": {
328 "primary": "ada@acme.com",
329 "password": "…"
330 },
331 "response": {
332 "emails": [
333 {
334 "email": "ada@example.com",
335 "verified": true,
336 "primary": true,
337 "backup": false,
338 "created_at": "2026-09-01T10:00:00.000Z",
339 "verified_at": "2026-09-01T10:02:11.000Z"
340 },
341 {
342 "email": "ada@acme.com",
343 "verified": true,
344 "primary": false,
345 "backup": true,
346 "created_at": "2026-10-02T09:30:00.000Z",
347 "verified_at": "2026-10-02T09:31:40.000Z"
348 },
349 {
350 "email": "ada.l@example.org",
351 "verified": false,
352 "primary": false,
353 "backup": false,
354 "created_at": "2026-10-05T14:12:03.000Z",
355 "verified_at": null
356 }
357 ],
358 "private_email": true,
359 "block_private_pushes": false,
360 "noreply": "6c1d0efg+ada@users.noreply.g1t.sh",
361 "commit_email": "6c1d0efg+ada@users.noreply.g1t.sh",
362 "limit": 10
363 },
364 "notes": "Only the fields given change. `primary` and `backup` need `password`; `private_email` and `block_private_pushes` do not."
365 },
366 "list_invites": {
367 "response": {
368 "mode": "invite",
369 "allowance": {
370 "limit": 5,
371 "used": 2,
372 "remaining": 3
373 },
374 "workspaces": [
375 {
376 "slug": "acme-labs",
377 "allowance": {
378 "limit": 20,
379 "used": 4,
380 "remaining": 16
381 }
382 }
383 ],
384 "invites": [
385 {
386 "id": "inv_01kp2x7m8n9q0r1s2t3v4w5x6y",
387 "code": "g1t-k7m2-q9xd-4hpw-…",
388 "hint": "g1t-k7m2",
389 "email": "ada@example.com",
390 "kind": "account",
391 "workspace": null,
392 "status": "pending",
393 "charged_to": "user",
394 "invited_by": "syntaqx",
395 "redeemed_by": null,
396 "created_at": "2026-10-05T17:00:00.000Z",
397 "expires_at": "2026-11-04T17:00:00.000Z",
398 "redeemed_at": null,
399 "revoked_at": null
400 },
401 {
402 "id": "inv_01kp1v3c4d5e6f7g8h9j0k1m2n",
403 "code": null,
404 "hint": "g1t-p3rt",
405 "email": null,
406 "kind": "account",
407 "workspace": null,
408 "status": "redeemed",
409 "charged_to": "user",
410 "invited_by": "syntaqx",
411 "redeemed_by": "grace",
412 "created_at": "2026-10-02T09:12:40.000Z",
413 "expires_at": "2026-11-01T09:12:40.000Z",
414 "redeemed_at": "2026-10-02T11:30:05.000Z",
415 "revoked_at": null
416 }
417 ]
418 },
419 "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)."
420 },
421 "create_invite": {
422 "request": {
423 "email": "ada@example.com"
424 },
425 "response": {
426 "id": "inv_01kp2x7m8n9q0r1s2t3v4w5x6y",
427 "code": "g1t-k7m2-q9xd-4hpw-…",
428 "hint": "g1t-k7m2",
429 "email": "ada@example.com",
430 "kind": "account",
431 "workspace": null,
432 "status": "pending",
433 "charged_to": "user",
434 "invited_by": "syntaqx",
435 "redeemed_by": null,
436 "created_at": "2026-10-05T17:00:00.000Z",
437 "expires_at": "2026-11-04T17:00:00.000Z",
438 "redeemed_at": null,
439 "revoked_at": null
440 },
441 "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>`."
442 },
443 "revoke_invite": {
444 "response": {
445 "id": "inv_01kp2x7m8n9q0r1s2t3v4w5x6y",
446 "code": null,
447 "hint": "g1t-k7m2",
448 "email": "ada@example.com",
449 "kind": "account",
450 "workspace": null,
451 "status": "revoked",
452 "charged_to": "user",
453 "invited_by": "syntaqx",
454 "redeemed_by": null,
455 "created_at": "2026-10-05T17:00:00.000Z",
456 "expires_at": "2026-11-04T17:00:00.000Z",
457 "redeemed_at": null,
458 "revoked_at": "2026-10-06T08:00:00.000Z"
459 }
460 },
461 "list_workspace_invites": {
462 "response": [
463 {
464 "id": "inv_01kp2x7m8n9q0r1s2t3v4w5x6y",
465 "code": "g1t-k7m2-q9xd-4hpw-…",
466 "hint": "g1t-k7m2",
467 "email": "ada@example.com",
468 "kind": "account",
469 "workspace": "acme-labs",
470 "status": "pending",
471 "charged_to": "workspace",
472 "invited_by": "syntaqx",
473 "redeemed_by": null,
474 "created_at": "2026-10-05T17:00:00.000Z",
475 "expires_at": "2026-11-04T17:00:00.000Z",
476 "redeemed_at": null,
477 "revoked_at": null
478 },
479 {
480 "id": "inv_01kp1z9y8x7w6v5t4s3r2q1p0n",
481 "code": "g1t-k7m2-q9xd-4hpw-…",
482 "hint": "g1t-w2vb",
483 "email": "linus@example.com",
484 "kind": "workspace",
485 "workspace": "acme-labs",
486 "status": "pending",
487 "charged_to": "none",
488 "invited_by": "syntaqx",
489 "redeemed_by": null,
490 "created_at": "2026-10-05T17:00:00.000Z",
491 "expires_at": "2026-11-04T17:00:00.000Z",
492 "redeemed_at": null,
493 "revoked_at": null
494 }
495 ]
496 },
497 "invite_member": {
498 "request": {
499 "email": "ada@example.com"
500 },
501 "response": {
502 "id": "inv_01kp2x7m8n9q0r1s2t3v4w5x6y",
503 "code": "g1t-k7m2-q9xd-4hpw-…",
504 "hint": "g1t-k7m2",
505 "email": "ada@example.com",
506 "kind": "account",
507 "workspace": "acme-labs",
508 "status": "pending",
509 "charged_to": "workspace",
510 "invited_by": "syntaqx",
511 "redeemed_by": null,
512 "created_at": "2026-10-05T17:00:00.000Z",
513 "expires_at": "2026-11-04T17:00:00.000Z",
514 "redeemed_at": null,
515 "revoked_at": null
516 },
517 "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. A free workspace cannot invite anyone: `402` with `payment_required`, until it starts the g1t plan."
518 },
519 "revoke_workspace_invite": {
520 "response": {
521 "id": "inv_01kp2x7m8n9q0r1s2t3v4w5x6y",
522 "code": null,
523 "hint": "g1t-k7m2",
524 "email": "ada@example.com",
525 "kind": "account",
526 "workspace": "acme-labs",
527 "status": "revoked",
528 "charged_to": "workspace",
529 "invited_by": "syntaqx",
530 "redeemed_by": null,
531 "created_at": "2026-10-05T17:00:00.000Z",
532 "expires_at": "2026-11-04T17:00:00.000Z",
533 "redeemed_at": null,
534 "revoked_at": "2026-10-06T08:00:00.000Z"
535 }
536 },
537 "list_repos": {
538 "query": {
539 "q": "hello"
540 },
541 "response": [
542 {
543 "id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
544 "namespace": "flagon-io",
545 "name": "hello",
546 "description": "A tiny service that says hello.",
547 "is_private": false,
548 "owner_id": "usr_01kkntcg1eeb98j62xjm7eh09p",
549 "default_branch": "main",
550 "fork_of": null,
551 "protected": true,
552 "created_at": "2026-09-28T14:11:52.640Z",
553 "website": "https://hello.g1t.page",
554 "archived_at": null
555 }
556 ],
557 "notes": "Returns at most 50 repositories, newest first. Forks made for pull requests are left out."
558 },
559 "create_repo": {
560 "request": {
561 "workspace": "flagon-io",
562 "name": "hello-cli",
563 "description": "Command-line client for hello.",
564 "private": false
565 },
566 "response": {
567 "id": "rep_01m43tk1jhehztx23drs87f5fc",
568 "namespace": "flagon-io",
569 "name": "hello-cli",
570 "description": "Command-line client for hello.",
571 "is_private": false,
572 "owner_id": "usr_01kkntcg1eeb98j62xjm7eh09p",
573 "default_branch": "main",
574 "fork_of": null,
575 "protected": false,
576 "created_at": "2026-10-04T16:05:12.913Z",
577 "website": "https://hello.g1t.page",
578 "archived_at": null
579 },
580 "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."
581 },
582 "get_repo": {
583 "response": {
584 "id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
585 "namespace": "flagon-io",
586 "name": "hello",
587 "description": "A tiny service that says hello.",
588 "is_private": false,
589 "owner_id": "usr_01kkntcg1eeb98j62xjm7eh09p",
590 "default_branch": "main",
591 "fork_of": null,
592 "protected": true,
593 "created_at": "2026-09-28T14:11:52.640Z",
594 "website": "https://hello.g1t.page",
595 "archived_at": null
596 }
597 },
598 "update_repo": {
599 "request": {
600 "description": "Says hello, politely.",
601 "website": "hello.g1t.page",
602 "default_branch": "trunk",
603 "protected": true
604 },
605 "response": {
606 "id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
607 "namespace": "flagon-io",
608 "name": "hello",
609 "description": "Says hello, politely.",
610 "is_private": false,
611 "owner_id": "usr_01kkntcg1eeb98j62xjm7eh09p",
612 "default_branch": "trunk",
613 "fork_of": null,
614 "protected": true,
615 "created_at": "2026-09-28T14:11:52.640Z",
616 "topics": [
617 "http",
618 "example"
619 ],
620 "website": "https://hello.g1t.page",
621 "archived_at": null
622 },
623 "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/)."
624 },
625 "transfer_repo": {
626 "request": {
627 "to": "flagon-io"
628 },
629 "response": {
630 "id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
631 "namespace": "flagon-io",
632 "name": "hello",
633 "description": "A tiny service that says hello.",
634 "is_private": false,
635 "owner_id": "usr_01kkntcg1eeb98j62xjm7eh09p",
636 "default_branch": "main",
637 "fork_of": null,
638 "protected": true,
639 "created_at": "2026-09-28T14:11:52.640Z",
640 "website": "https://hello.g1t.page",
641 "archived_at": null
642 },
643 "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/)."
644 },
645 "rename_repo": {
646 "request": {
647 "name": "greeter"
648 },
649 "response": {
650 "id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
651 "namespace": "flagon-io",
652 "name": "greeter",
653 "description": "A tiny service that says hello.",
654 "is_private": false,
655 "owner_id": "usr_01kkntcg1eeb98j62xjm7eh09p",
656 "default_branch": "main",
657 "fork_of": null,
658 "protected": true,
659 "created_at": "2026-09-28T14:11:52.640Z",
660 "topics": [
661 "http",
662 "example"
663 ],
664 "website": "https://hello.g1t.page",
665 "archived_at": null
666 },
667 "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)."
668 },
669 "rename_branch": {
670 "params": {
671 "owner": "flagon-io",
672 "name": "hello",
673 "branch": "feature/login"
674 },
675 "request": {
676 "new_name": "feature/sign-in"
677 },
678 "response": {
679 "id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
680 "namespace": "flagon-io",
681 "name": "hello",
682 "description": "A tiny service that says hello.",
683 "is_private": false,
684 "owner_id": "usr_01kkntcg1eeb98j62xjm7eh09p",
685 "default_branch": "main",
686 "fork_of": null,
687 "protected": true,
688 "created_at": "2026-09-28T14:11:52.640Z",
689 "topics": [
690 "http",
691 "example"
692 ],
693 "website": "https://hello.g1t.page",
694 "archived_at": null
695 },
696 "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)."
697 },
698 "set_repo_visibility": {
699 "request": {
700 "private": true,
701 "confirm": "flagon-io/hello"
702 },
703 "response": {
704 "id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
705 "namespace": "flagon-io",
706 "name": "hello",
707 "description": "A tiny service that says hello.",
708 "is_private": true,
709 "owner_id": "usr_01kkntcg1eeb98j62xjm7eh09p",
710 "default_branch": "main",
711 "fork_of": null,
712 "protected": true,
713 "created_at": "2026-09-28T14:11:52.640Z",
714 "topics": [
715 "http",
716 "example"
717 ],
718 "website": "https://hello.g1t.page",
719 "archived_at": null
720 },
721 "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)."
722 },
723 "archive_repo": {
724 "response": {
725 "id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
726 "namespace": "flagon-io",
727 "name": "hello",
728 "description": "A tiny service that says hello.",
729 "is_private": false,
730 "owner_id": "usr_01kkntcg1eeb98j62xjm7eh09p",
731 "default_branch": "main",
732 "fork_of": null,
733 "protected": true,
734 "created_at": "2026-09-28T14:11:52.640Z",
735 "topics": [
736 "http",
737 "example"
738 ],
739 "website": "https://hello.g1t.page",
740 "archived_at": "2026-10-05T09:30:00.000Z"
741 },
742 "notes": "The repository, with `archived_at` set. Needs the Admin role (`403` otherwise). See [Archive a repository](/guides/managing-repositories/#archive-a-repository)."
743 },
744 "unarchive_repo": {
745 "response": {
746 "id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
747 "namespace": "flagon-io",
748 "name": "hello",
749 "description": "A tiny service that says hello.",
750 "is_private": false,
751 "owner_id": "usr_01kkntcg1eeb98j62xjm7eh09p",
752 "default_branch": "main",
753 "fork_of": null,
754 "protected": true,
755 "created_at": "2026-09-28T14:11:52.640Z",
756 "topics": [
757 "http",
758 "example"
759 ],
760 "website": "https://hello.g1t.page",
761 "archived_at": null
762 },
763 "notes": "The repository, with `archived_at` null. Needs the Admin role (`403` otherwise)."
764 },
765 "delete_repo": {
766 "request": {
767 "confirm": "flagon-io/hello"
768 },
769 "response": {
770 "id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
771 "namespace": "flagon-io",
772 "name": "hello",
773 "description": "A tiny service that says hello.",
774 "is_private": false,
775 "deleted_at": "2026-10-05T09:30:00.000Z",
776 "deleted_by": "syntaqx",
777 "purge_after": "2026-11-04T09:30:00.000Z"
778 },
779 "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)."
780 },
781 "list_deleted_repos": {
782 "params": {
783 "workspace": "flagon-io"
784 },
785 "response": [
786 {
787 "id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
788 "namespace": "flagon-io",
789 "name": "hello",
790 "description": "A tiny service that says hello.",
791 "is_private": false,
792 "deleted_at": "2026-10-05T09:30:00.000Z",
793 "deleted_by": "syntaqx",
794 "purge_after": "2026-11-04T09:30:00.000Z"
795 }
796 ],
797 "notes": "Newest first. Empty for anyone who is not an owner of the workspace."
798 },
799 "restore_repo": {
800 "response": {
801 "id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
802 "namespace": "flagon-io",
803 "name": "hello",
804 "description": "A tiny service that says hello.",
805 "is_private": false,
806 "owner_id": "usr_01kkntcg1eeb98j62xjm7eh09p",
807 "default_branch": "main",
808 "fork_of": null,
809 "protected": true,
810 "created_at": "2026-09-28T14:11:52.640Z",
811 "topics": [
812 "http",
813 "example"
814 ],
815 "website": "https://hello.g1t.page",
816 "archived_at": null
817 },
818 "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)."
819 },
820 "purge_repo": {
821 "request": {
822 "confirm": "flagon-io/hello"
823 },
824 "response": true,
825 "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."
826 },
827 "get_repo_settings": {
828 "response": {
829 "auto_merge": false,
830 "required_checks": [
831 "CI"
832 ],
833 "require_up_to_date": false,
834 "required_approvals": 0,
835 "count_agent_approvals": true,
836 "allow_ignoring_checks": true,
837 "agent_review": true,
838 "max_revisions": 2,
839 "merge_queue": false,
840 "hold_low_confidence": true,
841 "require_code_owner_review": false,
842 "updated_by": null,
843 "updated_at": null
844 }
845 },
846 "update_repo_settings": {
847 "request": {
848 "required_checks": [
849 "CI",
850 "g1t / deploy"
851 ],
852 "required_approvals": 1,
853 "count_agent_approvals": false,
854 "merge_queue": true,
855 "require_code_owner_review": true
856 },
857 "response": {
858 "auto_merge": false,
859 "required_checks": [
860 "CI",
861 "g1t / deploy"
862 ],
863 "require_up_to_date": false,
864 "required_approvals": 1,
865 "count_agent_approvals": false,
866 "allow_ignoring_checks": true,
867 "agent_review": true,
868 "max_revisions": 2,
869 "merge_queue": true,
870 "hold_low_confidence": true,
871 "require_code_owner_review": true,
872 "updated_by": "syntaqx",
873 "updated_at": "2026-10-04T16:20:37.508Z"
874 },
875 "notes": "`required_checks` replaces the whole list: at most 20 names, each a workflow's name or another status's context, as [`list_check_names`](/reference/api/repositories/list-check-names/) gives them. A pull request merges only once each passes on its head; one nothing has reported holds it too. With the merge queue on, each must also pass on the queued state, so the workflows behind them need `merge_group` in their `on:`. `required_approvals` is at most 6 and `max_revisions` at most 5. See [what a repository can ask for](/guides/working-with-g1t/#what-a-repository-can-ask-for). `hold_low_confidence` is on unless turned off: see [confidence](/guides/working-with-g1t/#how-sure-the-agent-is). With `require_code_owner_review`, a pull request into the default branch merges only once the code owners of every file it changes have approved it, as many as each section of its CODEOWNERS file asks: see [Code owners](/guides/codeowners/)."
876 },
877 "list_check_names": {
878 "response": [
879 {
880 "name": "CI",
881 "events": [
882 "pull_request",
883 "merge_group",
884 "push"
885 ],
886 "last_seen": "2026-10-06T09:14:02.118Z"
887 },
888 {
889 "name": "g1t / deploy",
890 "events": [],
891 "last_seen": "2026-10-06T08:51:40.006Z"
892 }
893 ],
894 "notes": "The names reported on the repository's commits in the last 30 days, most recent first. A workflow reports a check named after it (`CI`), for each event it ran for; another tool, such as a deployment, reports its own name (`g1t / deploy`). Empty until something has reported on a commit: add a workflow in `.g1t/workflows` first."
895 },
896 "get_codeowners_errors": {
897 "params": {
898 "owner": "flagon-io",
899 "name": "hello"
900 },
901 "query": {
902 "ref": "main"
903 },
904 "response": {
905 "path": ".github/CODEOWNERS",
906 "ref": "main",
907 "size": 412,
908 "rules": 9,
909 "sections": [
910 "Docs"
911 ],
912 "errors": [
913 {
914 "line": 4,
915 "kind": "unknown_team",
916 "token": "@flagon-io/platform",
917 "message": "@flagon-io/platform is not a team of flagon-io."
918 },
919 {
920 "line": 7,
921 "kind": "negation",
922 "token": "!docs/internal/",
923 "message": "!docs/internal/ starts with !, and negation is not supported; this line is skipped. Give the path a later rule with no owners instead."
924 }
925 ]
926 },
927 "notes": "The file is the first of `.g1t/CODEOWNERS`, `.github/CODEOWNERS`, `CODEOWNERS`, `docs/CODEOWNERS` and `.gitlab/CODEOWNERS` found on `ref` (the default branch when left out); `path` is null when there is none, with no errors. Each error has its `line` (0 for the file as a whole), the `token` at fault, a `message`, and a `kind`:\n\n| `kind` | |\n| --- | --- |\n| `too_large` | The file is over 3 MB and was ignored. |\n| `negation` | A pattern starting with `!`; the line was skipped. |\n| `character_range` | A pattern with `[` or `]`; the line was skipped. |\n| `bad_pattern` | A pattern that names no path; the line was skipped. |\n| `bad_owner` | An owner that is not `@user`, `@workspace/team` or an email address. |\n| `bad_section` | A section header that could not be read. |\n| `unknown_user` | No account has that username. |\n| `unknown_team` | The workspace has no team of that slug. |\n| `unknown_email` | No account has confirmed that address. |\n| `no_write_access` | The person cannot write to the repository. |\n| `team_no_access` | The team has no write access to the repository. |\n\nSee [Code owners](/guides/codeowners/)."
928 },
929 "list_events": {
930 "query": {
931 "before": "evt_01m43t2a6c9e3g7j1m5q9t3x7b"
932 },
933 "response": [
934 {
935 "id": "evt_01m43smh3ve52vkcna207vqctf",
936 "type": "pull.opened",
937 "source": "work",
938 "time": "2026-10-01T18:20:02.117Z",
939 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
940 "actor": "usr_01kkntcg1eeb98j62xjm7eh09p",
941 "data": {
942 "pull_id": "pr_01m43smh3vexsr5pmp60qwv0vs",
943 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
944 "number": 14,
945 "issue": 12,
946 "agent": "claude-code"
947 }
948 },
949 {
950 "id": "evt_01m43shrzpf2vt5rxbb02z0xjt",
951 "type": "issue.opened",
952 "source": "work",
953 "time": "2026-10-01T18:04:11.482Z",
954 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
955 "actor": "usr_01kkntcg1eeb98j62xjm7eh09p",
956 "data": {
957 "issue_id": "iss_01m43shrzpfe49x74ga7sj1c6v",
958 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
959 "number": 12,
960 "title": "Greeting should name the caller"
961 }
962 }
963 ],
964 "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`."
965 },
966 "list_issues": {
967 "query": {
968 "state": "open",
969 "label": "feature"
970 },
971 "response": [
972 {
973 "id": "iss_01m43shrzpfe49x74ga7sj1c6v",
974 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
975 "number": 12,
976 "title": "Greeting should name the caller",
977 "body": "Take a name from the first argument; fall back to world.",
978 "labels": [
979 "feature"
980 ],
981 "state": "open",
982 "reason": null,
983 "resolved_by": null,
984 "author": {
985 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
986 "username": "syntaqx",
987 "kind": "user",
988 "verified": false,
989 "workspaces": []
990 },
991 "requested_by": null,
992 "created_at": "2026-10-01T18:04:11.482Z",
993 "updated_at": "2026-10-01T18:04:11.482Z",
994 "closed_at": null,
995 "pull_count": 1,
996 "comment_count": 0,
997 "assignees": [],
998 "blocked_by": [],
999 "queued": false,
1000 "agent": "claude-code",
1001 "milestone": null
1002 }
1003 ],
1004 "notes": "Returns at most 100 issues, newest first. `comment_count` counts comments, not events such as \"opened #14 for this\"."
1005 },
1006 "create_issue": {
1007 "request": {
1008 "title": "Greeting should name the caller",
1009 "body": "Take a name from the first argument; fall back to world.",
1010 "labels": [
1011 "feature"
1012 ]
1013 },
1014 "response": {
1015 "id": "iss_01m43shrzpfe49x74ga7sj1c6v",
1016 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
1017 "number": 12,
1018 "title": "Greeting should name the caller",
1019 "body": "Take a name from the first argument; fall back to world.",
1020 "labels": [
1021 "feature"
1022 ],
1023 "state": "open",
1024 "reason": null,
1025 "resolved_by": null,
1026 "author": {
1027 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
1028 "username": "syntaqx",
1029 "kind": "user",
1030 "verified": false,
1031 "workspaces": []
1032 },
1033 "requested_by": null,
1034 "created_at": "2026-10-01T18:04:11.482Z",
1035 "updated_at": "2026-10-01T18:04:11.482Z",
1036 "closed_at": null,
1037 "pull_count": 0,
1038 "comment_count": 0,
1039 "assignees": [],
1040 "blocked_by": [],
1041 "queued": false,
1042 "agent": null,
1043 "milestone": null
1044 },
1045 "notes": "Labels are lowercased. A label not used before is created."
1046 },
1047 "get_issue": {
1048 "response": {
1049 "issue": {
1050 "id": "iss_01m43shrzpfe49x74ga7sj1c6v",
1051 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
1052 "number": 12,
1053 "title": "Greeting should name the caller",
1054 "body": "Take a name from the first argument; fall back to world.",
1055 "labels": [
1056 "feature"
1057 ],
1058 "state": "closed",
1059 "reason": "completed",
1060 "resolved_by": 14,
1061 "author": {
1062 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
1063 "username": "syntaqx",
1064 "kind": "user",
1065 "verified": false,
1066 "workspaces": []
1067 },
1068 "requested_by": null,
1069 "created_at": "2026-10-01T18:04:11.482Z",
1070 "updated_at": "2026-10-01T18:52:17.093Z",
1071 "closed_at": "2026-10-01T18:52:17.093Z",
1072 "pull_count": 2,
1073 "comment_count": 0,
1074 "assignees": [],
1075 "blocked_by": [],
1076 "queued": false,
1077 "agent": null,
1078 "milestone": null
1079 },
1080 "pulls": [
1081 {
1082 "id": "pr_01m43sjq8tcz5rbm2a7k4d9e6w",
1083 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
1084 "number": 13,
1085 "issue": 12,
1086 "title": "Greeting should name the caller",
1087 "body": null,
1088 "agent": "claude-code",
1089 "runtime": "external",
1090 "status": "closed",
1091 "fork": {
1092 "namespace": "pulls",
1093 "name": "pr_01m43sjq8tcz5rbm2a7k4d9e6w"
1094 },
1095 "fork_repo_id": "rep_01m43smh5xd7aw2kq9tv0b4c8e",
1096 "branch": null,
1097 "head_commit": null,
1098 "merge_base": null,
1099 "merged_by": null,
1100 "merged_at": null,
1101 "superseded_by": 14,
1102 "check_status": null,
1103 "files": [],
1104 "assignees": [],
1105 "reviewers": [],
1106 "labels": [],
1107 "milestone": null,
1108 "base": "main",
1109 "author": {
1110 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
1111 "username": "syntaqx",
1112 "kind": "user",
1113 "verified": false,
1114 "workspaces": []
1115 },
1116 "requested_by": null,
1117 "created_at": "2026-10-01T18:20:02.117Z",
1118 "updated_at": "2026-10-01T18:20:02.117Z"
1119 },
1120 {
1121 "id": "pr_01m43smh3vexsr5pmp60qwv0vs",
1122 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
1123 "number": 14,
1124 "issue": 12,
1125 "title": "Greeting should name the caller",
1126 "body": "Reads a name from the first argument. `hello ana` prints \"Hello, ana!\".",
1127 "agent": "claude-code",
1128 "runtime": "external",
1129 "status": "merged",
1130 "fork": {
1131 "namespace": "pulls",
1132 "name": "pr_01m43smh3vexsr5pmp60qwv0vs"
1133 },
1134 "fork_repo_id": "rep_01m43smh5xd7aw2kq9tv0b4c8e",
1135 "branch": null,
1136 "head_commit": "9f2c4e1a7b3d5f60812a4c6e8b0d2f4a6c8e0b13",
1137 "merge_base": "3a7e9c1b5d2f4a6c8e0b2d4f6a8c0e2b4d6f8a1c",
1138 "merged_by": "syntaqx",
1139 "merged_at": "2026-10-01T18:52:17.093Z",
1140 "superseded_by": null,
1141 "check_status": "passed",
1142 "files": [
1143 {
1144 "path": "src/main.rs",
1145 "additions": 6,
1146 "deletions": 2
1147 }
1148 ],
1149 "assignees": [],
1150 "reviewers": [
1151 "ana"
1152 ],
1153 "labels": [],
1154 "milestone": null,
1155 "base": "main",
1156 "author": {
1157 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
1158 "username": "syntaqx",
1159 "kind": "user",
1160 "verified": false,
1161 "workspaces": []
1162 },
1163 "requested_by": null,
1164 "created_at": "2026-10-01T18:20:02.117Z",
1165 "updated_at": "2026-10-01T18:52:17.093Z"
1166 }
1167 ],
1168 "comments": [
1169 {
1170 "id": "cmt_01m43sr2b7d5f0j6k3n8p1q4v9",
1171 "kind": "event",
1172 "author": {
1173 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
1174 "username": "syntaqx",
1175 "kind": "user",
1176 "verified": false,
1177 "workspaces": []
1178 },
1179 "body": "opened #14 for this",
1180 "path": null,
1181 "line": null,
1182 "verdict": null,
1183 "created_at": "2026-10-01T18:20:02.141Z"
1184 }
1185 ]
1186 },
1187 "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."
1188 },
1189 "update_issue": {
1190 "request": {
1191 "labels": [
1192 "feature",
1193 "good first issue"
1194 ],
1195 "assignees": [
1196 "syntaqx"
1197 ],
1198 "milestone": 3
1199 },
1200 "response": {
1201 "id": "iss_01m43shrzpfe49x74ga7sj1c6v",
1202 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
1203 "number": 12,
1204 "title": "Greeting should name the caller",
1205 "body": "Take a name from the first argument; fall back to world.",
1206 "labels": [
1207 "feature",
1208 "good first issue"
1209 ],
1210 "state": "open",
1211 "reason": null,
1212 "resolved_by": null,
1213 "author": {
1214 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
1215 "username": "syntaqx",
1216 "kind": "user",
1217 "verified": false,
1218 "workspaces": []
1219 },
1220 "requested_by": null,
1221 "created_at": "2026-10-01T18:04:11.482Z",
1222 "updated_at": "2026-10-01T18:09:47.305Z",
1223 "closed_at": null,
1224 "pull_count": 0,
1225 "comment_count": 0,
1226 "assignees": [
1227 "syntaqx"
1228 ],
1229 "blocked_by": [],
1230 "queued": false,
1231 "agent": null,
1232 "milestone": {
1233 "number": 3,
1234 "title": "Launch"
1235 }
1236 }
1237 },
1238 "close_issue": {
1239 "request": {
1240 "reason": "not_planned"
1241 },
1242 "response": {
1243 "id": "iss_01m43shrzpfe49x74ga7sj1c6v",
1244 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
1245 "number": 12,
1246 "title": "Greeting should name the caller",
1247 "body": "Take a name from the first argument; fall back to world.",
1248 "labels": [
1249 "feature"
1250 ],
1251 "state": "closed",
1252 "reason": "not_planned",
1253 "resolved_by": null,
1254 "author": {
1255 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
1256 "username": "syntaqx",
1257 "kind": "user",
1258 "verified": false,
1259 "workspaces": []
1260 },
1261 "requested_by": null,
1262 "created_at": "2026-10-01T18:04:11.482Z",
1263 "updated_at": "2026-10-01T19:30:00.214Z",
1264 "closed_at": "2026-10-01T19:30:00.214Z",
1265 "pull_count": 0,
1266 "comment_count": 0,
1267 "assignees": [],
1268 "blocked_by": [],
1269 "queued": false,
1270 "agent": null,
1271 "milestone": null
1272 }
1273 },
1274 "reopen_issue": {
1275 "response": {
1276 "id": "iss_01m43shrzpfe49x74ga7sj1c6v",
1277 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
1278 "number": 12,
1279 "title": "Greeting should name the caller",
1280 "body": "Take a name from the first argument; fall back to world.",
1281 "labels": [
1282 "feature"
1283 ],
1284 "state": "open",
1285 "reason": null,
1286 "resolved_by": null,
1287 "author": {
1288 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
1289 "username": "syntaqx",
1290 "kind": "user",
1291 "verified": false,
1292 "workspaces": []
1293 },
1294 "requested_by": null,
1295 "created_at": "2026-10-01T18:04:11.482Z",
1296 "updated_at": "2026-10-01T19:41:52.830Z",
1297 "closed_at": null,
1298 "pull_count": 0,
1299 "comment_count": 0,
1300 "assignees": [],
1301 "blocked_by": [],
1302 "queued": false,
1303 "agent": null,
1304 "milestone": null
1305 }
1306 },
1307 "assign_issue": {
1308 "request": {
1309 "instructions": "Keep the change to src/main.rs."
1310 },
1311 "response": {
1312 "id": "pr_01m43smh3vexsr5pmp60qwv0vs",
1313 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
1314 "number": 14,
1315 "issue": 12,
1316 "title": "Greeting should name the caller",
1317 "body": null,
1318 "agent": "g1t",
1319 "runtime": "hosted",
1320 "status": "draft",
1321 "fork": {
1322 "namespace": "pulls",
1323 "name": "pr_01m43smh3vexsr5pmp60qwv0vs"
1324 },
1325 "fork_repo_id": "rep_01m43smh5xd7aw2kq9tv0b4c8e",
1326 "branch": null,
1327 "head_commit": null,
1328 "merge_base": null,
1329 "merged_by": null,
1330 "merged_at": null,
1331 "superseded_by": null,
1332 "check_status": null,
1333 "files": [],
1334 "assignees": [],
1335 "reviewers": [],
1336 "labels": [],
1337 "milestone": null,
1338 "base": "main",
1339 "author": {
1340 "id": "usr_g1t_agent",
1341 "username": "g1t",
1342 "kind": "agent",
1343 "verified": false,
1344 "workspaces": []
1345 },
1346 "requested_by": {
1347 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
1348 "username": "syntaqx",
1349 "kind": "user",
1350 "verified": false,
1351 "workspaces": []
1352 },
1353 "created_at": "2026-10-01T18:20:02.117Z",
1354 "updated_at": "2026-10-01T18:20:02.117Z",
1355 "confidence": null
1356 },
1357 "notes": "The response is the pull request g1t opened, still a draft. g1t is its `author` and you are its `requested_by`: you may manage it as if you had opened it, and cannot approve it yourself. Follow it with [get a pull request](/reference/api/pull-requests/get-pull-request/): `lifecycle` says what the agent is doing."
1358 },
1359 "delegate": {
1360 "request": {
1361 "title": "Retry webhooks with exponential backoff",
1362 "body": "Deliveries that fail are dropped today. Retry them with exponential backoff, up to six times, then mark the delivery failed.\n\n## Definition of done\n\n- A delivery that fails is retried after 1, 2, 4, 8, 16 and 32 seconds.\n- After the sixth failure it is marked failed and shows on the webhook's page."
1363 },
1364 "response": {
1365 "issue": {
1366 "id": "iss_01m4a2c8v1t7k3q9x5n0r2w6yd",
1367 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
1368 "number": 41,
1369 "title": "Retry webhooks with exponential backoff",
1370 "body": "Deliveries that fail are dropped today. Retry them with exponential backoff, up to six times, then mark the delivery failed.",
1371 "labels": [],
1372 "state": "open",
1373 "reason": null,
1374 "resolved_by": null,
1375 "author": {
1376 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
1377 "username": "syntaqx",
1378 "kind": "user",
1379 "verified": false,
1380 "workspaces": []
1381 },
1382 "requested_by": null,
1383 "created_at": "2026-10-05T14:02:11.204Z",
1384 "updated_at": "2026-10-05T14:02:11.204Z",
1385 "closed_at": null,
1386 "pull_count": 1,
1387 "comment_count": 0,
1388 "assignees": [],
1389 "blocked_by": [],
1390 "queued": false,
1391 "agent": "g1t",
1392 "milestone": null
1393 },
1394 "pull": {
1395 "id": "pr_01m4a2c9b6e0h4m8q2t6x0a4d8",
1396 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
1397 "number": 42,
1398 "issue": 41,
1399 "title": "Retry webhooks with exponential backoff",
1400 "body": null,
1401 "agent": "g1t",
1402 "runtime": "hosted",
1403 "status": "draft",
1404 "fork": {
1405 "namespace": "pulls",
1406 "name": "pr_01m4a2c9b6e0h4m8q2t6x0a4d8"
1407 },
1408 "fork_repo_id": "rep_01m4a2c9d2g6k0n4r8v2z6c0f4",
1409 "branch": null,
1410 "head_commit": null,
1411 "merge_base": null,
1412 "merged_by": null,
1413 "merged_at": null,
1414 "superseded_by": null,
1415 "check_status": null,
1416 "files": [],
1417 "assignees": [],
1418 "reviewers": [],
1419 "labels": [],
1420 "milestone": null,
1421 "base": "main",
1422 "author": {
1423 "id": "usr_g1t_agent",
1424 "username": "g1t",
1425 "kind": "agent",
1426 "verified": false,
1427 "workspaces": []
1428 },
1429 "requested_by": {
1430 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
1431 "username": "syntaqx",
1432 "kind": "user",
1433 "verified": false,
1434 "workspaces": []
1435 },
1436 "created_at": "2026-10-05T14:02:12.880Z",
1437 "updated_at": "2026-10-05T14:02:12.880Z",
1438 "confidence": null
1439 },
1440 "agent": {
1441 "status": "started",
1442 "code": null,
1443 "message": null,
1444 "fix_url": null
1445 }
1446 },
1447 "notes": "The issue is opened whatever becomes of the agent. When the workspace's plan does not let it start, `pull` is null and `agent` says why and where to fix it, for example `{ \"status\": \"not_started\", \"code\": \"not_paid\", \"message\": \"Agents need a paid workspace. Start the $20 plan or try it with $5 of free usage after a card check: /acme/-/billing\", \"fix_url\": \"https://g1t.sh/acme/-/billing\" }`. With every agent slot busy, `status` is `queued` and it starts by itself when one frees up. See [putting an agent on something](/guides/working-with-g1t/#put-an-agent-on-it-in-one-step)."
1448 },
1449 "add_comment": {
1450 "request": {
1451 "body": "Should an empty name fall back to \"world\"?"
1452 },
1453 "response": {
1454 "id": "cmt_01m43sv4c8e2g6j0m4q8t2x6a1",
1455 "kind": "comment",
1456 "author": {
1457 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
1458 "username": "syntaqx",
1459 "kind": "user",
1460 "verified": true,
1461 "workspaces": [
1462 {
1463 "slug": "flagon-io",
1464 "role": "owner"
1465 }
1466 ]
1467 },
1468 "body": "Should an empty name fall back to \"world\"?",
1469 "path": null,
1470 "line": null,
1471 "verdict": null,
1472 "created_at": "2026-10-01T18:12:30.551Z"
1473 }
1474 },
1475 "list_labels": {
1476 "response": [
1477 {
1478 "name": "bug",
1479 "color": "d73a4a",
1480 "description": "Something isn't working",
1481 "issues": 4,
1482 "pulls": 1
1483 },
1484 {
1485 "name": "dependencies",
1486 "color": "0366d6",
1487 "description": "Updates a dependency",
1488 "issues": 0,
1489 "pulls": 6
1490 },
1491 {
1492 "name": "good first issue",
1493 "color": "7057ff",
1494 "description": "Good for newcomers",
1495 "issues": 2,
1496 "pulls": 0
1497 }
1498 ],
1499 "notes": "By name. A new repository starts with the default labels; add_default_labels adds those an older one is missing."
1500 },
1501 "plan_work": {
1502 "request": {
1503 "brief": "Greet people by name, from the command line and the web page."
1504 },
1505 "response": {
1506 "plan_id": "pln_01m43s9c4e8g2j6m0q4t8x2b6d"
1507 }
1508 },
1509 "get_plan": {
1510 "params": {
1511 "plan": "pln_01m43s9c4e8g2j6m0q4t8x2b6d"
1512 },
1513 "response": {
1514 "id": "pln_01m43s9c4e8g2j6m0q4t8x2b6d",
1515 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
1516 "brief": "Greet people by name, from the command line and the web page.",
1517 "status": "ready",
1518 "summary": "Name parsing first, then the two places that print the greeting.",
1519 "issues": [
1520 {
1521 "title": "Greeting should name the caller",
1522 "body": "Accept an optional name in `greet()` and use it.",
1523 "labels": [
1524 "feature"
1525 ],
1526 "done": [
1527 "`greet` prints \"Hello, ana!\" when given \"ana\", and \"Hello, world!\" with no argument."
1528 ],
1529 "files": [
1530 "src/greet.rs"
1531 ],
1532 "depends_on": [],
1533 "number": null
1534 },
1535 {
1536 "title": "Show the caller's name on the web page",
1537 "body": "Read `?name=` and pass it to `greet()`.",
1538 "labels": [
1539 "feature"
1540 ],
1541 "done": [
1542 "The page at / shows the name given in ?name=, escaped."
1543 ],
1544 "files": [
1545 "src/web.rs"
1546 ],
1547 "depends_on": [
1548 1
1549 ],
1550 "number": null
1551 }
1552 ],
1553 "error": null,
1554 "author": {
1555 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
1556 "username": "syntaqx",
1557 "kind": "user",
1558 "verified": false,
1559 "workspaces": []
1560 },
1561 "created_at": "2026-10-01T17:58:40.006Z",
1562 "finished_at": "2026-10-01T18:01:12.774Z",
1563 "progress": [],
1564 "exchanges": []
1565 },
1566 "notes": "A plan still `planning` after 20 minutes is reported as `failed`. `progress` follows each issue once the plan is applied."
1567 },
1568 "apply_plan": {
1569 "params": {
1570 "plan": "pln_01m43s9c4e8g2j6m0q4t8x2b6d"
1571 },
1572 "request": {
1573 "assign": true
1574 },
1575 "response": {
1576 "id": "pln_01m43s9c4e8g2j6m0q4t8x2b6d",
1577 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
1578 "brief": "Greet people by name, from the command line and the web page.",
1579 "status": "applied",
1580 "summary": "Name parsing first, then the two places that print the greeting.",
1581 "issues": [
1582 {
1583 "title": "Greeting should name the caller",
1584 "body": "Accept an optional name in `greet()` and use it.",
1585 "labels": [
1586 "feature"
1587 ],
1588 "done": [
1589 "`greet` prints \"Hello, ana!\" when given \"ana\", and \"Hello, world!\" with no argument."
1590 ],
1591 "files": [
1592 "src/greet.rs"
1593 ],
1594 "depends_on": [],
1595 "number": 12
1596 },
1597 {
1598 "title": "Show the caller's name on the web page",
1599 "body": "Read `?name=` and pass it to `greet()`.",
1600 "labels": [
1601 "feature"
1602 ],
1603 "done": [
1604 "The page at / shows the name given in ?name=, escaped."
1605 ],
1606 "files": [
1607 "src/web.rs"
1608 ],
1609 "depends_on": [
1610 1
1611 ],
1612 "number": 13
1613 }
1614 ],
1615 "error": null,
1616 "author": {
1617 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
1618 "username": "syntaqx",
1619 "kind": "user",
1620 "verified": false,
1621 "workspaces": []
1622 },
1623 "created_at": "2026-10-01T17:58:40.006Z",
1624 "finished_at": "2026-10-01T18:01:12.774Z",
1625 "progress": [],
1626 "exchanges": []
1627 },
1628 "notes": "Each opened issue's `number` is filled in. Issues left out with `keep` stay `null`."
1629 },
1630 "list_pull_requests": {
1631 "query": {
1632 "state": "open"
1633 },
1634 "response": [
1635 {
1636 "id": "pr_01m43smh3vexsr5pmp60qwv0vs",
1637 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
1638 "number": 14,
1639 "issue": 12,
1640 "title": "Greeting should name the caller",
1641 "body": "Reads a name from the first argument. `hello ana` prints \"Hello, ana!\".",
1642 "agent": "claude-code",
1643 "runtime": "external",
1644 "status": "open",
1645 "fork": {
1646 "namespace": "pulls",
1647 "name": "pr_01m43smh3vexsr5pmp60qwv0vs"
1648 },
1649 "fork_repo_id": "rep_01m43smh5xd7aw2kq9tv0b4c8e",
1650 "branch": null,
1651 "head_commit": "9f2c4e1a7b3d5f60812a4c6e8b0d2f4a6c8e0b13",
1652 "merge_base": null,
1653 "merged_by": null,
1654 "merged_at": null,
1655 "superseded_by": null,
1656 "check_status": "passed",
1657 "files": [
1658 {
1659 "path": "src/main.rs",
1660 "additions": 6,
1661 "deletions": 2
1662 }
1663 ],
1664 "assignees": [],
1665 "reviewers": [
1666 "ana"
1667 ],
1668 "team_reviewers": [],
1669 "author": {
1670 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
1671 "username": "syntaqx",
1672 "kind": "user",
1673 "verified": false,
1674 "workspaces": []
1675 },
1676 "requested_by": null,
1677 "created_at": "2026-10-01T18:20:02.117Z",
1678 "updated_at": "2026-10-01T18:35:44.902Z",
1679 "labels": [],
1680 "milestone": null,
1681 "base": "main"
1682 }
1683 ],
1684 "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."
1685 },
1686 "create_pull_request": {
1687 "request": {
1688 "issue": 12,
1689 "agent": "claude-code"
1690 },
1691 "response": {
1692 "pull": {
1693 "id": "pr_01m43smh3vexsr5pmp60qwv0vs",
1694 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
1695 "number": 14,
1696 "issue": 12,
1697 "title": "Greeting should name the caller",
1698 "body": null,
1699 "agent": "claude-code",
1700 "runtime": "external",
1701 "status": "draft",
1702 "fork": {
1703 "namespace": "pulls",
1704 "name": "pr_01m43smh3vexsr5pmp60qwv0vs"
1705 },
1706 "fork_repo_id": "rep_01m43smh5xd7aw2kq9tv0b4c8e",
1707 "branch": null,
1708 "head_commit": null,
1709 "merge_base": null,
1710 "merged_by": null,
1711 "merged_at": null,
1712 "superseded_by": null,
1713 "check_status": null,
1714 "files": [],
1715 "assignees": [],
1716 "reviewers": [],
1717 "labels": [],
1718 "milestone": null,
1719 "base": "main",
1720 "author": {
1721 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
1722 "username": "syntaqx",
1723 "kind": "user",
1724 "verified": false,
1725 "workspaces": []
1726 },
1727 "requested_by": null,
1728 "created_at": "2026-10-01T18:20:02.117Z",
1729 "updated_at": "2026-10-01T18:20:02.117Z"
1730 },
1731 "git": {
1732 "remote": "https://g1t.sh/pulls/pr_01m43smh3vexsr5pmp60qwv0vs.git",
1733 "username": "syntaqx",
1734 "password": "your g1t access token"
1735 }
1736 },
1737 "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."
1738 },
1739 "get_pull_request": {
1740 "response": {
1741 "pull": {
1742 "id": "pr_01m43smh3vexsr5pmp60qwv0vs",
1743 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
1744 "number": 14,
1745 "issue": 12,
1746 "title": "Greeting should name the caller",
1747 "body": "Reads a name from the first argument. `hello ana` prints \"Hello, ana!\".",
1748 "agent": "claude-code",
1749 "runtime": "external",
1750 "status": "open",
1751 "fork": {
1752 "namespace": "pulls",
1753 "name": "pr_01m43smh3vexsr5pmp60qwv0vs"
1754 },
1755 "fork_repo_id": "rep_01m43smh5xd7aw2kq9tv0b4c8e",
1756 "branch": null,
1757 "head_commit": "9f2c4e1a7b3d5f60812a4c6e8b0d2f4a6c8e0b13",
1758 "merge_base": null,
1759 "merged_by": null,
1760 "merged_at": null,
1761 "superseded_by": null,
1762 "check_status": "passed",
1763 "files": [
1764 {
1765 "path": "src/main.rs",
1766 "additions": 6,
1767 "deletions": 2
1768 }
1769 ],
1770 "assignees": [],
1771 "reviewers": [
1772 "ana"
1773 ],
1774 "team_reviewers": [
1775 "flagon-io/backend"
1776 ],
1777 "author": {
1778 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
1779 "username": "syntaqx",
1780 "kind": "user",
1781 "verified": false,
1782 "workspaces": []
1783 },
1784 "requested_by": null,
1785 "created_at": "2026-10-01T18:20:02.117Z",
1786 "updated_at": "2026-10-01T18:35:44.902Z",
1787 "confidence": null,
1788 "labels": [],
1789 "milestone": null,
1790 "base": "main"
1791 },
1792 "issue": {
1793 "id": "iss_01m43shrzpfe49x74ga7sj1c6v",
1794 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
1795 "number": 12,
1796 "title": "Greeting should name the caller",
1797 "body": "Take a name from the first argument; fall back to world.",
1798 "labels": [
1799 "feature"
1800 ],
1801 "state": "open",
1802 "reason": null,
1803 "resolved_by": null,
1804 "author": {
1805 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
1806 "username": "syntaqx",
1807 "kind": "user",
1808 "verified": false,
1809 "workspaces": []
1810 },
1811 "requested_by": null,
1812 "created_at": "2026-10-01T18:04:11.482Z",
1813 "updated_at": "2026-10-01T18:20:02.117Z",
1814 "closed_at": null,
1815 "pull_count": 1,
1816 "comment_count": 0,
1817 "assignees": [],
1818 "blocked_by": [],
1819 "queued": false,
1820 "agent": "claude-code",
1821 "milestone": null
1822 },
1823 "comments": [
1824 {
1825 "id": "cmt_01m43st6d0f4h8k2n6r0v4z8c2",
1826 "kind": "event",
1827 "author": {
1828 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
1829 "username": "syntaqx",
1830 "kind": "user",
1831 "verified": false,
1832 "workspaces": []
1833 },
1834 "body": "marked this ready for review",
1835 "path": null,
1836 "line": null,
1837 "verdict": null,
1838 "created_at": "2026-10-01T18:33:10.420Z"
1839 }
1840 ],
1841 "checks": null,
1842 "overlaps": [],
1843 "behind": false,
1844 "review_pending": false,
1845 "lifecycle": null,
1846 "landing": false,
1847 "stalled": null,
1848 "messages": [
1849 {
1850 "id": "msg_01m43tx5egeh4t3f9zcnjenqvz",
1851 "author": "syntaqx",
1852 "body": "Keep \"world\" as the default when no name is given.",
1853 "created_at": "2026-10-01T18:25:00.310Z",
1854 "delivered_at": "2026-10-01T18:25:31.007Z",
1855 "kind": "message",
1856 "from_number": null,
1857 "to_number": 14,
1858 "answer": null,
1859 "declined": false
1860 }
1861 ],
1862 "statuses": [
1863 {
1864 "context": "CI / pull_request",
1865 "state": "success",
1866 "description": "CI passed",
1867 "target_url": "https://g1t.sh/syntaqx/hello/actions/runs/run_01m43sw8e2g6j0m4q8t2x6a0c4",
1868 "updated_at": "2026-10-01T18:35:44.902Z"
1869 }
1870 ],
1871 "required_checks": [
1872 {
1873 "name": "CI",
1874 "state": "success",
1875 "description": "CI passed",
1876 "target_url": "https://g1t.sh/syntaqx/hello/actions/runs/run_01m43sw8e2g6j0m4q8t2x6a0c4"
1877 }
1878 ],
1879 "code_owners": {
1880 "path": ".github/CODEOWNERS",
1881 "required": true,
1882 "reviews": [
1883 {
1884 "section": null,
1885 "line": 3,
1886 "pattern": "/src/",
1887 "owners": [
1888 "@flagon-io/backend"
1889 ],
1890 "files": [
1891 "src/main.rs"
1892 ],
1893 "optional": false,
1894 "required": 1,
1895 "approved_by": [],
1896 "changes_requested_by": [],
1897 "satisfied": false
1898 }
1899 ],
1900 "missing": "Code owners have not approved: @flagon-io/backend for /src/.",
1901 "errors": 0
1902 }
1903 },
1904 "notes": "| Field | |\n| --- | --- |\n| `pull.files` | The files it changes, with lines added and removed. |\n| `statuses` | Its checks: what each workflow run (or another tool, such as a deployment) reported on its head, as `pending`, `success`, `failure` or `error`, with a link to the run. |\n| `required_checks` | Each check the default branch requires (see [`update_repo_settings`](/reference/api/repositories/update-repo-settings/)), as it stands on the head: `success`, `failure`, `pending`, or `expected` when nothing has reported it yet. It merges only once all are `success`. |\n| `checks` | Set when the merge queue took it out, with why in `error`. Older pull requests may show a run of commands from their issue here, from before checks were workflows. |\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 g1t 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| `pull.reviewers`, `pull.team_reviewers` | The people asked to review it, `g1t` among them when a g1t agent was, and the teams, as `workspace/team`. Change them with [`request_reviewers`](/reference/api/pull-requests/request-reviewers/). |\n| `code_owners` | Present when the branch it merges into has a CODEOWNERS file: its `path`, whether code owners' approval is `required` there, `reviews` (one per section and rule that owns a changed file: `section`, `line`, `pattern`, `owners`, `files`, `optional`, the approvals `required`, `approved_by`, `changes_requested_by` and `satisfied`), what is still `missing`, as the merge box says it, and how many `errors` the file has; [`get_codeowners_errors`](/reference/api/repositories/get-codeowners-errors/) lists them. |\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 g1t do it. |\n| `earlier_checks` | Earlier records like `checks`, newest first. |\n\nChecks are the repository's workflows: they run on `pull_request` events when it is opened, marked ready and pushed to. Read why one failed with [`get_workflow_run`](/reference/api/actions/get-workflow-run/) and [`get_job_logs`](/reference/api/actions/get-job-logs/)."
1905 },
1906 "get_pull_request_changes": {
1907 "response": {
1908 "base": "3a7e9c1b5d2f4a6c8e0b2d4f6a8c0e2b4d6f8a1c",
1909 "head": "9f2c4e1a7b3d5f60812a4c6e8b0d2f4a6c8e0b13",
1910 "files": [
1911 {
1912 "path": "src/main.rs",
1913 "status": "modified",
1914 "additions": 1,
1915 "deletions": 1,
1916 "binary": false,
1917 "hunks": [
1918 {
1919 "lines": [
1920 {
1921 "kind": "context",
1922 "old": 3,
1923 "new": 3,
1924 "text": "fn main() {"
1925 },
1926 {
1927 "kind": "delete",
1928 "old": 4,
1929 "new": null,
1930 "text": " println!(\"Hello, world!\");"
1931 },
1932 {
1933 "kind": "add",
1934 "old": null,
1935 "new": 4,
1936 "text": " println!(\"Hello, {}!\", std::env::args().nth(1).unwrap_or(\"world\".into()));"
1937 },
1938 {
1939 "kind": "context",
1940 "old": 5,
1941 "new": 5,
1942 "text": "}"
1943 }
1944 ]
1945 }
1946 ]
1947 }
1948 ],
1949 "truncated": false
1950 },
1951 "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."
1952 },
1953 "mark_pull_request_ready": {
1954 "request": {
1955 "summary": "Reads a name from the first argument. `hello ana` prints \"Hello, ana!\"."
1956 },
1957 "response": {
1958 "id": "pr_01m43smh3vexsr5pmp60qwv0vs",
1959 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
1960 "number": 14,
1961 "issue": 12,
1962 "title": "Greeting should name the caller",
1963 "body": "Reads a name from the first argument. `hello ana` prints \"Hello, ana!\".",
1964 "agent": "claude-code",
1965 "runtime": "external",
1966 "status": "open",
1967 "fork": {
1968 "namespace": "pulls",
1969 "name": "pr_01m43smh3vexsr5pmp60qwv0vs"
1970 },
1971 "fork_repo_id": "rep_01m43smh5xd7aw2kq9tv0b4c8e",
1972 "branch": null,
1973 "head_commit": "9f2c4e1a7b3d5f60812a4c6e8b0d2f4a6c8e0b13",
1974 "merge_base": null,
1975 "merged_by": null,
1976 "merged_at": null,
1977 "superseded_by": null,
1978 "check_status": null,
1979 "files": [
1980 {
1981 "path": "src/main.rs",
1982 "additions": 6,
1983 "deletions": 2
1984 }
1985 ],
1986 "assignees": [],
1987 "reviewers": [],
1988 "labels": [],
1989 "milestone": null,
1990 "base": "main",
1991 "author": {
1992 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
1993 "username": "syntaqx",
1994 "kind": "user",
1995 "verified": false,
1996 "workspaces": []
1997 },
1998 "requested_by": null,
1999 "created_at": "2026-10-01T18:20:02.117Z",
2000 "updated_at": "2026-10-01T18:33:10.398Z"
2001 }
2002 },
2003 "review_pull_request": {
2004 "request": {
2005 "verdict": "request_changes",
2006 "body": "Trim the name before using it."
2007 },
2008 "response": {
2009 "id": "cmt_01m43sx9f3h7k1n5r9v3z7d1g5",
2010 "kind": "comment",
2011 "author": {
2012 "id": "usr_01kz9d3f7h1k5n9r3v7z1c5g9b",
2013 "username": "ana",
2014 "kind": "user",
2015 "verified": true,
2016 "workspaces": [
2017 {
2018 "slug": "flagon-io",
2019 "role": "member"
2020 }
2021 ]
2022 },
2023 "body": "Trim the name before using it.",
2024 "path": null,
2025 "line": null,
2026 "verdict": "request_changes",
2027 "created_at": "2026-10-01T18:40:05.019Z"
2028 }
2029 },
2030 "request_reviewers": {
2031 "params": {
2032 "owner": "flagon-io",
2033 "name": "hello",
2034 "number": 14
2035 },
2036 "request": {
2037 "reviewers": [
2038 "bo"
2039 ],
2040 "team_reviewers": [
2041 "backend"
2042 ]
2043 },
2044 "response": {
2045 "id": "pr_01m43smh3vexsr5pmp60qwv0vs",
2046 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
2047 "number": 14,
2048 "issue": 12,
2049 "title": "Greeting should name the caller",
2050 "body": "Reads a name from the first argument. `hello ana` prints \"Hello, ana!\".",
2051 "agent": "claude-code",
2052 "runtime": "external",
2053 "status": "open",
2054 "fork": {
2055 "namespace": "pulls",
2056 "name": "pr_01m43smh3vexsr5pmp60qwv0vs"
2057 },
2058 "fork_repo_id": "rep_01m43smh5xd7aw2kq9tv0b4c8e",
2059 "branch": null,
2060 "head_commit": "9f2c4e1a7b3d5f60812a4c6e8b0d2f4a6c8e0b13",
2061 "merge_base": null,
2062 "merged_by": null,
2063 "merged_at": null,
2064 "superseded_by": null,
2065 "check_status": "passed",
2066 "files": [
2067 {
2068 "path": "src/main.rs",
2069 "additions": 6,
2070 "deletions": 2
2071 }
2072 ],
2073 "assignees": [],
2074 "reviewers": [
2075 "ana",
2076 "bo"
2077 ],
2078 "team_reviewers": [
2079 "flagon-io/backend"
2080 ],
2081 "author": {
2082 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
2083 "username": "syntaqx",
2084 "kind": "user",
2085 "verified": false,
2086 "workspaces": []
2087 },
2088 "requested_by": null,
2089 "created_at": "2026-10-01T18:20:02.117Z",
2090 "updated_at": "2026-10-01T18:40:12.331Z"
2091 },
2092 "notes": "Adds to who is asked: `reviewers` by username (`g1t` asks a g1t agent), `team_reviewers` as `workspace/team`, or a team's slug in the repository's workspace. A team with review assignment on has the people it picks added to `reviewers`, and stays in `team_reviewers`. Each is told in their inbox. Nobody is asked to review their own pull request. `422` for someone who is not an account, or a team that does not exist or that you cannot see. Whoever opened it, or the Triage role or higher, while it is open. See [Pull requests](/guides/pull-requests/) and [Teams](/guides/teams/)."
2093 },
2094 "remove_requested_reviewers": {
2095 "params": {
2096 "owner": "flagon-io",
2097 "name": "hello",
2098 "number": 14
2099 },
2100 "request": {
2101 "reviewers": [
2102 "bo"
2103 ],
2104 "team_reviewers": [
2105 "flagon-io/backend"
2106 ]
2107 },
2108 "response": {
2109 "id": "pr_01m43smh3vexsr5pmp60qwv0vs",
2110 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
2111 "number": 14,
2112 "issue": 12,
2113 "title": "Greeting should name the caller",
2114 "body": "Reads a name from the first argument. `hello ana` prints \"Hello, ana!\".",
2115 "agent": "claude-code",
2116 "runtime": "external",
2117 "status": "open",
2118 "fork": {
2119 "namespace": "pulls",
2120 "name": "pr_01m43smh3vexsr5pmp60qwv0vs"
2121 },
2122 "fork_repo_id": "rep_01m43smh5xd7aw2kq9tv0b4c8e",
2123 "branch": null,
2124 "head_commit": "9f2c4e1a7b3d5f60812a4c6e8b0d2f4a6c8e0b13",
2125 "merge_base": null,
2126 "merged_by": null,
2127 "merged_at": null,
2128 "superseded_by": null,
2129 "check_status": "passed",
2130 "files": [
2131 {
2132 "path": "src/main.rs",
2133 "additions": 6,
2134 "deletions": 2
2135 }
2136 ],
2137 "assignees": [],
2138 "reviewers": [
2139 "ana"
2140 ],
2141 "team_reviewers": [],
2142 "author": {
2143 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
2144 "username": "syntaqx",
2145 "kind": "user",
2146 "verified": false,
2147 "workspaces": []
2148 },
2149 "requested_by": null,
2150 "created_at": "2026-10-01T18:20:02.117Z",
2151 "updated_at": "2026-10-01T18:41:30.904Z"
2152 },
2153 "notes": "Takes them off who is asked; anyone not asked is ignored. Reviews they already gave stay, as do the people a team's review assignment picked: remove them by username."
2154 },
2155 "merge_pull_request": {
2156 "request": {
2157 "keep_issue_open": false
2158 },
2159 "response": {
2160 "id": "pr_01m43smh3vexsr5pmp60qwv0vs",
2161 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
2162 "number": 14,
2163 "issue": 12,
2164 "title": "Greeting should name the caller",
2165 "body": "Reads a name from the first argument. `hello ana` prints \"Hello, ana!\".",
2166 "agent": "claude-code",
2167 "runtime": "external",
2168 "status": "merged",
2169 "fork": {
2170 "namespace": "pulls",
2171 "name": "pr_01m43smh3vexsr5pmp60qwv0vs"
2172 },
2173 "fork_repo_id": "rep_01m43smh5xd7aw2kq9tv0b4c8e",
2174 "branch": null,
2175 "head_commit": "9f2c4e1a7b3d5f60812a4c6e8b0d2f4a6c8e0b13",
2176 "merge_base": "3a7e9c1b5d2f4a6c8e0b2d4f6a8c0e2b4d6f8a1c",
2177 "merged_by": "syntaqx",
2178 "merged_at": "2026-10-01T18:52:17.093Z",
2179 "superseded_by": null,
2180 "check_status": "passed",
2181 "files": [
2182 {
2183 "path": "src/main.rs",
2184 "additions": 6,
2185 "deletions": 2
2186 }
2187 ],
2188 "assignees": [],
2189 "reviewers": [
2190 "ana"
2191 ],
2192 "labels": [],
2193 "milestone": null,
2194 "base": "main",
2195 "author": {
2196 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
2197 "username": "syntaqx",
2198 "kind": "user",
2199 "verified": false,
2200 "workspaces": []
2201 },
2202 "requested_by": null,
2203 "created_at": "2026-10-01T18:20:02.117Z",
2204 "updated_at": "2026-10-01T18:52:17.093Z"
2205 },
2206 "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."
2207 },
2208 "close_pull_request": {
2209 "response": {
2210 "id": "pr_01m43smh3vexsr5pmp60qwv0vs",
2211 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
2212 "number": 14,
2213 "issue": 12,
2214 "title": "Greeting should name the caller",
2215 "body": "Reads a name from the first argument. `hello ana` prints \"Hello, ana!\".",
2216 "agent": "claude-code",
2217 "runtime": "external",
2218 "status": "closed",
2219 "fork": {
2220 "namespace": "pulls",
2221 "name": "pr_01m43smh3vexsr5pmp60qwv0vs"
2222 },
2223 "fork_repo_id": "rep_01m43smh5xd7aw2kq9tv0b4c8e",
2224 "branch": null,
2225 "head_commit": "9f2c4e1a7b3d5f60812a4c6e8b0d2f4a6c8e0b13",
2226 "merge_base": null,
2227 "merged_by": null,
2228 "merged_at": null,
2229 "superseded_by": null,
2230 "check_status": null,
2231 "files": [
2232 {
2233 "path": "src/main.rs",
2234 "additions": 6,
2235 "deletions": 2
2236 }
2237 ],
2238 "assignees": [],
2239 "reviewers": [],
2240 "labels": [],
2241 "milestone": null,
2242 "base": "main",
2243 "author": {
2244 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
2245 "username": "syntaqx",
2246 "kind": "user",
2247 "verified": false,
2248 "workspaces": []
2249 },
2250 "requested_by": null,
2251 "created_at": "2026-10-01T18:20:02.117Z",
2252 "updated_at": "2026-10-01T19:02:48.760Z"
2253 }
2254 },
2255 "get_merge_queue": {
2256 "response": {
2257 "enabled": true,
2258 "active": [
2259 {
2260 "id": "qen_01m43rn0qsft1tpap1awkewzbb",
2261 "number": 14,
2262 "title": "Greeting should name the caller",
2263 "agent": "claude-code",
2264 "state": "testing",
2265 "ahead": [],
2266 "base_commit": "3a7e9c1b5d2f4a6c8e0b2d4f6a8c0e2b4d6f8a1c",
2267 "combined_commit": null,
2268 "error": null,
2269 "results": [],
2270 "enqueued_by": "syntaqx",
2271 "created_at": "2026-10-04T15:31:20.441Z",
2272 "finished_at": null
2273 }
2274 ],
2275 "recent": [
2276 {
2277 "id": "qen_01m43khqjmeb5a1magayrnk63z",
2278 "number": 11,
2279 "title": "Fix trailing newline in greeting",
2280 "agent": "g1t",
2281 "state": "landed",
2282 "ahead": [],
2283 "base_commit": "4b1d7e9c2a5f8e3d6c0b9a7e5d3c1b8a6f4e2d0c",
2284 "combined_commit": "c3e8a1f6d4b2097e5c3a1f8d6b4e2c0a9f7d5b3e",
2285 "error": null,
2286 "results": [
2287 {
2288 "command": "cargo test",
2289 "passed": true,
2290 "exit_code": 0,
2291 "output": "test result: ok. 12 passed; 0 failed\n",
2292 "duration_ms": 48211
2293 }
2294 ],
2295 "enqueued_by": "g1t",
2296 "created_at": "2026-10-04T14:02:09.876Z",
2297 "finished_at": "2026-10-04T14:09:55.102Z"
2298 }
2299 ]
2300 },
2301 "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."
2302 },
2303 "message_agent": {
2304 "request": {
2305 "body": "Keep \"world\" as the default when no name is given."
2306 },
2307 "response": {
2308 "id": "msg_01m43tx5egeh4t3f9zcnjenqvz",
2309 "author": "syntaqx",
2310 "body": "Keep \"world\" as the default when no name is given.",
2311 "created_at": "2026-10-01T18:25:00.310Z",
2312 "delivered_at": null,
2313 "kind": "message",
2314 "from_number": null,
2315 "to_number": 14,
2316 "answer": null,
2317 "declined": false
2318 },
2319 "notes": "The response is the message. `delivered_at` is set once the agent has read it."
2320 },
2321 "answer_message": {
2322 "params": {
2323 "id": "msg_01m43t66tde8hs2vpxhh3v8tqw"
2324 },
2325 "request": {
2326 "body": "No. greet() keeps its name; only greet_named() is added."
2327 },
2328 "response": {
2329 "id": "msg_01m43t66tde8hs2vpxhh3v8tqw",
2330 "author": "g1t",
2331 "body": "Are you renaming greet() in src/lib.rs? I need to call it from #16.",
2332 "created_at": "2026-10-01T18:58:12.301Z",
2333 "delivered_at": "2026-10-01T18:58:40.117Z",
2334 "kind": "question",
2335 "from_number": 16,
2336 "to_number": 14,
2337 "answer": "No. greet() keeps its name; only greet_named() is added.",
2338 "declined": false
2339 },
2340 "notes": "The response is the question or handoff that was answered, with `answer` and `declined` filled in."
2341 },
2342 "take_messages": {
2343 "response": [
2344 {
2345 "id": "msg_01m43tx5egeh4t3f9zcnjenqvz",
2346 "author": "syntaqx",
2347 "body": "Keep \"world\" as the default when no name is given.",
2348 "created_at": "2026-10-01T18:25:00.310Z",
2349 "delivered_at": "2026-10-01T18:25:31.007Z",
2350 "kind": "message",
2351 "from_number": null,
2352 "to_number": 14,
2353 "answer": null,
2354 "declined": false
2355 }
2356 ],
2357 "notes": "Only a g1t agent's token can take messages. They come oldest first, and each is marked delivered."
2358 },
2359 "read_session": {
2360 "query": {
2361 "after": 0
2362 },
2363 "response": [
2364 {
2365 "seq": 1,
2366 "kind": "prompt",
2367 "text": "Make the greeting name the caller (issue #12).",
2368 "tool": null,
2369 "commit": null,
2370 "at": "2026-10-01T18:21:00.004Z"
2371 },
2372 {
2373 "seq": 2,
2374 "kind": "tool_call",
2375 "text": "cargo test",
2376 "tool": "bash",
2377 "commit": "9f2c4e1a7b3d5f60812a4c6e8b0d2f4a6c8e0b13",
2378 "at": "2026-10-01T18:30:12.660Z"
2379 }
2380 ]
2381 },
2382 "record_session": {
2383 "request": {
2384 "entries": [
2385 {
2386 "kind": "message",
2387 "text": "Reading src/main.rs."
2388 },
2389 {
2390 "kind": "tool_call",
2391 "text": "cargo test",
2392 "tool": "bash"
2393 }
2394 ]
2395 },
2396 "response": {
2397 "count": 2
2398 },
2399 "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/)."
2400 },
2401 "list_workflows": {
2402 "response": [
2403 {
2404 "id": "wfl_01kpw2c5d8e1f4g7h0j3k6m9np",
2405 "path": ".g1t/workflows/ci.yml",
2406 "name": "CI",
2407 "events": [
2408 "push",
2409 "pull_request",
2410 "workflow_dispatch"
2411 ],
2412 "state": "active",
2413 "error": null,
2414 "notes": [
2415 {
2416 "severity": "unsupported",
2417 "job": "test",
2418 "message": "`services` containers (such as a database) are not started on g1t yet."
2419 }
2420 ],
2421 "dispatch": {
2422 "debug": {
2423 "description": "Verbose logs",
2424 "type": "boolean",
2425 "default": false
2426 }
2427 },
2428 "last_run": {
2429 "id": "run_01kpx7b3c6d9e2f5g8h1j4k7mr",
2430 "workflow_id": "wfl_01kpw2c5d8e1f4g7h0j3k6m9np",
2431 "path": ".g1t/workflows/ci.yml",
2432 "name": "CI",
2433 "title": "Greeting should name the caller",
2434 "number": 12,
2435 "attempt": 1,
2436 "event": "push",
2437 "ref": "refs/heads/main",
2438 "sha": "9f2c4e1a7b3d5f60812a4c6e8b0d2f4a6c8e0b13",
2439 "pull": null,
2440 "status": "completed",
2441 "conclusion": "success",
2442 "error": null,
2443 "actor": "syntaqx",
2444 "created_at": "2026-10-04T15:42:07.318Z",
2445 "started_at": "2026-10-04T15:42:09.020Z",
2446 "finished_at": "2026-10-04T15:44:31.877Z"
2447 }
2448 },
2449 {
2450 "id": "wfl_01kpw2c5d8e1f4g7h0j3k6m9nq",
2451 "path": ".g1t/workflows/nightly.yml",
2452 "name": "Nightly",
2453 "events": [
2454 "schedule"
2455 ],
2456 "state": "disabled",
2457 "error": null,
2458 "notes": [],
2459 "dispatch": null,
2460 "last_run": null
2461 }
2462 ],
2463 "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/)."
2464 },
2465 "list_workflow_runs": {
2466 "query": {
2467 "workflow": "ci.yml",
2468 "branch": "main",
2469 "per_page": 20
2470 },
2471 "response": [
2472 {
2473 "id": "run_01kpx7b3c6d9e2f5g8h1j4k7mr",
2474 "workflow_id": "wfl_01kpw2c5d8e1f4g7h0j3k6m9np",
2475 "path": ".g1t/workflows/ci.yml",
2476 "name": "CI",
2477 "title": "Greeting should name the caller",
2478 "number": 12,
2479 "attempt": 1,
2480 "event": "push",
2481 "ref": "refs/heads/main",
2482 "sha": "9f2c4e1a7b3d5f60812a4c6e8b0d2f4a6c8e0b13",
2483 "pull": null,
2484 "status": "completed",
2485 "conclusion": "success",
2486 "error": null,
2487 "actor": "syntaqx",
2488 "created_at": "2026-10-04T15:42:07.318Z",
2489 "started_at": "2026-10-04T15:42:09.020Z",
2490 "finished_at": "2026-10-04T15:44:31.877Z"
2491 }
2492 ],
2493 "notes": "A run's `status` is `queued`, `pending` (waiting for its concurrency group), `in_progress` or `completed`; `conclusion` is set once it completes."
2494 },
2495 "list_runs_of_workflow": {
2496 "params": {
2497 "workflow": "ci.yml"
2498 },
2499 "query": {
2500 "branch": "main",
2501 "per_page": 20
2502 },
2503 "response": [
2504 {
2505 "id": "run_01kpx7b3c6d9e2f5g8h1j4k7mr",
2506 "workflow_id": "wfl_01kpw2c5d8e1f4g7h0j3k6m9np",
2507 "path": ".g1t/workflows/ci.yml",
2508 "name": "CI",
2509 "title": "Greeting should name the caller",
2510 "number": 12,
2511 "attempt": 1,
2512 "event": "push",
2513 "ref": "refs/heads/main",
2514 "sha": "9f2c4e1a7b3d5f60812a4c6e8b0d2f4a6c8e0b13",
2515 "pull": null,
2516 "status": "completed",
2517 "conclusion": "success",
2518 "error": null,
2519 "actor": "syntaqx",
2520 "created_at": "2026-10-04T15:42:07.318Z",
2521 "started_at": "2026-10-04T15:42:09.020Z",
2522 "finished_at": "2026-10-04T15:44:31.877Z"
2523 }
2524 ]
2525 },
2526 "get_workflow_run": {
2527 "params": {
2528 "id": "run_01kpx7b3c6d9e2f5g8h1j4k7mr"
2529 },
2530 "response": {
2531 "run": {
2532 "id": "run_01kpx7b3c6d9e2f5g8h1j4k7mr",
2533 "workflow_id": "wfl_01kpw2c5d8e1f4g7h0j3k6m9np",
2534 "path": ".g1t/workflows/ci.yml",
2535 "name": "CI",
2536 "title": "Greeting should name the caller",
2537 "number": 12,
2538 "attempt": 1,
2539 "event": "push",
2540 "ref": "refs/heads/main",
2541 "sha": "9f2c4e1a7b3d5f60812a4c6e8b0d2f4a6c8e0b13",
2542 "pull": null,
2543 "status": "completed",
2544 "conclusion": "failure",
2545 "error": null,
2546 "actor": "syntaqx",
2547 "created_at": "2026-10-04T15:42:07.318Z",
2548 "started_at": "2026-10-04T15:42:09.020Z",
2549 "finished_at": "2026-10-04T15:44:31.877Z"
2550 },
2551 "jobs": [
2552 {
2553 "id": "job_01kpx7b3d0e4f8g2h6j0k4m8ns",
2554 "run_id": "run_01kpx7b3c6d9e2f5g8h1j4k7mr",
2555 "key": "test",
2556 "name": "test",
2557 "needs": [],
2558 "status": "completed",
2559 "conclusion": "failure",
2560 "steps": [
2561 {
2562 "number": 1,
2563 "name": "Run actions/checkout@v4",
2564 "status": "completed",
2565 "conclusion": "success",
2566 "started_at": "2026-10-04T15:42:10.101Z",
2567 "finished_at": "2026-10-04T15:42:12.433Z"
2568 },
2569 {
2570 "number": 2,
2571 "name": "Run cargo test",
2572 "status": "completed",
2573 "conclusion": "failure",
2574 "started_at": "2026-10-04T15:42:12.440Z",
2575 "finished_at": "2026-10-04T15:44:30.902Z"
2576 }
2577 ],
2578 "annotations": [
2579 {
2580 "level": "error",
2581 "message": "assertion failed: greeting names the caller",
2582 "title": "greet",
2583 "file": "src/main.rs",
2584 "line": 41
2585 }
2586 ],
2587 "reason": null,
2588 "started_at": "2026-10-04T15:42:09.020Z",
2589 "finished_at": "2026-10-04T15:44:31.002Z"
2590 },
2591 {
2592 "id": "job_01kpx7b3d0e4f8g2h6j0k4m8nt",
2593 "run_id": "run_01kpx7b3c6d9e2f5g8h1j4k7mr",
2594 "key": "deploy",
2595 "name": "deploy",
2596 "needs": [
2597 "test"
2598 ],
2599 "status": "completed",
2600 "conclusion": "skipped",
2601 "steps": [],
2602 "annotations": [],
2603 "reason": "A job it needs did not succeed.",
2604 "started_at": null,
2605 "finished_at": "2026-10-04T15:44:31.877Z"
2606 }
2607 ],
2608 "notes": [
2609 {
2610 "severity": "unsupported",
2611 "job": "test",
2612 "message": "`services` containers (such as a database) are not started on g1t yet."
2613 }
2614 ]
2615 }
2616 },
2617 "get_job_logs": {
2618 "params": {
2619 "job": "job_01kpx7b3d0e4f8g2h6j0k4m8ns"
2620 },
2621 "query": {
2622 "after": 0
2623 },
2624 "response": {
2625 "chunks": [
2626 {
2627 "seq": 1,
2628 "step": 0,
2629 "text": "Preparing the sandbox\n"
2630 },
2631 {
2632 "seq": 2,
2633 "step": 2,
2634 "text": "> cargo test\ntest greet ... FAILED\n"
2635 }
2636 ],
2637 "done": true
2638 },
2639 "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`."
2640 },
2641 "dispatch_workflow": {
2642 "params": {
2643 "workflow": "ci.yml"
2644 },
2645 "request": {
2646 "ref": "main",
2647 "inputs": {
2648 "debug": true
2649 }
2650 },
2651 "response": {
2652 "id": "run_01kpx8d4e7f0g3h6j9k2m5n8pq",
2653 "workflow_id": "wfl_01kpw2c5d8e1f4g7h0j3k6m9np",
2654 "path": ".g1t/workflows/ci.yml",
2655 "name": "CI",
2656 "title": "CI run by syntaqx",
2657 "number": 13,
2658 "attempt": 1,
2659 "event": "workflow_dispatch",
2660 "ref": "refs/heads/main",
2661 "sha": "9f2c4e1a7b3d5f60812a4c6e8b0d2f4a6c8e0b13",
2662 "pull": null,
2663 "status": "queued",
2664 "conclusion": null,
2665 "error": null,
2666 "actor": "syntaqx",
2667 "created_at": "2026-10-04T16:30:00.512Z",
2668 "started_at": null,
2669 "finished_at": null
2670 }
2671 },
2672 "cancel_workflow_run": {
2673 "params": {
2674 "id": "run_01kpx7b3c6d9e2f5g8h1j4k7mr"
2675 },
2676 "response": {
2677 "id": "run_01kpx7b3c6d9e2f5g8h1j4k7mr",
2678 "workflow_id": "wfl_01kpw2c5d8e1f4g7h0j3k6m9np",
2679 "path": ".g1t/workflows/ci.yml",
2680 "name": "CI",
2681 "title": "Greeting should name the caller",
2682 "number": 12,
2683 "attempt": 1,
2684 "event": "push",
2685 "ref": "refs/heads/main",
2686 "sha": "9f2c4e1a7b3d5f60812a4c6e8b0d2f4a6c8e0b13",
2687 "pull": null,
2688 "status": "completed",
2689 "conclusion": "cancelled",
2690 "error": null,
2691 "actor": "syntaqx",
2692 "created_at": "2026-10-04T15:42:07.318Z",
2693 "started_at": "2026-10-04T15:42:09.020Z",
2694 "finished_at": "2026-10-04T15:44:31.877Z"
2695 }
2696 },
2697 "rerun_workflow_run": {
2698 "params": {
2699 "id": "run_01kpx7b3c6d9e2f5g8h1j4k7mr"
2700 },
2701 "request": {
2702 "failed_only": true
2703 },
2704 "response": {
2705 "id": "run_01kpx7b3c6d9e2f5g8h1j4k7mr",
2706 "workflow_id": "wfl_01kpw2c5d8e1f4g7h0j3k6m9np",
2707 "path": ".g1t/workflows/ci.yml",
2708 "name": "CI",
2709 "title": "Greeting should name the caller",
2710 "number": 12,
2711 "attempt": 2,
2712 "event": "push",
2713 "ref": "refs/heads/main",
2714 "sha": "9f2c4e1a7b3d5f60812a4c6e8b0d2f4a6c8e0b13",
2715 "pull": null,
2716 "status": "queued",
2717 "conclusion": null,
2718 "error": null,
2719 "actor": "syntaqx",
2720 "created_at": "2026-10-04T15:42:07.318Z",
2721 "started_at": null,
2722 "finished_at": null
2723 },
2724 "notes": "The run keeps its id; `attempt` goes up by one."
2725 },
2726 "rerun_failed_jobs": {
2727 "params": {
2728 "id": "run_01kpx7b3c6d9e2f5g8h1j4k7mr"
2729 },
2730 "response": {
2731 "id": "run_01kpx7b3c6d9e2f5g8h1j4k7mr",
2732 "workflow_id": "wfl_01kpw2c5d8e1f4g7h0j3k6m9np",
2733 "path": ".g1t/workflows/ci.yml",
2734 "name": "CI",
2735 "title": "Greeting should name the caller",
2736 "number": 12,
2737 "attempt": 2,
2738 "event": "push",
2739 "ref": "refs/heads/main",
2740 "sha": "9f2c4e1a7b3d5f60812a4c6e8b0d2f4a6c8e0b13",
2741 "pull": null,
2742 "status": "queued",
2743 "conclusion": null,
2744 "error": null,
2745 "actor": "syntaqx",
2746 "created_at": "2026-10-04T15:42:07.318Z",
2747 "started_at": null,
2748 "finished_at": null
2749 }
2750 },
2751 "update_workflow": {
2752 "params": {
2753 "workflow": "nightly.yml"
2754 },
2755 "request": {
2756 "enabled": false
2757 },
2758 "response": {
2759 "id": "wfl_01kpw2c5d8e1f4g7h0j3k6m9nq",
2760 "path": ".g1t/workflows/nightly.yml",
2761 "name": "Nightly",
2762 "events": [
2763 "schedule"
2764 ],
2765 "state": "disabled",
2766 "error": null,
2767 "notes": [],
2768 "dispatch": null,
2769 "last_run": null
2770 }
2771 },
2772 "enable_workflow": {
2773 "params": {
2774 "workflow": "nightly.yml"
2775 },
2776 "response": {
2777 "id": "wfl_01kpw2c5d8e1f4g7h0j3k6m9nq",
2778 "path": ".g1t/workflows/nightly.yml",
2779 "name": "Nightly",
2780 "events": [
2781 "schedule"
2782 ],
2783 "state": "active",
2784 "error": null,
2785 "notes": [],
2786 "dispatch": null,
2787 "last_run": null
2788 }
2789 },
2790 "disable_workflow": {
2791 "params": {
2792 "workflow": "nightly.yml"
2793 },
2794 "response": {
2795 "id": "wfl_01kpw2c5d8e1f4g7h0j3k6m9nq",
2796 "path": ".g1t/workflows/nightly.yml",
2797 "name": "Nightly",
2798 "events": [
2799 "schedule"
2800 ],
2801 "state": "disabled",
2802 "error": null,
2803 "notes": [],
2804 "dispatch": null,
2805 "last_run": null
2806 }
2807 },
2808 "list_actions_secrets": {
2809 "response": [
2810 {
2811 "id": "set_01kpv9q4r7s0t3v6w9x2y5z8ab",
2812 "name": "NPM_TOKEN",
2813 "kind": "secret",
2814 "value": null,
2815 "scope": "workspace",
2816 "updated_at": "2026-10-01T09:12:44.020Z",
2817 "available_to": [
2818 "workflows"
2819 ],
2820 "environments": [],
2821 "projects": [],
2822 "note": null,
2823 "updated_by": "syntaqx"
2824 },
2825 {
2826 "id": "set_01kpv9q4r7s0t3v6w9x2y5z8ac",
2827 "name": "STRIPE_KEY",
2828 "kind": "secret",
2829 "value": null,
2830 "scope": "project",
2831 "updated_at": "2026-10-04T15:42:07.318Z",
2832 "available_to": [
2833 "workflows",
2834 "deployments"
2835 ],
2836 "environments": [
2837 "production"
2838 ],
2839 "projects": [],
2840 "note": "Rotate in the Stripe dashboard.",
2841 "updated_by": "syntaqx"
2842 }
2843 ],
2844 "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."
2845 },
2846 "list_actions_secrets_for_workspace": {
2847 "params": {
2848 "workspace": "flagon-io"
2849 },
2850 "response": [
2851 {
2852 "id": "set_01kpv9q4r7s0t3v6w9x2y5z8ab",
2853 "name": "NPM_TOKEN",
2854 "kind": "secret",
2855 "value": null,
2856 "scope": "workspace",
2857 "updated_at": "2026-10-04T15:42:07.318Z",
2858 "available_to": [
2859 "workflows"
2860 ],
2861 "environments": [],
2862 "projects": [],
2863 "note": null,
2864 "updated_by": "syntaqx"
2865 }
2866 ],
2867 "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."
2868 },
2869 "set_actions_secret": {
2870 "params": {
2871 "setting": "STRIPE_KEY"
2872 },
2873 "request": {
2874 "value": "sk_live_…",
2875 "available_to": [
2876 "workflows",
2877 "deployments"
2878 ],
2879 "environments": [
2880 "production"
2881 ]
2882 },
2883 "response": {
2884 "id": "set_01kpv9q4r7s0t3v6w9x2y5z8ac",
2885 "name": "STRIPE_KEY",
2886 "kind": "secret",
2887 "value": null,
2888 "scope": "project",
2889 "updated_at": "2026-10-04T15:42:07.318Z",
2890 "available_to": [
2891 "workflows",
2892 "deployments"
2893 ],
2894 "environments": [
2895 "production"
2896 ],
2897 "projects": [],
2898 "note": null,
2899 "updated_by": "syntaqx"
2900 },
2901 "notes": "Keys are uppercased. See [secrets and variables](/guides/secrets-and-variables/)."
2902 },
2903 "set_actions_secret_for_workspace": {
2904 "params": {
2905 "workspace": "flagon-io",
2906 "setting": "NPM_TOKEN"
2907 },
2908 "request": {
2909 "value": "npm_…",
2910 "projects": [
2911 "hello"
2912 ]
2913 },
2914 "response": {
2915 "id": "set_01kpv9q4r7s0t3v6w9x2y5z8ac",
2916 "name": "NPM_TOKEN",
2917 "kind": "secret",
2918 "value": null,
2919 "scope": "workspace",
2920 "updated_at": "2026-10-04T15:42:07.318Z",
2921 "available_to": [
2922 "workflows"
2923 ],
2924 "environments": [],
2925 "projects": [
2926 "hello"
2927 ],
2928 "note": null,
2929 "updated_by": "syntaqx"
2930 }
2931 },
2932 "delete_actions_secret": {
2933 "params": {
2934 "setting": "STRIPE_KEY"
2935 },
2936 "response": true
2937 },
2938 "delete_actions_secret_for_workspace": {
2939 "params": {
2940 "workspace": "flagon-io",
2941 "setting": "NPM_TOKEN"
2942 },
2943 "response": true
2944 },
2945 "list_actions_variables": {
2946 "response": [
2947 {
2948 "id": "set_01kpv9q4r7s0t3v6w9x2y5z8ad",
2949 "name": "NODE_VERSION",
2950 "kind": "variable",
2951 "value": "20",
2952 "scope": "project",
2953 "updated_at": "2026-10-04T15:42:07.318Z",
2954 "available_to": [
2955 "workflows",
2956 "deployments"
2957 ],
2958 "environments": [],
2959 "projects": [],
2960 "note": null,
2961 "updated_by": "syntaqx"
2962 }
2963 ],
2964 "notes": "A repository's list includes the workspace's rows that reach it, with `scope` set to `workspace`. Empty `environments` means every environment."
2965 },
2966 "list_actions_variables_for_workspace": {
2967 "params": {
2968 "workspace": "flagon-io"
2969 },
2970 "response": [
2971 {
2972 "id": "set_01kpv9q4r7s0t3v6w9x2y5z8ad",
2973 "name": "NODE_VERSION",
2974 "kind": "variable",
2975 "value": "20",
2976 "scope": "workspace",
2977 "updated_at": "2026-10-04T15:42:07.318Z",
2978 "available_to": [
2979 "workflows",
2980 "deployments"
2981 ],
2982 "environments": [],
2983 "projects": [],
2984 "note": null,
2985 "updated_by": "syntaqx"
2986 }
2987 ]
2988 },
2989 "set_actions_variable": {
2990 "request": {
2991 "setting": "NODE_VERSION",
2992 "value": "20"
2993 },
2994 "response": {
2995 "id": "set_01kpv9q4r7s0t3v6w9x2y5z8ad",
2996 "name": "NODE_VERSION",
2997 "kind": "variable",
2998 "value": "20",
2999 "scope": "project",
3000 "updated_at": "2026-10-04T15:42:07.318Z",
3001 "available_to": [
3002 "workflows",
3003 "deployments"
3004 ],
3005 "environments": [],
3006 "projects": [],
3007 "note": null,
3008 "updated_by": "syntaqx"
3009 },
3010 "notes": "GitHub's clients send the key as `name`; that is accepted too."
3011 },
3012 "set_actions_variable_for_workspace": {
3013 "params": {
3014 "workspace": "flagon-io"
3015 },
3016 "request": {
3017 "setting": "NODE_VERSION",
3018 "value": "20"
3019 },
3020 "response": {
3021 "id": "set_01kpv9q4r7s0t3v6w9x2y5z8ad",
3022 "name": "NODE_VERSION",
3023 "kind": "variable",
3024 "value": "20",
3025 "scope": "workspace",
3026 "updated_at": "2026-10-04T15:42:07.318Z",
3027 "available_to": [
3028 "workflows",
3029 "deployments"
3030 ],
3031 "environments": [],
3032 "projects": [],
3033 "note": null,
3034 "updated_by": "syntaqx"
3035 }
3036 },
3037 "update_actions_variable": {
3038 "params": {
3039 "setting": "NODE_VERSION"
3040 },
3041 "request": {
3042 "value": "22"
3043 },
3044 "response": {
3045 "id": "set_01kpv9q4r7s0t3v6w9x2y5z8ad",
3046 "name": "NODE_VERSION",
3047 "kind": "variable",
3048 "value": "22",
3049 "scope": "project",
3050 "updated_at": "2026-10-04T15:42:07.318Z",
3051 "available_to": [
3052 "workflows",
3053 "deployments"
3054 ],
3055 "environments": [],
3056 "projects": [],
3057 "note": null,
3058 "updated_by": "syntaqx"
3059 }
3060 },
3061 "update_actions_variable_for_workspace": {
3062 "params": {
3063 "workspace": "flagon-io",
3064 "setting": "NODE_VERSION"
3065 },
3066 "request": {
3067 "value": "22"
3068 },
3069 "response": {
3070 "id": "set_01kpv9q4r7s0t3v6w9x2y5z8ad",
3071 "name": "NODE_VERSION",
3072 "kind": "variable",
3073 "value": "22",
3074 "scope": "workspace",
3075 "updated_at": "2026-10-04T15:42:07.318Z",
3076 "available_to": [
3077 "workflows",
3078 "deployments"
3079 ],
3080 "environments": [],
3081 "projects": [],
3082 "note": null,
3083 "updated_by": "syntaqx"
3084 }
3085 },
3086 "delete_actions_variable": {
3087 "params": {
3088 "setting": "NODE_VERSION"
3089 },
3090 "response": true
3091 },
3092 "delete_actions_variable_for_workspace": {
3093 "params": {
3094 "workspace": "flagon-io",
3095 "setting": "NODE_VERSION"
3096 },
3097 "response": true
3098 },
3099 "list_runners": {
3100 "response": [
3101 {
3102 "id": "rnr_01kq2m8v4c7f0h3k6n9q2t5w8z",
3103 "name": "build-01",
3104 "workspace": "flagon-io",
3105 "repo": null,
3106 "group": "Default",
3107 "labels": [
3108 "self-hosted",
3109 "linux",
3110 "x64",
3111 "gpu"
3112 ],
3113 "os": "linux",
3114 "arch": "x64",
3115 "version": "0.2.0",
3116 "ephemeral": false,
3117 "status": "busy",
3118 "work": {
3119 "kind": "workflow",
3120 "id": "job_01kq2m9b1d4g7j0m3p6s9v2y5b",
3121 "name": "test (linux, 24)",
3122 "repo": "flagon-io/hello",
3123 "run_id": "run_01kq2m9a8c1f4h7k0n3q6t9w2z",
3124 "started_at": "2026-10-06T14:02:11.000Z"
3125 },
3126 "last_seen_at": "2026-10-06T14:05:40.512Z",
3127 "created_at": "2026-10-02T09:30:00.000Z",
3128 "created_by": null
3129 },
3130 {
3131 "id": "rnr_01kq2m8v4c7f0h3k6n9q2t5w9a",
3132 "name": "mac-mini",
3133 "workspace": "flagon-io",
3134 "repo": null,
3135 "group": "Default",
3136 "labels": [
3137 "self-hosted",
3138 "macos",
3139 "arm64"
3140 ],
3141 "os": "macos",
3142 "arch": "arm64",
3143 "version": "0.2.0",
3144 "ephemeral": false,
3145 "status": "online",
3146 "work": null,
3147 "last_seen_at": "2026-10-06T14:05:40.512Z",
3148 "created_at": "2026-10-02T09:30:00.000Z",
3149 "created_by": null
3150 }
3151 ],
3152 "notes": "A repository's list holds its own runners (`repo` set) and the workspace's that its runner group lets it use. A runner is `offline` when it has not polled for 90 seconds."
3153 },
3154 "list_runners_for_workspace": {
3155 "params": {
3156 "workspace": "flagon-io"
3157 },
3158 "response": [
3159 {
3160 "id": "rnr_01kq2m8v4c7f0h3k6n9q2t5w8z",
3161 "name": "build-01",
3162 "workspace": "flagon-io",
3163 "repo": null,
3164 "group": "Default",
3165 "labels": [
3166 "self-hosted",
3167 "linux",
3168 "x64",
3169 "gpu"
3170 ],
3171 "os": "linux",
3172 "arch": "x64",
3173 "version": "0.2.0",
3174 "ephemeral": false,
3175 "status": "busy",
3176 "work": {
3177 "kind": "workflow",
3178 "id": "job_01kq2m9b1d4g7j0m3p6s9v2y5b",
3179 "name": "test (linux, 24)",
3180 "repo": "flagon-io/hello",
3181 "run_id": "run_01kq2m9a8c1f4h7k0n3q6t9w2z",
3182 "started_at": "2026-10-06T14:02:11.000Z"
3183 },
3184 "last_seen_at": "2026-10-06T14:05:40.512Z",
3185 "created_at": "2026-10-02T09:30:00.000Z",
3186 "created_by": null
3187 },
3188 {
3189 "id": "rnr_01kq2m8v4c7f0h3k6n9q2t5w9a",
3190 "name": "mac-mini",
3191 "workspace": "flagon-io",
3192 "repo": null,
3193 "group": "Default",
3194 "labels": [
3195 "self-hosted",
3196 "macos",
3197 "arm64"
3198 ],
3199 "os": "macos",
3200 "arch": "arm64",
3201 "version": "0.2.0",
3202 "ephemeral": false,
3203 "status": "online",
3204 "work": null,
3205 "last_seen_at": "2026-10-06T14:05:40.512Z",
3206 "created_at": "2026-10-02T09:30:00.000Z",
3207 "created_by": null
3208 }
3209 ]
3210 },
3211 "create_runner_registration_token": {
3212 "response": {
3213 "token": "g1trt_…",
3214 "expires_at": "2026-10-06T15:04:00.000Z",
3215 "workspace": "flagon-io",
3216 "repo": "flagon-io/hello",
3217 "group": null,
3218 "url": "https://g1t.sh"
3219 },
3220 "notes": "Pass it to `g1t-runner register --url https://g1t.sh --token …` within the hour. See [self-hosted runners](/guides/self-hosted-runners/)."
3221 },
3222 "create_runner_registration_token_for_workspace": {
3223 "params": {
3224 "workspace": "flagon-io"
3225 },
3226 "request": {
3227 "group": "Default"
3228 },
3229 "response": {
3230 "token": "g1trt_…",
3231 "expires_at": "2026-10-06T15:04:00.000Z",
3232 "workspace": "flagon-io",
3233 "repo": null,
3234 "group": "Default",
3235 "url": "https://g1t.sh"
3236 }
3237 },
3238 "remove_runner": {
3239 "params": {
3240 "id": "rnr_01kq2m8v4c7f0h3k6n9q2t5w8z"
3241 },
3242 "response": true
3243 },
3244 "remove_runner_for_workspace": {
3245 "params": {
3246 "workspace": "flagon-io",
3247 "id": "rnr_01kq2m8v4c7f0h3k6n9q2t5w8z"
3248 },
3249 "response": true
3250 },
3251 "get_runner_settings": {
3252 "response": {
3253 "agents_on_self_hosted": false,
3254 "agent_labels": [
3255 "self-hosted",
3256 "linux"
3257 ],
3258 "fork_pull_requests": false,
3259 "inherited": true
3260 }
3261 },
3262 "get_runner_settings_for_workspace": {
3263 "params": {
3264 "workspace": "flagon-io"
3265 },
3266 "response": {
3267 "agents_on_self_hosted": true,
3268 "agent_labels": [
3269 "self-hosted",
3270 "linux"
3271 ],
3272 "fork_pull_requests": false,
3273 "inherited": false
3274 }
3275 },
3276 "update_runner_settings": {
3277 "request": {
3278 "inherit": true
3279 },
3280 "response": {
3281 "agents_on_self_hosted": false,
3282 "agent_labels": [
3283 "self-hosted",
3284 "linux"
3285 ],
3286 "fork_pull_requests": false,
3287 "inherited": true
3288 }
3289 },
3290 "update_runner_settings_for_workspace": {
3291 "params": {
3292 "workspace": "flagon-io"
3293 },
3294 "request": {
3295 "agents_on_self_hosted": true,
3296 "agent_labels": [
3297 "linux"
3298 ]
3299 },
3300 "response": {
3301 "agents_on_self_hosted": true,
3302 "agent_labels": [
3303 "self-hosted",
3304 "linux"
3305 ],
3306 "fork_pull_requests": false,
3307 "inherited": false
3308 },
3309 "notes": "Agent work on your runners still uses g1t's model proxy, paid as before, unless the workspace has its own model provider."
3310 },
3311 "list_runner_groups": {
3312 "params": {
3313 "workspace": "flagon-io"
3314 },
3315 "response": [
3316 {
3317 "id": "rng_01kq2m7r2a5d8g1j4m7p0s3v6y",
3318 "name": "Default",
3319 "default": true,
3320 "repositories": [],
3321 "runners": 2,
3322 "updated_at": "2026-10-02T09:30:00.000Z"
3323 },
3324 {
3325 "id": "rng_01kq2m7r2a5d8g1j4m7p0s3v6z",
3326 "name": "GPU",
3327 "default": false,
3328 "repositories": [
3329 "hello",
3330 "models"
3331 ],
3332 "runners": 1,
3333 "updated_at": "2026-10-05T11:20:00.000Z"
3334 }
3335 ]
3336 },
3337 "create_runner_group": {
3338 "params": {
3339 "workspace": "flagon-io"
3340 },
3341 "request": {
3342 "name": "GPU",
3343 "repositories": [
3344 "hello",
3345 "models"
3346 ]
3347 },
3348 "response": {
3349 "id": "rng_01kq2m7r2a5d8g1j4m7p0s3v6z",
3350 "name": "GPU",
3351 "default": false,
3352 "repositories": [
3353 "hello",
3354 "models"
3355 ],
3356 "runners": 1,
3357 "updated_at": "2026-10-05T11:20:00.000Z"
3358 }
3359 },
3360 "update_runner_group": {
3361 "params": {
3362 "workspace": "flagon-io",
3363 "id": "rng_01kq2m7r2a5d8g1j4m7p0s3v6z"
3364 },
3365 "request": {
3366 "repositories": []
3367 },
3368 "response": {
3369 "id": "rng_01kq2m7r2a5d8g1j4m7p0s3v6z",
3370 "name": "GPU",
3371 "default": false,
3372 "repositories": [],
3373 "runners": 1,
3374 "updated_at": "2026-10-05T11:20:00.000Z"
3375 }
3376 },
3377 "delete_runner_group": {
3378 "params": {
3379 "workspace": "flagon-io",
3380 "id": "rng_01kq2m7r2a5d8g1j4m7p0s3v6z"
3381 },
3382 "response": true
3383 },
3384 "list_webhooks": {
3385 "response": [
3386 {
3387 "id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd",
3388 "scope": "repo",
3389 "workspace": "flagon-io",
3390 "repo": "flagon-io/hello",
3391 "url": "https://hooks.example.com/g1t",
3392 "events": [
3393 "git.push",
3394 "pull.merged"
3395 ],
3396 "active": true,
3397 "secret_hint": "…9c2e",
3398 "created_by": "syntaqx",
3399 "created_at": "2026-10-04T15:42:07.318Z",
3400 "last_status": "delivered",
3401 "last_delivered_at": "2026-10-04T15:42:07.611Z"
3402 }
3403 ]
3404 },
3405 "list_webhooks_for_workspace": {
3406 "params": {
3407 "workspace": "flagon-io"
3408 },
3409 "response": [
3410 {
3411 "id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd",
3412 "scope": "workspace",
3413 "workspace": "flagon-io",
3414 "repo": null,
3415 "url": "https://hooks.example.com/g1t",
3416 "events": [
3417 "git.push",
3418 "pull.merged"
3419 ],
3420 "active": true,
3421 "secret_hint": "…9c2e",
3422 "created_by": "syntaqx",
3423 "created_at": "2026-10-04T15:42:07.318Z",
3424 "last_status": "delivered",
3425 "last_delivered_at": "2026-10-04T15:42:07.611Z"
3426 }
3427 ]
3428 },
3429 "create_webhook": {
3430 "request": {
3431 "url": "https://hooks.example.com/g1t",
3432 "events": [
3433 "git.push",
3434 "pull.merged"
3435 ]
3436 },
3437 "response": {
3438 "hook": {
3439 "id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd",
3440 "scope": "repo",
3441 "workspace": "flagon-io",
3442 "repo": "flagon-io/hello",
3443 "url": "https://hooks.example.com/g1t",
3444 "events": [
3445 "git.push",
3446 "pull.merged"
3447 ],
3448 "active": true,
3449 "secret_hint": "…9c2e",
3450 "created_by": "syntaqx",
3451 "created_at": "2026-10-04T15:42:07.318Z",
3452 "last_status": "delivered",
3453 "last_delivered_at": "2026-10-04T15:42:07.611Z"
3454 },
3455 "secret": "whsec_…"
3456 },
3457 "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/)."
3458 },
3459 "create_webhook_for_workspace": {
3460 "params": {
3461 "workspace": "flagon-io"
3462 },
3463 "request": {
3464 "url": "https://hooks.example.com/g1t"
3465 },
3466 "response": {
3467 "hook": {
3468 "id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd",
3469 "scope": "workspace",
3470 "workspace": "flagon-io",
3471 "repo": null,
3472 "url": "https://hooks.example.com/g1t",
3473 "events": [
3474 "*"
3475 ],
3476 "active": true,
3477 "secret_hint": "…9c2e",
3478 "created_by": "syntaqx",
3479 "created_at": "2026-10-04T15:42:07.318Z",
3480 "last_status": "delivered",
3481 "last_delivered_at": "2026-10-04T15:42:07.611Z"
3482 },
3483 "secret": "whsec_…"
3484 },
3485 "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/)."
3486 },
3487 "update_webhook": {
3488 "params": {
3489 "id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd"
3490 },
3491 "request": {
3492 "active": false
3493 },
3494 "response": {
3495 "id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd",
3496 "scope": "repo",
3497 "workspace": "flagon-io",
3498 "repo": "flagon-io/hello",
3499 "url": "https://hooks.example.com/g1t",
3500 "events": [
3501 "git.push",
3502 "pull.merged"
3503 ],
3504 "active": false,
3505 "secret_hint": "…9c2e",
3506 "created_by": "syntaqx",
3507 "created_at": "2026-10-04T15:42:07.318Z",
3508 "last_status": "delivered",
3509 "last_delivered_at": "2026-10-04T15:42:07.611Z"
3510 }
3511 },
3512 "update_webhook_for_workspace": {
3513 "params": {
3514 "workspace": "flagon-io",
3515 "id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd"
3516 },
3517 "request": {
3518 "active": false
3519 },
3520 "response": {
3521 "id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd",
3522 "scope": "workspace",
3523 "workspace": "flagon-io",
3524 "repo": null,
3525 "url": "https://hooks.example.com/g1t",
3526 "events": [
3527 "git.push",
3528 "pull.merged"
3529 ],
3530 "active": false,
3531 "secret_hint": "…9c2e",
3532 "created_by": "syntaqx",
3533 "created_at": "2026-10-04T15:42:07.318Z",
3534 "last_status": "delivered",
3535 "last_delivered_at": "2026-10-04T15:42:07.611Z"
3536 }
3537 },
3538 "delete_webhook": {
3539 "params": {
3540 "id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd"
3541 },
3542 "response": true
3543 },
3544 "delete_webhook_for_workspace": {
3545 "params": {
3546 "workspace": "flagon-io",
3547 "id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd"
3548 },
3549 "response": true
3550 },
3551 "ping_webhook": {
3552 "params": {
3553 "id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd"
3554 },
3555 "response": {
3556 "id": "dlv_01kpx5p9v2j7k3m8n4p5q6r7st",
3557 "hook_id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd",
3558 "event_id": "",
3559 "event": "ping",
3560 "status": "delivered",
3561 "attempts": 1,
3562 "response_status": 200,
3563 "response_body": "ok",
3564 "error": null,
3565 "duration_ms": 184,
3566 "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\"}",
3567 "created_at": "2026-10-04T16:01:12.440Z",
3568 "delivered_at": "2026-10-04T16:01:12.631Z",
3569 "next_attempt_at": null
3570 },
3571 "notes": "`payload` is the JSON that was sent, as a string."
3572 },
3573 "ping_webhook_for_workspace": {
3574 "params": {
3575 "workspace": "flagon-io",
3576 "id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd"
3577 },
3578 "response": {
3579 "id": "dlv_01kpx5p9v2j7k3m8n4p5q6r7st",
3580 "hook_id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd",
3581 "event_id": "",
3582 "event": "ping",
3583 "status": "delivered",
3584 "attempts": 1,
3585 "response_status": 200,
3586 "response_body": "ok",
3587 "error": null,
3588 "duration_ms": 184,
3589 "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\"}",
3590 "created_at": "2026-10-04T16:01:12.440Z",
3591 "delivered_at": "2026-10-04T16:01:12.631Z",
3592 "next_attempt_at": null
3593 }
3594 },
3595 "list_webhook_deliveries": {
3596 "params": {
3597 "id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd"
3598 },
3599 "response": [
3600 {
3601 "id": "dlv_01kpx6a2b3c4d5e6f7g8h9j0kz",
3602 "hook_id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd",
3603 "event_id": "",
3604 "event": "ping",
3605 "status": "pending",
3606 "attempts": 1,
3607 "response_status": 503,
3608 "response_body": "Service Unavailable",
3609 "error": null,
3610 "duration_ms": 212,
3611 "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\"}",
3612 "created_at": "2026-10-04T16:20:03.100Z",
3613 "delivered_at": null,
3614 "next_attempt_at": "2026-10-04T16:21:03.312Z"
3615 },
3616 {
3617 "id": "dlv_01kpx5p9v2j7k3m8n4p5q6r7st",
3618 "hook_id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd",
3619 "event_id": "",
3620 "event": "ping",
3621 "status": "delivered",
3622 "attempts": 1,
3623 "response_status": 200,
3624 "response_body": "ok",
3625 "error": null,
3626 "duration_ms": 184,
3627 "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\"}",
3628 "created_at": "2026-10-04T16:01:12.440Z",
3629 "delivered_at": "2026-10-04T16:01:12.631Z",
3630 "next_attempt_at": null
3631 }
3632 ],
3633 "notes": "Returns at most 50, newest first. `status` is `pending`, `delivered` or `failed`; `next_attempt_at` is set while it is pending."
3634 },
3635 "list_webhook_deliveries_for_workspace": {
3636 "params": {
3637 "workspace": "flagon-io",
3638 "id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd"
3639 },
3640 "response": [
3641 {
3642 "id": "dlv_01kpx6a2b3c4d5e6f7g8h9j0kz",
3643 "hook_id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd",
3644 "event_id": "",
3645 "event": "ping",
3646 "status": "pending",
3647 "attempts": 1,
3648 "response_status": 503,
3649 "response_body": "Service Unavailable",
3650 "error": null,
3651 "duration_ms": 212,
3652 "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\"}",
3653 "created_at": "2026-10-04T16:20:03.100Z",
3654 "delivered_at": null,
3655 "next_attempt_at": "2026-10-04T16:21:03.312Z"
3656 },
3657 {
3658 "id": "dlv_01kpx5p9v2j7k3m8n4p5q6r7st",
3659 "hook_id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd",
3660 "event_id": "",
3661 "event": "ping",
3662 "status": "delivered",
3663 "attempts": 1,
3664 "response_status": 200,
3665 "response_body": "ok",
3666 "error": null,
3667 "duration_ms": 184,
3668 "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\"}",
3669 "created_at": "2026-10-04T16:01:12.440Z",
3670 "delivered_at": "2026-10-04T16:01:12.631Z",
3671 "next_attempt_at": null
3672 }
3673 ]
3674 },
3675 "redeliver_webhook": {
3676 "params": {
3677 "id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd",
3678 "delivery": "dlv_01kpx6a2b3c4d5e6f7g8h9j0kz"
3679 },
3680 "response": {
3681 "id": "dlv_01kpx6c8d1e2f3g4h5j6k7m8np",
3682 "hook_id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd",
3683 "event_id": "",
3684 "event": "ping",
3685 "status": "delivered",
3686 "attempts": 1,
3687 "response_status": 200,
3688 "response_body": "ok",
3689 "error": null,
3690 "duration_ms": 171,
3691 "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\"}",
3692 "created_at": "2026-10-04T16:25:40.007Z",
3693 "delivered_at": "2026-10-04T16:25:40.178Z",
3694 "next_attempt_at": null
3695 },
3696 "notes": "The response is the new delivery."
3697 },
3698 "redeliver_webhook_for_workspace": {
3699 "params": {
3700 "workspace": "flagon-io",
3701 "id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd",
3702 "delivery": "dlv_01kpx6a2b3c4d5e6f7g8h9j0kz"
3703 },
3704 "response": {
3705 "id": "dlv_01kpx6c8d1e2f3g4h5j6k7m8np",
3706 "hook_id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd",
3707 "event_id": "",
3708 "event": "ping",
3709 "status": "delivered",
3710 "attempts": 1,
3711 "response_status": 200,
3712 "response_body": "ok",
3713 "error": null,
3714 "duration_ms": 171,
3715 "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\"}",
3716 "created_at": "2026-10-04T16:25:40.007Z",
3717 "delivered_at": "2026-10-04T16:25:40.178Z",
3718 "next_attempt_at": null
3719 }
3720 },
3721 "list_integrations": {
3722 "params": {
3723 "workspace": "flagon-io"
3724 },
3725 "response": [
3726 {
3727 "id": "con_01kpx3m7q2f8r9t4v6w0y1z2ab",
3728 "workspace": "flagon-io",
3729 "provider": "anthropic",
3730 "kind": "models",
3731 "name": "Anthropic",
3732 "config": {
3733 "assign": false,
3734 "write_back": true
3735 },
3736 "secret_hint": "…3f9a",
3737 "webhook_url": null,
3738 "created_by": "syntaqx",
3739 "created_at": "2026-10-04T15:42:07.318Z",
3740 "last_used_at": "2026-10-04T15:42:08.102Z",
3741 "last_error": null,
3742 "models": [
3743 "claude-haiku-4-5",
3744 "claude-sonnet-4-5"
3745 ]
3746 },
3747 {
3748 "id": "con_01kpx4n8r3g9s0v5w7x1z2a3bc",
3749 "workspace": "flagon-io",
3750 "provider": "jira",
3751 "kind": "tracker",
3752 "name": "Jira",
3753 "config": {
3754 "assign": false,
3755 "write_back": true,
3756 "site": "https://acme.atlassian.net",
3757 "email": "syntaqx@example.com",
3758 "keys": [
3759 "TECH"
3760 ]
3761 },
3762 "secret_hint": "…x7Qe",
3763 "webhook_url": null,
3764 "created_by": "syntaqx",
3765 "created_at": "2026-10-04T15:42:07.318Z",
3766 "last_used_at": null,
3767 "last_error": null,
3768 "models": []
3769 }
3770 ],
3771 "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."
3772 },
3773 "connect_integration": {
3774 "params": {
3775 "workspace": "flagon-io"
3776 },
3777 "request": {
3778 "provider": "webhook",
3779 "config": {
3780 "repo": "flagon-io/hello",
3781 "label": "bug"
3782 }
3783 },
3784 "response": {
3785 "connection": {
3786 "id": "con_01kpx4n8r3g9s0v5w7x1z2a3bd",
3787 "workspace": "flagon-io",
3788 "provider": "webhook",
3789 "kind": "alerts",
3790 "name": "Webhook",
3791 "config": {
3792 "repo": "flagon-io/hello",
3793 "label": "bug",
3794 "assign": false,
3795 "write_back": true
3796 },
3797 "secret_hint": null,
3798 "webhook_url": "https://api.g1t.sh/hooks/con_01kpx4n8r3g9s0v5w7x1z2a3bd",
3799 "created_by": "syntaqx",
3800 "created_at": "2026-10-04T15:42:07.318Z",
3801 "last_used_at": null,
3802 "last_error": null,
3803 "models": []
3804 },
3805 "signing_secret": "g1ts_9f2c4a7e1b0d3c6f8a2e5b7d9c1f4a6e8b0d2c4f6a8e1b3d"
3806 },
3807 "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/)."
3808 },
3809 "update_integration": {
3810 "params": {
3811 "workspace": "flagon-io",
3812 "id": "con_01kpx5c2d8e4f6g0h2j4k6m8n0"
3813 },
3814 "request": {
3815 "config": {
3816 "base_url": "https://gpu.flagon.dev/v1",
3817 "gateway_models": [
3818 "ollama/*"
3819 ]
3820 },
3821 "secret": "sk-office-gpu-key"
3822 },
3823 "response": {
3824 "id": "con_01kpx5c2d8e4f6g0h2j4k6m8n0",
3825 "workspace": "flagon-io",
3826 "provider": "openai_endpoint",
3827 "kind": "models",
3828 "name": "Office GPU",
3829 "config": {
3830 "write_back": true,
3831 "base_url": "https://gpu.flagon.dev/v1",
3832 "gateway_models": [
3833 "ollama/*"
3834 ]
3835 },
3836 "secret_hint": "…-key",
3837 "webhook_url": null,
3838 "created_by": "syntaqx",
3839 "created_at": "2026-10-07T12:10:44.512Z",
3840 "last_used_at": "2026-10-07T14:00:02.000Z",
3841 "last_error": null,
3842 "models": [
3843 "llama3.3:70b",
3844 "qwen3-coder:30b"
3845 ]
3846 },
3847 "notes": "The secret is write-only: it is kept encrypted and only its last four characters come back, as `secret_hint`. With `gateway_models` set to `ollama/*`, an AI Gateway request for `ollama/qwen3-coder:30b` reaches this endpoint as `qwen3-coder:30b`, on the workspace's own account. See [the AI Gateway guide](/guides/ai-gateway/#your-own-providers)."
3848 },
3849 "disconnect_integration": {
3850 "params": {
3851 "workspace": "flagon-io",
3852 "id": "con_01kpx3m7q2f8r9t4v6w0y1z2ab"
3853 },
3854 "response": true
3855 },
3856 "test_integration": {
3857 "params": {
3858 "workspace": "flagon-io",
3859 "id": "con_01kpx3m7q2f8r9t4v6w0y1z2ab"
3860 },
3861 "response": {
3862 "ok": true,
3863 "message": "Anthropic accepted the key and offers 9 models."
3864 },
3865 "notes": "Credentials that do not work still answer `200`, with `ok` false and `message` saying what went wrong."
3866 },
3867 "get_model_routes": {
3868 "params": {
3869 "workspace": "flagon-io"
3870 },
3871 "response": [
3872 {
3873 "task": "default",
3874 "connection_id": "con_01kpx3m7q2f8r9t4v6w0y1z2ab",
3875 "model": "claude-sonnet-4-5"
3876 },
3877 {
3878 "task": "review",
3879 "connection_id": null,
3880 "model": null
3881 }
3882 ]
3883 },
3884 "set_model_routes": {
3885 "params": {
3886 "workspace": "flagon-io"
3887 },
3888 "request": {
3889 "routes": [
3890 {
3891 "task": "default",
3892 "connection_id": "con_01kpx3m7q2f8r9t4v6w0y1z2ab",
3893 "model": "claude-sonnet-4-5"
3894 },
3895 {
3896 "task": "plan",
3897 "connection_id": null,
3898 "model": "frontier"
3899 },
3900 {
3901 "task": "review",
3902 "connection_id": null
3903 }
3904 ]
3905 },
3906 "response": [
3907 {
3908 "task": "default",
3909 "connection_id": "con_01kpx3m7q2f8r9t4v6w0y1z2ab",
3910 "model": "claude-sonnet-4-5"
3911 },
3912 {
3913 "task": "plan",
3914 "connection_id": null,
3915 "model": "frontier"
3916 },
3917 {
3918 "task": "review",
3919 "connection_id": null,
3920 "model": null
3921 }
3922 ],
3923 "notes": "The response is the routes as saved, ordered by task. On g1t's hosted models (`connection_id` null), `model` is `small`, `large` or `frontier`, or null for Auto, which picks the cheapest model that can do each job and says why on the run."
3924 },
3925 "get_context": {
3926 "query": {
3927 "reference": "TECH-1234"
3928 },
3929 "response": {
3930 "provider": "jira",
3931 "key": "TECH-1234",
3932 "title": "Checkout fails for EU cards",
3933 "url": "https://acme.atlassian.net/browse/TECH-1234",
3934 "status": "In Progress",
3935 "body": "Customers with 3DS cards see a 500 at /pay.",
3936 "fetched_at": "2026-10-04T15:42:07.318Z"
3937 }
3938 },
3939 "import_issue": {
3940 "request": {
3941 "reference": "TECH-1234"
3942 },
3943 "response": {
3944 "number": 42,
3945 "item": {
3946 "provider": "jira",
3947 "key": "TECH-1234",
3948 "title": "Checkout fails for EU cards",
3949 "url": "https://acme.atlassian.net/browse/TECH-1234",
3950 "status": "In Progress",
3951 "body": "Customers with 3DS cards see a 500 at /pay.",
3952 "fetched_at": "2026-10-04T15:42:07.318Z"
3953 },
3954 "created": true
3955 },
3956 "notes": "`created` is false when the ticket was imported before; `number` is then that issue."
3957 },
3958 "remember": {
3959 "request": {
3960 "text": "The tests need TZ=UTC or the date tests fail.",
3961 "scope": "project",
3962 "kind": "gotcha",
3963 "from_number": 14
3964 },
3965 "response": {
3966 "id": "mem_01m43v8q2w3e4r5t6y7u8i9o0p",
3967 "scope": "project",
3968 "workspace": "flagon-io",
3969 "repo": {
3970 "namespace": "flagon-io",
3971 "name": "hello"
3972 },
3973 "text": "The tests need TZ=UTC or the date tests fail.",
3974 "kind": "gotcha",
3975 "source": {
3976 "kind": "run",
3977 "run_id": "arn_01m43v2c1p9k8d7e6f5a4b3c2d",
3978 "repo": {
3979 "namespace": "flagon-io",
3980 "name": "hello"
3981 },
3982 "number": 14
3983 },
3984 "created_by": "g1t",
3985 "pinned": false,
3986 "created_at": "2026-10-01T18:40:12.000Z",
3987 "updated_at": "2026-10-01T18:40:12.000Z",
3988 "last_used_at": null
3989 },
3990 "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."
3991 },
3992 "recall": {
3993 "query": {
3994 "q": "pnpm"
3995 },
3996 "response": {
3997 "project": [],
3998 "workspace": [
3999 {
4000 "id": "mem_01m43t0a1s2d3f4g5h6j7k8l9z",
4001 "scope": "workspace",
4002 "workspace": "flagon-io",
4003 "repo": null,
4004 "text": "We use pnpm everywhere, never npm or yarn.",
4005 "kind": "convention",
4006 "source": {
4007 "kind": "person",
4008 "run_id": null,
4009 "repo": null,
4010 "number": null
4011 },
4012 "created_by": "syntaqx",
4013 "pinned": true,
4014 "created_at": "2026-10-01T18:40:12.000Z",
4015 "updated_at": "2026-10-01T18:40:12.000Z",
4016 "last_used_at": null
4017 }
4018 ]
4019 },
4020 "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."
4021 },
4022 "search": {
4023 "query": {
4024 "q": "parse_query language:rust repo:acme/web",
4025 "type": "code"
4026 },
4027 "response": {
4028 "query": "parse_query repo:acme/web language:rust",
4029 "type": "code",
4030 "counts": {
4031 "repositories": 0,
4032 "code": 2,
4033 "issues": 0,
4034 "pulls": 0,
4035 "people": 0
4036 },
4037 "page": 1,
4038 "per_page": 20,
4039 "more": false,
4040 "hits": [
4041 {
4042 "kind": "code",
4043 "title": "src/search/query.rs",
4044 "url": "/acme/web/blob/main/src/search/query.rs#L42",
4045 "repo": "acme/web",
4046 "private": false,
4047 "description": null,
4048 "snippet": [],
4049 "lines": [
4050 {
4051 "number": 41,
4052 "parts": [
4053 {
4054 "text": "/// Reads a query typed into the search box.",
4055 "highlight": false
4056 }
4057 ]
4058 },
4059 {
4060 "number": 42,
4061 "parts": [
4062 {
4063 "text": "pub fn ",
4064 "highlight": false
4065 },
4066 {
4067 "text": "parse_query",
4068 "highlight": true
4069 },
4070 {
4071 "text": "(text: &str) -> Query {",
4072 "highlight": false
4073 }
4074 ]
4075 },
4076 {
4077 "number": 43,
4078 "parts": [
4079 {
4080 "text": " let mut query = Query::default();",
4081 "highlight": false
4082 }
4083 ]
4084 }
4085 ],
4086 "path": "src/search/query.rs",
4087 "language": "rust",
4088 "ref": "main",
4089 "number": null,
4090 "state": null,
4091 "author": null,
4092 "requested_by": null,
4093 "labels": [],
4094 "topics": [],
4095 "slug": null,
4096 "avatar": null,
4097 "updated_at": null
4098 }
4099 ],
4100 "notes": []
4101 },
4102 "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. An issue or pull request g1t opened has `author` `g1t` and `requested_by` the person it was for; `author:` matches the author."
4103 },
4104 "search_context": {
4105 "params": {
4106 "workspace": "acme"
4107 },
4108 "query": {
4109 "q": "how do we run the web tests",
4110 "project": "web"
4111 },
4112 "response": {
4113 "query": "how do we run the web tests",
4114 "mode": "semantic",
4115 "hits": [
4116 {
4117 "kind": "memory",
4118 "id": "mem_01m4a0c2b7k3f9d1e5g8h2j6k4",
4119 "title": "Gotcha",
4120 "snippet": "The date tests fail unless TZ=UTC.",
4121 "project": "web",
4122 "url": "/acme/web/memory",
4123 "score": 0.82,
4124 "source": "AGENTS.md",
4125 "by": "g1t",
4126 "updated_at": "2026-10-04T21:10:02.000Z"
4127 },
4128 {
4129 "kind": "doc",
4130 "id": "ent_5f0c2a9e41d7b3c86a1e2f40:2",
4131 "title": "Web (README.md)",
4132 "snippet": "## Testing Run npm test. The end-to-end tests need the api running locally…",
4133 "project": "web",
4134 "url": "/acme/web/blob/main/README.md",
4135 "score": 0.77,
4136 "source": "README.md",
4137 "by": null,
4138 "updated_at": "2026-10-04T20:58:41.000Z"
4139 },
4140 {
4141 "kind": "project",
4142 "id": "ent_9b1d6f0a2c3e4b5d6e7f8a9b",
4143 "title": "web",
4144 "snippet": "The storefront. Written in TypeScript. Packages: @acme/web. Uses api. Owned by ana.",
4145 "project": "web",
4146 "url": "/acme/web",
4147 "score": 0.71,
4148 "source": "catalog",
4149 "by": null,
4150 "updated_at": "2026-10-04T20:58:41.000Z"
4151 }
4152 ]
4153 },
4154 "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."
4155 },
4156 "get_entity": {
4157 "params": {
4158 "workspace": "acme",
4159 "kind": "project",
4160 "id": "web"
4161 },
4162 "response": {
4163 "entity": {
4164 "id": "ent_9b1d6f0a2c3e4b5d6e7f8a9b",
4165 "workspace": "acme",
4166 "kind": "project",
4167 "key": "web",
4168 "name": "web",
4169 "summary": "The storefront. Written in TypeScript. Packages: @acme/web. Uses api. Owned by ana.",
4170 "project": "web",
4171 "private": true,
4172 "data": {
4173 "repo": "acme/web",
4174 "root_dir": "",
4175 "default_branch": "main",
4176 "languages": [
4177 "TypeScript"
4178 ],
4179 "owners": [
4180 "ana"
4181 ],
4182 "tests": true,
4183 "test_commands": [
4184 "npm test"
4185 ],
4186 "production_url": "https://web--acme.g1t.page"
4187 },
4188 "source": "scan",
4189 "ref": "/acme/web",
4190 "updated_at": "2026-10-04T20:58:41.000Z"
4191 },
4192 "relations": [
4193 {
4194 "kind": "depends_on",
4195 "direction": "out",
4196 "entity": {
4197 "id": "ent_0a7c3e5b9d1f2a4c6e8b0d2f",
4198 "workspace": "acme",
4199 "kind": "project",
4200 "key": "api",
4201 "name": "api",
4202 "summary": "The public API. Written in Rust.",
4203 "project": "api",
4204 "private": true,
4205 "data": {},
4206 "source": "scan",
4207 "ref": "/acme/api",
4208 "updated_at": "2026-10-04T20:57:12.000Z"
4209 }
4210 },
4211 {
4212 "kind": "owned_by",
4213 "direction": "out",
4214 "entity": {
4215 "id": "ent_3c5e7a9b1d2f4a6c8e0b2d4f",
4216 "workspace": "acme",
4217 "kind": "owner",
4218 "key": "ana",
4219 "name": "ana",
4220 "summary": null,
4221 "project": null,
4222 "private": false,
4223 "data": {},
4224 "source": "scan",
4225 "ref": "/u/ana",
4226 "updated_at": "2026-10-04T20:58:41.000Z"
4227 }
4228 }
4229 ]
4230 },
4231 "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."
4232 },
4233 "list_collaborators": {
4234 "response": {
4235 "repo": "flagon-io/hello",
4236 "base_permission": "write",
4237 "people": [
4238 {
4239 "username": "syntaqx",
4240 "name": "Chase Pierce",
4241 "avatar": null,
4242 "role": "admin",
4243 "source": "owner",
4244 "direct": null,
4245 "workspace_role": "owner"
4246 },
4247 {
4248 "username": "linus",
4249 "name": null,
4250 "avatar": null,
4251 "role": "maintain",
4252 "source": "direct",
4253 "direct": "maintain",
4254 "workspace_role": "member"
4255 },
4256 {
4257 "username": "grace",
4258 "name": "Grace Hopper",
4259 "avatar": null,
4260 "role": "write",
4261 "source": "base",
4262 "direct": null,
4263 "workspace_role": "member"
4264 },
4265 {
4266 "username": "ada",
4267 "name": "Ada Lovelace",
4268 "avatar": null,
4269 "role": "triage",
4270 "source": "direct",
4271 "direct": "triage",
4272 "workspace_role": null
4273 }
4274 ],
4275 "invitations": [
4276 {
4277 "id": "rin_01kp3c4d5e6f7g8h9j0k1m2n3p",
4278 "repo": "flagon-io/hello",
4279 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
4280 "invitee": "alan",
4281 "email": null,
4282 "role": "write",
4283 "invited_by": "syntaqx",
4284 "inviter_avatar": null,
4285 "status": "pending",
4286 "created_at": "2026-10-05T17:00:00.000Z",
4287 "expires_at": "2026-10-12T17:00:00.000Z"
4288 },
4289 {
4290 "id": "rin_01kp3d7e8f9g0h1j2k3m4n5p6q",
4291 "repo": "flagon-io/hello",
4292 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
4293 "invitee": null,
4294 "email": "joan@example.com",
4295 "role": "read",
4296 "invited_by": "syntaqx",
4297 "inviter_avatar": null,
4298 "status": "pending",
4299 "created_at": "2026-10-05T17:00:00.000Z",
4300 "expires_at": "2026-10-12T17:00:00.000Z"
4301 }
4302 ],
4303 "viewer_role": "admin",
4304 "can_manage": true
4305 },
4306 "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/)."
4307 },
4308 "add_collaborator": {
4309 "request": {
4310 "invitee": "ada",
4311 "role": "triage"
4312 },
4313 "response": {
4314 "result": "invited",
4315 "invitation": {
4316 "id": "rin_01kp3e9f0g1h2j3k4m5n6p7q8r",
4317 "repo": "flagon-io/hello",
4318 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
4319 "invitee": "ada",
4320 "email": null,
4321 "role": "triage",
4322 "invited_by": "syntaqx",
4323 "inviter_avatar": null,
4324 "status": "pending",
4325 "created_at": "2026-10-05T17:00:00.000Z",
4326 "expires_at": "2026-10-12T17:00:00.000Z"
4327 }
4328 },
4329 "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. collaborator_added` webhook event is sent once they have the role. See [Access and roles](/guides/access-and-roles/). On a free workspace, inviting anyone who is not a member answers `402` with `payment_required` until it starts the g1t plan."
4330 },
4331 "update_collaborator": {
4332 "params": {
4333 "owner": "flagon-io",
4334 "name": "hello",
4335 "username": "ada"
4336 },
4337 "request": {
4338 "role": "write"
4339 },
4340 "response": {
4341 "username": "ada",
4342 "name": "Ada Lovelace",
4343 "avatar": null,
4344 "role": "write",
4345 "source": "direct",
4346 "direct": "write",
4347 "workspace_role": null
4348 },
4349 "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/)."
4350 },
4351 "remove_collaborator": {
4352 "params": {
4353 "owner": "flagon-io",
4354 "name": "hello",
4355 "username": "ada"
4356 },
4357 "response": true,
4358 "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/)."
4359 },
4360 "get_collaborator_permission": {
4361 "params": {
4362 "owner": "flagon-io",
4363 "name": "hello",
4364 "username": "ada"
4365 },
4366 "response": {
4367 "username": "ada",
4368 "role": "triage",
4369 "source": "direct",
4370 "capabilities": [
4371 "read",
4372 "participate",
4373 "triage"
4374 ]
4375 },
4376 "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/)."
4377 },
4378 "list_repo_invitations": {
4379 "response": [
4380 {
4381 "id": "rin_01kp3c4d5e6f7g8h9j0k1m2n3p",
4382 "repo": "flagon-io/hello",
4383 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
4384 "invitee": "alan",
4385 "email": null,
4386 "role": "write",
4387 "invited_by": "syntaqx",
4388 "inviter_avatar": null,
4389 "status": "pending",
4390 "created_at": "2026-10-05T17:00:00.000Z",
4391 "expires_at": "2026-10-12T17:00:00.000Z"
4392 },
4393 {
4394 "id": "rin_01kp3d7e8f9g0h1j2k3m4n5p6q",
4395 "repo": "flagon-io/hello",
4396 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
4397 "invitee": null,
4398 "email": "joan@example.com",
4399 "role": "read",
4400 "invited_by": "syntaqx",
4401 "inviter_avatar": null,
4402 "status": "pending",
4403 "created_at": "2026-10-05T17:00:00.000Z",
4404 "expires_at": "2026-10-12T17:00:00.000Z"
4405 }
4406 ],
4407 "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/)."
4408 },
4409 "revoke_repo_invitation": {
4410 "params": {
4411 "owner": "flagon-io",
4412 "name": "hello",
4413 "id": "rin_01kp3c4d5e6f7g8h9j0k1m2n3p"
4414 },
4415 "response": {
4416 "id": "rin_01kp3c4d5e6f7g8h9j0k1m2n3p",
4417 "repo": "flagon-io/hello",
4418 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
4419 "invitee": "alan",
4420 "email": null,
4421 "role": "write",
4422 "invited_by": "syntaqx",
4423 "inviter_avatar": null,
4424 "status": "revoked",
4425 "created_at": "2026-10-05T17:00:00.000Z",
4426 "expires_at": "2026-10-12T17:00:00.000Z"
4427 },
4428 "notes": "`404` when there is no pending invitation with that id on this repository."
4429 },
4430 "list_my_repo_invitations": {
4431 "response": [
4432 {
4433 "id": "rin_01kp3e9f0g1h2j3k4m5n6p7q8r",
4434 "repo": "flagon-io/hello",
4435 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
4436 "invitee": "ada",
4437 "email": null,
4438 "role": "triage",
4439 "invited_by": "syntaqx",
4440 "inviter_avatar": null,
4441 "status": "pending",
4442 "created_at": "2026-10-05T17:00:00.000Z",
4443 "expires_at": "2026-10-12T17:00:00.000Z"
4444 }
4445 ],
4446 "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."
4447 },
4448 "accept_repo_invitation": {
4449 "params": {
4450 "id": "rin_01kp3e9f0g1h2j3k4m5n6p7q8r"
4451 },
4452 "response": {
4453 "id": "rin_01kp3e9f0g1h2j3k4m5n6p7q8r",
4454 "repo": "flagon-io/hello",
4455 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
4456 "invitee": "ada",
4457 "email": null,
4458 "role": "triage",
4459 "invited_by": "syntaqx",
4460 "inviter_avatar": null,
4461 "status": "accepted",
4462 "created_at": "2026-10-05T17:00:00.000Z",
4463 "expires_at": "2026-10-12T17:00:00.000Z"
4464 },
4465 "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/)."
4466 },
4467 "decline_repo_invitation": {
4468 "params": {
4469 "id": "rin_01kp3e9f0g1h2j3k4m5n6p7q8r"
4470 },
4471 "response": {
4472 "id": "rin_01kp3e9f0g1h2j3k4m5n6p7q8r",
4473 "repo": "flagon-io/hello",
4474 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
4475 "invitee": "ada",
4476 "email": null,
4477 "role": "triage",
4478 "invited_by": "syntaqx",
4479 "inviter_avatar": null,
4480 "status": "declined",
4481 "created_at": "2026-10-05T17:00:00.000Z",
4482 "expires_at": "2026-10-12T17:00:00.000Z"
4483 },
4484 "notes": "`404` when you have no pending invitation with that id."
4485 },
4486 "set_base_permission": {
4487 "params": {
4488 "workspace": "flagon-io"
4489 },
4490 "request": {
4491 "base_permission": "read"
4492 },
4493 "response": {
4494 "workspace": "flagon-io",
4495 "base_permission": "read"
4496 },
4497 "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/)."
4498 },
4499 "list_outside_collaborators": {
4500 "params": {
4501 "workspace": "flagon-io"
4502 },
4503 "response": [
4504 {
4505 "username": "ada",
4506 "name": "Ada Lovelace",
4507 "avatar": null,
4508 "repos": [
4509 {
4510 "repo": "flagon-io/docs",
4511 "role": "write"
4512 },
4513 {
4514 "repo": "flagon-io/hello",
4515 "role": "triage"
4516 }
4517 ]
4518 }
4519 ],
4520 "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/)."
4521 },
4522 "list_teams": {
4523 "params": {
4524 "workspace": "flagon-io"
4525 },
4526 "query": {
4527 "q": "back"
4528 },
4529 "response": [
4530 {
4531 "id": "team_01m52k8d3f7h1k5n9r3v7z1c5g",
4532 "workspace": "flagon-io",
4533 "slug": "backend",
4534 "name": "Backend",
4535 "description": "The API and the services behind it.",
4536 "visibility": "visible",
4537 "parent": {
4538 "slug": "engineering",
4539 "name": "Engineering"
4540 },
4541 "notify": true,
4542 "review_assignment": {
4543 "enabled": false,
4544 "algorithm": "round_robin",
4545 "count": 1,
4546 "skip_busy": false,
4547 "busy_at": 5,
4548 "include_child_teams": false,
4549 "excluded": [],
4550 "notify_team": false
4551 },
4552 "members_count": 4,
4553 "repos_count": 2,
4554 "child_teams_count": 1,
4555 "viewer_role": "maintainer",
4556 "can_manage": true,
4557 "created_at": "2026-10-06T15:02:11.480Z",
4558 "updated_at": "2026-10-06T15:02:11.480Z"
4559 }
4560 ],
4561 "notes": "Teams you are in come first, then the rest by name. A secret team is listed only for its own people and the workspace's owners. `review_assignment` is what happens when the team is asked to review: see [`set_team_review_assignment`](/reference/api/teams/set-team-review-assignment/). `403` for anyone who is not a member of the workspace. See [Teams](/guides/teams/)."
4562 },
4563 "create_team": {
4564 "params": {
4565 "workspace": "flagon-io"
4566 },
4567 "request": {
4568 "name": "Backend",
4569 "description": "The API and the services behind it.",
4570 "visibility": "visible",
4571 "parent": "engineering",
4572 "members": [
4573 "ana"
4574 ]
4575 },
4576 "response": {
4577 "id": "team_01m52k8d3f7h1k5n9r3v7z1c5g",
4578 "workspace": "flagon-io",
4579 "slug": "backend",
4580 "name": "Backend",
4581 "description": "The API and the services behind it.",
4582 "visibility": "visible",
4583 "parent": {
4584 "slug": "engineering",
4585 "name": "Engineering"
4586 },
4587 "notify": true,
4588 "review_assignment": {
4589 "enabled": false,
4590 "algorithm": "round_robin",
4591 "count": 1,
4592 "skip_busy": false,
4593 "busy_at": 5,
4594 "include_child_teams": false,
4595 "excluded": [],
4596 "notify_team": false
4597 },
4598 "members_count": 2,
4599 "repos_count": 0,
4600 "child_teams_count": 0,
4601 "viewer_role": "maintainer",
4602 "can_manage": true,
4603 "created_at": "2026-10-06T15:02:11.480Z",
4604 "updated_at": "2026-10-06T15:02:11.480Z"
4605 },
4606 "notes": "You become the team's maintainer. Refused with `403` for a member when the workspace's `team_creation` is `owners`. `slug` is made from `name` when left out (`Web & Mobile` becomes `web-mobile`), and `409` says one is taken. A workspace has at most 500 teams, nested at most 8 deep; `name` is at most 80 characters and `description` 280. A `secret` team cannot have a parent or child teams. Refused with `403` for an agent's or a workspace's token. See [Teams](/guides/teams/)."
4607 },
4608 "get_team": {
4609 "params": {
4610 "workspace": "flagon-io",
4611 "team": "backend"
4612 },
4613 "response": {
4614 "id": "team_01m52k8d3f7h1k5n9r3v7z1c5g",
4615 "workspace": "flagon-io",
4616 "slug": "backend",
4617 "name": "Backend",
4618 "description": "The API and the services behind it.",
4619 "visibility": "visible",
4620 "parent": {
4621 "slug": "engineering",
4622 "name": "Engineering"
4623 },
4624 "notify": true,
4625 "review_assignment": {
4626 "enabled": false,
4627 "algorithm": "round_robin",
4628 "count": 1,
4629 "skip_busy": false,
4630 "busy_at": 5,
4631 "include_child_teams": false,
4632 "excluded": [],
4633 "notify_team": false
4634 },
4635 "members_count": 4,
4636 "repos_count": 2,
4637 "child_teams_count": 1,
4638 "viewer_role": "maintainer",
4639 "can_manage": true,
4640 "created_at": "2026-10-06T15:02:11.480Z",
4641 "updated_at": "2026-10-06T15:02:11.480Z"
4642 },
4643 "notes": "`404` for a team that does not exist, or a secret one you are not in, unless you are an owner."
4644 },
4645 "update_team": {
4646 "params": {
4647 "workspace": "flagon-io",
4648 "team": "backend"
4649 },
4650 "request": {
4651 "description": "The API, the services behind it, and their on-call.",
4652 "visibility": "secret",
4653 "parent": ""
4654 },
4655 "response": {
4656 "id": "team_01m52k8d3f7h1k5n9r3v7z1c5g",
4657 "workspace": "flagon-io",
4658 "slug": "backend",
4659 "name": "Backend",
4660 "description": "The API, the services behind it, and their on-call.",
4661 "visibility": "secret",
4662 "parent": null,
4663 "notify": true,
4664 "review_assignment": {
4665 "enabled": false,
4666 "algorithm": "round_robin",
4667 "count": 1,
4668 "skip_busy": false,
4669 "busy_at": 5,
4670 "include_child_teams": false,
4671 "excluded": [],
4672 "notify_team": false
4673 },
4674 "members_count": 4,
4675 "repos_count": 2,
4676 "child_teams_count": 1,
4677 "viewer_role": "maintainer",
4678 "can_manage": true,
4679 "created_at": "2026-10-06T15:02:11.480Z",
4680 "updated_at": "2026-10-07T09:41:52.006Z"
4681 },
4682 "notes": "Only the fields given change. `parent` set to `\"\"` takes the team out from under its parent; a team cannot be nested under itself or one of its own child teams. A new `slug` changes how it is mentioned: `@flagon-io/backend` no longer reaches it. `review_assignment` takes the fields [`set_team_review_assignment`](/reference/api/teams/set-team-review-assignment/) does. Owners of the workspace and the team's maintainers (`403` otherwise)."
4683 },
4684 "delete_team": {
4685 "params": {
4686 "workspace": "flagon-io",
4687 "team": "backend"
4688 },
4689 "response": true,
4690 "notes": "Its child teams move up to its parent, or to the top when it has none. The roles it gave on repositories are taken away, and it is no longer asked to review. Owners of the workspace and the team's maintainers (`403` otherwise)."
4691 },
4692 "list_team_members": {
4693 "params": {
4694 "workspace": "flagon-io",
4695 "team": "backend"
4696 },
4697 "query": {
4698 "include_child_teams": "true"
4699 },
4700 "response": [
4701 {
4702 "username": "syntaqx",
4703 "name": "Chase Pierce",
4704 "avatar": null,
4705 "role": "maintainer",
4706 "via": null
4707 },
4708 {
4709 "username": "ana",
4710 "name": "Ana Lima",
4711 "avatar": null,
4712 "role": "member",
4713 "via": null
4714 },
4715 {
4716 "username": "bo",
4717 "name": null,
4718 "avatar": null,
4719 "role": "member",
4720 "via": "payments"
4721 }
4722 ],
4723 "notes": "Maintainers come first, then members, each by username. With `include_child_teams`, the people of its child teams (and theirs) follow, each with `via`, the child team they are in; someone in both is listed once, as the team's own."
4724 },
4725 "set_team_member": {
4726 "params": {
4727 "workspace": "flagon-io",
4728 "team": "backend",
4729 "username": "ana"
4730 },
4731 "request": {
4732 "role": "maintainer"
4733 },
4734 "response": {
4735 "username": "ana",
4736 "name": "Ana Lima",
4737 "avatar": null,
4738 "role": "maintainer",
4739 "via": null
4740 },
4741 "notes": "`role` is `member` (the default) or `maintainer`. `422` when they are not a member of the workspace: add them to it first. Owners of the workspace and the team's maintainers (`403` otherwise)."
4742 },
4743 "remove_team_member": {
4744 "params": {
4745 "workspace": "flagon-io",
4746 "team": "backend",
4747 "username": "ana"
4748 },
4749 "response": true,
4750 "notes": "Anyone may take themselves out of a team. Leaving the workspace takes a person out of all its teams."
4751 },
4752 "list_child_teams": {
4753 "params": {
4754 "workspace": "flagon-io",
4755 "team": "engineering"
4756 },
4757 "response": [
4758 {
4759 "id": "team_01m52k8d3f7h1k5n9r3v7z1c5g",
4760 "workspace": "flagon-io",
4761 "slug": "backend",
4762 "name": "Backend",
4763 "description": "The API and the services behind it.",
4764 "visibility": "visible",
4765 "parent": {
4766 "slug": "engineering",
4767 "name": "Engineering"
4768 },
4769 "notify": true,
4770 "review_assignment": {
4771 "enabled": false,
4772 "algorithm": "round_robin",
4773 "count": 1,
4774 "skip_busy": false,
4775 "busy_at": 5,
4776 "include_child_teams": false,
4777 "excluded": [],
4778 "notify_team": false
4779 },
4780 "members_count": 4,
4781 "repos_count": 2,
4782 "child_teams_count": 0,
4783 "viewer_role": "maintainer",
4784 "can_manage": true,
4785 "created_at": "2026-10-06T15:02:11.480Z",
4786 "updated_at": "2026-10-06T15:02:11.480Z"
4787 }
4788 ],
4789 "notes": "Only the teams directly under it; read each one's own with this again. A child team inherits its parent's roles on repositories, and a mention or review request for the parent reaches its people too."
4790 },
4791 "list_team_repos": {
4792 "params": {
4793 "workspace": "flagon-io",
4794 "team": "backend"
4795 },
4796 "response": [
4797 {
4798 "repo": "flagon-io/hello",
4799 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
4800 "role": "write",
4801 "inherited_from": null
4802 },
4803 {
4804 "repo": "flagon-io/docs",
4805 "repo_id": "rep_01m3m5r2a8c4e6g8j0m2p4r6t8",
4806 "role": "read",
4807 "inherited_from": "engineering"
4808 }
4809 ],
4810 "notes": "A role inherited from a parent team names it in `inherited_from`. Where the team has a role of its own on the same repository, the higher one is listed. Only repositories you can see are listed."
4811 },
4812 "set_team_repo": {
4813 "params": {
4814 "workspace": "flagon-io",
4815 "team": "backend",
4816 "repo": "hello"
4817 },
4818 "request": {
4819 "role": "maintain"
4820 },
4821 "response": {
4822 "repo": "flagon-io/hello",
4823 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
4824 "role": "maintain",
4825 "inherited_from": null
4826 },
4827 "notes": "`repo` in the path is the repository's name in the team's workspace; a team has roles only on its own workspace's repositories. `role` is `read`, `triage`, `write`, `maintain` or `admin`. Everyone in the team and its child teams gets it; someone with a higher role otherwise keeps that. Needs the Admin role on the repository (`403` otherwise), and the `access:admin` scope. See [Access and roles](/guides/access-and-roles/)."
4828 },
4829 "remove_team_repo": {
4830 "params": {
4831 "workspace": "flagon-io",
4832 "team": "backend",
4833 "repo": "hello"
4834 },
4835 "response": true,
4836 "notes": "A role the team inherits from a parent is taken away on the parent. Needs the Admin role on the repository, or to be an owner or one of the team's maintainers."
4837 },
4838 "set_team_review_assignment": {
4839 "params": {
4840 "workspace": "flagon-io",
4841 "team": "backend"
4842 },
4843 "request": {
4844 "enabled": true,
4845 "algorithm": "load_balance",
4846 "count": 2,
4847 "skip_busy": true,
4848 "busy_at": 5,
4849 "excluded": [
4850 "syntaqx"
4851 ]
4852 },
4853 "response": {
4854 "id": "team_01m52k8d3f7h1k5n9r3v7z1c5g",
4855 "workspace": "flagon-io",
4856 "slug": "backend",
4857 "name": "Backend",
4858 "description": "The API and the services behind it.",
4859 "visibility": "visible",
4860 "parent": {
4861 "slug": "engineering",
4862 "name": "Engineering"
4863 },
4864 "notify": true,
4865 "review_assignment": {
4866 "enabled": true,
4867 "algorithm": "load_balance",
4868 "count": 2,
4869 "skip_busy": true,
4870 "busy_at": 5,
4871 "include_child_teams": false,
4872 "excluded": [
4873 "syntaqx"
4874 ],
4875 "notify_team": false
4876 },
4877 "members_count": 4,
4878 "repos_count": 2,
4879 "child_teams_count": 1,
4880 "viewer_role": "maintainer",
4881 "can_manage": true,
4882 "created_at": "2026-10-06T15:02:11.480Z",
4883 "updated_at": "2026-10-07T09:44:03.512Z"
4884 },
4885 "notes": "| Field | |\n| --- | --- |\n| `enabled` | Off, everyone in the team is asked. On, `count` people are picked and asked, and the team stays shown as asked beside them. |\n| `algorithm` | `round_robin`: whoever this team asked least recently. `load_balance`: whoever has the fewest pull requests waiting on their review. |\n| `count` | How many to pick, 1 to 10. People from the team already asked count towards it. |\n| `skip_busy`, `busy_at` | Leave out anyone with `busy_at` (1 to 100) or more pull requests waiting on their review. |\n| `include_child_teams` | Also pick from its child teams' people. |\n| `excluded` | Usernames never picked. Replaces the whole list. |\n| `notify_team` | Also tell the rest of the team when people are picked. |\n\nFields left out keep their value. The pull request's author is never picked. See [Teams](/guides/teams/)."
4886 },
4887 "list_user_teams": {
4888 "params": {
4889 "workspace": "flagon-io",
4890 "username": "ana"
4891 },
4892 "response": [
4893 {
4894 "id": "team_01m52k8d3f7h1k5n9r3v7z1c5g",
4895 "workspace": "flagon-io",
4896 "slug": "backend",
4897 "name": "Backend",
4898 "description": "The API and the services behind it.",
4899 "visibility": "visible",
4900 "parent": {
4901 "slug": "engineering",
4902 "name": "Engineering"
4903 },
4904 "notify": true,
4905 "review_assignment": {
4906 "enabled": false,
4907 "algorithm": "round_robin",
4908 "count": 1,
4909 "skip_busy": false,
4910 "busy_at": 5,
4911 "include_child_teams": false,
4912 "excluded": [],
4913 "notify_team": false
4914 },
4915 "members_count": 4,
4916 "repos_count": 2,
4917 "child_teams_count": 1,
4918 "viewer_role": null,
4919 "can_manage": false,
4920 "created_at": "2026-10-06T15:02:11.480Z",
4921 "updated_at": "2026-10-06T15:02:11.480Z"
4922 }
4923 ],
4924 "notes": "Only the teams they are in themselves, not the parents those teams are under. Secret teams you are not in are left out unless you are an owner. `403` for anyone who is not a member of the workspace."
4925 },
4926 "list_security_alerts": {
4927 "params": {
4928 "owner": "flagon-io",
4929 "name": "hello"
4930 },
4931 "query": {
4932 "state": "open"
4933 },
4934 "response": [
4935 {
4936 "kind": "secret",
4937 "id": "sec_01kp4a7b2c3d4e5f6g7h8j9k0m",
4938 "state": "dismissed",
4939 "secret_type": "aws_access_key",
4940 "label": "an AWS access key",
4941 "path": "test/fixtures/aws.env",
4942 "line": 3,
4943 "commit": "9f2c1e04b7d3a8e6f5c2b1a0d9e8f7c6b5a4d3e2",
4944 "preview": "AKIA…MPLE",
4945 "status": "allowed",
4946 "source": "history",
4947 "test_value": "the documented example key",
4948 "found_by": null,
4949 "found_at": "2026-10-01T12:00:00.000Z",
4950 "dismissed_reason": "used_in_tests",
4951 "dismissed_comment": "Only in the test fixtures.",
4952 "dismissed_by": "syntaqx",
4953 "dismissed_at": "2026-10-02T09:15:00.000Z"
4954 },
4955 {
4956 "kind": "dependency",
4957 "id": "vul_01kp4b8c3d4e5f6g7h8j9k0m1n",
4958 "state": "open",
4959 "ecosystem": "npm",
4960 "package": "lodash",
4961 "version": "4.17.20",
4962 "manifest": "package-lock.json",
4963 "advisory": "GHSA-35jh-r3h4-6jhm",
4964 "osv_id": "GHSA-35jh-r3h4-6jhm",
4965 "summary": "Command Injection in lodash",
4966 "severity": "high",
4967 "fixed_version": "4.17.21",
4968 "fixed_at": null,
4969 "update": {
4970 "state": "open",
4971 "target": "4.17.21",
4972 "branch": "g1t/security/lodash-4.17.21",
4973 "pull": 42,
4974 "issue": null,
4975 "error": null,
4976 "updated_at": "2026-10-01T12:20:00.000Z"
4977 },
4978 "found_at": "2026-10-01T12:00:00.000Z",
4979 "dismissed_reason": null,
4980 "dismissed_comment": null,
4981 "dismissed_by": null,
4982 "dismissed_at": null
4983 }
4984 ],
4985 "notes": "Secrets come first, then dependencies. Fields only one kind has are left out of the other: a secret has `secret_type`, `label`, `path`, `line`, `commit`, `preview`, `status` (`open`, `blocked`, `allowed` or `resolved`), `source` (`push` or `history`), `test_value` and `found_by`; a dependency has `ecosystem`, `package`, `version`, `manifest`, `advisory`, `osv_id`, `summary`, `severity`, `fixed_version` (null when no patched version is available), `fixed_at` and `update`, the pull request g1t opens to upgrade it. `dismissed_reason`, `dismissed_comment`, `dismissed_by` and `dismissed_at` are null while an alert is open; a secret fixed by being revoked keeps them. `422` for a `state` or `kind` it does not know, and `404` for anyone without the Write role. See [Security](/guides/security/)."
4986 },
4987 "dismiss_security_alert": {
4988 "params": {
4989 "owner": "flagon-io",
4990 "name": "hello",
4991 "id": "vul_01kp4b8c3d4e5f6g7h8j9k0m1n"
4992 },
4993 "request": {
4994 "reason": "tolerable_risk",
4995 "comment": "Only the build uses it, on trusted input."
4996 },
4997 "response": {
4998 "kind": "dependency",
4999 "id": "vul_01kp4b8c3d4e5f6g7h8j9k0m1n",
5000 "state": "dismissed",
5001 "ecosystem": "npm",
5002 "package": "lodash",
5003 "version": "4.17.20",
5004 "manifest": "package-lock.json",
5005 "advisory": "GHSA-35jh-r3h4-6jhm",
5006 "osv_id": "GHSA-35jh-r3h4-6jhm",
5007 "summary": "Command Injection in lodash",
5008 "severity": "high",
5009 "fixed_version": "4.17.21",
5010 "fixed_at": null,
5011 "update": {
5012 "state": "open",
5013 "target": "4.17.21",
5014 "branch": "g1t/security/lodash-4.17.21",
5015 "pull": 42,
5016 "issue": null,
5017 "error": null,
5018 "updated_at": "2026-10-01T12:20:00.000Z"
5019 },
5020 "found_at": "2026-10-01T12:00:00.000Z",
5021 "dismissed_reason": "tolerable_risk",
5022 "dismissed_comment": "Only the build uses it, on trusted input.",
5023 "dismissed_by": "syntaqx",
5024 "dismissed_at": "2026-10-06T10:00:00.000Z"
5025 },
5026 "notes": "| Kind | Reasons |\n| --- | --- |\n| `secret` | `false_positive`, `used_in_tests`, `revoked`, `wont_fix` |\n| `dependency` | `fix_started`, `no_bandwidth`, `tolerable_risk`, `inaccurate`, `not_used` |\n\nA reason for the other kind of alert, or one not in the table, is refused with `422`. A secret dismissed as `revoked` becomes `fixed`; with any other reason it becomes `dismissed` and pushes that carry it go through. Dismissing a secret needs the Admin role on the repository; a dependency needs the Write role. A token needs `repo:admin` for either, and a g1t agent’s token never dismisses alerts."
5027 },
5028 "reopen_security_alert": {
5029 "params": {
5030 "owner": "flagon-io",
5031 "name": "hello",
5032 "id": "sec_01kp4a7b2c3d4e5f6g7h8j9k0m"
5033 },
5034 "response": {
5035 "kind": "secret",
5036 "id": "sec_01kp4a7b2c3d4e5f6g7h8j9k0m",
5037 "state": "open",
5038 "secret_type": "aws_access_key",
5039 "label": "an AWS access key",
5040 "path": "test/fixtures/aws.env",
5041 "line": 3,
5042 "commit": "9f2c1e04b7d3a8e6f5c2b1a0d9e8f7c6b5a4d3e2",
5043 "preview": "AKIA…MPLE",
5044 "status": "open",
5045 "source": "history",
5046 "test_value": "the documented example key",
5047 "found_by": null,
5048 "found_at": "2026-10-01T12:00:00.000Z",
5049 "dismissed_reason": null,
5050 "dismissed_comment": null,
5051 "dismissed_by": null,
5052 "dismissed_at": null
5053 },
5054 "notes": "The alert is `open` again, and a reopened secret stops pushes that carry it. The same roles as dismissing: Admin for a secret, Write for a dependency."
5055 },
5056 "list_notifications": {
5057 "query": {
5058 "participating": "true"
5059 },
5060 "response": {
5061 "items": [
5062 {
5063 "id": "ntf_01kp7m2q3r4s5t6v7w8x9y0z1a",
5064 "reason": "review_requested",
5065 "severity": "warning",
5066 "title": "ada asked you to review flagon-io/hello#14",
5067 "body": "Add a greeting to the README",
5068 "event": "pull.review_requested",
5069 "repo": "flagon-io/hello",
5070 "workspace": "flagon-io",
5071 "subject": "pull",
5072 "number": 14,
5073 "url": "/flagon-io/hello/pull/14",
5074 "actor": "ada",
5075 "count": 3,
5076 "created_at": "2026-10-06T15:02:11.000Z",
5077 "updated_at": "2026-10-07T09:41:30.000Z",
5078 "read_at": null,
5079 "done_at": null,
5080 "saved": false,
5081 "snoozed_until": null
5082 },
5083 {
5084 "id": "ntf_01kp7k9a8b7c6d5e4f3g2h1j0k",
5085 "reason": "ci_activity",
5086 "severity": "error",
5087 "title": "Production of hello failed to deploy",
5088 "body": "The build failed: npm run build exited with 1.",
5089 "event": "deployment.failed",
5090 "repo": "flagon-io/hello",
5091 "workspace": "flagon-io",
5092 "subject": "deploy",
5093 "number": null,
5094 "url": "/flagon-io/hello/deployments/dpl_01kp7k8z7y6x5w4v3t2s1r0q9p",
5095 "actor": "syntaqx",
5096 "count": 1,
5097 "created_at": "2026-10-07T08:12:40.000Z",
5098 "updated_at": "2026-10-07T08:12:40.000Z",
5099 "read_at": null,
5100 "done_at": null,
5101 "saved": false,
5102 "snoozed_until": null
5103 }
5104 ],
5105 "next": null
5106 },
5107 "notes": "Unread threads only, unless `all=true`. Threads that wait on you (an agent, or a review asked of you) have severity `warning`.\n\n| `reason` | You were told because |\n| --- | --- |\n| `agent` | An agent is waiting on you: it asked a question, or g1t stopped until a person steps in |\n| `review_requested` | You were asked to review |\n| `assign` | You were assigned |\n| `mention` | Someone mentioned you by `@username` |\n| `ci_activity` | Checks, a workflow or a deployment on your work finished |\n| `security_alert` | A security alert on a repository you look after |\n| `state_change` | It was closed, reopened or merged |\n| `author` | You opened it, or asked g1t for it |\n| `comment` | You commented on it |\n| `manual` | You subscribed to it by hand |\n| `subscribed` | You watch its repository |\n\nWith `participating=true`, threads you only follow (`manual`, `subscribed`) are left out. For the next page, pass `next` as `cursor`; `next` is null on the last."
5108 },
5109 "list_repo_notifications": {
5110 "params": {
5111 "owner": "flagon-io",
5112 "name": "hello"
5113 },
5114 "query": {
5115 "all": "true"
5116 },
5117 "response": {
5118 "items": [
5119 {
5120 "id": "ntf_01kp7m2q3r4s5t6v7w8x9y0z1a",
5121 "reason": "review_requested",
5122 "severity": "warning",
5123 "title": "ada asked you to review flagon-io/hello#14",
5124 "body": "Add a greeting to the README",
5125 "event": "pull.review_requested",
5126 "repo": "flagon-io/hello",
5127 "workspace": "flagon-io",
5128 "subject": "pull",
5129 "number": 14,
5130 "url": "/flagon-io/hello/pull/14",
5131 "actor": "ada",
5132 "count": 3,
5133 "created_at": "2026-10-06T15:02:11.000Z",
5134 "updated_at": "2026-10-07T09:41:30.000Z",
5135 "read_at": "2026-10-07T09:50:00.000Z",
5136 "done_at": null,
5137 "saved": false,
5138 "snoozed_until": null
5139 },
5140 {
5141 "id": "ntf_01kp7k9a8b7c6d5e4f3g2h1j0k",
5142 "reason": "ci_activity",
5143 "severity": "error",
5144 "title": "Production of hello failed to deploy",
5145 "body": "The build failed: npm run build exited with 1.",
5146 "event": "deployment.failed",
5147 "repo": "flagon-io/hello",
5148 "workspace": "flagon-io",
5149 "subject": "deploy",
5150 "number": null,
5151 "url": "/flagon-io/hello/deployments/dpl_01kp7k8z7y6x5w4v3t2s1r0q9p",
5152 "actor": "syntaqx",
5153 "count": 1,
5154 "created_at": "2026-10-07T08:12:40.000Z",
5155 "updated_at": "2026-10-07T08:12:40.000Z",
5156 "read_at": null,
5157 "done_at": null,
5158 "saved": false,
5159 "snoozed_until": null
5160 }
5161 ],
5162 "next": "ntf_01kp7k9a8b7c6d5e4f3g2h1j0k"
5163 },
5164 "notes": "The same as `GET /notifications`, for one repository you can read."
5165 },
5166 "mark_notifications_read": {
5167 "request": {
5168 "last_read_at": "2026-10-07T10:00:00Z"
5169 },
5170 "response": {
5171 "marked": 12,
5172 "last_read_at": "2026-10-07T10:00:00.000Z"
5173 },
5174 "notes": "Threads with activity after `last_read_at` stay unread, so send the time you last listed them."
5175 },
5176 "mark_repo_notifications_read": {
5177 "params": {
5178 "owner": "flagon-io",
5179 "name": "hello"
5180 },
5181 "request": {},
5182 "response": {
5183 "marked": 3,
5184 "last_read_at": "2026-10-07T10:02:41.512Z"
5185 }
5186 },
5187 "get_notification_thread": {
5188 "params": {
5189 "id": "ntf_01kp7m2q3r4s5t6v7w8x9y0z1a"
5190 },
5191 "response": {
5192 "id": "ntf_01kp7m2q3r4s5t6v7w8x9y0z1a",
5193 "reason": "review_requested",
5194 "severity": "warning",
5195 "title": "ada asked you to review flagon-io/hello#14",
5196 "body": "Add a greeting to the README",
5197 "event": "pull.review_requested",
5198 "repo": "flagon-io/hello",
5199 "workspace": "flagon-io",
5200 "subject": "pull",
5201 "number": 14,
5202 "url": "/flagon-io/hello/pull/14",
5203 "actor": "ada",
5204 "count": 3,
5205 "created_at": "2026-10-06T15:02:11.000Z",
5206 "updated_at": "2026-10-07T09:41:30.000Z",
5207 "read_at": null,
5208 "done_at": null,
5209 "saved": false,
5210 "snoozed_until": null,
5211 "activity": [
5212 {
5213 "reason": "review_requested",
5214 "severity": "warning",
5215 "title": "ada asked you to review flagon-io/hello#14",
5216 "body": "Add a greeting to the README",
5217 "event": "pull.review_requested",
5218 "actor": "ada",
5219 "created_at": "2026-10-07T09:41:30.000Z"
5220 },
5221 {
5222 "reason": "comment",
5223 "severity": "info",
5224 "title": "ada commented on flagon-io/hello#14",
5225 "body": "Pushed the fix for the heading.",
5226 "event": "comment.created",
5227 "actor": "ada",
5228 "created_at": "2026-10-06T18:20:02.000Z"
5229 },
5230 {
5231 "reason": "comment",
5232 "severity": "info",
5233 "title": "g1t commented on flagon-io/hello#14",
5234 "body": "The heading level is off by one.",
5235 "event": "comment.created",
5236 "actor": "g1t",
5237 "created_at": "2026-10-06T15:02:11.000Z"
5238 }
5239 ],
5240 "subscription": {
5241 "subscribed": true,
5242 "ignored": false,
5243 "reason": "review_requested",
5244 "repo": "flagon-io/hello",
5245 "number": 14,
5246 "updated_at": null
5247 }
5248 },
5249 "notes": "`activity` keeps the last 10 things that happened on the thread, newest first; `count` is how many there have been. `subscription` is null for a workflow or a deployment, which nobody subscribes to."
5250 },
5251 "mark_thread_read": {
5252 "params": {
5253 "id": "ntf_01kp7m2q3r4s5t6v7w8x9y0z1a"
5254 },
5255 "request": {},
5256 "response": {
5257 "id": "ntf_01kp7m2q3r4s5t6v7w8x9y0z1a",
5258 "reason": "review_requested",
5259 "severity": "warning",
5260 "title": "ada asked you to review flagon-io/hello#14",
5261 "body": "Add a greeting to the README",
5262 "event": "pull.review_requested",
5263 "repo": "flagon-io/hello",
5264 "workspace": "flagon-io",
5265 "subject": "pull",
5266 "number": 14,
5267 "url": "/flagon-io/hello/pull/14",
5268 "actor": "ada",
5269 "count": 3,
5270 "created_at": "2026-10-06T15:02:11.000Z",
5271 "updated_at": "2026-10-07T09:41:30.000Z",
5272 "read_at": "2026-10-07T10:03:00.000Z",
5273 "done_at": null,
5274 "saved": false,
5275 "snoozed_until": null,
5276 "activity": [
5277 {
5278 "reason": "review_requested",
5279 "severity": "warning",
5280 "title": "ada asked you to review flagon-io/hello#14",
5281 "body": "Add a greeting to the README",
5282 "event": "pull.review_requested",
5283 "actor": "ada",
5284 "created_at": "2026-10-07T09:41:30.000Z"
5285 },
5286 {
5287 "reason": "comment",
5288 "severity": "info",
5289 "title": "ada commented on flagon-io/hello#14",
5290 "body": "Pushed the fix for the heading.",
5291 "event": "comment.created",
5292 "actor": "ada",
5293 "created_at": "2026-10-06T18:20:02.000Z"
5294 },
5295 {
5296 "reason": "comment",
5297 "severity": "info",
5298 "title": "g1t commented on flagon-io/hello#14",
5299 "body": "The heading level is off by one.",
5300 "event": "comment.created",
5301 "actor": "g1t",
5302 "created_at": "2026-10-06T15:02:11.000Z"
5303 }
5304 ],
5305 "subscription": {
5306 "subscribed": true,
5307 "ignored": false,
5308 "reason": "review_requested",
5309 "repo": "flagon-io/hello",
5310 "number": 14,
5311 "updated_at": null
5312 }
5313 }
5314 },
5315 "mark_thread_done": {
5316 "params": {
5317 "id": "ntf_01kp7m2q3r4s5t6v7w8x9y0z1a"
5318 },
5319 "response": {
5320 "id": "ntf_01kp7m2q3r4s5t6v7w8x9y0z1a",
5321 "reason": "review_requested",
5322 "severity": "warning",
5323 "title": "ada asked you to review flagon-io/hello#14",
5324 "body": "Add a greeting to the README",
5325 "event": "pull.review_requested",
5326 "repo": "flagon-io/hello",
5327 "workspace": "flagon-io",
5328 "subject": "pull",
5329 "number": 14,
5330 "url": "/flagon-io/hello/pull/14",
5331 "actor": "ada",
5332 "count": 3,
5333 "created_at": "2026-10-06T15:02:11.000Z",
5334 "updated_at": "2026-10-07T09:41:30.000Z",
5335 "read_at": "2026-10-07T10:03:00.000Z",
5336 "done_at": "2026-10-07T10:03:00.000Z",
5337 "saved": false,
5338 "snoozed_until": null,
5339 "activity": [
5340 {
5341 "reason": "review_requested",
5342 "severity": "warning",
5343 "title": "ada asked you to review flagon-io/hello#14",
5344 "body": "Add a greeting to the README",
5345 "event": "pull.review_requested",
5346 "actor": "ada",
5347 "created_at": "2026-10-07T09:41:30.000Z"
5348 },
5349 {
5350 "reason": "comment",
5351 "severity": "info",
5352 "title": "ada commented on flagon-io/hello#14",
5353 "body": "Pushed the fix for the heading.",
5354 "event": "comment.created",
5355 "actor": "ada",
5356 "created_at": "2026-10-06T18:20:02.000Z"
5357 },
5358 {
5359 "reason": "comment",
5360 "severity": "info",
5361 "title": "g1t commented on flagon-io/hello#14",
5362 "body": "The heading level is off by one.",
5363 "event": "comment.created",
5364 "actor": "g1t",
5365 "created_at": "2026-10-06T15:02:11.000Z"
5366 }
5367 ],
5368 "subscription": {
5369 "subscribed": true,
5370 "ignored": false,
5371 "reason": "review_requested",
5372 "repo": "flagon-io/hello",
5373 "number": 14,
5374 "updated_at": null
5375 }
5376 },
5377 "notes": "New activity on a done thread brings it back to the inbox, unread."
5378 },
5379 "save_thread": {
5380 "params": {
5381 "id": "ntf_01kp7m2q3r4s5t6v7w8x9y0z1a"
5382 },
5383 "request": {},
5384 "response": {
5385 "id": "ntf_01kp7m2q3r4s5t6v7w8x9y0z1a",
5386 "reason": "review_requested",
5387 "severity": "warning",
5388 "title": "ada asked you to review flagon-io/hello#14",
5389 "body": "Add a greeting to the README",
5390 "event": "pull.review_requested",
5391 "repo": "flagon-io/hello",
5392 "workspace": "flagon-io",
5393 "subject": "pull",
5394 "number": 14,
5395 "url": "/flagon-io/hello/pull/14",
5396 "actor": "ada",
5397 "count": 3,
5398 "created_at": "2026-10-06T15:02:11.000Z",
5399 "updated_at": "2026-10-07T09:41:30.000Z",
5400 "read_at": null,
5401 "done_at": null,
5402 "saved": true,
5403 "snoozed_until": null,
5404 "activity": [
5405 {
5406 "reason": "review_requested",
5407 "severity": "warning",
5408 "title": "ada asked you to review flagon-io/hello#14",
5409 "body": "Add a greeting to the README",
5410 "event": "pull.review_requested",
5411 "actor": "ada",
5412 "created_at": "2026-10-07T09:41:30.000Z"
5413 },
5414 {
5415 "reason": "comment",
5416 "severity": "info",
5417 "title": "ada commented on flagon-io/hello#14",
5418 "body": "Pushed the fix for the heading.",
5419 "event": "comment.created",
5420 "actor": "ada",
5421 "created_at": "2026-10-06T18:20:02.000Z"
5422 },
5423 {
5424 "reason": "comment",
5425 "severity": "info",
5426 "title": "g1t commented on flagon-io/hello#14",
5427 "body": "The heading level is off by one.",
5428 "event": "comment.created",
5429 "actor": "g1t",
5430 "created_at": "2026-10-06T15:02:11.000Z"
5431 }
5432 ],
5433 "subscription": {
5434 "subscribed": true,
5435 "ignored": false,
5436 "reason": "review_requested",
5437 "repo": "flagon-io/hello",
5438 "number": 14,
5439 "updated_at": null
5440 }
5441 }
5442 },
5443 "unsave_thread": {
5444 "params": {
5445 "id": "ntf_01kp7m2q3r4s5t6v7w8x9y0z1a"
5446 },
5447 "response": {
5448 "id": "ntf_01kp7m2q3r4s5t6v7w8x9y0z1a",
5449 "reason": "review_requested",
5450 "severity": "warning",
5451 "title": "ada asked you to review flagon-io/hello#14",
5452 "body": "Add a greeting to the README",
5453 "event": "pull.review_requested",
5454 "repo": "flagon-io/hello",
5455 "workspace": "flagon-io",
5456 "subject": "pull",
5457 "number": 14,
5458 "url": "/flagon-io/hello/pull/14",
5459 "actor": "ada",
5460 "count": 3,
5461 "created_at": "2026-10-06T15:02:11.000Z",
5462 "updated_at": "2026-10-07T09:41:30.000Z",
5463 "read_at": null,
5464 "done_at": null,
5465 "saved": false,
5466 "snoozed_until": null,
5467 "activity": [
5468 {
5469 "reason": "review_requested",
5470 "severity": "warning",
5471 "title": "ada asked you to review flagon-io/hello#14",
5472 "body": "Add a greeting to the README",
5473 "event": "pull.review_requested",
5474 "actor": "ada",
5475 "created_at": "2026-10-07T09:41:30.000Z"
5476 },
5477 {
5478 "reason": "comment",
5479 "severity": "info",
5480 "title": "ada commented on flagon-io/hello#14",
5481 "body": "Pushed the fix for the heading.",
5482 "event": "comment.created",
5483 "actor": "ada",
5484 "created_at": "2026-10-06T18:20:02.000Z"
5485 },
5486 {
5487 "reason": "comment",
5488 "severity": "info",
5489 "title": "g1t commented on flagon-io/hello#14",
5490 "body": "The heading level is off by one.",
5491 "event": "comment.created",
5492 "actor": "g1t",
5493 "created_at": "2026-10-06T15:02:11.000Z"
5494 }
5495 ],
5496 "subscription": {
5497 "subscribed": true,
5498 "ignored": false,
5499 "reason": "review_requested",
5500 "repo": "flagon-io/hello",
5501 "number": 14,
5502 "updated_at": null
5503 }
5504 }
5505 },
5506 "snooze_thread": {
5507 "params": {
5508 "id": "ntf_01kp7m2q3r4s5t6v7w8x9y0z1a"
5509 },
5510 "request": {
5511 "until": "2026-10-08T09:00:00Z"
5512 },
5513 "response": {
5514 "id": "ntf_01kp7m2q3r4s5t6v7w8x9y0z1a",
5515 "reason": "review_requested",
5516 "severity": "warning",
5517 "title": "ada asked you to review flagon-io/hello#14",
5518 "body": "Add a greeting to the README",
5519 "event": "pull.review_requested",
5520 "repo": "flagon-io/hello",
5521 "workspace": "flagon-io",
5522 "subject": "pull",
5523 "number": 14,
5524 "url": "/flagon-io/hello/pull/14",
5525 "actor": "ada",
5526 "count": 3,
5527 "created_at": "2026-10-06T15:02:11.000Z",
5528 "updated_at": "2026-10-07T09:41:30.000Z",
5529 "read_at": "2026-10-07T10:03:00.000Z",
5530 "done_at": null,
5531 "saved": false,
5532 "snoozed_until": "2026-10-08T09:00:00.000Z",
5533 "activity": [
5534 {
5535 "reason": "review_requested",
5536 "severity": "warning",
5537 "title": "ada asked you to review flagon-io/hello#14",
5538 "body": "Add a greeting to the README",
5539 "event": "pull.review_requested",
5540 "actor": "ada",
5541 "created_at": "2026-10-07T09:41:30.000Z"
5542 },
5543 {
5544 "reason": "comment",
5545 "severity": "info",
5546 "title": "ada commented on flagon-io/hello#14",
5547 "body": "Pushed the fix for the heading.",
5548 "event": "comment.created",
5549 "actor": "ada",
5550 "created_at": "2026-10-06T18:20:02.000Z"
5551 },
5552 {
5553 "reason": "comment",
5554 "severity": "info",
5555 "title": "g1t commented on flagon-io/hello#14",
5556 "body": "The heading level is off by one.",
5557 "event": "comment.created",
5558 "actor": "g1t",
5559 "created_at": "2026-10-06T15:02:11.000Z"
5560 }
5561 ],
5562 "subscription": {
5563 "subscribed": true,
5564 "ignored": false,
5565 "reason": "review_requested",
5566 "repo": "flagon-io/hello",
5567 "number": 14,
5568 "updated_at": null
5569 }
5570 }
5571 },
5572 "unsnooze_thread": {
5573 "params": {
5574 "id": "ntf_01kp7m2q3r4s5t6v7w8x9y0z1a"
5575 },
5576 "response": {
5577 "id": "ntf_01kp7m2q3r4s5t6v7w8x9y0z1a",
5578 "reason": "review_requested",
5579 "severity": "warning",
5580 "title": "ada asked you to review flagon-io/hello#14",
5581 "body": "Add a greeting to the README",
5582 "event": "pull.review_requested",
5583 "repo": "flagon-io/hello",
5584 "workspace": "flagon-io",
5585 "subject": "pull",
5586 "number": 14,
5587 "url": "/flagon-io/hello/pull/14",
5588 "actor": "ada",
5589 "count": 3,
5590 "created_at": "2026-10-06T15:02:11.000Z",
5591 "updated_at": "2026-10-07T09:41:30.000Z",
5592 "read_at": "2026-10-07T10:03:00.000Z",
5593 "done_at": null,
5594 "saved": false,
5595 "snoozed_until": null,
5596 "activity": [
5597 {
5598 "reason": "review_requested",
5599 "severity": "warning",
5600 "title": "ada asked you to review flagon-io/hello#14",
5601 "body": "Add a greeting to the README",
5602 "event": "pull.review_requested",
5603 "actor": "ada",
5604 "created_at": "2026-10-07T09:41:30.000Z"
5605 },
5606 {
5607 "reason": "comment",
5608 "severity": "info",
5609 "title": "ada commented on flagon-io/hello#14",
5610 "body": "Pushed the fix for the heading.",
5611 "event": "comment.created",
5612 "actor": "ada",
5613 "created_at": "2026-10-06T18:20:02.000Z"
5614 },
5615 {
5616 "reason": "comment",
5617 "severity": "info",
5618 "title": "g1t commented on flagon-io/hello#14",
5619 "body": "The heading level is off by one.",
5620 "event": "comment.created",
5621 "actor": "g1t",
5622 "created_at": "2026-10-06T15:02:11.000Z"
5623 }
5624 ],
5625 "subscription": {
5626 "subscribed": true,
5627 "ignored": false,
5628 "reason": "review_requested",
5629 "repo": "flagon-io/hello",
5630 "number": 14,
5631 "updated_at": null
5632 }
5633 }
5634 },
5635 "get_thread_subscription": {
5636 "params": {
5637 "id": "ntf_01kp7m2q3r4s5t6v7w8x9y0z1a"
5638 },
5639 "response": {
5640 "subscribed": true,
5641 "ignored": false,
5642 "reason": "review_requested",
5643 "repo": "flagon-io/hello",
5644 "number": 14,
5645 "updated_at": null
5646 }
5647 },
5648 "set_thread_subscription": {
5649 "params": {
5650 "id": "ntf_01kp7m2q3r4s5t6v7w8x9y0z1a"
5651 },
5652 "request": {
5653 "ignored": true
5654 },
5655 "response": {
5656 "subscribed": false,
5657 "ignored": true,
5658 "reason": null,
5659 "repo": "flagon-io/hello",
5660 "number": 14,
5661 "updated_at": "2026-10-07T10:04:00.000Z"
5662 },
5663 "notes": "| Body | Then |\n| --- | --- |\n| `{}` or `{\"subscribed\": true}` | You hear of what happens on it |\n| `{\"subscribed\": false}` | You hear only of what is asked of you |\n| `{\"ignored\": true}` | You hear of nothing on it, not even a mention |"
5664 },
5665 "delete_thread_subscription": {
5666 "params": {
5667 "id": "ntf_01kp7m2q3r4s5t6v7w8x9y0z1a"
5668 },
5669 "response": {
5670 "subscribed": false,
5671 "ignored": false,
5672 "reason": null,
5673 "repo": "flagon-io/hello",
5674 "number": 14,
5675 "updated_at": "2026-10-07T10:04:00.000Z"
5676 }
5677 },
5678 "get_issue_subscription": {
5679 "params": {
5680 "owner": "flagon-io",
5681 "name": "hello",
5682 "number": 14
5683 },
5684 "response": {
5685 "subscribed": true,
5686 "ignored": false,
5687 "reason": "author",
5688 "repo": null,
5689 "number": 14,
5690 "updated_at": null
5691 }
5692 },
5693 "set_issue_subscription": {
5694 "params": {
5695 "owner": "flagon-io",
5696 "name": "hello",
5697 "number": 14
5698 },
5699 "request": {
5700 "subscribed": true
5701 },
5702 "response": {
5703 "subscribed": true,
5704 "ignored": false,
5705 "reason": "manual",
5706 "repo": null,
5707 "number": 14,
5708 "updated_at": "2026-10-07T10:05:00.000Z"
5709 }
5710 },
5711 "delete_issue_subscription": {
5712 "params": {
5713 "owner": "flagon-io",
5714 "name": "hello",
5715 "number": 14
5716 },
5717 "response": {
5718 "subscribed": false,
5719 "ignored": false,
5720 "reason": null,
5721 "repo": null,
5722 "number": 14,
5723 "updated_at": "2026-10-07T10:05:30.000Z"
5724 }
5725 },
5726 "get_repo_subscription": {
5727 "params": {
5728 "owner": "flagon-io",
5729 "name": "hello"
5730 },
5731 "response": {
5732 "repo": "flagon-io/hello",
5733 "level": "participating",
5734 "events": [],
5735 "subscribed": false,
5736 "ignored": false,
5737 "updated_at": null
5738 }
5739 },
5740 "set_repo_subscription": {
5741 "params": {
5742 "owner": "flagon-io",
5743 "name": "hello"
5744 },
5745 "request": {
5746 "level": "custom",
5747 "events": [
5748 "pulls",
5749 "deployments"
5750 ]
5751 },
5752 "response": {
5753 "repo": "flagon-io/hello",
5754 "level": "custom",
5755 "events": [
5756 "pulls",
5757 "deployments"
5758 ],
5759 "subscribed": true,
5760 "ignored": false,
5761 "updated_at": "2026-10-07T10:06:00.000Z"
5762 },
5763 "notes": "| `level` | You hear of |\n| --- | --- |\n| `participating` | What you take part in, or are mentioned in (the default) |\n| `all` | Every issue and pull request opened, commented on, closed or merged, and every deployment |\n| `custom` | What you take part in, and the kinds in `events`: `issues`, `pulls`, `deployments`, `security` |\n| `ignore` | Nothing, not even a mention |\n\nInstead of `level`, `{\"subscribed\": true}` is `all`, `{\"subscribed\": false}` is `participating` and `{\"ignored\": true}` is `ignore`."
5764 },
5765 "delete_repo_subscription": {
5766 "params": {
5767 "owner": "flagon-io",
5768 "name": "hello"
5769 },
5770 "response": {
5771 "repo": "flagon-io/hello",
5772 "level": "participating",
5773 "events": [],
5774 "subscribed": false,
5775 "ignored": false,
5776 "updated_at": null
5777 }
5778 },
5779 "list_watched_repos": {
5780 "response": [
5781 {
5782 "repo": "flagon-io/hello",
5783 "level": "all",
5784 "events": [],
5785 "subscribed": true,
5786 "ignored": false,
5787 "updated_at": "2026-10-07T10:00:00.000Z"
5788 },
5789 {
5790 "repo": "flagon-io/docs",
5791 "level": "ignore",
5792 "events": [],
5793 "subscribed": false,
5794 "ignored": true,
5795 "updated_at": "2026-10-05T14:30:00.000Z"
5796 }
5797 ]
5798 },
5799 "get_usage": {
5800 "params": {
5801 "workspace": "flagon-io"
5802 },
5803 "query": {
5804 "from": "2026-10-01",
5805 "until": "2026-10-07",
5806 "group_by": "project"
5807 },
5808 "response": {
5809 "from": "2026-10-01",
5810 "until": "2026-10-07",
5811 "totals": {
5812 "price_micros": 48210000,
5813 "discount_micros": 0,
5814 "included_micros": 20000000,
5815 "credits_micros": 18000000,
5816 "charged_micros": 10210000,
5817 "pending_micros": 1340000,
5818 "cost_micros": 40100000
5819 },
5820 "days": [
5821 {
5822 "day": "2026-10-06",
5823 "product": "agent",
5824 "micros": 12400000
5825 },
5826 {
5827 "day": "2026-10-06",
5828 "product": "sandboxes",
5829 "micros": 2100000
5830 },
5831 {
5832 "day": "2026-10-07",
5833 "product": "agent",
5834 "micros": 9800000
5835 }
5836 ],
5837 "products": [
5838 {
5839 "key": "agent",
5840 "label": "Agent",
5841 "micros": 41000000,
5842 "meters": [
5843 {
5844 "key": "agent_models",
5845 "label": "Models",
5846 "product": "agent",
5847 "unit": "tokens",
5848 "quantity": 9120000,
5849 "micros": 41000000,
5850 "pending_micros": 0,
5851 "daily": [
5852 3100000,
5853 5200000,
5854 4400000,
5855 6000000,
5856 0,
5857 12400000,
5858 9800000
5859 ],
5860 "allowance": null,
5861 "by_project": [
5862 {
5863 "project": "flagon-io/g1t",
5864 "micros": 36000000,
5865 "quantity": 8010000
5866 },
5867 {
5868 "project": "flagon-io/hello",
5869 "micros": 5000000,
5870 "quantity": 1110000
5871 }
5872 ]
5873 }
5874 ],
5875 "features": [
5876 {
5877 "key": "runs",
5878 "label": "Runs",
5879 "micros": 33000000,
5880 "count": 14
5881 },
5882 {
5883 "key": "reviews",
5884 "label": "Reviews",
5885 "micros": 8000000,
5886 "count": 9
5887 }
5888 ]
5889 },
5890 {
5891 "key": "sandboxes",
5892 "label": "Sandboxes",
5893 "micros": 7210000,
5894 "meters": [
5895 {
5896 "key": "sandbox",
5897 "label": "Sandbox time",
5898 "product": "sandboxes",
5899 "unit": "seconds",
5900 "quantity": 41300,
5901 "micros": 7210000,
5902 "pending_micros": 0,
5903 "daily": [
5904 900000,
5905 1200000,
5906 800000,
5907 1100000,
5908 0,
5909 2100000,
5910 1110000
5911 ],
5912 "allowance": {
5913 "used": 41300,
5914 "of": 108000,
5915 "unit": "seconds"
5916 },
5917 "by_project": [
5918 {
5919 "project": "flagon-io/g1t",
5920 "micros": 7210000,
5921 "quantity": 41300
5922 }
5923 ]
5924 }
5925 ],
5926 "features": []
5927 }
5928 ],
5929 "projects": [
5930 "flagon-io/g1t",
5931 "flagon-io/hello"
5932 ],
5933 "models": [
5934 {
5935 "model": "claude-sonnet-5-5",
5936 "input": 310000,
5937 "output": 420000,
5938 "cache_read": 7800000,
5939 "cache_write": 590000
5940 }
5941 ],
5942 "included": {
5943 "used": 20,
5944 "of": 20,
5945 "unit": "dollars"
5946 },
5947 "discount_percent": null,
5948 "ai_credit_micros": 62000000,
5949 "credit_micros": 0,
5950 "trial_micros": null,
5951 "plan": "pro",
5952 "free": false,
5953 "group_by": "project",
5954 "groups": [
5955 {
5956 "key": "flagon-io/g1t",
5957 "micros": 43210000
5958 },
5959 {
5960 "key": "flagon-io/hello",
5961 "micros": 5000000
5962 }
5963 ]
5964 },
5965 "notes": "Every product family is listed, in order, even with nothing used; this example shows two. `daily` has one amount for each day of the range, oldest first. `projects` and `products` take several values separated by commas: `?products=agent,sandboxes`. A range of more than 400 days, or one that ends before it starts, is refused with `invalid`."
5966 },
5967 "get_budget": {
5968 "params": {
5969 "workspace": "flagon-io"
5970 },
5971 "response": {
5972 "workspace": "flagon-io",
5973 "amount_micros": 500000000,
5974 "automatic": false,
5975 "spent_micros": 132450000,
5976 "max_amount_micros": 2000000000,
5977 "alerts": [
5978 50,
5979 75,
5980 90,
5981 100
5982 ],
5983 "pause_at_limit": true,
5984 "webhook": "https://ops.example.com/g1t/budget",
5985 "state": "ok",
5986 "message": null
5987 },
5988 "notes": "All amounts are whole millionths of a dollar: 500000000 is $500. `max_amount_micros` is null for g1t's own workspaces, which have no ceiling. When `state` is `stopped`, new sandboxes, builds and app requests wait until the limit is raised or the month closes."
5989 },
5990 "set_budget": {
5991 "params": {
5992 "workspace": "flagon-io"
5993 },
5994 "request": {
5995 "amount_micros": 500000000,
5996 "alerts": [
5997 50,
5998 75,
5999 90,
6000 100
6001 ],
6002 "webhook": "https://ops.example.com/g1t/budget"
6003 },
6004 "response": {
6005 "workspace": "flagon-io",
6006 "amount_micros": 500000000,
6007 "automatic": false,
6008 "spent_micros": 132450000,
6009 "max_amount_micros": 2000000000,
6010 "alerts": [
6011 50,
6012 75,
6013 90,
6014 100
6015 ],
6016 "pause_at_limit": true,
6017 "webhook": "https://ops.example.com/g1t/budget",
6018 "state": "ok",
6019 "message": null
6020 },
6021 "notes": "Fields left out keep their value. A limit above `max_amount_micros` is refused with `invalid`. Called by anyone but an owner signed in as a person, or by a workspace's own token or one of g1t's agents, it is refused with `forbidden`. Each alert is sent once a month, to the owners by email and, with `webhook`, as a JSON POST."
6022 },
6023 "get_ai_credit": {
6024 "params": {
6025 "workspace": "flagon-io"
6026 },
6027 "response": {
6028 "balance_micros": 62000000,
6029 "purchased_micros": 50000000,
6030 "given_micros": 12000000,
6031 "grants": [
6032 {
6033 "id": "crd_01kkr2m4c8f1t7qh3d6n9w5p0x",
6034 "workspace": "flagon-io",
6035 "kind": "purchase",
6036 "amount_micros": 50000000,
6037 "used_micros": 0,
6038 "left_micros": 50000000,
6039 "note": "AI credit bought",
6040 "refund_for": null,
6041 "refund_day": null,
6042 "expires_at": "2027-10-02T00:00:00.000Z",
6043 "created_by": "ana",
6044 "created_at": "2026-10-02T16:20:00.000Z",
6045 "state": "open",
6046 "closed_at": null,
6047 "closed_note": null,
6048 "closed_by": null
6049 }
6050 ],
6051 "free_via_discount": false,
6052 "postpaid": false,
6053 "blocked": false,
6054 "can_buy": true,
6055 "presets_cents": [
6056 2500,
6057 5000,
6058 10000,
6059 25000
6060 ],
6061 "min_cents": 1000,
6062 "max_cents": 100000,
6063 "card_fee": {
6064 "on": true,
6065 "percent_micros": 29000,
6066 "fixed_cents": 30
6067 },
6068 "reload": {
6069 "enabled": false,
6070 "threshold_micros": 10000000,
6071 "target_micros": 50000000,
6072 "monthly_max_micros": 200000000,
6073 "reloaded_micros": 0,
6074 "failed_at": null,
6075 "error": null
6076 },
6077 "agent_rate_micros": 3.6,
6078 "model_markup_percent": 10,
6079 "gateway_markup_percent": 5,
6080 "upgrade_credit_micros": 10000000,
6081 "expires_days": 365
6082 },
6083 "notes": "`card_fee.percent_micros` is per dollar charged, in millionths: 29000 is 2.9%. `blocked` is true when the credit has run out and new runs on g1t's models wait for more; runs on a model provider the workspace connected itself never need it."
6084 },
6085 "buy_ai_credit": {
6086 "params": {
6087 "workspace": "flagon-io"
6088 },
6089 "request": {
6090 "amount_cents": 5000
6091 },
6092 "response": {
6093 "url": "https://checkout.example.com/c/pay/cs_test_a1b2c3"
6094 },
6095 "notes": "Open `url` in a browser to pay. Nothing is charged until the payment is made there; the credit then shows in get_ai_credit. An amount outside `min_cents` to `max_cents`, or not in whole dollars, is refused with `invalid`; a workspace that cannot buy credit (see `can_buy`) gets `conflict` or `payment_required`."
6096 },
6097 "list_gateway_requests": {
6098 "params": {
6099 "workspace": "flagon-io"
6100 },
6101 "query": {
6102 "limit": 3
6103 },
6104 "response": {
6105 "requests": [
6106 {
6107 "id": "gw_5f0c2a9e7b1d4c3a8e6f0b12",
6108 "created_at": "2026-10-07T14:02:11.000Z",
6109 "model": "claude-sonnet-5-5",
6110 "token_id": "tok_01kkr4w7d2c9e5f8h1j3m6n0p2",
6111 "token_name": "release-notes",
6112 "input": 1840,
6113 "output": 512,
6114 "cache_read": 12000,
6115 "cache_write": 0,
6116 "cache_write_hour": 0,
6117 "cost_micros": 10000,
6118 "charged_micros": 10000,
6119 "status": 200,
6120 "own_key": false,
6121 "format": "anthropic",
6122 "provider": "anthropic",
6123 "connection": null,
6124 "streamed": true,
6125 "duration_ms": 4210,
6126 "error": null
6127 },
6128 {
6129 "id": "gw_9b3d1f7a5c2e4b6d8f0a1c33",
6130 "created_at": "2026-10-07T14:00:02.000Z",
6131 "model": "qwen3-coder:30b",
6132 "token_id": "tok_01kkr5a2b8c4d6e0f3g5h7j9k1",
6133 "token_name": "triage-bot",
6134 "input": 2210,
6135 "output": 96,
6136 "cache_read": 0,
6137 "cache_write": 0,
6138 "cache_write_hour": 0,
6139 "cost_micros": 0,
6140 "charged_micros": 0,
6141 "status": 200,
6142 "own_key": true,
6143 "format": "openai",
6144 "provider": "openai_endpoint",
6145 "connection": "Office GPU",
6146 "streamed": false,
6147 "duration_ms": 1830,
6148 "error": null
6149 },
6150 {
6151 "id": "gw_1a7e3c5b9d2f4e6a8c0b2d41",
6152 "created_at": "2026-10-07T13:58:40.000Z",
6153 "model": "claude-opus-5-5",
6154 "token_id": "tok_01kkr4w7d2c9e5f8h1j3m6n0p2",
6155 "token_name": "release-notes",
6156 "input": 0,
6157 "output": 0,
6158 "cache_read": 0,
6159 "cache_write": 0,
6160 "cache_write_hour": 0,
6161 "cost_micros": 0,
6162 "charged_micros": 0,
6163 "status": 402,
6164 "own_key": false,
6165 "format": "openai",
6166 "provider": "",
6167 "connection": null,
6168 "streamed": false,
6169 "duration_ms": 38,
6170 "error": "The flagon-io workspace is out of AI credit and has used this month's included usage, so the AI Gateway refuses requests to g1t's models. An owner can buy AI credit or turn on auto-reload at /flagon-io/-/billing#ai-credit."
6171 }
6172 ],
6173 "next": "gw_1a7e3c5b9d2f4e6a8c0b2d41",
6174 "retention_days": 30
6175 },
6176 "notes": "To send requests, see the AI Gateway guide: POST https://models.g1t.sh/anthropic/v1/messages (Anthropic's format) or https://models.g1t.sh/openai/v1/chat/completions (OpenAI's) with a workspace access token that has `models:write`. `format` is the format a request was sent in; `provider` who served it (`anthropic` or `workers-ai` on g1t's account, the connection's provider on the workspace's own, empty when it was refused before reaching one), and `connection` the workspace's own connection by name. `cache_write_hour` is the part of `cache_write` written to the hour-long cache. `charged_micros` is what the request was charged before included usage and AI credit paid for it; the payment itself is on the statement as AI Gateway. Pass `next` as `before` for the next page; it is null on the last."
6177 },
6178 "list_invoices": {
6179 "params": {
6180 "workspace": "flagon-io"
6181 },
6182 "response": {
6183 "invoices": [
6184 {
6185 "id": "in_1Q2w3E4r5T6y7U8i",
6186 "number": "FLAGON-0004",
6187 "status": "paid",
6188 "total_cents": 4210,
6189 "currency": "usd",
6190 "created_at": "2026-10-01T00:05:00.000Z",
6191 "description": "Usage for 2026-09",
6192 "hosted_url": "https://invoice.example.com/i/acct_1/in_1Q2w3E4r5T6y7U8i",
6193 "pdf_url": "https://invoice.example.com/i/acct_1/in_1Q2w3E4r5T6y7U8i/pdf"
6194 }
6195 ],
6196 "usage_invoices": [
6197 {
6198 "id": "inv_01kkqz8d3c6f9t2wq5n8h1m4r7",
6199 "workspace": "flagon-io",
6200 "reason": "month",
6201 "period": "2026-09",
6202 "amount_micros": 42100000,
6203 "status": "paid",
6204 "hosted_url": "https://invoice.example.com/i/acct_1/in_1Q2w3E4r5T6y7U8i",
6205 "pdf_url": "https://invoice.example.com/i/acct_1/in_1Q2w3E4r5T6y7U8i/pdf",
6206 "lines": [
6207 {
6208 "description": "Agent: models",
6209 "amount_micros": 35900000
6210 },
6211 {
6212 "description": "Sandbox time",
6213 "amount_micros": 6200000
6214 }
6215 ],
6216 "created_at": "2026-10-01T00:05:00.000Z"
6217 },
6218 {
6219 "id": "inv_01kkqz8d3c6f9t2wq5n8h1m4r7",
6220 "workspace": "flagon-io",
6221 "reason": "month",
6222 "period": "2026-09",
6223 "amount_micros": 42100000,
6224 "status": "paid",
6225 "hosted_url": "https://invoice.example.com/i/acct_1/in_1Q2w3E4r5T6y7U8i",
6226 "pdf_url": "https://invoice.example.com/i/acct_1/in_1Q2w3E4r5T6y7U8i/pdf",
6227 "lines": [
6228 {
6229 "description": "Agent: models",
6230 "amount_micros": 35900000
6231 },
6232 {
6233 "description": "Sandbox time",
6234 "amount_micros": 6200000
6235 }
6236 ],
6237 "created_at": "2026-10-01T00:05:00.000Z",
6238 "fee_micros": 1600000,
6239 "tax_micros": 3510000
6240 }
6241 ],
6242 "upcoming": {
6243 "closes_at": "2026-11-01T00:00:00.000Z",
6244 "subscriptions_micros": 20000000,
6245 "usage_micros": 10210000,
6246 "total_micros": 30210000
6247 },
6248 "unavailable": null
6249 },
6250 "notes": "`invoices` are in cents (`total_cents`); `usage_invoices` and `upcoming` in millionths of a dollar. A usage invoice's `reason` is `month` (the month closed) or `threshold` (charged near the limit), and its `status` `paid`, `open`, `failed` or `void`. An invoice's `status` is `paid`, `open`, `void`, `uncollectible` or `draft`."
6251 },
6252 "get_billing_details": {
6253 "params": {
6254 "workspace": "flagon-io"
6255 },
6256 "response": {
6257 "customer": true,
6258 "email": "billing@flagon.example.com",
6259 "name": "Flagon, Inc.",
6260 "address": {
6261 "line1": "100 Market Street",
6262 "line2": "",
6263 "city": "San Francisco",
6264 "state": "CA",
6265 "postal_code": "94105",
6266 "country": "US"
6267 },
6268 "tax_id_type": "us_ein",
6269 "tax_id": "12-3456789",
6270 "po_number": null,
6271 "language": "en",
6272 "payment_method": {
6273 "kind": "card",
6274 "brand": "visa",
6275 "last4": "4242",
6276 "exp_month": 12,
6277 "exp_year": 2028
6278 },
6279 "tax_location": true,
6280 "tax_address_needed_at": null,
6281 "tax_id_status": "unavailable",
6282 "tax_exempt": "none"
6283 },
6284 "notes": "Owners change these on the workspace's billing page. `payment_method` is null until a card or other way to pay is saved. Tax is worked out from the address: `tax_location` is false until it has at least a country (and in the US a ZIP code), and `tax_address_needed_at` is set while a charge waits for one."
6285 },
6286 "list_pinned_projects": {
6287 "params": {
6288 "workspace": "flagon-io"
6289 },
6290 "response": [
6291 {
6292 "position": 0,
6293 "id": "prj_01kkp3m8w2f6t9qh4c7d1r5n0x",
6294 "workspace": "flagon-io",
6295 "slug": "g1t",
6296 "name": "g1t",
6297 "description": null,
6298 "private": false,
6299 "archived": false,
6300 "kind": "app",
6301 "url": "https://g1t.sh/flagon-io/g1t",
6302 "pushed_at": "2026-10-07T10:00:00.000Z",
6303 "updated_at": "2026-10-01T09:12:00.000Z"
6304 },
6305 {
6306 "position": 1,
6307 "id": "prj_01kkq0c4d9h2w7rn5f8t3k6p2z",
6308 "workspace": "flagon-io",
6309 "slug": "lab-api",
6310 "name": "lab-api",
6311 "description": null,
6312 "private": true,
6313 "archived": false,
6314 "kind": "app",
6315 "url": "https://g1t.sh/flagon-io/lab-api",
6316 "pushed_at": "2026-10-06T18:40:00.000Z",
6317 "updated_at": "2026-10-01T09:12:00.000Z"
6318 },
6319 {
6320 "position": 2,
6321 "id": "prj_01kkp3n2a7e5v8sk3b6g9j4m1y",
6322 "workspace": "flagon-io",
6323 "slug": "hello",
6324 "name": "hello",
6325 "description": "Greets people from the command line.",
6326 "private": false,
6327 "archived": false,
6328 "kind": "library",
6329 "url": "https://g1t.sh/flagon-io/hello",
6330 "pushed_at": null,
6331 "updated_at": "2026-10-01T09:12:00.000Z"
6332 }
6333 ],
6334 "notes": "In your order: `position` 0 first. The sidebar shows these, then the projects you opened last. `pushed_at` is null until the project's repository is pushed to."
6335 },
6336 "pin_project": {
6337 "params": {
6338 "workspace": "flagon-io",
6339 "project": "hello"
6340 },
6341 "request": {
6342 "position": 0
6343 },
6344 "response": [
6345 {
6346 "position": 0,
6347 "id": "prj_01kkp3n2a7e5v8sk3b6g9j4m1y",
6348 "workspace": "flagon-io",
6349 "slug": "hello",
6350 "name": "hello",
6351 "description": "Greets people from the command line.",
6352 "private": false,
6353 "archived": false,
6354 "kind": "library",
6355 "url": "https://g1t.sh/flagon-io/hello",
6356 "pushed_at": null,
6357 "updated_at": "2026-10-01T09:12:00.000Z"
6358 },
6359 {
6360 "position": 1,
6361 "id": "prj_01kkp3m8w2f6t9qh4c7d1r5n0x",
6362 "workspace": "flagon-io",
6363 "slug": "g1t",
6364 "name": "g1t",
6365 "description": null,
6366 "private": false,
6367 "archived": false,
6368 "kind": "app",
6369 "url": "https://g1t.sh/flagon-io/g1t",
6370 "pushed_at": "2026-10-07T10:00:00.000Z",
6371 "updated_at": "2026-10-01T09:12:00.000Z"
6372 },
6373 {
6374 "position": 2,
6375 "id": "prj_01kkq0c4d9h2w7rn5f8t3k6p2z",
6376 "workspace": "flagon-io",
6377 "slug": "lab-api",
6378 "name": "lab-api",
6379 "description": null,
6380 "private": true,
6381 "archived": false,
6382 "kind": "app",
6383 "url": "https://g1t.sh/flagon-io/lab-api",
6384 "pushed_at": "2026-10-06T18:40:00.000Z",
6385 "updated_at": "2026-10-01T09:12:00.000Z"
6386 }
6387 ],
6388 "notes": "A ninth pin in a workspace is refused with `409 conflict`: unpin one first."
6389 },
6390 "unpin_project": {
6391 "params": {
6392 "workspace": "flagon-io",
6393 "project": "lab-api"
6394 },
6395 "response": [
6396 {
6397 "position": 0,
6398 "id": "prj_01kkp3m8w2f6t9qh4c7d1r5n0x",
6399 "workspace": "flagon-io",
6400 "slug": "g1t",
6401 "name": "g1t",
6402 "description": null,
6403 "private": false,
6404 "archived": false,
6405 "kind": "app",
6406 "url": "https://g1t.sh/flagon-io/g1t",
6407 "pushed_at": "2026-10-07T10:00:00.000Z",
6408 "updated_at": "2026-10-01T09:12:00.000Z"
6409 },
6410 {
6411 "position": 1,
6412 "id": "prj_01kkp3n2a7e5v8sk3b6g9j4m1y",
6413 "workspace": "flagon-io",
6414 "slug": "hello",
6415 "name": "hello",
6416 "description": "Greets people from the command line.",
6417 "private": false,
6418 "archived": false,
6419 "kind": "library",
6420 "url": "https://g1t.sh/flagon-io/hello",
6421 "pushed_at": null,
6422 "updated_at": "2026-10-01T09:12:00.000Z"
6423 }
6424 ]
6425 },
6426 "reorder_pinned_projects": {
6427 "params": {
6428 "workspace": "flagon-io"
6429 },
6430 "request": {
6431 "projects": [
6432 "lab-api",
6433 "g1t",
6434 "hello"
6435 ]
6436 },
6437 "response": [
6438 {
6439 "position": 0,
6440 "id": "prj_01kkq0c4d9h2w7rn5f8t3k6p2z",
6441 "workspace": "flagon-io",
6442 "slug": "lab-api",
6443 "name": "lab-api",
6444 "description": null,
6445 "private": true,
6446 "archived": false,
6447 "kind": "app",
6448 "url": "https://g1t.sh/flagon-io/lab-api",
6449 "pushed_at": "2026-10-06T18:40:00.000Z",
6450 "updated_at": "2026-10-01T09:12:00.000Z"
6451 },
6452 {
6453 "position": 1,
6454 "id": "prj_01kkp3m8w2f6t9qh4c7d1r5n0x",
6455 "workspace": "flagon-io",
6456 "slug": "g1t",
6457 "name": "g1t",
6458 "description": null,
6459 "private": false,
6460 "archived": false,
6461 "kind": "app",
6462 "url": "https://g1t.sh/flagon-io/g1t",
6463 "pushed_at": "2026-10-07T10:00:00.000Z",
6464 "updated_at": "2026-10-01T09:12:00.000Z"
6465 },
6466 {
6467 "position": 2,
6468 "id": "prj_01kkp3n2a7e5v8sk3b6g9j4m1y",
6469 "workspace": "flagon-io",
6470 "slug": "hello",
6471 "name": "hello",
6472 "description": "Greets people from the command line.",
6473 "private": false,
6474 "archived": false,
6475 "kind": "library",
6476 "url": "https://g1t.sh/flagon-io/hello",
6477 "pushed_at": null,
6478 "updated_at": "2026-10-01T09:12:00.000Z"
6479 }
6480 ],
6481 "notes": "Name every pinned project once; anything else is refused with `422 invalid`."
6482 },
6483 "list_projects": {
6484 "params": {
6485 "workspace": "flagon-io"
6486 },
6487 "response": [
6488 {
6489 "id": "prj_01kkp3m8w2f6t9qh4c7d1r5n0x",
6490 "workspace": "flagon-io",
6491 "slug": "g1t",
6492 "name": "g1t",
6493 "description": "Git hosting where people and agents work together.",
6494 "description_inherited": true,
6495 "url": "https://g1t.sh/flagon-io/g1t",
6496 "repository": "flagon-io/g1t",
6497 "root_dir": "",
6498 "default_branch": "main",
6499 "private": false,
6500 "archived": false,
6501 "primary": true,
6502 "kind": "app",
6503 "kind_reason": {
6504 "by": "set",
6505 "detail": "Set to an app that runs elsewhere."
6506 },
6507 "runs": "elsewhere",
6508 "production_url": "https://g1t.sh",
6509 "setting": {
6510 "kind": "app",
6511 "runs": "elsewhere"
6512 },
6513 "detected": {
6514 "kind": "app",
6515 "reason": {
6516 "by": "files",
6517 "detail": "wrangler.jsonc at its root makes it an app."
6518 }
6519 },
6520 "ecosystem": null,
6521 "links": {
6522 "homepage": "https://g1t.sh",
6523 "homepage_inherited": true,
6524 "docs": "https://docs.g1t.sh",
6525 "custom": [
6526 {
6527 "label": "Status",
6528 "url": "https://status.g1t.sh"
6529 }
6530 ]
6531 },
6532 "created_at": "2026-09-01T10:00:00.000Z",
6533 "updated_at": "2026-10-07T11:20:00.000Z",
6534 "pushed_at": "2026-10-07T10:00:00.000Z"
6535 },
6536 {
6537 "id": "prj_01kkp3n2a7e5v8sk3b6g9j4m1y",
6538 "workspace": "flagon-io",
6539 "slug": "hello",
6540 "name": "hello",
6541 "description": "Greets people from the command line.",
6542 "description_inherited": false,
6543 "url": "https://g1t.sh/flagon-io/hello",
6544 "repository": "flagon-io/hello",
6545 "root_dir": "",
6546 "default_branch": "main",
6547 "private": false,
6548 "archived": false,
6549 "primary": true,
6550 "kind": "library",
6551 "kind_reason": {
6552 "by": "files",
6553 "detail": "composer.json says it is a library."
6554 },
6555 "runs": null,
6556 "production_url": null,
6557 "setting": {
6558 "kind": null,
6559 "runs": null
6560 },
6561 "detected": {
6562 "kind": "library",
6563 "reason": {
6564 "by": "files",
6565 "detail": "composer.json says it is a library."
6566 }
6567 },
6568 "ecosystem": "composer",
6569 "links": {
6570 "homepage": null,
6571 "homepage_inherited": false,
6572 "docs": null,
6573 "custom": []
6574 },
6575 "created_at": "2026-09-12T14:30:00.000Z",
6576 "updated_at": "2026-10-01T09:12:00.000Z",
6577 "pushed_at": null
6578 }
6579 ],
6580 "notes": "By name. Projects whose repository you cannot see are left out; without a token you see public ones only. `kind` is what the project is, from `setting` where a person set it and from detection otherwise (`detected`, shown beside it); `kind_reason` says why. `runs` is null for what is not deployed. `homepage_inherited` is true while the homepage is its repository's website. `pushed_at` is null until its repository is pushed to. See [Projects](/guides/projects/)."
6581 },
6582 "get_project": {
6583 "params": {
6584 "workspace": "flagon-io",
6585 "project": "g1t"
6586 },
6587 "response": {
6588 "id": "prj_01kkp3m8w2f6t9qh4c7d1r5n0x",
6589 "workspace": "flagon-io",
6590 "slug": "g1t",
6591 "name": "g1t",
6592 "description": "Git hosting where people and agents work together.",
6593 "description_inherited": true,
6594 "url": "https://g1t.sh/flagon-io/g1t",
6595 "repository": "flagon-io/g1t",
6596 "root_dir": "",
6597 "default_branch": "main",
6598 "private": false,
6599 "archived": false,
6600 "primary": true,
6601 "kind": "app",
6602 "kind_reason": {
6603 "by": "set",
6604 "detail": "Set to an app that runs elsewhere."
6605 },
6606 "runs": "elsewhere",
6607 "production_url": "https://g1t.sh",
6608 "setting": {
6609 "kind": "app",
6610 "runs": "elsewhere"
6611 },
6612 "detected": {
6613 "kind": "app",
6614 "reason": {
6615 "by": "files",
6616 "detail": "wrangler.jsonc at its root makes it an app."
6617 }
6618 },
6619 "ecosystem": null,
6620 "links": {
6621 "homepage": "https://g1t.sh",
6622 "homepage_inherited": true,
6623 "docs": "https://docs.g1t.sh",
6624 "custom": [
6625 {
6626 "label": "Status",
6627 "url": "https://status.g1t.sh"
6628 }
6629 ]
6630 },
6631 "created_at": "2026-09-01T10:00:00.000Z",
6632 "updated_at": "2026-10-07T11:20:00.000Z",
6633 "pushed_at": "2026-10-07T10:00:00.000Z"
6634 },
6635 "notes": "`404` for a project that does not exist or whose repository you cannot see. `setting` holds what a person set, each part null while it is left to detection. `ecosystem` is where a library's files say it is published (`composer`, `npm`, `cargo`, `go` or `python`), or null. See [What a project is](/guides/projects/#what-a-project-is)."
6636 },
6637 "update_project": {
6638 "params": {
6639 "workspace": "flagon-io",
6640 "project": "g1t"
6641 },
6642 "request": {
6643 "kind": "app",
6644 "runs": "elsewhere",
6645 "production_url": "https://g1t.sh",
6646 "docs_url": "https://docs.g1t.sh",
6647 "links": [
6648 {
6649 "label": "Status",
6650 "url": "https://status.g1t.sh"
6651 }
6652 ]
6653 },
6654 "response": {
6655 "id": "prj_01kkp3m8w2f6t9qh4c7d1r5n0x",
6656 "workspace": "flagon-io",
6657 "slug": "g1t",
6658 "name": "g1t",
6659 "description": "Git hosting where people and agents work together.",
6660 "description_inherited": true,
6661 "url": "https://g1t.sh/flagon-io/g1t",
6662 "repository": "flagon-io/g1t",
6663 "root_dir": "",
6664 "default_branch": "main",
6665 "private": false,
6666 "archived": false,
6667 "primary": true,
6668 "kind": "app",
6669 "kind_reason": {
6670 "by": "set",
6671 "detail": "Set to an app that runs elsewhere."
6672 },
6673 "runs": "elsewhere",
6674 "production_url": "https://g1t.sh",
6675 "setting": {
6676 "kind": "app",
6677 "runs": "elsewhere"
6678 },
6679 "detected": {
6680 "kind": "app",
6681 "reason": {
6682 "by": "files",
6683 "detail": "wrangler.jsonc at its root makes it an app."
6684 }
6685 },
6686 "ecosystem": null,
6687 "links": {
6688 "homepage": "https://g1t.sh",
6689 "homepage_inherited": true,
6690 "docs": "https://docs.g1t.sh",
6691 "custom": [
6692 {
6693 "label": "Status",
6694 "url": "https://status.g1t.sh"
6695 }
6696 ]
6697 },
6698 "created_at": "2026-09-01T10:00:00.000Z",
6699 "updated_at": "2026-10-07T11:20:00.000Z",
6700 "pushed_at": "2026-10-07T10:00:00.000Z"
6701 },
6702 "notes": "Only the fields given change. `kind` and `runs` take `auto` to go back to detection. Setting `runs` makes the project an app unless it is docs. Making it a `library`, `tool` or `other` while [Deployments](/guides/deployments/) are on is refused with `409 conflict`: turn them off first. `description` and `homepage` given as null or `\"\"` follow the repository's again; `production_url` and `docs_url` given as null or `\"\"` are cleared. `links` replaces the project's other links: at most 10, each with a `label` of up to 40 characters and an http or https `url` (`https://` is added when you leave the scheme out); anything else is refused with `422 invalid`. Needs the Maintain role or higher on the project's repository. Recorded in the [audit log](/guides/audit-log/). See [Settings](/guides/projects/#settings)."
6703 },
6704 "list_secret_scanning_alerts": {
6705 "params": {
6706 "owner": "flagon-io",
6707 "name": "hello"
6708 },
6709 "query": {
6710 "state": "open"
6711 },
6712 "response": [
6713 {
6714 "id": "sec_01kq2m7d4e5f6g7h8j9k0m1n2p",
6715 "repo_id": "rep_01kp0a1b2c3d4e5f6g7h8j9k0m",
6716 "kind": "github_token",
6717 "label": "a GitHub token",
6718 "path": "scripts/release.sh",
6719 "line": 12,
6720 "commit": "4807077b296e6edbf410d55e72749d3e1170c291",
6721 "preview": "ghp_X7…",
6722 "status": "open",
6723 "source": "push",
6724 "found_by": "syntaqx",
6725 "found_at": "2026-10-06T09:14:02.118Z",
6726 "decided_by": null,
6727 "reason": null,
6728 "decided_at": null,
6729 "dismissed_reason": null,
6730 "test_value": null,
6731 "state": "open",
6732 "validity": "active",
6733 "validity_checked_at": "2026-10-06T09:20:41.502Z",
6734 "bypass": {
6735 "reason": "will_fix_later",
6736 "comment": "Rotating it this afternoon.",
6737 "by": "syntaqx",
6738 "at": "2026-10-06T09:14:02.118Z",
6739 "approved_by": null
6740 },
6741 "pattern_id": null,
6742 "pattern_name": null,
6743 "locations": 1
6744 }
6745 ],
6746 "notes": "| Filter | Values |\n| --- | --- |\n| `state` | `open` (in the history, or blocked at a push), `dismissed`, `fixed` |\n| `secret_type` | `aws_access_key`, `github_token`, `custom_pattern`, … |\n| `validity` | `active`, `inactive`, `unknown`, `unsupported` |\n| `bypassed` | `true` or `false` |\n\nThe secret itself is never returned: `preview` is enough to recognise it. `status` says where it stands: `open`, `blocked` (stopped at a push, never landed), `allowed` or `resolved`."
6747 },
6748 "list_secret_scanning_alerts_for_workspace": {
6749 "params": {
6750 "workspace": "flagon-io"
6751 },
6752 "query": {
6753 "state": "open"
6754 },
6755 "response": [
6756 {
6757 "repo": "hello",
6758 "secret": {
6759 "id": "sec_01kq2m7d4e5f6g7h8j9k0m1n2p",
6760 "repo_id": "rep_01kp0a1b2c3d4e5f6g7h8j9k0m",
6761 "kind": "github_token",
6762 "label": "a GitHub token",
6763 "path": "scripts/release.sh",
6764 "line": 12,
6765 "commit": "4807077b296e6edbf410d55e72749d3e1170c291",
6766 "preview": "ghp_X7…",
6767 "status": "open",
6768 "source": "push",
6769 "found_by": "syntaqx",
6770 "found_at": "2026-10-06T09:14:02.118Z",
6771 "decided_by": null,
6772 "reason": null,
6773 "decided_at": null,
6774 "dismissed_reason": null,
6775 "test_value": null,
6776 "state": "open",
6777 "validity": "active",
6778 "validity_checked_at": "2026-10-06T09:20:41.502Z",
6779 "bypass": {
6780 "reason": "will_fix_later",
6781 "comment": "Rotating it this afternoon.",
6782 "by": "syntaqx",
6783 "at": "2026-10-06T09:14:02.118Z",
6784 "approved_by": null
6785 },
6786 "pattern_id": null,
6787 "pattern_name": null,
6788 "locations": 1
6789 }
6790 }
6791 ],
6792 "notes": "Every repository whose findings you may see, each alert with its repository's name."
6793 },
6794 "get_secret_scanning_alert": {
6795 "params": {
6796 "owner": "flagon-io",
6797 "name": "hello",
6798 "id": "sec_01kq2m7d4e5f6g7h8j9k0m1n2p"
6799 },
6800 "response": {
6801 "secret": {
6802 "id": "sec_01kq2m7d4e5f6g7h8j9k0m1n2p",
6803 "repo_id": "rep_01kp0a1b2c3d4e5f6g7h8j9k0m",
6804 "kind": "github_token",
6805 "label": "a GitHub token",
6806 "path": "scripts/release.sh",
6807 "line": 12,
6808 "commit": "4807077b296e6edbf410d55e72749d3e1170c291",
6809 "preview": "ghp_X7…",
6810 "status": "blocked",
6811 "source": "push",
6812 "found_by": "syntaqx",
6813 "found_at": "2026-10-06T09:14:02.118Z",
6814 "decided_by": null,
6815 "reason": null,
6816 "decided_at": null,
6817 "dismissed_reason": null,
6818 "test_value": null,
6819 "state": "open",
6820 "validity": null,
6821 "validity_checked_at": null,
6822 "bypass": null,
6823 "pattern_id": null,
6824 "pattern_name": null,
6825 "locations": 1
6826 },
6827 "locations": [
6828 {
6829 "path": "scripts/release.sh",
6830 "line": 12,
6831 "commit": "4807077b296e6edbf410d55e72749d3e1170c291",
6832 "source": "push",
6833 "found_at": "2026-10-06T09:14:02.118Z"
6834 }
6835 ],
6836 "activity": [],
6837 "requests": [],
6838 "checkable": true,
6839 "can_bypass": true,
6840 "can_request_bypass": false
6841 }
6842 },
6843 "update_secret_scanning_alert": {
6844 "params": {
6845 "owner": "flagon-io",
6846 "name": "hello",
6847 "id": "sec_01kq2m7d4e5f6g7h8j9k0m1n2p"
6848 },
6849 "request": {
6850 "state": "dismissed",
6851 "reason": "revoked",
6852 "comment": "Rotated in the issuer's settings."
6853 },
6854 "response": {
6855 "id": "sec_01kq2m7d4e5f6g7h8j9k0m1n2p",
6856 "repo_id": "rep_01kp0a1b2c3d4e5f6g7h8j9k0m",
6857 "kind": "github_token",
6858 "label": "a GitHub token",
6859 "path": "scripts/release.sh",
6860 "line": 12,
6861 "commit": "4807077b296e6edbf410d55e72749d3e1170c291",
6862 "preview": "ghp_X7…",
6863 "status": "resolved",
6864 "source": "push",
6865 "found_by": "syntaqx",
6866 "found_at": "2026-10-06T09:14:02.118Z",
6867 "decided_by": "syntaqx",
6868 "reason": "Rotated in the issuer's settings.",
6869 "decided_at": "2026-10-06T09:20:41.502Z",
6870 "dismissed_reason": "revoked",
6871 "test_value": null,
6872 "state": "fixed",
6873 "validity": "active",
6874 "validity_checked_at": "2026-10-06T09:20:41.502Z",
6875 "bypass": {
6876 "reason": "will_fix_later",
6877 "comment": "Rotating it this afternoon.",
6878 "by": "syntaqx",
6879 "at": "2026-10-06T09:14:02.118Z",
6880 "approved_by": null
6881 },
6882 "pattern_id": null,
6883 "pattern_name": null,
6884 "locations": 1
6885 },
6886 "notes": "Takes the Admin role: a dismissed secret is let through push protection, unless it was `revoked`, which marks it fixed. `state` `open` reopens it."
6887 },
6888 "list_secret_scanning_locations": {
6889 "params": {
6890 "owner": "flagon-io",
6891 "name": "hello",
6892 "id": "sec_01kq2m7d4e5f6g7h8j9k0m1n2p"
6893 },
6894 "response": [
6895 {
6896 "path": "scripts/release.sh",
6897 "line": 12,
6898 "commit": "4807077b296e6edbf410d55e72749d3e1170c291",
6899 "source": "push",
6900 "found_at": "2026-10-06T09:14:02.118Z"
6901 }
6902 ]
6903 },
6904 "bypass_push_protection": {
6905 "params": {
6906 "owner": "flagon-io",
6907 "name": "hello",
6908 "id": "sec_01kq2m7d4e5f6g7h8j9k0m1n2p"
6909 },
6910 "request": {
6911 "reason": "will_fix_later",
6912 "comment": "Rotating it this afternoon."
6913 },
6914 "response": {
6915 "secret": {
6916 "id": "sec_01kq2m7d4e5f6g7h8j9k0m1n2p",
6917 "repo_id": "rep_01kp0a1b2c3d4e5f6g7h8j9k0m",
6918 "kind": "github_token",
6919 "label": "a GitHub token",
6920 "path": "scripts/release.sh",
6921 "line": 12,
6922 "commit": "4807077b296e6edbf410d55e72749d3e1170c291",
6923 "preview": "ghp_X7…",
6924 "status": "open",
6925 "source": "push",
6926 "found_by": "syntaqx",
6927 "found_at": "2026-10-06T09:14:02.118Z",
6928 "decided_by": null,
6929 "reason": null,
6930 "decided_at": null,
6931 "dismissed_reason": null,
6932 "test_value": null,
6933 "state": "open",
6934 "validity": null,
6935 "validity_checked_at": null,
6936 "bypass": {
6937 "reason": "will_fix_later",
6938 "comment": "Rotating it this afternoon.",
6939 "by": "syntaqx",
6940 "at": "2026-10-06T09:14:02.118Z",
6941 "approved_by": null
6942 },
6943 "pattern_id": null,
6944 "pattern_name": null,
6945 "locations": 1
6946 },
6947 "request": null
6948 },
6949 "notes": "| Reason | The alert |\n| --- | --- |\n| `false_positive` | Closed as a false positive |\n| `used_in_tests` | Closed as used in tests |\n| `will_fix_later` | Stays open, to be rotated |\n\nWith delegated bypass on, a call from someone who does not review bypasses makes a request instead: `request` is set and the secret is still blocked until an owner or admin approves it. Push again once it is bypassed."
6950 },
6951 "check_secret_validity": {
6952 "params": {
6953 "owner": "flagon-io",
6954 "name": "hello",
6955 "id": "sec_01kq2m7d4e5f6g7h8j9k0m1n2p"
6956 },
6957 "response": {
6958 "id": "sec_01kq2m7d4e5f6g7h8j9k0m1n2p",
6959 "repo_id": "rep_01kp0a1b2c3d4e5f6g7h8j9k0m",
6960 "kind": "github_token",
6961 "label": "a GitHub token",
6962 "path": "scripts/release.sh",
6963 "line": 12,
6964 "commit": "4807077b296e6edbf410d55e72749d3e1170c291",
6965 "preview": "ghp_X7…",
6966 "status": "open",
6967 "source": "push",
6968 "found_by": "syntaqx",
6969 "found_at": "2026-10-06T09:14:02.118Z",
6970 "decided_by": null,
6971 "reason": null,
6972 "decided_at": null,
6973 "dismissed_reason": null,
6974 "test_value": null,
6975 "state": "open",
6976 "validity": "active",
6977 "validity_checked_at": "2026-10-06T09:20:41.502Z",
6978 "bypass": {
6979 "reason": "will_fix_later",
6980 "comment": "Rotating it this afternoon.",
6981 "by": "syntaqx",
6982 "at": "2026-10-06T09:14:02.118Z",
6983 "approved_by": null
6984 },
6985 "pattern_id": null,
6986 "pattern_name": null,
6987 "locations": 1
6988 },
6989 "notes": "Made for GitHub, GitLab, Stripe, Slack, npm, OpenAI, Anthropic and SendGrid tokens, with the issuer's own read-only call. Other formats answer `unsupported`; a secret that never landed answers `unknown`."
6990 },
6991 "list_bypass_requests": {
6992 "params": {
6993 "workspace": "flagon-io"
6994 },
6995 "query": {
6996 "state": "pending"
6997 },
6998 "response": [
6999 {
7000 "id": "byp_01kq2n8e5f6g7h8j9k0m1n2p3q",
7001 "repo_id": "rep_01kp0a1b2c3d4e5f6g7h8j9k0m",
7002 "workspace": "flagon-io",
7003 "repo": "hello",
7004 "secret_id": "sec_01kq2m7d4e5f6g7h8j9k0m1n2p",
7005 "label": "a GitHub token",
7006 "path": "scripts/release.sh",
7007 "line": 12,
7008 "preview": "ghp_X7…",
7009 "requester": "ana",
7010 "reason": "used_in_tests",
7011 "comment": "A token from the test fixtures, never issued.",
7012 "state": "pending",
7013 "reviewer": null,
7014 "review_comment": null,
7015 "created_at": "2026-10-06T09:14:02.118Z",
7016 "reviewed_at": null
7017 }
7018 ]
7019 },
7020 "review_bypass_request": {
7021 "params": {
7022 "workspace": "flagon-io",
7023 "id": "byp_01kq2n8e5f6g7h8j9k0m1n2p3q"
7024 },
7025 "request": {
7026 "decision": "approve",
7027 "comment": "A fixture."
7028 },
7029 "response": {
7030 "id": "byp_01kq2n8e5f6g7h8j9k0m1n2p3q",
7031 "repo_id": "rep_01kp0a1b2c3d4e5f6g7h8j9k0m",
7032 "workspace": "flagon-io",
7033 "repo": "hello",
7034 "secret_id": "sec_01kq2m7d4e5f6g7h8j9k0m1n2p",
7035 "label": "a GitHub token",
7036 "path": "scripts/release.sh",
7037 "line": 12,
7038 "preview": "ghp_X7…",
7039 "requester": "ana",
7040 "reason": "used_in_tests",
7041 "comment": "A token from the test fixtures, never issued.",
7042 "state": "approved",
7043 "reviewer": "syntaqx",
7044 "review_comment": "A fixture.",
7045 "created_at": "2026-10-06T09:14:02.118Z",
7046 "reviewed_at": "2026-10-06T09:20:41.502Z"
7047 }
7048 },
7049 "list_custom_patterns": {
7050 "params": {
7051 "owner": "flagon-io",
7052 "name": "hello"
7053 },
7054 "response": {
7055 "patterns": [
7056 {
7057 "id": "pat_01kq2p9f6g7h8j9k0m1n2p3q4r",
7058 "scope": "repository",
7059 "workspace": "flagon-io",
7060 "repo": "hello",
7061 "name": "Acme API key",
7062 "pattern": "acme_[a-z0-9]{32}",
7063 "before": null,
7064 "after": null,
7065 "test_strings": [
7066 "ACME_KEY=acme_0123456789abcdef0123456789abcdef"
7067 ],
7068 "state": "published",
7069 "created_by": "syntaqx",
7070 "created_at": "2026-10-06T09:14:02.118Z",
7071 "updated_by": "syntaqx",
7072 "updated_at": "2026-10-06T09:14:02.118Z",
7073 "open_alerts": 0
7074 }
7075 ],
7076 "entitled": true
7077 },
7078 "notes": "A repository's list includes its workspace's patterns, with `scope` `workspace`. `entitled` says whether they run here: always on a public repository, and on a private one with the Security and quality activation."
7079 },
7080 "list_custom_patterns_for_workspace": {
7081 "params": {
7082 "workspace": "flagon-io"
7083 },
7084 "response": {
7085 "patterns": [
7086 {
7087 "id": "pat_01kq2p9f6g7h8j9k0m1n2p3q4r",
7088 "scope": "workspace",
7089 "workspace": "flagon-io",
7090 "repo": null,
7091 "name": "Acme API key",
7092 "pattern": "acme_[a-z0-9]{32}",
7093 "before": null,
7094 "after": null,
7095 "test_strings": [
7096 "ACME_KEY=acme_0123456789abcdef0123456789abcdef"
7097 ],
7098 "state": "published",
7099 "created_by": "syntaqx",
7100 "created_at": "2026-10-06T09:14:02.118Z",
7101 "updated_by": "syntaqx",
7102 "updated_at": "2026-10-06T09:14:02.118Z",
7103 "open_alerts": 0
7104 }
7105 ],
7106 "entitled": true
7107 }
7108 },
7109 "create_custom_pattern": {
7110 "params": {
7111 "owner": "flagon-io",
7112 "name": "hello"
7113 },
7114 "request": {
7115 "pattern_name": "Acme API key",
7116 "pattern": "acme_[a-z0-9]{32}",
7117 "test_strings": [
7118 "ACME_KEY=acme_0123456789abcdef0123456789abcdef"
7119 ],
7120 "publish": true
7121 },
7122 "response": {
7123 "pattern": {
7124 "id": "pat_01kq2p9f6g7h8j9k0m1n2p3q4r",
7125 "scope": "repository",
7126 "workspace": "flagon-io",
7127 "repo": "hello",
7128 "name": "Acme API key",
7129 "pattern": "acme_[a-z0-9]{32}",
7130 "before": null,
7131 "after": null,
7132 "test_strings": [
7133 "ACME_KEY=acme_0123456789abcdef0123456789abcdef"
7134 ],
7135 "state": "published",
7136 "created_by": "syntaqx",
7137 "created_at": "2026-10-06T09:14:02.118Z",
7138 "updated_by": "syntaqx",
7139 "updated_at": "2026-10-06T09:14:02.118Z",
7140 "open_alerts": 0
7141 },
7142 "tests": [
7143 [
7144 9,
7145 46
7146 ]
7147 ]
7148 },
7149 "notes": "`tests` gives, for each test string, where the pattern matched (start and end, in characters), or `null`. A pattern that does not compile, matches an empty string, or is too complex is refused with `422` and says why."
7150 },
7151 "create_custom_pattern_for_workspace": {
7152 "params": {
7153 "workspace": "flagon-io"
7154 },
7155 "request": {
7156 "pattern_name": "Acme API key",
7157 "pattern": "acme_[a-z0-9]{32}",
7158 "publish": false
7159 },
7160 "response": {
7161 "pattern": {
7162 "id": "pat_01kq2p9f6g7h8j9k0m1n2p3q4r",
7163 "scope": "workspace",
7164 "workspace": "flagon-io",
7165 "repo": null,
7166 "name": "Acme API key",
7167 "pattern": "acme_[a-z0-9]{32}",
7168 "before": null,
7169 "after": null,
7170 "test_strings": [],
7171 "state": "draft",
7172 "created_by": "syntaqx",
7173 "created_at": "2026-10-06T09:14:02.118Z",
7174 "updated_by": "syntaqx",
7175 "updated_at": "2026-10-06T09:14:02.118Z",
7176 "open_alerts": 0
7177 },
7178 "tests": []
7179 }
7180 },
7181 "update_custom_pattern": {
7182 "params": {
7183 "owner": "flagon-io",
7184 "name": "hello",
7185 "id": "pat_01kq2p9f6g7h8j9k0m1n2p3q4r"
7186 },
7187 "request": {
7188 "pattern_name": "Acme API key",
7189 "pattern": "acme_[a-z0-9]{32,40}",
7190 "publish": true
7191 },
7192 "response": {
7193 "pattern": {
7194 "id": "pat_01kq2p9f6g7h8j9k0m1n2p3q4r",
7195 "scope": "repository",
7196 "workspace": "flagon-io",
7197 "repo": "hello",
7198 "name": "Acme API key",
7199 "pattern": "acme_[a-z0-9]{32,40}",
7200 "before": null,
7201 "after": null,
7202 "test_strings": [
7203 "ACME_KEY=acme_0123456789abcdef0123456789abcdef"
7204 ],
7205 "state": "published",
7206 "created_by": "syntaqx",
7207 "created_at": "2026-10-06T09:14:02.118Z",
7208 "updated_by": "syntaqx",
7209 "updated_at": "2026-10-06T09:14:02.118Z",
7210 "open_alerts": 0
7211 },
7212 "tests": [
7213 [
7214 9,
7215 46
7216 ]
7217 ]
7218 }
7219 },
7220 "update_custom_pattern_for_workspace": {
7221 "params": {
7222 "workspace": "flagon-io",
7223 "id": "pat_01kq2p9f6g7h8j9k0m1n2p3q4r"
7224 },
7225 "request": {
7226 "pattern_name": "Acme API key",
7227 "pattern": "acme_[a-z0-9]{32}",
7228 "publish": true
7229 },
7230 "response": {
7231 "pattern": {
7232 "id": "pat_01kq2p9f6g7h8j9k0m1n2p3q4r",
7233 "scope": "workspace",
7234 "workspace": "flagon-io",
7235 "repo": null,
7236 "name": "Acme API key",
7237 "pattern": "acme_[a-z0-9]{32}",
7238 "before": null,
7239 "after": null,
7240 "test_strings": [
7241 "ACME_KEY=acme_0123456789abcdef0123456789abcdef"
7242 ],
7243 "state": "published",
7244 "created_by": "syntaqx",
7245 "created_at": "2026-10-06T09:14:02.118Z",
7246 "updated_by": "syntaqx",
7247 "updated_at": "2026-10-06T09:14:02.118Z",
7248 "open_alerts": 0
7249 },
7250 "tests": [
7251 [
7252 9,
7253 46
7254 ]
7255 ]
7256 }
7257 },
7258 "delete_custom_pattern": {
7259 "params": {
7260 "owner": "flagon-io",
7261 "name": "hello",
7262 "id": "pat_01kq2p9f6g7h8j9k0m1n2p3q4r"
7263 },
7264 "response": {
7265 "deleted": true
7266 }
7267 },
7268 "delete_custom_pattern_for_workspace": {
7269 "params": {
7270 "workspace": "flagon-io",
7271 "id": "pat_01kq2p9f6g7h8j9k0m1n2p3q4r"
7272 },
7273 "response": {
7274 "deleted": true
7275 }
7276 },
7277 "dry_run_custom_pattern": {
7278 "params": {
7279 "owner": "flagon-io",
7280 "name": "hello"
7281 },
7282 "request": {
7283 "pattern": "acme_[a-z0-9]{32}"
7284 },
7285 "response": {
7286 "repos": [
7287 {
7288 "name": "hello",
7289 "files_scanned": 214,
7290 "matches": [
7291 {
7292 "path": "config/dev.env",
7293 "line": 3,
7294 "preview": "ACME_KEY=acme_01••••••••••••••••••••••••"
7295 }
7296 ],
7297 "truncated": false,
7298 "commit": "4807077b296e6edbf410d55e72749d3e1170c291"
7299 }
7300 ]
7301 },
7302 "notes": "Reads up to 2,000 files and 20 MB of the default branch, skipping what secret scanning skips. Nothing is recorded."
7303 },
7304 "dry_run_custom_pattern_for_workspace": {
7305 "params": {
7306 "workspace": "flagon-io"
7307 },
7308 "request": {
7309 "pattern": "acme_[a-z0-9]{32}",
7310 "repos": [
7311 "hello"
7312 ]
7313 },
7314 "response": {
7315 "repos": [
7316 {
7317 "name": "hello",
7318 "files_scanned": 214,
7319 "matches": [],
7320 "truncated": false,
7321 "commit": "4807077b296e6edbf410d55e72749d3e1170c291"
7322 }
7323 ]
7324 }
7325 },
7326 "list_code_scanning_alerts": {
7327 "params": {
7328 "owner": "flagon-io",
7329 "name": "hello"
7330 },
7331 "query": {
7332 "state": "open",
7333 "severity": "high"
7334 },
7335 "response": [
7336 {
7337 "id": "cod_01kq2qag7h8j9k0m1n2p3q4r5s",
7338 "number": 4,
7339 "repo_id": "rep_01kp0a1b2c3d4e5f6g7h8j9k0m",
7340 "tool": "Semgrep OSS",
7341 "category": "Semgrep OSS",
7342 "rule_id": "javascript.lang.security.detect-child-process.detect-child-process",
7343 "rule_name": "javascript.lang.security.detect-child-process.detect-child-process",
7344 "rule_description": "Detected calls to child_process from a function argument.",
7345 "help": null,
7346 "help_uri": "https://semgrep.dev/r/javascript.lang.security.detect-child-process.detect-child-process",
7347 "tags": [
7348 "security",
7349 "CWE-78"
7350 ],
7351 "level": "error",
7352 "security_severity": null,
7353 "severity": "high",
7354 "message": "Detected calls to child_process from a function argument `req`. This could lead to a command injection.",
7355 "path": "src/server.js",
7356 "start_line": 6,
7357 "end_line": 6,
7358 "start_column": 3,
7359 "end_column": 60,
7360 "state": "open",
7361 "fingerprint": "3f1c9a0e7b2d4c5e6f708192a3b4c5d6",
7362 "first_commit": "4807077b296e6edbf410d55e72749d3e1170c291",
7363 "last_commit": "4807077b296e6edbf410d55e72749d3e1170c291",
7364 "created_at": "2026-10-06T09:14:02.118Z",
7365 "updated_at": "2026-10-06T09:14:02.118Z",
7366 "fixed_at": null,
7367 "dismissed_by": null,
7368 "dismissed_reason": null,
7369 "dismissed_comment": null,
7370 "dismissed_at": null,
7371 "issue": null
7372 }
7373 ],
7374 "notes": "`severity` is the rule's security severity when it has one (from its `security-severity` score), else from the result's level: `error` high, `warning` medium, `note` low."
7375 },
7376 "list_code_scanning_alerts_for_workspace": {
7377 "params": {
7378 "workspace": "flagon-io"
7379 },
7380 "query": {
7381 "state": "open"
7382 },
7383 "response": [
7384 {
7385 "repo": "hello",
7386 "code": {
7387 "id": "cod_01kq2qag7h8j9k0m1n2p3q4r5s",
7388 "number": 4,
7389 "repo_id": "rep_01kp0a1b2c3d4e5f6g7h8j9k0m",
7390 "tool": "Semgrep OSS",
7391 "category": "Semgrep OSS",
7392 "rule_id": "javascript.lang.security.detect-child-process.detect-child-process",
7393 "rule_name": "javascript.lang.security.detect-child-process.detect-child-process",
7394 "rule_description": "Detected calls to child_process from a function argument.",
7395 "help": null,
7396 "help_uri": "https://semgrep.dev/r/javascript.lang.security.detect-child-process.detect-child-process",
7397 "tags": [
7398 "security",
7399 "CWE-78"
7400 ],
7401 "level": "error",
7402 "security_severity": null,
7403 "severity": "high",
7404 "message": "Detected calls to child_process from a function argument `req`. This could lead to a command injection.",
7405 "path": "src/server.js",
7406 "start_line": 6,
7407 "end_line": 6,
7408 "start_column": 3,
7409 "end_column": 60,
7410 "state": "open",
7411 "fingerprint": "3f1c9a0e7b2d4c5e6f708192a3b4c5d6",
7412 "first_commit": "4807077b296e6edbf410d55e72749d3e1170c291",
7413 "last_commit": "4807077b296e6edbf410d55e72749d3e1170c291",
7414 "created_at": "2026-10-06T09:14:02.118Z",
7415 "updated_at": "2026-10-06T09:14:02.118Z",
7416 "fixed_at": null,
7417 "dismissed_by": null,
7418 "dismissed_reason": null,
7419 "dismissed_comment": null,
7420 "dismissed_at": null,
7421 "issue": null
7422 }
7423 }
7424 ]
7425 },
7426 "get_code_scanning_alert": {
7427 "params": {
7428 "owner": "flagon-io",
7429 "name": "hello",
7430 "number": 4
7431 },
7432 "response": {
7433 "alert": {
7434 "id": "cod_01kq2qag7h8j9k0m1n2p3q4r5s",
7435 "number": 4,
7436 "repo_id": "rep_01kp0a1b2c3d4e5f6g7h8j9k0m",
7437 "tool": "Semgrep OSS",
7438 "category": "Semgrep OSS",
7439 "rule_id": "javascript.lang.security.detect-child-process.detect-child-process",
7440 "rule_name": "javascript.lang.security.detect-child-process.detect-child-process",
7441 "rule_description": "Detected calls to child_process from a function argument.",
7442 "help": null,
7443 "help_uri": "https://semgrep.dev/r/javascript.lang.security.detect-child-process.detect-child-process",
7444 "tags": [
7445 "security",
7446 "CWE-78"
7447 ],
7448 "level": "error",
7449 "security_severity": null,
7450 "severity": "high",
7451 "message": "Detected calls to child_process from a function argument `req`. This could lead to a command injection.",
7452 "path": "src/server.js",
7453 "start_line": 6,
7454 "end_line": 6,
7455 "start_column": 3,
7456 "end_column": 60,
7457 "state": "open",
7458 "fingerprint": "3f1c9a0e7b2d4c5e6f708192a3b4c5d6",
7459 "first_commit": "4807077b296e6edbf410d55e72749d3e1170c291",
7460 "last_commit": "4807077b296e6edbf410d55e72749d3e1170c291",
7461 "created_at": "2026-10-06T09:14:02.118Z",
7462 "updated_at": "2026-10-06T09:14:02.118Z",
7463 "fixed_at": null,
7464 "dismissed_by": null,
7465 "dismissed_reason": null,
7466 "dismissed_comment": null,
7467 "dismissed_at": null,
7468 "issue": null
7469 },
7470 "activity": [],
7471 "analyses": [
7472 {
7473 "id": "ana_01kq2rbh8j9k0m1n2p3q4r5s6t",
7474 "repo_id": "rep_01kp0a1b2c3d4e5f6g7h8j9k0m",
7475 "sarif_id": "sar_01kq2scj9k0m1n2p3q4r5s6t7v",
7476 "tool": "Semgrep OSS",
7477 "tool_version": "1.140.0",
7478 "category": "Semgrep OSS",
7479 "commit_sha": "4807077b296e6edbf410d55e72749d3e1170c291",
7480 "git_ref": "refs/heads/main",
7481 "pull": null,
7482 "results": 7,
7483 "new_alerts": 2,
7484 "fixed_alerts": 1,
7485 "dropped": 0,
7486 "created_at": "2026-10-06T09:14:02.118Z"
7487 }
7488 ]
7489 }
7490 },
7491 "update_code_scanning_alert": {
7492 "params": {
7493 "owner": "flagon-io",
7494 "name": "hello",
7495 "number": 4
7496 },
7497 "request": {
7498 "state": "dismissed",
7499 "dismissed_reason": "false_positive",
7500 "dismissed_comment": "The argument is a constant."
7501 },
7502 "response": {
7503 "id": "cod_01kq2qag7h8j9k0m1n2p3q4r5s",
7504 "number": 4,
7505 "repo_id": "rep_01kp0a1b2c3d4e5f6g7h8j9k0m",
7506 "tool": "Semgrep OSS",
7507 "category": "Semgrep OSS",
7508 "rule_id": "javascript.lang.security.detect-child-process.detect-child-process",
7509 "rule_name": "javascript.lang.security.detect-child-process.detect-child-process",
7510 "rule_description": "Detected calls to child_process from a function argument.",
7511 "help": null,
7512 "help_uri": "https://semgrep.dev/r/javascript.lang.security.detect-child-process.detect-child-process",
7513 "tags": [
7514 "security",
7515 "CWE-78"
7516 ],
7517 "level": "error",
7518 "security_severity": null,
7519 "severity": "high",
7520 "message": "Detected calls to child_process from a function argument `req`. This could lead to a command injection.",
7521 "path": "src/server.js",
7522 "start_line": 6,
7523 "end_line": 6,
7524 "start_column": 3,
7525 "end_column": 60,
7526 "state": "dismissed",
7527 "fingerprint": "3f1c9a0e7b2d4c5e6f708192a3b4c5d6",
7528 "first_commit": "4807077b296e6edbf410d55e72749d3e1170c291",
7529 "last_commit": "4807077b296e6edbf410d55e72749d3e1170c291",
7530 "created_at": "2026-10-06T09:14:02.118Z",
7531 "updated_at": "2026-10-06T09:14:02.118Z",
7532 "fixed_at": null,
7533 "dismissed_by": "syntaqx",
7534 "dismissed_reason": "false_positive",
7535 "dismissed_comment": "The argument is a constant.",
7536 "dismissed_at": "2026-10-06T09:20:41.502Z",
7537 "issue": null
7538 }
7539 },
7540 "list_code_scanning_analyses": {
7541 "params": {
7542 "owner": "flagon-io",
7543 "name": "hello"
7544 },
7545 "response": [
7546 {
7547 "id": "ana_01kq2rbh8j9k0m1n2p3q4r5s6t",
7548 "repo_id": "rep_01kp0a1b2c3d4e5f6g7h8j9k0m",
7549 "sarif_id": "sar_01kq2scj9k0m1n2p3q4r5s6t7v",
7550 "tool": "Semgrep OSS",
7551 "tool_version": "1.140.0",
7552 "category": "Semgrep OSS",
7553 "commit_sha": "4807077b296e6edbf410d55e72749d3e1170c291",
7554 "git_ref": "refs/heads/main",
7555 "pull": null,
7556 "results": 7,
7557 "new_alerts": 2,
7558 "fixed_alerts": 1,
7559 "dropped": 0,
7560 "created_at": "2026-10-06T09:14:02.118Z"
7561 }
7562 ]
7563 },
7564 "upload_sarif": {
7565 "params": {
7566 "owner": "flagon-io",
7567 "name": "hello"
7568 },
7569 "request": {
7570 "commit_sha": "4807077b296e6edbf410d55e72749d3e1170c291",
7571 "ref": "refs/heads/main",
7572 "sarif": "H4sIAAAAAAAA…",
7573 "checkout_uri": "file:///home/runner/work/repo"
7574 },
7575 "response": {
7576 "id": "sar_01kq2scj9k0m1n2p3q4r5s6t7v",
7577 "processing_status": "complete",
7578 "analyses": [
7579 "ana_01kq2rbh8j9k0m1n2p3q4r5s6t"
7580 ],
7581 "errors": [],
7582 "commit_sha": "4807077b296e6edbf410d55e72749d3e1170c291",
7583 "git_ref": "refs/heads/main",
7584 "created_at": "2026-10-06T09:14:02.118Z"
7585 },
7586 "notes": "`sarif` is the SARIF 2.1.0 file gzipped, then base64-encoded: `gzip -c results.sarif | base64 -w0`. The upload is read at once: `processing_status` is `complete` or `failed`, with `errors` saying why. For `refs/pull/<number>/head`, the results become the pull request's `Code scanning` check instead of alerts."
7587 },
7588 "get_sarif_upload": {
7589 "params": {
7590 "owner": "flagon-io",
7591 "name": "hello",
7592 "id": "sar_01kq2scj9k0m1n2p3q4r5s6t7v"
7593 },
7594 "response": {
7595 "id": "sar_01kq2scj9k0m1n2p3q4r5s6t7v",
7596 "processing_status": "complete",
7597 "analyses": [
7598 "ana_01kq2rbh8j9k0m1n2p3q4r5s6t"
7599 ],
7600 "errors": [],
7601 "commit_sha": "4807077b296e6edbf410d55e72749d3e1170c291",
7602 "git_ref": "refs/heads/main",
7603 "created_at": "2026-10-06T09:14:02.118Z"
7604 }
7605 },
7606 "list_vulnerability_alerts": {
7607 "params": {
7608 "owner": "flagon-io",
7609 "name": "hello"
7610 },
7611 "query": {
7612 "state": "open"
7613 },
7614 "response": [
7615 {
7616 "id": "vul_01kp4b8c3d4e5f6g7h8j9k0m1n",
7617 "repo_id": "rep_01kp0a1b2c3d4e5f6g7h8j9k0m",
7618 "ecosystem": "npm",
7619 "package": "lodash",
7620 "version": "4.17.20",
7621 "manifest": "package-lock.json",
7622 "advisory": "GHSA-35jh-r3h4-6jhm",
7623 "osv_id": "GHSA-35jh-r3h4-6jhm",
7624 "summary": "Command Injection in lodash",
7625 "severity": "high",
7626 "fixed_version": "4.17.21",
7627 "status": "open",
7628 "issue": null,
7629 "found_at": "2026-10-06T09:14:02.118Z",
7630 "fixed_at": null,
7631 "state": "open",
7632 "dismissed_by": null,
7633 "dismissed_reason": null,
7634 "dismissed_comment": null,
7635 "dismissed_at": null,
7636 "update": null
7637 }
7638 ]
7639 },
7640 "list_vulnerability_alerts_for_workspace": {
7641 "params": {
7642 "workspace": "flagon-io"
7643 },
7644 "query": {
7645 "severity": "critical"
7646 },
7647 "response": [
7648 {
7649 "repo": "hello",
7650 "vulnerability": {
7651 "id": "vul_01kp4b8c3d4e5f6g7h8j9k0m1n",
7652 "repo_id": "rep_01kp0a1b2c3d4e5f6g7h8j9k0m",
7653 "ecosystem": "npm",
7654 "package": "lodash",
7655 "version": "4.17.20",
7656 "manifest": "package-lock.json",
7657 "advisory": "GHSA-35jh-r3h4-6jhm",
7658 "osv_id": "GHSA-35jh-r3h4-6jhm",
7659 "summary": "Command Injection in lodash",
7660 "severity": "high",
7661 "fixed_version": "4.17.21",
7662 "status": "open",
7663 "issue": null,
7664 "found_at": "2026-10-06T09:14:02.118Z",
7665 "fixed_at": null,
7666 "state": "open",
7667 "dismissed_by": null,
7668 "dismissed_reason": null,
7669 "dismissed_comment": null,
7670 "dismissed_at": null,
7671 "update": null
7672 }
7673 }
7674 ]
7675 },
7676 "get_vulnerability_alert": {
7677 "params": {
7678 "owner": "flagon-io",
7679 "name": "hello",
7680 "id": "vul_01kp4b8c3d4e5f6g7h8j9k0m1n"
7681 },
7682 "response": {
7683 "id": "vul_01kp4b8c3d4e5f6g7h8j9k0m1n",
7684 "repo_id": "rep_01kp0a1b2c3d4e5f6g7h8j9k0m",
7685 "ecosystem": "npm",
7686 "package": "lodash",
7687 "version": "4.17.20",
7688 "manifest": "package-lock.json",
7689 "advisory": "GHSA-35jh-r3h4-6jhm",
7690 "osv_id": "GHSA-35jh-r3h4-6jhm",
7691 "summary": "Command Injection in lodash",
7692 "severity": "high",
7693 "fixed_version": "4.17.21",
7694 "status": "open",
7695 "issue": null,
7696 "found_at": "2026-10-06T09:14:02.118Z",
7697 "fixed_at": null,
7698 "state": "open",
7699 "dismissed_by": null,
7700 "dismissed_reason": null,
7701 "dismissed_comment": null,
7702 "dismissed_at": null,
7703 "update": null
7704 }
7705 },
7706 "update_vulnerability_alert": {
7707 "params": {
7708 "owner": "flagon-io",
7709 "name": "hello",
7710 "id": "vul_01kp4b8c3d4e5f6g7h8j9k0m1n"
7711 },
7712 "request": {
7713 "state": "dismissed",
7714 "reason": "tolerable_risk",
7715 "comment": "Only the build uses it."
7716 },
7717 "response": {
7718 "id": "vul_01kp4b8c3d4e5f6g7h8j9k0m1n",
7719 "repo_id": "rep_01kp0a1b2c3d4e5f6g7h8j9k0m",
7720 "ecosystem": "npm",
7721 "package": "lodash",
7722 "version": "4.17.20",
7723 "manifest": "package-lock.json",
7724 "advisory": "GHSA-35jh-r3h4-6jhm",
7725 "osv_id": "GHSA-35jh-r3h4-6jhm",
7726 "summary": "Command Injection in lodash",
7727 "severity": "high",
7728 "fixed_version": "4.17.21",
7729 "status": "dismissed",
7730 "issue": null,
7731 "found_at": "2026-10-06T09:14:02.118Z",
7732 "fixed_at": null,
7733 "state": "dismissed",
7734 "dismissed_by": "syntaqx",
7735 "dismissed_reason": "tolerable_risk",
7736 "dismissed_comment": "Only the build uses it.",
7737 "dismissed_at": "2026-10-06T09:20:41.502Z",
7738 "update": null
7739 }
7740 },
7741 "fix_security_alert": {
7742 "params": {
7743 "owner": "flagon-io",
7744 "name": "hello",
7745 "id": "cod_01kq2qag7h8j9k0m1n2p3q4r5s"
7746 },
7747 "response": {
7748 "issue": 57,
7749 "started": true,
7750 "message": null
7751 },
7752 "notes": "Opens an issue with what is wrong and what done means, and puts g1t on it as you. Its run is charged as agent usage, and its pull request lands through the repository's required checks. Asking again while the issue is open returns it."
7753 },
7754 "get_dependency_graph": {
7755 "params": {
7756 "owner": "flagon-io",
7757 "name": "hello"
7758 },
7759 "response": {
7760 "commit": "4807077b296e6edbf410d55e72749d3e1170c291",
7761 "manifests": [
7762 {
7763 "path": "package-lock.json",
7764 "ecosystem": "npm",
7765 "dependencies": 2,
7766 "direct": 1
7767 }
7768 ],
7769 "dependencies": [
7770 {
7771 "ecosystem": "npm",
7772 "name": "lodash",
7773 "version": "4.17.20",
7774 "manifest": "package-lock.json",
7775 "relationship": "direct",
7776 "development": false,
7777 "license": "MIT",
7778 "purl": "pkg:npm/lodash@4.17.20",
7779 "vulnerabilities": 1
7780 },
7781 {
7782 "ecosystem": "npm",
7783 "name": "ms",
7784 "version": "2.1.3",
7785 "manifest": "package-lock.json",
7786 "relationship": "transitive",
7787 "development": false,
7788 "license": "MIT",
7789 "purl": "pkg:npm/ms@2.1.3",
7790 "vulnerabilities": 0
7791 }
7792 ]
7793 }
7794 },
7795 "get_sbom": {
7796 "params": {
7797 "owner": "flagon-io",
7798 "name": "hello"
7799 },
7800 "response": {
7801 "sbom": {
7802 "spdxVersion": "SPDX-2.3",
7803 "dataLicense": "CC0-1.0",
7804 "SPDXID": "SPDXRef-DOCUMENT",
7805 "name": "flagon-io/hello dependency graph",
7806 "documentNamespace": "https://g1t.sh/flagon-io/hello/sbom/sbom_01kq2tdk0m1n2p3q4r5s6t7v8w",
7807 "creationInfo": {
7808 "created": "2026-10-06T09:14:02Z",
7809 "creators": [
7810 "Tool: g1t",
7811 "Organization: g1t"
7812 ],
7813 "comment": "Read from the repository's lockfiles on its default branch."
7814 },
7815 "documentDescribes": [
7816 "SPDXRef-Repository-flagon-io-hello"
7817 ],
7818 "packages": [
7819 {
7820 "SPDXID": "SPDXRef-Repository-flagon-io-hello",
7821 "name": "flagon-io/hello",
7822 "versionInfo": "4807077b296e6edbf410d55e72749d3e1170c291",
7823 "downloadLocation": "git+https://g1t.sh/flagon-io/hello.git",
7824 "filesAnalyzed": false,
7825 "licenseConcluded": "NOASSERTION",
7826 "licenseDeclared": "NOASSERTION",
7827 "copyrightText": "NOASSERTION",
7828 "primaryPackagePurpose": "SOURCE",
7829 "externalRefs": []
7830 },
7831 {
7832 "SPDXID": "SPDXRef-Package-npm-lodash-4.17.20",
7833 "name": "lodash",
7834 "versionInfo": "4.17.20",
7835 "downloadLocation": "NOASSERTION",
7836 "filesAnalyzed": false,
7837 "licenseConcluded": "NOASSERTION",
7838 "licenseDeclared": "MIT",
7839 "copyrightText": "NOASSERTION",
7840 "primaryPackagePurpose": "LIBRARY",
7841 "comment": "Resolved by package-lock.json (direct dependency).",
7842 "externalRefs": [
7843 {
7844 "referenceCategory": "PACKAGE-MANAGER",
7845 "referenceType": "purl",
7846 "referenceLocator": "pkg:npm/lodash@4.17.20"
7847 }
7848 ]
7849 }
7850 ],
7851 "relationships": [
7852 {
7853 "spdxElementId": "SPDXRef-DOCUMENT",
7854 "relationshipType": "DESCRIBES",
7855 "relatedSpdxElement": "SPDXRef-Repository-flagon-io-hello"
7856 },
7857 {
7858 "spdxElementId": "SPDXRef-Repository-flagon-io-hello",
7859 "relationshipType": "DEPENDS_ON",
7860 "relatedSpdxElement": "SPDXRef-Package-npm-lodash-4.17.20"
7861 }
7862 ]
7863 }
7864 },
7865 "notes": "`sbom` is an SPDX 2.3 JSON document, sent as SPDX spells it. Save it with `jq .sbom`."
7866 },
7867 "compare_dependencies": {
7868 "params": {
7869 "owner": "flagon-io",
7870 "name": "hello",
7871 "basehead": "main...upgrade-deps"
7872 },
7873 "response": {
7874 "base": "main",
7875 "head": "upgrade-deps",
7876 "changes": [
7877 {
7878 "change_type": "added",
7879 "manifest": "package-lock.json",
7880 "ecosystem": "npm",
7881 "name": "lodash",
7882 "version": "4.17.20",
7883 "relationship": "direct",
7884 "development": false,
7885 "license": "MIT",
7886 "purl": "pkg:npm/lodash@4.17.20",
7887 "vulnerabilities": [
7888 {
7889 "advisory": "GHSA-35jh-r3h4-6jhm",
7890 "osv_id": "GHSA-35jh-r3h4-6jhm",
7891 "summary": "Command Injection in lodash",
7892 "severity": "high",
7893 "fixed_version": "4.17.21",
7894 "url": "https://osv.dev/vulnerability/GHSA-35jh-r3h4-6jhm"
7895 }
7896 ],
7897 "denied_license": false,
7898 "failing": true
7899 },
7900 {
7901 "change_type": "removed",
7902 "manifest": "package-lock.json",
7903 "ecosystem": "npm",
7904 "name": "lodash",
7905 "version": "4.17.21",
7906 "relationship": "direct",
7907 "development": false,
7908 "license": "MIT",
7909 "purl": "pkg:npm/lodash@4.17.21",
7910 "vulnerabilities": [],
7911 "denied_license": false,
7912 "failing": false
7913 }
7914 ],
7915 "passed": false,
7916 "headline": "Adds 1 vulnerable package",
7917 "fail_on": "high",
7918 "deny_licenses": []
7919 }
7920 },
7921 "get_security_settings": {
7922 "params": {
7923 "owner": "flagon-io",
7924 "name": "hello"
7925 },
7926 "response": {
7927 "settings": {
7928 "code_scanning_gate": "high",
7929 "dependency_review": true,
7930 "review_fail_on": "high",
7931 "review_deny_licenses": [
7932 "AGPL-3.0-only"
7933 ],
7934 "review_comment": true
7935 },
7936 "workspace": {
7937 "delegated_bypass": true,
7938 "validity_checks": true
7939 },
7940 "private": true,
7941 "entitled": true,
7942 "upkeep": true
7943 }
7944 },
7945 "update_security_settings": {
7946 "params": {
7947 "owner": "flagon-io",
7948 "name": "hello"
7949 },
7950 "request": {
7951 "code_scanning_gate": "high",
7952 "review_deny_licenses": [
7953 "AGPL-3.0-only"
7954 ]
7955 },
7956 "response": {
7957 "settings": {
7958 "code_scanning_gate": "high",
7959 "dependency_review": true,
7960 "review_fail_on": "high",
7961 "review_deny_licenses": [
7962 "AGPL-3.0-only"
7963 ],
7964 "review_comment": true
7965 },
7966 "workspace": {
7967 "delegated_bypass": true,
7968 "validity_checks": true
7969 },
7970 "private": true,
7971 "entitled": true,
7972 "upkeep": true
7973 },
7974 "notes": "Only what you send changes. The `Code scanning` and `Dependency review` checks gate merges once you require them in branch protection."
7975 },
7976 "get_workspace_security_settings": {
7977 "params": {
7978 "workspace": "flagon-io"
7979 },
7980 "response": {
7981 "settings": {
7982 "delegated_bypass": true,
7983 "validity_checks": true
7984 },
7985 "activated": true
7986 }
7987 },
7988 "update_workspace_security_settings": {
7989 "params": {
7990 "workspace": "flagon-io"
7991 },
7992 "request": {
7993 "delegated_bypass": true
7994 },
7995 "response": {
7996 "settings": {
7997 "delegated_bypass": true,
7998 "validity_checks": true
7999 },
8000 "activated": true
8001 }
8002 },
8003 "get_security_overview": {
8004 "params": {
8005 "workspace": "flagon-io"
8006 },
8007 "query": {
8008 "days": "30"
8009 },
8010 "response": {
8011 "activated": true,
8012 "private_hidden": 0,
8013 "totals": [
8014 {
8015 "alert_type": "secret_scanning",
8016 "open": {
8017 "critical": 1,
8018 "high": 0,
8019 "medium": 0,
8020 "low": 0,
8021 "unknown": 0
8022 },
8023 "opened": 2,
8024 "closed": 1
8025 },
8026 {
8027 "alert_type": "code_scanning",
8028 "open": {
8029 "critical": 0,
8030 "high": 3,
8031 "medium": 4,
8032 "low": 0,
8033 "unknown": 0
8034 },
8035 "opened": 7,
8036 "closed": 2
8037 },
8038 {
8039 "alert_type": "vulnerability",
8040 "open": {
8041 "critical": 0,
8042 "high": 1,
8043 "medium": 2,
8044 "low": 1,
8045 "unknown": 0
8046 },
8047 "opened": 3,
8048 "closed": 5
8049 }
8050 ],
8051 "trend": [
8052 {
8053 "day": "2026-10-05",
8054 "secret_scanning": 1,
8055 "code_scanning": 8,
8056 "vulnerability": 6
8057 },
8058 {
8059 "day": "2026-10-06",
8060 "secret_scanning": 1,
8061 "code_scanning": 7,
8062 "vulnerability": 4
8063 }
8064 ],
8065 "repos": [
8066 {
8067 "repo_id": "rep_01kp0a1b2c3d4e5f6g7h8j9k0m",
8068 "name": "hello",
8069 "private": true,
8070 "custom_patterns": 1,
8071 "validity_checks": true,
8072 "code_scanning_at": "2026-10-06T09:14:02.118Z",
8073 "dependency_review": true,
8074 "security_updates": true,
8075 "lockfiles": 1,
8076 "secrets": {
8077 "critical": 1,
8078 "high": 0,
8079 "medium": 0,
8080 "low": 0,
8081 "unknown": 0
8082 },
8083 "code": {
8084 "critical": 0,
8085 "high": 3,
8086 "medium": 4,
8087 "low": 0,
8088 "unknown": 0
8089 },
8090 "vulnerabilities": {
8091 "critical": 0,
8092 "high": 1,
8093 "medium": 2,
8094 "low": 1,
8095 "unknown": 0
8096 }
8097 }
8098 ]
8099 }
8100 },
8101 "create_label": {
8102 "request": {
8103 "label": "area: cli",
8104 "color": "1d76db",
8105 "description": "The command-line tool"
8106 },
8107 "response": {
8108 "name": "area: cli",
8109 "color": "1d76db",
8110 "description": "The command-line tool",
8111 "issues": 0,
8112 "pulls": 0
8113 }
8114 },
8115 "update_label": {
8116 "params": {
8117 "label": "area: cli"
8118 },
8119 "request": {
8120 "new_name": "cli",
8121 "color": "0052cc"
8122 },
8123 "response": {
8124 "name": "cli",
8125 "color": "0052cc",
8126 "description": "The command-line tool",
8127 "issues": 3,
8128 "pulls": 1
8129 },
8130 "notes": "Renaming a label renames it on every issue and pull request that carries it."
8131 },
8132 "delete_label": {
8133 "params": {
8134 "label": "wontfix"
8135 },
8136 "response": true
8137 },
8138 "add_default_labels": {
8139 "response": [
8140 {
8141 "name": "bug",
8142 "color": "d73a4a",
8143 "description": "Something isn't working",
8144 "issues": 4,
8145 "pulls": 1
8146 },
8147 {
8148 "name": "documentation",
8149 "color": "0075ca",
8150 "description": "Improvements or additions to documentation",
8151 "issues": 0,
8152 "pulls": 0
8153 }
8154 ],
8155 "notes": "Every label the repository has afterwards, shortened here. Labels it already had are left as they were."
8156 },
8157 "list_issue_labels": {
8158 "response": [
8159 {
8160 "name": "bug",
8161 "color": "d73a4a",
8162 "description": "Something isn't working",
8163 "issues": 4,
8164 "pulls": 1
8165 },
8166 {
8167 "name": "help wanted",
8168 "color": "008672",
8169 "description": "Extra attention is needed",
8170 "issues": 1,
8171 "pulls": 0
8172 }
8173 ]
8174 },
8175 "add_issue_labels": {
8176 "request": {
8177 "labels": [
8178 "help wanted"
8179 ]
8180 },
8181 "response": [
8182 "bug",
8183 "help wanted"
8184 ],
8185 "notes": "Returns its labels now, by name."
8186 },
8187 "set_issue_labels": {
8188 "request": {
8189 "labels": [
8190 "bug"
8191 ]
8192 },
8193 "response": [
8194 "bug"
8195 ]
8196 },
8197 "remove_issue_labels": {
8198 "response": []
8199 },
8200 "remove_issue_label": {
8201 "params": {
8202 "label": "help wanted"
8203 },
8204 "response": [
8205 "bug"
8206 ]
8207 },
8208 "list_milestones": {
8209 "response": [
8210 {
8211 "number": 3,
8212 "title": "Launch",
8213 "description": "Everything that has to land before the launch on October 14.",
8214 "due_on": "2026-10-14",
8215 "state": "open",
8216 "open_items": 5,
8217 "closed_items": 12,
8218 "created_at": "2026-09-20T09:00:00.000Z",
8219 "updated_at": "2026-10-06T16:12:40.118Z",
8220 "closed_at": null
8221 }
8222 ],
8223 "notes": "Open milestones soonest due first, then closed ones. Progress is closed_items out of open_items plus closed_items."
8224 },
8225 "create_milestone": {
8226 "request": {
8227 "title": "Launch",
8228 "description": "Everything that has to land before the launch on October 14.",
8229 "due_on": "2026-10-14"
8230 },
8231 "response": {
8232 "number": 3,
8233 "title": "Launch",
8234 "description": "Everything that has to land before the launch on October 14.",
8235 "due_on": "2026-10-14",
8236 "state": "open",
8237 "open_items": 0,
8238 "closed_items": 0,
8239 "created_at": "2026-09-20T09:00:00.000Z",
8240 "updated_at": "2026-09-20T09:00:00.000Z",
8241 "closed_at": null
8242 }
8243 },
8244 "update_milestone": {
8245 "params": {
8246 "milestone": 3
8247 },
8248 "request": {
8249 "state": "closed"
8250 },
8251 "response": {
8252 "number": 3,
8253 "title": "Launch",
8254 "description": "Everything that has to land before the launch on October 14.",
8255 "due_on": "2026-10-14",
8256 "state": "closed",
8257 "open_items": 0,
8258 "closed_items": 17,
8259 "created_at": "2026-09-20T09:00:00.000Z",
8260 "updated_at": "2026-10-14T18:00:00.000Z",
8261 "closed_at": "2026-10-14T18:00:00.000Z"
8262 }
8263 },
8264 "delete_milestone": {
8265 "params": {
8266 "milestone": 3
8267 },
8268 "response": true
8269 },
8270 "get_milestone": {
8271 "params": {
8272 "milestone": 3
8273 },
8274 "response": {
8275 "milestone": {
8276 "number": 3,
8277 "title": "Launch",
8278 "description": "Everything that has to land before the launch on October 14.",
8279 "due_on": "2026-10-14",
8280 "state": "open",
8281 "open_items": 5,
8282 "closed_items": 12,
8283 "created_at": "2026-09-20T09:00:00.000Z",
8284 "updated_at": "2026-10-06T16:12:40.118Z",
8285 "closed_at": null
8286 },
8287 "issues": [
8288 {
8289 "id": "iss_01m43shrzpfe49x74ga7sj1c6v",
8290 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
8291 "number": 12,
8292 "title": "Greeting should name the caller",
8293 "body": "Take a name from the first argument; fall back to world.",
8294 "labels": [
8295 "feature",
8296 "good first issue"
8297 ],
8298 "state": "open",
8299 "reason": null,
8300 "resolved_by": null,
8301 "author": {
8302 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
8303 "username": "syntaqx",
8304 "kind": "user",
8305 "verified": false,
8306 "workspaces": []
8307 },
8308 "requested_by": null,
8309 "created_at": "2026-10-01T18:04:11.482Z",
8310 "updated_at": "2026-10-01T18:09:47.305Z",
8311 "closed_at": null,
8312 "pull_count": 0,
8313 "comment_count": 0,
8314 "assignees": [
8315 "syntaqx"
8316 ],
8317 "blocked_by": [],
8318 "queued": false,
8319 "agent": null,
8320 "milestone": {
8321 "number": 3,
8322 "title": "Launch"
8323 }
8324 }
8325 ],
8326 "pulls": [
8327 {
8328 "id": "pr_01m43smh3vexsr5pmp60qwv0vs",
8329 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
8330 "number": 14,
8331 "issue": 12,
8332 "title": "Greeting should name the caller",
8333 "body": "Reads a name from the first argument. `hello ana` prints \"Hello, ana!\".",
8334 "agent": "claude-code",
8335 "runtime": "external",
8336 "status": "open",
8337 "fork": {
8338 "namespace": "pulls",
8339 "name": "pr_01m43smh3vexsr5pmp60qwv0vs"
8340 },
8341 "fork_repo_id": "rep_01m43smh5xd7aw2kq9tv0b4c8e",
8342 "branch": null,
8343 "head_commit": "9f2c4e1a7b3d5f60812a4c6e8b0d2f4a6c8e0b13",
8344 "merge_base": null,
8345 "merged_by": null,
8346 "merged_at": null,
8347 "superseded_by": null,
8348 "check_status": "passed",
8349 "files": [
8350 {
8351 "path": "src/main.rs",
8352 "additions": 6,
8353 "deletions": 2
8354 }
8355 ],
8356 "assignees": [],
8357 "reviewers": [
8358 "ana"
8359 ],
8360 "labels": [],
8361 "milestone": {
8362 "number": 3,
8363 "title": "Launch"
8364 },
8365 "base": "main",
8366 "author": {
8367 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
8368 "username": "syntaqx",
8369 "kind": "user",
8370 "verified": false,
8371 "workspaces": []
8372 },
8373 "requested_by": null,
8374 "created_at": "2026-10-01T18:20:02.117Z",
8375 "updated_at": "2026-10-01T18:35:44.902Z",
8376 "confidence": null
8377 }
8378 ]
8379 }
8380 },
8381 "update_pull_request": {
8382 "request": {
8383 "base": "release/1.x",
8384 "labels": [
8385 "bug"
8386 ]
8387 },
8388 "response": {
8389 "id": "pr_01m43smh3vexsr5pmp60qwv0vs",
8390 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
8391 "number": 14,
8392 "issue": 12,
8393 "title": "Greeting should name the caller",
8394 "body": "Reads a name from the first argument. `hello ana` prints \"Hello, ana!\".",
8395 "agent": "claude-code",
8396 "runtime": "external",
8397 "status": "open",
8398 "fork": {
8399 "namespace": "pulls",
8400 "name": "pr_01m43smh3vexsr5pmp60qwv0vs"
8401 },
8402 "fork_repo_id": "rep_01m43smh5xd7aw2kq9tv0b4c8e",
8403 "branch": null,
8404 "head_commit": "9f2c4e1a7b3d5f60812a4c6e8b0d2f4a6c8e0b13",
8405 "merge_base": null,
8406 "merged_by": null,
8407 "merged_at": null,
8408 "superseded_by": null,
8409 "check_status": "passed",
8410 "files": [
8411 {
8412 "path": "src/main.rs",
8413 "additions": 6,
8414 "deletions": 2
8415 }
8416 ],
8417 "assignees": [],
8418 "reviewers": [
8419 "ana"
8420 ],
8421 "labels": [
8422 "bug"
8423 ],
8424 "milestone": null,
8425 "base": "release/1.x",
8426 "author": {
8427 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
8428 "username": "syntaqx",
8429 "kind": "user",
8430 "verified": false,
8431 "workspaces": []
8432 },
8433 "requested_by": null,
8434 "created_at": "2026-10-01T18:20:02.117Z",
8435 "updated_at": "2026-10-01T18:35:44.902Z",
8436 "confidence": null
8437 },
8438 "notes": "A new base takes it out of the merge queue, and whether it is behind, merges cleanly and has the checks it needs is worked out against the new base."
8439 },
8440 "list_repo_rulesets": {
8441 "params": {
8442 "owner": "flagon-io",
8443 "name": "hello"
8444 },
8445 "query": {
8446 "include_parents": "true"
8447 },
8448 "response": [
8449 {
8450 "id": "rs_01kq3a8b9c0d1e2f3g4h5j6k7m",
8451 "level": "repository",
8452 "workspace": "flagon-io",
8453 "repo_id": "rep_01kq0f3a7b8c9d0e1f2g3h4j5k",
8454 "repository": "flagon-io/hello",
8455 "name": "Protect main",
8456 "enforcement": "active",
8457 "target": "branch",
8458 "conditions": {
8459 "ref_name": {
8460 "include": [
8461 "~DEFAULT_BRANCH"
8462 ],
8463 "exclude": []
8464 }
8465 },
8466 "bypass_actors": [
8467 {
8468 "kind": "role",
8469 "value": "admin",
8470 "mode": "pull_requests"
8471 }
8472 ],
8473 "rules": [
8474 {
8475 "type": "deletion",
8476 "parameters": {},
8477 "applies_to": "everyone"
8478 },
8479 {
8480 "type": "non_fast_forward",
8481 "parameters": {},
8482 "applies_to": "everyone"
8483 },
8484 {
8485 "type": "pull_request",
8486 "parameters": {
8487 "required_approvals": 1,
8488 "count_agent_approvals": true,
8489 "dismiss_stale_reviews_on_push": true,
8490 "require_code_owner_review": true,
8491 "require_last_push_approval": false,
8492 "allowed_merge_methods": []
8493 },
8494 "applies_to": "everyone"
8495 },
8496 {
8497 "type": "required_status_checks",
8498 "parameters": {
8499 "checks": [
8500 {
8501 "context": "CI",
8502 "integration": "actions"
8503 }
8504 ],
8505 "strict": true,
8506 "paths": [],
8507 "allow_bypass_on_merge": false
8508 },
8509 "applies_to": "everyone"
8510 },
8511 {
8512 "type": "pull_request",
8513 "parameters": {
8514 "required_approvals": 1,
8515 "count_agent_approvals": false,
8516 "dismiss_stale_reviews_on_push": false,
8517 "require_code_owner_review": false,
8518 "require_last_push_approval": false,
8519 "allowed_merge_methods": []
8520 },
8521 "applies_to": "agents"
8522 },
8523 {
8524 "type": "file_path_restriction",
8525 "parameters": {
8526 "restricted_file_paths": [
8527 ".g1t/workflows/**",
8528 "CODEOWNERS"
8529 ]
8530 },
8531 "applies_to": "agents"
8532 }
8533 ],
8534 "created_by": "syntaqx",
8535 "created_at": "2026-10-07T14:02:11.318Z",
8536 "updated_by": "syntaqx",
8537 "updated_at": "2026-10-07T14:02:11.318Z"
8538 },
8539 {
8540 "id": "rs_01kq3b2c3d4e5f6g7h8j9k0m1n",
8541 "level": "workspace",
8542 "workspace": "flagon-io",
8543 "name": "Release freeze",
8544 "enforcement": "evaluate",
8545 "target": "branch",
8546 "conditions": {
8547 "ref_name": {
8548 "include": [
8549 "~DEFAULT_BRANCH",
8550 "release/**"
8551 ],
8552 "exclude": []
8553 },
8554 "repository": {
8555 "include": [
8556 "~ALL"
8557 ],
8558 "exclude": [
8559 "sandbox-*"
8560 ],
8561 "visibility": "any",
8562 "topics": []
8563 }
8564 },
8565 "bypass_actors": [
8566 {
8567 "kind": "team",
8568 "value": "flagon-io/release",
8569 "mode": "always"
8570 }
8571 ],
8572 "rules": [
8573 {
8574 "type": "merge_window",
8575 "parameters": {
8576 "time_zone": "-05:00",
8577 "windows": [
8578 {
8579 "days": [
8580 "mon",
8581 "tue",
8582 "wed",
8583 "thu"
8584 ],
8585 "start": "09:00",
8586 "end": "17:00"
8587 }
8588 ],
8589 "freezes": [
8590 {
8591 "start": "2026-12-20T00:00:00Z",
8592 "end": "2027-01-04T00:00:00Z",
8593 "reason": "Holidays"
8594 }
8595 ],
8596 "exceptions": []
8597 },
8598 "applies_to": "everyone"
8599 },
8600 {
8601 "type": "cost_cap",
8602 "parameters": {
8603 "max_usd": 25
8604 },
8605 "applies_to": "agents"
8606 }
8607 ],
8608 "created_by": "syntaqx",
8609 "created_at": "2026-10-07T14:02:11.318Z",
8610 "updated_by": "syntaqx",
8611 "updated_at": "2026-10-07T14:02:11.318Z"
8612 }
8613 ],
8614 "notes": "With `include_parents`, the workspace's rulesets that hold in the repository come too, with `level` `workspace`. The ruleset made from the repository's branch protection settings has `source` `branch_protection`."
8615 },
8616 "get_repo_ruleset": {
8617 "params": {
8618 "owner": "flagon-io",
8619 "name": "hello",
8620 "id": "rs_01kq3a8b9c0d1e2f3g4h5j6k7m"
8621 },
8622 "response": {
8623 "id": "rs_01kq3a8b9c0d1e2f3g4h5j6k7m",
8624 "level": "repository",
8625 "workspace": "flagon-io",
8626 "repo_id": "rep_01kq0f3a7b8c9d0e1f2g3h4j5k",
8627 "repository": "flagon-io/hello",
8628 "name": "Protect main",
8629 "enforcement": "active",
8630 "target": "branch",
8631 "conditions": {
8632 "ref_name": {
8633 "include": [
8634 "~DEFAULT_BRANCH"
8635 ],
8636 "exclude": []
8637 }
8638 },
8639 "bypass_actors": [
8640 {
8641 "kind": "role",
8642 "value": "admin",
8643 "mode": "pull_requests"
8644 }
8645 ],
8646 "rules": [
8647 {
8648 "type": "deletion",
8649 "parameters": {},
8650 "applies_to": "everyone"
8651 },
8652 {
8653 "type": "non_fast_forward",
8654 "parameters": {},
8655 "applies_to": "everyone"
8656 },
8657 {
8658 "type": "pull_request",
8659 "parameters": {
8660 "required_approvals": 1,
8661 "count_agent_approvals": true,
8662 "dismiss_stale_reviews_on_push": true,
8663 "require_code_owner_review": true,
8664 "require_last_push_approval": false,
8665 "allowed_merge_methods": []
8666 },
8667 "applies_to": "everyone"
8668 },
8669 {
8670 "type": "required_status_checks",
8671 "parameters": {
8672 "checks": [
8673 {
8674 "context": "CI",
8675 "integration": "actions"
8676 }
8677 ],
8678 "strict": true,
8679 "paths": [],
8680 "allow_bypass_on_merge": false
8681 },
8682 "applies_to": "everyone"
8683 },
8684 {
8685 "type": "pull_request",
8686 "parameters": {
8687 "required_approvals": 1,
8688 "count_agent_approvals": false,
8689 "dismiss_stale_reviews_on_push": false,
8690 "require_code_owner_review": false,
8691 "require_last_push_approval": false,
8692 "allowed_merge_methods": []
8693 },
8694 "applies_to": "agents"
8695 },
8696 {
8697 "type": "file_path_restriction",
8698 "parameters": {
8699 "restricted_file_paths": [
8700 ".g1t/workflows/**",
8701 "CODEOWNERS"
8702 ]
8703 },
8704 "applies_to": "agents"
8705 }
8706 ],
8707 "created_by": "syntaqx",
8708 "created_at": "2026-10-07T14:02:11.318Z",
8709 "updated_by": "syntaqx",
8710 "updated_at": "2026-10-07T14:02:11.318Z"
8711 }
8712 },
8713 "create_repo_ruleset": {
8714 "params": {
8715 "owner": "flagon-io",
8716 "name": "hello"
8717 },
8718 "request": {
8719 "ruleset_name": "Protect main",
8720 "enforcement": "active",
8721 "target": "branch",
8722 "conditions": {
8723 "ref_name": {
8724 "include": [
8725 "~DEFAULT_BRANCH"
8726 ],
8727 "exclude": []
8728 }
8729 },
8730 "bypass_actors": [
8731 {
8732 "kind": "role",
8733 "value": "admin",
8734 "mode": "pull_requests"
8735 }
8736 ],
8737 "rules": [
8738 {
8739 "type": "deletion",
8740 "parameters": {},
8741 "applies_to": "everyone"
8742 },
8743 {
8744 "type": "non_fast_forward",
8745 "parameters": {},
8746 "applies_to": "everyone"
8747 },
8748 {
8749 "type": "pull_request",
8750 "parameters": {
8751 "required_approvals": 1,
8752 "count_agent_approvals": true,
8753 "dismiss_stale_reviews_on_push": true,
8754 "require_code_owner_review": true,
8755 "require_last_push_approval": false,
8756 "allowed_merge_methods": []
8757 },
8758 "applies_to": "everyone"
8759 },
8760 {
8761 "type": "required_status_checks",
8762 "parameters": {
8763 "checks": [
8764 {
8765 "context": "CI",
8766 "integration": "actions"
8767 }
8768 ],
8769 "strict": true,
8770 "paths": [],
8771 "allow_bypass_on_merge": false
8772 },
8773 "applies_to": "everyone"
8774 },
8775 {
8776 "type": "pull_request",
8777 "parameters": {
8778 "required_approvals": 1,
8779 "count_agent_approvals": false,
8780 "dismiss_stale_reviews_on_push": false,
8781 "require_code_owner_review": false,
8782 "require_last_push_approval": false,
8783 "allowed_merge_methods": []
8784 },
8785 "applies_to": "agents"
8786 },
8787 {
8788 "type": "file_path_restriction",
8789 "parameters": {
8790 "restricted_file_paths": [
8791 ".g1t/workflows/**",
8792 "CODEOWNERS"
8793 ]
8794 },
8795 "applies_to": "agents"
8796 }
8797 ]
8798 },
8799 "response": {
8800 "id": "rs_01kq3a8b9c0d1e2f3g4h5j6k7m",
8801 "level": "repository",
8802 "workspace": "flagon-io",
8803 "repo_id": "rep_01kq0f3a7b8c9d0e1f2g3h4j5k",
8804 "repository": "flagon-io/hello",
8805 "name": "Protect main",
8806 "enforcement": "active",
8807 "target": "branch",
8808 "conditions": {
8809 "ref_name": {
8810 "include": [
8811 "~DEFAULT_BRANCH"
8812 ],
8813 "exclude": []
8814 }
8815 },
8816 "bypass_actors": [
8817 {
8818 "kind": "role",
8819 "value": "admin",
8820 "mode": "pull_requests"
8821 }
8822 ],
8823 "rules": [
8824 {
8825 "type": "deletion",
8826 "parameters": {},
8827 "applies_to": "everyone"
8828 },
8829 {
8830 "type": "non_fast_forward",
8831 "parameters": {},
8832 "applies_to": "everyone"
8833 },
8834 {
8835 "type": "pull_request",
8836 "parameters": {
8837 "required_approvals": 1,
8838 "count_agent_approvals": true,
8839 "dismiss_stale_reviews_on_push": true,
8840 "require_code_owner_review": true,
8841 "require_last_push_approval": false,
8842 "allowed_merge_methods": []
8843 },
8844 "applies_to": "everyone"
8845 },
8846 {
8847 "type": "required_status_checks",
8848 "parameters": {
8849 "checks": [
8850 {
8851 "context": "CI",
8852 "integration": "actions"
8853 }
8854 ],
8855 "strict": true,
8856 "paths": [],
8857 "allow_bypass_on_merge": false
8858 },
8859 "applies_to": "everyone"
8860 },
8861 {
8862 "type": "pull_request",
8863 "parameters": {
8864 "required_approvals": 1,
8865 "count_agent_approvals": false,
8866 "dismiss_stale_reviews_on_push": false,
8867 "require_code_owner_review": false,
8868 "require_last_push_approval": false,
8869 "allowed_merge_methods": []
8870 },
8871 "applies_to": "agents"
8872 },
8873 {
8874 "type": "file_path_restriction",
8875 "parameters": {
8876 "restricted_file_paths": [
8877 ".g1t/workflows/**",
8878 "CODEOWNERS"
8879 ]
8880 },
8881 "applies_to": "agents"
8882 }
8883 ],
8884 "created_by": "syntaqx",
8885 "created_at": "2026-10-07T14:02:11.318Z",
8886 "updated_by": "syntaqx",
8887 "updated_at": "2026-10-07T14:02:11.318Z"
8888 },
8889 "notes": "Parameters left out take their defaults, and the ruleset comes back as saved: patterns trimmed, roles and teams lowercased. A pattern that does not compile, or a rule the target cannot hold (a pull request rule on tags), is refused with `invalid` and says why."
8890 },
8891 "update_repo_ruleset": {
8892 "params": {
8893 "owner": "flagon-io",
8894 "name": "hello",
8895 "id": "rs_01kq3a8b9c0d1e2f3g4h5j6k7m"
8896 },
8897 "request": {
8898 "enforcement": "evaluate"
8899 },
8900 "response": {
8901 "id": "rs_01kq3a8b9c0d1e2f3g4h5j6k7m",
8902 "level": "repository",
8903 "workspace": "flagon-io",
8904 "repo_id": "rep_01kq0f3a7b8c9d0e1f2g3h4j5k",
8905 "repository": "flagon-io/hello",
8906 "name": "Protect main",
8907 "enforcement": "evaluate",
8908 "target": "branch",
8909 "conditions": {
8910 "ref_name": {
8911 "include": [
8912 "~DEFAULT_BRANCH"
8913 ],
8914 "exclude": []
8915 }
8916 },
8917 "bypass_actors": [
8918 {
8919 "kind": "role",
8920 "value": "admin",
8921 "mode": "pull_requests"
8922 }
8923 ],
8924 "rules": [
8925 {
8926 "type": "deletion",
8927 "parameters": {},
8928 "applies_to": "everyone"
8929 },
8930 {
8931 "type": "non_fast_forward",
8932 "parameters": {},
8933 "applies_to": "everyone"
8934 },
8935 {
8936 "type": "pull_request",
8937 "parameters": {
8938 "required_approvals": 1,
8939 "count_agent_approvals": true,
8940 "dismiss_stale_reviews_on_push": true,
8941 "require_code_owner_review": true,
8942 "require_last_push_approval": false,
8943 "allowed_merge_methods": []
8944 },
8945 "applies_to": "everyone"
8946 },
8947 {
8948 "type": "required_status_checks",
8949 "parameters": {
8950 "checks": [
8951 {
8952 "context": "CI",
8953 "integration": "actions"
8954 }
8955 ],
8956 "strict": true,
8957 "paths": [],
8958 "allow_bypass_on_merge": false
8959 },
8960 "applies_to": "everyone"
8961 },
8962 {
8963 "type": "pull_request",
8964 "parameters": {
8965 "required_approvals": 1,
8966 "count_agent_approvals": false,
8967 "dismiss_stale_reviews_on_push": false,
8968 "require_code_owner_review": false,
8969 "require_last_push_approval": false,
8970 "allowed_merge_methods": []
8971 },
8972 "applies_to": "agents"
8973 },
8974 {
8975 "type": "file_path_restriction",
8976 "parameters": {
8977 "restricted_file_paths": [
8978 ".g1t/workflows/**",
8979 "CODEOWNERS"
8980 ]
8981 },
8982 "applies_to": "agents"
8983 }
8984 ],
8985 "created_by": "syntaqx",
8986 "created_at": "2026-10-07T14:02:11.318Z",
8987 "updated_by": "syntaqx",
8988 "updated_at": "2026-10-07T14:02:11.318Z"
8989 },
8990 "notes": "Fields left out stay as they are. `rules` and `bypass_actors`, when given, replace the whole list."
8991 },
8992 "delete_repo_ruleset": {
8993 "params": {
8994 "owner": "flagon-io",
8995 "name": "hello",
8996 "id": "rs_01kq3a8b9c0d1e2f3g4h5j6k7m"
8997 },
8998 "response": {
8999 "deleted": true
9000 }
9001 },
9002 "get_branch_rules": {
9003 "params": {
9004 "owner": "flagon-io",
9005 "name": "hello",
9006 "branch": "main"
9007 },
9008 "response": {
9009 "name": "main",
9010 "target": "branch",
9011 "default_branch": true,
9012 "rules": [
9013 {
9014 "type": "deletion",
9015 "parameters": {},
9016 "applies_to": "everyone",
9017 "ruleset_id": "rs_01kq3a8b9c0d1e2f3g4h5j6k7m",
9018 "ruleset_name": "Protect main",
9019 "level": "repository",
9020 "enforcement": "active"
9021 },
9022 {
9023 "type": "non_fast_forward",
9024 "parameters": {},
9025 "applies_to": "everyone",
9026 "ruleset_id": "rs_01kq3a8b9c0d1e2f3g4h5j6k7m",
9027 "ruleset_name": "Protect main",
9028 "level": "repository",
9029 "enforcement": "active"
9030 },
9031 {
9032 "type": "pull_request",
9033 "parameters": {
9034 "required_approvals": 1,
9035 "count_agent_approvals": true,
9036 "dismiss_stale_reviews_on_push": true,
9037 "require_code_owner_review": true,
9038 "require_last_push_approval": false,
9039 "allowed_merge_methods": []
9040 },
9041 "applies_to": "everyone",
9042 "ruleset_id": "rs_01kq3a8b9c0d1e2f3g4h5j6k7m",
9043 "ruleset_name": "Protect main",
9044 "level": "repository",
9045 "enforcement": "active"
9046 },
9047 {
9048 "type": "required_status_checks",
9049 "parameters": {
9050 "checks": [
9051 {
9052 "context": "CI",
9053 "integration": "actions"
9054 }
9055 ],
9056 "strict": true,
9057 "paths": [],
9058 "allow_bypass_on_merge": false
9059 },
9060 "applies_to": "everyone",
9061 "ruleset_id": "rs_01kq3a8b9c0d1e2f3g4h5j6k7m",
9062 "ruleset_name": "Protect main",
9063 "level": "repository",
9064 "enforcement": "active"
9065 },
9066 {
9067 "type": "merge_window",
9068 "parameters": {
9069 "time_zone": "-05:00",
9070 "windows": [
9071 {
9072 "days": [
9073 "mon",
9074 "tue",
9075 "wed",
9076 "thu"
9077 ],
9078 "start": "09:00",
9079 "end": "17:00"
9080 }
9081 ],
9082 "freezes": [
9083 {
9084 "start": "2026-12-20T00:00:00Z",
9085 "end": "2027-01-04T00:00:00Z",
9086 "reason": "Holidays"
9087 }
9088 ],
9089 "exceptions": []
9090 },
9091 "applies_to": "everyone",
9092 "ruleset_id": "rs_01kq3b2c3d4e5f6g7h8j9k0m1n",
9093 "ruleset_name": "Release freeze",
9094 "level": "workspace",
9095 "enforcement": "evaluate"
9096 }
9097 ],
9098 "rulesets": [
9099 {
9100 "id": "rs_01kq3a8b9c0d1e2f3g4h5j6k7m",
9101 "name": "Protect main",
9102 "level": "repository",
9103 "enforcement": "active",
9104 "bypass_actors": [
9105 {
9106 "kind": "role",
9107 "value": "admin",
9108 "mode": "pull_requests"
9109 }
9110 ]
9111 },
9112 {
9113 "id": "rs_01kq3b2c3d4e5f6g7h8j9k0m1n",
9114 "name": "Release freeze",
9115 "level": "workspace",
9116 "enforcement": "evaluate",
9117 "bypass_actors": [
9118 {
9119 "kind": "team",
9120 "value": "flagon-io/release",
9121 "mode": "always"
9122 }
9123 ]
9124 }
9125 ]
9126 },
9127 "notes": "A branch with slashes in its name is URL-encoded as one segment: `/rules/branches/release%2F1.x`. Add `?target=tag` for a tag."
9128 },
9129 "list_rule_evaluations": {
9130 "params": {
9131 "owner": "flagon-io",
9132 "name": "hello"
9133 },
9134 "query": {
9135 "problems_only": "true"
9136 },
9137 "response": {
9138 "evaluations": [
9139 {
9140 "id": "rev_01kq3c4d5e6f7g8h9j0k1m2n3p",
9141 "repo_id": "rep_01kq0f3a7b8c9d0e1f2g3h4j5k",
9142 "workspace": "flagon-io",
9143 "ruleset_id": "rs_01kq3a8b9c0d1e2f3g4h5j6k7m",
9144 "ruleset_name": "Protect main",
9145 "enforcement": "active",
9146 "action": "push",
9147 "git_ref": "refs/heads/main",
9148 "actor": "g1t",
9149 "actor_kind": "agent",
9150 "verdict": "fail",
9151 "violations": [
9152 {
9153 "rule": "pull_request",
9154 "ruleset_id": "rs_01kq3a8b9c0d1e2f3g4h5j6k7m",
9155 "ruleset_name": "Protect main",
9156 "enforcement": "active",
9157 "message": "Changes to main must be made through a pull request.",
9158 "remedy": "Push a branch, open a pull request into main, and merge it."
9159 }
9160 ],
9161 "number": null,
9162 "sha": "9f3c2a1b7e6d5c4b3a2918f7e6d5c4b3a2918f7e",
9163 "repository": "flagon-io/hello",
9164 "created_at": "2026-10-07T14:02:11.318Z"
9165 }
9166 ],
9167 "next": null,
9168 "insights": {
9169 "days": 30,
9170 "total": 214,
9171 "passed": 198,
9172 "blocked": 9,
9173 "would_block": 5,
9174 "bypassed": 2,
9175 "by_ruleset": [
9176 {
9177 "ruleset_id": "rs_01kq3a8b9c0d1e2f3g4h5j6k7m",
9178 "ruleset_name": "Protect main",
9179 "enforcement": "active",
9180 "total": 120,
9181 "blocked": 9,
9182 "would_block": 0,
9183 "bypassed": 2
9184 }
9185 ],
9186 "by_rule": [
9187 {
9188 "rule": "pull_request",
9189 "count": 7
9190 },
9191 {
9192 "rule": "non_fast_forward",
9193 "count": 2
9194 }
9195 ]
9196 }
9197 },
9198 "notes": "A `fail` of a ruleset in `evaluate` is what it would have refused. Pass `next` as `before` for the next page. `insights` counts the last 30 days."
9199 },
9200 "list_workspace_rulesets": {
9201 "params": {
9202 "workspace": "flagon-io"
9203 },
9204 "response": [
9205 {
9206 "id": "rs_01kq3b2c3d4e5f6g7h8j9k0m1n",
9207 "level": "workspace",
9208 "workspace": "flagon-io",
9209 "name": "Release freeze",
9210 "enforcement": "evaluate",
9211 "target": "branch",
9212 "conditions": {
9213 "ref_name": {
9214 "include": [
9215 "~DEFAULT_BRANCH",
9216 "release/**"
9217 ],
9218 "exclude": []
9219 },
9220 "repository": {
9221 "include": [
9222 "~ALL"
9223 ],
9224 "exclude": [
9225 "sandbox-*"
9226 ],
9227 "visibility": "any",
9228 "topics": []
9229 }
9230 },
9231 "bypass_actors": [
9232 {
9233 "kind": "team",
9234 "value": "flagon-io/release",
9235 "mode": "always"
9236 }
9237 ],
9238 "rules": [
9239 {
9240 "type": "merge_window",
9241 "parameters": {
9242 "time_zone": "-05:00",
9243 "windows": [
9244 {
9245 "days": [
9246 "mon",
9247 "tue",
9248 "wed",
9249 "thu"
9250 ],
9251 "start": "09:00",
9252 "end": "17:00"
9253 }
9254 ],
9255 "freezes": [
9256 {
9257 "start": "2026-12-20T00:00:00Z",
9258 "end": "2027-01-04T00:00:00Z",
9259 "reason": "Holidays"
9260 }
9261 ],
9262 "exceptions": []
9263 },
9264 "applies_to": "everyone"
9265 },
9266 {
9267 "type": "cost_cap",
9268 "parameters": {
9269 "max_usd": 25
9270 },
9271 "applies_to": "agents"
9272 }
9273 ],
9274 "created_by": "syntaqx",
9275 "created_at": "2026-10-07T14:02:11.318Z",
9276 "updated_by": "syntaqx",
9277 "updated_at": "2026-10-07T14:02:11.318Z"
9278 }
9279 ]
9280 },
9281 "get_workspace_ruleset": {
9282 "params": {
9283 "workspace": "flagon-io",
9284 "id": "rs_01kq3b2c3d4e5f6g7h8j9k0m1n"
9285 },
9286 "response": {
9287 "id": "rs_01kq3b2c3d4e5f6g7h8j9k0m1n",
9288 "level": "workspace",
9289 "workspace": "flagon-io",
9290 "name": "Release freeze",
9291 "enforcement": "evaluate",
9292 "target": "branch",
9293 "conditions": {
9294 "ref_name": {
9295 "include": [
9296 "~DEFAULT_BRANCH",
9297 "release/**"
9298 ],
9299 "exclude": []
9300 },
9301 "repository": {
9302 "include": [
9303 "~ALL"
9304 ],
9305 "exclude": [
9306 "sandbox-*"
9307 ],
9308 "visibility": "any",
9309 "topics": []
9310 }
9311 },
9312 "bypass_actors": [
9313 {
9314 "kind": "team",
9315 "value": "flagon-io/release",
9316 "mode": "always"
9317 }
9318 ],
9319 "rules": [
9320 {
9321 "type": "merge_window",
9322 "parameters": {
9323 "time_zone": "-05:00",
9324 "windows": [
9325 {
9326 "days": [
9327 "mon",
9328 "tue",
9329 "wed",
9330 "thu"
9331 ],
9332 "start": "09:00",
9333 "end": "17:00"
9334 }
9335 ],
9336 "freezes": [
9337 {
9338 "start": "2026-12-20T00:00:00Z",
9339 "end": "2027-01-04T00:00:00Z",
9340 "reason": "Holidays"
9341 }
9342 ],
9343 "exceptions": []
9344 },
9345 "applies_to": "everyone"
9346 },
9347 {
9348 "type": "cost_cap",
9349 "parameters": {
9350 "max_usd": 25
9351 },
9352 "applies_to": "agents"
9353 }
9354 ],
9355 "created_by": "syntaqx",
9356 "created_at": "2026-10-07T14:02:11.318Z",
9357 "updated_by": "syntaqx",
9358 "updated_at": "2026-10-07T14:02:11.318Z"
9359 }
9360 },
9361 "create_workspace_ruleset": {
9362 "params": {
9363 "workspace": "flagon-io"
9364 },
9365 "request": {
9366 "ruleset_name": "Release freeze",
9367 "enforcement": "evaluate",
9368 "target": "branch",
9369 "conditions": {
9370 "ref_name": {
9371 "include": [
9372 "~DEFAULT_BRANCH",
9373 "release/**"
9374 ],
9375 "exclude": []
9376 },
9377 "repository": {
9378 "include": [
9379 "~ALL"
9380 ],
9381 "exclude": [
9382 "sandbox-*"
9383 ],
9384 "visibility": "any",
9385 "topics": []
9386 }
9387 },
9388 "bypass_actors": [
9389 {
9390 "kind": "team",
9391 "value": "flagon-io/release",
9392 "mode": "always"
9393 }
9394 ],
9395 "rules": [
9396 {
9397 "type": "merge_window",
9398 "parameters": {
9399 "time_zone": "-05:00",
9400 "windows": [
9401 {
9402 "days": [
9403 "mon",
9404 "tue",
9405 "wed",
9406 "thu"
9407 ],
9408 "start": "09:00",
9409 "end": "17:00"
9410 }
9411 ],
9412 "freezes": [
9413 {
9414 "start": "2026-12-20T00:00:00Z",
9415 "end": "2027-01-04T00:00:00Z",
9416 "reason": "Holidays"
9417 }
9418 ],
9419 "exceptions": []
9420 },
9421 "applies_to": "everyone"
9422 },
9423 {
9424 "type": "cost_cap",
9425 "parameters": {
9426 "max_usd": 25
9427 },
9428 "applies_to": "agents"
9429 }
9430 ]
9431 },
9432 "response": {
9433 "id": "rs_01kq3b2c3d4e5f6g7h8j9k0m1n",
9434 "level": "workspace",
9435 "workspace": "flagon-io",
9436 "name": "Release freeze",
9437 "enforcement": "evaluate",
9438 "target": "branch",
9439 "conditions": {
9440 "ref_name": {
9441 "include": [
9442 "~DEFAULT_BRANCH",
9443 "release/**"
9444 ],
9445 "exclude": []
9446 },
9447 "repository": {
9448 "include": [
9449 "~ALL"
9450 ],
9451 "exclude": [
9452 "sandbox-*"
9453 ],
9454 "visibility": "any",
9455 "topics": []
9456 }
9457 },
9458 "bypass_actors": [
9459 {
9460 "kind": "team",
9461 "value": "flagon-io/release",
9462 "mode": "always"
9463 }
9464 ],
9465 "rules": [
9466 {
9467 "type": "merge_window",
9468 "parameters": {
9469 "time_zone": "-05:00",
9470 "windows": [
9471 {
9472 "days": [
9473 "mon",
9474 "tue",
9475 "wed",
9476 "thu"
9477 ],
9478 "start": "09:00",
9479 "end": "17:00"
9480 }
9481 ],
9482 "freezes": [
9483 {
9484 "start": "2026-12-20T00:00:00Z",
9485 "end": "2027-01-04T00:00:00Z",
9486 "reason": "Holidays"
9487 }
9488 ],
9489 "exceptions": []
9490 },
9491 "applies_to": "everyone"
9492 },
9493 {
9494 "type": "cost_cap",
9495 "parameters": {
9496 "max_usd": 25
9497 },
9498 "applies_to": "agents"
9499 }
9500 ],
9501 "created_by": "syntaqx",
9502 "created_at": "2026-10-07T14:02:11.318Z",
9503 "updated_by": "syntaqx",
9504 "updated_at": "2026-10-07T14:02:11.318Z"
9505 },
9506 "notes": "`conditions.repository` chooses the repositories it holds in; left out, every repository of the workspace."
9507 },
9508 "update_workspace_ruleset": {
9509 "params": {
9510 "workspace": "flagon-io",
9511 "id": "rs_01kq3b2c3d4e5f6g7h8j9k0m1n"
9512 },
9513 "request": {
9514 "enforcement": "active"
9515 },
9516 "response": {
9517 "id": "rs_01kq3b2c3d4e5f6g7h8j9k0m1n",
9518 "level": "workspace",
9519 "workspace": "flagon-io",
9520 "name": "Release freeze",
9521 "enforcement": "active",
9522 "target": "branch",
9523 "conditions": {
9524 "ref_name": {
9525 "include": [
9526 "~DEFAULT_BRANCH",
9527 "release/**"
9528 ],
9529 "exclude": []
9530 },
9531 "repository": {
9532 "include": [
9533 "~ALL"
9534 ],
9535 "exclude": [
9536 "sandbox-*"
9537 ],
9538 "visibility": "any",
9539 "topics": []
9540 }
9541 },
9542 "bypass_actors": [
9543 {
9544 "kind": "team",
9545 "value": "flagon-io/release",
9546 "mode": "always"
9547 }
9548 ],
9549 "rules": [
9550 {
9551 "type": "merge_window",
9552 "parameters": {
9553 "time_zone": "-05:00",
9554 "windows": [
9555 {
9556 "days": [
9557 "mon",
9558 "tue",
9559 "wed",
9560 "thu"
9561 ],
9562 "start": "09:00",
9563 "end": "17:00"
9564 }
9565 ],
9566 "freezes": [
9567 {
9568 "start": "2026-12-20T00:00:00Z",
9569 "end": "2027-01-04T00:00:00Z",
9570 "reason": "Holidays"
9571 }
9572 ],
9573 "exceptions": []
9574 },
9575 "applies_to": "everyone"
9576 },
9577 {
9578 "type": "cost_cap",
9579 "parameters": {
9580 "max_usd": 25
9581 },
9582 "applies_to": "agents"
9583 }
9584 ],
9585 "created_by": "syntaqx",
9586 "created_at": "2026-10-07T14:02:11.318Z",
9587 "updated_by": "syntaqx",
9588 "updated_at": "2026-10-07T14:02:11.318Z"
9589 }
9590 },
9591 "delete_workspace_ruleset": {
9592 "params": {
9593 "workspace": "flagon-io",
9594 "id": "rs_01kq3b2c3d4e5f6g7h8j9k0m1n"
9595 },
9596 "response": {
9597 "deleted": true
9598 }
9599 },
9600 "list_workspace_rule_evaluations": {
9601 "params": {
9602 "workspace": "flagon-io"
9603 },
9604 "response": {
9605 "evaluations": [
9606 {
9607 "id": "rev_01kq3c4d5e6f7g8h9j0k1m2n3p",
9608 "repo_id": "rep_01kq0f3a7b8c9d0e1f2g3h4j5k",
9609 "workspace": "flagon-io",
9610 "ruleset_id": "rs_01kq3a8b9c0d1e2f3g4h5j6k7m",
9611 "ruleset_name": "Protect main",
9612 "enforcement": "active",
9613 "action": "push",
9614 "git_ref": "refs/heads/main",
9615 "actor": "g1t",
9616 "actor_kind": "agent",
9617 "verdict": "fail",
9618 "violations": [
9619 {
9620 "rule": "pull_request",
9621 "ruleset_id": "rs_01kq3a8b9c0d1e2f3g4h5j6k7m",
9622 "ruleset_name": "Protect main",
9623 "enforcement": "active",
9624 "message": "Changes to main must be made through a pull request.",
9625 "remedy": "Push a branch, open a pull request into main, and merge it."
9626 }
9627 ],
9628 "number": null,
9629 "sha": "9f3c2a1b7e6d5c4b3a2918f7e6d5c4b3a2918f7e",
9630 "repository": "flagon-io/hello",
9631 "created_at": "2026-10-07T14:02:11.318Z"
9632 }
9633 ],
9634 "next": null,
9635 "insights": {
9636 "days": 30,
9637 "total": 214,
9638 "passed": 198,
9639 "blocked": 9,
9640 "would_block": 5,
9641 "bypassed": 2,
9642 "by_ruleset": [
9643 {
9644 "ruleset_id": "rs_01kq3a8b9c0d1e2f3g4h5j6k7m",
9645 "ruleset_name": "Protect main",
9646 "enforcement": "active",
9647 "total": 120,
9648 "blocked": 9,
9649 "would_block": 0,
9650 "bypassed": 2
9651 }
9652 ],
9653 "by_rule": [
9654 {
9655 "rule": "pull_request",
9656 "count": 7
9657 },
9658 {
9659 "rule": "non_fast_forward",
9660 "count": 2
9661 }
9662 ]
9663 }
9664 }
9665 },
9666 "list_deployments": {
9667 "params": {
9668 "owner": "flagon-io",
9669 "name": "g1t"
9670 },
9671 "query": {
9672 "environment": "production",
9673 "per_page": "2"
9674 },
9675 "response": {
9676 "deployments": [
9677 {
9678 "id": "dep_01kq8m3t5v7x9z1b3d5f7h9k2m",
9679 "environment": "production",
9680 "ref": "main",
9681 "sha": "7c1e9a4b2d6f80135ac9e2b7d4f6a8c0e1b3d5f7",
9682 "task": "deploy",
9683 "description": "Deploy",
9684 "payload": {},
9685 "transient_environment": false,
9686 "production_environment": true,
9687 "state": "success",
9688 "environment_url": "https://g1t.sh",
9689 "log_url": "https://g1t.sh/flagon-io/g1t/actions/runs/run_01kq8m2r4t6v8x0z2b4d6f8h0k",
9690 "creator": "syntaqx",
9691 "source": "actions",
9692 "run_id": "run_01kq8m2r4t6v8x0z2b4d6f8h0k",
9693 "run_url": "https://g1t.sh/flagon-io/g1t/actions/runs/run_01kq8m2r4t6v8x0z2b4d6f8h0k",
9694 "project": null,
9695 "number": null,
9696 "created_at": "2026-10-07T18:02:11.204Z",
9697 "updated_at": "2026-10-07T18:19:47.881Z"
9698 }
9699 ],
9700 "total_count": 304,
9701 "page": 1,
9702 "per_page": 2
9703 },
9704 "notes": "Every deployment of the repository in one list, wherever it ran: `source` is `api` for those reported with [`POST /repos/{owner}/{name}/deployments`](/reference/api/deployments/create-deployment/), `actions` for those a g1t Actions job with an `environment:` made, and `g1t_page` for [g1t.page](/guides/deployments/) builds, whose ids start `dpl_`. `state` is the latest status's. See [Deployments API](/guides/deployments-api/)."
9705 },
9706 "create_deployment": {
9707 "params": {
9708 "owner": "flagon-io",
9709 "name": "g1t"
9710 },
9711 "request": {
9712 "ref": "main",
9713 "environment": "staging",
9714 "description": "Deployed by the release pipeline",
9715 "payload": {
9716 "pipeline": 4182,
9717 "region": "us-east"
9718 },
9719 "state": "in_progress",
9720 "log_url": "https://ci.example.com/pipelines/4182"
9721 },
9722 "response": {
9723 "id": "dep_01kq7z9a1c3e5g7j9m1p3r5t7v",
9724 "environment": "staging",
9725 "ref": "main",
9726 "sha": "4b8d0f2a6c1e3579bd02468ace13579bdf02468a",
9727 "task": "deploy",
9728 "description": "Deployed by the release pipeline",
9729 "payload": {
9730 "pipeline": 4182,
9731 "region": "us-east"
9732 },
9733 "transient_environment": false,
9734 "production_environment": false,
9735 "state": "in_progress",
9736 "environment_url": null,
9737 "log_url": "https://ci.example.com/pipelines/4182",
9738 "creator": "flagon-io",
9739 "source": "api",
9740 "run_id": null,
9741 "run_url": null,
9742 "project": null,
9743 "number": null,
9744 "created_at": "2026-10-06T21:40:03.512Z",
9745 "updated_at": "2026-10-06T21:40:03.512Z",
9746 "statuses": [
9747 {
9748 "id": "dst_01kq7z9a1d4f6h8k0m2p4r6t8v",
9749 "deployment_id": "dep_01kq7z9a1c3e5g7j9m1p3r5t7v",
9750 "state": "in_progress",
9751 "description": "Deployed by the release pipeline",
9752 "environment_url": null,
9753 "log_url": "https://ci.example.com/pipelines/4182",
9754 "creator": "flagon-io",
9755 "created_at": "2026-10-06T21:40:03.512Z"
9756 }
9757 ]
9758 },
9759 "notes": "Report from any CI with an access token that has `deployments:write` (the CI preset has it) and the Write role. Then report each step with [`POST …/deployments/{id}/statuses`](/reference/api/deployments/create-deployment-status/). Each status sets the check `deploy / <environment>` on the commit. A g1t Actions job with an `environment:` does all of this itself. See [Deployments API](/guides/deployments-api/)."
9760 },
9761 "get_deployment": {
9762 "params": {
9763 "owner": "flagon-io",
9764 "name": "g1t",
9765 "id": "dep_01kq8m3t5v7x9z1b3d5f7h9k2m"
9766 },
9767 "response": {
9768 "id": "dep_01kq8m3t5v7x9z1b3d5f7h9k2m",
9769 "environment": "production",
9770 "ref": "main",
9771 "sha": "7c1e9a4b2d6f80135ac9e2b7d4f6a8c0e1b3d5f7",
9772 "task": "deploy",
9773 "description": "Deploy",
9774 "payload": {},
9775 "transient_environment": false,
9776 "production_environment": true,
9777 "state": "success",
9778 "environment_url": "https://g1t.sh",
9779 "log_url": "https://g1t.sh/flagon-io/g1t/actions/runs/run_01kq8m2r4t6v8x0z2b4d6f8h0k",
9780 "creator": "syntaqx",
9781 "source": "actions",
9782 "run_id": "run_01kq8m2r4t6v8x0z2b4d6f8h0k",
9783 "run_url": "https://g1t.sh/flagon-io/g1t/actions/runs/run_01kq8m2r4t6v8x0z2b4d6f8h0k",
9784 "project": null,
9785 "number": null,
9786 "created_at": "2026-10-07T18:02:11.204Z",
9787 "updated_at": "2026-10-07T18:19:47.881Z",
9788 "statuses": [
9789 {
9790 "id": "dst_01kq8m3t5w0a2c4e6g8j0m2p4r",
9791 "deployment_id": "dep_01kq8m3t5v7x9z1b3d5f7h9k2m",
9792 "state": "in_progress",
9793 "description": "Deploy is deploying",
9794 "environment_url": "https://g1t.sh",
9795 "log_url": "https://g1t.sh/flagon-io/g1t/actions/runs/run_01kq8m2r4t6v8x0z2b4d6f8h0k",
9796 "creator": "syntaqx",
9797 "created_at": "2026-10-07T18:02:11.204Z"
9798 },
9799 {
9800 "id": "dst_01kq8n4v6x8z0b2d4f6h8k0m2p",
9801 "deployment_id": "dep_01kq8m3t5v7x9z1b3d5f7h9k2m",
9802 "state": "success",
9803 "description": "Deploy deployed",
9804 "environment_url": "https://g1t.sh",
9805 "log_url": "https://g1t.sh/flagon-io/g1t/actions/runs/run_01kq8m2r4t6v8x0z2b4d6f8h0k",
9806 "creator": "syntaqx",
9807 "created_at": "2026-10-07T18:19:47.881Z"
9808 }
9809 ]
9810 },
9811 "notes": "`statuses` are oldest first. A g1t.page build's (`dpl_…`) are read from the build: queued, building, how it ended, and `inactive` once a newer build replaced it or it was taken down."
9812 },
9813 "list_deployment_statuses": {
9814 "params": {
9815 "owner": "flagon-io",
9816 "name": "g1t",
9817 "id": "dep_01kq8m3t5v7x9z1b3d5f7h9k2m"
9818 },
9819 "response": [
9820 {
9821 "id": "dst_01kq8n4v6x8z0b2d4f6h8k0m2p",
9822 "deployment_id": "dep_01kq8m3t5v7x9z1b3d5f7h9k2m",
9823 "state": "success",
9824 "description": "Deploy deployed",
9825 "environment_url": "https://g1t.sh",
9826 "log_url": "https://g1t.sh/flagon-io/g1t/actions/runs/run_01kq8m2r4t6v8x0z2b4d6f8h0k",
9827 "creator": "syntaqx",
9828 "created_at": "2026-10-07T18:19:47.881Z"
9829 },
9830 {
9831 "id": "dst_01kq8m3t5w0a2c4e6g8j0m2p4r",
9832 "deployment_id": "dep_01kq8m3t5v7x9z1b3d5f7h9k2m",
9833 "state": "in_progress",
9834 "description": "Deploy is deploying",
9835 "environment_url": "https://g1t.sh",
9836 "log_url": "https://g1t.sh/flagon-io/g1t/actions/runs/run_01kq8m2r4t6v8x0z2b4d6f8h0k",
9837 "creator": "syntaqx",
9838 "created_at": "2026-10-07T18:02:11.204Z"
9839 }
9840 ]
9841 },
9842 "create_deployment_status": {
9843 "params": {
9844 "owner": "flagon-io",
9845 "name": "g1t",
9846 "id": "dep_01kq7z9a1c3e5g7j9m1p3r5t7v"
9847 },
9848 "request": {
9849 "state": "failure",
9850 "description": "Smoke tests failed",
9851 "log_url": "https://ci.example.com/pipelines/4182"
9852 },
9853 "response": {
9854 "id": "dst_01kq7zc2e4g6j8m0p2r4t6v8x0",
9855 "deployment_id": "dep_01kq7z9a1c3e5g7j9m1p3r5t7v",
9856 "state": "failure",
9857 "description": "Smoke tests failed",
9858 "environment_url": null,
9859 "log_url": "https://ci.example.com/pipelines/4182",
9860 "creator": "flagon-io",
9861 "created_at": "2026-10-06T21:44:58.020Z"
9862 },
9863 "notes": "`queued` and `in_progress` set the commit's `deploy / <environment>` check pending; `success`, `failure` and `error` settle it; `inactive` leaves it. A success makes the environment's older successful deployments `inactive` unless `auto_inactive` is false. A g1t.page build (`dpl_…`) answers `409`: its statuses come from the build."
9864 },
9865 "list_environments": {
9866 "params": {
9867 "owner": "flagon-io",
9868 "name": "g1t"
9869 },
9870 "response": {
9871 "total_count": 304,
9872 "environments": [
9873 {
9874 "name": "production",
9875 "url": "https://g1t.sh",
9876 "production_environment": true,
9877 "transient_environment": false,
9878 "deployments_count": 281,
9879 "latest": {
9880 "id": "dep_01kq8m3t5v7x9z1b3d5f7h9k2m",
9881 "environment": "production",
9882 "ref": "main",
9883 "sha": "7c1e9a4b2d6f80135ac9e2b7d4f6a8c0e1b3d5f7",
9884 "task": "deploy",
9885 "description": "Deploy",
9886 "payload": {},
9887 "transient_environment": false,
9888 "production_environment": true,
9889 "state": "success",
9890 "environment_url": "https://g1t.sh",
9891 "log_url": "https://g1t.sh/flagon-io/g1t/actions/runs/run_01kq8m2r4t6v8x0z2b4d6f8h0k",
9892 "creator": "syntaqx",
9893 "source": "actions",
9894 "run_id": "run_01kq8m2r4t6v8x0z2b4d6f8h0k",
9895 "run_url": "https://g1t.sh/flagon-io/g1t/actions/runs/run_01kq8m2r4t6v8x0z2b4d6f8h0k",
9896 "project": null,
9897 "number": null,
9898 "created_at": "2026-10-07T18:02:11.204Z",
9899 "updated_at": "2026-10-07T18:19:47.881Z"
9900 },
9901 "current": {
9902 "id": "dep_01kq8m3t5v7x9z1b3d5f7h9k2m",
9903 "environment": "production",
9904 "ref": "main",
9905 "sha": "7c1e9a4b2d6f80135ac9e2b7d4f6a8c0e1b3d5f7",
9906 "task": "deploy",
9907 "description": "Deploy",
9908 "payload": {},
9909 "transient_environment": false,
9910 "production_environment": true,
9911 "state": "success",
9912 "environment_url": "https://g1t.sh",
9913 "log_url": "https://g1t.sh/flagon-io/g1t/actions/runs/run_01kq8m2r4t6v8x0z2b4d6f8h0k",
9914 "creator": "syntaqx",
9915 "source": "actions",
9916 "run_id": "run_01kq8m2r4t6v8x0z2b4d6f8h0k",
9917 "run_url": "https://g1t.sh/flagon-io/g1t/actions/runs/run_01kq8m2r4t6v8x0z2b4d6f8h0k",
9918 "project": null,
9919 "number": null,
9920 "created_at": "2026-10-07T18:02:11.204Z",
9921 "updated_at": "2026-10-07T18:19:47.881Z"
9922 },
9923 "updated_at": "2026-10-07T18:19:47.881Z"
9924 },
9925 {
9926 "name": "staging",
9927 "url": null,
9928 "production_environment": false,
9929 "transient_environment": false,
9930 "deployments_count": 19,
9931 "latest": {
9932 "id": "dep_01kq7z9a1c3e5g7j9m1p3r5t7v",
9933 "environment": "staging",
9934 "ref": "main",
9935 "sha": "4b8d0f2a6c1e3579bd02468ace13579bdf02468a",
9936 "task": "deploy",
9937 "description": "Deployed by the release pipeline",
9938 "payload": {
9939 "pipeline": 4182,
9940 "region": "us-east"
9941 },
9942 "transient_environment": false,
9943 "production_environment": false,
9944 "state": "failure",
9945 "environment_url": null,
9946 "log_url": "https://ci.example.com/pipelines/4182",
9947 "creator": "flagon-io",
9948 "source": "api",
9949 "run_id": null,
9950 "run_url": null,
9951 "project": null,
9952 "number": null,
9953 "created_at": "2026-10-06T21:40:03.512Z",
9954 "updated_at": "2026-10-06T21:44:58.020Z"
9955 },
9956 "current": null,
9957 "updated_at": "2026-10-06T21:44:58.020Z"
9958 }
9959 ]
9960 },
9961 "notes": "Production comes first, then the most recently deployed. `latest` is the newest deployment whatever its state; `current` is the newest that succeeded and is still active, and `url` is where it is served."
9962 },
9963 "get_environment": {
9964 "params": {
9965 "owner": "flagon-io",
9966 "name": "docs",
9967 "environment": "preview"
9968 },
9969 "response": {
9970 "name": "preview",
9971 "url": "https://docs-git-docs-deployments-flagon-io.g1t.page",
9972 "production_environment": false,
9973 "transient_environment": true,
9974 "deployments_count": 87,
9975 "latest": {
9976 "id": "dpl_01kq8p2b4d6f8h0k2m4p6r8t0v",
9977 "environment": "preview",
9978 "ref": "docs-deployments",
9979 "sha": "e2f4a6c8b0d1e3f5a7c9b1d3e5f7a9c1b3d5e7f9",
9980 "task": "deploy",
9981 "description": "Preview of docs-deployments on g1t.page",
9982 "payload": {},
9983 "transient_environment": true,
9984 "production_environment": false,
9985 "state": "success",
9986 "environment_url": "https://docs-git-docs-deployments-flagon-io.g1t.page",
9987 "log_url": "https://g1t.sh/flagon-io/docs/deployments/dpl_01kq8p2b4d6f8h0k2m4p6r8t0v",
9988 "creator": "syntaqx",
9989 "source": "g1t_page",
9990 "run_id": null,
9991 "run_url": null,
9992 "project": "docs",
9993 "number": 412,
9994 "created_at": "2026-10-08T01:12:44.630Z",
9995 "updated_at": "2026-10-08T01:13:52.101Z"
9996 },
9997 "current": {
9998 "id": "dpl_01kq8p2b4d6f8h0k2m4p6r8t0v",
9999 "environment": "preview",
10000 "ref": "docs-deployments",
10001 "sha": "e2f4a6c8b0d1e3f5a7c9b1d3e5f7a9c1b3d5e7f9",
10002 "task": "deploy",
10003 "description": "Preview of docs-deployments on g1t.page",
10004 "payload": {},
10005 "transient_environment": true,
10006 "production_environment": false,
10007 "state": "success",
10008 "environment_url": "https://docs-git-docs-deployments-flagon-io.g1t.page",
10009 "log_url": "https://g1t.sh/flagon-io/docs/deployments/dpl_01kq8p2b4d6f8h0k2m4p6r8t0v",
10010 "creator": "syntaqx",
10011 "source": "g1t_page",
10012 "run_id": null,
10013 "run_url": null,
10014 "project": "docs",
10015 "number": 412,
10016 "created_at": "2026-10-08T01:12:44.630Z",
10017 "updated_at": "2026-10-08T01:13:52.101Z"
10018 },
10019 "updated_at": "2026-10-08T01:13:52.101Z"
10020 }
10021 },
10022 "update_environment": {
10023 "params": {
10024 "owner": "flagon-io",
10025 "name": "g1t",
10026 "environment": "production"
10027 },
10028 "request": {
10029 "wait_timer": 10,
10030 "prevent_self_review": true,
10031 "reviewers": [
10032 {
10033 "type": "User",
10034 "name": "syntaqx"
10035 },
10036 {
10037 "type": "Team",
10038 "name": "deployers"
10039 }
10040 ],
10041 "deployment_branch_policy": {
10042 "protected_branches": true,
10043 "custom_branch_policies": false
10044 }
10045 },
10046 "response": {
10047 "name": "production",
10048 "protection_rules": [
10049 {
10050 "type": "required_reviewers",
10051 "prevent_self_review": true,
10052 "reviewers": [
10053 {
10054 "type": "User",
10055 "reviewer": {
10056 "login": "syntaqx"
10057 }
10058 },
10059 {
10060 "type": "Team",
10061 "reviewer": {
10062 "slug": "deployers"
10063 }
10064 }
10065 ]
10066 },
10067 {
10068 "type": "wait_timer",
10069 "wait_timer": 10
10070 },
10071 {
10072 "type": "branch_policy"
10073 }
10074 ],
10075 "deployment_branch_policy": {
10076 "protected_branches": true,
10077 "custom_branch_policies": false
10078 },
10079 "branch_policies": [],
10080 "can_admins_bypass": true,
10081 "protected": true,
10082 "updated_at": "2026-10-08T09:12:44.103Z",
10083 "updated_by": "syntaqx"
10084 },
10085 "notes": "Fields left out stay as they are. A job with `environment: production` now waits for syntaqx or someone in deployers to approve it, then ten minutes, and runs only on a protected branch."
10086 },
10087 "delete_environment": {
10088 "params": {
10089 "owner": "flagon-io",
10090 "name": "g1t",
10091 "environment": "staging"
10092 },
10093 "response": {
10094 "deleted": true
10095 }
10096 },
10097 "get_pending_deployments": {
10098 "params": {
10099 "owner": "flagon-io",
10100 "name": "g1t",
10101 "id": "run_01kq9b3d5f7h9k1n3q5s7u9w1y"
10102 },
10103 "response": [
10104 {
10105 "environment": {
10106 "name": "production"
10107 },
10108 "state": "waiting",
10109 "needs_review": true,
10110 "wait_until": "2026-10-08T09:31:02.551Z",
10111 "current_user_can_approve": true,
10112 "reviewers": [
10113 {
10114 "type": "User",
10115 "reviewer": {
10116 "login": "syntaqx"
10117 }
10118 },
10119 {
10120 "type": "Team",
10121 "reviewer": {
10122 "slug": "deployers"
10123 }
10124 }
10125 ],
10126 "jobs": [
10127 "Deploy the core services"
10128 ],
10129 "reviewed_by": null,
10130 "comment": null,
10131 "reviewed_at": null
10132 }
10133 ]
10134 },
10135 "review_pending_deployments": {
10136 "params": {
10137 "owner": "flagon-io",
10138 "name": "g1t",
10139 "id": "run_01kq9b3d5f7h9k1n3q5s7u9w1y"
10140 },
10141 "request": {
10142 "environment_names": [
10143 "production"
10144 ],
10145 "state": "approved",
10146 "comment": "Release notes checked."
10147 },
10148 "response": [
10149 {
10150 "environment": {
10151 "name": "production"
10152 },
10153 "state": "approved",
10154 "needs_review": true,
10155 "wait_until": "2026-10-08T09:31:02.551Z",
10156 "current_user_can_approve": false,
10157 "reviewers": [
10158 {
10159 "type": "User",
10160 "reviewer": {
10161 "login": "syntaqx"
10162 }
10163 },
10164 {
10165 "type": "Team",
10166 "reviewer": {
10167 "slug": "deployers"
10168 }
10169 }
10170 ],
10171 "jobs": [
10172 "Deploy the core services"
10173 ],
10174 "reviewed_by": "syntaqx",
10175 "comment": "Release notes checked.",
10176 "reviewed_at": "2026-10-08T09:22:15.871Z"
10177 }
10178 ],
10179 "notes": "The jobs still wait for the wait timer, until `wait_until`, unless an admin approved past the rules."
10180 },
10181 "approve_workflow_run": {
10182 "params": {
10183 "owner": "flagon-io",
10184 "name": "g1t",
10185 "id": "run_01kq9a2c4e6g8j0m2p4r6t8v0x"
10186 },
10187 "response": {
10188 "id": "run_01kq9a2c4e6g8j0m2p4r6t8v0x",
10189 "workflow_id": "wfl_01kpw2c5d8e1f4g7h0j3k6m9np",
10190 "path": ".g1t/workflows/ci.yml",
10191 "name": "CI",
10192 "title": "Fix a typo in the README",
10193 "number": 41,
10194 "attempt": 1,
10195 "event": "pull_request",
10196 "ref": "refs/pull/88/merge",
10197 "sha": "4c1e7a9b2d5f8e0a3c6b9d2f5a8c1e4b7d0f3a6c",
10198 "pull": 88,
10199 "status": "queued",
10200 "conclusion": null,
10201 "error": null,
10202 "actor": "octo-fan",
10203 "created_at": "2026-10-08T08:02:11.004Z",
10204 "started_at": null,
10205 "finished_at": null
10206 }
10207 },
10208 "get_workflow_permissions": {
10209 "params": {
10210 "owner": "flagon-io",
10211 "name": "g1t"
10212 },
10213 "response": {
10214 "default_workflow_permissions": "read",
10215 "default_chosen": true,
10216 "max_workflow_permissions": "write",
10217 "can_approve_pull_request_reviews": false
10218 }
10219 },
10220 "set_workflow_permissions": {
10221 "params": {
10222 "owner": "flagon-io",
10223 "name": "g1t"
10224 },
10225 "request": {
10226 "default_workflow_permissions": "write"
10227 },
10228 "response": {
10229 "default_workflow_permissions": "write",
10230 "default_chosen": true,
10231 "max_workflow_permissions": "write",
10232 "can_approve_pull_request_reviews": false
10233 }
10234 },
10235 "get_fork_pr_approval": {
10236 "params": {
10237 "owner": "flagon-io",
10238 "name": "g1t"
10239 },
10240 "response": {
10241 "approval_policy": "outside_contributors"
10242 }
10243 },
10244 "set_fork_pr_approval": {
10245 "params": {
10246 "owner": "flagon-io",
10247 "name": "g1t"
10248 },
10249 "request": {
10250 "approval_policy": "all_external_contributors"
10251 },
10252 "response": {
10253 "approval_policy": "all_external_contributors"
10254 }
10255 },
10256 "create_repository_dispatch": {
10257 "params": {
10258 "owner": "flagon-io",
10259 "name": "g1t"
10260 },
10261 "request": {
10262 "event_type": "docs-published",
10263 "client_payload": {
10264 "version": "2026.10.08"
10265 }
10266 },
10267 "response": {
10268 "runs": 1
10269 }
10270 },
10271 "get_workspace_workflow_permissions": {
10272 "params": {
10273 "workspace": "flagon-io"
10274 },
10275 "response": {
10276 "default_workflow_permissions": "read",
10277 "max_workflow_permissions": "write",
10278 "can_approve_pull_request_reviews": false
10279 }
10280 },
10281 "set_workspace_workflow_permissions": {
10282 "params": {
10283 "workspace": "flagon-io"
10284 },
10285 "request": {
10286 "max_workflow_permissions": "read"
10287 },
10288 "response": {
10289 "default_workflow_permissions": "read",
10290 "max_workflow_permissions": "read",
10291 "can_approve_pull_request_reviews": false
10292 },
10293 "notes": "A maximum of read holds every repository's default to read-only, and makes the workspace's default read too."
10294 },
10295 "get_languages": {
10296 "response": {
10297 "head": "9f3c2a1b7e5d4c3b2a19f8e7d6c5b4a39281706f",
10298 "commit": "9f3c2a1b7e5d4c3b2a19f8e7d6c5b4a39281706f",
10299 "computed_at": "2026-10-07T09:14:03.000Z",
10300 "pending": false,
10301 "partial": false,
10302 "languages": [
10303 {
10304 "name": "Rust",
10305 "color": "#dea584",
10306 "bytes": 184213,
10307 "percent": 71.4
10308 },
10309 {
10310 "name": "TypeScript",
10311 "color": "#3178c6",
10312 "bytes": 61022,
10313 "percent": 23.7
10314 },
10315 {
10316 "name": "Shell",
10317 "color": "#89e051",
10318 "bytes": 12650,
10319 "percent": 4.9
10320 }
10321 ]
10322 },
10323 "notes": "While `pending` is true, `languages` is empty: the default branch is being read for the first time. When `commit` is not `head`, the answer is for an older commit while the newer one is read."
10324 },
10325 "list_contributors": {
10326 "response": {
10327 "head": "9f3c2a1b7e5d4c3b2a19f8e7d6c5b4a39281706f",
10328 "commit": "9f3c2a1b7e5d4c3b2a19f8e7d6c5b4a39281706f",
10329 "computed_at": "2026-10-07T09:14:03.000Z",
10330 "pending": false,
10331 "partial": false,
10332 "total": 3,
10333 "commits": 126,
10334 "contributors": [
10335 {
10336 "kind": "g1t",
10337 "name": "g1t",
10338 "username": null,
10339 "avatar": null,
10340 "commits": 71,
10341 "first_at": "2026-09-29T08:00:00.000Z",
10342 "last_at": "2026-10-07T08:41:00.000Z",
10343 "weeks": [
10344 {
10345 "week": "2026-09-28",
10346 "commits": 40
10347 },
10348 {
10349 "week": "2026-10-05",
10350 "commits": 31
10351 }
10352 ]
10353 },
10354 {
10355 "kind": "user",
10356 "name": "ada",
10357 "username": "ada",
10358 "avatar": "5f2b8c1d9e7a3f6b4c0d2e8a1b9c7d5e3f1a0b2c4d6e8f0a1b3c5d7e9f0a2b4c",
10359 "commits": 52,
10360 "first_at": "2026-09-28T14:11:52.000Z",
10361 "last_at": "2026-10-06T16:02:11.000Z",
10362 "weeks": [
10363 {
10364 "week": "2026-09-28",
10365 "commits": 30
10366 },
10367 {
10368 "week": "2026-10-05",
10369 "commits": 22
10370 }
10371 ]
10372 },
10373 {
10374 "kind": "author",
10375 "name": "Sam Okafor",
10376 "username": null,
10377 "avatar": null,
10378 "commits": 3,
10379 "first_at": "2026-10-02T11:20:00.000Z",
10380 "last_at": "2026-10-03T09:05:00.000Z",
10381 "weeks": [
10382 {
10383 "week": "2026-09-28",
10384 "commits": 3
10385 }
10386 ]
10387 }
10388 ],
10389 "weeks": [
10390 {
10391 "week": "2026-09-28",
10392 "commits": 73
10393 },
10394 {
10395 "week": "2026-10-05",
10396 "commits": 53
10397 }
10398 ]
10399 },
10400 "notes": "Read from the newest 3,000 commits of the default branch. A person's addresses count as one when they confirmed them on their account; their noreply address counts too."
10401 },
10402 "get_license": {
10403 "response": {
10404 "spdx_id": "MIT",
10405 "name": "MIT License",
10406 "path": "LICENSE"
10407 }
10408 },
10409 "list_stargazers": {
10410 "query": {
10411 "page": 1
10412 },
10413 "response": [
10414 {
10415 "username": "ada",
10416 "avatar": null,
10417 "starred_at": "2026-10-06T18:30:00.000Z"
10418 },
10419 {
10420 "username": "sam",
10421 "avatar": null,
10422 "starred_at": "2026-10-02T09:12:00.000Z"
10423 }
10424 ]
10425 },
10426 "list_starred": {
10427 "response": [
10428 {
10429 "repo": {
10430 "id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
10431 "namespace": "flagon-io",
10432 "name": "hello",
10433 "description": "A tiny service that says hello.",
10434 "is_private": false,
10435 "owner_id": "usr_01kkntcg1eeb98j62xjm7eh09p",
10436 "default_branch": "main",
10437 "fork_of": null,
10438 "protected": true,
10439 "created_at": "2026-09-28T14:11:52.640Z",
10440 "topics": [
10441 "cli"
10442 ],
10443 "website": "https://hello.g1t.page",
10444 "archived_at": null
10445 },
10446 "starred_at": "2026-10-06T18:30:00.000Z",
10447 "stars": 12
10448 }
10449 ]
10450 },
10451 "check_starred": {
10452 "response": {
10453 "starred": true,
10454 "stars": 12
10455 }
10456 },
10457 "star_repo": {
10458 "response": {
10459 "starred": true,
10460 "stars": 13
10461 }
10462 },
10463 "unstar_repo": {
10464 "response": {
10465 "starred": false,
10466 "stars": 12
10467 }
10468 },
10469 "list_releases": {
10470 "response": [
10471 {
10472 "id": "rel_01m4a2b7c9d3e5f7g9h1j3k5m7",
10473 "tag_name": "v1.2.0",
10474 "target": "9f3c2a1b7e5d4c3b2a19f8e7d6c5b4a39281706f",
10475 "name": "Greetings by name",
10476 "body": "## What changed\n\n- `hello` greets the caller by name (#12)\n- Faster start-up (#15)",
10477 "draft": false,
10478 "prerelease": false,
10479 "author": "ada",
10480 "created_at": "2026-10-06T16:02:11.000Z",
10481 "published_at": "2026-10-06T16:02:11.000Z",
10482 "latest": true
10483 },
10484 {
10485 "id": "rel_01m3x8q2w4e6r8t0y2u4i6o8p0",
10486 "tag_name": "v1.1.0",
10487 "target": "3b2a19f8e7d6c5b4a392817069f3c2a1b7e5d4c3",
10488 "name": "First release",
10489 "body": "The first release.",
10490 "draft": false,
10491 "prerelease": false,
10492 "author": "ada",
10493 "created_at": "2026-09-30T10:00:00.000Z",
10494 "published_at": "2026-09-30T10:00:00.000Z",
10495 "latest": false
10496 }
10497 ],
10498 "notes": "Drafts are listed only to those with the Write role; their `published_at` is null."
10499 },
10500 "get_latest_release": {
10501 "response": {
10502 "id": "rel_01m4a2b7c9d3e5f7g9h1j3k5m7",
10503 "tag_name": "v1.2.0",
10504 "target": "9f3c2a1b7e5d4c3b2a19f8e7d6c5b4a39281706f",
10505 "name": "Greetings by name",
10506 "body": "## What changed\n\n- `hello` greets the caller by name (#12)\n- Faster start-up (#15)",
10507 "draft": false,
10508 "prerelease": false,
10509 "author": "ada",
10510 "created_at": "2026-10-06T16:02:11.000Z",
10511 "published_at": "2026-10-06T16:02:11.000Z",
10512 "latest": true
10513 }
10514 },
10515 "get_release_by_tag": {
10516 "params": {
10517 "tag": "v1.2.0"
10518 },
10519 "response": {
10520 "id": "rel_01m4a2b7c9d3e5f7g9h1j3k5m7",
10521 "tag_name": "v1.2.0",
10522 "target": "9f3c2a1b7e5d4c3b2a19f8e7d6c5b4a39281706f",
10523 "name": "Greetings by name",
10524 "body": "## What changed\n\n- `hello` greets the caller by name (#12)\n- Faster start-up (#15)",
10525 "draft": false,
10526 "prerelease": false,
10527 "author": "ada",
10528 "created_at": "2026-10-06T16:02:11.000Z",
10529 "published_at": "2026-10-06T16:02:11.000Z",
10530 "latest": true
10531 }
10532 },
10533 "get_release": {
10534 "params": {
10535 "id": "rel_01m4a2b7c9d3e5f7g9h1j3k5m7"
10536 },
10537 "response": {
10538 "id": "rel_01m4a2b7c9d3e5f7g9h1j3k5m7",
10539 "tag_name": "v1.2.0",
10540 "target": "9f3c2a1b7e5d4c3b2a19f8e7d6c5b4a39281706f",
10541 "name": "Greetings by name",
10542 "body": "## What changed\n\n- `hello` greets the caller by name (#12)\n- Faster start-up (#15)",
10543 "draft": false,
10544 "prerelease": false,
10545 "author": "ada",
10546 "created_at": "2026-10-06T16:02:11.000Z",
10547 "published_at": "2026-10-06T16:02:11.000Z",
10548 "latest": true
10549 }
10550 },
10551 "create_release": {
10552 "request": {
10553 "tag_name": "v1.2.0",
10554 "target": "main",
10555 "release_name": "Greetings by name",
10556 "body": "## What changed\n\n- `hello` greets the caller by name (#12)\n- Faster start-up (#15)",
10557 "draft": false,
10558 "prerelease": false
10559 },
10560 "response": {
10561 "id": "rel_01m4a2b7c9d3e5f7g9h1j3k5m7",
10562 "tag_name": "v1.2.0",
10563 "target": "9f3c2a1b7e5d4c3b2a19f8e7d6c5b4a39281706f",
10564 "name": "Greetings by name",
10565 "body": "## What changed\n\n- `hello` greets the caller by name (#12)\n- Faster start-up (#15)",
10566 "draft": false,
10567 "prerelease": false,
10568 "author": "ada",
10569 "created_at": "2026-10-06T16:02:11.000Z",
10570 "published_at": "2026-10-06T16:02:11.000Z",
10571 "latest": true
10572 },
10573 "notes": "A tag that already exists is released as it is, and `target` is ignored. One release per tag: releasing a tag again is refused with `conflict`."
10574 },
10575 "update_release": {
10576 "params": {
10577 "id": "rel_01m4a2b7c9d3e5f7g9h1j3k5m7"
10578 },
10579 "request": {
10580 "body": "## What changed\n\n- `hello` greets the caller by name (#12)\n- Faster start-up (#15)\n- Docs for `--name`"
10581 },
10582 "response": {
10583 "id": "rel_01m4a2b7c9d3e5f7g9h1j3k5m7",
10584 "tag_name": "v1.2.0",
10585 "target": "9f3c2a1b7e5d4c3b2a19f8e7d6c5b4a39281706f",
10586 "name": "Greetings by name",
10587 "body": "## What changed\n\n- `hello` greets the caller by name (#12)\n- Faster start-up (#15)\n- Docs for `--name`",
10588 "draft": false,
10589 "prerelease": false,
10590 "author": "ada",
10591 "created_at": "2026-10-06T16:02:11.000Z",
10592 "published_at": "2026-10-06T16:02:11.000Z",
10593 "latest": true
10594 }
10595 },
10596 "delete_release": {
10597 "params": {
10598 "id": "rel_01m4a2b7c9d3e5f7g9h1j3k5m7"
10599 },
10600 "response": {
10601 "deleted": true
10602 }
10603 },
10604 "create_commit_status": {
10605 "params": {
10606 "owner": "flagon-io",
10607 "name": "hello",
10608 "sha": "9f3c2a1b7e6d5c4b3a2918f7e6d5c4b3a2918f7e"
10609 },
10610 "request": {
10611 "state": "success",
10612 "context": "ci/build",
10613 "description": "Build #4821 passed",
10614 "target_url": "https://ci.example.com/builds/4821"
10615 },
10616 "response": {
10617 "context": "ci/build",
10618 "state": "success",
10619 "description": "Build #4821 passed",
10620 "target_url": "https://ci.example.com/builds/4821",
10621 "updated_at": "2026-10-07T14:03:02.118Z",
10622 "source": "api"
10623 },
10624 "notes": "Setting a context again replaces its status on that commit. A status counts as a check: a required check named `ci/build`, in branch protection or a ruleset's `required_status_checks`, is met by it, and a ruleset check pinned to the `api` integration only by statuses and check runs reported through the API. See the [Checks guide](/guides/checks/)."
10625 },
10626 "list_commit_statuses": {
10627 "params": {
10628 "owner": "flagon-io",
10629 "name": "hello",
10630 "ref": "main"
10631 },
10632 "response": [
10633 {
10634 "context": "ci/build",
10635 "state": "success",
10636 "description": "Build #4821 passed",
10637 "target_url": "https://ci.example.com/builds/4821",
10638 "updated_at": "2026-10-07T14:03:02.118Z",
10639 "source": "api"
10640 }
10641 ]
10642 },
10643 "get_combined_status": {
10644 "params": {
10645 "owner": "flagon-io",
10646 "name": "hello",
10647 "ref": "main"
10648 },
10649 "response": {
10650 "state": "success",
10651 "sha": "9f3c2a1b7e6d5c4b3a2918f7e6d5c4b3a2918f7e",
10652 "total_count": 1,
10653 "statuses": [
10654 {
10655 "context": "ci/build",
10656 "state": "success",
10657 "description": "Build #4821 passed",
10658 "target_url": "https://ci.example.com/builds/4821",
10659 "updated_at": "2026-10-07T14:03:02.118Z",
10660 "source": "api"
10661 }
10662 ]
10663 }
10664 },
10665 "create_check_run": {
10666 "params": {
10667 "owner": "flagon-io",
10668 "name": "hello"
10669 },
10670 "request": {
10671 "name": "lint",
10672 "head_sha": "9f3c2a1b7e6d5c4b3a2918f7e6d5c4b3a2918f7e",
10673 "status": "completed",
10674 "conclusion": "failure",
10675 "details_url": "https://ci.example.com/builds/4821",
10676 "external_id": "4821",
10677 "output": {
10678 "title": "2 problems",
10679 "summary": "**2** problems in 1 file.",
10680 "annotations": [
10681 {
10682 "path": "src/parse.rs",
10683 "start_line": 42,
10684 "end_line": 42,
10685 "annotation_level": "warning",
10686 "message": "unused variable: `depth`"
10687 }
10688 ]
10689 },
10690 "actions": [
10691 {
10692 "label": "Fix this",
10693 "description": "Apply the suggested fixes",
10694 "identifier": "fix"
10695 }
10696 ]
10697 },
10698 "response": {
10699 "id": "cr_01kq4b7c8d9e0f1g2h3j4k5m6n",
10700 "name": "lint",
10701 "head_sha": "9f3c2a1b7e6d5c4b3a2918f7e6d5c4b3a2918f7e",
10702 "status": "completed",
10703 "conclusion": "failure",
10704 "started_at": "2026-10-07T14:02:11.000Z",
10705 "completed_at": "2026-10-07T14:02:36.000Z",
10706 "details_url": "https://ci.example.com/builds/4821",
10707 "external_id": "4821",
10708 "html_url": "https://g1t.sh/flagon-io/hello/checks/cr_01kq4b7c8d9e0f1g2h3j4k5m6n",
10709 "output": {
10710 "title": "2 problems",
10711 "summary": "**2** problems in 1 file.",
10712 "text": null,
10713 "annotations_count": 2
10714 },
10715 "actions": [
10716 {
10717 "label": "Fix this",
10718 "description": "Apply the suggested fixes",
10719 "identifier": "fix"
10720 }
10721 ],
10722 "check_suite": {
10723 "id": "cs_01kq4b7c8d9e0f1g2h3j4k5m6p"
10724 },
10725 "app": {
10726 "slug": "buildkite",
10727 "name": "Buildkite"
10728 },
10729 "created_at": "2026-10-07T14:02:11.318Z"
10730 },
10731 "notes": "Start a run as `queued` or `in_progress` and complete it later with [`update_check_run`](/reference/api/checks/update-check-run/), or create it completed. `app` names who reports it; by default it is your token's name, and a g1t Actions job's `G1T_TOKEN` reports as g1t Actions. Each reporter's runs on a commit form one check suite. The run also stands as a status of its name, so a required check `lint` is met by it: `success`, `neutral` and `skipped` pass, any other conclusion fails. See the [Checks guide](/guides/checks/)."
10732 },
10733 "update_check_run": {
10734 "params": {
10735 "owner": "flagon-io",
10736 "name": "hello",
10737 "id": "cr_01kq4b7c8d9e0f1g2h3j4k5m6n"
10738 },
10739 "request": {
10740 "conclusion": "success",
10741 "output": {
10742 "title": "No problems",
10743 "summary": "All clear."
10744 }
10745 },
10746 "response": {
10747 "id": "cr_01kq4b7c8d9e0f1g2h3j4k5m6n",
10748 "name": "lint",
10749 "head_sha": "9f3c2a1b7e6d5c4b3a2918f7e6d5c4b3a2918f7e",
10750 "status": "completed",
10751 "conclusion": "success",
10752 "started_at": "2026-10-07T14:02:11.000Z",
10753 "completed_at": "2026-10-07T14:02:36.000Z",
10754 "details_url": "https://ci.example.com/builds/4821",
10755 "external_id": "4821",
10756 "html_url": "https://g1t.sh/flagon-io/hello/checks/cr_01kq4b7c8d9e0f1g2h3j4k5m6n",
10757 "output": {
10758 "title": "No problems",
10759 "summary": "All clear.",
10760 "text": null,
10761 "annotations_count": 2
10762 },
10763 "actions": [
10764 {
10765 "label": "Fix this",
10766 "description": "Apply the suggested fixes",
10767 "identifier": "fix"
10768 }
10769 ],
10770 "check_suite": {
10771 "id": "cs_01kq4b7c8d9e0f1g2h3j4k5m6p"
10772 },
10773 "app": {
10774 "slug": "buildkite",
10775 "name": "Buildkite"
10776 },
10777 "created_at": "2026-10-07T14:02:11.318Z"
10778 },
10779 "notes": "Annotations given here are added to the ones the run has, at most 50 a request and 1000 in all."
10780 },
10781 "get_check_run": {
10782 "params": {
10783 "owner": "flagon-io",
10784 "name": "hello",
10785 "id": "job_01kq4b6a7b8c9d0e1f2g3h4j5k"
10786 },
10787 "response": {
10788 "id": "job_01kq4b6a7b8c9d0e1f2g3h4j5k",
10789 "name": "Test",
10790 "head_sha": "9f3c2a1b7e6d5c4b3a2918f7e6d5c4b3a2918f7e",
10791 "status": "completed",
10792 "conclusion": "success",
10793 "started_at": "2026-10-07T14:01:02.000Z",
10794 "completed_at": "2026-10-07T14:01:27.000Z",
10795 "details_url": "https://g1t.sh/flagon-io/hello/actions/runs/run_01kq4b6a7b8c9d0e1f2g3h4j5m?job=job_01kq4b6a7b8c9d0e1f2g3h4j5k",
10796 "external_id": null,
10797 "html_url": "https://g1t.sh/flagon-io/hello/actions/runs/run_01kq4b6a7b8c9d0e1f2g3h4j5m?job=job_01kq4b6a7b8c9d0e1f2g3h4j5k",
10798 "output": {
10799 "title": null,
10800 "summary": null,
10801 "text": null,
10802 "annotations_count": 0
10803 },
10804 "actions": [],
10805 "check_suite": {
10806 "id": "run_01kq4b6a7b8c9d0e1f2g3h4j5m"
10807 },
10808 "app": {
10809 "slug": "actions",
10810 "name": "g1t Actions"
10811 },
10812 "workflow": {
10813 "run_id": "run_01kq4b6a7b8c9d0e1f2g3h4j5m",
10814 "name": "CI",
10815 "event": "push"
10816 },
10817 "created_at": "2026-10-07T14:01:00.512Z"
10818 }
10819 },
10820 "list_check_run_annotations": {
10821 "params": {
10822 "owner": "flagon-io",
10823 "name": "hello",
10824 "id": "cr_01kq4b7c8d9e0f1g2h3j4k5m6n"
10825 },
10826 "response": [
10827 {
10828 "path": "src/parse.rs",
10829 "start_line": 42,
10830 "end_line": 42,
10831 "start_column": 9,
10832 "end_column": 14,
10833 "annotation_level": "warning",
10834 "message": "unused variable: `depth`",
10835 "title": "unused_variables",
10836 "raw_details": "#[warn(unused_variables)] on by default"
10837 }
10838 ]
10839 },
10840 "rerequest_check_run": {
10841 "params": {
10842 "owner": "flagon-io",
10843 "name": "hello",
10844 "id": "cr_01kq4b7c8d9e0f1g2h3j4k5m6n"
10845 },
10846 "response": {
10847 "rerequested": true
10848 }
10849 },
10850 "list_check_runs_for_ref": {
10851 "params": {
10852 "owner": "flagon-io",
10853 "name": "hello",
10854 "ref": "main"
10855 },
10856 "query": {
10857 "filter": "latest"
10858 },
10859 "response": {
10860 "total_count": 2,
10861 "check_runs": [
10862 {
10863 "id": "cr_01kq4b7c8d9e0f1g2h3j4k5m6n",
10864 "name": "lint",
10865 "head_sha": "9f3c2a1b7e6d5c4b3a2918f7e6d5c4b3a2918f7e",
10866 "status": "completed",
10867 "conclusion": "failure",
10868 "started_at": "2026-10-07T14:02:11.000Z",
10869 "completed_at": "2026-10-07T14:02:36.000Z",
10870 "details_url": "https://ci.example.com/builds/4821",
10871 "external_id": "4821",
10872 "html_url": "https://g1t.sh/flagon-io/hello/checks/cr_01kq4b7c8d9e0f1g2h3j4k5m6n",
10873 "output": {
10874 "title": "2 problems",
10875 "summary": "**2** problems in 1 file.",
10876 "text": null,
10877 "annotations_count": 2
10878 },
10879 "actions": [
10880 {
10881 "label": "Fix this",
10882 "description": "Apply the suggested fixes",
10883 "identifier": "fix"
10884 }
10885 ],
10886 "check_suite": {
10887 "id": "cs_01kq4b7c8d9e0f1g2h3j4k5m6p"
10888 },
10889 "app": {
10890 "slug": "buildkite",
10891 "name": "Buildkite"
10892 },
10893 "created_at": "2026-10-07T14:02:11.318Z"
10894 },
10895 {
10896 "id": "job_01kq4b6a7b8c9d0e1f2g3h4j5k",
10897 "name": "Test",
10898 "head_sha": "9f3c2a1b7e6d5c4b3a2918f7e6d5c4b3a2918f7e",
10899 "status": "completed",
10900 "conclusion": "success",
10901 "started_at": "2026-10-07T14:01:02.000Z",
10902 "completed_at": "2026-10-07T14:01:27.000Z",
10903 "details_url": "https://g1t.sh/flagon-io/hello/actions/runs/run_01kq4b6a7b8c9d0e1f2g3h4j5m?job=job_01kq4b6a7b8c9d0e1f2g3h4j5k",
10904 "external_id": null,
10905 "html_url": "https://g1t.sh/flagon-io/hello/actions/runs/run_01kq4b6a7b8c9d0e1f2g3h4j5m?job=job_01kq4b6a7b8c9d0e1f2g3h4j5k",
10906 "output": {
10907 "title": null,
10908 "summary": null,
10909 "text": null,
10910 "annotations_count": 0
10911 },
10912 "actions": [],
10913 "check_suite": {
10914 "id": "run_01kq4b6a7b8c9d0e1f2g3h4j5m"
10915 },
10916 "app": {
10917 "slug": "actions",
10918 "name": "g1t Actions"
10919 },
10920 "workflow": {
10921 "run_id": "run_01kq4b6a7b8c9d0e1f2g3h4j5m",
10922 "name": "CI",
10923 "event": "push"
10924 },
10925 "created_at": "2026-10-07T14:01:00.512Z"
10926 }
10927 ]
10928 }
10929 },
10930 "list_check_suites_for_ref": {
10931 "params": {
10932 "owner": "flagon-io",
10933 "name": "hello",
10934 "ref": "main"
10935 },
10936 "response": {
10937 "total_count": 2,
10938 "check_suites": [
10939 {
10940 "id": "cs_01kq4b7c8d9e0f1g2h3j4k5m6p",
10941 "head_sha": "9f3c2a1b7e6d5c4b3a2918f7e6d5c4b3a2918f7e",
10942 "head_branch": "main",
10943 "status": "completed",
10944 "conclusion": "failure",
10945 "app": {
10946 "slug": "buildkite",
10947 "name": "Buildkite"
10948 },
10949 "latest_check_runs_count": 1,
10950 "created_at": "2026-10-07T14:02:11.318Z",
10951 "updated_at": "2026-10-07T14:02:36.502Z"
10952 },
10953 {
10954 "id": "run_01kq4b6a7b8c9d0e1f2g3h4j5m",
10955 "head_sha": "9f3c2a1b7e6d5c4b3a2918f7e6d5c4b3a2918f7e",
10956 "head_branch": "main",
10957 "status": "completed",
10958 "conclusion": "success",
10959 "app": {
10960 "slug": "actions",
10961 "name": "g1t Actions"
10962 },
10963 "name": "CI",
10964 "latest_check_runs_count": 1,
10965 "created_at": "2026-10-07T14:01:00.512Z",
10966 "updated_at": "2026-10-07T14:01:28.040Z"
10967 }
10968 ]
10969 }
10970 },
10971 "get_check_suite": {
10972 "params": {
10973 "owner": "flagon-io",
10974 "name": "hello",
10975 "id": "cs_01kq4b7c8d9e0f1g2h3j4k5m6p"
10976 },
10977 "response": {
10978 "id": "cs_01kq4b7c8d9e0f1g2h3j4k5m6p",
10979 "head_sha": "9f3c2a1b7e6d5c4b3a2918f7e6d5c4b3a2918f7e",
10980 "head_branch": "main",
10981 "status": "completed",
10982 "conclusion": "failure",
10983 "app": {
10984 "slug": "buildkite",
10985 "name": "Buildkite"
10986 },
10987 "latest_check_runs_count": 1,
10988 "created_at": "2026-10-07T14:02:11.318Z",
10989 "updated_at": "2026-10-07T14:02:36.502Z"
10990 }
10991 },
10992 "rerequest_check_suite": {
10993 "params": {
10994 "owner": "flagon-io",
10995 "name": "hello",
10996 "id": "cs_01kq4b7c8d9e0f1g2h3j4k5m6p"
10997 },
10998 "response": {
10999 "rerequested": true
11000 }
11001 },
11002 "list_artifacts": {
11003 "params": {
11004 "owner": "flagon-io",
11005 "name": "g1t"
11006 },
11007 "query": {
11008 "name": "web-dist",
11009 "per_page": "1"
11010 },
11011 "response": {
11012 "total_count": 9,
11013 "artifacts": [
11014 {
11015 "id": 4182,
11016 "node_id": "artifact_4182",
11017 "name": "web-dist",
11018 "size_in_bytes": 18734120,
11019 "url": "https://api.g1t.sh/repos/flagon-io/g1t/actions/artifacts/4182",
11020 "archive_download_url": "https://api.g1t.sh/repos/flagon-io/g1t/actions/artifacts/4182/zip",
11021 "expired": false,
11022 "digest": "sha256:5f1c3a9e7b2d4f6a8c0e1b3d5f7a9c2e4b6d8f0a1c3e5b7d9f2a4c6e8b0d1f3a",
11023 "created_at": "2026-10-08T14:03:51.204Z",
11024 "updated_at": "2026-10-08T14:03:52.880Z",
11025 "expires_at": "2026-10-22T14:03:51.204Z",
11026 "workflow_run": {
11027 "id": "run_01kq9c4e6g8j0m2p4r6t8v0x2z",
11028 "repository_id": "rep_01kpw0a2c4e6g8j0m2p4r6t8v0",
11029 "head_repository_id": "rep_01kpw0a2c4e6g8j0m2p4r6t8v0",
11030 "head_branch": "main",
11031 "head_sha": "7c1e9a4b2d6f80135ac9e2b7d4f6a8c0e1b3d5f7"
11032 }
11033 }
11034 ]
11035 },
11036 "notes": "Expired and deleted artifacts are not listed. `workflow_run.id` is the run's id, which `get_workflow_run` takes."
11037 },
11038 "list_workflow_run_artifacts": {
11039 "params": {
11040 "owner": "flagon-io",
11041 "name": "g1t",
11042 "id": "run_01kq9c4e6g8j0m2p4r6t8v0x2z"
11043 },
11044 "response": {
11045 "total_count": 2,
11046 "artifacts": [
11047 {
11048 "id": 4181,
11049 "node_id": "artifact_4181",
11050 "name": "coverage",
11051 "size_in_bytes": 412870,
11052 "url": "https://api.g1t.sh/repos/flagon-io/g1t/actions/artifacts/4181",
11053 "archive_download_url": "https://api.g1t.sh/repos/flagon-io/g1t/actions/artifacts/4181/zip",
11054 "expired": false,
11055 "digest": "sha256:5f1c3a9e7b2d4f6a8c0e1b3d5f7a9c2e4b6d8f0a1c3e5b7d9f2a4c6e8b0d1f3a",
11056 "created_at": "2026-10-08T14:03:51.204Z",
11057 "updated_at": "2026-10-08T14:03:52.880Z",
11058 "expires_at": "2026-10-22T14:03:51.204Z",
11059 "workflow_run": {
11060 "id": "run_01kq9c4e6g8j0m2p4r6t8v0x2z",
11061 "repository_id": "rep_01kpw0a2c4e6g8j0m2p4r6t8v0",
11062 "head_repository_id": "rep_01kpw0a2c4e6g8j0m2p4r6t8v0",
11063 "head_branch": "main",
11064 "head_sha": "7c1e9a4b2d6f80135ac9e2b7d4f6a8c0e1b3d5f7"
11065 }
11066 },
11067 {
11068 "id": 4182,
11069 "node_id": "artifact_4182",
11070 "name": "web-dist",
11071 "size_in_bytes": 18734120,
11072 "url": "https://api.g1t.sh/repos/flagon-io/g1t/actions/artifacts/4182",
11073 "archive_download_url": "https://api.g1t.sh/repos/flagon-io/g1t/actions/artifacts/4182/zip",
11074 "expired": false,
11075 "digest": "sha256:5f1c3a9e7b2d4f6a8c0e1b3d5f7a9c2e4b6d8f0a1c3e5b7d9f2a4c6e8b0d1f3a",
11076 "created_at": "2026-10-08T14:03:51.204Z",
11077 "updated_at": "2026-10-08T14:03:52.880Z",
11078 "expires_at": "2026-10-22T14:03:51.204Z",
11079 "workflow_run": {
11080 "id": "run_01kq9c4e6g8j0m2p4r6t8v0x2z",
11081 "repository_id": "rep_01kpw0a2c4e6g8j0m2p4r6t8v0",
11082 "head_repository_id": "rep_01kpw0a2c4e6g8j0m2p4r6t8v0",
11083 "head_branch": "main",
11084 "head_sha": "7c1e9a4b2d6f80135ac9e2b7d4f6a8c0e1b3d5f7"
11085 }
11086 }
11087 ]
11088 }
11089 },
11090 "get_artifact": {
11091 "params": {
11092 "owner": "flagon-io",
11093 "name": "g1t",
11094 "id": "4182"
11095 },
11096 "response": {
11097 "id": 4182,
11098 "node_id": "artifact_4182",
11099 "name": "web-dist",
11100 "size_in_bytes": 18734120,
11101 "url": "https://api.g1t.sh/repos/flagon-io/g1t/actions/artifacts/4182",
11102 "archive_download_url": "https://api.g1t.sh/repos/flagon-io/g1t/actions/artifacts/4182/zip",
11103 "expired": false,
11104 "digest": "sha256:5f1c3a9e7b2d4f6a8c0e1b3d5f7a9c2e4b6d8f0a1c3e5b7d9f2a4c6e8b0d1f3a",
11105 "created_at": "2026-10-08T14:03:51.204Z",
11106 "updated_at": "2026-10-08T14:03:52.880Z",
11107 "expires_at": "2026-10-22T14:03:51.204Z",
11108 "workflow_run": {
11109 "id": "run_01kq9c4e6g8j0m2p4r6t8v0x2z",
11110 "repository_id": "rep_01kpw0a2c4e6g8j0m2p4r6t8v0",
11111 "head_repository_id": "rep_01kpw0a2c4e6g8j0m2p4r6t8v0",
11112 "head_branch": "main",
11113 "head_sha": "7c1e9a4b2d6f80135ac9e2b7d4f6a8c0e1b3d5f7"
11114 }
11115 }
11116 },
11117 "download_artifact": {
11118 "params": {
11119 "owner": "flagon-io",
11120 "name": "g1t",
11121 "id": "4182"
11122 },
11123 "response": {
11124 "url": "https://api.g1t.sh/actions/toolkit/blobs/eyJrIjoiYXJ0aWZhY3QiLCJpIjoiNDE4MiJ9.q3VbS1x9",
11125 "expires_at": "2026-10-08T15:13:00.000Z",
11126 "artifact": {
11127 "id": 4182,
11128 "node_id": "artifact_4182",
11129 "name": "web-dist",
11130 "size_in_bytes": 18734120,
11131 "url": "https://api.g1t.sh/repos/flagon-io/g1t/actions/artifacts/4182",
11132 "archive_download_url": "https://api.g1t.sh/repos/flagon-io/g1t/actions/artifacts/4182/zip",
11133 "expired": false,
11134 "digest": "sha256:5f1c3a9e7b2d4f6a8c0e1b3d5f7a9c2e4b6d8f0a1c3e5b7d9f2a4c6e8b0d1f3a",
11135 "created_at": "2026-10-08T14:03:51.204Z",
11136 "updated_at": "2026-10-08T14:03:52.880Z",
11137 "expires_at": "2026-10-22T14:03:51.204Z",
11138 "workflow_run": {
11139 "id": "run_01kq9c4e6g8j0m2p4r6t8v0x2z",
11140 "repository_id": "rep_01kpw0a2c4e6g8j0m2p4r6t8v0",
11141 "head_repository_id": "rep_01kpw0a2c4e6g8j0m2p4r6t8v0",
11142 "head_branch": "main",
11143 "head_sha": "7c1e9a4b2d6f80135ac9e2b7d4f6a8c0e1b3d5f7"
11144 }
11145 }
11146 },
11147 "notes": "Over REST the answer is `302 Found` with the link in `Location`, as GitHub's is, so `curl -L -o web-dist.zip …/zip` saves the file; the body above is what the MCP `workflow` tool's `download_artifact` returns. The link needs no token and stops working after 10 minutes."
11148 },
11149 "delete_artifact": {
11150 "params": {
11151 "owner": "flagon-io",
11152 "name": "g1t",
11153 "id": "4181"
11154 },
11155 "response": {
11156 "deleted": true,
11157 "id": 4181,
11158 "name": "coverage"
11159 }
11160 },
11161 "get_artifact_retention": {
11162 "params": {
11163 "owner": "flagon-io",
11164 "name": "g1t"
11165 },
11166 "response": {
11167 "days": 14,
11168 "maximum_allowed_days": 90
11169 }
11170 },
11171 "set_artifact_retention": {
11172 "params": {
11173 "owner": "flagon-io",
11174 "name": "g1t"
11175 },
11176 "request": {
11177 "days": 30
11178 },
11179 "response": {
11180 "days": 30,
11181 "maximum_allowed_days": 90
11182 },
11183 "notes": "Only artifacts uploaded afterwards are kept the new number of days. A workflow's `retention-days` asks for fewer, never more."
11184 }
11185}