Skip to content
13,926 linesCodeBlameRaw
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 "display_username": "syntaqx",
24 "verified": true
25 }
26 },
27 "whoami": {
28 "response": {
29 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
30 "username": "syntaqx",
31 "display_username": "syntaqx",
32 "kind": "user",
33 "verified": true,
34 "workspaces": [
35 {
36 "slug": "acme",
37 "role": "member",
38 "base_permission": "write"
39 },
40 {
41 "slug": "flagon-io",
42 "role": "owner",
43 "base_permission": "write"
44 }
45 ],
46 "token": {
47 "token_id": "tok_01kkntd3p2v8x6ym5r0c1q7a9e",
48 "scopes": [
49 "repo:read",
50 "issues:read",
51 "issues:write",
52 "pull_requests:read",
53 "pull_requests:write"
54 ]
55 }
56 },
57 "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/)."
58 },
59 "create_workspace": {
60 "request": {
61 "slug": "acme-labs",
62 "name": "Acme Labs"
63 },
64 "response": {
65 "id": "wsp_01m43teqa9em6bje0bhvdj4jkb",
66 "slug": "acme-labs",
67 "name": "Acme Labs",
68 "description": null,
69 "created_at": "2026-10-04T16:02:51.337Z",
70 "member_count": 1,
71 "base_permission": "read",
72 "team_creation": "members",
73 "members_can_create_public_repositories": true,
74 "members_can_create_private_repositories": true,
75 "members_can_change_repo_visibility": true,
76 "members_can_delete_repositories": false,
77 "members_can_invite_outside_collaborators": true,
78 "two_factor_requirement_enabled": false
79 },
80 "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)."
81 },
82 "get_workspace": {
83 "params": {
84 "workspace": "acme-labs"
85 },
86 "response": {
87 "id": "wsp_01m43teqa9em6bje0bhvdj4jkb",
88 "slug": "acme-labs",
89 "name": "Acme Labs",
90 "description": "Rockets, and the software that flies them.",
91 "created_at": "2026-10-04T16:02:51.337Z",
92 "member_count": 3,
93 "base_permission": "write",
94 "team_creation": "members",
95 "members_can_create_public_repositories": true,
96 "members_can_create_private_repositories": true,
97 "members_can_change_repo_visibility": true,
98 "members_can_delete_repositories": false,
99 "members_can_invite_outside_collaborators": true,
100 "two_factor_requirement_enabled": false
101 },
102 "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/)."
103 },
104 "update_workspace": {
105 "params": {
106 "workspace": "acme-labs"
107 },
108 "request": {
109 "name": "Acme Labs",
110 "description": "Rockets, and the software that flies them.",
111 "team_creation": "owners",
112 "members_can_delete_repositories": true
113 },
114 "response": {
115 "id": "wsp_01m43teqa9em6bje0bhvdj4jkb",
116 "slug": "acme-labs",
117 "name": "Acme Labs",
118 "description": "Rockets, and the software that flies them.",
119 "created_at": "2026-10-04T16:02:51.337Z",
120 "member_count": 3,
121 "base_permission": "write",
122 "team_creation": "owners",
123 "members_can_create_public_repositories": true,
124 "members_can_create_private_repositories": true,
125 "members_can_change_repo_visibility": true,
126 "members_can_delete_repositories": true,
127 "members_can_invite_outside_collaborators": true,
128 "two_factor_requirement_enabled": false
129 },
130 "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/)."
131 },
132 "list_members": {
133 "params": {
134 "workspace": "acme-labs"
135 },
136 "response": [
137 {
138 "username": "ada",
139 "display_username": "Ada",
140 "role": "owner",
141 "org_roles": [],
142 "two_factor": true,
143 "name": "Ada Lovelace",
144 "avatar": null
145 },
146 {
147 "username": "grace",
148 "display_username": "grace",
149 "role": "member",
150 "org_roles": [
151 "security_manager"
152 ],
153 "two_factor": false,
154 "name": "Grace Hopper",
155 "avatar": null
156 }
157 ],
158 "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)."
159 },
160 "update_member": {
161 "params": {
162 "workspace": "acme-labs",
163 "username": "grace"
164 },
165 "request": {
166 "role": "member",
167 "org_roles": [
168 "security_manager"
169 ]
170 },
171 "response": {
172 "username": "grace",
173 "display_username": "grace",
174 "role": "member",
175 "org_roles": [
176 "security_manager"
177 ],
178 "two_factor": null,
179 "name": "Grace Hopper",
180 "avatar": null
181 },
182 "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)."
183 },
184 "remove_member": {
185 "params": {
186 "workspace": "acme-labs",
187 "username": "grace"
188 },
189 "response": true,
190 "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`."
191 },
192 "transfer_ownership": {
193 "params": {
194 "workspace": "acme-labs"
195 },
196 "request": {
197 "username": "grace"
198 },
199 "response": true,
200 "notes": "`username` becomes an owner and you a member, in one step. Recorded as `workspace.ownership_transferred`."
201 },
202 "leave_workspace": {
203 "params": {
204 "workspace": "acme-labs"
205 },
206 "response": true,
207 "notes": "`409` for the last owner: make another member an owner first, or delete the workspace. Recorded as `member.left`."
208 },
209 "delete_workspace": {
210 "request": {
211 "confirm": "acme-labs"
212 },
213 "response": true,
214 "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)."
215 },
216 "list_emails": {
217 "response": {
218 "emails": [
219 {
220 "email": "ada@example.com",
221 "verified": true,
222 "primary": true,
223 "backup": false,
224 "created_at": "2026-09-01T10:00:00.000Z",
225 "verified_at": "2026-09-01T10:02:11.000Z"
226 },
227 {
228 "email": "ada@acme.com",
229 "verified": true,
230 "primary": false,
231 "backup": true,
232 "created_at": "2026-10-02T09:30:00.000Z",
233 "verified_at": "2026-10-02T09:31:40.000Z"
234 },
235 {
236 "email": "ada.l@example.org",
237 "verified": false,
238 "primary": false,
239 "backup": false,
240 "created_at": "2026-10-05T14:12:03.000Z",
241 "verified_at": null
242 }
243 ],
244 "private_email": true,
245 "block_private_pushes": false,
246 "noreply": "6c1d0efg+ada@users.noreply.g1t.sh",
247 "commit_email": "6c1d0efg+ada@users.noreply.g1t.sh",
248 "limit": 10
249 },
250 "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)."
251 },
252 "add_email": {
253 "request": {
254 "email": "ada.l@example.org",
255 "password": "…"
256 },
257 "response": {
258 "emails": [
259 {
260 "email": "ada@example.com",
261 "verified": true,
262 "primary": true,
263 "backup": false,
264 "created_at": "2026-09-01T10:00:00.000Z",
265 "verified_at": "2026-09-01T10:02:11.000Z"
266 },
267 {
268 "email": "ada@acme.com",
269 "verified": true,
270 "primary": false,
271 "backup": true,
272 "created_at": "2026-10-02T09:30:00.000Z",
273 "verified_at": "2026-10-02T09:31:40.000Z"
274 },
275 {
276 "email": "ada.l@example.org",
277 "verified": false,
278 "primary": false,
279 "backup": false,
280 "created_at": "2026-10-05T14:12:03.000Z",
281 "verified_at": null
282 }
283 ],
284 "private_email": true,
285 "block_private_pushes": false,
286 "noreply": "6c1d0efg+ada@users.noreply.g1t.sh",
287 "commit_email": "6c1d0efg+ada@users.noreply.g1t.sh",
288 "limit": 10
289 },
290 "notes": "Answers `403` with code `reauth_required` when `password` is missing or wrong, and `409` when another account has confirmed the address. g1t emails the address a six-digit code and a link; it stays unconfirmed until the code is sent to [`confirm_email`](/reference/api/accounts/confirm-email/) or the link is followed."
291 },
292 "confirm_email": {
293 "request": {
294 "code": "482913"
295 },
296 "response": {
297 "username": "ada",
298 "display_username": "Ada",
299 "email": "ada@example.com",
300 "verified": true,
301 "joined": null,
302 "invited_to": "acme",
303 "invite_lapsed": null
304 },
305 "notes": "The code confirms the address it was sent to, and ends the link sent with it. A wrong, used or expired code answers `422` with one message for all three; after ten wrong codes in an hour the account answers `409` for a while, and the link in the email still works. `verified` says whether the account is confirmed: whether its primary address is. `invited_to` is set when the invite the account signed up with brings it into a workspace: confirming the address sends the account an invitation to that workspace, which it accepts with `POST /user/invitations/{id}/accept` or declines; nobody joins a workspace without saying yes. `joined` is kept for older clients and is null. When the invite was revoked or expired, or the workspace deleted, while the account waited, the address is confirmed all the same and `invite_lapsed` says so. See [Confirming your email address](/guides/authentication/#confirming-your-email-address)."
306 },
307 "remove_email": {
308 "request": {
309 "password": "…"
310 },
311 "response": {
312 "emails": [
313 {
314 "email": "ada@example.com",
315 "verified": true,
316 "primary": true,
317 "backup": false,
318 "created_at": "2026-09-01T10:00:00.000Z",
319 "verified_at": "2026-09-01T10:02:11.000Z"
320 },
321 {
322 "email": "ada@acme.com",
323 "verified": true,
324 "primary": false,
325 "backup": true,
326 "created_at": "2026-10-02T09:30:00.000Z",
327 "verified_at": "2026-10-02T09:31:40.000Z"
328 },
329 {
330 "email": "ada.l@example.org",
331 "verified": false,
332 "primary": false,
333 "backup": false,
334 "created_at": "2026-10-05T14:12:03.000Z",
335 "verified_at": null
336 }
337 ],
338 "private_email": true,
339 "block_private_pushes": false,
340 "noreply": "6c1d0efg+ada@users.noreply.g1t.sh",
341 "commit_email": "6c1d0efg+ada@users.noreply.g1t.sh",
342 "limit": 10
343 },
344 "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."
345 },
346 "update_email_settings": {
347 "request": {
348 "primary": "ada@acme.com",
349 "password": "…"
350 },
351 "response": {
352 "emails": [
353 {
354 "email": "ada@example.com",
355 "verified": true,
356 "primary": true,
357 "backup": false,
358 "created_at": "2026-09-01T10:00:00.000Z",
359 "verified_at": "2026-09-01T10:02:11.000Z"
360 },
361 {
362 "email": "ada@acme.com",
363 "verified": true,
364 "primary": false,
365 "backup": true,
366 "created_at": "2026-10-02T09:30:00.000Z",
367 "verified_at": "2026-10-02T09:31:40.000Z"
368 },
369 {
370 "email": "ada.l@example.org",
371 "verified": false,
372 "primary": false,
373 "backup": false,
374 "created_at": "2026-10-05T14:12:03.000Z",
375 "verified_at": null
376 }
377 ],
378 "private_email": true,
379 "block_private_pushes": false,
380 "noreply": "6c1d0efg+ada@users.noreply.g1t.sh",
381 "commit_email": "6c1d0efg+ada@users.noreply.g1t.sh",
382 "limit": 10
383 },
384 "notes": "Only the fields given change. `primary` and `backup` need `password`; `private_email` and `block_private_pushes` do not."
385 },
386 "list_workspace_invites": {
387 "response": [
388 {
389 "id": "inv_01kp2x7m8n9q0r1s2t3v4w5x6y",
390 "code": "g1t-k7m2-q9xd-4hpw-…",
391 "hint": "g1t-k7m2",
392 "email": "ada@example.com",
393 "kind": "account",
394 "workspace": "acme-labs",
395 "status": "pending",
396 "invited_by": "syntaqx",
397 "redeemed_by": null,
398 "created_at": "2026-10-05T17:00:00.000Z",
399 "expires_at": "2026-11-04T17:00:00.000Z",
400 "redeemed_at": null,
401 "revoked_at": null,
402 "invitee": null,
403 "role": "member"
404 },
405 {
406 "id": "inv_01kp1z9y8x7w6v5t4s3r2q1p0n",
407 "code": "g1t-k7m2-q9xd-4hpw-…",
408 "hint": "g1t-w2vb",
409 "email": null,
410 "kind": "workspace",
411 "workspace": "acme-labs",
412 "status": "pending",
413 "invited_by": "syntaqx",
414 "redeemed_by": null,
415 "created_at": "2026-10-05T17:00:00.000Z",
416 "expires_at": "2026-11-04T17:00:00.000Z",
417 "redeemed_at": null,
418 "revoked_at": null,
419 "invitee": "linus",
420 "role": "owner"
421 }
422 ]
423 },
424 "invite_member": {
425 "request": {
426 "username": "ada",
427 "role": "member"
428 },
429 "response": {
430 "id": "inv_01kp2x7m8n9q0r1s2t3v4w5x6y",
431 "code": "g1t-k7m2-q9xd-4hpw-…",
432 "hint": "g1t-k7m2",
433 "email": null,
434 "kind": "workspace",
435 "workspace": "acme-labs",
436 "status": "pending",
437 "invited_by": "syntaqx",
438 "redeemed_by": null,
439 "created_at": "2026-10-05T17:00:00.000Z",
440 "expires_at": "2026-11-04T17:00:00.000Z",
441 "redeemed_at": null,
442 "revoked_at": null,
443 "invitee": "ada",
444 "role": "member"
445 },
446 "notes": "Give `username` or `email`. Nobody is added without saying yes: the person gets an invitation to accept or decline, and joins with `role` when they accept. By username, `invitee` names the account and it costs nothing; `404` when there is no account with that username. By email, `kind` is `workspace` when the address already has a g1t account (`charged_to` is then `none`), and `account` when the link makes one; both answers look alike to the caller on purpose, and `invitee` stays null until an account is known. `409` when the person is already a member or already has a pending invitation to the workspace. A free workspace cannot invite anyone: `402` with `payment_required`, until it starts the g1t plan. See [Workspace invitations](/reference/api/invites/list-invitations/) for the other side."
447 },
448 "revoke_workspace_invite": {
449 "response": {
450 "id": "inv_01kp2x7m8n9q0r1s2t3v4w5x6y",
451 "code": null,
452 "hint": "g1t-k7m2",
453 "email": "ada@example.com",
454 "kind": "account",
455 "workspace": "acme-labs",
456 "status": "revoked",
457 "invited_by": "syntaqx",
458 "redeemed_by": null,
459 "created_at": "2026-10-05T17:00:00.000Z",
460 "expires_at": "2026-11-04T17:00:00.000Z",
461 "redeemed_at": null,
462 "revoked_at": "2026-10-06T08:00:00.000Z",
463 "invitee": null,
464 "role": "member"
465 }
466 },
467 "list_invitations": {
468 "response": [
469 {
470 "id": "inv_01kp2x7m8n9q0r1s2t3v4w5x6y",
471 "workspace": {
472 "slug": "acme-labs",
473 "name": "Acme Labs",
474 "avatar": null
475 },
476 "role": "member",
477 "invited_by": {
478 "username": "syntaqx",
479 "display_username": "syntaqx",
480 "name": "Chase",
481 "avatar": null
482 },
483 "created_at": "2026-10-05T17:00:00.000Z",
484 "expires_at": "2026-11-04T17:00:00.000Z"
485 }
486 ],
487 "notes": "Accept one with `POST /user/invitations/{id}/accept`, or decline it with `POST /user/invitations/{id}/decline`. An agent's or a workspace's token gets an empty list."
488 },
489 "accept_invitation": {
490 "params": {
491 "id": "inv_01kp2x7m8n9q0r1s2t3v4w5x6y"
492 },
493 "response": {
494 "workspace": "acme-labs"
495 },
496 "notes": "You join at once with the invitation's `role`. `404` when you have no open invitation with that id (it may have been answered, revoked or expired). `403` until you confirm your email address, and when your account does not meet what the workspace asks of its members, such as two-factor authentication, with a message that says what to turn on. `402` with `payment_required` while the workspace is on the free plan; the invitation stays open until it starts the g1t plan. Recorded as `member.added`."
497 },
498 "decline_invitation": {
499 "params": {
500 "id": "inv_01kp2x7m8n9q0r1s2t3v4w5x6y"
501 },
502 "response": true,
503 "notes": "Whoever sent it is told in their inbox. The workspace's owners can invite you again. `404` when you have no open invitation with that id."
504 },
505 "list_repos": {
506 "query": {
507 "q": "hello"
508 },
509 "response": [
510 {
511 "id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
512 "namespace": "flagon-io",
513 "name": "hello",
514 "description": "A tiny service that says hello.",
515 "is_private": false,
516 "owner_id": "usr_01kkntcg1eeb98j62xjm7eh09p",
517 "default_branch": "main",
518 "fork_of": null,
519 "protected": true,
520 "created_at": "2026-09-28T14:11:52.640Z",
521 "website": "https://hello.g1t.page",
522 "archived_at": null
523 }
524 ],
525 "notes": "Returns at most 50 repositories, newest first. Forks made for pull requests are left out."
526 },
527 "create_repo": {
528 "request": {
529 "workspace": "flagon-io",
530 "name": "hello-cli",
531 "description": "Command-line client for hello.",
532 "private": false
533 },
534 "response": {
535 "id": "rep_01m43tk1jhehztx23drs87f5fc",
536 "namespace": "flagon-io",
537 "name": "hello-cli",
538 "description": "Command-line client for hello.",
539 "is_private": false,
540 "owner_id": "usr_01kkntcg1eeb98j62xjm7eh09p",
541 "default_branch": "main",
542 "fork_of": null,
543 "protected": false,
544 "created_at": "2026-10-04T16:05:12.913Z",
545 "website": "https://hello.g1t.page",
546 "archived_at": null
547 },
548 "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."
549 },
550 "get_repo": {
551 "response": {
552 "id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
553 "namespace": "flagon-io",
554 "name": "hello",
555 "description": "A tiny service that says hello.",
556 "is_private": false,
557 "owner_id": "usr_01kkntcg1eeb98j62xjm7eh09p",
558 "default_branch": "main",
559 "fork_of": null,
560 "protected": true,
561 "created_at": "2026-09-28T14:11:52.640Z",
562 "website": "https://hello.g1t.page",
563 "archived_at": null
564 }
565 },
566 "update_repo": {
567 "request": {
568 "description": "Says hello, politely.",
569 "website": "hello.g1t.page",
570 "default_branch": "trunk",
571 "protected": true
572 },
573 "response": {
574 "id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
575 "namespace": "flagon-io",
576 "name": "hello",
577 "description": "Says hello, politely.",
578 "is_private": false,
579 "owner_id": "usr_01kkntcg1eeb98j62xjm7eh09p",
580 "default_branch": "trunk",
581 "fork_of": null,
582 "protected": true,
583 "created_at": "2026-09-28T14:11:52.640Z",
584 "topics": [
585 "http",
586 "example"
587 ],
588 "website": "https://hello.g1t.page",
589 "archived_at": null
590 },
591 "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/)."
592 },
593 "transfer_repo": {
594 "request": {
595 "to": "flagon-io"
596 },
597 "response": {
598 "id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
599 "namespace": "flagon-io",
600 "name": "hello",
601 "description": "A tiny service that says hello.",
602 "is_private": false,
603 "owner_id": "usr_01kkntcg1eeb98j62xjm7eh09p",
604 "default_branch": "main",
605 "fork_of": null,
606 "protected": true,
607 "created_at": "2026-09-28T14:11:52.640Z",
608 "website": "https://hello.g1t.page",
609 "archived_at": null
610 },
611 "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/)."
612 },
613 "rename_repo": {
614 "request": {
615 "name": "greeter"
616 },
617 "response": {
618 "id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
619 "namespace": "flagon-io",
620 "name": "greeter",
621 "description": "A tiny service that says hello.",
622 "is_private": false,
623 "owner_id": "usr_01kkntcg1eeb98j62xjm7eh09p",
624 "default_branch": "main",
625 "fork_of": null,
626 "protected": true,
627 "created_at": "2026-09-28T14:11:52.640Z",
628 "topics": [
629 "http",
630 "example"
631 ],
632 "website": "https://hello.g1t.page",
633 "archived_at": null
634 },
635 "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)."
636 },
637 "rename_branch": {
638 "params": {
639 "owner": "flagon-io",
640 "name": "hello",
641 "branch": "feature/login"
642 },
643 "request": {
644 "new_name": "feature/sign-in"
645 },
646 "response": {
647 "id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
648 "namespace": "flagon-io",
649 "name": "hello",
650 "description": "A tiny service that says hello.",
651 "is_private": false,
652 "owner_id": "usr_01kkntcg1eeb98j62xjm7eh09p",
653 "default_branch": "main",
654 "fork_of": null,
655 "protected": true,
656 "created_at": "2026-09-28T14:11:52.640Z",
657 "topics": [
658 "http",
659 "example"
660 ],
661 "website": "https://hello.g1t.page",
662 "archived_at": null
663 },
664 "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)."
665 },
666 "create_branch": {
667 "request": {
668 "name": "feature/login",
669 "from": "main"
670 },
671 "response": {
672 "name": "feature/login",
673 "hash": "9f2c4e1b7a3d5c6e8f0a1b2c3d4e5f6a7b8c9d0e"
674 },
675 "notes": "The new branch and the commit it points to. `from` is a branch, a tag or a commit, the default branch when left out; to restore a deleted branch, send the `hash` that deleting it answered with. Refused with `404` when `from` names nothing, `409` when the name is taken or is a folder of another branch's name (or holds one), `422` when it is not a valid branch name, and `403` without the Write role or when the repository's rules refuse it. See [Branches](/guides/git/#branches)."
676 },
677 "delete_branch": {
678 "params": {
679 "owner": "flagon-io",
680 "name": "hello",
681 "branch": "feature/login"
682 },
683 "response": {
684 "name": "feature/login",
685 "hash": "9f2c4e1b7a3d5c6e8f0a1b2c3d4e5f6a7b8c9d0e"
686 },
687 "notes": "The branch as it was. Its commits stay in the repository: `POST /repos/{owner}/{name}/branches` with this `hash` as `from` restores it. Add `?head=<sha>` to leave it alone (`409`) if it has moved from the commit you saw. Refused with `403` for the default branch, without the Write role, or when the repository's rules refuse it, and `404` when there is no such branch. Send a branch name with slashes URL-encoded, as one path segment. See [Branches](/guides/git/#branches)."
688 },
689 "set_repo_visibility": {
690 "request": {
691 "private": true,
692 "confirm": "flagon-io/hello"
693 },
694 "response": {
695 "id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
696 "namespace": "flagon-io",
697 "name": "hello",
698 "description": "A tiny service that says hello.",
699 "is_private": true,
700 "owner_id": "usr_01kkntcg1eeb98j62xjm7eh09p",
701 "default_branch": "main",
702 "fork_of": null,
703 "protected": true,
704 "created_at": "2026-09-28T14:11:52.640Z",
705 "topics": [
706 "http",
707 "example"
708 ],
709 "website": "https://hello.g1t.page",
710 "archived_at": null
711 },
712 "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)."
713 },
714 "archive_repo": {
715 "response": {
716 "id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
717 "namespace": "flagon-io",
718 "name": "hello",
719 "description": "A tiny service that says hello.",
720 "is_private": false,
721 "owner_id": "usr_01kkntcg1eeb98j62xjm7eh09p",
722 "default_branch": "main",
723 "fork_of": null,
724 "protected": true,
725 "created_at": "2026-09-28T14:11:52.640Z",
726 "topics": [
727 "http",
728 "example"
729 ],
730 "website": "https://hello.g1t.page",
731 "archived_at": "2026-10-05T09:30:00.000Z"
732 },
733 "notes": "The repository, with `archived_at` set. Needs the Admin role (`403` otherwise). See [Archive a repository](/guides/managing-repositories/#archive-a-repository)."
734 },
735 "unarchive_repo": {
736 "response": {
737 "id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
738 "namespace": "flagon-io",
739 "name": "hello",
740 "description": "A tiny service that says hello.",
741 "is_private": false,
742 "owner_id": "usr_01kkntcg1eeb98j62xjm7eh09p",
743 "default_branch": "main",
744 "fork_of": null,
745 "protected": true,
746 "created_at": "2026-09-28T14:11:52.640Z",
747 "topics": [
748 "http",
749 "example"
750 ],
751 "website": "https://hello.g1t.page",
752 "archived_at": null
753 },
754 "notes": "The repository, with `archived_at` null. Needs the Admin role (`403` otherwise)."
755 },
756 "delete_repo": {
757 "request": {
758 "confirm": "flagon-io/hello"
759 },
760 "response": {
761 "id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
762 "namespace": "flagon-io",
763 "name": "hello",
764 "description": "A tiny service that says hello.",
765 "is_private": false,
766 "deleted_at": "2026-10-05T09:30:00.000Z",
767 "deleted_by": "syntaqx",
768 "purge_after": "2026-11-04T09:30:00.000Z"
769 },
770 "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)."
771 },
772 "list_deleted_repos": {
773 "params": {
774 "workspace": "flagon-io"
775 },
776 "response": [
777 {
778 "id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
779 "namespace": "flagon-io",
780 "name": "hello",
781 "description": "A tiny service that says hello.",
782 "is_private": false,
783 "deleted_at": "2026-10-05T09:30:00.000Z",
784 "deleted_by": "syntaqx",
785 "purge_after": "2026-11-04T09:30:00.000Z"
786 }
787 ],
788 "notes": "Newest first. Empty for anyone who is not an owner of the workspace."
789 },
790 "restore_repo": {
791 "response": {
792 "id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
793 "namespace": "flagon-io",
794 "name": "hello",
795 "description": "A tiny service that says hello.",
796 "is_private": false,
797 "owner_id": "usr_01kkntcg1eeb98j62xjm7eh09p",
798 "default_branch": "main",
799 "fork_of": null,
800 "protected": true,
801 "created_at": "2026-09-28T14:11:52.640Z",
802 "topics": [
803 "http",
804 "example"
805 ],
806 "website": "https://hello.g1t.page",
807 "archived_at": null
808 },
809 "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)."
810 },
811 "purge_repo": {
812 "request": {
813 "confirm": "flagon-io/hello"
814 },
815 "response": true,
816 "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."
817 },
818 "get_repo_settings": {
819 "response": {
820 "auto_merge": false,
821 "required_checks": [
822 "CI"
823 ],
824 "require_up_to_date": false,
825 "required_approvals": 0,
826 "count_agent_approvals": true,
827 "allow_ignoring_checks": true,
828 "merge_queue": false,
829 "require_code_owner_review": false,
830 "updated_by": null,
831 "updated_at": null
832 }
833 },
834 "update_repo_settings": {
835 "request": {
836 "required_checks": [
837 "CI",
838 "g1t / deploy"
839 ],
840 "required_approvals": 1,
841 "count_agent_approvals": false,
842 "merge_queue": true,
843 "require_code_owner_review": true
844 },
845 "response": {
846 "auto_merge": false,
847 "required_checks": [
848 "CI",
849 "g1t / deploy"
850 ],
851 "require_up_to_date": false,
852 "required_approvals": 1,
853 "count_agent_approvals": false,
854 "allow_ignoring_checks": true,
855 "merge_queue": true,
856 "require_code_owner_review": true,
857 "updated_by": "syntaqx",
858 "updated_at": "2026-10-04T16:20:37.508Z"
859 },
860 "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. See [what a repository can ask for](/guides/working-with-g1t/#what-a-repository-can-ask-for). 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/)."
861 },
862 "list_check_names": {
863 "response": [
864 {
865 "name": "CI",
866 "events": [
867 "pull_request",
868 "merge_group",
869 "push"
870 ],
871 "last_seen": "2026-10-06T09:14:02.118Z"
872 },
873 {
874 "name": "g1t / deploy",
875 "events": [],
876 "last_seen": "2026-10-06T08:51:40.006Z"
877 }
878 ],
879 "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."
880 },
881 "get_codeowners_errors": {
882 "params": {
883 "owner": "flagon-io",
884 "name": "hello"
885 },
886 "query": {
887 "ref": "main"
888 },
889 "response": {
890 "path": ".github/CODEOWNERS",
891 "ref": "main",
892 "size": 412,
893 "rules": 9,
894 "sections": [
895 "Docs"
896 ],
897 "errors": [
898 {
899 "line": 4,
900 "kind": "unknown_team",
901 "token": "@flagon-io/platform",
902 "message": "@flagon-io/platform is not a team of flagon-io."
903 },
904 {
905 "line": 7,
906 "kind": "negation",
907 "token": "!docs/internal/",
908 "message": "!docs/internal/ starts with !, and negation is not supported; this line is skipped. Give the path a later rule with no owners instead."
909 }
910 ]
911 },
912 "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/)."
913 },
914 "list_events": {
915 "query": {
916 "before": "evt_01m43t2a6c9e3g7j1m5q9t3x7b"
917 },
918 "response": [
919 {
920 "id": "evt_01m43smh3ve52vkcna207vqctf",
921 "type": "pull.opened",
922 "source": "work",
923 "time": "2026-10-01T18:20:02.117Z",
924 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
925 "actor": "usr_01kkntcg1eeb98j62xjm7eh09p",
926 "data": {
927 "pull_id": "pr_01m43smh3vexsr5pmp60qwv0vs",
928 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
929 "number": 14,
930 "issue": 12,
931 "agent": "claude-code"
932 }
933 },
934 {
935 "id": "evt_01m43shrzpf2vt5rxbb02z0xjt",
936 "type": "issue.opened",
937 "source": "work",
938 "time": "2026-10-01T18:04:11.482Z",
939 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
940 "actor": "usr_01kkntcg1eeb98j62xjm7eh09p",
941 "data": {
942 "issue_id": "iss_01m43shrzpfe49x74ga7sj1c6v",
943 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
944 "number": 12,
945 "title": "Greeting should name the caller"
946 }
947 }
948 ],
949 "notes": "Returns 50 events a page, newest first. To page back, send the `id` of the last event you have as `before`. `actor` is a user id, and `data` depends on `type`.\n\nTo follow a repository without a webhook, send `after` instead: the events written after that event come oldest first, and the last one's `id` is your next `after`. Add `wait` (seconds, at most 25) and a call that finds nothing holds on until a matching event is written or the time is up, then returns what it has, which may be an empty list; call again with the same `after`. Events come in the order g1t wrote them, so none is skipped when two arrive close together.\n\n```sh\ncurl -H \"Authorization: Bearer $G1T_TOKEN\" \\\n \"https://api.g1t.sh/repos/acme/rocket/events?after=evt_01m43smh3ve52vkcna207vqctf&types=work.claimed,integration.failed&numbers=12&wait=25\"\n```\n\n`types` and `numbers` are comma-separated lists in a query string, arrays in a body or an MCP call. `numbers` matches events about those issues and pull requests (`data.number`) and comments, reviews and links on them (`data.issue`). `since` is an RFC 3339 time. `after` and `before` cannot be given together."
950 },
951 "list_issues": {
952 "query": {
953 "state": "open",
954 "label": "feature"
955 },
956 "response": [
957 {
958 "id": "iss_01m43shrzpfe49x74ga7sj1c6v",
959 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
960 "number": 12,
961 "title": "Greeting should name the caller",
962 "body": "Take a name from the first argument; fall back to world.",
963 "labels": [
964 "feature"
965 ],
966 "state": "open",
967 "reason": null,
968 "resolved_by": null,
969 "author": {
970 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
971 "username": "syntaqx",
972 "display_username": "syntaqx",
973 "kind": "user",
974 "verified": false,
975 "workspaces": []
976 },
977 "requested_by": null,
978 "created_at": "2026-10-01T18:04:11.482Z",
979 "updated_at": "2026-10-01T18:04:11.482Z",
980 "closed_at": null,
981 "pull_count": 1,
982 "comment_count": 0,
983 "assignees": [],
984 "blocked_by": [],
985 "queued": false,
986 "agent": "claude-code",
987 "milestone": null
988 }
989 ],
990 "notes": "Returns at most 100 issues, newest first. `comment_count` counts comments, not events such as \"opened #14 for this\"."
991 },
992 "create_issue": {
993 "request": {
994 "title": "Greeting should name the caller",
995 "body": "Take a name from the first argument; fall back to world.",
996 "labels": [
997 "feature"
998 ]
999 },
1000 "response": {
1001 "id": "iss_01m43shrzpfe49x74ga7sj1c6v",
1002 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
1003 "number": 12,
1004 "title": "Greeting should name the caller",
1005 "body": "Take a name from the first argument; fall back to world.",
1006 "labels": [
1007 "feature"
1008 ],
1009 "state": "open",
1010 "reason": null,
1011 "resolved_by": null,
1012 "author": {
1013 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
1014 "username": "syntaqx",
1015 "display_username": "syntaqx",
1016 "kind": "user",
1017 "verified": false,
1018 "workspaces": []
1019 },
1020 "requested_by": null,
1021 "created_at": "2026-10-01T18:04:11.482Z",
1022 "updated_at": "2026-10-01T18:04:11.482Z",
1023 "closed_at": null,
1024 "pull_count": 0,
1025 "comment_count": 0,
1026 "assignees": [],
1027 "blocked_by": [],
1028 "queued": false,
1029 "agent": null,
1030 "milestone": null
1031 },
1032 "notes": "Labels are lowercased. A label not used before is created."
1033 },
1034 "get_issue": {
1035 "response": {
1036 "issue": {
1037 "id": "iss_01m43shrzpfe49x74ga7sj1c6v",
1038 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
1039 "number": 12,
1040 "title": "Greeting should name the caller",
1041 "body": "Take a name from the first argument; fall back to world.",
1042 "labels": [
1043 "feature"
1044 ],
1045 "state": "closed",
1046 "reason": "completed",
1047 "resolved_by": 14,
1048 "author": {
1049 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
1050 "username": "syntaqx",
1051 "display_username": "syntaqx",
1052 "kind": "user",
1053 "verified": false,
1054 "workspaces": []
1055 },
1056 "requested_by": null,
1057 "created_at": "2026-10-01T18:04:11.482Z",
1058 "updated_at": "2026-10-01T18:52:17.093Z",
1059 "closed_at": "2026-10-01T18:52:17.093Z",
1060 "pull_count": 2,
1061 "comment_count": 0,
1062 "assignees": [],
1063 "blocked_by": [],
1064 "queued": false,
1065 "agent": null,
1066 "milestone": null
1067 },
1068 "pulls": [
1069 {
1070 "id": "pr_01m43sjq8tcz5rbm2a7k4d9e6w",
1071 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
1072 "number": 13,
1073 "issue": 12,
1074 "title": "Greeting should name the caller",
1075 "body": null,
1076 "agent": "claude-code",
1077 "runtime": "external",
1078 "status": "closed",
1079 "fork": {
1080 "namespace": "pulls",
1081 "name": "pr_01m43sjq8tcz5rbm2a7k4d9e6w"
1082 },
1083 "fork_repo_id": "rep_01m43smh5xd7aw2kq9tv0b4c8e",
1084 "branch": null,
1085 "head_commit": null,
1086 "merge_base": null,
1087 "merged_by": null,
1088 "merged_at": null,
1089 "superseded_by": 14,
1090 "check_status": null,
1091 "files": [],
1092 "assignees": [],
1093 "reviewers": [],
1094 "labels": [],
1095 "milestone": null,
1096 "base": "main",
1097 "author": {
1098 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
1099 "username": "syntaqx",
1100 "display_username": "syntaqx",
1101 "kind": "user",
1102 "verified": false,
1103 "workspaces": []
1104 },
1105 "requested_by": null,
1106 "created_at": "2026-10-01T18:20:02.117Z",
1107 "updated_at": "2026-10-01T18:20:02.117Z"
1108 },
1109 {
1110 "id": "pr_01m43smh3vexsr5pmp60qwv0vs",
1111 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
1112 "number": 14,
1113 "issue": 12,
1114 "title": "Greeting should name the caller",
1115 "body": "Reads a name from the first argument. `hello ana` prints \"Hello, ana!\".",
1116 "agent": "claude-code",
1117 "runtime": "external",
1118 "status": "merged",
1119 "fork": {
1120 "namespace": "pulls",
1121 "name": "pr_01m43smh3vexsr5pmp60qwv0vs"
1122 },
1123 "fork_repo_id": "rep_01m43smh5xd7aw2kq9tv0b4c8e",
1124 "branch": null,
1125 "head_commit": "9f2c4e1a7b3d5f60812a4c6e8b0d2f4a6c8e0b13",
1126 "merge_base": "3a7e9c1b5d2f4a6c8e0b2d4f6a8c0e2b4d6f8a1c",
1127 "merged_by": "syntaqx",
1128 "merged_at": "2026-10-01T18:52:17.093Z",
1129 "superseded_by": null,
1130 "check_status": "passed",
1131 "files": [
1132 {
1133 "path": "src/main.rs",
1134 "additions": 6,
1135 "deletions": 2
1136 }
1137 ],
1138 "assignees": [],
1139 "reviewers": [
1140 "ana"
1141 ],
1142 "labels": [],
1143 "milestone": null,
1144 "base": "main",
1145 "author": {
1146 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
1147 "username": "syntaqx",
1148 "display_username": "syntaqx",
1149 "kind": "user",
1150 "verified": false,
1151 "workspaces": []
1152 },
1153 "requested_by": null,
1154 "created_at": "2026-10-01T18:20:02.117Z",
1155 "updated_at": "2026-10-01T18:52:17.093Z"
1156 }
1157 ],
1158 "comments": [
1159 {
1160 "id": "cmt_01m43sr2b7d5f0j6k3n8p1q4v9",
1161 "kind": "event",
1162 "author": {
1163 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
1164 "username": "syntaqx",
1165 "display_username": "syntaqx",
1166 "kind": "user",
1167 "verified": false,
1168 "workspaces": []
1169 },
1170 "body": "opened #14 for this",
1171 "path": null,
1172 "line": null,
1173 "verdict": null,
1174 "created_at": "2026-10-01T18:20:02.141Z"
1175 }
1176 ]
1177 },
1178 "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."
1179 },
1180 "update_issue": {
1181 "request": {
1182 "labels": [
1183 "feature",
1184 "good first issue"
1185 ],
1186 "assignees": [
1187 "syntaqx"
1188 ],
1189 "milestone": 3,
1190 "blocked_by": [9]
1191 },
1192 "response": {
1193 "id": "iss_01m43shrzpfe49x74ga7sj1c6v",
1194 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
1195 "number": 12,
1196 "title": "Greeting should name the caller",
1197 "body": "Take a name from the first argument; fall back to world.",
1198 "labels": [
1199 "feature",
1200 "good first issue"
1201 ],
1202 "state": "open",
1203 "reason": null,
1204 "resolved_by": null,
1205 "author": {
1206 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
1207 "username": "syntaqx",
1208 "display_username": "syntaqx",
1209 "kind": "user",
1210 "verified": false,
1211 "workspaces": []
1212 },
1213 "requested_by": null,
1214 "created_at": "2026-10-01T18:04:11.482Z",
1215 "updated_at": "2026-10-01T18:09:47.305Z",
1216 "closed_at": null,
1217 "pull_count": 0,
1218 "comment_count": 0,
1219 "assignees": [
1220 "syntaqx"
1221 ],
1222 "blocked_by": [9],
1223 "queued": false,
1224 "agent": null,
1225 "milestone": {
1226 "number": 3,
1227 "title": "Launch"
1228 }
1229 }
1230 },
1231 "close_issue": {
1232 "request": {
1233 "reason": "not_planned"
1234 },
1235 "response": {
1236 "id": "iss_01m43shrzpfe49x74ga7sj1c6v",
1237 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
1238 "number": 12,
1239 "title": "Greeting should name the caller",
1240 "body": "Take a name from the first argument; fall back to world.",
1241 "labels": [
1242 "feature"
1243 ],
1244 "state": "closed",
1245 "reason": "not_planned",
1246 "resolved_by": null,
1247 "author": {
1248 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
1249 "username": "syntaqx",
1250 "display_username": "syntaqx",
1251 "kind": "user",
1252 "verified": false,
1253 "workspaces": []
1254 },
1255 "requested_by": null,
1256 "created_at": "2026-10-01T18:04:11.482Z",
1257 "updated_at": "2026-10-01T19:30:00.214Z",
1258 "closed_at": "2026-10-01T19:30:00.214Z",
1259 "pull_count": 0,
1260 "comment_count": 0,
1261 "assignees": [],
1262 "blocked_by": [],
1263 "queued": false,
1264 "agent": null,
1265 "milestone": null
1266 }
1267 },
1268 "reopen_issue": {
1269 "response": {
1270 "id": "iss_01m43shrzpfe49x74ga7sj1c6v",
1271 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
1272 "number": 12,
1273 "title": "Greeting should name the caller",
1274 "body": "Take a name from the first argument; fall back to world.",
1275 "labels": [
1276 "feature"
1277 ],
1278 "state": "open",
1279 "reason": null,
1280 "resolved_by": null,
1281 "author": {
1282 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
1283 "username": "syntaqx",
1284 "display_username": "syntaqx",
1285 "kind": "user",
1286 "verified": false,
1287 "workspaces": []
1288 },
1289 "requested_by": null,
1290 "created_at": "2026-10-01T18:04:11.482Z",
1291 "updated_at": "2026-10-01T19:41:52.830Z",
1292 "closed_at": null,
1293 "pull_count": 0,
1294 "comment_count": 0,
1295 "assignees": [],
1296 "blocked_by": [],
1297 "queued": false,
1298 "agent": null,
1299 "milestone": null
1300 }
1301 },
1302 "add_comment": {
1303 "request": {
1304 "body": "Should an empty name fall back to \"world\"?"
1305 },
1306 "response": {
1307 "id": "cmt_01m43sv4c8e2g6j0m4q8t2x6a1",
1308 "kind": "comment",
1309 "author": {
1310 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
1311 "username": "syntaqx",
1312 "display_username": "syntaqx",
1313 "kind": "user",
1314 "verified": true,
1315 "workspaces": [
1316 {
1317 "slug": "flagon-io",
1318 "role": "owner"
1319 }
1320 ]
1321 },
1322 "body": "Should an empty name fall back to \"world\"?",
1323 "path": null,
1324 "line": null,
1325 "verdict": null,
1326 "created_at": "2026-10-01T18:12:30.551Z"
1327 }
1328 },
1329 "edit_comment": {
1330 "params": {
1331 "comment_id": "cmt_01m43sv4c8e2g6j0m4q8t2x6a1"
1332 },
1333 "request": {
1334 "body": "Should an empty name fall back to \"world\", or print the usage?"
1335 },
1336 "response": {
1337 "id": "cmt_01m43sv4c8e2g6j0m4q8t2x6a1",
1338 "kind": "comment",
1339 "author": {
1340 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
1341 "username": "syntaqx",
1342 "display_username": "syntaqx",
1343 "kind": "user",
1344 "verified": true,
1345 "workspaces": [
1346 {
1347 "slug": "flagon-io",
1348 "role": "owner"
1349 }
1350 ]
1351 },
1352 "body": "Should an empty name fall back to \"world\", or print the usage?",
1353 "path": null,
1354 "line": null,
1355 "verdict": null,
1356 "created_at": "2026-10-01T18:12:30.551Z",
1357 "edited_at": "2026-10-01T18:30:04.210Z"
1358 },
1359 "notes": "Its author, or someone with the Maintain role or higher. A note of something that happened answers `409`."
1360 },
1361 "delete_comment": {
1362 "params": {
1363 "comment_id": "cmt_01m43sv4c8e2g6j0m4q8t2x6a1"
1364 },
1365 "notes": "Answers `204` with no body. Its author, or someone with the Maintain role or higher. A review that approved or requested changes answers `409`: edit it instead."
1366 },
1367 "list_labels": {
1368 "response": [
1369 {
1370 "name": "bug",
1371 "color": "d73a4a",
1372 "description": "Something isn't working",
1373 "issues": 4,
1374 "pulls": 1
1375 },
1376 {
1377 "name": "dependencies",
1378 "color": "0366d6",
1379 "description": "Updates a dependency",
1380 "issues": 0,
1381 "pulls": 6
1382 },
1383 {
1384 "name": "good first issue",
1385 "color": "7057ff",
1386 "description": "Good for newcomers",
1387 "issues": 2,
1388 "pulls": 0
1389 }
1390 ],
1391 "notes": "By name. A new repository starts with the default labels; add_default_labels adds those an older one is missing."
1392 },
1393 "list_pull_requests": {
1394 "query": {
1395 "state": "open"
1396 },
1397 "response": [
1398 {
1399 "id": "pr_01m43smh3vexsr5pmp60qwv0vs",
1400 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
1401 "number": 14,
1402 "issue": 12,
1403 "title": "Greeting should name the caller",
1404 "body": "Reads a name from the first argument. `hello ana` prints \"Hello, ana!\".",
1405 "agent": "claude-code",
1406 "runtime": "external",
1407 "status": "open",
1408 "fork": {
1409 "namespace": "pulls",
1410 "name": "pr_01m43smh3vexsr5pmp60qwv0vs"
1411 },
1412 "fork_repo_id": "rep_01m43smh5xd7aw2kq9tv0b4c8e",
1413 "branch": null,
1414 "head_commit": "9f2c4e1a7b3d5f60812a4c6e8b0d2f4a6c8e0b13",
1415 "merge_base": null,
1416 "merged_by": null,
1417 "merged_at": null,
1418 "superseded_by": null,
1419 "check_status": "passed",
1420 "files": [
1421 {
1422 "path": "src/main.rs",
1423 "additions": 6,
1424 "deletions": 2
1425 }
1426 ],
1427 "assignees": [],
1428 "reviewers": [
1429 "ana"
1430 ],
1431 "team_reviewers": [],
1432 "author": {
1433 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
1434 "username": "syntaqx",
1435 "display_username": "syntaqx",
1436 "kind": "user",
1437 "verified": false,
1438 "workspaces": []
1439 },
1440 "requested_by": null,
1441 "created_at": "2026-10-01T18:20:02.117Z",
1442 "updated_at": "2026-10-01T18:35:44.902Z",
1443 "labels": [],
1444 "milestone": null,
1445 "base": "main"
1446 }
1447 ],
1448 "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."
1449 },
1450 "create_pull_request": {
1451 "request": {
1452 "issue": 12,
1453 "agent": "claude-code"
1454 },
1455 "response": {
1456 "pull": {
1457 "id": "pr_01m43smh3vexsr5pmp60qwv0vs",
1458 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
1459 "number": 14,
1460 "issue": 12,
1461 "title": "Greeting should name the caller",
1462 "body": null,
1463 "agent": "claude-code",
1464 "runtime": "external",
1465 "status": "draft",
1466 "fork": {
1467 "namespace": "pulls",
1468 "name": "pr_01m43smh3vexsr5pmp60qwv0vs"
1469 },
1470 "fork_repo_id": "rep_01m43smh5xd7aw2kq9tv0b4c8e",
1471 "branch": null,
1472 "head_commit": null,
1473 "merge_base": null,
1474 "merged_by": null,
1475 "merged_at": null,
1476 "superseded_by": null,
1477 "check_status": null,
1478 "files": [],
1479 "assignees": [],
1480 "reviewers": [],
1481 "labels": [],
1482 "milestone": null,
1483 "base": "main",
1484 "author": {
1485 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
1486 "username": "syntaqx",
1487 "display_username": "syntaqx",
1488 "kind": "user",
1489 "verified": false,
1490 "workspaces": []
1491 },
1492 "requested_by": null,
1493 "created_at": "2026-10-01T18:20:02.117Z",
1494 "updated_at": "2026-10-01T18:20:02.117Z"
1495 },
1496 "git": {
1497 "remote": "https://g1t.sh/pulls/pr_01m43smh3vexsr5pmp60qwv0vs.git",
1498 "username": "syntaqx",
1499 "password": "your g1t access token"
1500 }
1501 },
1502 "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."
1503 },
1504 "get_pull_request": {
1505 "response": {
1506 "pull": {
1507 "id": "pr_01m43smh3vexsr5pmp60qwv0vs",
1508 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
1509 "number": 14,
1510 "issue": 12,
1511 "title": "Greeting should name the caller",
1512 "body": "Reads a name from the first argument. `hello ana` prints \"Hello, ana!\".",
1513 "agent": "claude-code",
1514 "runtime": "external",
1515 "status": "open",
1516 "fork": {
1517 "namespace": "pulls",
1518 "name": "pr_01m43smh3vexsr5pmp60qwv0vs"
1519 },
1520 "fork_repo_id": "rep_01m43smh5xd7aw2kq9tv0b4c8e",
1521 "branch": null,
1522 "head_commit": "9f2c4e1a7b3d5f60812a4c6e8b0d2f4a6c8e0b13",
1523 "merge_base": null,
1524 "merged_by": null,
1525 "merged_at": null,
1526 "superseded_by": null,
1527 "check_status": "passed",
1528 "files": [
1529 {
1530 "path": "src/main.rs",
1531 "additions": 6,
1532 "deletions": 2
1533 }
1534 ],
1535 "assignees": [],
1536 "reviewers": [
1537 "ana"
1538 ],
1539 "team_reviewers": [
1540 "flagon-io/backend"
1541 ],
1542 "author": {
1543 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
1544 "username": "syntaqx",
1545 "display_username": "syntaqx",
1546 "kind": "user",
1547 "verified": false,
1548 "workspaces": []
1549 },
1550 "requested_by": null,
1551 "created_at": "2026-10-01T18:20:02.117Z",
1552 "updated_at": "2026-10-01T18:35:44.902Z",
1553 "labels": [],
1554 "milestone": null,
1555 "base": "main"
1556 },
1557 "issue": {
1558 "id": "iss_01m43shrzpfe49x74ga7sj1c6v",
1559 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
1560 "number": 12,
1561 "title": "Greeting should name the caller",
1562 "body": "Take a name from the first argument; fall back to world.",
1563 "labels": [
1564 "feature"
1565 ],
1566 "state": "open",
1567 "reason": null,
1568 "resolved_by": null,
1569 "author": {
1570 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
1571 "username": "syntaqx",
1572 "display_username": "syntaqx",
1573 "kind": "user",
1574 "verified": false,
1575 "workspaces": []
1576 },
1577 "requested_by": null,
1578 "created_at": "2026-10-01T18:04:11.482Z",
1579 "updated_at": "2026-10-01T18:20:02.117Z",
1580 "closed_at": null,
1581 "pull_count": 1,
1582 "comment_count": 0,
1583 "assignees": [],
1584 "blocked_by": [],
1585 "queued": false,
1586 "agent": "claude-code",
1587 "milestone": null
1588 },
1589 "comments": [
1590 {
1591 "id": "cmt_01m43st6d0f4h8k2n6r0v4z8c2",
1592 "kind": "event",
1593 "author": {
1594 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
1595 "username": "syntaqx",
1596 "display_username": "syntaqx",
1597 "kind": "user",
1598 "verified": false,
1599 "workspaces": []
1600 },
1601 "body": "marked this ready for review",
1602 "path": null,
1603 "line": null,
1604 "verdict": null,
1605 "created_at": "2026-10-01T18:33:10.420Z"
1606 },
1607 {
1608 "id": "cmt_01m43sw2a6c0e4h8k2n6r0v4z8",
1609 "kind": "comment",
1610 "author": {
1611 "id": "agt_01m43q8d2f6h0k4n8r2v6z0c4g",
1612 "username": "margo",
1613 "kind": "agent",
1614 "verified": false,
1615 "workspaces": []
1616 },
1617 "body": "The empty-name case is handled and tested. One nit: trim the name before using it.",
1618 "path": null,
1619 "line": null,
1620 "verdict": "approve",
1621 "created_at": "2026-10-01T18:36:41.207Z",
1622 "agent": {
1623 "id": "agt_01m43q8d2f6h0k4n8r2v6z0c4g",
1624 "handle": "margo",
1625 "display_name": "Margo",
1626 "avatar_seed": "margo"
1627 },
1628 "acting_for": {
1629 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
1630 "username": "syntaqx",
1631 "kind": "user",
1632 "verified": false,
1633 "workspaces": []
1634 },
1635 "advisory": true
1636 }
1637 ],
1638 "checks": null,
1639 "overlaps": [],
1640 "behind": false,
1641 "lifecycle": null,
1642 "landing": false,
1643 "stalled": null,
1644 "statuses": [
1645 {
1646 "context": "CI / pull_request",
1647 "state": "success",
1648 "description": "CI passed",
1649 "target_url": "https://g1t.sh/syntaqx/hello/actions/runs/run_01m43sw8e2g6j0m4q8t2x6a0c4",
1650 "updated_at": "2026-10-01T18:35:44.902Z"
1651 }
1652 ],
1653 "required_checks": [
1654 {
1655 "name": "CI",
1656 "state": "success",
1657 "description": "CI passed",
1658 "target_url": "https://g1t.sh/syntaqx/hello/actions/runs/run_01m43sw8e2g6j0m4q8t2x6a0c4"
1659 }
1660 ],
1661 "code_owners": {
1662 "path": ".github/CODEOWNERS",
1663 "required": true,
1664 "reviews": [
1665 {
1666 "section": null,
1667 "line": 3,
1668 "pattern": "/src/",
1669 "owners": [
1670 "@flagon-io/backend"
1671 ],
1672 "files": [
1673 "src/main.rs"
1674 ],
1675 "optional": false,
1676 "required": 1,
1677 "approved_by": [],
1678 "changes_requested_by": [],
1679 "satisfied": false
1680 }
1681 ],
1682 "missing": "Code owners have not approved: @flagon-io/backend for /src/.",
1683 "errors": 0
1684 }
1685 },
1686 "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/)."
1687 },
1688 "get_pull_request_changes": {
1689 "response": {
1690 "base": "3a7e9c1b5d2f4a6c8e0b2d4f6a8c0e2b4d6f8a1c",
1691 "head": "9f2c4e1a7b3d5f60812a4c6e8b0d2f4a6c8e0b13",
1692 "files": [
1693 {
1694 "path": "src/main.rs",
1695 "status": "modified",
1696 "additions": 1,
1697 "deletions": 1,
1698 "binary": false,
1699 "hunks": [
1700 {
1701 "lines": [
1702 {
1703 "kind": "context",
1704 "old": 3,
1705 "new": 3,
1706 "text": "fn main() {"
1707 },
1708 {
1709 "kind": "delete",
1710 "old": 4,
1711 "new": null,
1712 "text": " println!(\"Hello, world!\");"
1713 },
1714 {
1715 "kind": "add",
1716 "old": null,
1717 "new": 4,
1718 "text": " println!(\"Hello, {}!\", std::env::args().nth(1).unwrap_or(\"world\".into()));"
1719 },
1720 {
1721 "kind": "context",
1722 "old": 5,
1723 "new": 5,
1724 "text": "}"
1725 }
1726 ]
1727 }
1728 ]
1729 }
1730 ],
1731 "truncated": false
1732 },
1733 "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."
1734 },
1735 "mark_pull_request_ready": {
1736 "request": {
1737 "summary": "Reads a name from the first argument. `hello ana` prints \"Hello, ana!\"."
1738 },
1739 "response": {
1740 "id": "pr_01m43smh3vexsr5pmp60qwv0vs",
1741 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
1742 "number": 14,
1743 "issue": 12,
1744 "title": "Greeting should name the caller",
1745 "body": "Reads a name from the first argument. `hello ana` prints \"Hello, ana!\".",
1746 "agent": "claude-code",
1747 "runtime": "external",
1748 "status": "open",
1749 "fork": {
1750 "namespace": "pulls",
1751 "name": "pr_01m43smh3vexsr5pmp60qwv0vs"
1752 },
1753 "fork_repo_id": "rep_01m43smh5xd7aw2kq9tv0b4c8e",
1754 "branch": null,
1755 "head_commit": "9f2c4e1a7b3d5f60812a4c6e8b0d2f4a6c8e0b13",
1756 "merge_base": null,
1757 "merged_by": null,
1758 "merged_at": null,
1759 "superseded_by": null,
1760 "check_status": null,
1761 "files": [
1762 {
1763 "path": "src/main.rs",
1764 "additions": 6,
1765 "deletions": 2
1766 }
1767 ],
1768 "assignees": [],
1769 "reviewers": [],
1770 "labels": [],
1771 "milestone": null,
1772 "base": "main",
1773 "author": {
1774 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
1775 "username": "syntaqx",
1776 "display_username": "syntaqx",
1777 "kind": "user",
1778 "verified": false,
1779 "workspaces": []
1780 },
1781 "requested_by": null,
1782 "created_at": "2026-10-01T18:20:02.117Z",
1783 "updated_at": "2026-10-01T18:33:10.398Z"
1784 }
1785 },
1786 "review_pull_request": {
1787 "request": {
1788 "verdict": "request_changes",
1789 "body": "Trim the name before using it."
1790 },
1791 "response": {
1792 "id": "cmt_01m43sx9f3h7k1n5r9v3z7d1g5",
1793 "kind": "comment",
1794 "author": {
1795 "id": "usr_01kz9d3f7h1k5n9r3v7z1c5g9b",
1796 "username": "ana",
1797 "display_username": "Ana",
1798 "kind": "user",
1799 "verified": true,
1800 "workspaces": [
1801 {
1802 "slug": "flagon-io",
1803 "role": "member"
1804 }
1805 ]
1806 },
1807 "body": "Trim the name before using it.",
1808 "path": null,
1809 "line": null,
1810 "verdict": "request_changes",
1811 "created_at": "2026-10-01T18:40:05.019Z"
1812 }
1813 },
1814 "request_reviewers": {
1815 "params": {
1816 "owner": "flagon-io",
1817 "name": "hello",
1818 "number": 14
1819 },
1820 "request": {
1821 "reviewers": [
1822 "bo"
1823 ],
1824 "team_reviewers": [
1825 "backend"
1826 ]
1827 },
1828 "response": {
1829 "id": "pr_01m43smh3vexsr5pmp60qwv0vs",
1830 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
1831 "number": 14,
1832 "issue": 12,
1833 "title": "Greeting should name the caller",
1834 "body": "Reads a name from the first argument. `hello ana` prints \"Hello, ana!\".",
1835 "agent": "claude-code",
1836 "runtime": "external",
1837 "status": "open",
1838 "fork": {
1839 "namespace": "pulls",
1840 "name": "pr_01m43smh3vexsr5pmp60qwv0vs"
1841 },
1842 "fork_repo_id": "rep_01m43smh5xd7aw2kq9tv0b4c8e",
1843 "branch": null,
1844 "head_commit": "9f2c4e1a7b3d5f60812a4c6e8b0d2f4a6c8e0b13",
1845 "merge_base": null,
1846 "merged_by": null,
1847 "merged_at": null,
1848 "superseded_by": null,
1849 "check_status": "passed",
1850 "files": [
1851 {
1852 "path": "src/main.rs",
1853 "additions": 6,
1854 "deletions": 2
1855 }
1856 ],
1857 "assignees": [],
1858 "reviewers": [
1859 "ana",
1860 "bo"
1861 ],
1862 "team_reviewers": [
1863 "flagon-io/backend"
1864 ],
1865 "author": {
1866 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
1867 "username": "syntaqx",
1868 "display_username": "syntaqx",
1869 "kind": "user",
1870 "verified": false,
1871 "workspaces": []
1872 },
1873 "requested_by": null,
1874 "created_at": "2026-10-01T18:20:02.117Z",
1875 "updated_at": "2026-10-01T18:40:12.331Z"
1876 },
1877 "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/)."
1878 },
1879 "remove_requested_reviewers": {
1880 "params": {
1881 "owner": "flagon-io",
1882 "name": "hello",
1883 "number": 14
1884 },
1885 "request": {
1886 "reviewers": [
1887 "bo"
1888 ],
1889 "team_reviewers": [
1890 "flagon-io/backend"
1891 ]
1892 },
1893 "response": {
1894 "id": "pr_01m43smh3vexsr5pmp60qwv0vs",
1895 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
1896 "number": 14,
1897 "issue": 12,
1898 "title": "Greeting should name the caller",
1899 "body": "Reads a name from the first argument. `hello ana` prints \"Hello, ana!\".",
1900 "agent": "claude-code",
1901 "runtime": "external",
1902 "status": "open",
1903 "fork": {
1904 "namespace": "pulls",
1905 "name": "pr_01m43smh3vexsr5pmp60qwv0vs"
1906 },
1907 "fork_repo_id": "rep_01m43smh5xd7aw2kq9tv0b4c8e",
1908 "branch": null,
1909 "head_commit": "9f2c4e1a7b3d5f60812a4c6e8b0d2f4a6c8e0b13",
1910 "merge_base": null,
1911 "merged_by": null,
1912 "merged_at": null,
1913 "superseded_by": null,
1914 "check_status": "passed",
1915 "files": [
1916 {
1917 "path": "src/main.rs",
1918 "additions": 6,
1919 "deletions": 2
1920 }
1921 ],
1922 "assignees": [],
1923 "reviewers": [
1924 "ana"
1925 ],
1926 "team_reviewers": [],
1927 "author": {
1928 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
1929 "username": "syntaqx",
1930 "display_username": "syntaqx",
1931 "kind": "user",
1932 "verified": false,
1933 "workspaces": []
1934 },
1935 "requested_by": null,
1936 "created_at": "2026-10-01T18:20:02.117Z",
1937 "updated_at": "2026-10-01T18:41:30.904Z"
1938 },
1939 "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."
1940 },
1941 "merge_pull_request": {
1942 "request": {
1943 "keep_issue_open": false
1944 },
1945 "response": {
1946 "id": "pr_01m43smh3vexsr5pmp60qwv0vs",
1947 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
1948 "number": 14,
1949 "issue": 12,
1950 "title": "Greeting should name the caller",
1951 "body": "Reads a name from the first argument. `hello ana` prints \"Hello, ana!\".",
1952 "agent": "claude-code",
1953 "runtime": "external",
1954 "status": "merged",
1955 "fork": {
1956 "namespace": "pulls",
1957 "name": "pr_01m43smh3vexsr5pmp60qwv0vs"
1958 },
1959 "fork_repo_id": "rep_01m43smh5xd7aw2kq9tv0b4c8e",
1960 "branch": null,
1961 "head_commit": "9f2c4e1a7b3d5f60812a4c6e8b0d2f4a6c8e0b13",
1962 "merge_base": "3a7e9c1b5d2f4a6c8e0b2d4f6a8c0e2b4d6f8a1c",
1963 "merged_by": "syntaqx",
1964 "merged_at": "2026-10-01T18:52:17.093Z",
1965 "superseded_by": null,
1966 "check_status": "passed",
1967 "files": [
1968 {
1969 "path": "src/main.rs",
1970 "additions": 6,
1971 "deletions": 2
1972 }
1973 ],
1974 "assignees": [],
1975 "reviewers": [
1976 "ana"
1977 ],
1978 "labels": [],
1979 "milestone": null,
1980 "base": "main",
1981 "author": {
1982 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
1983 "username": "syntaqx",
1984 "display_username": "syntaqx",
1985 "kind": "user",
1986 "verified": false,
1987 "workspaces": []
1988 },
1989 "requested_by": null,
1990 "created_at": "2026-10-01T18:20:02.117Z",
1991 "updated_at": "2026-10-01T18:52:17.093Z"
1992 },
1993 "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."
1994 },
1995 "close_pull_request": {
1996 "response": {
1997 "id": "pr_01m43smh3vexsr5pmp60qwv0vs",
1998 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
1999 "number": 14,
2000 "issue": 12,
2001 "title": "Greeting should name the caller",
2002 "body": "Reads a name from the first argument. `hello ana` prints \"Hello, ana!\".",
2003 "agent": "claude-code",
2004 "runtime": "external",
2005 "status": "closed",
2006 "fork": {
2007 "namespace": "pulls",
2008 "name": "pr_01m43smh3vexsr5pmp60qwv0vs"
2009 },
2010 "fork_repo_id": "rep_01m43smh5xd7aw2kq9tv0b4c8e",
2011 "branch": null,
2012 "head_commit": "9f2c4e1a7b3d5f60812a4c6e8b0d2f4a6c8e0b13",
2013 "merge_base": null,
2014 "merged_by": null,
2015 "merged_at": null,
2016 "superseded_by": null,
2017 "check_status": null,
2018 "files": [
2019 {
2020 "path": "src/main.rs",
2021 "additions": 6,
2022 "deletions": 2
2023 }
2024 ],
2025 "assignees": [],
2026 "reviewers": [],
2027 "labels": [],
2028 "milestone": null,
2029 "base": "main",
2030 "author": {
2031 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
2032 "username": "syntaqx",
2033 "display_username": "syntaqx",
2034 "kind": "user",
2035 "verified": false,
2036 "workspaces": []
2037 },
2038 "requested_by": null,
2039 "created_at": "2026-10-01T18:20:02.117Z",
2040 "updated_at": "2026-10-01T19:02:48.760Z"
2041 }
2042 },
2043 "reopen_pull_request": {
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": null,
2066 "files": [
2067 {
2068 "path": "src/main.rs",
2069 "additions": 6,
2070 "deletions": 2
2071 }
2072 ],
2073 "assignees": [],
2074 "reviewers": [],
2075 "labels": [],
2076 "milestone": null,
2077 "base": "main",
2078 "author": {
2079 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
2080 "username": "syntaqx",
2081 "display_username": "syntaqx",
2082 "kind": "user",
2083 "verified": false,
2084 "workspaces": []
2085 },
2086 "requested_by": null,
2087 "created_at": "2026-10-01T18:20:02.117Z",
2088 "updated_at": "2026-10-01T19:14:05.322Z"
2089 },
2090 "notes": "A merged pull request, or one that is not closed, answers `409`. A pull request closed as a draft comes back as a draft; any other comes back ready for review. A pull request from a branch of the repository whose branch was deleted answers `409` until the branch is pushed again. The same as `PATCH /repos/{owner}/{repo}/pulls/{number}` with `state` `open`."
2091 },
2092 "convert_pull_request_to_draft": {
2093 "response": {
2094 "id": "pr_01m43smh3vexsr5pmp60qwv0vs",
2095 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
2096 "number": 14,
2097 "issue": 12,
2098 "title": "Greeting should name the caller",
2099 "body": "Reads a name from the first argument. `hello ana` prints \"Hello, ana!\".",
2100 "agent": "claude-code",
2101 "runtime": "external",
2102 "status": "draft",
2103 "fork": {
2104 "namespace": "pulls",
2105 "name": "pr_01m43smh3vexsr5pmp60qwv0vs"
2106 },
2107 "fork_repo_id": "rep_01m43smh5xd7aw2kq9tv0b4c8e",
2108 "branch": null,
2109 "head_commit": "9f2c4e1a7b3d5f60812a4c6e8b0d2f4a6c8e0b13",
2110 "merge_base": null,
2111 "merged_by": null,
2112 "merged_at": null,
2113 "superseded_by": null,
2114 "check_status": null,
2115 "files": [
2116 {
2117 "path": "src/main.rs",
2118 "additions": 6,
2119 "deletions": 2
2120 }
2121 ],
2122 "assignees": [],
2123 "reviewers": [],
2124 "labels": [],
2125 "milestone": null,
2126 "base": "main",
2127 "author": {
2128 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
2129 "username": "syntaqx",
2130 "display_username": "syntaqx",
2131 "kind": "user",
2132 "verified": false,
2133 "workspaces": []
2134 },
2135 "requested_by": null,
2136 "created_at": "2026-10-01T18:20:02.117Z",
2137 "updated_at": "2026-10-01T19:20:41.908Z"
2138 },
2139 "notes": "Only a pull request that is open and ready for review can be made a draft; any other answers `409`. It leaves the [merge queue](/guides/merge-queue/)."
2140 },
2141 "get_merge_queue": {
2142 "response": {
2143 "enabled": true,
2144 "active": [
2145 {
2146 "id": "qen_01m43rn0qsft1tpap1awkewzbb",
2147 "number": 14,
2148 "title": "Greeting should name the caller",
2149 "agent": "claude-code",
2150 "state": "testing",
2151 "ahead": [],
2152 "base_commit": "3a7e9c1b5d2f4a6c8e0b2d4f6a8c0e2b4d6f8a1c",
2153 "combined_commit": null,
2154 "error": null,
2155 "results": [],
2156 "enqueued_by": "syntaqx",
2157 "created_at": "2026-10-04T15:31:20.441Z",
2158 "finished_at": null
2159 }
2160 ],
2161 "recent": [
2162 {
2163 "id": "qen_01m43khqjmeb5a1magayrnk63z",
2164 "number": 11,
2165 "title": "Fix trailing newline in greeting",
2166 "agent": "g1t",
2167 "state": "landed",
2168 "ahead": [],
2169 "base_commit": "4b1d7e9c2a5f8e3d6c0b9a7e5d3c1b8a6f4e2d0c",
2170 "combined_commit": "c3e8a1f6d4b2097e5c3a1f8d6b4e2c0a9f7d5b3e",
2171 "error": null,
2172 "results": [
2173 {
2174 "command": "cargo test",
2175 "passed": true,
2176 "exit_code": 0,
2177 "output": "test result: ok. 12 passed; 0 failed\n",
2178 "duration_ms": 48211
2179 }
2180 ],
2181 "enqueued_by": "g1t",
2182 "created_at": "2026-10-04T14:02:09.876Z",
2183 "finished_at": "2026-10-04T14:09:55.102Z"
2184 }
2185 ]
2186 },
2187 "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."
2188 },
2189 "read_session": {
2190 "query": {
2191 "after": 0
2192 },
2193 "response": [
2194 {
2195 "seq": 1,
2196 "kind": "prompt",
2197 "text": "Make the greeting name the caller (issue #12).",
2198 "tool": null,
2199 "commit": null,
2200 "at": "2026-10-01T18:21:00.004Z"
2201 },
2202 {
2203 "seq": 2,
2204 "kind": "tool_call",
2205 "text": "cargo test",
2206 "tool": "bash",
2207 "commit": "9f2c4e1a7b3d5f60812a4c6e8b0d2f4a6c8e0b13",
2208 "at": "2026-10-01T18:30:12.660Z"
2209 }
2210 ]
2211 },
2212 "record_session": {
2213 "request": {
2214 "entries": [
2215 {
2216 "kind": "message",
2217 "text": "Reading src/main.rs."
2218 },
2219 {
2220 "kind": "tool_call",
2221 "text": "cargo test",
2222 "tool": "bash"
2223 }
2224 ]
2225 },
2226 "response": {
2227 "count": 2
2228 },
2229 "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/)."
2230 },
2231 "start_session": {
2232 "request": {
2233 "harness": "claude_code",
2234 "harness_session_id": "5b0c1f9e-3d2a-4e8b-9f61-0c7d2a9e4b13",
2235 "issue": 12,
2236 "branch": "greet-caller",
2237 "title": "Make the greeting name the caller"
2238 },
2239 "response": {
2240 "id": "ses_01m4b2c3d4e5f6g7h8j9k0m1n2",
2241 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
2242 "issue": 12,
2243 "pull": null,
2244 "branch": "greet-caller",
2245 "actor": {
2246 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
2247 "username": "syntaqx"
2248 },
2249 "harness": "claude_code",
2250 "harness_session_id": "5b0c1f9e-3d2a-4e8b-9f61-0c7d2a9e4b13",
2251 "title": "Make the greeting name the caller",
2252 "state": "active",
2253 "head_commit": null,
2254 "started_at": "2026-10-12T14:02:11.204Z",
2255 "last_seen_at": "2026-10-12T14:02:11.204Z",
2256 "ended_at": null,
2257 "end_reason": null
2258 },
2259 "notes": "Idempotent on `harness_session_id`: a second start with it returns this session, so call it from a hook without checking first. `state` is `active`, `idle` (no heartbeat for 15 minutes) or `ended` (ended, or no heartbeat for 2 hours: `end_reason` `timed_out`). See [Sessions](/guides/sessions/)."
2260 },
2261 "update_session": {
2262 "request": {
2263 "pull": 14,
2264 "head_commit": "9f2c4e1a7b3d5f60812a4c6e8b0d2f4a6c8e0b13"
2265 },
2266 "response": {
2267 "id": "ses_01m4b2c3d4e5f6g7h8j9k0m1n2",
2268 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
2269 "issue": 12,
2270 "pull": 14,
2271 "branch": "greet-caller",
2272 "actor": {
2273 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
2274 "username": "syntaqx"
2275 },
2276 "harness": "claude_code",
2277 "harness_session_id": "5b0c1f9e-3d2a-4e8b-9f61-0c7d2a9e4b13",
2278 "title": "Make the greeting name the caller",
2279 "state": "active",
2280 "head_commit": "9f2c4e1a7b3d5f60812a4c6e8b0d2f4a6c8e0b13",
2281 "started_at": "2026-10-12T14:02:11.204Z",
2282 "last_seen_at": "2026-10-12T14:31:40.518Z",
2283 "ended_at": null,
2284 "end_reason": null
2285 },
2286 "notes": "Send `{}` as a heartbeat. Each call renews the session's claims and brings back one that timed out. Refused with `404` for a session that is not yours, and `409` for one you ended."
2287 },
2288 "end_session": {
2289 "request": {
2290 "reason": "done"
2291 },
2292 "response": {
2293 "id": "ses_01m4b2c3d4e5f6g7h8j9k0m1n2",
2294 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
2295 "issue": 12,
2296 "pull": 14,
2297 "branch": "greet-caller",
2298 "actor": {
2299 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
2300 "username": "syntaqx"
2301 },
2302 "harness": "claude_code",
2303 "harness_session_id": "5b0c1f9e-3d2a-4e8b-9f61-0c7d2a9e4b13",
2304 "title": "Make the greeting name the caller",
2305 "state": "ended",
2306 "head_commit": "9f2c4e1a7b3d5f60812a4c6e8b0d2f4a6c8e0b13",
2307 "started_at": "2026-10-12T14:02:11.204Z",
2308 "last_seen_at": "2026-10-12T14:40:03.115Z",
2309 "ended_at": "2026-10-12T14:40:03.115Z",
2310 "end_reason": "done"
2311 }
2312 },
2313 "get_session": {
2314 "query": {
2315 "after": 0
2316 },
2317 "response": {
2318 "session": {
2319 "id": "ses_01m4b2c3d4e5f6g7h8j9k0m1n2",
2320 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
2321 "issue": 12,
2322 "pull": 14,
2323 "branch": "greet-caller",
2324 "actor": {
2325 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
2326 "username": "syntaqx"
2327 },
2328 "harness": "claude_code",
2329 "harness_session_id": "5b0c1f9e-3d2a-4e8b-9f61-0c7d2a9e4b13",
2330 "title": "Make the greeting name the caller",
2331 "state": "active",
2332 "head_commit": "9f2c4e1a7b3d5f60812a4c6e8b0d2f4a6c8e0b13",
2333 "started_at": "2026-10-12T14:02:11.204Z",
2334 "last_seen_at": "2026-10-12T14:31:40.518Z",
2335 "ended_at": null,
2336 "end_reason": null
2337 },
2338 "entries": [
2339 {
2340 "seq": 1,
2341 "kind": "prompt",
2342 "text": "Make the greeting name the caller (issue #12).",
2343 "tool": null,
2344 "commit": null,
2345 "at": "2026-10-12T14:02:12.008Z"
2346 },
2347 {
2348 "seq": 2,
2349 "kind": "tool_call",
2350 "text": "cargo test",
2351 "tool": "Bash",
2352 "commit": "9f2c4e1a7b3d5f60812a4c6e8b0d2f4a6c8e0b13",
2353 "at": "2026-10-12T14:30:12.660Z"
2354 }
2355 ]
2356 },
2357 "notes": "Entries are numbered within the session and come 500 at a time; send the last `seq` you have as `after` for the next page."
2358 },
2359 "list_sessions": {
2360 "query": {
2361 "state": "active",
2362 "issue": 12
2363 },
2364 "response": [
2365 {
2366 "id": "ses_01m4b2c3d4e5f6g7h8j9k0m1n2",
2367 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
2368 "issue": 12,
2369 "pull": 14,
2370 "branch": "greet-caller",
2371 "actor": {
2372 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
2373 "username": "syntaqx"
2374 },
2375 "harness": "claude_code",
2376 "harness_session_id": "5b0c1f9e-3d2a-4e8b-9f61-0c7d2a9e4b13",
2377 "title": "Make the greeting name the caller",
2378 "state": "active",
2379 "head_commit": "9f2c4e1a7b3d5f60812a4c6e8b0d2f4a6c8e0b13",
2380 "started_at": "2026-10-12T14:02:11.204Z",
2381 "last_seen_at": "2026-10-12T14:31:40.518Z",
2382 "ended_at": null,
2383 "end_reason": null
2384 }
2385 ]
2386 },
2387 "record_session_entries": {
2388 "request": {
2389 "entries": [
2390 {
2391 "kind": "prompt",
2392 "text": "Make the greeting name the caller (issue #12).",
2393 "key": "prompt-1"
2394 },
2395 {
2396 "kind": "tool_call",
2397 "text": "cargo test",
2398 "tool": "Bash",
2399 "key": "tool-7"
2400 }
2401 ]
2402 },
2403 "response": {
2404 "recorded": 2,
2405 "duplicates": 0
2406 },
2407 "notes": "Up to 200 entries a request. An entry whose `key` the session recorded before is counted in `duplicates` and not recorded again. Entries of a session on a pull request show in that pull request's session too (read_session)."
2408 },
2409 "claim_issue": {
2410 "request": {
2411 "session_id": "ses_01m4b2c3d4e5f6g7h8j9k0m1n2",
2412 "note": "Taking the argument parsing first.",
2413 "ttl_minutes": 30
2414 },
2415 "response": {
2416 "claim": {
2417 "id": "clm_01m4b3d5f7h9k1m3p5r7t9w1y3",
2418 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
2419 "issue": 12,
2420 "session_id": "ses_01m4b2c3d4e5f6g7h8j9k0m1n2",
2421 "actor": {
2422 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
2423 "username": "syntaqx"
2424 },
2425 "harness": "claude_code",
2426 "note": "Taking the argument parsing first.",
2427 "state": "active",
2428 "created_at": "2026-10-12T14:03:02.771Z",
2429 "expires_at": "2026-10-12T15:01:40.518Z",
2430 "ended_at": null,
2431 "end_reason": null,
2432 "handoff_to": null
2433 },
2434 "others": [
2435 {
2436 "id": "clm_01m4b2a4c6e8g0j2l4n6q8s0u2",
2437 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
2438 "issue": 12,
2439 "session_id": null,
2440 "actor": {
2441 "id": "usr_01kkp2v7d4fh8m3q6t9w2z5c8e",
2442 "username": "ana"
2443 },
2444 "harness": null,
2445 "note": "Looking at the tests.",
2446 "state": "active",
2447 "created_at": "2026-10-12T13:50:12.000Z",
2448 "expires_at": "2026-10-12T14:20:12.000Z",
2449 "ended_at": null,
2450 "end_reason": null,
2451 "handoff_to": null
2452 }
2453 ],
2454 "blocked_by": [
2455 {
2456 "number": 9,
2457 "title": "Read arguments with a parser",
2458 "state": "open",
2459 "claims": [
2460 {
2461 "id": "clm_01m4b2a4c6e8g0j2l4n6q8s0u2",
2462 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
2463 "issue": 9,
2464 "session_id": null,
2465 "actor": {
2466 "id": "usr_01kkp2v7d4fh8m3q6t9w2z5c8e",
2467 "username": "ana"
2468 },
2469 "harness": null,
2470 "note": null,
2471 "state": "active",
2472 "created_at": "2026-10-12T13:50:12.000Z",
2473 "expires_at": "2026-10-12T14:20:12.000Z",
2474 "ended_at": null,
2475 "end_reason": null,
2476 "handoff_to": null
2477 }
2478 ],
2479 "pulls": [
2480 {
2481 "number": 11,
2482 "title": "Parse arguments with clap",
2483 "status": "open"
2484 }
2485 ]
2486 }
2487 ]
2488 },
2489 "notes": "A claim is advisory: it is made even when `others` lists someone already on the issue. Claiming an issue you hold renews your claim. Refused with `409` for a closed issue. See [Claims](/guides/sessions/#claims)."
2490 },
2491 "release_claim": {
2492 "request": {
2493 "reason": "Ana has it covered."
2494 },
2495 "response": {
2496 "id": "clm_01m4b3d5f7h9k1m3p5r7t9w1y3",
2497 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
2498 "issue": 12,
2499 "session_id": "ses_01m4b2c3d4e5f6g7h8j9k0m1n2",
2500 "actor": {
2501 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
2502 "username": "syntaqx"
2503 },
2504 "harness": "claude_code",
2505 "note": "Taking the argument parsing first.",
2506 "state": "released",
2507 "created_at": "2026-10-12T14:03:02.771Z",
2508 "expires_at": "2026-10-12T15:01:40.518Z",
2509 "ended_at": "2026-10-12T14:12:30.000Z",
2510 "end_reason": "Ana has it covered.",
2511 "handoff_to": null
2512 }
2513 },
2514 "hand_off_issue": {
2515 "request": {
2516 "to": "ana",
2517 "note": "Parsing is done and tested; the README still needs the new usage."
2518 },
2519 "response": {
2520 "id": "clm_01m4b3d5f7h9k1m3p5r7t9w1y3",
2521 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
2522 "issue": 12,
2523 "session_id": "ses_01m4b2c3d4e5f6g7h8j9k0m1n2",
2524 "actor": {
2525 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
2526 "username": "syntaqx"
2527 },
2528 "harness": "claude_code",
2529 "note": "Parsing is done and tested; the README still needs the new usage.",
2530 "state": "handed_off",
2531 "created_at": "2026-10-12T14:03:02.771Z",
2532 "expires_at": "2026-10-12T15:01:40.518Z",
2533 "ended_at": "2026-10-12T14:38:00.000Z",
2534 "end_reason": "handed_off",
2535 "handoff_to": "ana"
2536 }
2537 },
2538 "list_claims": {
2539 "query": {
2540 "state": "active"
2541 },
2542 "response": [
2543 {
2544 "id": "clm_01m4b3d5f7h9k1m3p5r7t9w1y3",
2545 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
2546 "issue": 12,
2547 "session_id": "ses_01m4b2c3d4e5f6g7h8j9k0m1n2",
2548 "actor": {
2549 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
2550 "username": "syntaqx"
2551 },
2552 "harness": "claude_code",
2553 "note": "Taking the argument parsing first.",
2554 "state": "active",
2555 "created_at": "2026-10-12T14:03:02.771Z",
2556 "expires_at": "2026-10-12T15:01:40.518Z",
2557 "ended_at": null,
2558 "end_reason": null,
2559 "handoff_to": null
2560 },
2561 {
2562 "id": "clm_01m4b2a4c6e8g0j2l4n6q8s0u2",
2563 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
2564 "issue": 12,
2565 "session_id": null,
2566 "actor": {
2567 "id": "usr_01kkp2v7d4fh8m3q6t9w2z5c8e",
2568 "username": "ana"
2569 },
2570 "harness": null,
2571 "note": "Looking at the tests.",
2572 "state": "active",
2573 "created_at": "2026-10-12T13:50:12.000Z",
2574 "expires_at": "2026-10-12T14:20:12.000Z",
2575 "ended_at": null,
2576 "end_reason": null,
2577 "handoff_to": null
2578 }
2579 ]
2580 },
2581 "get_work": {
2582 "response": {
2583 "issue": {
2584 "id": "iss_01m43shrzpfe49x74ga7sj1c6v",
2585 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
2586 "number": 12,
2587 "title": "Greeting should name the caller",
2588 "body": "Take a name from the first argument; fall back to world.\n\n## Definition of done\n\n- `cargo test` passes.\n- The README shows the new usage.",
2589 "labels": [
2590 "feature",
2591 "good first issue"
2592 ],
2593 "state": "open",
2594 "reason": null,
2595 "resolved_by": null,
2596 "author": {
2597 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
2598 "username": "syntaqx",
2599 "display_username": "syntaqx",
2600 "kind": "user",
2601 "verified": false,
2602 "workspaces": []
2603 },
2604 "requested_by": null,
2605 "created_at": "2026-10-01T18:04:11.482Z",
2606 "updated_at": "2026-10-01T18:09:47.305Z",
2607 "closed_at": null,
2608 "pull_count": 0,
2609 "comment_count": 0,
2610 "assignees": [
2611 "syntaqx"
2612 ],
2613 "blocked_by": [
2614 9
2615 ],
2616 "queued": false,
2617 "agent": null,
2618 "milestone": {
2619 "number": 3,
2620 "title": "Launch"
2621 }
2622 },
2623 "definition_of_done": [
2624 "`cargo test` passes.",
2625 "The README shows the new usage."
2626 ],
2627 "required_checks": [
2628 "CI"
2629 ],
2630 "claims": [
2631 {
2632 "id": "clm_01m4b3d5f7h9k1m3p5r7t9w1y3",
2633 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
2634 "issue": 12,
2635 "session_id": "ses_01m4b2c3d4e5f6g7h8j9k0m1n2",
2636 "actor": {
2637 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
2638 "username": "syntaqx"
2639 },
2640 "harness": "claude_code",
2641 "note": "Taking the argument parsing first.",
2642 "state": "active",
2643 "created_at": "2026-10-12T14:03:02.771Z",
2644 "expires_at": "2026-10-12T15:01:40.518Z",
2645 "ended_at": null,
2646 "end_reason": null,
2647 "handoff_to": null
2648 }
2649 ],
2650 "sessions": [
2651 {
2652 "id": "ses_01m4b2c3d4e5f6g7h8j9k0m1n2",
2653 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
2654 "issue": 12,
2655 "pull": 14,
2656 "branch": "greet-caller",
2657 "actor": {
2658 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
2659 "username": "syntaqx"
2660 },
2661 "harness": "claude_code",
2662 "harness_session_id": "5b0c1f9e-3d2a-4e8b-9f61-0c7d2a9e4b13",
2663 "title": "Make the greeting name the caller",
2664 "state": "active",
2665 "head_commit": "9f2c4e1a7b3d5f60812a4c6e8b0d2f4a6c8e0b13",
2666 "started_at": "2026-10-12T14:02:11.204Z",
2667 "last_seen_at": "2026-10-12T14:31:40.518Z",
2668 "ended_at": null,
2669 "end_reason": null
2670 }
2671 ],
2672 "pulls": [
2673 {
2674 "number": 14,
2675 "title": "Greeting should name the caller",
2676 "status": "draft",
2677 "branch": "greet-caller",
2678 "head_commit": "9f2c4e1a7b3d5f60812a4c6e8b0d2f4a6c8e0b13",
2679 "author": {
2680 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
2681 "username": "syntaqx"
2682 },
2683 "check_status": null,
2684 "required_checks": [
2685 {
2686 "name": "CI",
2687 "state": "success",
2688 "description": "CI passed",
2689 "target_url": "https://g1t.sh/syntaqx/hello/actions/runs/run_01m43sw8e2g6j0m4q8t2x6a0c4"
2690 }
2691 ],
2692 "mergeable": "clean",
2693 "overlaps": [
2694 {
2695 "number": 11,
2696 "title": "Parse arguments with clap",
2697 "issue": 9,
2698 "paths": [
2699 "src/main.rs"
2700 ]
2701 }
2702 ],
2703 "queue": null
2704 }
2705 ],
2706 "blocked_by": [
2707 {
2708 "number": 9,
2709 "title": "Read arguments with a parser",
2710 "state": "open",
2711 "claims": [
2712 {
2713 "id": "clm_01m4b2a4c6e8g0j2l4n6q8s0u2",
2714 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
2715 "issue": 9,
2716 "session_id": null,
2717 "actor": {
2718 "id": "usr_01kkp2v7d4fh8m3q6t9w2z5c8e",
2719 "username": "ana"
2720 },
2721 "harness": null,
2722 "note": null,
2723 "state": "active",
2724 "created_at": "2026-10-12T13:50:12.000Z",
2725 "expires_at": "2026-10-12T14:20:12.000Z",
2726 "ended_at": null,
2727 "end_reason": null,
2728 "handoff_to": null
2729 }
2730 ],
2731 "pulls": [
2732 {
2733 "number": 11,
2734 "title": "Parse arguments with clap",
2735 "status": "open"
2736 }
2737 ]
2738 }
2739 ],
2740 "blocks": [
2741 {
2742 "number": 15,
2743 "title": "Greet in the caller's language",
2744 "state": "open"
2745 }
2746 ],
2747 "decisions": [
2748 {
2749 "id": "dec_01m4b3e7g9j1l3n5q7s9u1w3y5",
2750 "issue": 12,
2751 "pull": 14,
2752 "session_id": "ses_01m4b2c3d4e5f6g7h8j9k0m1n2",
2753 "actor": "syntaqx",
2754 "kind": "proposal",
2755 "confidence": "claimed",
2756 "summary": "Read the name with the argument parser #9 brings, rather than by hand.",
2757 "evidence": {
2758 "commit": "9f2c4e1a7b3d5f60812a4c6e8b0d2f4a6c8e0b13"
2759 },
2760 "created_at": "2026-10-12T14:20:00.000Z"
2761 }
2762 ],
2763 "last_integration_failure": null,
2764 "recent": [
2765 {
2766 "id": "evt_01m4b3d5f7h9k1m3p5r7t9w1y4",
2767 "type": "work.claimed",
2768 "source": "work",
2769 "time": "2026-10-12T14:03:02.771Z",
2770 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
2771 "actor": "usr_01kkntcg1eeb98j62xjm7eh09p",
2772 "data": {
2773 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
2774 "number": 12,
2775 "issue": 12,
2776 "claim": {
2777 "id": "clm_01m4b3d5f7h9k1m3p5r7t9w1y3",
2778 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
2779 "issue": 12,
2780 "session_id": "ses_01m4b2c3d4e5f6g7h8j9k0m1n2",
2781 "actor": {
2782 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
2783 "username": "syntaqx"
2784 },
2785 "harness": "claude_code",
2786 "note": "Taking the argument parsing first.",
2787 "state": "active",
2788 "created_at": "2026-10-12T14:03:02.771Z",
2789 "expires_at": "2026-10-12T15:01:40.518Z",
2790 "ended_at": null,
2791 "end_reason": null,
2792 "handoff_to": null
2793 },
2794 "others": [
2795 {
2796 "id": "clm_01m4b2a4c6e8g0j2l4n6q8s0u2",
2797 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
2798 "issue": 12,
2799 "session_id": null,
2800 "actor": {
2801 "id": "usr_01kkp2v7d4fh8m3q6t9w2z5c8e",
2802 "username": "ana"
2803 },
2804 "harness": null,
2805 "note": "Looking at the tests.",
2806 "state": "active",
2807 "created_at": "2026-10-12T13:50:12.000Z",
2808 "expires_at": "2026-10-12T14:20:12.000Z",
2809 "ended_at": null,
2810 "end_reason": null,
2811 "handoff_to": null
2812 }
2813 ]
2814 }
2815 }
2816 ]
2817 },
2818 "notes": "`pulls` are the issue's pull requests, oldest first; `required_checks`, `mergeable`, `overlaps` and `queue` (its `state` and `position` in the merge queue, 1 at the front) are filled in for those still open or draft. `recent` holds up to 20 coordination events about the issue or its pull requests, newest first. See [Picking up an issue](/guides/sessions/#picking-up-an-issue)."
2819 },
2820 "record_decision": {
2821 "request": {
2822 "kind": "fix",
2823 "summary": "Renamed the config key #12 also introduced, so both read retry_limit.",
2824 "evidence": {
2825 "commit": "7d3e9a1c5b2f4e6a8c0d2e4f6a8b0c2d4e6f8a0b"
2826 },
2827 "session_id": "ses_01kpz7x9y1z3a5b7c9d1e3f5gh"
2828 },
2829 "response": {
2830 "id": "dec_01kpz9a1b3c5d7e9f1g3h5j7kb",
2831 "issue": 9,
2832 "pull": 14,
2833 "session_id": "ses_01kpz7x9y1z3a5b7c9d1e3f5gh",
2834 "actor": "ana",
2835 "kind": "fix",
2836 "confidence": "claimed",
2837 "summary": "Renamed the config key #12 also introduced, so both read retry_limit.",
2838 "evidence": {
2839 "commit": "7d3e9a1c5b2f4e6a8c0d2e4f6a8b0c2d4e6f8a0b"
2840 },
2841 "created_at": "2026-10-12T15:31:40.019Z"
2842 },
2843 "notes": "Kept as `claimed`. g1t records `integration_failure`, `integration_passed`, `approval` and `merge` itself. Publishes `decision.recorded`. See [decision records](/guides/why-blame/#decision-records)."
2844 },
2845 "list_decisions": {
2846 "response": [
2847 {
2848 "id": "dec_01kpz8m2q4r6s8t0v2w4x6y8za",
2849 "issue": 9,
2850 "pull": 14,
2851 "session_id": null,
2852 "actor": null,
2853 "kind": "integration_failure",
2854 "confidence": "tested",
2855 "summary": "#14 failed in the merge queue together with #12: `CI / merge_group` failed when they were combined.",
2856 "evidence": {
2857 "commit": "4be1c0d9a2f3e4b5c6d7e8f90a1b2c3d4e5f6a7b",
2858 "check": {
2859 "name": "CI / merge_group",
2860 "conclusion": "failure",
2861 "url": "https://g1t.sh/acme/web/actions/runs/run_01kpz8k0"
2862 },
2863 "combination": [
2864 11,
2865 12,
2866 14
2867 ],
2868 "other_pulls": [
2869 11,
2870 12
2871 ],
2872 "suspects": [
2873 12
2874 ],
2875 "bisected": true,
2876 "landed": []
2877 },
2878 "created_at": "2026-10-12T15:04:11.204Z"
2879 },
2880 {
2881 "id": "dec_01kpz9a1b3c5d7e9f1g3h5j7kb",
2882 "issue": 9,
2883 "pull": 14,
2884 "session_id": "ses_01kpz7x9y1z3a5b7c9d1e3f5gh",
2885 "actor": "ana",
2886 "kind": "fix",
2887 "confidence": "claimed",
2888 "summary": "Renamed the config key #12 also introduced, so both read retry_limit.",
2889 "evidence": {
2890 "commit": "7d3e9a1c5b2f4e6a8c0d2e4f6a8b0c2d4e6f8a0b"
2891 },
2892 "created_at": "2026-10-12T15:31:40.019Z"
2893 }
2894 ],
2895 "notes": "`GET /repos/{owner}/{name}/issues/{number}/decisions` lists an issue's, with those on its pull requests."
2896 },
2897 "why": {
2898 "query": {
2899 "path": "src/config.rs",
2900 "line": 42
2901 },
2902 "response": {
2903 "path": "src/config.rs",
2904 "line": 42,
2905 "commit": {
2906 "hash": "7d3e9a1c5b2f4e6a8c0d2e4f6a8b0c2d4e6f8a0b",
2907 "tree_hash": "c1d2e3f4a5b6c7d8e9f0a1b2c3d4e5f6a7b8c9d0",
2908 "message": "Read retry_limit, as #12 names it",
2909 "author": {
2910 "name": "Ana Lima",
2911 "email": "ana@example.com"
2912 },
2913 "parents": [
2914 "4be1c0d9a2f3e4b5c6d7e8f90a1b2c3d4e5f6a7b"
2915 ],
2916 "authored_at": "2026-10-12T15:29:02Z"
2917 },
2918 "pull": {
2919 "number": 14,
2920 "title": "Retry failed webhook deliveries",
2921 "author": "ana",
2922 "agent": "claude-code",
2923 "merged_by": "g1t",
2924 "merged_at": "2026-10-12T15:52:18.330Z"
2925 },
2926 "issue": {
2927 "number": 9,
2928 "title": "Webhook deliveries are not retried",
2929 "state": "closed",
2930 "body": "A delivery that times out is never sent again."
2931 },
2932 "decisions": [
2933 {
2934 "id": "dec_01kpz8m2q4r6s8t0v2w4x6y8za",
2935 "issue": 9,
2936 "pull": 14,
2937 "session_id": null,
2938 "actor": null,
2939 "kind": "integration_failure",
2940 "confidence": "tested",
2941 "summary": "#14 failed in the merge queue together with #12: `CI / merge_group` failed when they were combined.",
2942 "evidence": {
2943 "commit": "4be1c0d9a2f3e4b5c6d7e8f90a1b2c3d4e5f6a7b",
2944 "check": {
2945 "name": "CI / merge_group",
2946 "conclusion": "failure",
2947 "url": "https://g1t.sh/acme/web/actions/runs/run_01kpz8k0"
2948 },
2949 "combination": [
2950 11,
2951 12,
2952 14
2953 ],
2954 "other_pulls": [
2955 11,
2956 12
2957 ],
2958 "suspects": [
2959 12
2960 ],
2961 "bisected": true,
2962 "landed": []
2963 },
2964 "created_at": "2026-10-12T15:04:11.204Z"
2965 },
2966 {
2967 "id": "dec_01kpz9a1b3c5d7e9f1g3h5j7kb",
2968 "issue": 9,
2969 "pull": 14,
2970 "session_id": "ses_01kpz7x9y1z3a5b7c9d1e3f5gh",
2971 "actor": "ana",
2972 "kind": "fix",
2973 "confidence": "claimed",
2974 "summary": "Renamed the config key #12 also introduced, so both read retry_limit.",
2975 "evidence": {
2976 "commit": "7d3e9a1c5b2f4e6a8c0d2e4f6a8b0c2d4e6f8a0b"
2977 },
2978 "created_at": "2026-10-12T15:31:40.019Z"
2979 }
2980 ],
2981 "sessions": [
2982 {
2983 "seq": 31,
2984 "kind": "message",
2985 "text": "#12 renamed retries to retry_limit; reading the new name here.",
2986 "tool": null,
2987 "commit": null,
2988 "at": "2026-10-12T15:27:40.118Z"
2989 }
2990 ]
2991 },
2992 "notes": "`ref` reads the file at a branch, tag or commit. See [sessions and why-blame](/guides/why-blame/#why-over-the-api)."
2993 },
2994 "list_workflows": {
2995 "response": [
2996 {
2997 "id": "wfl_01kpw2c5d8e1f4g7h0j3k6m9np",
2998 "path": ".g1t/workflows/ci.yml",
2999 "name": "CI",
3000 "events": [
3001 "push",
3002 "pull_request",
3003 "workflow_dispatch"
3004 ],
3005 "state": "active",
3006 "error": null,
3007 "notes": [
3008 {
3009 "severity": "unsupported",
3010 "job": "test",
3011 "message": "`services` containers (such as a database) are not started on g1t yet."
3012 }
3013 ],
3014 "dispatch": {
3015 "debug": {
3016 "description": "Verbose logs",
3017 "type": "boolean",
3018 "default": false
3019 }
3020 },
3021 "last_run": {
3022 "id": "run_01kpx7b3c6d9e2f5g8h1j4k7mr",
3023 "workflow_id": "wfl_01kpw2c5d8e1f4g7h0j3k6m9np",
3024 "path": ".g1t/workflows/ci.yml",
3025 "name": "CI",
3026 "title": "Greeting should name the caller",
3027 "number": 12,
3028 "attempt": 1,
3029 "event": "push",
3030 "ref": "refs/heads/main",
3031 "sha": "9f2c4e1a7b3d5f60812a4c6e8b0d2f4a6c8e0b13",
3032 "pull": null,
3033 "status": "completed",
3034 "conclusion": "success",
3035 "error": null,
3036 "actor": "syntaqx",
3037 "created_at": "2026-10-04T15:42:07.318Z",
3038 "started_at": "2026-10-04T15:42:09.020Z",
3039 "finished_at": "2026-10-04T15:44:31.877Z"
3040 }
3041 },
3042 {
3043 "id": "wfl_01kpw2c5d8e1f4g7h0j3k6m9nq",
3044 "path": ".g1t/workflows/nightly.yml",
3045 "name": "Nightly",
3046 "events": [
3047 "schedule"
3048 ],
3049 "state": "disabled",
3050 "error": null,
3051 "notes": [],
3052 "dispatch": null,
3053 "last_run": null
3054 }
3055 ],
3056 "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/)."
3057 },
3058 "list_workflow_runs": {
3059 "query": {
3060 "workflow": "ci.yml",
3061 "branch": "main",
3062 "per_page": 20
3063 },
3064 "response": [
3065 {
3066 "id": "run_01kpx7b3c6d9e2f5g8h1j4k7mr",
3067 "workflow_id": "wfl_01kpw2c5d8e1f4g7h0j3k6m9np",
3068 "path": ".g1t/workflows/ci.yml",
3069 "name": "CI",
3070 "title": "Greeting should name the caller",
3071 "number": 12,
3072 "attempt": 1,
3073 "event": "push",
3074 "ref": "refs/heads/main",
3075 "sha": "9f2c4e1a7b3d5f60812a4c6e8b0d2f4a6c8e0b13",
3076 "pull": null,
3077 "status": "completed",
3078 "conclusion": "success",
3079 "error": null,
3080 "actor": "syntaqx",
3081 "created_at": "2026-10-04T15:42:07.318Z",
3082 "started_at": "2026-10-04T15:42:09.020Z",
3083 "finished_at": "2026-10-04T15:44:31.877Z"
3084 }
3085 ],
3086 "notes": "A run's `status` is `queued`, `pending` (waiting for its concurrency group), `in_progress` or `completed`; `conclusion` is set once it completes."
3087 },
3088 "list_runs_of_workflow": {
3089 "params": {
3090 "workflow": "ci.yml"
3091 },
3092 "query": {
3093 "branch": "main",
3094 "per_page": 20
3095 },
3096 "response": [
3097 {
3098 "id": "run_01kpx7b3c6d9e2f5g8h1j4k7mr",
3099 "workflow_id": "wfl_01kpw2c5d8e1f4g7h0j3k6m9np",
3100 "path": ".g1t/workflows/ci.yml",
3101 "name": "CI",
3102 "title": "Greeting should name the caller",
3103 "number": 12,
3104 "attempt": 1,
3105 "event": "push",
3106 "ref": "refs/heads/main",
3107 "sha": "9f2c4e1a7b3d5f60812a4c6e8b0d2f4a6c8e0b13",
3108 "pull": null,
3109 "status": "completed",
3110 "conclusion": "success",
3111 "error": null,
3112 "actor": "syntaqx",
3113 "created_at": "2026-10-04T15:42:07.318Z",
3114 "started_at": "2026-10-04T15:42:09.020Z",
3115 "finished_at": "2026-10-04T15:44:31.877Z"
3116 }
3117 ]
3118 },
3119 "get_workflow_run": {
3120 "params": {
3121 "id": "run_01kpx7b3c6d9e2f5g8h1j4k7mr"
3122 },
3123 "response": {
3124 "run": {
3125 "id": "run_01kpx7b3c6d9e2f5g8h1j4k7mr",
3126 "workflow_id": "wfl_01kpw2c5d8e1f4g7h0j3k6m9np",
3127 "path": ".g1t/workflows/ci.yml",
3128 "name": "CI",
3129 "title": "Greeting should name the caller",
3130 "number": 12,
3131 "attempt": 1,
3132 "event": "push",
3133 "ref": "refs/heads/main",
3134 "sha": "9f2c4e1a7b3d5f60812a4c6e8b0d2f4a6c8e0b13",
3135 "pull": null,
3136 "status": "completed",
3137 "conclusion": "failure",
3138 "error": null,
3139 "actor": "syntaqx",
3140 "created_at": "2026-10-04T15:42:07.318Z",
3141 "started_at": "2026-10-04T15:42:09.020Z",
3142 "finished_at": "2026-10-04T15:44:31.877Z"
3143 },
3144 "jobs": [
3145 {
3146 "id": "job_01kpx7b3d0e4f8g2h6j0k4m8ns",
3147 "run_id": "run_01kpx7b3c6d9e2f5g8h1j4k7mr",
3148 "key": "test",
3149 "name": "test",
3150 "needs": [],
3151 "status": "completed",
3152 "conclusion": "failure",
3153 "steps": [
3154 {
3155 "number": 1,
3156 "name": "Run actions/checkout@v4",
3157 "status": "completed",
3158 "conclusion": "success",
3159 "started_at": "2026-10-04T15:42:10.101Z",
3160 "finished_at": "2026-10-04T15:42:12.433Z"
3161 },
3162 {
3163 "number": 2,
3164 "name": "Run cargo test",
3165 "status": "completed",
3166 "conclusion": "failure",
3167 "started_at": "2026-10-04T15:42:12.440Z",
3168 "finished_at": "2026-10-04T15:44:30.902Z"
3169 }
3170 ],
3171 "annotations": [
3172 {
3173 "level": "error",
3174 "message": "assertion failed: greeting names the caller",
3175 "title": "greet",
3176 "file": "src/main.rs",
3177 "line": 41
3178 }
3179 ],
3180 "reason": null,
3181 "started_at": "2026-10-04T15:42:09.020Z",
3182 "finished_at": "2026-10-04T15:44:31.002Z"
3183 },
3184 {
3185 "id": "job_01kpx7b3d0e4f8g2h6j0k4m8nt",
3186 "run_id": "run_01kpx7b3c6d9e2f5g8h1j4k7mr",
3187 "key": "deploy",
3188 "name": "deploy",
3189 "needs": [
3190 "test"
3191 ],
3192 "status": "completed",
3193 "conclusion": "skipped",
3194 "steps": [],
3195 "annotations": [],
3196 "reason": "A job it needs did not succeed.",
3197 "started_at": null,
3198 "finished_at": "2026-10-04T15:44:31.877Z"
3199 }
3200 ],
3201 "notes": [
3202 {
3203 "severity": "unsupported",
3204 "job": "test",
3205 "message": "`services` containers (such as a database) are not started on g1t yet."
3206 }
3207 ],
3208 "attempts": [
3209 {
3210 "attempt": 1,
3211 "status": "completed",
3212 "conclusion": "failure",
3213 "actor": "syntaqx",
3214 "debug": false,
3215 "started_at": "2026-10-04T15:42:09.020Z",
3216 "finished_at": "2026-10-04T15:44:31.877Z"
3217 }
3218 ]
3219 },
3220 "notes": "Each re-run is a new attempt. Read an earlier one with `attempt`, or at `GET /repos/{owner}/{repo}/actions/runs/{id}/attempts/{attempt}`; its jobs have ids of their own, so `get_job_logs` reads the log each had then. A job that is `cancelling` was cancelled and is running its cleanup steps."
3221 },
3222 "get_job_logs": {
3223 "params": {
3224 "job": "job_01kpx7b3d0e4f8g2h6j0k4m8ns"
3225 },
3226 "query": {
3227 "after": 0
3228 },
3229 "response": {
3230 "chunks": [
3231 {
3232 "seq": 1,
3233 "step": 0,
3234 "text": "Preparing the sandbox\n"
3235 },
3236 {
3237 "seq": 2,
3238 "step": 2,
3239 "text": "> cargo test\ntest greet ... FAILED\n"
3240 }
3241 ],
3242 "done": true
3243 },
3244 "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`."
3245 },
3246 "dispatch_workflow": {
3247 "params": {
3248 "workflow": "ci.yml"
3249 },
3250 "request": {
3251 "ref": "main",
3252 "inputs": {
3253 "debug": true
3254 }
3255 },
3256 "response": {
3257 "id": "run_01kpx8d4e7f0g3h6j9k2m5n8pq",
3258 "workflow_id": "wfl_01kpw2c5d8e1f4g7h0j3k6m9np",
3259 "path": ".g1t/workflows/ci.yml",
3260 "name": "CI",
3261 "title": "CI run by syntaqx",
3262 "number": 13,
3263 "attempt": 1,
3264 "event": "workflow_dispatch",
3265 "ref": "refs/heads/main",
3266 "sha": "9f2c4e1a7b3d5f60812a4c6e8b0d2f4a6c8e0b13",
3267 "pull": null,
3268 "status": "queued",
3269 "conclusion": null,
3270 "error": null,
3271 "actor": "syntaqx",
3272 "created_at": "2026-10-04T16:30:00.512Z",
3273 "started_at": null,
3274 "finished_at": null
3275 }
3276 },
3277 "cancel_workflow_run": {
3278 "params": {
3279 "id": "run_01kpx7b3c6d9e2f5g8h1j4k7mr"
3280 },
3281 "response": {
3282 "id": "run_01kpx7b3c6d9e2f5g8h1j4k7mr",
3283 "workflow_id": "wfl_01kpw2c5d8e1f4g7h0j3k6m9np",
3284 "path": ".g1t/workflows/ci.yml",
3285 "name": "CI",
3286 "title": "Greeting should name the caller",
3287 "number": 12,
3288 "attempt": 1,
3289 "event": "push",
3290 "ref": "refs/heads/main",
3291 "sha": "9f2c4e1a7b3d5f60812a4c6e8b0d2f4a6c8e0b13",
3292 "pull": null,
3293 "status": "completed",
3294 "conclusion": "cancelled",
3295 "error": null,
3296 "actor": "syntaqx",
3297 "created_at": "2026-10-04T15:42:07.318Z",
3298 "started_at": "2026-10-04T15:42:09.020Z",
3299 "finished_at": "2026-10-04T15:44:31.877Z"
3300 }
3301 },
3302 "rerun_workflow_run": {
3303 "params": {
3304 "id": "run_01kpx7b3c6d9e2f5g8h1j4k7mr"
3305 },
3306 "request": {
3307 "failed_only": true
3308 },
3309 "response": {
3310 "id": "run_01kpx7b3c6d9e2f5g8h1j4k7mr",
3311 "workflow_id": "wfl_01kpw2c5d8e1f4g7h0j3k6m9np",
3312 "path": ".g1t/workflows/ci.yml",
3313 "name": "CI",
3314 "title": "Greeting should name the caller",
3315 "number": 12,
3316 "attempt": 2,
3317 "event": "push",
3318 "ref": "refs/heads/main",
3319 "sha": "9f2c4e1a7b3d5f60812a4c6e8b0d2f4a6c8e0b13",
3320 "pull": null,
3321 "status": "queued",
3322 "conclusion": null,
3323 "error": null,
3324 "actor": "syntaqx",
3325 "created_at": "2026-10-04T15:42:07.318Z",
3326 "started_at": null,
3327 "finished_at": null
3328 },
3329 "notes": "The run keeps its id; `attempt` goes up by one."
3330 },
3331 "rerun_failed_jobs": {
3332 "params": {
3333 "id": "run_01kpx7b3c6d9e2f5g8h1j4k7mr"
3334 },
3335 "response": {
3336 "id": "run_01kpx7b3c6d9e2f5g8h1j4k7mr",
3337 "workflow_id": "wfl_01kpw2c5d8e1f4g7h0j3k6m9np",
3338 "path": ".g1t/workflows/ci.yml",
3339 "name": "CI",
3340 "title": "Greeting should name the caller",
3341 "number": 12,
3342 "attempt": 2,
3343 "event": "push",
3344 "ref": "refs/heads/main",
3345 "sha": "9f2c4e1a7b3d5f60812a4c6e8b0d2f4a6c8e0b13",
3346 "pull": null,
3347 "status": "queued",
3348 "conclusion": null,
3349 "error": null,
3350 "actor": "syntaqx",
3351 "created_at": "2026-10-04T15:42:07.318Z",
3352 "started_at": null,
3353 "finished_at": null
3354 }
3355 },
3356 "rerun_job": {
3357 "params": {
3358 "job": "job_01kpx7b3d0e4f8g2h6j0k4m8ns"
3359 },
3360 "request": {
3361 "enable_debug_logging": true
3362 },
3363 "response": {
3364 "id": "run_01kpx7b3c6d9e2f5g8h1j4k7mr",
3365 "workflow_id": "wfl_01kpw2c5d8e1f4g7h0j3k6m9np",
3366 "path": ".g1t/workflows/ci.yml",
3367 "name": "CI",
3368 "title": "Greeting should name the caller",
3369 "number": 12,
3370 "attempt": 2,
3371 "event": "push",
3372 "ref": "refs/heads/main",
3373 "sha": "9f2c4e1a7b3d5f60812a4c6e8b0d2f4a6c8e0b13",
3374 "pull": null,
3375 "status": "queued",
3376 "conclusion": null,
3377 "error": null,
3378 "actor": "syntaqx",
3379 "created_at": "2026-10-04T15:42:07.318Z",
3380 "started_at": null,
3381 "finished_at": null
3382 },
3383 "notes": "Runs the job again with every job that needs it, as a new attempt; the rest keep how they ended. A job of a matrix runs again with the rest of its matrix, and a job of a called workflow with the job that calls it. The run must have finished."
3384 },
3385 "force_cancel_workflow_run": {
3386 "params": {
3387 "id": "run_01kpx7b3c6d9e2f5g8h1j4k7mr"
3388 },
3389 "response": {
3390 "id": "run_01kpx7b3c6d9e2f5g8h1j4k7mr",
3391 "workflow_id": "wfl_01kpw2c5d8e1f4g7h0j3k6m9np",
3392 "path": ".g1t/workflows/ci.yml",
3393 "name": "CI",
3394 "title": "Greeting should name the caller",
3395 "number": 12,
3396 "attempt": 1,
3397 "event": "push",
3398 "ref": "refs/heads/main",
3399 "sha": "9f2c4e1a7b3d5f60812a4c6e8b0d2f4a6c8e0b13",
3400 "pull": null,
3401 "status": "completed",
3402 "conclusion": "cancelled",
3403 "error": null,
3404 "actor": "syntaqx",
3405 "created_at": "2026-10-04T15:42:07.318Z",
3406 "started_at": "2026-10-04T15:42:09.020Z",
3407 "finished_at": "2026-10-04T15:43:02.411Z"
3408 },
3409 "notes": "Stops running jobs at once, without their `if: always()`, `cancelled()` or post steps. Use it when a job's cleanup hangs."
3410 },
3411 "update_workflow": {
3412 "params": {
3413 "workflow": "nightly.yml"
3414 },
3415 "request": {
3416 "enabled": false
3417 },
3418 "response": {
3419 "id": "wfl_01kpw2c5d8e1f4g7h0j3k6m9nq",
3420 "path": ".g1t/workflows/nightly.yml",
3421 "name": "Nightly",
3422 "events": [
3423 "schedule"
3424 ],
3425 "state": "disabled",
3426 "error": null,
3427 "notes": [],
3428 "dispatch": null,
3429 "last_run": null
3430 }
3431 },
3432 "enable_workflow": {
3433 "params": {
3434 "workflow": "nightly.yml"
3435 },
3436 "response": {
3437 "id": "wfl_01kpw2c5d8e1f4g7h0j3k6m9nq",
3438 "path": ".g1t/workflows/nightly.yml",
3439 "name": "Nightly",
3440 "events": [
3441 "schedule"
3442 ],
3443 "state": "active",
3444 "error": null,
3445 "notes": [],
3446 "dispatch": null,
3447 "last_run": null
3448 }
3449 },
3450 "disable_workflow": {
3451 "params": {
3452 "workflow": "nightly.yml"
3453 },
3454 "response": {
3455 "id": "wfl_01kpw2c5d8e1f4g7h0j3k6m9nq",
3456 "path": ".g1t/workflows/nightly.yml",
3457 "name": "Nightly",
3458 "events": [
3459 "schedule"
3460 ],
3461 "state": "disabled",
3462 "error": null,
3463 "notes": [],
3464 "dispatch": null,
3465 "last_run": null
3466 }
3467 },
3468 "list_actions_secrets": {
3469 "response": [
3470 {
3471 "id": "set_01kpv9q4r7s0t3v6w9x2y5z8ab",
3472 "name": "NPM_TOKEN",
3473 "kind": "secret",
3474 "value": null,
3475 "scope": "workspace",
3476 "updated_at": "2026-10-01T09:12:44.020Z",
3477 "available_to": [
3478 "workflows"
3479 ],
3480 "environments": [],
3481 "projects": [],
3482 "note": null,
3483 "updated_by": "syntaqx",
3484 "brokered_hosts": [
3485 "registry.npmjs.org"
3486 ]
3487 },
3488 {
3489 "id": "set_01kpv9q4r7s0t3v6w9x2y5z8ac",
3490 "name": "STRIPE_KEY",
3491 "kind": "secret",
3492 "value": null,
3493 "scope": "project",
3494 "updated_at": "2026-10-04T15:42:07.318Z",
3495 "available_to": [
3496 "workflows",
3497 "deployments"
3498 ],
3499 "environments": [
3500 "production"
3501 ],
3502 "projects": [],
3503 "note": "Rotate in the Stripe dashboard.",
3504 "updated_by": "syntaqx",
3505 "brokered_hosts": []
3506 }
3507 ],
3508 "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; empty `brokered_hosts`, a secret that is not brokered."
3509 },
3510 "list_actions_secrets_for_workspace": {
3511 "params": {
3512 "workspace": "flagon-io"
3513 },
3514 "response": [
3515 {
3516 "id": "set_01kpv9q4r7s0t3v6w9x2y5z8ab",
3517 "name": "NPM_TOKEN",
3518 "kind": "secret",
3519 "value": null,
3520 "scope": "workspace",
3521 "updated_at": "2026-10-04T15:42:07.318Z",
3522 "available_to": [
3523 "workflows"
3524 ],
3525 "environments": [],
3526 "projects": [],
3527 "note": null,
3528 "updated_by": "syntaqx",
3529 "brokered_hosts": [
3530 "registry.npmjs.org"
3531 ]
3532 }
3533 ],
3534 "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; empty `brokered_hosts`, a secret that is not brokered."
3535 },
3536 "set_actions_secret": {
3537 "params": {
3538 "setting": "STRIPE_KEY"
3539 },
3540 "request": {
3541 "value": "sk_live_…",
3542 "available_to": [
3543 "workflows",
3544 "deployments"
3545 ],
3546 "environments": [
3547 "production"
3548 ]
3549 },
3550 "response": {
3551 "id": "set_01kpv9q4r7s0t3v6w9x2y5z8ac",
3552 "name": "STRIPE_KEY",
3553 "kind": "secret",
3554 "value": null,
3555 "scope": "project",
3556 "updated_at": "2026-10-04T15:42:07.318Z",
3557 "available_to": [
3558 "workflows",
3559 "deployments"
3560 ],
3561 "environments": [
3562 "production"
3563 ],
3564 "projects": [],
3565 "note": null,
3566 "updated_by": "syntaqx",
3567 "brokered_hosts": []
3568 },
3569 "notes": "Keys are uppercased. See [secrets and variables](/guides/secrets-and-variables/)."
3570 },
3571 "set_actions_secret_for_workspace": {
3572 "params": {
3573 "workspace": "flagon-io",
3574 "setting": "NPM_TOKEN"
3575 },
3576 "request": {
3577 "value": "npm_…",
3578 "projects": [
3579 "hello"
3580 ],
3581 "brokered_hosts": [
3582 "registry.npmjs.org"
3583 ]
3584 },
3585 "response": {
3586 "id": "set_01kpv9q4r7s0t3v6w9x2y5z8ac",
3587 "name": "NPM_TOKEN",
3588 "kind": "secret",
3589 "value": null,
3590 "scope": "workspace",
3591 "updated_at": "2026-10-04T15:42:07.318Z",
3592 "available_to": [
3593 "workflows"
3594 ],
3595 "environments": [],
3596 "projects": [
3597 "hello"
3598 ],
3599 "note": null,
3600 "updated_by": "syntaqx",
3601 "brokered_hosts": [
3602 "registry.npmjs.org"
3603 ]
3604 }
3605 },
3606 "delete_actions_secret": {
3607 "params": {
3608 "setting": "STRIPE_KEY"
3609 },
3610 "response": true
3611 },
3612 "delete_actions_secret_for_workspace": {
3613 "params": {
3614 "workspace": "flagon-io",
3615 "setting": "NPM_TOKEN"
3616 },
3617 "response": true
3618 },
3619 "list_actions_variables": {
3620 "response": [
3621 {
3622 "id": "set_01kpv9q4r7s0t3v6w9x2y5z8ad",
3623 "name": "NODE_VERSION",
3624 "kind": "variable",
3625 "value": "20",
3626 "scope": "project",
3627 "updated_at": "2026-10-04T15:42:07.318Z",
3628 "available_to": [
3629 "workflows",
3630 "deployments"
3631 ],
3632 "environments": [],
3633 "projects": [],
3634 "note": null,
3635 "updated_by": "syntaqx"
3636 }
3637 ],
3638 "notes": "A repository's list includes the workspace's rows that reach it, with `scope` set to `workspace`. Empty `environments` means every environment."
3639 },
3640 "list_actions_variables_for_workspace": {
3641 "params": {
3642 "workspace": "flagon-io"
3643 },
3644 "response": [
3645 {
3646 "id": "set_01kpv9q4r7s0t3v6w9x2y5z8ad",
3647 "name": "NODE_VERSION",
3648 "kind": "variable",
3649 "value": "20",
3650 "scope": "workspace",
3651 "updated_at": "2026-10-04T15:42:07.318Z",
3652 "available_to": [
3653 "workflows",
3654 "deployments"
3655 ],
3656 "environments": [],
3657 "projects": [],
3658 "note": null,
3659 "updated_by": "syntaqx"
3660 }
3661 ]
3662 },
3663 "set_actions_variable": {
3664 "request": {
3665 "setting": "NODE_VERSION",
3666 "value": "20"
3667 },
3668 "response": {
3669 "id": "set_01kpv9q4r7s0t3v6w9x2y5z8ad",
3670 "name": "NODE_VERSION",
3671 "kind": "variable",
3672 "value": "20",
3673 "scope": "project",
3674 "updated_at": "2026-10-04T15:42:07.318Z",
3675 "available_to": [
3676 "workflows",
3677 "deployments"
3678 ],
3679 "environments": [],
3680 "projects": [],
3681 "note": null,
3682 "updated_by": "syntaqx"
3683 },
3684 "notes": "GitHub's clients send the key as `name`; that is accepted too."
3685 },
3686 "set_actions_variable_for_workspace": {
3687 "params": {
3688 "workspace": "flagon-io"
3689 },
3690 "request": {
3691 "setting": "NODE_VERSION",
3692 "value": "20"
3693 },
3694 "response": {
3695 "id": "set_01kpv9q4r7s0t3v6w9x2y5z8ad",
3696 "name": "NODE_VERSION",
3697 "kind": "variable",
3698 "value": "20",
3699 "scope": "workspace",
3700 "updated_at": "2026-10-04T15:42:07.318Z",
3701 "available_to": [
3702 "workflows",
3703 "deployments"
3704 ],
3705 "environments": [],
3706 "projects": [],
3707 "note": null,
3708 "updated_by": "syntaqx"
3709 }
3710 },
3711 "update_actions_variable": {
3712 "params": {
3713 "setting": "NODE_VERSION"
3714 },
3715 "request": {
3716 "value": "22"
3717 },
3718 "response": {
3719 "id": "set_01kpv9q4r7s0t3v6w9x2y5z8ad",
3720 "name": "NODE_VERSION",
3721 "kind": "variable",
3722 "value": "22",
3723 "scope": "project",
3724 "updated_at": "2026-10-04T15:42:07.318Z",
3725 "available_to": [
3726 "workflows",
3727 "deployments"
3728 ],
3729 "environments": [],
3730 "projects": [],
3731 "note": null,
3732 "updated_by": "syntaqx"
3733 }
3734 },
3735 "update_actions_variable_for_workspace": {
3736 "params": {
3737 "workspace": "flagon-io",
3738 "setting": "NODE_VERSION"
3739 },
3740 "request": {
3741 "value": "22"
3742 },
3743 "response": {
3744 "id": "set_01kpv9q4r7s0t3v6w9x2y5z8ad",
3745 "name": "NODE_VERSION",
3746 "kind": "variable",
3747 "value": "22",
3748 "scope": "workspace",
3749 "updated_at": "2026-10-04T15:42:07.318Z",
3750 "available_to": [
3751 "workflows",
3752 "deployments"
3753 ],
3754 "environments": [],
3755 "projects": [],
3756 "note": null,
3757 "updated_by": "syntaqx"
3758 }
3759 },
3760 "delete_actions_variable": {
3761 "params": {
3762 "setting": "NODE_VERSION"
3763 },
3764 "response": true
3765 },
3766 "delete_actions_variable_for_workspace": {
3767 "params": {
3768 "workspace": "flagon-io",
3769 "setting": "NODE_VERSION"
3770 },
3771 "response": true
3772 },
3773 "list_runners": {
3774 "response": [
3775 {
3776 "id": "rnr_01kq2m8v4c7f0h3k6n9q2t5w8z",
3777 "name": "build-01",
3778 "workspace": "flagon-io",
3779 "repo": null,
3780 "group": "Default",
3781 "labels": [
3782 "self-hosted",
3783 "linux",
3784 "x64",
3785 "gpu"
3786 ],
3787 "os": "linux",
3788 "arch": "x64",
3789 "version": "0.2.0",
3790 "ephemeral": false,
3791 "status": "busy",
3792 "work": {
3793 "kind": "workflow",
3794 "id": "job_01kq2m9b1d4g7j0m3p6s9v2y5b",
3795 "name": "test (linux, 24)",
3796 "repo": "flagon-io/hello",
3797 "run_id": "run_01kq2m9a8c1f4h7k0n3q6t9w2z",
3798 "started_at": "2026-10-06T14:02:11.000Z"
3799 },
3800 "last_seen_at": "2026-10-06T14:05:40.512Z",
3801 "created_at": "2026-10-02T09:30:00.000Z",
3802 "created_by": null,
3803 "isolation": "nested-container"
3804 },
3805 {
3806 "id": "rnr_01kq2m8v4c7f0h3k6n9q2t5w9a",
3807 "name": "mac-mini",
3808 "workspace": "flagon-io",
3809 "repo": null,
3810 "group": "Default",
3811 "labels": [
3812 "self-hosted",
3813 "macos",
3814 "arm64"
3815 ],
3816 "os": "macos",
3817 "arch": "arm64",
3818 "version": "0.2.0",
3819 "ephemeral": false,
3820 "status": "online",
3821 "work": null,
3822 "last_seen_at": "2026-10-06T14:05:40.512Z",
3823 "created_at": "2026-10-02T09:30:00.000Z",
3824 "created_by": null,
3825 "isolation": "host"
3826 }
3827 ],
3828 "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."
3829 },
3830 "list_runners_for_workspace": {
3831 "params": {
3832 "workspace": "flagon-io"
3833 },
3834 "response": [
3835 {
3836 "id": "rnr_01kq2m8v4c7f0h3k6n9q2t5w8z",
3837 "name": "build-01",
3838 "workspace": "flagon-io",
3839 "repo": null,
3840 "group": "Default",
3841 "labels": [
3842 "self-hosted",
3843 "linux",
3844 "x64",
3845 "gpu"
3846 ],
3847 "os": "linux",
3848 "arch": "x64",
3849 "version": "0.2.0",
3850 "ephemeral": false,
3851 "status": "busy",
3852 "work": {
3853 "kind": "workflow",
3854 "id": "job_01kq2m9b1d4g7j0m3p6s9v2y5b",
3855 "name": "test (linux, 24)",
3856 "repo": "flagon-io/hello",
3857 "run_id": "run_01kq2m9a8c1f4h7k0n3q6t9w2z",
3858 "started_at": "2026-10-06T14:02:11.000Z"
3859 },
3860 "last_seen_at": "2026-10-06T14:05:40.512Z",
3861 "created_at": "2026-10-02T09:30:00.000Z",
3862 "created_by": null,
3863 "isolation": "nested-container"
3864 },
3865 {
3866 "id": "rnr_01kq2m8v4c7f0h3k6n9q2t5w9a",
3867 "name": "mac-mini",
3868 "workspace": "flagon-io",
3869 "repo": null,
3870 "group": "Default",
3871 "labels": [
3872 "self-hosted",
3873 "macos",
3874 "arm64"
3875 ],
3876 "os": "macos",
3877 "arch": "arm64",
3878 "version": "0.2.0",
3879 "ephemeral": false,
3880 "status": "online",
3881 "work": null,
3882 "last_seen_at": "2026-10-06T14:05:40.512Z",
3883 "created_at": "2026-10-02T09:30:00.000Z",
3884 "created_by": null,
3885 "isolation": "host"
3886 }
3887 ]
3888 },
3889 "create_runner_registration_token": {
3890 "response": {
3891 "token": "g1trt_…",
3892 "expires_at": "2026-10-06T15:04:00.000Z",
3893 "workspace": "flagon-io",
3894 "repo": "flagon-io/hello",
3895 "group": null,
3896 "url": "https://g1t.sh"
3897 },
3898 "notes": "Pass it to `g1t-runner register --url https://g1t.sh --token …` within the hour. See [self-hosted runners](/guides/self-hosted-runners/)."
3899 },
3900 "create_runner_registration_token_for_workspace": {
3901 "params": {
3902 "workspace": "flagon-io"
3903 },
3904 "request": {
3905 "group": "Default"
3906 },
3907 "response": {
3908 "token": "g1trt_…",
3909 "expires_at": "2026-10-06T15:04:00.000Z",
3910 "workspace": "flagon-io",
3911 "repo": null,
3912 "group": "Default",
3913 "url": "https://g1t.sh"
3914 }
3915 },
3916 "remove_runner": {
3917 "params": {
3918 "id": "rnr_01kq2m8v4c7f0h3k6n9q2t5w8z"
3919 },
3920 "response": true
3921 },
3922 "remove_runner_for_workspace": {
3923 "params": {
3924 "workspace": "flagon-io",
3925 "id": "rnr_01kq2m8v4c7f0h3k6n9q2t5w8z"
3926 },
3927 "response": true
3928 },
3929 "get_runner_settings": {
3930 "response": {
3931 "agents_on_self_hosted": false,
3932 "agent_labels": [
3933 "self-hosted",
3934 "linux"
3935 ],
3936 "fork_pull_requests": false,
3937 "inherited": true
3938 }
3939 },
3940 "get_runner_settings_for_workspace": {
3941 "params": {
3942 "workspace": "flagon-io"
3943 },
3944 "response": {
3945 "agents_on_self_hosted": true,
3946 "agent_labels": [
3947 "self-hosted",
3948 "linux"
3949 ],
3950 "fork_pull_requests": false,
3951 "inherited": false
3952 }
3953 },
3954 "update_runner_settings": {
3955 "request": {
3956 "inherit": true
3957 },
3958 "response": {
3959 "agents_on_self_hosted": false,
3960 "agent_labels": [
3961 "self-hosted",
3962 "linux"
3963 ],
3964 "fork_pull_requests": false,
3965 "inherited": true
3966 }
3967 },
3968 "update_runner_settings_for_workspace": {
3969 "params": {
3970 "workspace": "flagon-io"
3971 },
3972 "request": {
3973 "agents_on_self_hosted": true,
3974 "agent_labels": [
3975 "linux"
3976 ]
3977 },
3978 "response": {
3979 "agents_on_self_hosted": true,
3980 "agent_labels": [
3981 "self-hosted",
3982 "linux"
3983 ],
3984 "fork_pull_requests": false,
3985 "inherited": false
3986 },
3987 "notes": "Agent work on your runners still uses g1t's model proxy, paid as before, unless the workspace has its own model provider."
3988 },
3989 "list_runner_groups": {
3990 "params": {
3991 "workspace": "flagon-io"
3992 },
3993 "response": [
3994 {
3995 "id": "rng_01kq2m7r2a5d8g1j4m7p0s3v6y",
3996 "name": "Default",
3997 "default": true,
3998 "repositories": [],
3999 "runners": 2,
4000 "updated_at": "2026-10-02T09:30:00.000Z"
4001 },
4002 {
4003 "id": "rng_01kq2m7r2a5d8g1j4m7p0s3v6z",
4004 "name": "GPU",
4005 "default": false,
4006 "repositories": [
4007 "hello",
4008 "models"
4009 ],
4010 "runners": 1,
4011 "updated_at": "2026-10-05T11:20:00.000Z"
4012 }
4013 ]
4014 },
4015 "create_runner_group": {
4016 "params": {
4017 "workspace": "flagon-io"
4018 },
4019 "request": {
4020 "name": "GPU",
4021 "repositories": [
4022 "hello",
4023 "models"
4024 ]
4025 },
4026 "response": {
4027 "id": "rng_01kq2m7r2a5d8g1j4m7p0s3v6z",
4028 "name": "GPU",
4029 "default": false,
4030 "repositories": [
4031 "hello",
4032 "models"
4033 ],
4034 "runners": 1,
4035 "updated_at": "2026-10-05T11:20:00.000Z"
4036 }
4037 },
4038 "update_runner_group": {
4039 "params": {
4040 "workspace": "flagon-io",
4041 "id": "rng_01kq2m7r2a5d8g1j4m7p0s3v6z"
4042 },
4043 "request": {
4044 "repositories": []
4045 },
4046 "response": {
4047 "id": "rng_01kq2m7r2a5d8g1j4m7p0s3v6z",
4048 "name": "GPU",
4049 "default": false,
4050 "repositories": [],
4051 "runners": 1,
4052 "updated_at": "2026-10-05T11:20:00.000Z"
4053 }
4054 },
4055 "delete_runner_group": {
4056 "params": {
4057 "workspace": "flagon-io",
4058 "id": "rng_01kq2m7r2a5d8g1j4m7p0s3v6z"
4059 },
4060 "response": true
4061 },
4062 "list_webhooks": {
4063 "response": [
4064 {
4065 "id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd",
4066 "scope": "repo",
4067 "workspace": "flagon-io",
4068 "repo": "flagon-io/hello",
4069 "url": "https://hooks.example.com/g1t",
4070 "events": [
4071 "git.push",
4072 "pull.merged"
4073 ],
4074 "active": true,
4075 "secret_hint": "…9c2e",
4076 "created_by": "syntaqx",
4077 "created_at": "2026-10-04T15:42:07.318Z",
4078 "last_status": "delivered",
4079 "last_delivered_at": "2026-10-04T15:42:07.611Z"
4080 }
4081 ]
4082 },
4083 "list_webhooks_for_workspace": {
4084 "params": {
4085 "workspace": "flagon-io"
4086 },
4087 "response": [
4088 {
4089 "id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd",
4090 "scope": "workspace",
4091 "workspace": "flagon-io",
4092 "repo": null,
4093 "url": "https://hooks.example.com/g1t",
4094 "events": [
4095 "git.push",
4096 "pull.merged"
4097 ],
4098 "active": true,
4099 "secret_hint": "…9c2e",
4100 "created_by": "syntaqx",
4101 "created_at": "2026-10-04T15:42:07.318Z",
4102 "last_status": "delivered",
4103 "last_delivered_at": "2026-10-04T15:42:07.611Z"
4104 }
4105 ]
4106 },
4107 "create_webhook": {
4108 "request": {
4109 "url": "https://hooks.example.com/g1t",
4110 "events": [
4111 "git.push",
4112 "pull.merged"
4113 ]
4114 },
4115 "response": {
4116 "hook": {
4117 "id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd",
4118 "scope": "repo",
4119 "workspace": "flagon-io",
4120 "repo": "flagon-io/hello",
4121 "url": "https://hooks.example.com/g1t",
4122 "events": [
4123 "git.push",
4124 "pull.merged"
4125 ],
4126 "active": true,
4127 "secret_hint": "…9c2e",
4128 "created_by": "syntaqx",
4129 "created_at": "2026-10-04T15:42:07.318Z",
4130 "last_status": "delivered",
4131 "last_delivered_at": "2026-10-04T15:42:07.611Z"
4132 },
4133 "secret": "whsec_…"
4134 },
4135 "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/)."
4136 },
4137 "create_webhook_for_workspace": {
4138 "params": {
4139 "workspace": "flagon-io"
4140 },
4141 "request": {
4142 "url": "https://hooks.example.com/g1t"
4143 },
4144 "response": {
4145 "hook": {
4146 "id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd",
4147 "scope": "workspace",
4148 "workspace": "flagon-io",
4149 "repo": null,
4150 "url": "https://hooks.example.com/g1t",
4151 "events": [
4152 "*"
4153 ],
4154 "active": true,
4155 "secret_hint": "…9c2e",
4156 "created_by": "syntaqx",
4157 "created_at": "2026-10-04T15:42:07.318Z",
4158 "last_status": "delivered",
4159 "last_delivered_at": "2026-10-04T15:42:07.611Z"
4160 },
4161 "secret": "whsec_…"
4162 },
4163 "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/)."
4164 },
4165 "update_webhook": {
4166 "params": {
4167 "id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd"
4168 },
4169 "request": {
4170 "active": false
4171 },
4172 "response": {
4173 "id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd",
4174 "scope": "repo",
4175 "workspace": "flagon-io",
4176 "repo": "flagon-io/hello",
4177 "url": "https://hooks.example.com/g1t",
4178 "events": [
4179 "git.push",
4180 "pull.merged"
4181 ],
4182 "active": false,
4183 "secret_hint": "…9c2e",
4184 "created_by": "syntaqx",
4185 "created_at": "2026-10-04T15:42:07.318Z",
4186 "last_status": "delivered",
4187 "last_delivered_at": "2026-10-04T15:42:07.611Z"
4188 }
4189 },
4190 "update_webhook_for_workspace": {
4191 "params": {
4192 "workspace": "flagon-io",
4193 "id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd"
4194 },
4195 "request": {
4196 "active": false
4197 },
4198 "response": {
4199 "id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd",
4200 "scope": "workspace",
4201 "workspace": "flagon-io",
4202 "repo": null,
4203 "url": "https://hooks.example.com/g1t",
4204 "events": [
4205 "git.push",
4206 "pull.merged"
4207 ],
4208 "active": false,
4209 "secret_hint": "…9c2e",
4210 "created_by": "syntaqx",
4211 "created_at": "2026-10-04T15:42:07.318Z",
4212 "last_status": "delivered",
4213 "last_delivered_at": "2026-10-04T15:42:07.611Z"
4214 }
4215 },
4216 "delete_webhook": {
4217 "params": {
4218 "id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd"
4219 },
4220 "response": true
4221 },
4222 "delete_webhook_for_workspace": {
4223 "params": {
4224 "workspace": "flagon-io",
4225 "id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd"
4226 },
4227 "response": true
4228 },
4229 "ping_webhook": {
4230 "params": {
4231 "id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd"
4232 },
4233 "response": {
4234 "id": "dlv_01kpx5p9v2j7k3m8n4p5q6r7st",
4235 "hook_id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd",
4236 "event_id": "",
4237 "event": "ping",
4238 "status": "delivered",
4239 "attempts": 1,
4240 "response_status": 200,
4241 "response_body": "ok",
4242 "error": null,
4243 "duration_ms": 184,
4244 "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\"}",
4245 "created_at": "2026-10-04T16:01:12.440Z",
4246 "delivered_at": "2026-10-04T16:01:12.631Z",
4247 "next_attempt_at": null
4248 },
4249 "notes": "`payload` is the JSON that was sent, as a string."
4250 },
4251 "ping_webhook_for_workspace": {
4252 "params": {
4253 "workspace": "flagon-io",
4254 "id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd"
4255 },
4256 "response": {
4257 "id": "dlv_01kpx5p9v2j7k3m8n4p5q6r7st",
4258 "hook_id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd",
4259 "event_id": "",
4260 "event": "ping",
4261 "status": "delivered",
4262 "attempts": 1,
4263 "response_status": 200,
4264 "response_body": "ok",
4265 "error": null,
4266 "duration_ms": 184,
4267 "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\"}",
4268 "created_at": "2026-10-04T16:01:12.440Z",
4269 "delivered_at": "2026-10-04T16:01:12.631Z",
4270 "next_attempt_at": null
4271 }
4272 },
4273 "list_webhook_deliveries": {
4274 "params": {
4275 "id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd"
4276 },
4277 "response": [
4278 {
4279 "id": "dlv_01kpx6a2b3c4d5e6f7g8h9j0kz",
4280 "hook_id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd",
4281 "event_id": "",
4282 "event": "ping",
4283 "status": "pending",
4284 "attempts": 1,
4285 "response_status": 503,
4286 "response_body": "Service Unavailable",
4287 "error": null,
4288 "duration_ms": 212,
4289 "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\"}",
4290 "created_at": "2026-10-04T16:20:03.100Z",
4291 "delivered_at": null,
4292 "next_attempt_at": "2026-10-04T16:21:03.312Z"
4293 },
4294 {
4295 "id": "dlv_01kpx5p9v2j7k3m8n4p5q6r7st",
4296 "hook_id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd",
4297 "event_id": "",
4298 "event": "ping",
4299 "status": "delivered",
4300 "attempts": 1,
4301 "response_status": 200,
4302 "response_body": "ok",
4303 "error": null,
4304 "duration_ms": 184,
4305 "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\"}",
4306 "created_at": "2026-10-04T16:01:12.440Z",
4307 "delivered_at": "2026-10-04T16:01:12.631Z",
4308 "next_attempt_at": null
4309 }
4310 ],
4311 "notes": "Returns at most 50, newest first. `status` is `pending`, `delivered` or `failed`; `next_attempt_at` is set while it is pending."
4312 },
4313 "list_webhook_deliveries_for_workspace": {
4314 "params": {
4315 "workspace": "flagon-io",
4316 "id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd"
4317 },
4318 "response": [
4319 {
4320 "id": "dlv_01kpx6a2b3c4d5e6f7g8h9j0kz",
4321 "hook_id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd",
4322 "event_id": "",
4323 "event": "ping",
4324 "status": "pending",
4325 "attempts": 1,
4326 "response_status": 503,
4327 "response_body": "Service Unavailable",
4328 "error": null,
4329 "duration_ms": 212,
4330 "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\"}",
4331 "created_at": "2026-10-04T16:20:03.100Z",
4332 "delivered_at": null,
4333 "next_attempt_at": "2026-10-04T16:21:03.312Z"
4334 },
4335 {
4336 "id": "dlv_01kpx5p9v2j7k3m8n4p5q6r7st",
4337 "hook_id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd",
4338 "event_id": "",
4339 "event": "ping",
4340 "status": "delivered",
4341 "attempts": 1,
4342 "response_status": 200,
4343 "response_body": "ok",
4344 "error": null,
4345 "duration_ms": 184,
4346 "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\"}",
4347 "created_at": "2026-10-04T16:01:12.440Z",
4348 "delivered_at": "2026-10-04T16:01:12.631Z",
4349 "next_attempt_at": null
4350 }
4351 ]
4352 },
4353 "redeliver_webhook": {
4354 "params": {
4355 "id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd",
4356 "delivery": "dlv_01kpx6a2b3c4d5e6f7g8h9j0kz"
4357 },
4358 "response": {
4359 "id": "dlv_01kpx6c8d1e2f3g4h5j6k7m8np",
4360 "hook_id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd",
4361 "event_id": "",
4362 "event": "ping",
4363 "status": "delivered",
4364 "attempts": 1,
4365 "response_status": 200,
4366 "response_body": "ok",
4367 "error": null,
4368 "duration_ms": 171,
4369 "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\"}",
4370 "created_at": "2026-10-04T16:25:40.007Z",
4371 "delivered_at": "2026-10-04T16:25:40.178Z",
4372 "next_attempt_at": null
4373 },
4374 "notes": "The response is the new delivery."
4375 },
4376 "redeliver_webhook_for_workspace": {
4377 "params": {
4378 "workspace": "flagon-io",
4379 "id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd",
4380 "delivery": "dlv_01kpx6a2b3c4d5e6f7g8h9j0kz"
4381 },
4382 "response": {
4383 "id": "dlv_01kpx6c8d1e2f3g4h5j6k7m8np",
4384 "hook_id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd",
4385 "event_id": "",
4386 "event": "ping",
4387 "status": "delivered",
4388 "attempts": 1,
4389 "response_status": 200,
4390 "response_body": "ok",
4391 "error": null,
4392 "duration_ms": 171,
4393 "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\"}",
4394 "created_at": "2026-10-04T16:25:40.007Z",
4395 "delivered_at": "2026-10-04T16:25:40.178Z",
4396 "next_attempt_at": null
4397 }
4398 },
4399 "list_integrations": {
4400 "params": {
4401 "workspace": "flagon-io"
4402 },
4403 "response": [
4404 {
4405 "id": "con_01kpx4n8r3g9s0v5w7x1z2a3bc",
4406 "workspace": "flagon-io",
4407 "provider": "jira",
4408 "kind": "tracker",
4409 "name": "Jira",
4410 "config": {
4411 "write_back": true,
4412 "site": "https://acme.atlassian.net",
4413 "email": "syntaqx@example.com",
4414 "keys": [
4415 "TECH"
4416 ]
4417 },
4418 "secret_hint": "…x7Qe",
4419 "webhook_url": null,
4420 "created_by": "syntaqx",
4421 "created_at": "2026-10-04T15:42:07.318Z",
4422 "last_used_at": null,
4423 "last_error": null,
4424 "models": []
4425 }
4426 ],
4427 "notes": "`kind` is `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."
4428 },
4429 "connect_integration": {
4430 "params": {
4431 "workspace": "flagon-io"
4432 },
4433 "request": {
4434 "provider": "webhook",
4435 "config": {
4436 "repo": "flagon-io/hello",
4437 "label": "bug"
4438 }
4439 },
4440 "response": {
4441 "connection": {
4442 "id": "con_01kpx4n8r3g9s0v5w7x1z2a3bd",
4443 "workspace": "flagon-io",
4444 "provider": "webhook",
4445 "kind": "alerts",
4446 "name": "Webhook",
4447 "config": {
4448 "repo": "flagon-io/hello",
4449 "label": "bug",
4450 "write_back": true
4451 },
4452 "secret_hint": null,
4453 "webhook_url": "https://api.g1t.sh/hooks/con_01kpx4n8r3g9s0v5w7x1z2a3bd",
4454 "created_by": "syntaqx",
4455 "created_at": "2026-10-04T15:42:07.318Z",
4456 "last_used_at": null,
4457 "last_error": null,
4458 "models": []
4459 },
4460 "signing_secret": "g1ts_9f2c4a7e1b0d3c6f8a2e5b7d9c1f4a6e8b0d2c4f6a8e1b3d"
4461 },
4462 "notes": "`signing_secret` is set only when g1t made it, for `datadog` and `webhook`, and is shown only this once. See [integrations](/guides/integrations/)."
4463 },
4464 "update_integration": {
4465 "params": {
4466 "workspace": "flagon-io",
4467 "id": "con_01kpx4n8r3g9s0v5w7x1z2a3bc"
4468 },
4469 "request": {
4470 "config": {
4471 "site": "https://acme.atlassian.net",
4472 "email": "syntaqx@example.com",
4473 "keys": [
4474 "TECH",
4475 "OPS"
4476 ]
4477 },
4478 "secret": "atlassian-api-token"
4479 },
4480 "response": {
4481 "id": "con_01kpx4n8r3g9s0v5w7x1z2a3bc",
4482 "workspace": "flagon-io",
4483 "provider": "jira",
4484 "kind": "tracker",
4485 "name": "Jira",
4486 "config": {
4487 "write_back": true,
4488 "site": "https://acme.atlassian.net",
4489 "email": "syntaqx@example.com",
4490 "keys": [
4491 "TECH",
4492 "OPS"
4493 ]
4494 },
4495 "secret_hint": "…oken",
4496 "webhook_url": null,
4497 "created_by": "syntaqx",
4498 "created_at": "2026-10-04T15:42:07.318Z",
4499 "last_used_at": "2026-10-07T14:00:02.000Z",
4500 "last_error": null,
4501 "models": []
4502 },
4503 "notes": "The secret is write-only: it is kept encrypted and only its last four characters come back, as `secret_hint`. Use it to rotate a key."
4504 },
4505 "disconnect_integration": {
4506 "params": {
4507 "workspace": "flagon-io",
4508 "id": "con_01kpx4n8r3g9s0v5w7x1z2a3bd"
4509 },
4510 "response": true
4511 },
4512 "test_integration": {
4513 "params": {
4514 "workspace": "flagon-io",
4515 "id": "con_01kpx4n8r3g9s0v5w7x1z2a3bc"
4516 },
4517 "response": {
4518 "ok": true,
4519 "message": "Connected to https://acme.atlassian.net as Chase Pierce."
4520 },
4521 "notes": "Credentials that do not work still answer `200`, with `ok` false and `message` saying what went wrong."
4522 },
4523 "get_context": {
4524 "query": {
4525 "reference": "TECH-1234"
4526 },
4527 "response": {
4528 "provider": "jira",
4529 "key": "TECH-1234",
4530 "title": "Checkout fails for EU cards",
4531 "url": "https://acme.atlassian.net/browse/TECH-1234",
4532 "status": "In Progress",
4533 "body": "Customers with 3DS cards see a 500 at /pay.",
4534 "fetched_at": "2026-10-04T15:42:07.318Z"
4535 }
4536 },
4537 "import_issue": {
4538 "request": {
4539 "reference": "TECH-1234"
4540 },
4541 "response": {
4542 "number": 42,
4543 "item": {
4544 "provider": "jira",
4545 "key": "TECH-1234",
4546 "title": "Checkout fails for EU cards",
4547 "url": "https://acme.atlassian.net/browse/TECH-1234",
4548 "status": "In Progress",
4549 "body": "Customers with 3DS cards see a 500 at /pay.",
4550 "fetched_at": "2026-10-04T15:42:07.318Z"
4551 },
4552 "created": true
4553 },
4554 "notes": "`created` is false when the ticket was imported before; `number` is then that issue."
4555 },
4556 "remember": {
4557 "request": {
4558 "text": "The tests need TZ=UTC or the date tests fail.",
4559 "scope": "project",
4560 "kind": "gotcha",
4561 "from_number": 14
4562 },
4563 "response": {
4564 "id": "mem_01m43v8q2w3e4r5t6y7u8i9o0p",
4565 "scope": "project",
4566 "workspace": "flagon-io",
4567 "repo": {
4568 "namespace": "flagon-io",
4569 "name": "hello"
4570 },
4571 "text": "The tests need TZ=UTC or the date tests fail.",
4572 "kind": "gotcha",
4573 "source": {
4574 "kind": "run",
4575 "run_id": "arn_01m43v2c1p9k8d7e6f5a4b3c2d",
4576 "repo": {
4577 "namespace": "flagon-io",
4578 "name": "hello"
4579 },
4580 "number": 14
4581 },
4582 "created_by": "g1t",
4583 "pinned": false,
4584 "created_at": "2026-10-01T18:40:12.000Z",
4585 "updated_at": "2026-10-01T18:40:12.000Z",
4586 "last_used_at": null
4587 },
4588 "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."
4589 },
4590 "recall": {
4591 "query": {
4592 "q": "pnpm"
4593 },
4594 "response": {
4595 "project": [],
4596 "workspace": [
4597 {
4598 "id": "mem_01m43t0a1s2d3f4g5h6j7k8l9z",
4599 "scope": "workspace",
4600 "workspace": "flagon-io",
4601 "repo": null,
4602 "text": "We use pnpm everywhere, never npm or yarn.",
4603 "kind": "convention",
4604 "source": {
4605 "kind": "person",
4606 "run_id": null,
4607 "repo": null,
4608 "number": null
4609 },
4610 "created_by": "syntaqx",
4611 "pinned": true,
4612 "created_at": "2026-10-01T18:40:12.000Z",
4613 "updated_at": "2026-10-01T18:40:12.000Z",
4614 "last_used_at": null
4615 }
4616 ]
4617 },
4618 "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."
4619 },
4620 "search": {
4621 "query": {
4622 "q": "parse_query language:rust repo:acme/web",
4623 "type": "code"
4624 },
4625 "response": {
4626 "query": "parse_query repo:acme/web language:rust",
4627 "type": "code",
4628 "counts": {
4629 "repositories": 0,
4630 "code": 2,
4631 "issues": 0,
4632 "pulls": 0,
4633 "people": 0
4634 },
4635 "page": 1,
4636 "per_page": 20,
4637 "more": false,
4638 "hits": [
4639 {
4640 "kind": "code",
4641 "title": "src/search/query.rs",
4642 "url": "/acme/web/blob/main/src/search/query.rs#L42",
4643 "repo": "acme/web",
4644 "private": false,
4645 "description": null,
4646 "snippet": [],
4647 "lines": [
4648 {
4649 "number": 41,
4650 "parts": [
4651 {
4652 "text": "/// Reads a query typed into the search box.",
4653 "highlight": false
4654 }
4655 ]
4656 },
4657 {
4658 "number": 42,
4659 "parts": [
4660 {
4661 "text": "pub fn ",
4662 "highlight": false
4663 },
4664 {
4665 "text": "parse_query",
4666 "highlight": true
4667 },
4668 {
4669 "text": "(text: &str) -> Query {",
4670 "highlight": false
4671 }
4672 ]
4673 },
4674 {
4675 "number": 43,
4676 "parts": [
4677 {
4678 "text": " let mut query = Query::default();",
4679 "highlight": false
4680 }
4681 ]
4682 }
4683 ],
4684 "path": "src/search/query.rs",
4685 "language": "rust",
4686 "ref": "main",
4687 "number": null,
4688 "state": null,
4689 "author": null,
4690 "requested_by": null,
4691 "labels": [],
4692 "topics": [],
4693 "slug": null,
4694 "avatar": null,
4695 "updated_at": null
4696 }
4697 ],
4698 "notes": []
4699 },
4700 "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."
4701 },
4702 "list_collaborators": {
4703 "response": {
4704 "repo": "flagon-io/hello",
4705 "base_permission": "write",
4706 "people": [
4707 {
4708 "username": "syntaqx",
4709 "display_username": "syntaqx",
4710 "name": "Chase Pierce",
4711 "avatar": null,
4712 "role": "admin",
4713 "source": "owner",
4714 "direct": null,
4715 "workspace_role": "owner"
4716 },
4717 {
4718 "username": "linus",
4719 "display_username": "linus",
4720 "name": null,
4721 "avatar": null,
4722 "role": "maintain",
4723 "source": "direct",
4724 "direct": "maintain",
4725 "workspace_role": "member"
4726 },
4727 {
4728 "username": "grace",
4729 "display_username": "grace",
4730 "name": "Grace Hopper",
4731 "avatar": null,
4732 "role": "write",
4733 "source": "base",
4734 "direct": null,
4735 "workspace_role": "member"
4736 },
4737 {
4738 "username": "ada",
4739 "display_username": "Ada",
4740 "name": "Ada Lovelace",
4741 "avatar": null,
4742 "role": "triage",
4743 "source": "direct",
4744 "direct": "triage",
4745 "workspace_role": null
4746 }
4747 ],
4748 "invitations": [
4749 {
4750 "id": "rin_01kp3c4d5e6f7g8h9j0k1m2n3p",
4751 "repo": "flagon-io/hello",
4752 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
4753 "invitee": "alan",
4754 "email": null,
4755 "role": "write",
4756 "invited_by": "syntaqx",
4757 "inviter_avatar": null,
4758 "status": "pending",
4759 "created_at": "2026-10-05T17:00:00.000Z",
4760 "expires_at": "2026-10-12T17:00:00.000Z"
4761 },
4762 {
4763 "id": "rin_01kp3d7e8f9g0h1j2k3m4n5p6q",
4764 "repo": "flagon-io/hello",
4765 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
4766 "invitee": null,
4767 "email": "joan@example.com",
4768 "role": "read",
4769 "invited_by": "syntaqx",
4770 "inviter_avatar": null,
4771 "status": "pending",
4772 "created_at": "2026-10-05T17:00:00.000Z",
4773 "expires_at": "2026-10-12T17:00:00.000Z"
4774 }
4775 ],
4776 "viewer_role": "admin",
4777 "can_manage": true
4778 },
4779 "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/)."
4780 },
4781 "add_collaborator": {
4782 "request": {
4783 "invitee": "ada",
4784 "role": "triage"
4785 },
4786 "response": {
4787 "result": "invited",
4788 "invitation": {
4789 "id": "rin_01kp3e9f0g1h2j3k4m5n6p7q8r",
4790 "repo": "flagon-io/hello",
4791 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
4792 "invitee": "ada",
4793 "email": null,
4794 "role": "triage",
4795 "invited_by": "syntaqx",
4796 "inviter_avatar": null,
4797 "status": "pending",
4798 "created_at": "2026-10-05T17:00:00.000Z",
4799 "expires_at": "2026-10-12T17:00:00.000Z"
4800 }
4801 },
4802 "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. A `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."
4803 },
4804 "update_collaborator": {
4805 "params": {
4806 "owner": "flagon-io",
4807 "name": "hello",
4808 "username": "ada"
4809 },
4810 "request": {
4811 "role": "write"
4812 },
4813 "response": {
4814 "username": "ada",
4815 "display_username": "Ada",
4816 "name": "Ada Lovelace",
4817 "avatar": null,
4818 "role": "write",
4819 "source": "direct",
4820 "direct": "write",
4821 "workspace_role": null
4822 },
4823 "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/)."
4824 },
4825 "remove_collaborator": {
4826 "params": {
4827 "owner": "flagon-io",
4828 "name": "hello",
4829 "username": "ada"
4830 },
4831 "response": true,
4832 "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/)."
4833 },
4834 "get_collaborator_permission": {
4835 "params": {
4836 "owner": "flagon-io",
4837 "name": "hello",
4838 "username": "ada"
4839 },
4840 "response": {
4841 "username": "ada",
4842 "display_username": "Ada",
4843 "role": "triage",
4844 "source": "direct",
4845 "capabilities": [
4846 "read",
4847 "participate",
4848 "triage"
4849 ]
4850 },
4851 "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/)."
4852 },
4853 "list_repo_invitations": {
4854 "response": [
4855 {
4856 "id": "rin_01kp3c4d5e6f7g8h9j0k1m2n3p",
4857 "repo": "flagon-io/hello",
4858 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
4859 "invitee": "alan",
4860 "email": null,
4861 "role": "write",
4862 "invited_by": "syntaqx",
4863 "inviter_avatar": null,
4864 "status": "pending",
4865 "created_at": "2026-10-05T17:00:00.000Z",
4866 "expires_at": "2026-10-12T17:00:00.000Z"
4867 },
4868 {
4869 "id": "rin_01kp3d7e8f9g0h1j2k3m4n5p6q",
4870 "repo": "flagon-io/hello",
4871 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
4872 "invitee": null,
4873 "email": "joan@example.com",
4874 "role": "read",
4875 "invited_by": "syntaqx",
4876 "inviter_avatar": null,
4877 "status": "pending",
4878 "created_at": "2026-10-05T17:00:00.000Z",
4879 "expires_at": "2026-10-12T17:00:00.000Z"
4880 }
4881 ],
4882 "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/)."
4883 },
4884 "revoke_repo_invitation": {
4885 "params": {
4886 "owner": "flagon-io",
4887 "name": "hello",
4888 "id": "rin_01kp3c4d5e6f7g8h9j0k1m2n3p"
4889 },
4890 "response": {
4891 "id": "rin_01kp3c4d5e6f7g8h9j0k1m2n3p",
4892 "repo": "flagon-io/hello",
4893 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
4894 "invitee": "alan",
4895 "email": null,
4896 "role": "write",
4897 "invited_by": "syntaqx",
4898 "inviter_avatar": null,
4899 "status": "revoked",
4900 "created_at": "2026-10-05T17:00:00.000Z",
4901 "expires_at": "2026-10-12T17:00:00.000Z"
4902 },
4903 "notes": "`404` when there is no pending invitation with that id on this repository."
4904 },
4905 "list_my_repo_invitations": {
4906 "response": [
4907 {
4908 "id": "rin_01kp3e9f0g1h2j3k4m5n6p7q8r",
4909 "repo": "flagon-io/hello",
4910 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
4911 "invitee": "ada",
4912 "email": null,
4913 "role": "triage",
4914 "invited_by": "syntaqx",
4915 "inviter_avatar": null,
4916 "status": "pending",
4917 "created_at": "2026-10-05T17:00:00.000Z",
4918 "expires_at": "2026-10-12T17:00:00.000Z"
4919 }
4920 ],
4921 "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."
4922 },
4923 "accept_repo_invitation": {
4924 "params": {
4925 "id": "rin_01kp3e9f0g1h2j3k4m5n6p7q8r"
4926 },
4927 "response": {
4928 "id": "rin_01kp3e9f0g1h2j3k4m5n6p7q8r",
4929 "repo": "flagon-io/hello",
4930 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
4931 "invitee": "ada",
4932 "email": null,
4933 "role": "triage",
4934 "invited_by": "syntaqx",
4935 "inviter_avatar": null,
4936 "status": "accepted",
4937 "created_at": "2026-10-05T17:00:00.000Z",
4938 "expires_at": "2026-10-12T17:00:00.000Z"
4939 },
4940 "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/)."
4941 },
4942 "decline_repo_invitation": {
4943 "params": {
4944 "id": "rin_01kp3e9f0g1h2j3k4m5n6p7q8r"
4945 },
4946 "response": {
4947 "id": "rin_01kp3e9f0g1h2j3k4m5n6p7q8r",
4948 "repo": "flagon-io/hello",
4949 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
4950 "invitee": "ada",
4951 "email": null,
4952 "role": "triage",
4953 "invited_by": "syntaqx",
4954 "inviter_avatar": null,
4955 "status": "declined",
4956 "created_at": "2026-10-05T17:00:00.000Z",
4957 "expires_at": "2026-10-12T17:00:00.000Z"
4958 },
4959 "notes": "`404` when you have no pending invitation with that id."
4960 },
4961 "set_base_permission": {
4962 "params": {
4963 "workspace": "flagon-io"
4964 },
4965 "request": {
4966 "base_permission": "read"
4967 },
4968 "response": {
4969 "workspace": "flagon-io",
4970 "base_permission": "read"
4971 },
4972 "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/)."
4973 },
4974 "list_outside_collaborators": {
4975 "params": {
4976 "workspace": "flagon-io"
4977 },
4978 "response": [
4979 {
4980 "username": "ada",
4981 "display_username": "Ada",
4982 "name": "Ada Lovelace",
4983 "avatar": null,
4984 "repos": [
4985 {
4986 "repo": "flagon-io/docs",
4987 "role": "write"
4988 },
4989 {
4990 "repo": "flagon-io/hello",
4991 "role": "triage"
4992 }
4993 ]
4994 }
4995 ],
4996 "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/)."
4997 },
4998 "list_deploy_keys": {
4999 "params": {
5000 "owner": "flagon-io",
5001 "name": "hello"
5002 },
5003 "response": [
5004 {
5005 "id": "dk_01kp3f2g3h4j5k6m7n8p9q0r1s",
5006 "title": "Docs build",
5007 "key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGb9ECWmEzf6FQbrBZ9w7lshQhqowtrbLDFw4rXAxZuE",
5008 "fingerprint": "SHA256:ubxEl41fJDnUoEPKSZE0y6R0ZjjAQf/wV5vZgeBV8qk",
5009 "read_only": true,
5010 "created_at": "2026-10-06T09:12:00.000Z",
5011 "created_by": "syntaqx",
5012 "last_used_at": "2026-10-08T07:40:00.000Z"
5013 },
5014 {
5015 "id": "dk_01kp3g4h5j6k7m8n9p0q1r2s3t",
5016 "title": "Release bot",
5017 "key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJ8Vq2nLr5Xw0sT3yK7mP1cH4dF6gB9aE2uZ5oN8iR0j",
5018 "fingerprint": "SHA256:2h7VyLkcqBHwKVtfFUchGsE5pDwpgBPV/VvJgYiS27M",
5019 "read_only": false,
5020 "created_at": "2026-10-07T15:30:00.000Z",
5021 "created_by": "syntaqx",
5022 "last_used_at": null
5023 }
5024 ],
5025 "notes": "Oldest first. `read_only` false means the key may push, workflow files included. `last_used_at` is when it last signed in over SSH, to within 5 minutes, and null when it never has. Refused with `403` without the Admin role, and for an agent's token or a workspace token without Admin; `404` for a private repository you cannot see. See [Deploy keys](/guides/git/#deploy-keys)."
5026 },
5027 "get_deploy_key": {
5028 "params": {
5029 "owner": "flagon-io",
5030 "name": "hello",
5031 "id": "dk_01kp3f2g3h4j5k6m7n8p9q0r1s"
5032 },
5033 "response": {
5034 "id": "dk_01kp3f2g3h4j5k6m7n8p9q0r1s",
5035 "title": "Docs build",
5036 "key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGb9ECWmEzf6FQbrBZ9w7lshQhqowtrbLDFw4rXAxZuE",
5037 "fingerprint": "SHA256:ubxEl41fJDnUoEPKSZE0y6R0ZjjAQf/wV5vZgeBV8qk",
5038 "read_only": true,
5039 "created_at": "2026-10-06T09:12:00.000Z",
5040 "created_by": "syntaqx",
5041 "last_used_at": "2026-10-08T07:40:00.000Z"
5042 },
5043 "notes": "`404` when the repository has no deploy key with that id."
5044 },
5045 "create_deploy_key": {
5046 "params": {
5047 "owner": "flagon-io",
5048 "name": "hello"
5049 },
5050 "request": {
5051 "title": "Release bot",
5052 "key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJ8Vq2nLr5Xw0sT3yK7mP1cH4dF6gB9aE2uZ5oN8iR0j release@ci",
5053 "read_only": false
5054 },
5055 "response": {
5056 "id": "dk_01kp3g4h5j6k7m8n9p0q1r2s3t",
5057 "title": "Release bot",
5058 "key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJ8Vq2nLr5Xw0sT3yK7mP1cH4dF6gB9aE2uZ5oN8iR0j",
5059 "fingerprint": "SHA256:2h7VyLkcqBHwKVtfFUchGsE5pDwpgBPV/VvJgYiS27M",
5060 "read_only": false,
5061 "created_at": "2026-10-07T15:30:00.000Z",
5062 "created_by": "syntaqx",
5063 "last_used_at": null
5064 },
5065 "notes": "`read_only` is true unless you send false. The key's comment is not kept; it becomes the title when you send none. Refused with `400` for a line that is not an OpenSSH public key, `409` with `Key is already in use.` when the key is registered already (as anyone's SSH key or as a deploy key anywhere), `409` past 100 keys, and `403` without the Admin role, from an agent's token, from a workspace token without Admin, or before your email address is confirmed. Recorded in the workspace's audit log as `repo.deploy_key_added`."
5066 },
5067 "delete_deploy_key": {
5068 "params": {
5069 "owner": "flagon-io",
5070 "name": "hello",
5071 "id": "dk_01kp3g4h5j6k7m8n9p0q1r2s3t"
5072 },
5073 "response": true,
5074 "notes": "The key stops working at once. `404` when the repository has no deploy key with that id. Recorded in the workspace's audit log as `repo.deploy_key_removed`."
5075 },
5076 "list_teams": {
5077 "params": {
5078 "workspace": "flagon-io"
5079 },
5080 "query": {
5081 "q": "back"
5082 },
5083 "response": [
5084 {
5085 "id": "team_01m52k8d3f7h1k5n9r3v7z1c5g",
5086 "workspace": "flagon-io",
5087 "slug": "backend",
5088 "name": "Backend",
5089 "description": "The API and the services behind it.",
5090 "visibility": "visible",
5091 "parent": {
5092 "slug": "engineering",
5093 "name": "Engineering"
5094 },
5095 "notify": true,
5096 "review_assignment": {
5097 "enabled": false,
5098 "algorithm": "round_robin",
5099 "count": 1,
5100 "skip_busy": false,
5101 "busy_at": 5,
5102 "include_child_teams": false,
5103 "excluded": [],
5104 "notify_team": false
5105 },
5106 "members_count": 4,
5107 "repos_count": 2,
5108 "child_teams_count": 1,
5109 "viewer_role": "maintainer",
5110 "can_manage": true,
5111 "created_at": "2026-10-06T15:02:11.480Z",
5112 "updated_at": "2026-10-06T15:02:11.480Z"
5113 }
5114 ],
5115 "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/)."
5116 },
5117 "create_team": {
5118 "params": {
5119 "workspace": "flagon-io"
5120 },
5121 "request": {
5122 "name": "Backend",
5123 "description": "The API and the services behind it.",
5124 "visibility": "visible",
5125 "parent": "engineering",
5126 "members": [
5127 "ana"
5128 ]
5129 },
5130 "response": {
5131 "id": "team_01m52k8d3f7h1k5n9r3v7z1c5g",
5132 "workspace": "flagon-io",
5133 "slug": "backend",
5134 "name": "Backend",
5135 "description": "The API and the services behind it.",
5136 "visibility": "visible",
5137 "parent": {
5138 "slug": "engineering",
5139 "name": "Engineering"
5140 },
5141 "notify": true,
5142 "review_assignment": {
5143 "enabled": false,
5144 "algorithm": "round_robin",
5145 "count": 1,
5146 "skip_busy": false,
5147 "busy_at": 5,
5148 "include_child_teams": false,
5149 "excluded": [],
5150 "notify_team": false
5151 },
5152 "members_count": 2,
5153 "repos_count": 0,
5154 "child_teams_count": 0,
5155 "viewer_role": "maintainer",
5156 "can_manage": true,
5157 "created_at": "2026-10-06T15:02:11.480Z",
5158 "updated_at": "2026-10-06T15:02:11.480Z"
5159 },
5160 "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/)."
5161 },
5162 "get_team": {
5163 "params": {
5164 "workspace": "flagon-io",
5165 "team": "backend"
5166 },
5167 "response": {
5168 "id": "team_01m52k8d3f7h1k5n9r3v7z1c5g",
5169 "workspace": "flagon-io",
5170 "slug": "backend",
5171 "name": "Backend",
5172 "description": "The API and the services behind it.",
5173 "visibility": "visible",
5174 "parent": {
5175 "slug": "engineering",
5176 "name": "Engineering"
5177 },
5178 "notify": true,
5179 "review_assignment": {
5180 "enabled": false,
5181 "algorithm": "round_robin",
5182 "count": 1,
5183 "skip_busy": false,
5184 "busy_at": 5,
5185 "include_child_teams": false,
5186 "excluded": [],
5187 "notify_team": false
5188 },
5189 "members_count": 4,
5190 "repos_count": 2,
5191 "child_teams_count": 1,
5192 "viewer_role": "maintainer",
5193 "can_manage": true,
5194 "created_at": "2026-10-06T15:02:11.480Z",
5195 "updated_at": "2026-10-06T15:02:11.480Z"
5196 },
5197 "notes": "`404` for a team that does not exist, or a secret one you are not in, unless you are an owner."
5198 },
5199 "update_team": {
5200 "params": {
5201 "workspace": "flagon-io",
5202 "team": "backend"
5203 },
5204 "request": {
5205 "description": "The API, the services behind it, and their on-call.",
5206 "visibility": "secret",
5207 "parent": ""
5208 },
5209 "response": {
5210 "id": "team_01m52k8d3f7h1k5n9r3v7z1c5g",
5211 "workspace": "flagon-io",
5212 "slug": "backend",
5213 "name": "Backend",
5214 "description": "The API, the services behind it, and their on-call.",
5215 "visibility": "secret",
5216 "parent": null,
5217 "notify": true,
5218 "review_assignment": {
5219 "enabled": false,
5220 "algorithm": "round_robin",
5221 "count": 1,
5222 "skip_busy": false,
5223 "busy_at": 5,
5224 "include_child_teams": false,
5225 "excluded": [],
5226 "notify_team": false
5227 },
5228 "members_count": 4,
5229 "repos_count": 2,
5230 "child_teams_count": 1,
5231 "viewer_role": "maintainer",
5232 "can_manage": true,
5233 "created_at": "2026-10-06T15:02:11.480Z",
5234 "updated_at": "2026-10-07T09:41:52.006Z"
5235 },
5236 "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)."
5237 },
5238 "delete_team": {
5239 "params": {
5240 "workspace": "flagon-io",
5241 "team": "backend"
5242 },
5243 "response": true,
5244 "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)."
5245 },
5246 "list_team_members": {
5247 "params": {
5248 "workspace": "flagon-io",
5249 "team": "backend"
5250 },
5251 "query": {
5252 "include_child_teams": "true"
5253 },
5254 "response": [
5255 {
5256 "username": "syntaqx",
5257 "display_username": "syntaqx",
5258 "name": "Chase Pierce",
5259 "avatar": null,
5260 "role": "maintainer",
5261 "via": null
5262 },
5263 {
5264 "username": "ana",
5265 "display_username": "Ana",
5266 "name": "Ana Lima",
5267 "avatar": null,
5268 "role": "member",
5269 "via": null
5270 },
5271 {
5272 "username": "bo",
5273 "display_username": "bo",
5274 "name": null,
5275 "avatar": null,
5276 "role": "member",
5277 "via": "payments"
5278 }
5279 ],
5280 "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."
5281 },
5282 "set_team_member": {
5283 "params": {
5284 "workspace": "flagon-io",
5285 "team": "backend",
5286 "username": "ana"
5287 },
5288 "request": {
5289 "role": "maintainer"
5290 },
5291 "response": {
5292 "username": "ana",
5293 "display_username": "Ana",
5294 "name": "Ana Lima",
5295 "avatar": null,
5296 "role": "maintainer",
5297 "via": null
5298 },
5299 "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)."
5300 },
5301 "remove_team_member": {
5302 "params": {
5303 "workspace": "flagon-io",
5304 "team": "backend",
5305 "username": "ana"
5306 },
5307 "response": true,
5308 "notes": "Anyone may take themselves out of a team. Leaving the workspace takes a person out of all its teams."
5309 },
5310 "list_child_teams": {
5311 "params": {
5312 "workspace": "flagon-io",
5313 "team": "engineering"
5314 },
5315 "response": [
5316 {
5317 "id": "team_01m52k8d3f7h1k5n9r3v7z1c5g",
5318 "workspace": "flagon-io",
5319 "slug": "backend",
5320 "name": "Backend",
5321 "description": "The API and the services behind it.",
5322 "visibility": "visible",
5323 "parent": {
5324 "slug": "engineering",
5325 "name": "Engineering"
5326 },
5327 "notify": true,
5328 "review_assignment": {
5329 "enabled": false,
5330 "algorithm": "round_robin",
5331 "count": 1,
5332 "skip_busy": false,
5333 "busy_at": 5,
5334 "include_child_teams": false,
5335 "excluded": [],
5336 "notify_team": false
5337 },
5338 "members_count": 4,
5339 "repos_count": 2,
5340 "child_teams_count": 0,
5341 "viewer_role": "maintainer",
5342 "can_manage": true,
5343 "created_at": "2026-10-06T15:02:11.480Z",
5344 "updated_at": "2026-10-06T15:02:11.480Z"
5345 }
5346 ],
5347 "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."
5348 },
5349 "list_team_repos": {
5350 "params": {
5351 "workspace": "flagon-io",
5352 "team": "backend"
5353 },
5354 "response": [
5355 {
5356 "repo": "flagon-io/hello",
5357 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
5358 "role": "write",
5359 "inherited_from": null
5360 },
5361 {
5362 "repo": "flagon-io/docs",
5363 "repo_id": "rep_01m3m5r2a8c4e6g8j0m2p4r6t8",
5364 "role": "read",
5365 "inherited_from": "engineering"
5366 }
5367 ],
5368 "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."
5369 },
5370 "set_team_repo": {
5371 "params": {
5372 "workspace": "flagon-io",
5373 "team": "backend",
5374 "repo": "hello"
5375 },
5376 "request": {
5377 "role": "maintain"
5378 },
5379 "response": {
5380 "repo": "flagon-io/hello",
5381 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
5382 "role": "maintain",
5383 "inherited_from": null
5384 },
5385 "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/)."
5386 },
5387 "remove_team_repo": {
5388 "params": {
5389 "workspace": "flagon-io",
5390 "team": "backend",
5391 "repo": "hello"
5392 },
5393 "response": true,
5394 "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."
5395 },
5396 "set_team_review_assignment": {
5397 "params": {
5398 "workspace": "flagon-io",
5399 "team": "backend"
5400 },
5401 "request": {
5402 "enabled": true,
5403 "algorithm": "load_balance",
5404 "count": 2,
5405 "skip_busy": true,
5406 "busy_at": 5,
5407 "excluded": [
5408 "syntaqx"
5409 ]
5410 },
5411 "response": {
5412 "id": "team_01m52k8d3f7h1k5n9r3v7z1c5g",
5413 "workspace": "flagon-io",
5414 "slug": "backend",
5415 "name": "Backend",
5416 "description": "The API and the services behind it.",
5417 "visibility": "visible",
5418 "parent": {
5419 "slug": "engineering",
5420 "name": "Engineering"
5421 },
5422 "notify": true,
5423 "review_assignment": {
5424 "enabled": true,
5425 "algorithm": "load_balance",
5426 "count": 2,
5427 "skip_busy": true,
5428 "busy_at": 5,
5429 "include_child_teams": false,
5430 "excluded": [
5431 "syntaqx"
5432 ],
5433 "notify_team": false
5434 },
5435 "members_count": 4,
5436 "repos_count": 2,
5437 "child_teams_count": 1,
5438 "viewer_role": "maintainer",
5439 "can_manage": true,
5440 "created_at": "2026-10-06T15:02:11.480Z",
5441 "updated_at": "2026-10-07T09:44:03.512Z"
5442 },
5443 "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/)."
5444 },
5445 "list_user_teams": {
5446 "params": {
5447 "workspace": "flagon-io",
5448 "username": "ana"
5449 },
5450 "response": [
5451 {
5452 "id": "team_01m52k8d3f7h1k5n9r3v7z1c5g",
5453 "workspace": "flagon-io",
5454 "slug": "backend",
5455 "name": "Backend",
5456 "description": "The API and the services behind it.",
5457 "visibility": "visible",
5458 "parent": {
5459 "slug": "engineering",
5460 "name": "Engineering"
5461 },
5462 "notify": true,
5463 "review_assignment": {
5464 "enabled": false,
5465 "algorithm": "round_robin",
5466 "count": 1,
5467 "skip_busy": false,
5468 "busy_at": 5,
5469 "include_child_teams": false,
5470 "excluded": [],
5471 "notify_team": false
5472 },
5473 "members_count": 4,
5474 "repos_count": 2,
5475 "child_teams_count": 1,
5476 "viewer_role": null,
5477 "can_manage": false,
5478 "created_at": "2026-10-06T15:02:11.480Z",
5479 "updated_at": "2026-10-06T15:02:11.480Z"
5480 }
5481 ],
5482 "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."
5483 },
5484 "list_security_alerts": {
5485 "params": {
5486 "owner": "flagon-io",
5487 "name": "hello"
5488 },
5489 "query": {
5490 "state": "open"
5491 },
5492 "response": [
5493 {
5494 "kind": "secret",
5495 "id": "sec_01kp4a7b2c3d4e5f6g7h8j9k0m",
5496 "state": "dismissed",
5497 "secret_type": "aws_access_key",
5498 "label": "an AWS access key",
5499 "path": "test/fixtures/aws.env",
5500 "line": 3,
5501 "commit": "9f2c1e04b7d3a8e6f5c2b1a0d9e8f7c6b5a4d3e2",
5502 "preview": "AKIA…MPLE",
5503 "status": "allowed",
5504 "source": "history",
5505 "test_value": "the documented example key",
5506 "found_by": null,
5507 "found_at": "2026-10-01T12:00:00.000Z",
5508 "dismissed_reason": "used_in_tests",
5509 "dismissed_comment": "Only in the test fixtures.",
5510 "dismissed_by": "syntaqx",
5511 "dismissed_at": "2026-10-02T09:15:00.000Z"
5512 },
5513 {
5514 "kind": "dependency",
5515 "id": "vul_01kp4b8c3d4e5f6g7h8j9k0m1n",
5516 "state": "open",
5517 "ecosystem": "npm",
5518 "package": "lodash",
5519 "version": "4.17.20",
5520 "manifest": "package-lock.json",
5521 "advisory": "GHSA-35jh-r3h4-6jhm",
5522 "osv_id": "GHSA-35jh-r3h4-6jhm",
5523 "summary": "Command Injection in lodash",
5524 "severity": "high",
5525 "fixed_version": "4.17.21",
5526 "fixed_at": null,
5527 "update": {
5528 "state": "open",
5529 "target": "4.17.21",
5530 "branch": "g1t/security/lodash-4.17.21",
5531 "pull": 42,
5532 "issue": null,
5533 "error": null,
5534 "updated_at": "2026-10-01T12:20:00.000Z"
5535 },
5536 "found_at": "2026-10-01T12:00:00.000Z",
5537 "dismissed_reason": null,
5538 "dismissed_comment": null,
5539 "dismissed_by": null,
5540 "dismissed_at": null
5541 }
5542 ],
5543 "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/)."
5544 },
5545 "dismiss_security_alert": {
5546 "params": {
5547 "owner": "flagon-io",
5548 "name": "hello",
5549 "id": "vul_01kp4b8c3d4e5f6g7h8j9k0m1n"
5550 },
5551 "request": {
5552 "reason": "tolerable_risk",
5553 "comment": "Only the build uses it, on trusted input."
5554 },
5555 "response": {
5556 "kind": "dependency",
5557 "id": "vul_01kp4b8c3d4e5f6g7h8j9k0m1n",
5558 "state": "dismissed",
5559 "ecosystem": "npm",
5560 "package": "lodash",
5561 "version": "4.17.20",
5562 "manifest": "package-lock.json",
5563 "advisory": "GHSA-35jh-r3h4-6jhm",
5564 "osv_id": "GHSA-35jh-r3h4-6jhm",
5565 "summary": "Command Injection in lodash",
5566 "severity": "high",
5567 "fixed_version": "4.17.21",
5568 "fixed_at": null,
5569 "update": {
5570 "state": "open",
5571 "target": "4.17.21",
5572 "branch": "g1t/security/lodash-4.17.21",
5573 "pull": 42,
5574 "issue": null,
5575 "error": null,
5576 "updated_at": "2026-10-01T12:20:00.000Z"
5577 },
5578 "found_at": "2026-10-01T12:00:00.000Z",
5579 "dismissed_reason": "tolerable_risk",
5580 "dismissed_comment": "Only the build uses it, on trusted input.",
5581 "dismissed_by": "syntaqx",
5582 "dismissed_at": "2026-10-06T10:00:00.000Z"
5583 },
5584 "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."
5585 },
5586 "reopen_security_alert": {
5587 "params": {
5588 "owner": "flagon-io",
5589 "name": "hello",
5590 "id": "sec_01kp4a7b2c3d4e5f6g7h8j9k0m"
5591 },
5592 "response": {
5593 "kind": "secret",
5594 "id": "sec_01kp4a7b2c3d4e5f6g7h8j9k0m",
5595 "state": "open",
5596 "secret_type": "aws_access_key",
5597 "label": "an AWS access key",
5598 "path": "test/fixtures/aws.env",
5599 "line": 3,
5600 "commit": "9f2c1e04b7d3a8e6f5c2b1a0d9e8f7c6b5a4d3e2",
5601 "preview": "AKIA…MPLE",
5602 "status": "open",
5603 "source": "history",
5604 "test_value": "the documented example key",
5605 "found_by": null,
5606 "found_at": "2026-10-01T12:00:00.000Z",
5607 "dismissed_reason": null,
5608 "dismissed_comment": null,
5609 "dismissed_by": null,
5610 "dismissed_at": null
5611 },
5612 "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."
5613 },
5614 "list_notifications": {
5615 "query": {
5616 "participating": "true"
5617 },
5618 "response": {
5619 "items": [
5620 {
5621 "id": "ntf_01kp7m2q3r4s5t6v7w8x9y0z1a",
5622 "reason": "review_requested",
5623 "severity": "warning",
5624 "title": "ada asked you to review flagon-io/hello#14",
5625 "body": "Add a greeting to the README",
5626 "event": "pull.review_requested",
5627 "repo": "flagon-io/hello",
5628 "workspace": "flagon-io",
5629 "subject": "pull",
5630 "number": 14,
5631 "url": "/flagon-io/hello/pull/14",
5632 "actor": "ada",
5633 "count": 3,
5634 "created_at": "2026-10-06T15:02:11.000Z",
5635 "updated_at": "2026-10-07T09:41:30.000Z",
5636 "read_at": null,
5637 "done_at": null,
5638 "saved": false,
5639 "snoozed_until": null
5640 },
5641 {
5642 "id": "ntf_01kp7k9a8b7c6d5e4f3g2h1j0k",
5643 "reason": "ci_activity",
5644 "severity": "error",
5645 "title": "Production of hello failed to deploy",
5646 "body": "The build failed: npm run build exited with 1.",
5647 "event": "deployment.failed",
5648 "repo": "flagon-io/hello",
5649 "workspace": "flagon-io",
5650 "subject": "deploy",
5651 "number": null,
5652 "url": "/flagon-io/hello/deployments/dpl_01kp7k8z7y6x5w4v3t2s1r0q9p",
5653 "actor": "syntaqx",
5654 "count": 1,
5655 "created_at": "2026-10-07T08:12:40.000Z",
5656 "updated_at": "2026-10-07T08:12:40.000Z",
5657 "read_at": null,
5658 "done_at": null,
5659 "saved": false,
5660 "snoozed_until": null
5661 }
5662 ],
5663 "next": null
5664 },
5665 "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."
5666 },
5667 "list_repo_notifications": {
5668 "params": {
5669 "owner": "flagon-io",
5670 "name": "hello"
5671 },
5672 "query": {
5673 "all": "true"
5674 },
5675 "response": {
5676 "items": [
5677 {
5678 "id": "ntf_01kp7m2q3r4s5t6v7w8x9y0z1a",
5679 "reason": "review_requested",
5680 "severity": "warning",
5681 "title": "ada asked you to review flagon-io/hello#14",
5682 "body": "Add a greeting to the README",
5683 "event": "pull.review_requested",
5684 "repo": "flagon-io/hello",
5685 "workspace": "flagon-io",
5686 "subject": "pull",
5687 "number": 14,
5688 "url": "/flagon-io/hello/pull/14",
5689 "actor": "ada",
5690 "count": 3,
5691 "created_at": "2026-10-06T15:02:11.000Z",
5692 "updated_at": "2026-10-07T09:41:30.000Z",
5693 "read_at": "2026-10-07T09:50:00.000Z",
5694 "done_at": null,
5695 "saved": false,
5696 "snoozed_until": null
5697 },
5698 {
5699 "id": "ntf_01kp7k9a8b7c6d5e4f3g2h1j0k",
5700 "reason": "ci_activity",
5701 "severity": "error",
5702 "title": "Production of hello failed to deploy",
5703 "body": "The build failed: npm run build exited with 1.",
5704 "event": "deployment.failed",
5705 "repo": "flagon-io/hello",
5706 "workspace": "flagon-io",
5707 "subject": "deploy",
5708 "number": null,
5709 "url": "/flagon-io/hello/deployments/dpl_01kp7k8z7y6x5w4v3t2s1r0q9p",
5710 "actor": "syntaqx",
5711 "count": 1,
5712 "created_at": "2026-10-07T08:12:40.000Z",
5713 "updated_at": "2026-10-07T08:12:40.000Z",
5714 "read_at": null,
5715 "done_at": null,
5716 "saved": false,
5717 "snoozed_until": null
5718 }
5719 ],
5720 "next": "ntf_01kp7k9a8b7c6d5e4f3g2h1j0k"
5721 },
5722 "notes": "The same as `GET /notifications`, for one repository you can read."
5723 },
5724 "mark_notifications_read": {
5725 "request": {
5726 "last_read_at": "2026-10-07T10:00:00Z"
5727 },
5728 "response": {
5729 "marked": 12,
5730 "last_read_at": "2026-10-07T10:00:00.000Z"
5731 },
5732 "notes": "Threads with activity after `last_read_at` stay unread, so send the time you last listed them."
5733 },
5734 "mark_repo_notifications_read": {
5735 "params": {
5736 "owner": "flagon-io",
5737 "name": "hello"
5738 },
5739 "request": {},
5740 "response": {
5741 "marked": 3,
5742 "last_read_at": "2026-10-07T10:02:41.512Z"
5743 }
5744 },
5745 "get_notification_thread": {
5746 "params": {
5747 "id": "ntf_01kp7m2q3r4s5t6v7w8x9y0z1a"
5748 },
5749 "response": {
5750 "id": "ntf_01kp7m2q3r4s5t6v7w8x9y0z1a",
5751 "reason": "review_requested",
5752 "severity": "warning",
5753 "title": "ada asked you to review flagon-io/hello#14",
5754 "body": "Add a greeting to the README",
5755 "event": "pull.review_requested",
5756 "repo": "flagon-io/hello",
5757 "workspace": "flagon-io",
5758 "subject": "pull",
5759 "number": 14,
5760 "url": "/flagon-io/hello/pull/14",
5761 "actor": "ada",
5762 "count": 3,
5763 "created_at": "2026-10-06T15:02:11.000Z",
5764 "updated_at": "2026-10-07T09:41:30.000Z",
5765 "read_at": null,
5766 "done_at": null,
5767 "saved": false,
5768 "snoozed_until": null,
5769 "activity": [
5770 {
5771 "reason": "review_requested",
5772 "severity": "warning",
5773 "title": "ada asked you to review flagon-io/hello#14",
5774 "body": "Add a greeting to the README",
5775 "event": "pull.review_requested",
5776 "actor": "ada",
5777 "created_at": "2026-10-07T09:41:30.000Z"
5778 },
5779 {
5780 "reason": "comment",
5781 "severity": "info",
5782 "title": "ada commented on flagon-io/hello#14",
5783 "body": "Pushed the fix for the heading.",
5784 "event": "comment.created",
5785 "actor": "ada",
5786 "created_at": "2026-10-06T18:20:02.000Z"
5787 },
5788 {
5789 "reason": "comment",
5790 "severity": "info",
5791 "title": "g1t commented on flagon-io/hello#14",
5792 "body": "The heading level is off by one.",
5793 "event": "comment.created",
5794 "actor": "g1t",
5795 "created_at": "2026-10-06T15:02:11.000Z"
5796 }
5797 ],
5798 "subscription": {
5799 "subscribed": true,
5800 "ignored": false,
5801 "reason": "review_requested",
5802 "repo": "flagon-io/hello",
5803 "number": 14,
5804 "updated_at": null
5805 }
5806 },
5807 "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."
5808 },
5809 "mark_thread_read": {
5810 "params": {
5811 "id": "ntf_01kp7m2q3r4s5t6v7w8x9y0z1a"
5812 },
5813 "request": {},
5814 "response": {
5815 "id": "ntf_01kp7m2q3r4s5t6v7w8x9y0z1a",
5816 "reason": "review_requested",
5817 "severity": "warning",
5818 "title": "ada asked you to review flagon-io/hello#14",
5819 "body": "Add a greeting to the README",
5820 "event": "pull.review_requested",
5821 "repo": "flagon-io/hello",
5822 "workspace": "flagon-io",
5823 "subject": "pull",
5824 "number": 14,
5825 "url": "/flagon-io/hello/pull/14",
5826 "actor": "ada",
5827 "count": 3,
5828 "created_at": "2026-10-06T15:02:11.000Z",
5829 "updated_at": "2026-10-07T09:41:30.000Z",
5830 "read_at": "2026-10-07T10:03:00.000Z",
5831 "done_at": null,
5832 "saved": false,
5833 "snoozed_until": null,
5834 "activity": [
5835 {
5836 "reason": "review_requested",
5837 "severity": "warning",
5838 "title": "ada asked you to review flagon-io/hello#14",
5839 "body": "Add a greeting to the README",
5840 "event": "pull.review_requested",
5841 "actor": "ada",
5842 "created_at": "2026-10-07T09:41:30.000Z"
5843 },
5844 {
5845 "reason": "comment",
5846 "severity": "info",
5847 "title": "ada commented on flagon-io/hello#14",
5848 "body": "Pushed the fix for the heading.",
5849 "event": "comment.created",
5850 "actor": "ada",
5851 "created_at": "2026-10-06T18:20:02.000Z"
5852 },
5853 {
5854 "reason": "comment",
5855 "severity": "info",
5856 "title": "g1t commented on flagon-io/hello#14",
5857 "body": "The heading level is off by one.",
5858 "event": "comment.created",
5859 "actor": "g1t",
5860 "created_at": "2026-10-06T15:02:11.000Z"
5861 }
5862 ],
5863 "subscription": {
5864 "subscribed": true,
5865 "ignored": false,
5866 "reason": "review_requested",
5867 "repo": "flagon-io/hello",
5868 "number": 14,
5869 "updated_at": null
5870 }
5871 }
5872 },
5873 "mark_thread_done": {
5874 "params": {
5875 "id": "ntf_01kp7m2q3r4s5t6v7w8x9y0z1a"
5876 },
5877 "response": {
5878 "id": "ntf_01kp7m2q3r4s5t6v7w8x9y0z1a",
5879 "reason": "review_requested",
5880 "severity": "warning",
5881 "title": "ada asked you to review flagon-io/hello#14",
5882 "body": "Add a greeting to the README",
5883 "event": "pull.review_requested",
5884 "repo": "flagon-io/hello",
5885 "workspace": "flagon-io",
5886 "subject": "pull",
5887 "number": 14,
5888 "url": "/flagon-io/hello/pull/14",
5889 "actor": "ada",
5890 "count": 3,
5891 "created_at": "2026-10-06T15:02:11.000Z",
5892 "updated_at": "2026-10-07T09:41:30.000Z",
5893 "read_at": "2026-10-07T10:03:00.000Z",
5894 "done_at": "2026-10-07T10:03:00.000Z",
5895 "saved": false,
5896 "snoozed_until": null,
5897 "activity": [
5898 {
5899 "reason": "review_requested",
5900 "severity": "warning",
5901 "title": "ada asked you to review flagon-io/hello#14",
5902 "body": "Add a greeting to the README",
5903 "event": "pull.review_requested",
5904 "actor": "ada",
5905 "created_at": "2026-10-07T09:41:30.000Z"
5906 },
5907 {
5908 "reason": "comment",
5909 "severity": "info",
5910 "title": "ada commented on flagon-io/hello#14",
5911 "body": "Pushed the fix for the heading.",
5912 "event": "comment.created",
5913 "actor": "ada",
5914 "created_at": "2026-10-06T18:20:02.000Z"
5915 },
5916 {
5917 "reason": "comment",
5918 "severity": "info",
5919 "title": "g1t commented on flagon-io/hello#14",
5920 "body": "The heading level is off by one.",
5921 "event": "comment.created",
5922 "actor": "g1t",
5923 "created_at": "2026-10-06T15:02:11.000Z"
5924 }
5925 ],
5926 "subscription": {
5927 "subscribed": true,
5928 "ignored": false,
5929 "reason": "review_requested",
5930 "repo": "flagon-io/hello",
5931 "number": 14,
5932 "updated_at": null
5933 }
5934 },
5935 "notes": "New activity on a done thread brings it back to the inbox, unread."
5936 },
5937 "save_thread": {
5938 "params": {
5939 "id": "ntf_01kp7m2q3r4s5t6v7w8x9y0z1a"
5940 },
5941 "request": {},
5942 "response": {
5943 "id": "ntf_01kp7m2q3r4s5t6v7w8x9y0z1a",
5944 "reason": "review_requested",
5945 "severity": "warning",
5946 "title": "ada asked you to review flagon-io/hello#14",
5947 "body": "Add a greeting to the README",
5948 "event": "pull.review_requested",
5949 "repo": "flagon-io/hello",
5950 "workspace": "flagon-io",
5951 "subject": "pull",
5952 "number": 14,
5953 "url": "/flagon-io/hello/pull/14",
5954 "actor": "ada",
5955 "count": 3,
5956 "created_at": "2026-10-06T15:02:11.000Z",
5957 "updated_at": "2026-10-07T09:41:30.000Z",
5958 "read_at": null,
5959 "done_at": null,
5960 "saved": true,
5961 "snoozed_until": null,
5962 "activity": [
5963 {
5964 "reason": "review_requested",
5965 "severity": "warning",
5966 "title": "ada asked you to review flagon-io/hello#14",
5967 "body": "Add a greeting to the README",
5968 "event": "pull.review_requested",
5969 "actor": "ada",
5970 "created_at": "2026-10-07T09:41:30.000Z"
5971 },
5972 {
5973 "reason": "comment",
5974 "severity": "info",
5975 "title": "ada commented on flagon-io/hello#14",
5976 "body": "Pushed the fix for the heading.",
5977 "event": "comment.created",
5978 "actor": "ada",
5979 "created_at": "2026-10-06T18:20:02.000Z"
5980 },
5981 {
5982 "reason": "comment",
5983 "severity": "info",
5984 "title": "g1t commented on flagon-io/hello#14",
5985 "body": "The heading level is off by one.",
5986 "event": "comment.created",
5987 "actor": "g1t",
5988 "created_at": "2026-10-06T15:02:11.000Z"
5989 }
5990 ],
5991 "subscription": {
5992 "subscribed": true,
5993 "ignored": false,
5994 "reason": "review_requested",
5995 "repo": "flagon-io/hello",
5996 "number": 14,
5997 "updated_at": null
5998 }
5999 }
6000 },
6001 "unsave_thread": {
6002 "params": {
6003 "id": "ntf_01kp7m2q3r4s5t6v7w8x9y0z1a"
6004 },
6005 "response": {
6006 "id": "ntf_01kp7m2q3r4s5t6v7w8x9y0z1a",
6007 "reason": "review_requested",
6008 "severity": "warning",
6009 "title": "ada asked you to review flagon-io/hello#14",
6010 "body": "Add a greeting to the README",
6011 "event": "pull.review_requested",
6012 "repo": "flagon-io/hello",
6013 "workspace": "flagon-io",
6014 "subject": "pull",
6015 "number": 14,
6016 "url": "/flagon-io/hello/pull/14",
6017 "actor": "ada",
6018 "count": 3,
6019 "created_at": "2026-10-06T15:02:11.000Z",
6020 "updated_at": "2026-10-07T09:41:30.000Z",
6021 "read_at": null,
6022 "done_at": null,
6023 "saved": false,
6024 "snoozed_until": null,
6025 "activity": [
6026 {
6027 "reason": "review_requested",
6028 "severity": "warning",
6029 "title": "ada asked you to review flagon-io/hello#14",
6030 "body": "Add a greeting to the README",
6031 "event": "pull.review_requested",
6032 "actor": "ada",
6033 "created_at": "2026-10-07T09:41:30.000Z"
6034 },
6035 {
6036 "reason": "comment",
6037 "severity": "info",
6038 "title": "ada commented on flagon-io/hello#14",
6039 "body": "Pushed the fix for the heading.",
6040 "event": "comment.created",
6041 "actor": "ada",
6042 "created_at": "2026-10-06T18:20:02.000Z"
6043 },
6044 {
6045 "reason": "comment",
6046 "severity": "info",
6047 "title": "g1t commented on flagon-io/hello#14",
6048 "body": "The heading level is off by one.",
6049 "event": "comment.created",
6050 "actor": "g1t",
6051 "created_at": "2026-10-06T15:02:11.000Z"
6052 }
6053 ],
6054 "subscription": {
6055 "subscribed": true,
6056 "ignored": false,
6057 "reason": "review_requested",
6058 "repo": "flagon-io/hello",
6059 "number": 14,
6060 "updated_at": null
6061 }
6062 }
6063 },
6064 "snooze_thread": {
6065 "params": {
6066 "id": "ntf_01kp7m2q3r4s5t6v7w8x9y0z1a"
6067 },
6068 "request": {
6069 "until": "2026-10-08T09:00:00Z"
6070 },
6071 "response": {
6072 "id": "ntf_01kp7m2q3r4s5t6v7w8x9y0z1a",
6073 "reason": "review_requested",
6074 "severity": "warning",
6075 "title": "ada asked you to review flagon-io/hello#14",
6076 "body": "Add a greeting to the README",
6077 "event": "pull.review_requested",
6078 "repo": "flagon-io/hello",
6079 "workspace": "flagon-io",
6080 "subject": "pull",
6081 "number": 14,
6082 "url": "/flagon-io/hello/pull/14",
6083 "actor": "ada",
6084 "count": 3,
6085 "created_at": "2026-10-06T15:02:11.000Z",
6086 "updated_at": "2026-10-07T09:41:30.000Z",
6087 "read_at": "2026-10-07T10:03:00.000Z",
6088 "done_at": null,
6089 "saved": false,
6090 "snoozed_until": "2026-10-08T09:00:00.000Z",
6091 "activity": [
6092 {
6093 "reason": "review_requested",
6094 "severity": "warning",
6095 "title": "ada asked you to review flagon-io/hello#14",
6096 "body": "Add a greeting to the README",
6097 "event": "pull.review_requested",
6098 "actor": "ada",
6099 "created_at": "2026-10-07T09:41:30.000Z"
6100 },
6101 {
6102 "reason": "comment",
6103 "severity": "info",
6104 "title": "ada commented on flagon-io/hello#14",
6105 "body": "Pushed the fix for the heading.",
6106 "event": "comment.created",
6107 "actor": "ada",
6108 "created_at": "2026-10-06T18:20:02.000Z"
6109 },
6110 {
6111 "reason": "comment",
6112 "severity": "info",
6113 "title": "g1t commented on flagon-io/hello#14",
6114 "body": "The heading level is off by one.",
6115 "event": "comment.created",
6116 "actor": "g1t",
6117 "created_at": "2026-10-06T15:02:11.000Z"
6118 }
6119 ],
6120 "subscription": {
6121 "subscribed": true,
6122 "ignored": false,
6123 "reason": "review_requested",
6124 "repo": "flagon-io/hello",
6125 "number": 14,
6126 "updated_at": null
6127 }
6128 }
6129 },
6130 "unsnooze_thread": {
6131 "params": {
6132 "id": "ntf_01kp7m2q3r4s5t6v7w8x9y0z1a"
6133 },
6134 "response": {
6135 "id": "ntf_01kp7m2q3r4s5t6v7w8x9y0z1a",
6136 "reason": "review_requested",
6137 "severity": "warning",
6138 "title": "ada asked you to review flagon-io/hello#14",
6139 "body": "Add a greeting to the README",
6140 "event": "pull.review_requested",
6141 "repo": "flagon-io/hello",
6142 "workspace": "flagon-io",
6143 "subject": "pull",
6144 "number": 14,
6145 "url": "/flagon-io/hello/pull/14",
6146 "actor": "ada",
6147 "count": 3,
6148 "created_at": "2026-10-06T15:02:11.000Z",
6149 "updated_at": "2026-10-07T09:41:30.000Z",
6150 "read_at": "2026-10-07T10:03:00.000Z",
6151 "done_at": null,
6152 "saved": false,
6153 "snoozed_until": null,
6154 "activity": [
6155 {
6156 "reason": "review_requested",
6157 "severity": "warning",
6158 "title": "ada asked you to review flagon-io/hello#14",
6159 "body": "Add a greeting to the README",
6160 "event": "pull.review_requested",
6161 "actor": "ada",
6162 "created_at": "2026-10-07T09:41:30.000Z"
6163 },
6164 {
6165 "reason": "comment",
6166 "severity": "info",
6167 "title": "ada commented on flagon-io/hello#14",
6168 "body": "Pushed the fix for the heading.",
6169 "event": "comment.created",
6170 "actor": "ada",
6171 "created_at": "2026-10-06T18:20:02.000Z"
6172 },
6173 {
6174 "reason": "comment",
6175 "severity": "info",
6176 "title": "g1t commented on flagon-io/hello#14",
6177 "body": "The heading level is off by one.",
6178 "event": "comment.created",
6179 "actor": "g1t",
6180 "created_at": "2026-10-06T15:02:11.000Z"
6181 }
6182 ],
6183 "subscription": {
6184 "subscribed": true,
6185 "ignored": false,
6186 "reason": "review_requested",
6187 "repo": "flagon-io/hello",
6188 "number": 14,
6189 "updated_at": null
6190 }
6191 }
6192 },
6193 "get_thread_subscription": {
6194 "params": {
6195 "id": "ntf_01kp7m2q3r4s5t6v7w8x9y0z1a"
6196 },
6197 "response": {
6198 "subscribed": true,
6199 "ignored": false,
6200 "reason": "review_requested",
6201 "repo": "flagon-io/hello",
6202 "number": 14,
6203 "updated_at": null
6204 }
6205 },
6206 "set_thread_subscription": {
6207 "params": {
6208 "id": "ntf_01kp7m2q3r4s5t6v7w8x9y0z1a"
6209 },
6210 "request": {
6211 "ignored": true
6212 },
6213 "response": {
6214 "subscribed": false,
6215 "ignored": true,
6216 "reason": null,
6217 "repo": "flagon-io/hello",
6218 "number": 14,
6219 "updated_at": "2026-10-07T10:04:00.000Z"
6220 },
6221 "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 |"
6222 },
6223 "delete_thread_subscription": {
6224 "params": {
6225 "id": "ntf_01kp7m2q3r4s5t6v7w8x9y0z1a"
6226 },
6227 "response": {
6228 "subscribed": false,
6229 "ignored": false,
6230 "reason": null,
6231 "repo": "flagon-io/hello",
6232 "number": 14,
6233 "updated_at": "2026-10-07T10:04:00.000Z"
6234 }
6235 },
6236 "get_issue_subscription": {
6237 "params": {
6238 "owner": "flagon-io",
6239 "name": "hello",
6240 "number": 14
6241 },
6242 "response": {
6243 "subscribed": true,
6244 "ignored": false,
6245 "reason": "author",
6246 "repo": null,
6247 "number": 14,
6248 "updated_at": null
6249 }
6250 },
6251 "set_issue_subscription": {
6252 "params": {
6253 "owner": "flagon-io",
6254 "name": "hello",
6255 "number": 14
6256 },
6257 "request": {
6258 "subscribed": true
6259 },
6260 "response": {
6261 "subscribed": true,
6262 "ignored": false,
6263 "reason": "manual",
6264 "repo": null,
6265 "number": 14,
6266 "updated_at": "2026-10-07T10:05:00.000Z"
6267 }
6268 },
6269 "delete_issue_subscription": {
6270 "params": {
6271 "owner": "flagon-io",
6272 "name": "hello",
6273 "number": 14
6274 },
6275 "response": {
6276 "subscribed": false,
6277 "ignored": false,
6278 "reason": null,
6279 "repo": null,
6280 "number": 14,
6281 "updated_at": "2026-10-07T10:05:30.000Z"
6282 }
6283 },
6284 "get_repo_subscription": {
6285 "params": {
6286 "owner": "flagon-io",
6287 "name": "hello"
6288 },
6289 "response": {
6290 "repo": "flagon-io/hello",
6291 "level": "participating",
6292 "events": [],
6293 "subscribed": false,
6294 "ignored": false,
6295 "updated_at": null
6296 }
6297 },
6298 "set_repo_subscription": {
6299 "params": {
6300 "owner": "flagon-io",
6301 "name": "hello"
6302 },
6303 "request": {
6304 "level": "custom",
6305 "events": [
6306 "pulls",
6307 "deployments"
6308 ]
6309 },
6310 "response": {
6311 "repo": "flagon-io/hello",
6312 "level": "custom",
6313 "events": [
6314 "pulls",
6315 "deployments"
6316 ],
6317 "subscribed": true,
6318 "ignored": false,
6319 "updated_at": "2026-10-07T10:06:00.000Z"
6320 },
6321 "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`."
6322 },
6323 "delete_repo_subscription": {
6324 "params": {
6325 "owner": "flagon-io",
6326 "name": "hello"
6327 },
6328 "response": {
6329 "repo": "flagon-io/hello",
6330 "level": "participating",
6331 "events": [],
6332 "subscribed": false,
6333 "ignored": false,
6334 "updated_at": null
6335 }
6336 },
6337 "list_watched_repos": {
6338 "response": [
6339 {
6340 "repo": "flagon-io/hello",
6341 "level": "all",
6342 "events": [],
6343 "subscribed": true,
6344 "ignored": false,
6345 "updated_at": "2026-10-07T10:00:00.000Z"
6346 },
6347 {
6348 "repo": "flagon-io/docs",
6349 "level": "ignore",
6350 "events": [],
6351 "subscribed": false,
6352 "ignored": true,
6353 "updated_at": "2026-10-05T14:30:00.000Z"
6354 }
6355 ]
6356 },
6357 "get_usage": {
6358 "params": {
6359 "workspace": "flagon-io"
6360 },
6361 "query": {
6362 "from": "2026-10-01",
6363 "until": "2026-10-07",
6364 "group_by": "project"
6365 },
6366 "response": {
6367 "from": "2026-10-01",
6368 "until": "2026-10-07",
6369 "totals": {
6370 "price_micros": 48210000,
6371 "discount_micros": 0,
6372 "included_micros": 20000000,
6373 "credits_micros": 18000000,
6374 "charged_micros": 10210000,
6375 "pending_micros": 1340000,
6376 "pending_charged_micros": 1340000,
6377 "cost_micros": 40100000
6378 },
6379 "days": [
6380 {
6381 "day": "2026-10-06",
6382 "product": "other",
6383 "micros": 12400000
6384 },
6385 {
6386 "day": "2026-10-06",
6387 "product": "sandboxes",
6388 "micros": 2100000
6389 },
6390 {
6391 "day": "2026-10-07",
6392 "product": "other",
6393 "micros": 9800000
6394 }
6395 ],
6396 "products": [
6397 {
6398 "key": "sandboxes",
6399 "label": "Sandboxes",
6400 "micros": 7210000,
6401 "meters": [
6402 {
6403 "key": "sandbox",
6404 "label": "Sandbox time",
6405 "product": "sandboxes",
6406 "unit": "seconds",
6407 "quantity": 41300,
6408 "micros": 7210000,
6409 "pending_micros": 0,
6410 "daily": [
6411 900000,
6412 1200000,
6413 800000,
6414 1100000,
6415 0,
6416 2100000,
6417 1110000
6418 ],
6419 "allowance": {
6420 "used": 41300,
6421 "of": 108000,
6422 "unit": "seconds"
6423 },
6424 "by_project": [
6425 {
6426 "project": "flagon-io/g1t",
6427 "micros": 7210000,
6428 "quantity": 41300
6429 }
6430 ]
6431 }
6432 ]
6433 },
6434 {
6435 "key": "other",
6436 "label": "Other",
6437 "micros": 41000000,
6438 "meters": [
6439 {
6440 "key": "other",
6441 "label": "Other",
6442 "product": "other",
6443 "unit": "entries",
6444 "quantity": 23,
6445 "micros": 41000000,
6446 "pending_micros": 0,
6447 "daily": [
6448 3100000,
6449 5200000,
6450 4400000,
6451 6000000,
6452 0,
6453 12400000,
6454 9800000
6455 ],
6456 "allowance": null,
6457 "by_project": [
6458 {
6459 "project": "flagon-io/g1t",
6460 "micros": 36000000,
6461 "quantity": 14
6462 },
6463 {
6464 "project": "flagon-io/hello",
6465 "micros": 5000000,
6466 "quantity": 9
6467 }
6468 ]
6469 }
6470 ]
6471 }
6472 ],
6473 "projects": [
6474 "flagon-io/g1t",
6475 "flagon-io/hello"
6476 ],
6477 "included": {
6478 "used": 20,
6479 "of": 20,
6480 "unit": "dollars"
6481 },
6482 "discount_percent": null,
6483 "ai_credit_micros": 62000000,
6484 "credit_micros": 0,
6485 "trial_micros": null,
6486 "plan": "pro",
6487 "free": false,
6488 "group_by": "project",
6489 "groups": [
6490 {
6491 "key": "flagon-io/g1t",
6492 "micros": 43210000
6493 },
6494 {
6495 "key": "flagon-io/hello",
6496 "micros": 5000000
6497 }
6498 ]
6499 },
6500 "notes": "Every product family with meters is listed, in order, even with nothing used; this example shows two. `other` comes last, and only when it has something: usage on meters g1t no longer has, such as agent runs from before they were retired. `daily` has one amount for each day of the range, oldest first. `projects` and `products` take several values separated by commas: `?products=sandboxes,deployments`. A range of more than 400 days, or one that ends before it starts, is refused with `invalid`."
6501 },
6502 "get_budget": {
6503 "params": {
6504 "workspace": "flagon-io"
6505 },
6506 "response": {
6507 "workspace": "flagon-io",
6508 "amount_micros": 500000000,
6509 "automatic": false,
6510 "spent_micros": 132450000,
6511 "max_amount_micros": 2000000000,
6512 "alerts": [
6513 50,
6514 75,
6515 90,
6516 100
6517 ],
6518 "pause_at_limit": true,
6519 "webhook": "https://ops.example.com/g1t/budget",
6520 "state": "ok",
6521 "message": null
6522 },
6523 "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."
6524 },
6525 "set_budget": {
6526 "params": {
6527 "workspace": "flagon-io"
6528 },
6529 "request": {
6530 "amount_micros": 500000000,
6531 "alerts": [
6532 50,
6533 75,
6534 90,
6535 100
6536 ],
6537 "webhook": "https://ops.example.com/g1t/budget"
6538 },
6539 "response": {
6540 "workspace": "flagon-io",
6541 "amount_micros": 500000000,
6542 "automatic": false,
6543 "spent_micros": 132450000,
6544 "max_amount_micros": 2000000000,
6545 "alerts": [
6546 50,
6547 75,
6548 90,
6549 100
6550 ],
6551 "pause_at_limit": true,
6552 "webhook": "https://ops.example.com/g1t/budget",
6553 "state": "ok",
6554 "message": null
6555 },
6556 "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 a run's token, it is refused with `forbidden`. Each alert is sent once a month, to the owners by email and, with `webhook`, as a JSON POST."
6557 },
6558 "list_invoices": {
6559 "params": {
6560 "workspace": "flagon-io"
6561 },
6562 "response": {
6563 "invoices": [
6564 {
6565 "id": "in_1Q2w3E4r5T6y7U8i",
6566 "number": "FLAGON-0004",
6567 "status": "paid",
6568 "total_cents": 4210,
6569 "currency": "usd",
6570 "created_at": "2026-10-01T00:05:00.000Z",
6571 "description": "Usage for 2026-09",
6572 "hosted_url": "https://invoice.example.com/i/acct_1/in_1Q2w3E4r5T6y7U8i",
6573 "pdf_url": "https://invoice.example.com/i/acct_1/in_1Q2w3E4r5T6y7U8i/pdf"
6574 }
6575 ],
6576 "usage_invoices": [
6577 {
6578 "id": "inv_01kkqz8d3c6f9t2wq5n8h1m4r7",
6579 "workspace": "flagon-io",
6580 "reason": "month",
6581 "period": "2026-09",
6582 "amount_micros": 42100000,
6583 "status": "paid",
6584 "hosted_url": "https://invoice.example.com/i/acct_1/in_1Q2w3E4r5T6y7U8i",
6585 "pdf_url": "https://invoice.example.com/i/acct_1/in_1Q2w3E4r5T6y7U8i/pdf",
6586 "lines": [
6587 {
6588 "description": "Agent: models",
6589 "amount_micros": 35900000
6590 },
6591 {
6592 "description": "Sandbox time",
6593 "amount_micros": 6200000
6594 }
6595 ],
6596 "created_at": "2026-10-01T00:05:00.000Z"
6597 },
6598 {
6599 "id": "inv_01kkqz8d3c6f9t2wq5n8h1m4r7",
6600 "workspace": "flagon-io",
6601 "reason": "month",
6602 "period": "2026-09",
6603 "amount_micros": 42100000,
6604 "status": "paid",
6605 "hosted_url": "https://invoice.example.com/i/acct_1/in_1Q2w3E4r5T6y7U8i",
6606 "pdf_url": "https://invoice.example.com/i/acct_1/in_1Q2w3E4r5T6y7U8i/pdf",
6607 "lines": [
6608 {
6609 "description": "Agent: models",
6610 "amount_micros": 35900000
6611 },
6612 {
6613 "description": "Sandbox time",
6614 "amount_micros": 6200000
6615 }
6616 ],
6617 "created_at": "2026-10-01T00:05:00.000Z",
6618 "fee_micros": 1600000,
6619 "tax_micros": 3510000
6620 }
6621 ],
6622 "upcoming": {
6623 "closes_at": "2026-11-01T00:00:00.000Z",
6624 "subscriptions_micros": 20000000,
6625 "usage_micros": 10210000,
6626 "total_micros": 30210000
6627 },
6628 "unavailable": null
6629 },
6630 "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`."
6631 },
6632 "get_billing_details": {
6633 "params": {
6634 "workspace": "flagon-io"
6635 },
6636 "response": {
6637 "customer": true,
6638 "email": "billing@flagon.example.com",
6639 "name": "Flagon, Inc.",
6640 "address": {
6641 "line1": "100 Market Street",
6642 "line2": "",
6643 "city": "San Francisco",
6644 "state": "CA",
6645 "postal_code": "94105",
6646 "country": "US"
6647 },
6648 "tax_id_type": "us_ein",
6649 "tax_id": "12-3456789",
6650 "po_number": null,
6651 "language": "en",
6652 "payment_method": {
6653 "kind": "card",
6654 "brand": "visa",
6655 "last4": "4242",
6656 "exp_month": 12,
6657 "exp_year": 2028
6658 },
6659 "tax_location": true,
6660 "tax_address_needed_at": null,
6661 "tax_id_status": "unavailable",
6662 "tax_exempt": "none"
6663 },
6664 "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."
6665 },
6666 "list_pinned_projects": {
6667 "params": {
6668 "workspace": "flagon-io"
6669 },
6670 "response": [
6671 {
6672 "position": 0,
6673 "id": "prj_01kkp3m8w2f6t9qh4c7d1r5n0x",
6674 "workspace": "flagon-io",
6675 "slug": "g1t",
6676 "name": "g1t",
6677 "description": null,
6678 "private": false,
6679 "archived": false,
6680 "kind": "app",
6681 "url": "https://g1t.sh/flagon-io/g1t",
6682 "pushed_at": "2026-10-07T10:00:00.000Z",
6683 "updated_at": "2026-10-01T09:12:00.000Z"
6684 },
6685 {
6686 "position": 1,
6687 "id": "prj_01kkq0c4d9h2w7rn5f8t3k6p2z",
6688 "workspace": "flagon-io",
6689 "slug": "lab-api",
6690 "name": "lab-api",
6691 "description": null,
6692 "private": true,
6693 "archived": false,
6694 "kind": "app",
6695 "url": "https://g1t.sh/flagon-io/lab-api",
6696 "pushed_at": "2026-10-06T18:40:00.000Z",
6697 "updated_at": "2026-10-01T09:12:00.000Z"
6698 },
6699 {
6700 "position": 2,
6701 "id": "prj_01kkp3n2a7e5v8sk3b6g9j4m1y",
6702 "workspace": "flagon-io",
6703 "slug": "hello",
6704 "name": "hello",
6705 "description": "Greets people from the command line.",
6706 "private": false,
6707 "archived": false,
6708 "kind": "library",
6709 "url": "https://g1t.sh/flagon-io/hello",
6710 "pushed_at": null,
6711 "updated_at": "2026-10-01T09:12:00.000Z"
6712 }
6713 ],
6714 "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."
6715 },
6716 "pin_project": {
6717 "params": {
6718 "workspace": "flagon-io",
6719 "project": "hello"
6720 },
6721 "request": {
6722 "position": 0
6723 },
6724 "response": [
6725 {
6726 "position": 0,
6727 "id": "prj_01kkp3n2a7e5v8sk3b6g9j4m1y",
6728 "workspace": "flagon-io",
6729 "slug": "hello",
6730 "name": "hello",
6731 "description": "Greets people from the command line.",
6732 "private": false,
6733 "archived": false,
6734 "kind": "library",
6735 "url": "https://g1t.sh/flagon-io/hello",
6736 "pushed_at": null,
6737 "updated_at": "2026-10-01T09:12:00.000Z"
6738 },
6739 {
6740 "position": 1,
6741 "id": "prj_01kkp3m8w2f6t9qh4c7d1r5n0x",
6742 "workspace": "flagon-io",
6743 "slug": "g1t",
6744 "name": "g1t",
6745 "description": null,
6746 "private": false,
6747 "archived": false,
6748 "kind": "app",
6749 "url": "https://g1t.sh/flagon-io/g1t",
6750 "pushed_at": "2026-10-07T10:00:00.000Z",
6751 "updated_at": "2026-10-01T09:12:00.000Z"
6752 },
6753 {
6754 "position": 2,
6755 "id": "prj_01kkq0c4d9h2w7rn5f8t3k6p2z",
6756 "workspace": "flagon-io",
6757 "slug": "lab-api",
6758 "name": "lab-api",
6759 "description": null,
6760 "private": true,
6761 "archived": false,
6762 "kind": "app",
6763 "url": "https://g1t.sh/flagon-io/lab-api",
6764 "pushed_at": "2026-10-06T18:40:00.000Z",
6765 "updated_at": "2026-10-01T09:12:00.000Z"
6766 }
6767 ],
6768 "notes": "A ninth pin in a workspace is refused with `409 conflict`: unpin one first."
6769 },
6770 "unpin_project": {
6771 "params": {
6772 "workspace": "flagon-io",
6773 "project": "lab-api"
6774 },
6775 "response": [
6776 {
6777 "position": 0,
6778 "id": "prj_01kkp3m8w2f6t9qh4c7d1r5n0x",
6779 "workspace": "flagon-io",
6780 "slug": "g1t",
6781 "name": "g1t",
6782 "description": null,
6783 "private": false,
6784 "archived": false,
6785 "kind": "app",
6786 "url": "https://g1t.sh/flagon-io/g1t",
6787 "pushed_at": "2026-10-07T10:00:00.000Z",
6788 "updated_at": "2026-10-01T09:12:00.000Z"
6789 },
6790 {
6791 "position": 1,
6792 "id": "prj_01kkp3n2a7e5v8sk3b6g9j4m1y",
6793 "workspace": "flagon-io",
6794 "slug": "hello",
6795 "name": "hello",
6796 "description": "Greets people from the command line.",
6797 "private": false,
6798 "archived": false,
6799 "kind": "library",
6800 "url": "https://g1t.sh/flagon-io/hello",
6801 "pushed_at": null,
6802 "updated_at": "2026-10-01T09:12:00.000Z"
6803 }
6804 ]
6805 },
6806 "reorder_pinned_projects": {
6807 "params": {
6808 "workspace": "flagon-io"
6809 },
6810 "request": {
6811 "projects": [
6812 "lab-api",
6813 "g1t",
6814 "hello"
6815 ]
6816 },
6817 "response": [
6818 {
6819 "position": 0,
6820 "id": "prj_01kkq0c4d9h2w7rn5f8t3k6p2z",
6821 "workspace": "flagon-io",
6822 "slug": "lab-api",
6823 "name": "lab-api",
6824 "description": null,
6825 "private": true,
6826 "archived": false,
6827 "kind": "app",
6828 "url": "https://g1t.sh/flagon-io/lab-api",
6829 "pushed_at": "2026-10-06T18:40:00.000Z",
6830 "updated_at": "2026-10-01T09:12:00.000Z"
6831 },
6832 {
6833 "position": 1,
6834 "id": "prj_01kkp3m8w2f6t9qh4c7d1r5n0x",
6835 "workspace": "flagon-io",
6836 "slug": "g1t",
6837 "name": "g1t",
6838 "description": null,
6839 "private": false,
6840 "archived": false,
6841 "kind": "app",
6842 "url": "https://g1t.sh/flagon-io/g1t",
6843 "pushed_at": "2026-10-07T10:00:00.000Z",
6844 "updated_at": "2026-10-01T09:12:00.000Z"
6845 },
6846 {
6847 "position": 2,
6848 "id": "prj_01kkp3n2a7e5v8sk3b6g9j4m1y",
6849 "workspace": "flagon-io",
6850 "slug": "hello",
6851 "name": "hello",
6852 "description": "Greets people from the command line.",
6853 "private": false,
6854 "archived": false,
6855 "kind": "library",
6856 "url": "https://g1t.sh/flagon-io/hello",
6857 "pushed_at": null,
6858 "updated_at": "2026-10-01T09:12:00.000Z"
6859 }
6860 ],
6861 "notes": "Name every pinned project once; anything else is refused with `422 invalid`."
6862 },
6863 "list_projects": {
6864 "params": {
6865 "workspace": "flagon-io"
6866 },
6867 "response": [
6868 {
6869 "id": "prj_01kkp3m8w2f6t9qh4c7d1r5n0x",
6870 "workspace": "flagon-io",
6871 "slug": "g1t",
6872 "name": "g1t",
6873 "description": "Git hosting where people and agents work together.",
6874 "description_inherited": true,
6875 "url": "https://g1t.sh/flagon-io/g1t",
6876 "repository": "flagon-io/g1t",
6877 "root_dir": "",
6878 "default_branch": "main",
6879 "private": false,
6880 "archived": false,
6881 "primary": true,
6882 "kind": "app",
6883 "kind_reason": {
6884 "by": "set",
6885 "detail": "Set to an app that runs elsewhere."
6886 },
6887 "runs": "elsewhere",
6888 "production_url": "https://g1t.sh",
6889 "setting": {
6890 "kind": "app",
6891 "runs": "elsewhere"
6892 },
6893 "detected": {
6894 "kind": "app",
6895 "reason": {
6896 "by": "files",
6897 "detail": "wrangler.jsonc at its root makes it an app."
6898 }
6899 },
6900 "ecosystem": null,
6901 "links": {
6902 "homepage": "https://g1t.sh",
6903 "homepage_inherited": true,
6904 "docs": "https://docs.g1t.sh",
6905 "custom": [
6906 {
6907 "label": "Status",
6908 "url": "https://status.g1t.sh"
6909 }
6910 ]
6911 },
6912 "created_at": "2026-09-01T10:00:00.000Z",
6913 "updated_at": "2026-10-07T11:20:00.000Z",
6914 "pushed_at": "2026-10-07T10:00:00.000Z"
6915 },
6916 {
6917 "id": "prj_01kkp3n2a7e5v8sk3b6g9j4m1y",
6918 "workspace": "flagon-io",
6919 "slug": "hello",
6920 "name": "hello",
6921 "description": "Greets people from the command line.",
6922 "description_inherited": false,
6923 "url": "https://g1t.sh/flagon-io/hello",
6924 "repository": "flagon-io/hello",
6925 "root_dir": "",
6926 "default_branch": "main",
6927 "private": false,
6928 "archived": false,
6929 "primary": true,
6930 "kind": "library",
6931 "kind_reason": {
6932 "by": "files",
6933 "detail": "composer.json says it is a library."
6934 },
6935 "runs": null,
6936 "production_url": null,
6937 "setting": {
6938 "kind": null,
6939 "runs": null
6940 },
6941 "detected": {
6942 "kind": "library",
6943 "reason": {
6944 "by": "files",
6945 "detail": "composer.json says it is a library."
6946 }
6947 },
6948 "ecosystem": "composer",
6949 "links": {
6950 "homepage": null,
6951 "homepage_inherited": false,
6952 "docs": null,
6953 "custom": []
6954 },
6955 "created_at": "2026-09-12T14:30:00.000Z",
6956 "updated_at": "2026-10-01T09:12:00.000Z",
6957 "pushed_at": null
6958 }
6959 ],
6960 "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/)."
6961 },
6962 "get_project": {
6963 "params": {
6964 "workspace": "flagon-io",
6965 "project": "g1t"
6966 },
6967 "response": {
6968 "id": "prj_01kkp3m8w2f6t9qh4c7d1r5n0x",
6969 "workspace": "flagon-io",
6970 "slug": "g1t",
6971 "name": "g1t",
6972 "description": "Git hosting where people and agents work together.",
6973 "description_inherited": true,
6974 "url": "https://g1t.sh/flagon-io/g1t",
6975 "repository": "flagon-io/g1t",
6976 "root_dir": "",
6977 "default_branch": "main",
6978 "private": false,
6979 "archived": false,
6980 "primary": true,
6981 "kind": "app",
6982 "kind_reason": {
6983 "by": "set",
6984 "detail": "Set to an app that runs elsewhere."
6985 },
6986 "runs": "elsewhere",
6987 "production_url": "https://g1t.sh",
6988 "setting": {
6989 "kind": "app",
6990 "runs": "elsewhere"
6991 },
6992 "detected": {
6993 "kind": "app",
6994 "reason": {
6995 "by": "files",
6996 "detail": "wrangler.jsonc at its root makes it an app."
6997 }
6998 },
6999 "ecosystem": null,
7000 "links": {
7001 "homepage": "https://g1t.sh",
7002 "homepage_inherited": true,
7003 "docs": "https://docs.g1t.sh",
7004 "custom": [
7005 {
7006 "label": "Status",
7007 "url": "https://status.g1t.sh"
7008 }
7009 ]
7010 },
7011 "created_at": "2026-09-01T10:00:00.000Z",
7012 "updated_at": "2026-10-07T11:20:00.000Z",
7013 "pushed_at": "2026-10-07T10:00:00.000Z"
7014 },
7015 "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)."
7016 },
7017 "update_project": {
7018 "params": {
7019 "workspace": "flagon-io",
7020 "project": "g1t"
7021 },
7022 "request": {
7023 "kind": "app",
7024 "runs": "elsewhere",
7025 "production_url": "https://g1t.sh",
7026 "docs_url": "https://docs.g1t.sh",
7027 "links": [
7028 {
7029 "label": "Status",
7030 "url": "https://status.g1t.sh"
7031 }
7032 ]
7033 },
7034 "response": {
7035 "id": "prj_01kkp3m8w2f6t9qh4c7d1r5n0x",
7036 "workspace": "flagon-io",
7037 "slug": "g1t",
7038 "name": "g1t",
7039 "description": "Git hosting where people and agents work together.",
7040 "description_inherited": true,
7041 "url": "https://g1t.sh/flagon-io/g1t",
7042 "repository": "flagon-io/g1t",
7043 "root_dir": "",
7044 "default_branch": "main",
7045 "private": false,
7046 "archived": false,
7047 "primary": true,
7048 "kind": "app",
7049 "kind_reason": {
7050 "by": "set",
7051 "detail": "Set to an app that runs elsewhere."
7052 },
7053 "runs": "elsewhere",
7054 "production_url": "https://g1t.sh",
7055 "setting": {
7056 "kind": "app",
7057 "runs": "elsewhere"
7058 },
7059 "detected": {
7060 "kind": "app",
7061 "reason": {
7062 "by": "files",
7063 "detail": "wrangler.jsonc at its root makes it an app."
7064 }
7065 },
7066 "ecosystem": null,
7067 "links": {
7068 "homepage": "https://g1t.sh",
7069 "homepage_inherited": true,
7070 "docs": "https://docs.g1t.sh",
7071 "custom": [
7072 {
7073 "label": "Status",
7074 "url": "https://status.g1t.sh"
7075 }
7076 ]
7077 },
7078 "created_at": "2026-09-01T10:00:00.000Z",
7079 "updated_at": "2026-10-07T11:20:00.000Z",
7080 "pushed_at": "2026-10-07T10:00:00.000Z"
7081 },
7082 "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)."
7083 },
7084 "list_secret_scanning_alerts": {
7085 "params": {
7086 "owner": "flagon-io",
7087 "name": "hello"
7088 },
7089 "query": {
7090 "state": "open"
7091 },
7092 "response": [
7093 {
7094 "id": "sec_01kq2m7d4e5f6g7h8j9k0m1n2p",
7095 "repo_id": "rep_01kp0a1b2c3d4e5f6g7h8j9k0m",
7096 "kind": "github_token",
7097 "label": "a GitHub token",
7098 "path": "scripts/release.sh",
7099 "line": 12,
7100 "commit": "4807077b296e6edbf410d55e72749d3e1170c291",
7101 "preview": "ghp_X7…",
7102 "status": "open",
7103 "source": "push",
7104 "found_by": "syntaqx",
7105 "found_at": "2026-10-06T09:14:02.118Z",
7106 "decided_by": null,
7107 "reason": null,
7108 "decided_at": null,
7109 "dismissed_reason": null,
7110 "test_value": null,
7111 "state": "open",
7112 "validity": "active",
7113 "validity_checked_at": "2026-10-06T09:20:41.502Z",
7114 "bypass": {
7115 "reason": "will_fix_later",
7116 "comment": "Rotating it this afternoon.",
7117 "by": "syntaqx",
7118 "at": "2026-10-06T09:14:02.118Z",
7119 "approved_by": null
7120 },
7121 "pattern_id": null,
7122 "pattern_name": null,
7123 "locations": 1
7124 }
7125 ],
7126 "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`."
7127 },
7128 "list_secret_scanning_alerts_for_workspace": {
7129 "params": {
7130 "workspace": "flagon-io"
7131 },
7132 "query": {
7133 "state": "open"
7134 },
7135 "response": [
7136 {
7137 "repo": "hello",
7138 "secret": {
7139 "id": "sec_01kq2m7d4e5f6g7h8j9k0m1n2p",
7140 "repo_id": "rep_01kp0a1b2c3d4e5f6g7h8j9k0m",
7141 "kind": "github_token",
7142 "label": "a GitHub token",
7143 "path": "scripts/release.sh",
7144 "line": 12,
7145 "commit": "4807077b296e6edbf410d55e72749d3e1170c291",
7146 "preview": "ghp_X7…",
7147 "status": "open",
7148 "source": "push",
7149 "found_by": "syntaqx",
7150 "found_at": "2026-10-06T09:14:02.118Z",
7151 "decided_by": null,
7152 "reason": null,
7153 "decided_at": null,
7154 "dismissed_reason": null,
7155 "test_value": null,
7156 "state": "open",
7157 "validity": "active",
7158 "validity_checked_at": "2026-10-06T09:20:41.502Z",
7159 "bypass": {
7160 "reason": "will_fix_later",
7161 "comment": "Rotating it this afternoon.",
7162 "by": "syntaqx",
7163 "at": "2026-10-06T09:14:02.118Z",
7164 "approved_by": null
7165 },
7166 "pattern_id": null,
7167 "pattern_name": null,
7168 "locations": 1
7169 }
7170 }
7171 ],
7172 "notes": "Every repository whose findings you may see, each alert with its repository's name."
7173 },
7174 "get_secret_scanning_alert": {
7175 "params": {
7176 "owner": "flagon-io",
7177 "name": "hello",
7178 "id": "sec_01kq2m7d4e5f6g7h8j9k0m1n2p"
7179 },
7180 "response": {
7181 "secret": {
7182 "id": "sec_01kq2m7d4e5f6g7h8j9k0m1n2p",
7183 "repo_id": "rep_01kp0a1b2c3d4e5f6g7h8j9k0m",
7184 "kind": "github_token",
7185 "label": "a GitHub token",
7186 "path": "scripts/release.sh",
7187 "line": 12,
7188 "commit": "4807077b296e6edbf410d55e72749d3e1170c291",
7189 "preview": "ghp_X7…",
7190 "status": "blocked",
7191 "source": "push",
7192 "found_by": "syntaqx",
7193 "found_at": "2026-10-06T09:14:02.118Z",
7194 "decided_by": null,
7195 "reason": null,
7196 "decided_at": null,
7197 "dismissed_reason": null,
7198 "test_value": null,
7199 "state": "open",
7200 "validity": null,
7201 "validity_checked_at": null,
7202 "bypass": null,
7203 "pattern_id": null,
7204 "pattern_name": null,
7205 "locations": 1
7206 },
7207 "locations": [
7208 {
7209 "path": "scripts/release.sh",
7210 "line": 12,
7211 "commit": "4807077b296e6edbf410d55e72749d3e1170c291",
7212 "source": "push",
7213 "found_at": "2026-10-06T09:14:02.118Z"
7214 }
7215 ],
7216 "activity": [],
7217 "requests": [],
7218 "checkable": true,
7219 "can_bypass": true,
7220 "can_request_bypass": false
7221 }
7222 },
7223 "update_secret_scanning_alert": {
7224 "params": {
7225 "owner": "flagon-io",
7226 "name": "hello",
7227 "id": "sec_01kq2m7d4e5f6g7h8j9k0m1n2p"
7228 },
7229 "request": {
7230 "state": "dismissed",
7231 "reason": "revoked",
7232 "comment": "Rotated in the issuer's settings."
7233 },
7234 "response": {
7235 "id": "sec_01kq2m7d4e5f6g7h8j9k0m1n2p",
7236 "repo_id": "rep_01kp0a1b2c3d4e5f6g7h8j9k0m",
7237 "kind": "github_token",
7238 "label": "a GitHub token",
7239 "path": "scripts/release.sh",
7240 "line": 12,
7241 "commit": "4807077b296e6edbf410d55e72749d3e1170c291",
7242 "preview": "ghp_X7…",
7243 "status": "resolved",
7244 "source": "push",
7245 "found_by": "syntaqx",
7246 "found_at": "2026-10-06T09:14:02.118Z",
7247 "decided_by": "syntaqx",
7248 "reason": "Rotated in the issuer's settings.",
7249 "decided_at": "2026-10-06T09:20:41.502Z",
7250 "dismissed_reason": "revoked",
7251 "test_value": null,
7252 "state": "fixed",
7253 "validity": "active",
7254 "validity_checked_at": "2026-10-06T09:20:41.502Z",
7255 "bypass": {
7256 "reason": "will_fix_later",
7257 "comment": "Rotating it this afternoon.",
7258 "by": "syntaqx",
7259 "at": "2026-10-06T09:14:02.118Z",
7260 "approved_by": null
7261 },
7262 "pattern_id": null,
7263 "pattern_name": null,
7264 "locations": 1
7265 },
7266 "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."
7267 },
7268 "list_secret_scanning_locations": {
7269 "params": {
7270 "owner": "flagon-io",
7271 "name": "hello",
7272 "id": "sec_01kq2m7d4e5f6g7h8j9k0m1n2p"
7273 },
7274 "response": [
7275 {
7276 "path": "scripts/release.sh",
7277 "line": 12,
7278 "commit": "4807077b296e6edbf410d55e72749d3e1170c291",
7279 "source": "push",
7280 "found_at": "2026-10-06T09:14:02.118Z"
7281 }
7282 ]
7283 },
7284 "bypass_push_protection": {
7285 "params": {
7286 "owner": "flagon-io",
7287 "name": "hello",
7288 "id": "sec_01kq2m7d4e5f6g7h8j9k0m1n2p"
7289 },
7290 "request": {
7291 "reason": "will_fix_later",
7292 "comment": "Rotating it this afternoon."
7293 },
7294 "response": {
7295 "secret": {
7296 "id": "sec_01kq2m7d4e5f6g7h8j9k0m1n2p",
7297 "repo_id": "rep_01kp0a1b2c3d4e5f6g7h8j9k0m",
7298 "kind": "github_token",
7299 "label": "a GitHub token",
7300 "path": "scripts/release.sh",
7301 "line": 12,
7302 "commit": "4807077b296e6edbf410d55e72749d3e1170c291",
7303 "preview": "ghp_X7…",
7304 "status": "open",
7305 "source": "push",
7306 "found_by": "syntaqx",
7307 "found_at": "2026-10-06T09:14:02.118Z",
7308 "decided_by": null,
7309 "reason": null,
7310 "decided_at": null,
7311 "dismissed_reason": null,
7312 "test_value": null,
7313 "state": "open",
7314 "validity": null,
7315 "validity_checked_at": null,
7316 "bypass": {
7317 "reason": "will_fix_later",
7318 "comment": "Rotating it this afternoon.",
7319 "by": "syntaqx",
7320 "at": "2026-10-06T09:14:02.118Z",
7321 "approved_by": null
7322 },
7323 "pattern_id": null,
7324 "pattern_name": null,
7325 "locations": 1
7326 },
7327 "request": null
7328 },
7329 "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."
7330 },
7331 "check_secret_validity": {
7332 "params": {
7333 "owner": "flagon-io",
7334 "name": "hello",
7335 "id": "sec_01kq2m7d4e5f6g7h8j9k0m1n2p"
7336 },
7337 "response": {
7338 "id": "sec_01kq2m7d4e5f6g7h8j9k0m1n2p",
7339 "repo_id": "rep_01kp0a1b2c3d4e5f6g7h8j9k0m",
7340 "kind": "github_token",
7341 "label": "a GitHub token",
7342 "path": "scripts/release.sh",
7343 "line": 12,
7344 "commit": "4807077b296e6edbf410d55e72749d3e1170c291",
7345 "preview": "ghp_X7…",
7346 "status": "open",
7347 "source": "push",
7348 "found_by": "syntaqx",
7349 "found_at": "2026-10-06T09:14:02.118Z",
7350 "decided_by": null,
7351 "reason": null,
7352 "decided_at": null,
7353 "dismissed_reason": null,
7354 "test_value": null,
7355 "state": "open",
7356 "validity": "active",
7357 "validity_checked_at": "2026-10-06T09:20:41.502Z",
7358 "bypass": {
7359 "reason": "will_fix_later",
7360 "comment": "Rotating it this afternoon.",
7361 "by": "syntaqx",
7362 "at": "2026-10-06T09:14:02.118Z",
7363 "approved_by": null
7364 },
7365 "pattern_id": null,
7366 "pattern_name": null,
7367 "locations": 1
7368 },
7369 "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`."
7370 },
7371 "list_bypass_requests": {
7372 "params": {
7373 "workspace": "flagon-io"
7374 },
7375 "query": {
7376 "state": "pending"
7377 },
7378 "response": [
7379 {
7380 "id": "byp_01kq2n8e5f6g7h8j9k0m1n2p3q",
7381 "repo_id": "rep_01kp0a1b2c3d4e5f6g7h8j9k0m",
7382 "workspace": "flagon-io",
7383 "repo": "hello",
7384 "secret_id": "sec_01kq2m7d4e5f6g7h8j9k0m1n2p",
7385 "label": "a GitHub token",
7386 "path": "scripts/release.sh",
7387 "line": 12,
7388 "preview": "ghp_X7…",
7389 "requester": "ana",
7390 "reason": "used_in_tests",
7391 "comment": "A token from the test fixtures, never issued.",
7392 "state": "pending",
7393 "reviewer": null,
7394 "review_comment": null,
7395 "created_at": "2026-10-06T09:14:02.118Z",
7396 "reviewed_at": null
7397 }
7398 ]
7399 },
7400 "review_bypass_request": {
7401 "params": {
7402 "workspace": "flagon-io",
7403 "id": "byp_01kq2n8e5f6g7h8j9k0m1n2p3q"
7404 },
7405 "request": {
7406 "decision": "approve",
7407 "comment": "A fixture."
7408 },
7409 "response": {
7410 "id": "byp_01kq2n8e5f6g7h8j9k0m1n2p3q",
7411 "repo_id": "rep_01kp0a1b2c3d4e5f6g7h8j9k0m",
7412 "workspace": "flagon-io",
7413 "repo": "hello",
7414 "secret_id": "sec_01kq2m7d4e5f6g7h8j9k0m1n2p",
7415 "label": "a GitHub token",
7416 "path": "scripts/release.sh",
7417 "line": 12,
7418 "preview": "ghp_X7…",
7419 "requester": "ana",
7420 "reason": "used_in_tests",
7421 "comment": "A token from the test fixtures, never issued.",
7422 "state": "approved",
7423 "reviewer": "syntaqx",
7424 "review_comment": "A fixture.",
7425 "created_at": "2026-10-06T09:14:02.118Z",
7426 "reviewed_at": "2026-10-06T09:20:41.502Z"
7427 }
7428 },
7429 "list_custom_patterns": {
7430 "params": {
7431 "owner": "flagon-io",
7432 "name": "hello"
7433 },
7434 "response": {
7435 "patterns": [
7436 {
7437 "id": "pat_01kq2p9f6g7h8j9k0m1n2p3q4r",
7438 "scope": "repository",
7439 "workspace": "flagon-io",
7440 "repo": "hello",
7441 "name": "Acme API key",
7442 "pattern": "acme_[a-z0-9]{32}",
7443 "before": null,
7444 "after": null,
7445 "test_strings": [
7446 "ACME_KEY=acme_0123456789abcdef0123456789abcdef"
7447 ],
7448 "state": "published",
7449 "created_by": "syntaqx",
7450 "created_at": "2026-10-06T09:14:02.118Z",
7451 "updated_by": "syntaqx",
7452 "updated_at": "2026-10-06T09:14:02.118Z",
7453 "open_alerts": 0
7454 }
7455 ],
7456 "entitled": true
7457 },
7458 "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 when the workspace is on the g1t plan."
7459 },
7460 "list_custom_patterns_for_workspace": {
7461 "params": {
7462 "workspace": "flagon-io"
7463 },
7464 "response": {
7465 "patterns": [
7466 {
7467 "id": "pat_01kq2p9f6g7h8j9k0m1n2p3q4r",
7468 "scope": "workspace",
7469 "workspace": "flagon-io",
7470 "repo": null,
7471 "name": "Acme API key",
7472 "pattern": "acme_[a-z0-9]{32}",
7473 "before": null,
7474 "after": null,
7475 "test_strings": [
7476 "ACME_KEY=acme_0123456789abcdef0123456789abcdef"
7477 ],
7478 "state": "published",
7479 "created_by": "syntaqx",
7480 "created_at": "2026-10-06T09:14:02.118Z",
7481 "updated_by": "syntaqx",
7482 "updated_at": "2026-10-06T09:14:02.118Z",
7483 "open_alerts": 0
7484 }
7485 ],
7486 "entitled": true
7487 }
7488 },
7489 "create_custom_pattern": {
7490 "params": {
7491 "owner": "flagon-io",
7492 "name": "hello"
7493 },
7494 "request": {
7495 "pattern_name": "Acme API key",
7496 "pattern": "acme_[a-z0-9]{32}",
7497 "test_strings": [
7498 "ACME_KEY=acme_0123456789abcdef0123456789abcdef"
7499 ],
7500 "publish": true
7501 },
7502 "response": {
7503 "pattern": {
7504 "id": "pat_01kq2p9f6g7h8j9k0m1n2p3q4r",
7505 "scope": "repository",
7506 "workspace": "flagon-io",
7507 "repo": "hello",
7508 "name": "Acme API key",
7509 "pattern": "acme_[a-z0-9]{32}",
7510 "before": null,
7511 "after": null,
7512 "test_strings": [
7513 "ACME_KEY=acme_0123456789abcdef0123456789abcdef"
7514 ],
7515 "state": "published",
7516 "created_by": "syntaqx",
7517 "created_at": "2026-10-06T09:14:02.118Z",
7518 "updated_by": "syntaqx",
7519 "updated_at": "2026-10-06T09:14:02.118Z",
7520 "open_alerts": 0
7521 },
7522 "tests": [
7523 [
7524 9,
7525 46
7526 ]
7527 ]
7528 },
7529 "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."
7530 },
7531 "create_custom_pattern_for_workspace": {
7532 "params": {
7533 "workspace": "flagon-io"
7534 },
7535 "request": {
7536 "pattern_name": "Acme API key",
7537 "pattern": "acme_[a-z0-9]{32}",
7538 "publish": false
7539 },
7540 "response": {
7541 "pattern": {
7542 "id": "pat_01kq2p9f6g7h8j9k0m1n2p3q4r",
7543 "scope": "workspace",
7544 "workspace": "flagon-io",
7545 "repo": null,
7546 "name": "Acme API key",
7547 "pattern": "acme_[a-z0-9]{32}",
7548 "before": null,
7549 "after": null,
7550 "test_strings": [],
7551 "state": "draft",
7552 "created_by": "syntaqx",
7553 "created_at": "2026-10-06T09:14:02.118Z",
7554 "updated_by": "syntaqx",
7555 "updated_at": "2026-10-06T09:14:02.118Z",
7556 "open_alerts": 0
7557 },
7558 "tests": []
7559 }
7560 },
7561 "update_custom_pattern": {
7562 "params": {
7563 "owner": "flagon-io",
7564 "name": "hello",
7565 "id": "pat_01kq2p9f6g7h8j9k0m1n2p3q4r"
7566 },
7567 "request": {
7568 "pattern_name": "Acme API key",
7569 "pattern": "acme_[a-z0-9]{32,40}",
7570 "publish": true
7571 },
7572 "response": {
7573 "pattern": {
7574 "id": "pat_01kq2p9f6g7h8j9k0m1n2p3q4r",
7575 "scope": "repository",
7576 "workspace": "flagon-io",
7577 "repo": "hello",
7578 "name": "Acme API key",
7579 "pattern": "acme_[a-z0-9]{32,40}",
7580 "before": null,
7581 "after": null,
7582 "test_strings": [
7583 "ACME_KEY=acme_0123456789abcdef0123456789abcdef"
7584 ],
7585 "state": "published",
7586 "created_by": "syntaqx",
7587 "created_at": "2026-10-06T09:14:02.118Z",
7588 "updated_by": "syntaqx",
7589 "updated_at": "2026-10-06T09:14:02.118Z",
7590 "open_alerts": 0
7591 },
7592 "tests": [
7593 [
7594 9,
7595 46
7596 ]
7597 ]
7598 }
7599 },
7600 "update_custom_pattern_for_workspace": {
7601 "params": {
7602 "workspace": "flagon-io",
7603 "id": "pat_01kq2p9f6g7h8j9k0m1n2p3q4r"
7604 },
7605 "request": {
7606 "pattern_name": "Acme API key",
7607 "pattern": "acme_[a-z0-9]{32}",
7608 "publish": true
7609 },
7610 "response": {
7611 "pattern": {
7612 "id": "pat_01kq2p9f6g7h8j9k0m1n2p3q4r",
7613 "scope": "workspace",
7614 "workspace": "flagon-io",
7615 "repo": null,
7616 "name": "Acme API key",
7617 "pattern": "acme_[a-z0-9]{32}",
7618 "before": null,
7619 "after": null,
7620 "test_strings": [
7621 "ACME_KEY=acme_0123456789abcdef0123456789abcdef"
7622 ],
7623 "state": "published",
7624 "created_by": "syntaqx",
7625 "created_at": "2026-10-06T09:14:02.118Z",
7626 "updated_by": "syntaqx",
7627 "updated_at": "2026-10-06T09:14:02.118Z",
7628 "open_alerts": 0
7629 },
7630 "tests": [
7631 [
7632 9,
7633 46
7634 ]
7635 ]
7636 }
7637 },
7638 "delete_custom_pattern": {
7639 "params": {
7640 "owner": "flagon-io",
7641 "name": "hello",
7642 "id": "pat_01kq2p9f6g7h8j9k0m1n2p3q4r"
7643 },
7644 "response": {
7645 "deleted": true
7646 }
7647 },
7648 "delete_custom_pattern_for_workspace": {
7649 "params": {
7650 "workspace": "flagon-io",
7651 "id": "pat_01kq2p9f6g7h8j9k0m1n2p3q4r"
7652 },
7653 "response": {
7654 "deleted": true
7655 }
7656 },
7657 "dry_run_custom_pattern": {
7658 "params": {
7659 "owner": "flagon-io",
7660 "name": "hello"
7661 },
7662 "request": {
7663 "pattern": "acme_[a-z0-9]{32}"
7664 },
7665 "response": {
7666 "repos": [
7667 {
7668 "name": "hello",
7669 "files_scanned": 214,
7670 "matches": [
7671 {
7672 "path": "config/dev.env",
7673 "line": 3,
7674 "preview": "ACME_KEY=acme_01••••••••••••••••••••••••"
7675 }
7676 ],
7677 "truncated": false,
7678 "commit": "4807077b296e6edbf410d55e72749d3e1170c291"
7679 }
7680 ]
7681 },
7682 "notes": "Reads up to 2,000 files and 20 MB of the default branch, skipping what secret scanning skips. Nothing is recorded."
7683 },
7684 "dry_run_custom_pattern_for_workspace": {
7685 "params": {
7686 "workspace": "flagon-io"
7687 },
7688 "request": {
7689 "pattern": "acme_[a-z0-9]{32}",
7690 "repos": [
7691 "hello"
7692 ]
7693 },
7694 "response": {
7695 "repos": [
7696 {
7697 "name": "hello",
7698 "files_scanned": 214,
7699 "matches": [],
7700 "truncated": false,
7701 "commit": "4807077b296e6edbf410d55e72749d3e1170c291"
7702 }
7703 ]
7704 }
7705 },
7706 "list_code_scanning_alerts": {
7707 "params": {
7708 "owner": "flagon-io",
7709 "name": "hello"
7710 },
7711 "query": {
7712 "state": "open",
7713 "severity": "high"
7714 },
7715 "response": [
7716 {
7717 "id": "cod_01kq2qag7h8j9k0m1n2p3q4r5s",
7718 "number": 4,
7719 "repo_id": "rep_01kp0a1b2c3d4e5f6g7h8j9k0m",
7720 "tool": "Semgrep OSS",
7721 "category": "Semgrep OSS",
7722 "rule_id": "javascript.lang.security.detect-child-process.detect-child-process",
7723 "rule_name": "javascript.lang.security.detect-child-process.detect-child-process",
7724 "rule_description": "Detected calls to child_process from a function argument.",
7725 "help": null,
7726 "help_uri": "https://semgrep.dev/r/javascript.lang.security.detect-child-process.detect-child-process",
7727 "tags": [
7728 "security",
7729 "CWE-78"
7730 ],
7731 "level": "error",
7732 "security_severity": null,
7733 "severity": "high",
7734 "message": "Detected calls to child_process from a function argument `req`. This could lead to a command injection.",
7735 "path": "src/server.js",
7736 "start_line": 6,
7737 "end_line": 6,
7738 "start_column": 3,
7739 "end_column": 60,
7740 "state": "open",
7741 "fingerprint": "3f1c9a0e7b2d4c5e6f708192a3b4c5d6",
7742 "first_commit": "4807077b296e6edbf410d55e72749d3e1170c291",
7743 "last_commit": "4807077b296e6edbf410d55e72749d3e1170c291",
7744 "created_at": "2026-10-06T09:14:02.118Z",
7745 "updated_at": "2026-10-06T09:14:02.118Z",
7746 "fixed_at": null,
7747 "dismissed_by": null,
7748 "dismissed_reason": null,
7749 "dismissed_comment": null,
7750 "dismissed_at": null,
7751 "issue": null
7752 }
7753 ],
7754 "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."
7755 },
7756 "list_code_scanning_alerts_for_workspace": {
7757 "params": {
7758 "workspace": "flagon-io"
7759 },
7760 "query": {
7761 "state": "open"
7762 },
7763 "response": [
7764 {
7765 "repo": "hello",
7766 "code": {
7767 "id": "cod_01kq2qag7h8j9k0m1n2p3q4r5s",
7768 "number": 4,
7769 "repo_id": "rep_01kp0a1b2c3d4e5f6g7h8j9k0m",
7770 "tool": "Semgrep OSS",
7771 "category": "Semgrep OSS",
7772 "rule_id": "javascript.lang.security.detect-child-process.detect-child-process",
7773 "rule_name": "javascript.lang.security.detect-child-process.detect-child-process",
7774 "rule_description": "Detected calls to child_process from a function argument.",
7775 "help": null,
7776 "help_uri": "https://semgrep.dev/r/javascript.lang.security.detect-child-process.detect-child-process",
7777 "tags": [
7778 "security",
7779 "CWE-78"
7780 ],
7781 "level": "error",
7782 "security_severity": null,
7783 "severity": "high",
7784 "message": "Detected calls to child_process from a function argument `req`. This could lead to a command injection.",
7785 "path": "src/server.js",
7786 "start_line": 6,
7787 "end_line": 6,
7788 "start_column": 3,
7789 "end_column": 60,
7790 "state": "open",
7791 "fingerprint": "3f1c9a0e7b2d4c5e6f708192a3b4c5d6",
7792 "first_commit": "4807077b296e6edbf410d55e72749d3e1170c291",
7793 "last_commit": "4807077b296e6edbf410d55e72749d3e1170c291",
7794 "created_at": "2026-10-06T09:14:02.118Z",
7795 "updated_at": "2026-10-06T09:14:02.118Z",
7796 "fixed_at": null,
7797 "dismissed_by": null,
7798 "dismissed_reason": null,
7799 "dismissed_comment": null,
7800 "dismissed_at": null,
7801 "issue": null
7802 }
7803 }
7804 ]
7805 },
7806 "get_code_scanning_alert": {
7807 "params": {
7808 "owner": "flagon-io",
7809 "name": "hello",
7810 "number": 4
7811 },
7812 "response": {
7813 "alert": {
7814 "id": "cod_01kq2qag7h8j9k0m1n2p3q4r5s",
7815 "number": 4,
7816 "repo_id": "rep_01kp0a1b2c3d4e5f6g7h8j9k0m",
7817 "tool": "Semgrep OSS",
7818 "category": "Semgrep OSS",
7819 "rule_id": "javascript.lang.security.detect-child-process.detect-child-process",
7820 "rule_name": "javascript.lang.security.detect-child-process.detect-child-process",
7821 "rule_description": "Detected calls to child_process from a function argument.",
7822 "help": null,
7823 "help_uri": "https://semgrep.dev/r/javascript.lang.security.detect-child-process.detect-child-process",
7824 "tags": [
7825 "security",
7826 "CWE-78"
7827 ],
7828 "level": "error",
7829 "security_severity": null,
7830 "severity": "high",
7831 "message": "Detected calls to child_process from a function argument `req`. This could lead to a command injection.",
7832 "path": "src/server.js",
7833 "start_line": 6,
7834 "end_line": 6,
7835 "start_column": 3,
7836 "end_column": 60,
7837 "state": "open",
7838 "fingerprint": "3f1c9a0e7b2d4c5e6f708192a3b4c5d6",
7839 "first_commit": "4807077b296e6edbf410d55e72749d3e1170c291",
7840 "last_commit": "4807077b296e6edbf410d55e72749d3e1170c291",
7841 "created_at": "2026-10-06T09:14:02.118Z",
7842 "updated_at": "2026-10-06T09:14:02.118Z",
7843 "fixed_at": null,
7844 "dismissed_by": null,
7845 "dismissed_reason": null,
7846 "dismissed_comment": null,
7847 "dismissed_at": null,
7848 "issue": null
7849 },
7850 "activity": [],
7851 "analyses": [
7852 {
7853 "id": "ana_01kq2rbh8j9k0m1n2p3q4r5s6t",
7854 "repo_id": "rep_01kp0a1b2c3d4e5f6g7h8j9k0m",
7855 "sarif_id": "sar_01kq2scj9k0m1n2p3q4r5s6t7v",
7856 "tool": "Semgrep OSS",
7857 "tool_version": "1.140.0",
7858 "category": "Semgrep OSS",
7859 "commit_sha": "4807077b296e6edbf410d55e72749d3e1170c291",
7860 "git_ref": "refs/heads/main",
7861 "pull": null,
7862 "results": 7,
7863 "new_alerts": 2,
7864 "fixed_alerts": 1,
7865 "dropped": 0,
7866 "created_at": "2026-10-06T09:14:02.118Z"
7867 }
7868 ]
7869 }
7870 },
7871 "update_code_scanning_alert": {
7872 "params": {
7873 "owner": "flagon-io",
7874 "name": "hello",
7875 "number": 4
7876 },
7877 "request": {
7878 "state": "dismissed",
7879 "dismissed_reason": "false_positive",
7880 "dismissed_comment": "The argument is a constant."
7881 },
7882 "response": {
7883 "id": "cod_01kq2qag7h8j9k0m1n2p3q4r5s",
7884 "number": 4,
7885 "repo_id": "rep_01kp0a1b2c3d4e5f6g7h8j9k0m",
7886 "tool": "Semgrep OSS",
7887 "category": "Semgrep OSS",
7888 "rule_id": "javascript.lang.security.detect-child-process.detect-child-process",
7889 "rule_name": "javascript.lang.security.detect-child-process.detect-child-process",
7890 "rule_description": "Detected calls to child_process from a function argument.",
7891 "help": null,
7892 "help_uri": "https://semgrep.dev/r/javascript.lang.security.detect-child-process.detect-child-process",
7893 "tags": [
7894 "security",
7895 "CWE-78"
7896 ],
7897 "level": "error",
7898 "security_severity": null,
7899 "severity": "high",
7900 "message": "Detected calls to child_process from a function argument `req`. This could lead to a command injection.",
7901 "path": "src/server.js",
7902 "start_line": 6,
7903 "end_line": 6,
7904 "start_column": 3,
7905 "end_column": 60,
7906 "state": "dismissed",
7907 "fingerprint": "3f1c9a0e7b2d4c5e6f708192a3b4c5d6",
7908 "first_commit": "4807077b296e6edbf410d55e72749d3e1170c291",
7909 "last_commit": "4807077b296e6edbf410d55e72749d3e1170c291",
7910 "created_at": "2026-10-06T09:14:02.118Z",
7911 "updated_at": "2026-10-06T09:14:02.118Z",
7912 "fixed_at": null,
7913 "dismissed_by": "syntaqx",
7914 "dismissed_reason": "false_positive",
7915 "dismissed_comment": "The argument is a constant.",
7916 "dismissed_at": "2026-10-06T09:20:41.502Z",
7917 "issue": null
7918 }
7919 },
7920 "list_code_scanning_analyses": {
7921 "params": {
7922 "owner": "flagon-io",
7923 "name": "hello"
7924 },
7925 "response": [
7926 {
7927 "id": "ana_01kq2rbh8j9k0m1n2p3q4r5s6t",
7928 "repo_id": "rep_01kp0a1b2c3d4e5f6g7h8j9k0m",
7929 "sarif_id": "sar_01kq2scj9k0m1n2p3q4r5s6t7v",
7930 "tool": "Semgrep OSS",
7931 "tool_version": "1.140.0",
7932 "category": "Semgrep OSS",
7933 "commit_sha": "4807077b296e6edbf410d55e72749d3e1170c291",
7934 "git_ref": "refs/heads/main",
7935 "pull": null,
7936 "results": 7,
7937 "new_alerts": 2,
7938 "fixed_alerts": 1,
7939 "dropped": 0,
7940 "created_at": "2026-10-06T09:14:02.118Z"
7941 }
7942 ]
7943 },
7944 "upload_sarif": {
7945 "params": {
7946 "owner": "flagon-io",
7947 "name": "hello"
7948 },
7949 "request": {
7950 "commit_sha": "4807077b296e6edbf410d55e72749d3e1170c291",
7951 "ref": "refs/heads/main",
7952 "sarif": "H4sIAAAAAAAA…",
7953 "checkout_uri": "file:///home/runner/work/repo"
7954 },
7955 "response": {
7956 "id": "sar_01kq2scj9k0m1n2p3q4r5s6t7v",
7957 "processing_status": "complete",
7958 "analyses": [
7959 "ana_01kq2rbh8j9k0m1n2p3q4r5s6t"
7960 ],
7961 "errors": [],
7962 "commit_sha": "4807077b296e6edbf410d55e72749d3e1170c291",
7963 "git_ref": "refs/heads/main",
7964 "created_at": "2026-10-06T09:14:02.118Z"
7965 },
7966 "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."
7967 },
7968 "get_sarif_upload": {
7969 "params": {
7970 "owner": "flagon-io",
7971 "name": "hello",
7972 "id": "sar_01kq2scj9k0m1n2p3q4r5s6t7v"
7973 },
7974 "response": {
7975 "id": "sar_01kq2scj9k0m1n2p3q4r5s6t7v",
7976 "processing_status": "complete",
7977 "analyses": [
7978 "ana_01kq2rbh8j9k0m1n2p3q4r5s6t"
7979 ],
7980 "errors": [],
7981 "commit_sha": "4807077b296e6edbf410d55e72749d3e1170c291",
7982 "git_ref": "refs/heads/main",
7983 "created_at": "2026-10-06T09:14:02.118Z"
7984 }
7985 },
7986 "list_vulnerability_alerts": {
7987 "params": {
7988 "owner": "flagon-io",
7989 "name": "hello"
7990 },
7991 "query": {
7992 "state": "open"
7993 },
7994 "response": [
7995 {
7996 "id": "vul_01kp4b8c3d4e5f6g7h8j9k0m1n",
7997 "repo_id": "rep_01kp0a1b2c3d4e5f6g7h8j9k0m",
7998 "ecosystem": "npm",
7999 "package": "lodash",
8000 "version": "4.17.20",
8001 "manifest": "package-lock.json",
8002 "advisory": "GHSA-35jh-r3h4-6jhm",
8003 "osv_id": "GHSA-35jh-r3h4-6jhm",
8004 "summary": "Command Injection in lodash",
8005 "severity": "high",
8006 "fixed_version": "4.17.21",
8007 "status": "open",
8008 "issue": null,
8009 "found_at": "2026-10-06T09:14:02.118Z",
8010 "fixed_at": null,
8011 "state": "open",
8012 "dismissed_by": null,
8013 "dismissed_reason": null,
8014 "dismissed_comment": null,
8015 "dismissed_at": null,
8016 "update": null
8017 }
8018 ]
8019 },
8020 "list_vulnerability_alerts_for_workspace": {
8021 "params": {
8022 "workspace": "flagon-io"
8023 },
8024 "query": {
8025 "severity": "critical"
8026 },
8027 "response": [
8028 {
8029 "repo": "hello",
8030 "vulnerability": {
8031 "id": "vul_01kp4b8c3d4e5f6g7h8j9k0m1n",
8032 "repo_id": "rep_01kp0a1b2c3d4e5f6g7h8j9k0m",
8033 "ecosystem": "npm",
8034 "package": "lodash",
8035 "version": "4.17.20",
8036 "manifest": "package-lock.json",
8037 "advisory": "GHSA-35jh-r3h4-6jhm",
8038 "osv_id": "GHSA-35jh-r3h4-6jhm",
8039 "summary": "Command Injection in lodash",
8040 "severity": "high",
8041 "fixed_version": "4.17.21",
8042 "status": "open",
8043 "issue": null,
8044 "found_at": "2026-10-06T09:14:02.118Z",
8045 "fixed_at": null,
8046 "state": "open",
8047 "dismissed_by": null,
8048 "dismissed_reason": null,
8049 "dismissed_comment": null,
8050 "dismissed_at": null,
8051 "update": null
8052 }
8053 }
8054 ]
8055 },
8056 "get_vulnerability_alert": {
8057 "params": {
8058 "owner": "flagon-io",
8059 "name": "hello",
8060 "id": "vul_01kp4b8c3d4e5f6g7h8j9k0m1n"
8061 },
8062 "response": {
8063 "id": "vul_01kp4b8c3d4e5f6g7h8j9k0m1n",
8064 "repo_id": "rep_01kp0a1b2c3d4e5f6g7h8j9k0m",
8065 "ecosystem": "npm",
8066 "package": "lodash",
8067 "version": "4.17.20",
8068 "manifest": "package-lock.json",
8069 "advisory": "GHSA-35jh-r3h4-6jhm",
8070 "osv_id": "GHSA-35jh-r3h4-6jhm",
8071 "summary": "Command Injection in lodash",
8072 "severity": "high",
8073 "fixed_version": "4.17.21",
8074 "status": "open",
8075 "issue": null,
8076 "found_at": "2026-10-06T09:14:02.118Z",
8077 "fixed_at": null,
8078 "state": "open",
8079 "dismissed_by": null,
8080 "dismissed_reason": null,
8081 "dismissed_comment": null,
8082 "dismissed_at": null,
8083 "update": null
8084 }
8085 },
8086 "update_vulnerability_alert": {
8087 "params": {
8088 "owner": "flagon-io",
8089 "name": "hello",
8090 "id": "vul_01kp4b8c3d4e5f6g7h8j9k0m1n"
8091 },
8092 "request": {
8093 "state": "dismissed",
8094 "reason": "tolerable_risk",
8095 "comment": "Only the build uses it."
8096 },
8097 "response": {
8098 "id": "vul_01kp4b8c3d4e5f6g7h8j9k0m1n",
8099 "repo_id": "rep_01kp0a1b2c3d4e5f6g7h8j9k0m",
8100 "ecosystem": "npm",
8101 "package": "lodash",
8102 "version": "4.17.20",
8103 "manifest": "package-lock.json",
8104 "advisory": "GHSA-35jh-r3h4-6jhm",
8105 "osv_id": "GHSA-35jh-r3h4-6jhm",
8106 "summary": "Command Injection in lodash",
8107 "severity": "high",
8108 "fixed_version": "4.17.21",
8109 "status": "dismissed",
8110 "issue": null,
8111 "found_at": "2026-10-06T09:14:02.118Z",
8112 "fixed_at": null,
8113 "state": "dismissed",
8114 "dismissed_by": "syntaqx",
8115 "dismissed_reason": "tolerable_risk",
8116 "dismissed_comment": "Only the build uses it.",
8117 "dismissed_at": "2026-10-06T09:20:41.502Z",
8118 "update": null
8119 }
8120 },
8121 "get_dependency_graph": {
8122 "params": {
8123 "owner": "flagon-io",
8124 "name": "hello"
8125 },
8126 "response": {
8127 "commit": "4807077b296e6edbf410d55e72749d3e1170c291",
8128 "manifests": [
8129 {
8130 "path": "package-lock.json",
8131 "ecosystem": "npm",
8132 "dependencies": 2,
8133 "direct": 1
8134 }
8135 ],
8136 "dependencies": [
8137 {
8138 "ecosystem": "npm",
8139 "name": "lodash",
8140 "version": "4.17.20",
8141 "manifest": "package-lock.json",
8142 "relationship": "direct",
8143 "development": false,
8144 "license": "MIT",
8145 "purl": "pkg:npm/lodash@4.17.20",
8146 "vulnerabilities": 1
8147 },
8148 {
8149 "ecosystem": "npm",
8150 "name": "ms",
8151 "version": "2.1.3",
8152 "manifest": "package-lock.json",
8153 "relationship": "transitive",
8154 "development": false,
8155 "license": "MIT",
8156 "purl": "pkg:npm/ms@2.1.3",
8157 "vulnerabilities": 0
8158 }
8159 ]
8160 }
8161 },
8162 "get_sbom": {
8163 "params": {
8164 "owner": "flagon-io",
8165 "name": "hello"
8166 },
8167 "response": {
8168 "sbom": {
8169 "spdxVersion": "SPDX-2.3",
8170 "dataLicense": "CC0-1.0",
8171 "SPDXID": "SPDXRef-DOCUMENT",
8172 "name": "flagon-io/hello dependency graph",
8173 "documentNamespace": "https://g1t.sh/flagon-io/hello/sbom/sbom_01kq2tdk0m1n2p3q4r5s6t7v8w",
8174 "creationInfo": {
8175 "created": "2026-10-06T09:14:02Z",
8176 "creators": [
8177 "Tool: g1t",
8178 "Organization: g1t"
8179 ],
8180 "comment": "Read from the repository's lockfiles on its default branch."
8181 },
8182 "documentDescribes": [
8183 "SPDXRef-Repository-flagon-io-hello"
8184 ],
8185 "packages": [
8186 {
8187 "SPDXID": "SPDXRef-Repository-flagon-io-hello",
8188 "name": "flagon-io/hello",
8189 "versionInfo": "4807077b296e6edbf410d55e72749d3e1170c291",
8190 "downloadLocation": "git+https://g1t.sh/flagon-io/hello.git",
8191 "filesAnalyzed": false,
8192 "licenseConcluded": "NOASSERTION",
8193 "licenseDeclared": "NOASSERTION",
8194 "copyrightText": "NOASSERTION",
8195 "primaryPackagePurpose": "SOURCE",
8196 "externalRefs": []
8197 },
8198 {
8199 "SPDXID": "SPDXRef-Package-npm-lodash-4.17.20",
8200 "name": "lodash",
8201 "versionInfo": "4.17.20",
8202 "downloadLocation": "NOASSERTION",
8203 "filesAnalyzed": false,
8204 "licenseConcluded": "NOASSERTION",
8205 "licenseDeclared": "MIT",
8206 "copyrightText": "NOASSERTION",
8207 "primaryPackagePurpose": "LIBRARY",
8208 "comment": "Resolved by package-lock.json (direct dependency).",
8209 "externalRefs": [
8210 {
8211 "referenceCategory": "PACKAGE-MANAGER",
8212 "referenceType": "purl",
8213 "referenceLocator": "pkg:npm/lodash@4.17.20"
8214 }
8215 ]
8216 }
8217 ],
8218 "relationships": [
8219 {
8220 "spdxElementId": "SPDXRef-DOCUMENT",
8221 "relationshipType": "DESCRIBES",
8222 "relatedSpdxElement": "SPDXRef-Repository-flagon-io-hello"
8223 },
8224 {
8225 "spdxElementId": "SPDXRef-Repository-flagon-io-hello",
8226 "relationshipType": "DEPENDS_ON",
8227 "relatedSpdxElement": "SPDXRef-Package-npm-lodash-4.17.20"
8228 }
8229 ]
8230 }
8231 },
8232 "notes": "`sbom` is an SPDX 2.3 JSON document, sent as SPDX spells it. Save it with `jq .sbom`."
8233 },
8234 "compare_dependencies": {
8235 "params": {
8236 "owner": "flagon-io",
8237 "name": "hello",
8238 "basehead": "main...upgrade-deps"
8239 },
8240 "response": {
8241 "base": "main",
8242 "head": "upgrade-deps",
8243 "changes": [
8244 {
8245 "change_type": "added",
8246 "manifest": "package-lock.json",
8247 "ecosystem": "npm",
8248 "name": "lodash",
8249 "version": "4.17.20",
8250 "relationship": "direct",
8251 "development": false,
8252 "license": "MIT",
8253 "purl": "pkg:npm/lodash@4.17.20",
8254 "vulnerabilities": [
8255 {
8256 "advisory": "GHSA-35jh-r3h4-6jhm",
8257 "osv_id": "GHSA-35jh-r3h4-6jhm",
8258 "summary": "Command Injection in lodash",
8259 "severity": "high",
8260 "fixed_version": "4.17.21",
8261 "url": "https://osv.dev/vulnerability/GHSA-35jh-r3h4-6jhm"
8262 }
8263 ],
8264 "denied_license": false,
8265 "failing": true
8266 },
8267 {
8268 "change_type": "removed",
8269 "manifest": "package-lock.json",
8270 "ecosystem": "npm",
8271 "name": "lodash",
8272 "version": "4.17.21",
8273 "relationship": "direct",
8274 "development": false,
8275 "license": "MIT",
8276 "purl": "pkg:npm/lodash@4.17.21",
8277 "vulnerabilities": [],
8278 "denied_license": false,
8279 "failing": false
8280 }
8281 ],
8282 "passed": false,
8283 "headline": "Adds 1 vulnerable package",
8284 "fail_on": "high",
8285 "deny_licenses": []
8286 }
8287 },
8288 "get_security_settings": {
8289 "params": {
8290 "owner": "flagon-io",
8291 "name": "hello"
8292 },
8293 "response": {
8294 "settings": {
8295 "code_scanning_gate": "high",
8296 "dependency_review": true,
8297 "review_fail_on": "high",
8298 "review_deny_licenses": [
8299 "AGPL-3.0-only"
8300 ],
8301 "review_comment": true,
8302 "history_alerts": true,
8303 "private_vulnerability_reporting": false
8304 },
8305 "workspace": {
8306 "delegated_bypass": true,
8307 "validity_checks": true
8308 },
8309 "private": true,
8310 "entitled": true,
8311 "upkeep": true
8312 }
8313 },
8314 "update_security_settings": {
8315 "params": {
8316 "owner": "flagon-io",
8317 "name": "hello"
8318 },
8319 "request": {
8320 "code_scanning_gate": "high",
8321 "review_deny_licenses": [
8322 "AGPL-3.0-only"
8323 ]
8324 },
8325 "response": {
8326 "settings": {
8327 "code_scanning_gate": "high",
8328 "dependency_review": true,
8329 "review_fail_on": "high",
8330 "review_deny_licenses": [
8331 "AGPL-3.0-only"
8332 ],
8333 "review_comment": true,
8334 "history_alerts": true,
8335 "private_vulnerability_reporting": true
8336 },
8337 "workspace": {
8338 "delegated_bypass": true,
8339 "validity_checks": true
8340 },
8341 "private": true,
8342 "entitled": true,
8343 "upkeep": true
8344 },
8345 "notes": "Only what you send changes. The `Code scanning` and `Dependency review` checks gate merges once you require them in branch protection."
8346 },
8347 "get_workspace_security_settings": {
8348 "params": {
8349 "workspace": "flagon-io"
8350 },
8351 "response": {
8352 "settings": {
8353 "delegated_bypass": true,
8354 "validity_checks": true
8355 },
8356 "activated": true
8357 }
8358 },
8359 "update_workspace_security_settings": {
8360 "params": {
8361 "workspace": "flagon-io"
8362 },
8363 "request": {
8364 "delegated_bypass": true
8365 },
8366 "response": {
8367 "settings": {
8368 "delegated_bypass": true,
8369 "validity_checks": true
8370 },
8371 "activated": true
8372 }
8373 },
8374 "list_security_advisories": {
8375 "params": {
8376 "owner": "flagon-io",
8377 "name": "hello"
8378 },
8379 "query": {
8380 "state": "published"
8381 },
8382 "response": [
8383 {
8384 "id": "adv_01kq2p9f6g7h8j9k0m1n2p3q4r",
8385 "g1tsa_id": "G1TSA-2026-h7kd-3mqw",
8386 "repo_id": "rep_01kq2p9f6g7h8j9k0m1n2p3q4r",
8387 "repo": "flagon-io/hello",
8388 "title": "Path traversal in the archive reader",
8389 "description": "A crafted archive could write outside the directory it is extracted to.\n\nUpgrade to 1.4.1.",
8390 "severity": "high",
8391 "cvss_vector": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N",
8392 "cvss_score": 8.1,
8393 "cve_id": "CVE-2026-12345",
8394 "ecosystem": "npm",
8395 "package": "@flagon/hello",
8396 "affected_versions": ">= 1.2.0, < 1.4.1",
8397 "patched_versions": ">= 1.4.1",
8398 "state": "published",
8399 "credits": [
8400 "ana"
8401 ],
8402 "report_id": "vrp_01kq2p9f6g7h8j9k0m1n2p3q4r",
8403 "created_by": "syntaqx",
8404 "created_at": "2026-10-06T09:14:02.118Z",
8405 "updated_at": "2026-10-07T15:02:40.000Z",
8406 "published_at": "2026-10-07T15:02:40.000Z",
8407 "withdrawn_at": null
8408 }
8409 ],
8410 "notes": "Without a token, or with one that has no Write on the repository, only published advisories are listed. `state` filters to `draft`, `published` or `withdrawn`; drafts and withdrawn advisories are shown only to those who see the repository's findings."
8411 },
8412 "get_security_advisory": {
8413 "params": {
8414 "owner": "flagon-io",
8415 "name": "hello",
8416 "id": "G1TSA-2026-h7kd-3mqw"
8417 },
8418 "response": {
8419 "id": "adv_01kq2p9f6g7h8j9k0m1n2p3q4r",
8420 "g1tsa_id": "G1TSA-2026-h7kd-3mqw",
8421 "repo_id": "rep_01kq2p9f6g7h8j9k0m1n2p3q4r",
8422 "repo": "flagon-io/hello",
8423 "title": "Path traversal in the archive reader",
8424 "description": "A crafted archive could write outside the directory it is extracted to.\n\nUpgrade to 1.4.1.",
8425 "severity": "high",
8426 "cvss_vector": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N",
8427 "cvss_score": 8.1,
8428 "cve_id": "CVE-2026-12345",
8429 "ecosystem": "npm",
8430 "package": "@flagon/hello",
8431 "affected_versions": ">= 1.2.0, < 1.4.1",
8432 "patched_versions": ">= 1.4.1",
8433 "state": "published",
8434 "credits": [
8435 "ana"
8436 ],
8437 "report_id": "vrp_01kq2p9f6g7h8j9k0m1n2p3q4r",
8438 "created_by": "syntaqx",
8439 "created_at": "2026-10-06T09:14:02.118Z",
8440 "updated_at": "2026-10-07T15:02:40.000Z",
8441 "published_at": "2026-10-07T15:02:40.000Z",
8442 "withdrawn_at": null
8443 },
8444 "notes": "`id` is the advisory's `adv_…` id or its `G1TSA-…` id. A draft or withdrawn advisory is `404` to anyone who does not see the repository's findings."
8445 },
8446 "create_security_advisory": {
8447 "params": {
8448 "owner": "flagon-io",
8449 "name": "hello"
8450 },
8451 "request": {
8452 "title": "Path traversal in the archive reader",
8453 "description": "A crafted archive could write outside the directory it is extracted to.",
8454 "severity": "high",
8455 "ecosystem": "npm",
8456 "package": "@flagon/hello",
8457 "affected_versions": ">= 1.2.0, < 1.4.1",
8458 "patched_versions": ">= 1.4.1",
8459 "credits": [
8460 "ana"
8461 ]
8462 },
8463 "response": {
8464 "id": "adv_01kq2p9f6g7h8j9k0m1n2p3q4r",
8465 "g1tsa_id": "G1TSA-2026-h7kd-3mqw",
8466 "repo_id": "rep_01kq2p9f6g7h8j9k0m1n2p3q4r",
8467 "repo": "flagon-io/hello",
8468 "title": "Path traversal in the archive reader",
8469 "description": "A crafted archive could write outside the directory it is extracted to.",
8470 "severity": "high",
8471 "cvss_vector": null,
8472 "cvss_score": null,
8473 "cve_id": null,
8474 "ecosystem": "npm",
8475 "package": "@flagon/hello",
8476 "affected_versions": ">= 1.2.0, < 1.4.1",
8477 "patched_versions": ">= 1.4.1",
8478 "state": "draft",
8479 "credits": [
8480 "ana"
8481 ],
8482 "report_id": null,
8483 "created_by": "syntaqx",
8484 "created_at": "2026-10-06T09:14:02.118Z",
8485 "updated_at": "2026-10-06T09:14:02.118Z",
8486 "published_at": null,
8487 "withdrawn_at": null
8488 },
8489 "notes": "The advisory starts as a draft nobody but the maintainers sees; publish it with `POST …/advisories/{id}/state`. Takes the Admin role, or a security manager of the workspace. A title or severity that is missing, or a `cve_id` that is not of the form `CVE-2026-12345`, is `422`."
8490 },
8491 "update_security_advisory": {
8492 "params": {
8493 "owner": "flagon-io",
8494 "name": "hello",
8495 "id": "adv_01kq2p9f6g7h8j9k0m1n2p3q4r"
8496 },
8497 "request": {
8498 "cve_id": "CVE-2026-12345",
8499 "cvss_vector": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N",
8500 "cvss_score": 8.1
8501 },
8502 "response": {
8503 "id": "adv_01kq2p9f6g7h8j9k0m1n2p3q4r",
8504 "g1tsa_id": "G1TSA-2026-h7kd-3mqw",
8505 "repo_id": "rep_01kq2p9f6g7h8j9k0m1n2p3q4r",
8506 "repo": "flagon-io/hello",
8507 "title": "Path traversal in the archive reader",
8508 "description": "A crafted archive could write outside the directory it is extracted to.",
8509 "severity": "high",
8510 "cvss_vector": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N",
8511 "cvss_score": 8.1,
8512 "cve_id": "CVE-2026-12345",
8513 "ecosystem": "npm",
8514 "package": "@flagon/hello",
8515 "affected_versions": ">= 1.2.0, < 1.4.1",
8516 "patched_versions": ">= 1.4.1",
8517 "state": "draft",
8518 "credits": [
8519 "ana"
8520 ],
8521 "report_id": null,
8522 "created_by": "syntaqx",
8523 "created_at": "2026-10-06T09:14:02.118Z",
8524 "updated_at": "2026-10-06T10:30:00.000Z",
8525 "published_at": null,
8526 "withdrawn_at": null
8527 },
8528 "notes": "What the request leaves out stays as it is. A published advisory may be changed; its page shows the change at once."
8529 },
8530 "set_security_advisory_state": {
8531 "params": {
8532 "owner": "flagon-io",
8533 "name": "hello",
8534 "id": "adv_01kq2p9f6g7h8j9k0m1n2p3q4r"
8535 },
8536 "request": {
8537 "state": "published"
8538 },
8539 "response": {
8540 "id": "adv_01kq2p9f6g7h8j9k0m1n2p3q4r",
8541 "g1tsa_id": "G1TSA-2026-h7kd-3mqw",
8542 "repo_id": "rep_01kq2p9f6g7h8j9k0m1n2p3q4r",
8543 "repo": "flagon-io/hello",
8544 "title": "Path traversal in the archive reader",
8545 "description": "A crafted archive could write outside the directory it is extracted to.",
8546 "severity": "high",
8547 "cvss_vector": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N",
8548 "cvss_score": 8.1,
8549 "cve_id": "CVE-2026-12345",
8550 "ecosystem": "npm",
8551 "package": "@flagon/hello",
8552 "affected_versions": ">= 1.2.0, < 1.4.1",
8553 "patched_versions": ">= 1.4.1",
8554 "state": "published",
8555 "credits": [
8556 "ana"
8557 ],
8558 "report_id": null,
8559 "created_by": "syntaqx",
8560 "created_at": "2026-10-06T09:14:02.118Z",
8561 "updated_at": "2026-10-07T15:02:40.000Z",
8562 "published_at": "2026-10-07T15:02:40.000Z",
8563 "withdrawn_at": null
8564 },
8565 "notes": "Publishing a draft with no description is `422`. Publishing sends `security_advisory.published` to webhooks and tells the repository's watchers who chose security alerts; withdrawing (`state` `withdrawn`) sends `security_advisory.withdrawn`. A withdrawn advisory can be published again. Asking for the state it already has is `409`."
8566 },
8567 "list_vulnerability_reports": {
8568 "params": {
8569 "owner": "flagon-io",
8570 "name": "hello"
8571 },
8572 "query": {
8573 "state": "new"
8574 },
8575 "response": [
8576 {
8577 "id": "vrp_01kq2p9f6g7h8j9k0m1n2p3q4r",
8578 "repo_id": "rep_01kq2p9f6g7h8j9k0m1n2p3q4r",
8579 "repo": "flagon-io/hello",
8580 "reporter": null,
8581 "reporter_email": "finder@example.com",
8582 "title": "Path traversal in the archive reader",
8583 "description": "Extracting an archive with an entry named ../../etc/passwd writes outside the target directory. Steps: …",
8584 "severity": "high",
8585 "state": "new",
8586 "advisory_id": null,
8587 "created_at": "2026-10-06T08:40:11.000Z",
8588 "reviewed_by": null,
8589 "reviewed_at": null,
8590 "review_note": null
8591 }
8592 ],
8593 "notes": "New reports first. Those who see the repository's findings (Write, or a security manager) read them; a reporter never sees another's. `state` is `new`, `accepted` or `declined`."
8594 },
8595 "report_vulnerability": {
8596 "params": {
8597 "owner": "flagon-io",
8598 "name": "hello"
8599 },
8600 "request": {
8601 "title": "Path traversal in the archive reader",
8602 "description": "Extracting an archive with an entry named ../../etc/passwd writes outside the target directory. Steps: …",
8603 "severity": "high",
8604 "email": "finder@example.com"
8605 },
8606 "response": {
8607 "id": "vrp_01kq2p9f6g7h8j9k0m1n2p3q4r",
8608 "repo_id": "rep_01kq2p9f6g7h8j9k0m1n2p3q4r",
8609 "repo": "flagon-io/hello",
8610 "reporter": null,
8611 "reporter_email": "finder@example.com",
8612 "title": "Path traversal in the archive reader",
8613 "description": "Extracting an archive with an entry named ../../etc/passwd writes outside the target directory. Steps: …",
8614 "severity": "high",
8615 "state": "new",
8616 "advisory_id": null,
8617 "created_at": "2026-10-06T08:40:11.000Z",
8618 "reviewed_by": null,
8619 "reviewed_at": null,
8620 "review_note": null
8621 },
8622 "notes": "Needs private vulnerability reporting on for the repository (`409` otherwise). With a token, the report is yours by username; without one, on a public repository, give `email`, or the request is `422`. The workspace's owners and security managers are told at once. More than 5 reports a day from one reporter to one repository, or a repository with 50 new reports waiting, is refused."
8623 },
8624 "review_vulnerability_report": {
8625 "params": {
8626 "owner": "flagon-io",
8627 "name": "hello",
8628 "id": "vrp_01kq2p9f6g7h8j9k0m1n2p3q4r"
8629 },
8630 "request": {
8631 "decision": "accept",
8632 "note": "Confirmed on 1.4.0."
8633 },
8634 "response": {
8635 "report": {
8636 "id": "vrp_01kq2p9f6g7h8j9k0m1n2p3q4r",
8637 "repo_id": "rep_01kq2p9f6g7h8j9k0m1n2p3q4r",
8638 "repo": "flagon-io/hello",
8639 "reporter": null,
8640 "reporter_email": "finder@example.com",
8641 "title": "Path traversal in the archive reader",
8642 "description": "Extracting an archive with an entry named ../../etc/passwd writes outside the target directory. Steps: …",
8643 "severity": "high",
8644 "state": "accepted",
8645 "advisory_id": "adv_01kq2p9f6g7h8j9k0m1n2p3q4r",
8646 "created_at": "2026-10-06T08:40:11.000Z",
8647 "reviewed_by": "syntaqx",
8648 "reviewed_at": "2026-10-06T09:14:02.118Z",
8649 "review_note": "Confirmed on 1.4.0."
8650 },
8651 "advisory": {
8652 "id": "adv_01kq2p9f6g7h8j9k0m1n2p3q4r",
8653 "g1tsa_id": "G1TSA-2026-h7kd-3mqw",
8654 "repo_id": "rep_01kq2p9f6g7h8j9k0m1n2p3q4r",
8655 "repo": "flagon-io/hello",
8656 "title": "Path traversal in the archive reader",
8657 "description": "Extracting an archive with an entry named ../../etc/passwd writes outside the target directory. Steps: …",
8658 "severity": "high",
8659 "cvss_vector": null,
8660 "cvss_score": null,
8661 "cve_id": null,
8662 "ecosystem": null,
8663 "package": null,
8664 "affected_versions": null,
8665 "patched_versions": null,
8666 "state": "draft",
8667 "credits": [
8668 "finder@example.com"
8669 ],
8670 "report_id": "vrp_01kq2p9f6g7h8j9k0m1n2p3q4r",
8671 "created_by": "syntaqx",
8672 "created_at": "2026-10-06T09:14:02.118Z",
8673 "updated_at": "2026-10-06T09:14:02.118Z",
8674 "published_at": null,
8675 "withdrawn_at": null
8676 }
8677 },
8678 "notes": "`accept` makes a draft advisory from the report, in the report's words and crediting the reporter, for the maintainers to finish and publish; `advisory` is that draft. `decline` closes the report; `advisory` is null. A report that was reviewed already is `409`. Takes the Admin role, or a security manager of the workspace."
8679 },
8680 "get_security_overview": {
8681 "params": {
8682 "workspace": "flagon-io"
8683 },
8684 "query": {
8685 "days": "30"
8686 },
8687 "response": {
8688 "activated": true,
8689 "private_hidden": 0,
8690 "totals": [
8691 {
8692 "alert_type": "secret_scanning",
8693 "open": {
8694 "critical": 1,
8695 "high": 0,
8696 "medium": 0,
8697 "low": 0,
8698 "unknown": 0
8699 },
8700 "opened": 2,
8701 "closed": 1
8702 },
8703 {
8704 "alert_type": "code_scanning",
8705 "open": {
8706 "critical": 0,
8707 "high": 3,
8708 "medium": 4,
8709 "low": 0,
8710 "unknown": 0
8711 },
8712 "opened": 7,
8713 "closed": 2
8714 },
8715 {
8716 "alert_type": "vulnerability",
8717 "open": {
8718 "critical": 0,
8719 "high": 1,
8720 "medium": 2,
8721 "low": 1,
8722 "unknown": 0
8723 },
8724 "opened": 3,
8725 "closed": 5
8726 }
8727 ],
8728 "trend": [
8729 {
8730 "day": "2026-10-05",
8731 "secret_scanning": 1,
8732 "code_scanning": 8,
8733 "vulnerability": 6
8734 },
8735 {
8736 "day": "2026-10-06",
8737 "secret_scanning": 1,
8738 "code_scanning": 7,
8739 "vulnerability": 4
8740 }
8741 ],
8742 "repos": [
8743 {
8744 "repo_id": "rep_01kp0a1b2c3d4e5f6g7h8j9k0m",
8745 "name": "hello",
8746 "private": true,
8747 "custom_patterns": 1,
8748 "validity_checks": true,
8749 "code_scanning_at": "2026-10-06T09:14:02.118Z",
8750 "dependency_review": true,
8751 "security_updates": true,
8752 "lockfiles": 1,
8753 "secrets": {
8754 "critical": 1,
8755 "high": 0,
8756 "medium": 0,
8757 "low": 0,
8758 "unknown": 0
8759 },
8760 "code": {
8761 "critical": 0,
8762 "high": 3,
8763 "medium": 4,
8764 "low": 0,
8765 "unknown": 0
8766 },
8767 "vulnerabilities": {
8768 "critical": 0,
8769 "high": 1,
8770 "medium": 2,
8771 "low": 1,
8772 "unknown": 0
8773 }
8774 }
8775 ]
8776 }
8777 },
8778 "create_label": {
8779 "request": {
8780 "label": "area: cli",
8781 "color": "1d76db",
8782 "description": "The command-line tool"
8783 },
8784 "response": {
8785 "name": "area: cli",
8786 "color": "1d76db",
8787 "description": "The command-line tool",
8788 "issues": 0,
8789 "pulls": 0
8790 }
8791 },
8792 "update_label": {
8793 "params": {
8794 "label": "area: cli"
8795 },
8796 "request": {
8797 "new_name": "cli",
8798 "color": "0052cc"
8799 },
8800 "response": {
8801 "name": "cli",
8802 "color": "0052cc",
8803 "description": "The command-line tool",
8804 "issues": 3,
8805 "pulls": 1
8806 },
8807 "notes": "Renaming a label renames it on every issue and pull request that carries it."
8808 },
8809 "delete_label": {
8810 "params": {
8811 "label": "wontfix"
8812 },
8813 "response": true
8814 },
8815 "add_default_labels": {
8816 "response": [
8817 {
8818 "name": "bug",
8819 "color": "d73a4a",
8820 "description": "Something isn't working",
8821 "issues": 4,
8822 "pulls": 1
8823 },
8824 {
8825 "name": "documentation",
8826 "color": "0075ca",
8827 "description": "Improvements or additions to documentation",
8828 "issues": 0,
8829 "pulls": 0
8830 }
8831 ],
8832 "notes": "Every label the repository has afterwards, shortened here. Labels it already had are left as they were."
8833 },
8834 "list_issue_labels": {
8835 "response": [
8836 {
8837 "name": "bug",
8838 "color": "d73a4a",
8839 "description": "Something isn't working",
8840 "issues": 4,
8841 "pulls": 1
8842 },
8843 {
8844 "name": "help wanted",
8845 "color": "008672",
8846 "description": "Extra attention is needed",
8847 "issues": 1,
8848 "pulls": 0
8849 }
8850 ]
8851 },
8852 "add_issue_labels": {
8853 "request": {
8854 "labels": [
8855 "help wanted"
8856 ]
8857 },
8858 "response": [
8859 "bug",
8860 "help wanted"
8861 ],
8862 "notes": "Returns its labels now, by name."
8863 },
8864 "set_issue_labels": {
8865 "request": {
8866 "labels": [
8867 "bug"
8868 ]
8869 },
8870 "response": [
8871 "bug"
8872 ]
8873 },
8874 "remove_issue_labels": {
8875 "response": []
8876 },
8877 "remove_issue_label": {
8878 "params": {
8879 "label": "help wanted"
8880 },
8881 "response": [
8882 "bug"
8883 ]
8884 },
8885 "list_milestones": {
8886 "response": [
8887 {
8888 "number": 3,
8889 "title": "Launch",
8890 "description": "Everything that has to land before the launch on October 14.",
8891 "due_on": "2026-10-14",
8892 "state": "open",
8893 "open_items": 5,
8894 "closed_items": 12,
8895 "created_at": "2026-09-20T09:00:00.000Z",
8896 "updated_at": "2026-10-06T16:12:40.118Z",
8897 "closed_at": null
8898 }
8899 ],
8900 "notes": "Open milestones soonest due first, then closed ones. Progress is closed_items out of open_items plus closed_items."
8901 },
8902 "create_milestone": {
8903 "request": {
8904 "title": "Launch",
8905 "description": "Everything that has to land before the launch on October 14.",
8906 "due_on": "2026-10-14"
8907 },
8908 "response": {
8909 "number": 3,
8910 "title": "Launch",
8911 "description": "Everything that has to land before the launch on October 14.",
8912 "due_on": "2026-10-14",
8913 "state": "open",
8914 "open_items": 0,
8915 "closed_items": 0,
8916 "created_at": "2026-09-20T09:00:00.000Z",
8917 "updated_at": "2026-09-20T09:00:00.000Z",
8918 "closed_at": null
8919 }
8920 },
8921 "update_milestone": {
8922 "params": {
8923 "milestone": 3
8924 },
8925 "request": {
8926 "state": "closed"
8927 },
8928 "response": {
8929 "number": 3,
8930 "title": "Launch",
8931 "description": "Everything that has to land before the launch on October 14.",
8932 "due_on": "2026-10-14",
8933 "state": "closed",
8934 "open_items": 0,
8935 "closed_items": 17,
8936 "created_at": "2026-09-20T09:00:00.000Z",
8937 "updated_at": "2026-10-14T18:00:00.000Z",
8938 "closed_at": "2026-10-14T18:00:00.000Z"
8939 }
8940 },
8941 "delete_milestone": {
8942 "params": {
8943 "milestone": 3
8944 },
8945 "response": true
8946 },
8947 "get_milestone": {
8948 "params": {
8949 "milestone": 3
8950 },
8951 "response": {
8952 "milestone": {
8953 "number": 3,
8954 "title": "Launch",
8955 "description": "Everything that has to land before the launch on October 14.",
8956 "due_on": "2026-10-14",
8957 "state": "open",
8958 "open_items": 5,
8959 "closed_items": 12,
8960 "created_at": "2026-09-20T09:00:00.000Z",
8961 "updated_at": "2026-10-06T16:12:40.118Z",
8962 "closed_at": null
8963 },
8964 "issues": [
8965 {
8966 "id": "iss_01m43shrzpfe49x74ga7sj1c6v",
8967 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
8968 "number": 12,
8969 "title": "Greeting should name the caller",
8970 "body": "Take a name from the first argument; fall back to world.",
8971 "labels": [
8972 "feature",
8973 "good first issue"
8974 ],
8975 "state": "open",
8976 "reason": null,
8977 "resolved_by": null,
8978 "author": {
8979 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
8980 "username": "syntaqx",
8981 "display_username": "syntaqx",
8982 "kind": "user",
8983 "verified": false,
8984 "workspaces": []
8985 },
8986 "requested_by": null,
8987 "created_at": "2026-10-01T18:04:11.482Z",
8988 "updated_at": "2026-10-01T18:09:47.305Z",
8989 "closed_at": null,
8990 "pull_count": 0,
8991 "comment_count": 0,
8992 "assignees": [
8993 "syntaqx"
8994 ],
8995 "blocked_by": [],
8996 "queued": false,
8997 "agent": null,
8998 "milestone": {
8999 "number": 3,
9000 "title": "Launch"
9001 }
9002 }
9003 ],
9004 "pulls": [
9005 {
9006 "id": "pr_01m43smh3vexsr5pmp60qwv0vs",
9007 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
9008 "number": 14,
9009 "issue": 12,
9010 "title": "Greeting should name the caller",
9011 "body": "Reads a name from the first argument. `hello ana` prints \"Hello, ana!\".",
9012 "agent": "claude-code",
9013 "runtime": "external",
9014 "status": "open",
9015 "fork": {
9016 "namespace": "pulls",
9017 "name": "pr_01m43smh3vexsr5pmp60qwv0vs"
9018 },
9019 "fork_repo_id": "rep_01m43smh5xd7aw2kq9tv0b4c8e",
9020 "branch": null,
9021 "head_commit": "9f2c4e1a7b3d5f60812a4c6e8b0d2f4a6c8e0b13",
9022 "merge_base": null,
9023 "merged_by": null,
9024 "merged_at": null,
9025 "superseded_by": null,
9026 "check_status": "passed",
9027 "files": [
9028 {
9029 "path": "src/main.rs",
9030 "additions": 6,
9031 "deletions": 2
9032 }
9033 ],
9034 "assignees": [],
9035 "reviewers": [
9036 "ana"
9037 ],
9038 "labels": [],
9039 "milestone": {
9040 "number": 3,
9041 "title": "Launch"
9042 },
9043 "base": "main",
9044 "author": {
9045 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
9046 "username": "syntaqx",
9047 "display_username": "syntaqx",
9048 "kind": "user",
9049 "verified": false,
9050 "workspaces": []
9051 },
9052 "requested_by": null,
9053 "created_at": "2026-10-01T18:20:02.117Z",
9054 "updated_at": "2026-10-01T18:35:44.902Z"
9055 }
9056 ]
9057 }
9058 },
9059 "update_pull_request": {
9060 "request": {
9061 "base": "release/1.x",
9062 "labels": [
9063 "bug"
9064 ]
9065 },
9066 "response": {
9067 "id": "pr_01m43smh3vexsr5pmp60qwv0vs",
9068 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
9069 "number": 14,
9070 "issue": 12,
9071 "title": "Greeting should name the caller",
9072 "body": "Reads a name from the first argument. `hello ana` prints \"Hello, ana!\".",
9073 "agent": "claude-code",
9074 "runtime": "external",
9075 "status": "open",
9076 "fork": {
9077 "namespace": "pulls",
9078 "name": "pr_01m43smh3vexsr5pmp60qwv0vs"
9079 },
9080 "fork_repo_id": "rep_01m43smh5xd7aw2kq9tv0b4c8e",
9081 "branch": null,
9082 "head_commit": "9f2c4e1a7b3d5f60812a4c6e8b0d2f4a6c8e0b13",
9083 "merge_base": null,
9084 "merged_by": null,
9085 "merged_at": null,
9086 "superseded_by": null,
9087 "check_status": "passed",
9088 "files": [
9089 {
9090 "path": "src/main.rs",
9091 "additions": 6,
9092 "deletions": 2
9093 }
9094 ],
9095 "assignees": [],
9096 "reviewers": [
9097 "ana"
9098 ],
9099 "labels": [
9100 "bug"
9101 ],
9102 "milestone": null,
9103 "base": "release/1.x",
9104 "author": {
9105 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
9106 "username": "syntaqx",
9107 "display_username": "syntaqx",
9108 "kind": "user",
9109 "verified": false,
9110 "workspaces": []
9111 },
9112 "requested_by": null,
9113 "created_at": "2026-10-01T18:20:02.117Z",
9114 "updated_at": "2026-10-01T18:35:44.902Z"
9115 },
9116 "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."
9117 },
9118 "list_repo_rulesets": {
9119 "params": {
9120 "owner": "flagon-io",
9121 "name": "hello"
9122 },
9123 "query": {
9124 "include_parents": "true"
9125 },
9126 "response": [
9127 {
9128 "id": "rs_01kq3a8b9c0d1e2f3g4h5j6k7m",
9129 "level": "repository",
9130 "workspace": "flagon-io",
9131 "repo_id": "rep_01kq0f3a7b8c9d0e1f2g3h4j5k",
9132 "repository": "flagon-io/hello",
9133 "name": "Protect main",
9134 "enforcement": "active",
9135 "target": "branch",
9136 "conditions": {
9137 "ref_name": {
9138 "include": [
9139 "~DEFAULT_BRANCH"
9140 ],
9141 "exclude": []
9142 }
9143 },
9144 "bypass_actors": [
9145 {
9146 "kind": "role",
9147 "value": "admin",
9148 "mode": "pull_requests"
9149 }
9150 ],
9151 "rules": [
9152 {
9153 "type": "deletion",
9154 "parameters": {},
9155 "applies_to": "everyone"
9156 },
9157 {
9158 "type": "non_fast_forward",
9159 "parameters": {},
9160 "applies_to": "everyone"
9161 },
9162 {
9163 "type": "pull_request",
9164 "parameters": {
9165 "required_approvals": 1,
9166 "count_agent_approvals": true,
9167 "dismiss_stale_reviews_on_push": true,
9168 "require_code_owner_review": true,
9169 "require_last_push_approval": false,
9170 "allowed_merge_methods": []
9171 },
9172 "applies_to": "everyone"
9173 },
9174 {
9175 "type": "required_status_checks",
9176 "parameters": {
9177 "checks": [
9178 {
9179 "context": "CI",
9180 "integration": "actions"
9181 }
9182 ],
9183 "strict": true,
9184 "paths": [],
9185 "allow_bypass_on_merge": false
9186 },
9187 "applies_to": "everyone"
9188 },
9189 {
9190 "type": "pull_request",
9191 "parameters": {
9192 "required_approvals": 1,
9193 "count_agent_approvals": false,
9194 "dismiss_stale_reviews_on_push": false,
9195 "require_code_owner_review": false,
9196 "require_last_push_approval": false,
9197 "allowed_merge_methods": []
9198 },
9199 "applies_to": "agents"
9200 },
9201 {
9202 "type": "file_path_restriction",
9203 "parameters": {
9204 "restricted_file_paths": [
9205 ".g1t/workflows/**",
9206 "CODEOWNERS"
9207 ]
9208 },
9209 "applies_to": "agents"
9210 }
9211 ],
9212 "created_by": "syntaqx",
9213 "created_at": "2026-10-07T14:02:11.318Z",
9214 "updated_by": "syntaqx",
9215 "updated_at": "2026-10-07T14:02:11.318Z"
9216 },
9217 {
9218 "id": "rs_01kq3b2c3d4e5f6g7h8j9k0m1n",
9219 "level": "workspace",
9220 "workspace": "flagon-io",
9221 "name": "Release freeze",
9222 "enforcement": "evaluate",
9223 "target": "branch",
9224 "conditions": {
9225 "ref_name": {
9226 "include": [
9227 "~DEFAULT_BRANCH",
9228 "release/**"
9229 ],
9230 "exclude": []
9231 },
9232 "repository": {
9233 "include": [
9234 "~ALL"
9235 ],
9236 "exclude": [
9237 "sandbox-*"
9238 ],
9239 "visibility": "any",
9240 "topics": []
9241 }
9242 },
9243 "bypass_actors": [
9244 {
9245 "kind": "team",
9246 "value": "flagon-io/release",
9247 "mode": "always"
9248 }
9249 ],
9250 "rules": [
9251 {
9252 "type": "merge_window",
9253 "parameters": {
9254 "time_zone": "-05:00",
9255 "windows": [
9256 {
9257 "days": [
9258 "mon",
9259 "tue",
9260 "wed",
9261 "thu"
9262 ],
9263 "start": "09:00",
9264 "end": "17:00"
9265 }
9266 ],
9267 "freezes": [
9268 {
9269 "start": "2026-12-20T00:00:00Z",
9270 "end": "2027-01-04T00:00:00Z",
9271 "reason": "Holidays"
9272 }
9273 ],
9274 "exceptions": []
9275 },
9276 "applies_to": "everyone"
9277 }
9278 ],
9279 "created_by": "syntaqx",
9280 "created_at": "2026-10-07T14:02:11.318Z",
9281 "updated_by": "syntaqx",
9282 "updated_at": "2026-10-07T14:02:11.318Z"
9283 }
9284 ],
9285 "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`."
9286 },
9287 "get_repo_ruleset": {
9288 "params": {
9289 "owner": "flagon-io",
9290 "name": "hello",
9291 "id": "rs_01kq3a8b9c0d1e2f3g4h5j6k7m"
9292 },
9293 "response": {
9294 "id": "rs_01kq3a8b9c0d1e2f3g4h5j6k7m",
9295 "level": "repository",
9296 "workspace": "flagon-io",
9297 "repo_id": "rep_01kq0f3a7b8c9d0e1f2g3h4j5k",
9298 "repository": "flagon-io/hello",
9299 "name": "Protect main",
9300 "enforcement": "active",
9301 "target": "branch",
9302 "conditions": {
9303 "ref_name": {
9304 "include": [
9305 "~DEFAULT_BRANCH"
9306 ],
9307 "exclude": []
9308 }
9309 },
9310 "bypass_actors": [
9311 {
9312 "kind": "role",
9313 "value": "admin",
9314 "mode": "pull_requests"
9315 }
9316 ],
9317 "rules": [
9318 {
9319 "type": "deletion",
9320 "parameters": {},
9321 "applies_to": "everyone"
9322 },
9323 {
9324 "type": "non_fast_forward",
9325 "parameters": {},
9326 "applies_to": "everyone"
9327 },
9328 {
9329 "type": "pull_request",
9330 "parameters": {
9331 "required_approvals": 1,
9332 "count_agent_approvals": true,
9333 "dismiss_stale_reviews_on_push": true,
9334 "require_code_owner_review": true,
9335 "require_last_push_approval": false,
9336 "allowed_merge_methods": []
9337 },
9338 "applies_to": "everyone"
9339 },
9340 {
9341 "type": "required_status_checks",
9342 "parameters": {
9343 "checks": [
9344 {
9345 "context": "CI",
9346 "integration": "actions"
9347 }
9348 ],
9349 "strict": true,
9350 "paths": [],
9351 "allow_bypass_on_merge": false
9352 },
9353 "applies_to": "everyone"
9354 },
9355 {
9356 "type": "pull_request",
9357 "parameters": {
9358 "required_approvals": 1,
9359 "count_agent_approvals": false,
9360 "dismiss_stale_reviews_on_push": false,
9361 "require_code_owner_review": false,
9362 "require_last_push_approval": false,
9363 "allowed_merge_methods": []
9364 },
9365 "applies_to": "agents"
9366 },
9367 {
9368 "type": "file_path_restriction",
9369 "parameters": {
9370 "restricted_file_paths": [
9371 ".g1t/workflows/**",
9372 "CODEOWNERS"
9373 ]
9374 },
9375 "applies_to": "agents"
9376 }
9377 ],
9378 "created_by": "syntaqx",
9379 "created_at": "2026-10-07T14:02:11.318Z",
9380 "updated_by": "syntaqx",
9381 "updated_at": "2026-10-07T14:02:11.318Z"
9382 }
9383 },
9384 "create_repo_ruleset": {
9385 "params": {
9386 "owner": "flagon-io",
9387 "name": "hello"
9388 },
9389 "request": {
9390 "ruleset_name": "Protect main",
9391 "enforcement": "active",
9392 "target": "branch",
9393 "conditions": {
9394 "ref_name": {
9395 "include": [
9396 "~DEFAULT_BRANCH"
9397 ],
9398 "exclude": []
9399 }
9400 },
9401 "bypass_actors": [
9402 {
9403 "kind": "role",
9404 "value": "admin",
9405 "mode": "pull_requests"
9406 }
9407 ],
9408 "rules": [
9409 {
9410 "type": "deletion",
9411 "parameters": {},
9412 "applies_to": "everyone"
9413 },
9414 {
9415 "type": "non_fast_forward",
9416 "parameters": {},
9417 "applies_to": "everyone"
9418 },
9419 {
9420 "type": "pull_request",
9421 "parameters": {
9422 "required_approvals": 1,
9423 "count_agent_approvals": true,
9424 "dismiss_stale_reviews_on_push": true,
9425 "require_code_owner_review": true,
9426 "require_last_push_approval": false,
9427 "allowed_merge_methods": []
9428 },
9429 "applies_to": "everyone"
9430 },
9431 {
9432 "type": "required_status_checks",
9433 "parameters": {
9434 "checks": [
9435 {
9436 "context": "CI",
9437 "integration": "actions"
9438 }
9439 ],
9440 "strict": true,
9441 "paths": [],
9442 "allow_bypass_on_merge": false
9443 },
9444 "applies_to": "everyone"
9445 },
9446 {
9447 "type": "pull_request",
9448 "parameters": {
9449 "required_approvals": 1,
9450 "count_agent_approvals": false,
9451 "dismiss_stale_reviews_on_push": false,
9452 "require_code_owner_review": false,
9453 "require_last_push_approval": false,
9454 "allowed_merge_methods": []
9455 },
9456 "applies_to": "agents"
9457 },
9458 {
9459 "type": "file_path_restriction",
9460 "parameters": {
9461 "restricted_file_paths": [
9462 ".g1t/workflows/**",
9463 "CODEOWNERS"
9464 ]
9465 },
9466 "applies_to": "agents"
9467 }
9468 ]
9469 },
9470 "response": {
9471 "id": "rs_01kq3a8b9c0d1e2f3g4h5j6k7m",
9472 "level": "repository",
9473 "workspace": "flagon-io",
9474 "repo_id": "rep_01kq0f3a7b8c9d0e1f2g3h4j5k",
9475 "repository": "flagon-io/hello",
9476 "name": "Protect main",
9477 "enforcement": "active",
9478 "target": "branch",
9479 "conditions": {
9480 "ref_name": {
9481 "include": [
9482 "~DEFAULT_BRANCH"
9483 ],
9484 "exclude": []
9485 }
9486 },
9487 "bypass_actors": [
9488 {
9489 "kind": "role",
9490 "value": "admin",
9491 "mode": "pull_requests"
9492 }
9493 ],
9494 "rules": [
9495 {
9496 "type": "deletion",
9497 "parameters": {},
9498 "applies_to": "everyone"
9499 },
9500 {
9501 "type": "non_fast_forward",
9502 "parameters": {},
9503 "applies_to": "everyone"
9504 },
9505 {
9506 "type": "pull_request",
9507 "parameters": {
9508 "required_approvals": 1,
9509 "count_agent_approvals": true,
9510 "dismiss_stale_reviews_on_push": true,
9511 "require_code_owner_review": true,
9512 "require_last_push_approval": false,
9513 "allowed_merge_methods": []
9514 },
9515 "applies_to": "everyone"
9516 },
9517 {
9518 "type": "required_status_checks",
9519 "parameters": {
9520 "checks": [
9521 {
9522 "context": "CI",
9523 "integration": "actions"
9524 }
9525 ],
9526 "strict": true,
9527 "paths": [],
9528 "allow_bypass_on_merge": false
9529 },
9530 "applies_to": "everyone"
9531 },
9532 {
9533 "type": "pull_request",
9534 "parameters": {
9535 "required_approvals": 1,
9536 "count_agent_approvals": false,
9537 "dismiss_stale_reviews_on_push": false,
9538 "require_code_owner_review": false,
9539 "require_last_push_approval": false,
9540 "allowed_merge_methods": []
9541 },
9542 "applies_to": "agents"
9543 },
9544 {
9545 "type": "file_path_restriction",
9546 "parameters": {
9547 "restricted_file_paths": [
9548 ".g1t/workflows/**",
9549 "CODEOWNERS"
9550 ]
9551 },
9552 "applies_to": "agents"
9553 }
9554 ],
9555 "created_by": "syntaqx",
9556 "created_at": "2026-10-07T14:02:11.318Z",
9557 "updated_by": "syntaqx",
9558 "updated_at": "2026-10-07T14:02:11.318Z"
9559 },
9560 "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."
9561 },
9562 "update_repo_ruleset": {
9563 "params": {
9564 "owner": "flagon-io",
9565 "name": "hello",
9566 "id": "rs_01kq3a8b9c0d1e2f3g4h5j6k7m"
9567 },
9568 "request": {
9569 "enforcement": "evaluate"
9570 },
9571 "response": {
9572 "id": "rs_01kq3a8b9c0d1e2f3g4h5j6k7m",
9573 "level": "repository",
9574 "workspace": "flagon-io",
9575 "repo_id": "rep_01kq0f3a7b8c9d0e1f2g3h4j5k",
9576 "repository": "flagon-io/hello",
9577 "name": "Protect main",
9578 "enforcement": "evaluate",
9579 "target": "branch",
9580 "conditions": {
9581 "ref_name": {
9582 "include": [
9583 "~DEFAULT_BRANCH"
9584 ],
9585 "exclude": []
9586 }
9587 },
9588 "bypass_actors": [
9589 {
9590 "kind": "role",
9591 "value": "admin",
9592 "mode": "pull_requests"
9593 }
9594 ],
9595 "rules": [
9596 {
9597 "type": "deletion",
9598 "parameters": {},
9599 "applies_to": "everyone"
9600 },
9601 {
9602 "type": "non_fast_forward",
9603 "parameters": {},
9604 "applies_to": "everyone"
9605 },
9606 {
9607 "type": "pull_request",
9608 "parameters": {
9609 "required_approvals": 1,
9610 "count_agent_approvals": true,
9611 "dismiss_stale_reviews_on_push": true,
9612 "require_code_owner_review": true,
9613 "require_last_push_approval": false,
9614 "allowed_merge_methods": []
9615 },
9616 "applies_to": "everyone"
9617 },
9618 {
9619 "type": "required_status_checks",
9620 "parameters": {
9621 "checks": [
9622 {
9623 "context": "CI",
9624 "integration": "actions"
9625 }
9626 ],
9627 "strict": true,
9628 "paths": [],
9629 "allow_bypass_on_merge": false
9630 },
9631 "applies_to": "everyone"
9632 },
9633 {
9634 "type": "pull_request",
9635 "parameters": {
9636 "required_approvals": 1,
9637 "count_agent_approvals": false,
9638 "dismiss_stale_reviews_on_push": false,
9639 "require_code_owner_review": false,
9640 "require_last_push_approval": false,
9641 "allowed_merge_methods": []
9642 },
9643 "applies_to": "agents"
9644 },
9645 {
9646 "type": "file_path_restriction",
9647 "parameters": {
9648 "restricted_file_paths": [
9649 ".g1t/workflows/**",
9650 "CODEOWNERS"
9651 ]
9652 },
9653 "applies_to": "agents"
9654 }
9655 ],
9656 "created_by": "syntaqx",
9657 "created_at": "2026-10-07T14:02:11.318Z",
9658 "updated_by": "syntaqx",
9659 "updated_at": "2026-10-07T14:02:11.318Z"
9660 },
9661 "notes": "Fields left out stay as they are. `rules` and `bypass_actors`, when given, replace the whole list."
9662 },
9663 "delete_repo_ruleset": {
9664 "params": {
9665 "owner": "flagon-io",
9666 "name": "hello",
9667 "id": "rs_01kq3a8b9c0d1e2f3g4h5j6k7m"
9668 },
9669 "response": {
9670 "deleted": true
9671 }
9672 },
9673 "get_branch_rules": {
9674 "params": {
9675 "owner": "flagon-io",
9676 "name": "hello",
9677 "branch": "main"
9678 },
9679 "response": {
9680 "name": "main",
9681 "target": "branch",
9682 "default_branch": true,
9683 "rules": [
9684 {
9685 "type": "deletion",
9686 "parameters": {},
9687 "applies_to": "everyone",
9688 "ruleset_id": "rs_01kq3a8b9c0d1e2f3g4h5j6k7m",
9689 "ruleset_name": "Protect main",
9690 "level": "repository",
9691 "enforcement": "active"
9692 },
9693 {
9694 "type": "non_fast_forward",
9695 "parameters": {},
9696 "applies_to": "everyone",
9697 "ruleset_id": "rs_01kq3a8b9c0d1e2f3g4h5j6k7m",
9698 "ruleset_name": "Protect main",
9699 "level": "repository",
9700 "enforcement": "active"
9701 },
9702 {
9703 "type": "pull_request",
9704 "parameters": {
9705 "required_approvals": 1,
9706 "count_agent_approvals": true,
9707 "dismiss_stale_reviews_on_push": true,
9708 "require_code_owner_review": true,
9709 "require_last_push_approval": false,
9710 "allowed_merge_methods": []
9711 },
9712 "applies_to": "everyone",
9713 "ruleset_id": "rs_01kq3a8b9c0d1e2f3g4h5j6k7m",
9714 "ruleset_name": "Protect main",
9715 "level": "repository",
9716 "enforcement": "active"
9717 },
9718 {
9719 "type": "required_status_checks",
9720 "parameters": {
9721 "checks": [
9722 {
9723 "context": "CI",
9724 "integration": "actions"
9725 }
9726 ],
9727 "strict": true,
9728 "paths": [],
9729 "allow_bypass_on_merge": false
9730 },
9731 "applies_to": "everyone",
9732 "ruleset_id": "rs_01kq3a8b9c0d1e2f3g4h5j6k7m",
9733 "ruleset_name": "Protect main",
9734 "level": "repository",
9735 "enforcement": "active"
9736 },
9737 {
9738 "type": "merge_window",
9739 "parameters": {
9740 "time_zone": "-05:00",
9741 "windows": [
9742 {
9743 "days": [
9744 "mon",
9745 "tue",
9746 "wed",
9747 "thu"
9748 ],
9749 "start": "09:00",
9750 "end": "17:00"
9751 }
9752 ],
9753 "freezes": [
9754 {
9755 "start": "2026-12-20T00:00:00Z",
9756 "end": "2027-01-04T00:00:00Z",
9757 "reason": "Holidays"
9758 }
9759 ],
9760 "exceptions": []
9761 },
9762 "applies_to": "everyone",
9763 "ruleset_id": "rs_01kq3b2c3d4e5f6g7h8j9k0m1n",
9764 "ruleset_name": "Release freeze",
9765 "level": "workspace",
9766 "enforcement": "evaluate"
9767 }
9768 ],
9769 "rulesets": [
9770 {
9771 "id": "rs_01kq3a8b9c0d1e2f3g4h5j6k7m",
9772 "name": "Protect main",
9773 "level": "repository",
9774 "enforcement": "active",
9775 "bypass_actors": [
9776 {
9777 "kind": "role",
9778 "value": "admin",
9779 "mode": "pull_requests"
9780 }
9781 ]
9782 },
9783 {
9784 "id": "rs_01kq3b2c3d4e5f6g7h8j9k0m1n",
9785 "name": "Release freeze",
9786 "level": "workspace",
9787 "enforcement": "evaluate",
9788 "bypass_actors": [
9789 {
9790 "kind": "team",
9791 "value": "flagon-io/release",
9792 "mode": "always"
9793 }
9794 ]
9795 }
9796 ]
9797 },
9798 "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."
9799 },
9800 "list_rule_evaluations": {
9801 "params": {
9802 "owner": "flagon-io",
9803 "name": "hello"
9804 },
9805 "query": {
9806 "problems_only": "true"
9807 },
9808 "response": {
9809 "evaluations": [
9810 {
9811 "id": "rev_01kq3c4d5e6f7g8h9j0k1m2n3p",
9812 "repo_id": "rep_01kq0f3a7b8c9d0e1f2g3h4j5k",
9813 "workspace": "flagon-io",
9814 "ruleset_id": "rs_01kq3a8b9c0d1e2f3g4h5j6k7m",
9815 "ruleset_name": "Protect main",
9816 "enforcement": "active",
9817 "action": "push",
9818 "git_ref": "refs/heads/main",
9819 "actor": "g1t",
9820 "actor_kind": "agent",
9821 "verdict": "fail",
9822 "violations": [
9823 {
9824 "rule": "pull_request",
9825 "ruleset_id": "rs_01kq3a8b9c0d1e2f3g4h5j6k7m",
9826 "ruleset_name": "Protect main",
9827 "enforcement": "active",
9828 "message": "Changes to main must be made through a pull request.",
9829 "remedy": "Push a branch, open a pull request into main, and merge it."
9830 }
9831 ],
9832 "number": null,
9833 "sha": "9f3c2a1b7e6d5c4b3a2918f7e6d5c4b3a2918f7e",
9834 "repository": "flagon-io/hello",
9835 "created_at": "2026-10-07T14:02:11.318Z"
9836 }
9837 ],
9838 "next": null,
9839 "insights": {
9840 "days": 30,
9841 "total": 214,
9842 "passed": 198,
9843 "blocked": 9,
9844 "would_block": 5,
9845 "bypassed": 2,
9846 "by_ruleset": [
9847 {
9848 "ruleset_id": "rs_01kq3a8b9c0d1e2f3g4h5j6k7m",
9849 "ruleset_name": "Protect main",
9850 "enforcement": "active",
9851 "total": 120,
9852 "blocked": 9,
9853 "would_block": 0,
9854 "bypassed": 2
9855 }
9856 ],
9857 "by_rule": [
9858 {
9859 "rule": "pull_request",
9860 "count": 7
9861 },
9862 {
9863 "rule": "non_fast_forward",
9864 "count": 2
9865 }
9866 ]
9867 }
9868 },
9869 "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."
9870 },
9871 "list_workspace_rulesets": {
9872 "params": {
9873 "workspace": "flagon-io"
9874 },
9875 "response": [
9876 {
9877 "id": "rs_01kq3b2c3d4e5f6g7h8j9k0m1n",
9878 "level": "workspace",
9879 "workspace": "flagon-io",
9880 "name": "Release freeze",
9881 "enforcement": "evaluate",
9882 "target": "branch",
9883 "conditions": {
9884 "ref_name": {
9885 "include": [
9886 "~DEFAULT_BRANCH",
9887 "release/**"
9888 ],
9889 "exclude": []
9890 },
9891 "repository": {
9892 "include": [
9893 "~ALL"
9894 ],
9895 "exclude": [
9896 "sandbox-*"
9897 ],
9898 "visibility": "any",
9899 "topics": []
9900 }
9901 },
9902 "bypass_actors": [
9903 {
9904 "kind": "team",
9905 "value": "flagon-io/release",
9906 "mode": "always"
9907 }
9908 ],
9909 "rules": [
9910 {
9911 "type": "merge_window",
9912 "parameters": {
9913 "time_zone": "-05:00",
9914 "windows": [
9915 {
9916 "days": [
9917 "mon",
9918 "tue",
9919 "wed",
9920 "thu"
9921 ],
9922 "start": "09:00",
9923 "end": "17:00"
9924 }
9925 ],
9926 "freezes": [
9927 {
9928 "start": "2026-12-20T00:00:00Z",
9929 "end": "2027-01-04T00:00:00Z",
9930 "reason": "Holidays"
9931 }
9932 ],
9933 "exceptions": []
9934 },
9935 "applies_to": "everyone"
9936 }
9937 ],
9938 "created_by": "syntaqx",
9939 "created_at": "2026-10-07T14:02:11.318Z",
9940 "updated_by": "syntaqx",
9941 "updated_at": "2026-10-07T14:02:11.318Z"
9942 }
9943 ]
9944 },
9945 "get_workspace_ruleset": {
9946 "params": {
9947 "workspace": "flagon-io",
9948 "id": "rs_01kq3b2c3d4e5f6g7h8j9k0m1n"
9949 },
9950 "response": {
9951 "id": "rs_01kq3b2c3d4e5f6g7h8j9k0m1n",
9952 "level": "workspace",
9953 "workspace": "flagon-io",
9954 "name": "Release freeze",
9955 "enforcement": "evaluate",
9956 "target": "branch",
9957 "conditions": {
9958 "ref_name": {
9959 "include": [
9960 "~DEFAULT_BRANCH",
9961 "release/**"
9962 ],
9963 "exclude": []
9964 },
9965 "repository": {
9966 "include": [
9967 "~ALL"
9968 ],
9969 "exclude": [
9970 "sandbox-*"
9971 ],
9972 "visibility": "any",
9973 "topics": []
9974 }
9975 },
9976 "bypass_actors": [
9977 {
9978 "kind": "team",
9979 "value": "flagon-io/release",
9980 "mode": "always"
9981 }
9982 ],
9983 "rules": [
9984 {
9985 "type": "merge_window",
9986 "parameters": {
9987 "time_zone": "-05:00",
9988 "windows": [
9989 {
9990 "days": [
9991 "mon",
9992 "tue",
9993 "wed",
9994 "thu"
9995 ],
9996 "start": "09:00",
9997 "end": "17:00"
9998 }
9999 ],
10000 "freezes": [
10001 {
10002 "start": "2026-12-20T00:00:00Z",
10003 "end": "2027-01-04T00:00:00Z",
10004 "reason": "Holidays"
10005 }
10006 ],
10007 "exceptions": []
10008 },
10009 "applies_to": "everyone"
10010 }
10011 ],
10012 "created_by": "syntaqx",
10013 "created_at": "2026-10-07T14:02:11.318Z",
10014 "updated_by": "syntaqx",
10015 "updated_at": "2026-10-07T14:02:11.318Z"
10016 }
10017 },
10018 "create_workspace_ruleset": {
10019 "params": {
10020 "workspace": "flagon-io"
10021 },
10022 "request": {
10023 "ruleset_name": "Release freeze",
10024 "enforcement": "evaluate",
10025 "target": "branch",
10026 "conditions": {
10027 "ref_name": {
10028 "include": [
10029 "~DEFAULT_BRANCH",
10030 "release/**"
10031 ],
10032 "exclude": []
10033 },
10034 "repository": {
10035 "include": [
10036 "~ALL"
10037 ],
10038 "exclude": [
10039 "sandbox-*"
10040 ],
10041 "visibility": "any",
10042 "topics": []
10043 }
10044 },
10045 "bypass_actors": [
10046 {
10047 "kind": "team",
10048 "value": "flagon-io/release",
10049 "mode": "always"
10050 }
10051 ],
10052 "rules": [
10053 {
10054 "type": "merge_window",
10055 "parameters": {
10056 "time_zone": "-05:00",
10057 "windows": [
10058 {
10059 "days": [
10060 "mon",
10061 "tue",
10062 "wed",
10063 "thu"
10064 ],
10065 "start": "09:00",
10066 "end": "17:00"
10067 }
10068 ],
10069 "freezes": [
10070 {
10071 "start": "2026-12-20T00:00:00Z",
10072 "end": "2027-01-04T00:00:00Z",
10073 "reason": "Holidays"
10074 }
10075 ],
10076 "exceptions": []
10077 },
10078 "applies_to": "everyone"
10079 }
10080 ]
10081 },
10082 "response": {
10083 "id": "rs_01kq3b2c3d4e5f6g7h8j9k0m1n",
10084 "level": "workspace",
10085 "workspace": "flagon-io",
10086 "name": "Release freeze",
10087 "enforcement": "evaluate",
10088 "target": "branch",
10089 "conditions": {
10090 "ref_name": {
10091 "include": [
10092 "~DEFAULT_BRANCH",
10093 "release/**"
10094 ],
10095 "exclude": []
10096 },
10097 "repository": {
10098 "include": [
10099 "~ALL"
10100 ],
10101 "exclude": [
10102 "sandbox-*"
10103 ],
10104 "visibility": "any",
10105 "topics": []
10106 }
10107 },
10108 "bypass_actors": [
10109 {
10110 "kind": "team",
10111 "value": "flagon-io/release",
10112 "mode": "always"
10113 }
10114 ],
10115 "rules": [
10116 {
10117 "type": "merge_window",
10118 "parameters": {
10119 "time_zone": "-05:00",
10120 "windows": [
10121 {
10122 "days": [
10123 "mon",
10124 "tue",
10125 "wed",
10126 "thu"
10127 ],
10128 "start": "09:00",
10129 "end": "17:00"
10130 }
10131 ],
10132 "freezes": [
10133 {
10134 "start": "2026-12-20T00:00:00Z",
10135 "end": "2027-01-04T00:00:00Z",
10136 "reason": "Holidays"
10137 }
10138 ],
10139 "exceptions": []
10140 },
10141 "applies_to": "everyone"
10142 }
10143 ],
10144 "created_by": "syntaqx",
10145 "created_at": "2026-10-07T14:02:11.318Z",
10146 "updated_by": "syntaqx",
10147 "updated_at": "2026-10-07T14:02:11.318Z"
10148 },
10149 "notes": "`conditions.repository` chooses the repositories it holds in; left out, every repository of the workspace."
10150 },
10151 "update_workspace_ruleset": {
10152 "params": {
10153 "workspace": "flagon-io",
10154 "id": "rs_01kq3b2c3d4e5f6g7h8j9k0m1n"
10155 },
10156 "request": {
10157 "enforcement": "active"
10158 },
10159 "response": {
10160 "id": "rs_01kq3b2c3d4e5f6g7h8j9k0m1n",
10161 "level": "workspace",
10162 "workspace": "flagon-io",
10163 "name": "Release freeze",
10164 "enforcement": "active",
10165 "target": "branch",
10166 "conditions": {
10167 "ref_name": {
10168 "include": [
10169 "~DEFAULT_BRANCH",
10170 "release/**"
10171 ],
10172 "exclude": []
10173 },
10174 "repository": {
10175 "include": [
10176 "~ALL"
10177 ],
10178 "exclude": [
10179 "sandbox-*"
10180 ],
10181 "visibility": "any",
10182 "topics": []
10183 }
10184 },
10185 "bypass_actors": [
10186 {
10187 "kind": "team",
10188 "value": "flagon-io/release",
10189 "mode": "always"
10190 }
10191 ],
10192 "rules": [
10193 {
10194 "type": "merge_window",
10195 "parameters": {
10196 "time_zone": "-05:00",
10197 "windows": [
10198 {
10199 "days": [
10200 "mon",
10201 "tue",
10202 "wed",
10203 "thu"
10204 ],
10205 "start": "09:00",
10206 "end": "17:00"
10207 }
10208 ],
10209 "freezes": [
10210 {
10211 "start": "2026-12-20T00:00:00Z",
10212 "end": "2027-01-04T00:00:00Z",
10213 "reason": "Holidays"
10214 }
10215 ],
10216 "exceptions": []
10217 },
10218 "applies_to": "everyone"
10219 }
10220 ],
10221 "created_by": "syntaqx",
10222 "created_at": "2026-10-07T14:02:11.318Z",
10223 "updated_by": "syntaqx",
10224 "updated_at": "2026-10-07T14:02:11.318Z"
10225 }
10226 },
10227 "delete_workspace_ruleset": {
10228 "params": {
10229 "workspace": "flagon-io",
10230 "id": "rs_01kq3b2c3d4e5f6g7h8j9k0m1n"
10231 },
10232 "response": {
10233 "deleted": true
10234 }
10235 },
10236 "list_workspace_rule_evaluations": {
10237 "params": {
10238 "workspace": "flagon-io"
10239 },
10240 "response": {
10241 "evaluations": [
10242 {
10243 "id": "rev_01kq3c4d5e6f7g8h9j0k1m2n3p",
10244 "repo_id": "rep_01kq0f3a7b8c9d0e1f2g3h4j5k",
10245 "workspace": "flagon-io",
10246 "ruleset_id": "rs_01kq3a8b9c0d1e2f3g4h5j6k7m",
10247 "ruleset_name": "Protect main",
10248 "enforcement": "active",
10249 "action": "push",
10250 "git_ref": "refs/heads/main",
10251 "actor": "g1t",
10252 "actor_kind": "agent",
10253 "verdict": "fail",
10254 "violations": [
10255 {
10256 "rule": "pull_request",
10257 "ruleset_id": "rs_01kq3a8b9c0d1e2f3g4h5j6k7m",
10258 "ruleset_name": "Protect main",
10259 "enforcement": "active",
10260 "message": "Changes to main must be made through a pull request.",
10261 "remedy": "Push a branch, open a pull request into main, and merge it."
10262 }
10263 ],
10264 "number": null,
10265 "sha": "9f3c2a1b7e6d5c4b3a2918f7e6d5c4b3a2918f7e",
10266 "repository": "flagon-io/hello",
10267 "created_at": "2026-10-07T14:02:11.318Z"
10268 }
10269 ],
10270 "next": null,
10271 "insights": {
10272 "days": 30,
10273 "total": 214,
10274 "passed": 198,
10275 "blocked": 9,
10276 "would_block": 5,
10277 "bypassed": 2,
10278 "by_ruleset": [
10279 {
10280 "ruleset_id": "rs_01kq3a8b9c0d1e2f3g4h5j6k7m",
10281 "ruleset_name": "Protect main",
10282 "enforcement": "active",
10283 "total": 120,
10284 "blocked": 9,
10285 "would_block": 0,
10286 "bypassed": 2
10287 }
10288 ],
10289 "by_rule": [
10290 {
10291 "rule": "pull_request",
10292 "count": 7
10293 },
10294 {
10295 "rule": "non_fast_forward",
10296 "count": 2
10297 }
10298 ]
10299 }
10300 }
10301 },
10302 "list_deployments": {
10303 "params": {
10304 "owner": "flagon-io",
10305 "name": "g1t"
10306 },
10307 "query": {
10308 "environment": "production",
10309 "per_page": "2"
10310 },
10311 "response": {
10312 "deployments": [
10313 {
10314 "id": "dep_01kq8m3t5v7x9z1b3d5f7h9k2m",
10315 "environment": "production",
10316 "ref": "main",
10317 "sha": "7c1e9a4b2d6f80135ac9e2b7d4f6a8c0e1b3d5f7",
10318 "task": "deploy",
10319 "description": "Deploy",
10320 "payload": {},
10321 "transient_environment": false,
10322 "production_environment": true,
10323 "state": "success",
10324 "environment_url": "https://g1t.sh",
10325 "log_url": "https://g1t.sh/flagon-io/g1t/actions/runs/run_01kq8m2r4t6v8x0z2b4d6f8h0k",
10326 "creator": "syntaqx",
10327 "source": "actions",
10328 "run_id": "run_01kq8m2r4t6v8x0z2b4d6f8h0k",
10329 "run_url": "https://g1t.sh/flagon-io/g1t/actions/runs/run_01kq8m2r4t6v8x0z2b4d6f8h0k",
10330 "project": null,
10331 "number": null,
10332 "created_at": "2026-10-07T18:02:11.204Z",
10333 "updated_at": "2026-10-07T18:19:47.881Z"
10334 }
10335 ],
10336 "total_count": 304,
10337 "page": 1,
10338 "per_page": 2
10339 },
10340 "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/)."
10341 },
10342 "create_deployment": {
10343 "params": {
10344 "owner": "flagon-io",
10345 "name": "g1t"
10346 },
10347 "request": {
10348 "ref": "main",
10349 "environment": "staging",
10350 "description": "Deployed by the release pipeline",
10351 "payload": {
10352 "pipeline": 4182,
10353 "region": "us-east"
10354 },
10355 "state": "in_progress",
10356 "log_url": "https://ci.example.com/pipelines/4182"
10357 },
10358 "response": {
10359 "id": "dep_01kq7z9a1c3e5g7j9m1p3r5t7v",
10360 "environment": "staging",
10361 "ref": "main",
10362 "sha": "4b8d0f2a6c1e3579bd02468ace13579bdf02468a",
10363 "task": "deploy",
10364 "description": "Deployed by the release pipeline",
10365 "payload": {
10366 "pipeline": 4182,
10367 "region": "us-east"
10368 },
10369 "transient_environment": false,
10370 "production_environment": false,
10371 "state": "in_progress",
10372 "environment_url": null,
10373 "log_url": "https://ci.example.com/pipelines/4182",
10374 "creator": "flagon-io",
10375 "source": "api",
10376 "run_id": null,
10377 "run_url": null,
10378 "project": null,
10379 "number": null,
10380 "created_at": "2026-10-06T21:40:03.512Z",
10381 "updated_at": "2026-10-06T21:40:03.512Z",
10382 "statuses": [
10383 {
10384 "id": "dst_01kq7z9a1d4f6h8k0m2p4r6t8v",
10385 "deployment_id": "dep_01kq7z9a1c3e5g7j9m1p3r5t7v",
10386 "state": "in_progress",
10387 "description": "Deployed by the release pipeline",
10388 "environment_url": null,
10389 "log_url": "https://ci.example.com/pipelines/4182",
10390 "creator": "flagon-io",
10391 "created_at": "2026-10-06T21:40:03.512Z"
10392 }
10393 ]
10394 },
10395 "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/)."
10396 },
10397 "get_deployment": {
10398 "params": {
10399 "owner": "flagon-io",
10400 "name": "g1t",
10401 "id": "dep_01kq8m3t5v7x9z1b3d5f7h9k2m"
10402 },
10403 "response": {
10404 "id": "dep_01kq8m3t5v7x9z1b3d5f7h9k2m",
10405 "environment": "production",
10406 "ref": "main",
10407 "sha": "7c1e9a4b2d6f80135ac9e2b7d4f6a8c0e1b3d5f7",
10408 "task": "deploy",
10409 "description": "Deploy",
10410 "payload": {},
10411 "transient_environment": false,
10412 "production_environment": true,
10413 "state": "success",
10414 "environment_url": "https://g1t.sh",
10415 "log_url": "https://g1t.sh/flagon-io/g1t/actions/runs/run_01kq8m2r4t6v8x0z2b4d6f8h0k",
10416 "creator": "syntaqx",
10417 "source": "actions",
10418 "run_id": "run_01kq8m2r4t6v8x0z2b4d6f8h0k",
10419 "run_url": "https://g1t.sh/flagon-io/g1t/actions/runs/run_01kq8m2r4t6v8x0z2b4d6f8h0k",
10420 "project": null,
10421 "number": null,
10422 "created_at": "2026-10-07T18:02:11.204Z",
10423 "updated_at": "2026-10-07T18:19:47.881Z",
10424 "statuses": [
10425 {
10426 "id": "dst_01kq8m3t5w0a2c4e6g8j0m2p4r",
10427 "deployment_id": "dep_01kq8m3t5v7x9z1b3d5f7h9k2m",
10428 "state": "in_progress",
10429 "description": "Deploy is deploying",
10430 "environment_url": "https://g1t.sh",
10431 "log_url": "https://g1t.sh/flagon-io/g1t/actions/runs/run_01kq8m2r4t6v8x0z2b4d6f8h0k",
10432 "creator": "syntaqx",
10433 "created_at": "2026-10-07T18:02:11.204Z"
10434 },
10435 {
10436 "id": "dst_01kq8n4v6x8z0b2d4f6h8k0m2p",
10437 "deployment_id": "dep_01kq8m3t5v7x9z1b3d5f7h9k2m",
10438 "state": "success",
10439 "description": "Deploy deployed",
10440 "environment_url": "https://g1t.sh",
10441 "log_url": "https://g1t.sh/flagon-io/g1t/actions/runs/run_01kq8m2r4t6v8x0z2b4d6f8h0k",
10442 "creator": "syntaqx",
10443 "created_at": "2026-10-07T18:19:47.881Z"
10444 }
10445 ]
10446 },
10447 "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."
10448 },
10449 "list_deployment_statuses": {
10450 "params": {
10451 "owner": "flagon-io",
10452 "name": "g1t",
10453 "id": "dep_01kq8m3t5v7x9z1b3d5f7h9k2m"
10454 },
10455 "response": [
10456 {
10457 "id": "dst_01kq8n4v6x8z0b2d4f6h8k0m2p",
10458 "deployment_id": "dep_01kq8m3t5v7x9z1b3d5f7h9k2m",
10459 "state": "success",
10460 "description": "Deploy deployed",
10461 "environment_url": "https://g1t.sh",
10462 "log_url": "https://g1t.sh/flagon-io/g1t/actions/runs/run_01kq8m2r4t6v8x0z2b4d6f8h0k",
10463 "creator": "syntaqx",
10464 "created_at": "2026-10-07T18:19:47.881Z"
10465 },
10466 {
10467 "id": "dst_01kq8m3t5w0a2c4e6g8j0m2p4r",
10468 "deployment_id": "dep_01kq8m3t5v7x9z1b3d5f7h9k2m",
10469 "state": "in_progress",
10470 "description": "Deploy is deploying",
10471 "environment_url": "https://g1t.sh",
10472 "log_url": "https://g1t.sh/flagon-io/g1t/actions/runs/run_01kq8m2r4t6v8x0z2b4d6f8h0k",
10473 "creator": "syntaqx",
10474 "created_at": "2026-10-07T18:02:11.204Z"
10475 }
10476 ]
10477 },
10478 "create_deployment_status": {
10479 "params": {
10480 "owner": "flagon-io",
10481 "name": "g1t",
10482 "id": "dep_01kq7z9a1c3e5g7j9m1p3r5t7v"
10483 },
10484 "request": {
10485 "state": "failure",
10486 "description": "Smoke tests failed",
10487 "log_url": "https://ci.example.com/pipelines/4182"
10488 },
10489 "response": {
10490 "id": "dst_01kq7zc2e4g6j8m0p2r4t6v8x0",
10491 "deployment_id": "dep_01kq7z9a1c3e5g7j9m1p3r5t7v",
10492 "state": "failure",
10493 "description": "Smoke tests failed",
10494 "environment_url": null,
10495 "log_url": "https://ci.example.com/pipelines/4182",
10496 "creator": "flagon-io",
10497 "created_at": "2026-10-06T21:44:58.020Z"
10498 },
10499 "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."
10500 },
10501 "list_environments": {
10502 "params": {
10503 "owner": "flagon-io",
10504 "name": "g1t"
10505 },
10506 "response": {
10507 "total_count": 304,
10508 "environments": [
10509 {
10510 "name": "production",
10511 "url": "https://g1t.sh",
10512 "production_environment": true,
10513 "transient_environment": false,
10514 "deployments_count": 281,
10515 "latest": {
10516 "id": "dep_01kq8m3t5v7x9z1b3d5f7h9k2m",
10517 "environment": "production",
10518 "ref": "main",
10519 "sha": "7c1e9a4b2d6f80135ac9e2b7d4f6a8c0e1b3d5f7",
10520 "task": "deploy",
10521 "description": "Deploy",
10522 "payload": {},
10523 "transient_environment": false,
10524 "production_environment": true,
10525 "state": "success",
10526 "environment_url": "https://g1t.sh",
10527 "log_url": "https://g1t.sh/flagon-io/g1t/actions/runs/run_01kq8m2r4t6v8x0z2b4d6f8h0k",
10528 "creator": "syntaqx",
10529 "source": "actions",
10530 "run_id": "run_01kq8m2r4t6v8x0z2b4d6f8h0k",
10531 "run_url": "https://g1t.sh/flagon-io/g1t/actions/runs/run_01kq8m2r4t6v8x0z2b4d6f8h0k",
10532 "project": null,
10533 "number": null,
10534 "created_at": "2026-10-07T18:02:11.204Z",
10535 "updated_at": "2026-10-07T18:19:47.881Z"
10536 },
10537 "current": {
10538 "id": "dep_01kq8m3t5v7x9z1b3d5f7h9k2m",
10539 "environment": "production",
10540 "ref": "main",
10541 "sha": "7c1e9a4b2d6f80135ac9e2b7d4f6a8c0e1b3d5f7",
10542 "task": "deploy",
10543 "description": "Deploy",
10544 "payload": {},
10545 "transient_environment": false,
10546 "production_environment": true,
10547 "state": "success",
10548 "environment_url": "https://g1t.sh",
10549 "log_url": "https://g1t.sh/flagon-io/g1t/actions/runs/run_01kq8m2r4t6v8x0z2b4d6f8h0k",
10550 "creator": "syntaqx",
10551 "source": "actions",
10552 "run_id": "run_01kq8m2r4t6v8x0z2b4d6f8h0k",
10553 "run_url": "https://g1t.sh/flagon-io/g1t/actions/runs/run_01kq8m2r4t6v8x0z2b4d6f8h0k",
10554 "project": null,
10555 "number": null,
10556 "created_at": "2026-10-07T18:02:11.204Z",
10557 "updated_at": "2026-10-07T18:19:47.881Z"
10558 },
10559 "updated_at": "2026-10-07T18:19:47.881Z"
10560 },
10561 {
10562 "name": "staging",
10563 "url": null,
10564 "production_environment": false,
10565 "transient_environment": false,
10566 "deployments_count": 19,
10567 "latest": {
10568 "id": "dep_01kq7z9a1c3e5g7j9m1p3r5t7v",
10569 "environment": "staging",
10570 "ref": "main",
10571 "sha": "4b8d0f2a6c1e3579bd02468ace13579bdf02468a",
10572 "task": "deploy",
10573 "description": "Deployed by the release pipeline",
10574 "payload": {
10575 "pipeline": 4182,
10576 "region": "us-east"
10577 },
10578 "transient_environment": false,
10579 "production_environment": false,
10580 "state": "failure",
10581 "environment_url": null,
10582 "log_url": "https://ci.example.com/pipelines/4182",
10583 "creator": "flagon-io",
10584 "source": "api",
10585 "run_id": null,
10586 "run_url": null,
10587 "project": null,
10588 "number": null,
10589 "created_at": "2026-10-06T21:40:03.512Z",
10590 "updated_at": "2026-10-06T21:44:58.020Z"
10591 },
10592 "current": null,
10593 "updated_at": "2026-10-06T21:44:58.020Z"
10594 }
10595 ]
10596 },
10597 "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."
10598 },
10599 "start_deployment_build": {
10600 "params": {
10601 "owner": "flagon-io",
10602 "name": "hello"
10603 },
10604 "request": {
10605 "project": "hello"
10606 },
10607 "response": {
10608 "deploy_id": "dpl_01kq9c4e6g8j0m2p4r6t8v0x2z",
10609 "token": "…",
10610 "kind": "preview",
10611 "project": "hello",
10612 "branch": "new-header",
10613 "number": 42,
10614 "commit": "9f2c4e6a8b0d1f3e5a7c9b1d3f5e7a9c0b2d4f6e",
10615 "url": "https://hello-git-new-header-flagonio.g1t.page",
10616 "trusted": true,
10617 "root_dir": "",
10618 "build_command": null,
10619 "output_dir": null,
10620 "build_as": "auto",
10621 "dockerfile": null,
10622 "build_env": {
10623 "PUBLIC_API_URL": "https://api.example.com"
10624 },
10625 "build_secrets": {
10626 "SENTRY_AUTH_TOKEN": "…"
10627 }
10628 },
10629 "notes": "Called from a workflow step with the job's own token, `${{ github.token }}`, in a job with `permissions: deployments: write`; the [`g1t/deploy`](/guides/deployments/#deploying-from-a-workflow) action calls it, masks the token and the secrets, and runs `g1t-runner deploy` with them. Any other token is refused. This is a pull request's run, so it builds the pull request's preview; the same workflow on the production branch builds production. See [Deploying from a workflow](/guides/deployments/#deploying-from-a-workflow)."
10630 },
10631 "get_environment": {
10632 "params": {
10633 "owner": "flagon-io",
10634 "name": "docs",
10635 "environment": "preview"
10636 },
10637 "response": {
10638 "name": "preview",
10639 "url": "https://docs-git-docs-deployments-flagon-io.g1t.page",
10640 "production_environment": false,
10641 "transient_environment": true,
10642 "deployments_count": 87,
10643 "latest": {
10644 "id": "dpl_01kq8p2b4d6f8h0k2m4p6r8t0v",
10645 "environment": "preview",
10646 "ref": "docs-deployments",
10647 "sha": "e2f4a6c8b0d1e3f5a7c9b1d3e5f7a9c1b3d5e7f9",
10648 "task": "deploy",
10649 "description": "Preview of docs-deployments on g1t.page",
10650 "payload": {},
10651 "transient_environment": true,
10652 "production_environment": false,
10653 "state": "success",
10654 "environment_url": "https://docs-git-docs-deployments-flagon-io.g1t.page",
10655 "log_url": "https://g1t.sh/flagon-io/docs/deployments/dpl_01kq8p2b4d6f8h0k2m4p6r8t0v",
10656 "creator": "syntaqx",
10657 "source": "g1t_page",
10658 "run_id": null,
10659 "run_url": null,
10660 "project": "docs",
10661 "number": 412,
10662 "created_at": "2026-10-08T01:12:44.630Z",
10663 "updated_at": "2026-10-08T01:13:52.101Z"
10664 },
10665 "current": {
10666 "id": "dpl_01kq8p2b4d6f8h0k2m4p6r8t0v",
10667 "environment": "preview",
10668 "ref": "docs-deployments",
10669 "sha": "e2f4a6c8b0d1e3f5a7c9b1d3e5f7a9c1b3d5e7f9",
10670 "task": "deploy",
10671 "description": "Preview of docs-deployments on g1t.page",
10672 "payload": {},
10673 "transient_environment": true,
10674 "production_environment": false,
10675 "state": "success",
10676 "environment_url": "https://docs-git-docs-deployments-flagon-io.g1t.page",
10677 "log_url": "https://g1t.sh/flagon-io/docs/deployments/dpl_01kq8p2b4d6f8h0k2m4p6r8t0v",
10678 "creator": "syntaqx",
10679 "source": "g1t_page",
10680 "run_id": null,
10681 "run_url": null,
10682 "project": "docs",
10683 "number": 412,
10684 "created_at": "2026-10-08T01:12:44.630Z",
10685 "updated_at": "2026-10-08T01:13:52.101Z"
10686 },
10687 "updated_at": "2026-10-08T01:13:52.101Z"
10688 }
10689 },
10690 "update_environment": {
10691 "params": {
10692 "owner": "flagon-io",
10693 "name": "g1t",
10694 "environment": "production"
10695 },
10696 "request": {
10697 "wait_timer": 10,
10698 "prevent_self_review": true,
10699 "reviewers": [
10700 {
10701 "type": "User",
10702 "name": "syntaqx"
10703 },
10704 {
10705 "type": "Team",
10706 "name": "deployers"
10707 }
10708 ],
10709 "deployment_branch_policy": {
10710 "protected_branches": true,
10711 "custom_branch_policies": false
10712 }
10713 },
10714 "response": {
10715 "name": "production",
10716 "protection_rules": [
10717 {
10718 "type": "required_reviewers",
10719 "prevent_self_review": true,
10720 "reviewers": [
10721 {
10722 "type": "User",
10723 "reviewer": {
10724 "login": "syntaqx"
10725 }
10726 },
10727 {
10728 "type": "Team",
10729 "reviewer": {
10730 "slug": "deployers"
10731 }
10732 }
10733 ]
10734 },
10735 {
10736 "type": "wait_timer",
10737 "wait_timer": 10
10738 },
10739 {
10740 "type": "branch_policy"
10741 }
10742 ],
10743 "deployment_branch_policy": {
10744 "protected_branches": true,
10745 "custom_branch_policies": false
10746 },
10747 "branch_policies": [],
10748 "can_admins_bypass": true,
10749 "protected": true,
10750 "updated_at": "2026-10-08T09:12:44.103Z",
10751 "updated_by": "syntaqx"
10752 },
10753 "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."
10754 },
10755 "delete_environment": {
10756 "params": {
10757 "owner": "flagon-io",
10758 "name": "g1t",
10759 "environment": "staging"
10760 },
10761 "response": {
10762 "deleted": true
10763 }
10764 },
10765 "get_pending_deployments": {
10766 "params": {
10767 "owner": "flagon-io",
10768 "name": "g1t",
10769 "id": "run_01kq9b3d5f7h9k1n3q5s7u9w1y"
10770 },
10771 "response": [
10772 {
10773 "environment": {
10774 "name": "production"
10775 },
10776 "state": "waiting",
10777 "needs_review": true,
10778 "wait_until": "2026-10-08T09:31:02.551Z",
10779 "current_user_can_approve": true,
10780 "reviewers": [
10781 {
10782 "type": "User",
10783 "reviewer": {
10784 "login": "syntaqx"
10785 }
10786 },
10787 {
10788 "type": "Team",
10789 "reviewer": {
10790 "slug": "deployers"
10791 }
10792 }
10793 ],
10794 "jobs": [
10795 "Deploy the core services"
10796 ],
10797 "reviewed_by": null,
10798 "comment": null,
10799 "reviewed_at": null
10800 }
10801 ]
10802 },
10803 "review_pending_deployments": {
10804 "params": {
10805 "owner": "flagon-io",
10806 "name": "g1t",
10807 "id": "run_01kq9b3d5f7h9k1n3q5s7u9w1y"
10808 },
10809 "request": {
10810 "environment_names": [
10811 "production"
10812 ],
10813 "state": "approved",
10814 "comment": "Release notes checked."
10815 },
10816 "response": [
10817 {
10818 "environment": {
10819 "name": "production"
10820 },
10821 "state": "approved",
10822 "needs_review": true,
10823 "wait_until": "2026-10-08T09:31:02.551Z",
10824 "current_user_can_approve": false,
10825 "reviewers": [
10826 {
10827 "type": "User",
10828 "reviewer": {
10829 "login": "syntaqx"
10830 }
10831 },
10832 {
10833 "type": "Team",
10834 "reviewer": {
10835 "slug": "deployers"
10836 }
10837 }
10838 ],
10839 "jobs": [
10840 "Deploy the core services"
10841 ],
10842 "reviewed_by": "syntaqx",
10843 "comment": "Release notes checked.",
10844 "reviewed_at": "2026-10-08T09:22:15.871Z"
10845 }
10846 ],
10847 "notes": "The jobs still wait for the wait timer, until `wait_until`, unless an admin approved past the rules."
10848 },
10849 "approve_workflow_run": {
10850 "params": {
10851 "owner": "flagon-io",
10852 "name": "g1t",
10853 "id": "run_01kq9a2c4e6g8j0m2p4r6t8v0x"
10854 },
10855 "response": {
10856 "id": "run_01kq9a2c4e6g8j0m2p4r6t8v0x",
10857 "workflow_id": "wfl_01kpw2c5d8e1f4g7h0j3k6m9np",
10858 "path": ".g1t/workflows/ci.yml",
10859 "name": "CI",
10860 "title": "Fix a typo in the README",
10861 "number": 41,
10862 "attempt": 1,
10863 "event": "pull_request",
10864 "ref": "refs/pull/88/merge",
10865 "sha": "4c1e7a9b2d5f8e0a3c6b9d2f5a8c1e4b7d0f3a6c",
10866 "pull": 88,
10867 "status": "queued",
10868 "conclusion": null,
10869 "error": null,
10870 "actor": "octo-fan",
10871 "created_at": "2026-10-08T08:02:11.004Z",
10872 "started_at": null,
10873 "finished_at": null
10874 }
10875 },
10876 "get_workflow_permissions": {
10877 "params": {
10878 "owner": "flagon-io",
10879 "name": "g1t"
10880 },
10881 "response": {
10882 "default_workflow_permissions": "read",
10883 "default_chosen": true,
10884 "max_workflow_permissions": "write",
10885 "can_approve_pull_request_reviews": false
10886 }
10887 },
10888 "set_workflow_permissions": {
10889 "params": {
10890 "owner": "flagon-io",
10891 "name": "g1t"
10892 },
10893 "request": {
10894 "default_workflow_permissions": "write"
10895 },
10896 "response": {
10897 "default_workflow_permissions": "write",
10898 "default_chosen": true,
10899 "max_workflow_permissions": "write",
10900 "can_approve_pull_request_reviews": false
10901 }
10902 },
10903 "get_fork_pr_approval": {
10904 "params": {
10905 "owner": "flagon-io",
10906 "name": "g1t"
10907 },
10908 "response": {
10909 "approval_policy": "outside_contributors"
10910 }
10911 },
10912 "set_fork_pr_approval": {
10913 "params": {
10914 "owner": "flagon-io",
10915 "name": "g1t"
10916 },
10917 "request": {
10918 "approval_policy": "all_external_contributors"
10919 },
10920 "response": {
10921 "approval_policy": "all_external_contributors"
10922 }
10923 },
10924 "get_actions_access": {
10925 "params": {
10926 "owner": "flagon-io",
10927 "name": "shared-workflows"
10928 },
10929 "response": {
10930 "access_level": "none"
10931 }
10932 },
10933 "set_actions_access": {
10934 "params": {
10935 "owner": "flagon-io",
10936 "name": "shared-workflows"
10937 },
10938 "request": {
10939 "access_level": "organization"
10940 },
10941 "response": {
10942 "access_level": "organization"
10943 }
10944 },
10945 "create_repository_dispatch": {
10946 "params": {
10947 "owner": "flagon-io",
10948 "name": "g1t"
10949 },
10950 "request": {
10951 "event_type": "docs-published",
10952 "client_payload": {
10953 "version": "2026.10.08"
10954 }
10955 },
10956 "response": {
10957 "runs": 1
10958 }
10959 },
10960 "get_workspace_workflow_permissions": {
10961 "params": {
10962 "workspace": "flagon-io"
10963 },
10964 "response": {
10965 "default_workflow_permissions": "read",
10966 "max_workflow_permissions": "write",
10967 "can_approve_pull_request_reviews": false
10968 }
10969 },
10970 "set_workspace_workflow_permissions": {
10971 "params": {
10972 "workspace": "flagon-io"
10973 },
10974 "request": {
10975 "max_workflow_permissions": "read"
10976 },
10977 "response": {
10978 "default_workflow_permissions": "read",
10979 "max_workflow_permissions": "read",
10980 "can_approve_pull_request_reviews": false
10981 },
10982 "notes": "A maximum of read holds every repository's default to read-only, and makes the workspace's default read too."
10983 },
10984 "list_workspace_managed_workflows": {
10985 "params": {
10986 "workspace": "flagon-io"
10987 },
10988 "response": {
10989 "total_count": 1,
10990 "managed_workflows": [
10991 {
10992 "name": "security-scan",
10993 "path": "managed/security-scan.yml",
10994 "workflow_name": "Security scan",
10995 "source": "flagon-io/policies/.g1t/workflows/security-scan.yml@main",
10996 "source_sha": "4f1c2a9e0b7d3c5a8e6f1b2d4c7a9e0f3b5d8c1a",
10997 "source_private": false,
10998 "mode": "required",
10999 "repositories": [
11000 "*",
11001 "!sandbox-*"
11002 ],
11003 "visibility": "all",
11004 "content": "name: Security scan\non: [push, pull_request]\njobs:\n scan:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v4\n - run: ./scripts/scan.sh\n",
11005 "created_at": "2026-10-12T09:30:00Z",
11006 "updated_at": "2026-10-12T09:30:00Z",
11007 "updated_by": "ada"
11008 }
11009 ]
11010 }
11011 },
11012 "create_workspace_managed_workflow": {
11013 "params": {
11014 "workspace": "flagon-io"
11015 },
11016 "request": {
11017 "name": "security-scan",
11018 "source": "flagon-io/policies/.g1t/workflows/security-scan.yml@main",
11019 "mode": "required",
11020 "repositories": [
11021 "*",
11022 "!sandbox-*"
11023 ]
11024 },
11025 "response": {
11026 "name": "security-scan",
11027 "path": "managed/security-scan.yml",
11028 "workflow_name": "Security scan",
11029 "source": "flagon-io/policies/.g1t/workflows/security-scan.yml@main",
11030 "source_sha": "4f1c2a9e0b7d3c5a8e6f1b2d4c7a9e0f3b5d8c1a",
11031 "source_private": false,
11032 "mode": "required",
11033 "repositories": [
11034 "*",
11035 "!sandbox-*"
11036 ],
11037 "visibility": "all",
11038 "content": "name: Security scan\non: [push, pull_request]\njobs:\n scan:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v4\n - run: ./scripts/scan.sh\n",
11039 "created_at": "2026-10-12T09:30:00Z",
11040 "updated_at": "2026-10-12T09:30:00Z",
11041 "updated_by": "ada"
11042 },
11043 "notes": "g1t copies the source when you save it, and that copy runs in each repository the workflow targets, as the repository's own workflow, with its token and secrets. A source in a private repository runs in private repositories only: give visibility private."
11044 },
11045 "update_workspace_managed_workflow": {
11046 "params": {
11047 "workspace": "flagon-io",
11048 "workflow": "security-scan"
11049 },
11050 "request": {
11051 "refresh": true
11052 },
11053 "response": {
11054 "name": "security-scan",
11055 "path": "managed/security-scan.yml",
11056 "workflow_name": "Security scan",
11057 "source": "flagon-io/policies/.g1t/workflows/security-scan.yml@main",
11058 "source_sha": "4f1c2a9e0b7d3c5a8e6f1b2d4c7a9e0f3b5d8c1a",
11059 "source_private": false,
11060 "mode": "required",
11061 "repositories": [
11062 "*",
11063 "!sandbox-*"
11064 ],
11065 "visibility": "all",
11066 "content": "name: Security scan\non: [push, pull_request]\njobs:\n scan:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v4\n - run: ./scripts/scan.sh\n",
11067 "created_at": "2026-10-12T09:30:00Z",
11068 "updated_at": "2026-10-12T09:30:00Z",
11069 "updated_by": "ada"
11070 },
11071 "notes": "refresh copies the source again at the commit its ref names now. Fields left out stay as they are."
11072 },
11073 "delete_workspace_managed_workflow": {
11074 "params": {
11075 "workspace": "flagon-io",
11076 "workflow": "security-scan"
11077 },
11078 "response": {
11079 "deleted": true
11080 }
11081 },
11082 "get_token_policy": {
11083 "params": {
11084 "workspace": "flagon-io"
11085 },
11086 "response": {
11087 "allow_tokens_for_all_workspaces": true,
11088 "allow_tokens_for_this_workspace": true,
11089 "require_approval": true,
11090 "max_lifetime_days": null,
11091 "forbid_no_expiry": false,
11092 "updated_by": null,
11093 "updated_at": null
11094 }
11095 },
11096 "set_token_policy": {
11097 "params": {
11098 "workspace": "flagon-io"
11099 },
11100 "request": {
11101 "allow_tokens_for_all_workspaces": false,
11102 "max_lifetime_days": 90
11103 },
11104 "response": {
11105 "allow_tokens_for_all_workspaces": false,
11106 "allow_tokens_for_this_workspace": true,
11107 "require_approval": true,
11108 "max_lifetime_days": 90,
11109 "forbid_no_expiry": false,
11110 "updated_by": "ada",
11111 "updated_at": "2026-10-08T09:30:00.000Z"
11112 },
11113 "notes": "From each token's next request, tokens made for all of a member's workspaces no longer reach this one (tokens made for it alone still do), and neither does a token that lasts longer than 90 days or never expires. They keep working everywhere else."
11114 },
11115 "list_member_tokens": {
11116 "params": {
11117 "workspace": "flagon-io"
11118 },
11119 "response": [
11120 {
11121 "id": "tok_01HZX3K2M9V7Q4N8B6D5C3A2E1",
11122 "name": "release-bot",
11123 "owner": "ada",
11124 "description": "Publishes releases from CI",
11125 "created_at": "2026-10-08T09:00:00.000Z",
11126 "created_by": null,
11127 "last_used_at": null,
11128 "expires_at": "2026-11-07T09:00:00.000Z",
11129 "scopes": ["repo:read", "code:write"],
11130 "workspace": "flagon-io",
11131 "repository_selection": "selected",
11132 "repositories": ["flagon-io/hello"],
11133 "permissions": { "code": "write", "repo": "read" },
11134 "status": "pending",
11135 "review_reason": null,
11136 "reaches": false,
11137 "blocked_by": "pending approval"
11138 }
11139 ]
11140 },
11141 "list_token_requests": {
11142 "params": {
11143 "workspace": "flagon-io"
11144 },
11145 "response": [
11146 {
11147 "id": "tok_01HZX3K2M9V7Q4N8B6D5C3A2E1",
11148 "name": "release-bot",
11149 "owner": "ada",
11150 "description": "Publishes releases from CI",
11151 "created_at": "2026-10-08T09:00:00.000Z",
11152 "created_by": null,
11153 "last_used_at": null,
11154 "expires_at": "2026-11-07T09:00:00.000Z",
11155 "scopes": ["repo:read", "code:write"],
11156 "workspace": "flagon-io",
11157 "repository_selection": "selected",
11158 "repositories": ["flagon-io/hello"],
11159 "permissions": { "code": "write", "repo": "read" },
11160 "status": "pending",
11161 "review_reason": null,
11162 "reaches": false,
11163 "blocked_by": "pending approval"
11164 }
11165 ]
11166 },
11167 "review_token_request": {
11168 "params": {
11169 "workspace": "flagon-io",
11170 "id": "tok_01HZX3K2M9V7Q4N8B6D5C3A2E1"
11171 },
11172 "request": {
11173 "decision": "approve"
11174 },
11175 "response": {
11176 "id": "tok_01HZX3K2M9V7Q4N8B6D5C3A2E1",
11177 "name": "release-bot",
11178 "owner": "ada",
11179 "description": "Publishes releases from CI",
11180 "created_at": "2026-10-08T09:00:00.000Z",
11181 "created_by": null,
11182 "last_used_at": null,
11183 "expires_at": "2026-11-07T09:00:00.000Z",
11184 "scopes": ["repo:read", "code:write"],
11185 "workspace": "flagon-io",
11186 "repository_selection": "selected",
11187 "repositories": ["flagon-io/hello"],
11188 "permissions": { "code": "write", "repo": "read" },
11189 "status": "active",
11190 "review_reason": null,
11191 "reaches": true,
11192 "blocked_by": null
11193 },
11194 "notes": "The token's owner hears of it in their inbox. A denied token reaches public repositories only."
11195 },
11196 "revoke_member_token": {
11197 "params": {
11198 "workspace": "flagon-io",
11199 "id": "tok_01HZX3K2M9V7Q4N8B6D5C3A2E1"
11200 },
11201 "request": {
11202 "reason": "Rotated after the laptop was lost"
11203 },
11204 "response": {
11205 "revoked": true
11206 }
11207 },
11208 "get_languages": {
11209 "response": {
11210 "head": "9f3c2a1b7e5d4c3b2a19f8e7d6c5b4a39281706f",
11211 "commit": "9f3c2a1b7e5d4c3b2a19f8e7d6c5b4a39281706f",
11212 "computed_at": "2026-10-07T09:14:03.000Z",
11213 "pending": false,
11214 "partial": false,
11215 "languages": [
11216 {
11217 "name": "Rust",
11218 "color": "#dea584",
11219 "bytes": 184213,
11220 "percent": 71.4
11221 },
11222 {
11223 "name": "TypeScript",
11224 "color": "#3178c6",
11225 "bytes": 61022,
11226 "percent": 23.7
11227 },
11228 {
11229 "name": "Shell",
11230 "color": "#89e051",
11231 "bytes": 12650,
11232 "percent": 4.9
11233 }
11234 ]
11235 },
11236 "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."
11237 },
11238 "list_contributors": {
11239 "response": {
11240 "head": "9f3c2a1b7e5d4c3b2a19f8e7d6c5b4a39281706f",
11241 "commit": "9f3c2a1b7e5d4c3b2a19f8e7d6c5b4a39281706f",
11242 "computed_at": "2026-10-07T09:14:03.000Z",
11243 "pending": false,
11244 "partial": false,
11245 "total": 3,
11246 "commits": 126,
11247 "contributors": [
11248 {
11249 "kind": "g1t",
11250 "name": "g1t",
11251 "username": null,
11252 "avatar": null,
11253 "commits": 71,
11254 "first_at": "2026-09-29T08:00:00.000Z",
11255 "last_at": "2026-10-07T08:41:00.000Z",
11256 "weeks": [
11257 {
11258 "week": "2026-09-28",
11259 "commits": 40
11260 },
11261 {
11262 "week": "2026-10-05",
11263 "commits": 31
11264 }
11265 ]
11266 },
11267 {
11268 "kind": "user",
11269 "name": "ada",
11270 "username": "ada",
11271 "display_username": "Ada",
11272 "avatar": "5f2b8c1d9e7a3f6b4c0d2e8a1b9c7d5e3f1a0b2c4d6e8f0a1b3c5d7e9f0a2b4c",
11273 "commits": 52,
11274 "first_at": "2026-09-28T14:11:52.000Z",
11275 "last_at": "2026-10-06T16:02:11.000Z",
11276 "weeks": [
11277 {
11278 "week": "2026-09-28",
11279 "commits": 30
11280 },
11281 {
11282 "week": "2026-10-05",
11283 "commits": 22
11284 }
11285 ]
11286 },
11287 {
11288 "kind": "author",
11289 "name": "Sam Okafor",
11290 "username": null,
11291 "avatar": null,
11292 "commits": 3,
11293 "first_at": "2026-10-02T11:20:00.000Z",
11294 "last_at": "2026-10-03T09:05:00.000Z",
11295 "weeks": [
11296 {
11297 "week": "2026-09-28",
11298 "commits": 3
11299 }
11300 ]
11301 }
11302 ],
11303 "weeks": [
11304 {
11305 "week": "2026-09-28",
11306 "commits": 73
11307 },
11308 {
11309 "week": "2026-10-05",
11310 "commits": 53
11311 }
11312 ]
11313 },
11314 "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."
11315 },
11316 "get_license": {
11317 "response": {
11318 "spdx_id": "MIT",
11319 "name": "MIT License",
11320 "path": "LICENSE"
11321 }
11322 },
11323 "list_stargazers": {
11324 "query": {
11325 "page": 1
11326 },
11327 "response": [
11328 {
11329 "username": "ada",
11330 "display_username": "Ada",
11331 "avatar": null,
11332 "starred_at": "2026-10-06T18:30:00.000Z"
11333 },
11334 {
11335 "username": "sam",
11336 "display_username": "sam",
11337 "avatar": null,
11338 "starred_at": "2026-10-02T09:12:00.000Z"
11339 }
11340 ]
11341 },
11342 "list_starred": {
11343 "response": [
11344 {
11345 "repo": {
11346 "id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
11347 "namespace": "flagon-io",
11348 "name": "hello",
11349 "description": "A tiny service that says hello.",
11350 "is_private": false,
11351 "owner_id": "usr_01kkntcg1eeb98j62xjm7eh09p",
11352 "default_branch": "main",
11353 "fork_of": null,
11354 "protected": true,
11355 "created_at": "2026-09-28T14:11:52.640Z",
11356 "topics": [
11357 "cli"
11358 ],
11359 "website": "https://hello.g1t.page",
11360 "archived_at": null
11361 },
11362 "starred_at": "2026-10-06T18:30:00.000Z",
11363 "stars": 12
11364 }
11365 ]
11366 },
11367 "check_starred": {
11368 "response": {
11369 "starred": true,
11370 "stars": 12
11371 }
11372 },
11373 "star_repo": {
11374 "response": {
11375 "starred": true,
11376 "stars": 13
11377 }
11378 },
11379 "unstar_repo": {
11380 "response": {
11381 "starred": false,
11382 "stars": 12
11383 }
11384 },
11385 "list_releases": {
11386 "response": [
11387 {
11388 "id": "rel_01m4a2b7c9d3e5f7g9h1j3k5m7",
11389 "tag_name": "v1.2.0",
11390 "target": "9f3c2a1b7e5d4c3b2a19f8e7d6c5b4a39281706f",
11391 "name": "Greetings by name",
11392 "body": "## What changed\n\n- `hello` greets the caller by name (#12)\n- Faster start-up (#15)",
11393 "draft": false,
11394 "prerelease": false,
11395 "author": "ada",
11396 "created_at": "2026-10-06T16:02:11.000Z",
11397 "published_at": "2026-10-06T16:02:11.000Z",
11398 "latest": true
11399 },
11400 {
11401 "id": "rel_01m3x8q2w4e6r8t0y2u4i6o8p0",
11402 "tag_name": "v1.1.0",
11403 "target": "3b2a19f8e7d6c5b4a392817069f3c2a1b7e5d4c3",
11404 "name": "First release",
11405 "body": "The first release.",
11406 "draft": false,
11407 "prerelease": false,
11408 "author": "ada",
11409 "created_at": "2026-09-30T10:00:00.000Z",
11410 "published_at": "2026-09-30T10:00:00.000Z",
11411 "latest": false
11412 }
11413 ],
11414 "notes": "Drafts are listed only to those with the Write role; their `published_at` is null."
11415 },
11416 "get_latest_release": {
11417 "response": {
11418 "id": "rel_01m4a2b7c9d3e5f7g9h1j3k5m7",
11419 "tag_name": "v1.2.0",
11420 "target": "9f3c2a1b7e5d4c3b2a19f8e7d6c5b4a39281706f",
11421 "name": "Greetings by name",
11422 "body": "## What changed\n\n- `hello` greets the caller by name (#12)\n- Faster start-up (#15)",
11423 "draft": false,
11424 "prerelease": false,
11425 "author": "ada",
11426 "created_at": "2026-10-06T16:02:11.000Z",
11427 "published_at": "2026-10-06T16:02:11.000Z",
11428 "latest": true
11429 }
11430 },
11431 "get_release_by_tag": {
11432 "params": {
11433 "tag": "v1.2.0"
11434 },
11435 "response": {
11436 "id": "rel_01m4a2b7c9d3e5f7g9h1j3k5m7",
11437 "tag_name": "v1.2.0",
11438 "target": "9f3c2a1b7e5d4c3b2a19f8e7d6c5b4a39281706f",
11439 "name": "Greetings by name",
11440 "body": "## What changed\n\n- `hello` greets the caller by name (#12)\n- Faster start-up (#15)",
11441 "draft": false,
11442 "prerelease": false,
11443 "author": "ada",
11444 "created_at": "2026-10-06T16:02:11.000Z",
11445 "published_at": "2026-10-06T16:02:11.000Z",
11446 "latest": true
11447 }
11448 },
11449 "get_release": {
11450 "params": {
11451 "id": "rel_01m4a2b7c9d3e5f7g9h1j3k5m7"
11452 },
11453 "response": {
11454 "id": "rel_01m4a2b7c9d3e5f7g9h1j3k5m7",
11455 "tag_name": "v1.2.0",
11456 "target": "9f3c2a1b7e5d4c3b2a19f8e7d6c5b4a39281706f",
11457 "name": "Greetings by name",
11458 "body": "## What changed\n\n- `hello` greets the caller by name (#12)\n- Faster start-up (#15)",
11459 "draft": false,
11460 "prerelease": false,
11461 "author": "ada",
11462 "created_at": "2026-10-06T16:02:11.000Z",
11463 "published_at": "2026-10-06T16:02:11.000Z",
11464 "latest": true
11465 }
11466 },
11467 "create_release": {
11468 "request": {
11469 "tag_name": "v1.2.0",
11470 "target": "main",
11471 "release_name": "Greetings by name",
11472 "body": "## What changed\n\n- `hello` greets the caller by name (#12)\n- Faster start-up (#15)",
11473 "draft": false,
11474 "prerelease": false
11475 },
11476 "response": {
11477 "id": "rel_01m4a2b7c9d3e5f7g9h1j3k5m7",
11478 "tag_name": "v1.2.0",
11479 "target": "9f3c2a1b7e5d4c3b2a19f8e7d6c5b4a39281706f",
11480 "name": "Greetings by name",
11481 "body": "## What changed\n\n- `hello` greets the caller by name (#12)\n- Faster start-up (#15)",
11482 "draft": false,
11483 "prerelease": false,
11484 "author": "ada",
11485 "created_at": "2026-10-06T16:02:11.000Z",
11486 "published_at": "2026-10-06T16:02:11.000Z",
11487 "latest": true
11488 },
11489 "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`."
11490 },
11491 "update_release": {
11492 "params": {
11493 "id": "rel_01m4a2b7c9d3e5f7g9h1j3k5m7"
11494 },
11495 "request": {
11496 "body": "## What changed\n\n- `hello` greets the caller by name (#12)\n- Faster start-up (#15)\n- Docs for `--name`"
11497 },
11498 "response": {
11499 "id": "rel_01m4a2b7c9d3e5f7g9h1j3k5m7",
11500 "tag_name": "v1.2.0",
11501 "target": "9f3c2a1b7e5d4c3b2a19f8e7d6c5b4a39281706f",
11502 "name": "Greetings by name",
11503 "body": "## What changed\n\n- `hello` greets the caller by name (#12)\n- Faster start-up (#15)\n- Docs for `--name`",
11504 "draft": false,
11505 "prerelease": false,
11506 "author": "ada",
11507 "created_at": "2026-10-06T16:02:11.000Z",
11508 "published_at": "2026-10-06T16:02:11.000Z",
11509 "latest": true
11510 }
11511 },
11512 "delete_release": {
11513 "params": {
11514 "id": "rel_01m4a2b7c9d3e5f7g9h1j3k5m7"
11515 },
11516 "response": {
11517 "deleted": true
11518 }
11519 },
11520 "create_commit_status": {
11521 "params": {
11522 "owner": "flagon-io",
11523 "name": "hello",
11524 "sha": "9f3c2a1b7e6d5c4b3a2918f7e6d5c4b3a2918f7e"
11525 },
11526 "request": {
11527 "state": "success",
11528 "context": "ci/build",
11529 "description": "Build #4821 passed",
11530 "target_url": "https://ci.example.com/builds/4821"
11531 },
11532 "response": {
11533 "context": "ci/build",
11534 "state": "success",
11535 "description": "Build #4821 passed",
11536 "target_url": "https://ci.example.com/builds/4821",
11537 "updated_at": "2026-10-07T14:03:02.118Z",
11538 "source": "api"
11539 },
11540 "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/)."
11541 },
11542 "list_commit_statuses": {
11543 "params": {
11544 "owner": "flagon-io",
11545 "name": "hello",
11546 "ref": "main"
11547 },
11548 "response": [
11549 {
11550 "context": "ci/build",
11551 "state": "success",
11552 "description": "Build #4821 passed",
11553 "target_url": "https://ci.example.com/builds/4821",
11554 "updated_at": "2026-10-07T14:03:02.118Z",
11555 "source": "api"
11556 }
11557 ]
11558 },
11559 "get_combined_status": {
11560 "params": {
11561 "owner": "flagon-io",
11562 "name": "hello",
11563 "ref": "main"
11564 },
11565 "response": {
11566 "state": "success",
11567 "sha": "9f3c2a1b7e6d5c4b3a2918f7e6d5c4b3a2918f7e",
11568 "total_count": 1,
11569 "statuses": [
11570 {
11571 "context": "ci/build",
11572 "state": "success",
11573 "description": "Build #4821 passed",
11574 "target_url": "https://ci.example.com/builds/4821",
11575 "updated_at": "2026-10-07T14:03:02.118Z",
11576 "source": "api"
11577 }
11578 ]
11579 }
11580 },
11581 "create_check_run": {
11582 "params": {
11583 "owner": "flagon-io",
11584 "name": "hello"
11585 },
11586 "request": {
11587 "name": "lint",
11588 "head_sha": "9f3c2a1b7e6d5c4b3a2918f7e6d5c4b3a2918f7e",
11589 "status": "completed",
11590 "conclusion": "failure",
11591 "details_url": "https://ci.example.com/builds/4821",
11592 "external_id": "4821",
11593 "output": {
11594 "title": "2 problems",
11595 "summary": "**2** problems in 1 file.",
11596 "annotations": [
11597 {
11598 "path": "src/parse.rs",
11599 "start_line": 42,
11600 "end_line": 42,
11601 "annotation_level": "warning",
11602 "message": "unused variable: `depth`"
11603 }
11604 ]
11605 },
11606 "actions": [
11607 {
11608 "label": "Fix this",
11609 "description": "Apply the suggested fixes",
11610 "identifier": "fix"
11611 }
11612 ]
11613 },
11614 "response": {
11615 "id": "cr_01kq4b7c8d9e0f1g2h3j4k5m6n",
11616 "name": "lint",
11617 "head_sha": "9f3c2a1b7e6d5c4b3a2918f7e6d5c4b3a2918f7e",
11618 "status": "completed",
11619 "conclusion": "failure",
11620 "started_at": "2026-10-07T14:02:11.000Z",
11621 "completed_at": "2026-10-07T14:02:36.000Z",
11622 "details_url": "https://ci.example.com/builds/4821",
11623 "external_id": "4821",
11624 "html_url": "https://g1t.sh/flagon-io/hello/checks/cr_01kq4b7c8d9e0f1g2h3j4k5m6n",
11625 "output": {
11626 "title": "2 problems",
11627 "summary": "**2** problems in 1 file.",
11628 "text": null,
11629 "annotations_count": 2
11630 },
11631 "actions": [
11632 {
11633 "label": "Fix this",
11634 "description": "Apply the suggested fixes",
11635 "identifier": "fix"
11636 }
11637 ],
11638 "check_suite": {
11639 "id": "cs_01kq4b7c8d9e0f1g2h3j4k5m6p"
11640 },
11641 "app": {
11642 "slug": "buildkite",
11643 "name": "Buildkite"
11644 },
11645 "created_at": "2026-10-07T14:02:11.318Z"
11646 },
11647 "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/)."
11648 },
11649 "update_check_run": {
11650 "params": {
11651 "owner": "flagon-io",
11652 "name": "hello",
11653 "id": "cr_01kq4b7c8d9e0f1g2h3j4k5m6n"
11654 },
11655 "request": {
11656 "conclusion": "success",
11657 "output": {
11658 "title": "No problems",
11659 "summary": "All clear."
11660 }
11661 },
11662 "response": {
11663 "id": "cr_01kq4b7c8d9e0f1g2h3j4k5m6n",
11664 "name": "lint",
11665 "head_sha": "9f3c2a1b7e6d5c4b3a2918f7e6d5c4b3a2918f7e",
11666 "status": "completed",
11667 "conclusion": "success",
11668 "started_at": "2026-10-07T14:02:11.000Z",
11669 "completed_at": "2026-10-07T14:02:36.000Z",
11670 "details_url": "https://ci.example.com/builds/4821",
11671 "external_id": "4821",
11672 "html_url": "https://g1t.sh/flagon-io/hello/checks/cr_01kq4b7c8d9e0f1g2h3j4k5m6n",
11673 "output": {
11674 "title": "No problems",
11675 "summary": "All clear.",
11676 "text": null,
11677 "annotations_count": 2
11678 },
11679 "actions": [
11680 {
11681 "label": "Fix this",
11682 "description": "Apply the suggested fixes",
11683 "identifier": "fix"
11684 }
11685 ],
11686 "check_suite": {
11687 "id": "cs_01kq4b7c8d9e0f1g2h3j4k5m6p"
11688 },
11689 "app": {
11690 "slug": "buildkite",
11691 "name": "Buildkite"
11692 },
11693 "created_at": "2026-10-07T14:02:11.318Z"
11694 },
11695 "notes": "Annotations given here are added to the ones the run has, at most 50 a request and 1000 in all."
11696 },
11697 "get_check_run": {
11698 "params": {
11699 "owner": "flagon-io",
11700 "name": "hello",
11701 "id": "job_01kq4b6a7b8c9d0e1f2g3h4j5k"
11702 },
11703 "response": {
11704 "id": "job_01kq4b6a7b8c9d0e1f2g3h4j5k",
11705 "name": "Test",
11706 "head_sha": "9f3c2a1b7e6d5c4b3a2918f7e6d5c4b3a2918f7e",
11707 "status": "completed",
11708 "conclusion": "success",
11709 "started_at": "2026-10-07T14:01:02.000Z",
11710 "completed_at": "2026-10-07T14:01:27.000Z",
11711 "details_url": "https://g1t.sh/flagon-io/hello/actions/runs/run_01kq4b6a7b8c9d0e1f2g3h4j5m?job=job_01kq4b6a7b8c9d0e1f2g3h4j5k",
11712 "external_id": null,
11713 "html_url": "https://g1t.sh/flagon-io/hello/actions/runs/run_01kq4b6a7b8c9d0e1f2g3h4j5m?job=job_01kq4b6a7b8c9d0e1f2g3h4j5k",
11714 "output": {
11715 "title": null,
11716 "summary": null,
11717 "text": null,
11718 "annotations_count": 0
11719 },
11720 "actions": [],
11721 "check_suite": {
11722 "id": "run_01kq4b6a7b8c9d0e1f2g3h4j5m"
11723 },
11724 "app": {
11725 "slug": "actions",
11726 "name": "g1t Actions"
11727 },
11728 "workflow": {
11729 "run_id": "run_01kq4b6a7b8c9d0e1f2g3h4j5m",
11730 "name": "CI",
11731 "event": "push"
11732 },
11733 "created_at": "2026-10-07T14:01:00.512Z"
11734 }
11735 },
11736 "list_check_run_annotations": {
11737 "params": {
11738 "owner": "flagon-io",
11739 "name": "hello",
11740 "id": "cr_01kq4b7c8d9e0f1g2h3j4k5m6n"
11741 },
11742 "response": [
11743 {
11744 "path": "src/parse.rs",
11745 "start_line": 42,
11746 "end_line": 42,
11747 "start_column": 9,
11748 "end_column": 14,
11749 "annotation_level": "warning",
11750 "message": "unused variable: `depth`",
11751 "title": "unused_variables",
11752 "raw_details": "#[warn(unused_variables)] on by default"
11753 }
11754 ]
11755 },
11756 "rerequest_check_run": {
11757 "params": {
11758 "owner": "flagon-io",
11759 "name": "hello",
11760 "id": "cr_01kq4b7c8d9e0f1g2h3j4k5m6n"
11761 },
11762 "response": {
11763 "rerequested": true
11764 }
11765 },
11766 "list_check_runs_for_ref": {
11767 "params": {
11768 "owner": "flagon-io",
11769 "name": "hello",
11770 "ref": "main"
11771 },
11772 "query": {
11773 "filter": "latest"
11774 },
11775 "response": {
11776 "total_count": 2,
11777 "check_runs": [
11778 {
11779 "id": "cr_01kq4b7c8d9e0f1g2h3j4k5m6n",
11780 "name": "lint",
11781 "head_sha": "9f3c2a1b7e6d5c4b3a2918f7e6d5c4b3a2918f7e",
11782 "status": "completed",
11783 "conclusion": "failure",
11784 "started_at": "2026-10-07T14:02:11.000Z",
11785 "completed_at": "2026-10-07T14:02:36.000Z",
11786 "details_url": "https://ci.example.com/builds/4821",
11787 "external_id": "4821",
11788 "html_url": "https://g1t.sh/flagon-io/hello/checks/cr_01kq4b7c8d9e0f1g2h3j4k5m6n",
11789 "output": {
11790 "title": "2 problems",
11791 "summary": "**2** problems in 1 file.",
11792 "text": null,
11793 "annotations_count": 2
11794 },
11795 "actions": [
11796 {
11797 "label": "Fix this",
11798 "description": "Apply the suggested fixes",
11799 "identifier": "fix"
11800 }
11801 ],
11802 "check_suite": {
11803 "id": "cs_01kq4b7c8d9e0f1g2h3j4k5m6p"
11804 },
11805 "app": {
11806 "slug": "buildkite",
11807 "name": "Buildkite"
11808 },
11809 "created_at": "2026-10-07T14:02:11.318Z"
11810 },
11811 {
11812 "id": "job_01kq4b6a7b8c9d0e1f2g3h4j5k",
11813 "name": "Test",
11814 "head_sha": "9f3c2a1b7e6d5c4b3a2918f7e6d5c4b3a2918f7e",
11815 "status": "completed",
11816 "conclusion": "success",
11817 "started_at": "2026-10-07T14:01:02.000Z",
11818 "completed_at": "2026-10-07T14:01:27.000Z",
11819 "details_url": "https://g1t.sh/flagon-io/hello/actions/runs/run_01kq4b6a7b8c9d0e1f2g3h4j5m?job=job_01kq4b6a7b8c9d0e1f2g3h4j5k",
11820 "external_id": null,
11821 "html_url": "https://g1t.sh/flagon-io/hello/actions/runs/run_01kq4b6a7b8c9d0e1f2g3h4j5m?job=job_01kq4b6a7b8c9d0e1f2g3h4j5k",
11822 "output": {
11823 "title": null,
11824 "summary": null,
11825 "text": null,
11826 "annotations_count": 0
11827 },
11828 "actions": [],
11829 "check_suite": {
11830 "id": "run_01kq4b6a7b8c9d0e1f2g3h4j5m"
11831 },
11832 "app": {
11833 "slug": "actions",
11834 "name": "g1t Actions"
11835 },
11836 "workflow": {
11837 "run_id": "run_01kq4b6a7b8c9d0e1f2g3h4j5m",
11838 "name": "CI",
11839 "event": "push"
11840 },
11841 "created_at": "2026-10-07T14:01:00.512Z"
11842 }
11843 ]
11844 }
11845 },
11846 "list_check_suites_for_ref": {
11847 "params": {
11848 "owner": "flagon-io",
11849 "name": "hello",
11850 "ref": "main"
11851 },
11852 "response": {
11853 "total_count": 2,
11854 "check_suites": [
11855 {
11856 "id": "cs_01kq4b7c8d9e0f1g2h3j4k5m6p",
11857 "head_sha": "9f3c2a1b7e6d5c4b3a2918f7e6d5c4b3a2918f7e",
11858 "head_branch": "main",
11859 "status": "completed",
11860 "conclusion": "failure",
11861 "app": {
11862 "slug": "buildkite",
11863 "name": "Buildkite"
11864 },
11865 "latest_check_runs_count": 1,
11866 "created_at": "2026-10-07T14:02:11.318Z",
11867 "updated_at": "2026-10-07T14:02:36.502Z"
11868 },
11869 {
11870 "id": "run_01kq4b6a7b8c9d0e1f2g3h4j5m",
11871 "head_sha": "9f3c2a1b7e6d5c4b3a2918f7e6d5c4b3a2918f7e",
11872 "head_branch": "main",
11873 "status": "completed",
11874 "conclusion": "success",
11875 "app": {
11876 "slug": "actions",
11877 "name": "g1t Actions"
11878 },
11879 "name": "CI",
11880 "latest_check_runs_count": 1,
11881 "created_at": "2026-10-07T14:01:00.512Z",
11882 "updated_at": "2026-10-07T14:01:28.040Z"
11883 }
11884 ]
11885 }
11886 },
11887 "get_check_suite": {
11888 "params": {
11889 "owner": "flagon-io",
11890 "name": "hello",
11891 "id": "cs_01kq4b7c8d9e0f1g2h3j4k5m6p"
11892 },
11893 "response": {
11894 "id": "cs_01kq4b7c8d9e0f1g2h3j4k5m6p",
11895 "head_sha": "9f3c2a1b7e6d5c4b3a2918f7e6d5c4b3a2918f7e",
11896 "head_branch": "main",
11897 "status": "completed",
11898 "conclusion": "failure",
11899 "app": {
11900 "slug": "buildkite",
11901 "name": "Buildkite"
11902 },
11903 "latest_check_runs_count": 1,
11904 "created_at": "2026-10-07T14:02:11.318Z",
11905 "updated_at": "2026-10-07T14:02:36.502Z"
11906 }
11907 },
11908 "rerequest_check_suite": {
11909 "params": {
11910 "owner": "flagon-io",
11911 "name": "hello",
11912 "id": "cs_01kq4b7c8d9e0f1g2h3j4k5m6p"
11913 },
11914 "response": {
11915 "rerequested": true
11916 }
11917 },
11918 "list_artifacts": {
11919 "params": {
11920 "owner": "flagon-io",
11921 "name": "g1t"
11922 },
11923 "query": {
11924 "name": "web-dist",
11925 "per_page": "1"
11926 },
11927 "response": {
11928 "total_count": 9,
11929 "artifacts": [
11930 {
11931 "id": 4182,
11932 "node_id": "artifact_4182",
11933 "name": "web-dist",
11934 "size_in_bytes": 18734120,
11935 "url": "https://api.g1t.sh/repos/flagon-io/g1t/actions/artifacts/4182",
11936 "archive_download_url": "https://api.g1t.sh/repos/flagon-io/g1t/actions/artifacts/4182/zip",
11937 "expired": false,
11938 "digest": "sha256:5f1c3a9e7b2d4f6a8c0e1b3d5f7a9c2e4b6d8f0a1c3e5b7d9f2a4c6e8b0d1f3a",
11939 "created_at": "2026-10-08T14:03:51.204Z",
11940 "updated_at": "2026-10-08T14:03:52.880Z",
11941 "expires_at": "2026-10-22T14:03:51.204Z",
11942 "workflow_run": {
11943 "id": "run_01kq9c4e6g8j0m2p4r6t8v0x2z",
11944 "repository_id": "rep_01kpw0a2c4e6g8j0m2p4r6t8v0",
11945 "head_repository_id": "rep_01kpw0a2c4e6g8j0m2p4r6t8v0",
11946 "head_branch": "main",
11947 "head_sha": "7c1e9a4b2d6f80135ac9e2b7d4f6a8c0e1b3d5f7"
11948 }
11949 }
11950 ]
11951 },
11952 "notes": "Expired and deleted artifacts are not listed. `workflow_run.id` is the run's id, which `get_workflow_run` takes."
11953 },
11954 "list_workflow_run_artifacts": {
11955 "params": {
11956 "owner": "flagon-io",
11957 "name": "g1t",
11958 "id": "run_01kq9c4e6g8j0m2p4r6t8v0x2z"
11959 },
11960 "response": {
11961 "total_count": 2,
11962 "artifacts": [
11963 {
11964 "id": 4181,
11965 "node_id": "artifact_4181",
11966 "name": "coverage",
11967 "size_in_bytes": 412870,
11968 "url": "https://api.g1t.sh/repos/flagon-io/g1t/actions/artifacts/4181",
11969 "archive_download_url": "https://api.g1t.sh/repos/flagon-io/g1t/actions/artifacts/4181/zip",
11970 "expired": false,
11971 "digest": "sha256:5f1c3a9e7b2d4f6a8c0e1b3d5f7a9c2e4b6d8f0a1c3e5b7d9f2a4c6e8b0d1f3a",
11972 "created_at": "2026-10-08T14:03:51.204Z",
11973 "updated_at": "2026-10-08T14:03:52.880Z",
11974 "expires_at": "2026-10-22T14:03:51.204Z",
11975 "workflow_run": {
11976 "id": "run_01kq9c4e6g8j0m2p4r6t8v0x2z",
11977 "repository_id": "rep_01kpw0a2c4e6g8j0m2p4r6t8v0",
11978 "head_repository_id": "rep_01kpw0a2c4e6g8j0m2p4r6t8v0",
11979 "head_branch": "main",
11980 "head_sha": "7c1e9a4b2d6f80135ac9e2b7d4f6a8c0e1b3d5f7"
11981 }
11982 },
11983 {
11984 "id": 4182,
11985 "node_id": "artifact_4182",
11986 "name": "web-dist",
11987 "size_in_bytes": 18734120,
11988 "url": "https://api.g1t.sh/repos/flagon-io/g1t/actions/artifacts/4182",
11989 "archive_download_url": "https://api.g1t.sh/repos/flagon-io/g1t/actions/artifacts/4182/zip",
11990 "expired": false,
11991 "digest": "sha256:5f1c3a9e7b2d4f6a8c0e1b3d5f7a9c2e4b6d8f0a1c3e5b7d9f2a4c6e8b0d1f3a",
11992 "created_at": "2026-10-08T14:03:51.204Z",
11993 "updated_at": "2026-10-08T14:03:52.880Z",
11994 "expires_at": "2026-10-22T14:03:51.204Z",
11995 "workflow_run": {
11996 "id": "run_01kq9c4e6g8j0m2p4r6t8v0x2z",
11997 "repository_id": "rep_01kpw0a2c4e6g8j0m2p4r6t8v0",
11998 "head_repository_id": "rep_01kpw0a2c4e6g8j0m2p4r6t8v0",
11999 "head_branch": "main",
12000 "head_sha": "7c1e9a4b2d6f80135ac9e2b7d4f6a8c0e1b3d5f7"
12001 }
12002 }
12003 ]
12004 }
12005 },
12006 "get_artifact": {
12007 "params": {
12008 "owner": "flagon-io",
12009 "name": "g1t",
12010 "id": "4182"
12011 },
12012 "response": {
12013 "id": 4182,
12014 "node_id": "artifact_4182",
12015 "name": "web-dist",
12016 "size_in_bytes": 18734120,
12017 "url": "https://api.g1t.sh/repos/flagon-io/g1t/actions/artifacts/4182",
12018 "archive_download_url": "https://api.g1t.sh/repos/flagon-io/g1t/actions/artifacts/4182/zip",
12019 "expired": false,
12020 "digest": "sha256:5f1c3a9e7b2d4f6a8c0e1b3d5f7a9c2e4b6d8f0a1c3e5b7d9f2a4c6e8b0d1f3a",
12021 "created_at": "2026-10-08T14:03:51.204Z",
12022 "updated_at": "2026-10-08T14:03:52.880Z",
12023 "expires_at": "2026-10-22T14:03:51.204Z",
12024 "workflow_run": {
12025 "id": "run_01kq9c4e6g8j0m2p4r6t8v0x2z",
12026 "repository_id": "rep_01kpw0a2c4e6g8j0m2p4r6t8v0",
12027 "head_repository_id": "rep_01kpw0a2c4e6g8j0m2p4r6t8v0",
12028 "head_branch": "main",
12029 "head_sha": "7c1e9a4b2d6f80135ac9e2b7d4f6a8c0e1b3d5f7"
12030 }
12031 }
12032 },
12033 "download_artifact": {
12034 "params": {
12035 "owner": "flagon-io",
12036 "name": "g1t",
12037 "id": "4182"
12038 },
12039 "response": {
12040 "url": "https://api.g1t.sh/actions/toolkit/blobs/eyJrIjoiYXJ0aWZhY3QiLCJpIjoiNDE4MiJ9.q3VbS1x9",
12041 "expires_at": "2026-10-08T15:13:00.000Z",
12042 "artifact": {
12043 "id": 4182,
12044 "node_id": "artifact_4182",
12045 "name": "web-dist",
12046 "size_in_bytes": 18734120,
12047 "url": "https://api.g1t.sh/repos/flagon-io/g1t/actions/artifacts/4182",
12048 "archive_download_url": "https://api.g1t.sh/repos/flagon-io/g1t/actions/artifacts/4182/zip",
12049 "expired": false,
12050 "digest": "sha256:5f1c3a9e7b2d4f6a8c0e1b3d5f7a9c2e4b6d8f0a1c3e5b7d9f2a4c6e8b0d1f3a",
12051 "created_at": "2026-10-08T14:03:51.204Z",
12052 "updated_at": "2026-10-08T14:03:52.880Z",
12053 "expires_at": "2026-10-22T14:03:51.204Z",
12054 "workflow_run": {
12055 "id": "run_01kq9c4e6g8j0m2p4r6t8v0x2z",
12056 "repository_id": "rep_01kpw0a2c4e6g8j0m2p4r6t8v0",
12057 "head_repository_id": "rep_01kpw0a2c4e6g8j0m2p4r6t8v0",
12058 "head_branch": "main",
12059 "head_sha": "7c1e9a4b2d6f80135ac9e2b7d4f6a8c0e1b3d5f7"
12060 }
12061 }
12062 },
12063 "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."
12064 },
12065 "download_tarball_archive": {
12066 "params": {
12067 "owner": "flagon-io",
12068 "name": "hello",
12069 "ref": "main"
12070 },
12071 "response": {
12072 "url": "https://g1t.sh/flagon-io/hello/archive/7c1e9a4b2d6f80135ac9e2b7d4f6a8c0e1b3d5f7.tar.gz?token=…",
12073 "commit": "7c1e9a4b2d6f80135ac9e2b7d4f6a8c0e1b3d5f7",
12074 "expires_at": "2026-10-12T15:13:00.000Z"
12075 },
12076 "notes": "Over REST the answer is `302 Found` with the link in `Location`, as GitHub's is, so `curl -L -H \"Authorization: Bearer g1t_…\" -o hello.tar.gz https://api.g1t.sh/repos/flagon-io/hello/tarball/main` saves the file and `tar -xzf hello.tar.gz` makes one folder, `flagon-io-hello-7c1e9a4/`; the body above is what the MCP `repository` tool's `tarball` returns. The link is for the commit the ref named when you asked, needs no token and stops working after 10 minutes. `actions/checkout` uses this route in a job container without git."
12077 },
12078 "download_zipball_archive": {
12079 "params": {
12080 "owner": "flagon-io",
12081 "name": "hello",
12082 "ref": "v1.2.0"
12083 },
12084 "response": {
12085 "url": "https://g1t.sh/flagon-io/hello/archive/7c1e9a4b2d6f80135ac9e2b7d4f6a8c0e1b3d5f7.zip?token=…",
12086 "commit": "7c1e9a4b2d6f80135ac9e2b7d4f6a8c0e1b3d5f7",
12087 "expires_at": "2026-10-12T15:13:00.000Z"
12088 },
12089 "notes": "Over REST the answer is `302 Found` with the link in `Location`, as GitHub's is, so `curl -L -o hello.zip …/zipball/v1.2.0` saves the file, with one folder, `flagon-io-hello-7c1e9a4/`; the body above is what the MCP `repository` tool's `zipball` returns. The link needs no token and stops working after 10 minutes."
12090 },
12091 "delete_artifact": {
12092 "params": {
12093 "owner": "flagon-io",
12094 "name": "g1t",
12095 "id": "4181"
12096 },
12097 "response": {
12098 "deleted": true,
12099 "id": 4181,
12100 "name": "coverage"
12101 }
12102 },
12103 "get_artifact_retention": {
12104 "params": {
12105 "owner": "flagon-io",
12106 "name": "g1t"
12107 },
12108 "response": {
12109 "days": 14,
12110 "maximum_allowed_days": 90
12111 }
12112 },
12113 "set_artifact_retention": {
12114 "params": {
12115 "owner": "flagon-io",
12116 "name": "g1t"
12117 },
12118 "request": {
12119 "days": 30
12120 },
12121 "response": {
12122 "days": 30,
12123 "maximum_allowed_days": 90
12124 },
12125 "notes": "Only artifacts uploaded afterwards are kept the new number of days. A workflow's `retention-days` asks for fewer, never more."
12126 },
12127 "list_packages": {
12128 "params": {
12129 "workspace": "acme"
12130 },
12131 "query": {
12132 "package_type": "container"
12133 },
12134 "response": [
12135 {
12136 "id": "pkg_01kq7b3d5f7h9k1m3p5r7t9v1x",
12137 "name": "web",
12138 "package_type": "container",
12139 "workspace": "acme",
12140 "address": "g1t.sh/acme/web",
12141 "visibility": "private",
12142 "repository": {
12143 "id": "rep_01kpw0a2c4e6g8j0m2p4r6t8v0",
12144 "name": "web",
12145 "full_name": "acme/web"
12146 },
12147 "description": null,
12148 "version_count": 12,
12149 "latest": "latest",
12150 "size_in_bytes": 48211932,
12151 "download_count": 1840,
12152 "inherit_access": true,
12153 "created_at": "2026-09-14T10:02:11.000Z",
12154 "updated_at": "2026-10-08T14:05:20.000Z",
12155 "deleted_at": null,
12156 "deleted_by": null,
12157 "purge_at": null,
12158 "html_url": "https://g1t.sh/acme/-/packages/container/web"
12159 }
12160 ],
12161 "notes": "Only packages you may pull are listed. With `state=deleted`, the workspace's deleted packages you administer that can still be restored, each with `deleted_at`, `deleted_by` and `purge_at`."
12162 },
12163 "get_package": {
12164 "params": {
12165 "workspace": "acme",
12166 "package_type": "npm",
12167 "package_name": "ui"
12168 },
12169 "response": {
12170 "id": "pkg_01kq7b4e6g8j0m2p4r6t8v0x2z",
12171 "name": "ui",
12172 "package_type": "npm",
12173 "workspace": "acme",
12174 "address": "g1t.sh/-/npm/@acme/ui",
12175 "visibility": "public",
12176 "repository": {
12177 "id": "rep_01kpw0b3d5f7h9k1m3p5r7t9v1",
12178 "name": "ui",
12179 "full_name": "acme/ui"
12180 },
12181 "description": "Acme's design system components.",
12182 "version_count": 4,
12183 "latest": "2.1.0",
12184 "size_in_bytes": 391204,
12185 "download_count": 9213,
12186 "inherit_access": true,
12187 "created_at": "2026-08-02T09:30:00.000Z",
12188 "updated_at": "2026-10-07T16:44:02.000Z",
12189 "deleted_at": null,
12190 "deleted_by": null,
12191 "purge_at": null,
12192 "html_url": "https://g1t.sh/acme/-/packages/npm/ui"
12193 },
12194 "notes": "A name with a slash is one URL-encoded path segment: `/workspaces/acme/packages/container/web%2Fworker`. Not found when you may not pull it."
12195 },
12196 "update_package": {
12197 "params": {
12198 "workspace": "acme",
12199 "package_type": "container",
12200 "package_name": "web"
12201 },
12202 "request": {
12203 "inherit_access": false
12204 },
12205 "response": {
12206 "id": "pkg_01kq7b3d5f7h9k1m3p5r7t9v1x",
12207 "name": "web",
12208 "package_type": "container",
12209 "workspace": "acme",
12210 "address": "g1t.sh/acme/web",
12211 "visibility": "private",
12212 "repository": {
12213 "id": "rep_01kpw0a2c4e6g8j0m2p4r6t8v0",
12214 "name": "web",
12215 "full_name": "acme/web"
12216 },
12217 "description": null,
12218 "version_count": 12,
12219 "latest": "latest",
12220 "size_in_bytes": 48211932,
12221 "download_count": 1840,
12222 "inherit_access": false,
12223 "created_at": "2026-09-14T10:02:11.000Z",
12224 "updated_at": "2026-10-08T15:01:40.000Z",
12225 "deleted_at": null,
12226 "deleted_by": null,
12227 "purge_at": null,
12228 "html_url": "https://g1t.sh/acme/-/packages/container/web"
12229 },
12230 "notes": "With `inherit_access` off, the repository's roles no longer reach the package: only the roles given on it (`set_package_access`) and the workspace's owners. `visibility` is for an unlinked package; a linked one has its repository's."
12231 },
12232 "delete_package": {
12233 "params": {
12234 "workspace": "acme",
12235 "package_type": "container",
12236 "package_name": "web-old"
12237 },
12238 "response": {
12239 "deleted": true
12240 },
12241 "notes": "The package and every version are gone from the registry at once. Restore it with `restore_package` within 30 days; until then nobody can publish a package of its name."
12242 },
12243 "restore_package": {
12244 "params": {
12245 "workspace": "acme",
12246 "package_type": "container",
12247 "package_name": "web-old"
12248 },
12249 "response": {
12250 "id": "pkg_01kq7b5f7h9k1m3p5r7t9v1x3z",
12251 "name": "web-old",
12252 "package_type": "container",
12253 "workspace": "acme",
12254 "address": "g1t.sh/acme/web-old",
12255 "visibility": "private",
12256 "repository": null,
12257 "description": null,
12258 "version_count": 3,
12259 "latest": "latest",
12260 "size_in_bytes": 20112840,
12261 "download_count": 112,
12262 "inherit_access": true,
12263 "created_at": "2026-07-01T08:00:00.000Z",
12264 "updated_at": "2026-10-08T15:10:00.000Z",
12265 "deleted_at": null,
12266 "deleted_by": null,
12267 "purge_at": null,
12268 "html_url": "https://g1t.sh/acme/-/packages/container/web-old"
12269 }
12270 },
12271 "list_package_versions": {
12272 "params": {
12273 "workspace": "acme",
12274 "package_type": "container",
12275 "package_name": "web"
12276 },
12277 "response": [
12278 {
12279 "id": "ver_01kq9c5f7h9k1m3p5r7t9v1x3z",
12280 "name": "sha256:9b2e4d6f8a0c1e3b5d7f9a2c4e6b8d0f1a3c5e7b9d2f4a6c8e0b1d3f5a7c9e2b",
12281 "digest": "sha256:9b2e4d6f8a0c1e3b5d7f9a2c4e6b8d0f1a3c5e7b9d2f4a6c8e0b1d3f5a7c9e2b",
12282 "size_in_bytes": 48211932,
12283 "download_count": 611,
12284 "tags": [
12285 "latest",
12286 "v1.4.0"
12287 ],
12288 "media_type": "application/vnd.oci.image.index.v1+json",
12289 "artifact_type": null,
12290 "subject": null,
12291 "platforms": [
12292 "linux/amd64",
12293 "linux/arm64"
12294 ],
12295 "published_by": "ana",
12296 "created_at": "2026-10-08T14:05:20.000Z",
12297 "deprecated": null,
12298 "deleted_at": null,
12299 "deleted_by": null,
12300 "purge_at": null
12301 }
12302 ],
12303 "notes": "A container image's versions are its manifests, named by digest; every other package's by version. `download_count` counts pulls and downloads of the version itself, approximately. With `state=deleted`, the deleted versions that can still be restored, for the package's admins."
12304 },
12305 "get_package_version": {
12306 "params": {
12307 "workspace": "acme",
12308 "package_type": "npm",
12309 "package_name": "ui",
12310 "version_id": "2.1.0"
12311 },
12312 "response": {
12313 "id": "ver_01kq9c6g8j0m2p4r6t8v0x2z4b",
12314 "name": "2.1.0",
12315 "digest": "sha256:3c5e7b9d2f4a6c8e0b1d3f5a7c9e2b4d6f8a0c1e3b5d7f9a2c4e6b8d0f1a3c5e",
12316 "size_in_bytes": 97412,
12317 "download_count": 2204,
12318 "tags": [
12319 "latest"
12320 ],
12321 "media_type": null,
12322 "artifact_type": null,
12323 "subject": null,
12324 "platforms": [],
12325 "published_by": "bo",
12326 "created_at": "2026-10-07T16:44:02.000Z",
12327 "deprecated": null,
12328 "deleted_at": null,
12329 "deleted_by": null,
12330 "purge_at": null
12331 },
12332 "notes": "`version_id` is the version's id (`ver_…`), its version, its digest, or a tag that points to it."
12333 },
12334 "delete_package_version": {
12335 "params": {
12336 "workspace": "acme",
12337 "package_type": "npm",
12338 "package_name": "ui",
12339 "version_id": "2.0.0-beta.1"
12340 },
12341 "response": {
12342 "deleted": true
12343 },
12344 "notes": "The version and its tags are gone from the registry at once. It can be restored for 30 days, and its version cannot be published again until it is purged."
12345 },
12346 "restore_package_version": {
12347 "params": {
12348 "workspace": "acme",
12349 "package_type": "npm",
12350 "package_name": "ui",
12351 "version_id": "2.0.0-beta.1"
12352 },
12353 "response": {
12354 "id": "ver_01kq9c7h9k1m3p5r7t9v1x3z5c",
12355 "name": "2.0.0-beta.1",
12356 "digest": "sha256:7d9f2a4c6e8b0d1f3a5c7e9b2d4f6a8c0e1b3d5f7a9c2e4b6d8f0a1c3e5b7d9f",
12357 "size_in_bytes": 96880,
12358 "download_count": 41,
12359 "tags": [
12360 "beta"
12361 ],
12362 "media_type": null,
12363 "artifact_type": null,
12364 "subject": null,
12365 "platforms": [],
12366 "published_by": "bo",
12367 "created_at": "2026-09-30T11:20:00.000Z",
12368 "deprecated": null,
12369 "deleted_at": null,
12370 "deleted_by": null,
12371 "purge_at": null
12372 },
12373 "notes": "Tags that pointed to it come back with it, unless one was moved to another version meanwhile."
12374 },
12375 "link_package": {
12376 "params": {
12377 "workspace": "acme",
12378 "package_type": "container",
12379 "package_name": "tools"
12380 },
12381 "request": {
12382 "repository": "acme/infra"
12383 },
12384 "response": {
12385 "id": "pkg_01kq7b6g8j0m2p4r6t8v0x2z4b",
12386 "name": "tools",
12387 "package_type": "container",
12388 "workspace": "acme",
12389 "address": "g1t.sh/acme/tools",
12390 "visibility": "private",
12391 "repository": {
12392 "id": "rep_01kpw0c4e6g8j0m2p4r6t8v0x2",
12393 "name": "infra",
12394 "full_name": "acme/infra"
12395 },
12396 "description": null,
12397 "version_count": 2,
12398 "latest": "latest",
12399 "size_in_bytes": 7340032,
12400 "download_count": 88,
12401 "inherit_access": true,
12402 "created_at": "2026-09-20T12:00:00.000Z",
12403 "updated_at": "2026-10-08T15:20:00.000Z",
12404 "deleted_at": null,
12405 "deleted_by": null,
12406 "purge_at": null,
12407 "html_url": "https://g1t.sh/acme/-/packages/container/tools"
12408 },
12409 "notes": "The package takes the repository's visibility. You need the Admin role on the package and on the repository."
12410 },
12411 "unlink_package": {
12412 "params": {
12413 "workspace": "acme",
12414 "package_type": "container",
12415 "package_name": "tools"
12416 },
12417 "response": {
12418 "id": "pkg_01kq7b6g8j0m2p4r6t8v0x2z4b",
12419 "name": "tools",
12420 "package_type": "container",
12421 "workspace": "acme",
12422 "address": "g1t.sh/acme/tools",
12423 "visibility": "private",
12424 "repository": null,
12425 "description": null,
12426 "version_count": 2,
12427 "latest": "latest",
12428 "size_in_bytes": 7340032,
12429 "download_count": 88,
12430 "inherit_access": true,
12431 "created_at": "2026-09-20T12:00:00.000Z",
12432 "updated_at": "2026-10-08T15:22:00.000Z",
12433 "deleted_at": null,
12434 "deleted_by": null,
12435 "purge_at": null,
12436 "html_url": "https://g1t.sh/acme/-/packages/container/tools"
12437 }
12438 },
12439 "list_package_access": {
12440 "params": {
12441 "workspace": "acme",
12442 "package_type": "container",
12443 "package_name": "web"
12444 },
12445 "response": {
12446 "inherit_access": true,
12447 "access": [
12448 {
12449 "type": "team",
12450 "id": "team_01kq1a3c5e7g9j1l3n5q7s9u1w",
12451 "name": "acme/platform",
12452 "role": "admin",
12453 "created_at": "2026-10-01T09:00:00.000Z"
12454 },
12455 {
12456 "type": "user",
12457 "id": "usr_01kkntcg1eeb98j62xjm7eh09q",
12458 "name": "dana",
12459 "role": "read",
12460 "created_at": "2026-10-02T13:30:00.000Z"
12461 }
12462 ]
12463 },
12464 "notes": "Only the roles given on the package itself. With `inherit_access` on, a linked package's repository roles count too, and the workspace's owners administer every package."
12465 },
12466 "set_package_access": {
12467 "params": {
12468 "workspace": "acme",
12469 "package_type": "container",
12470 "package_name": "web"
12471 },
12472 "request": {
12473 "username": "dana",
12474 "role": "write"
12475 },
12476 "response": [
12477 {
12478 "type": "team",
12479 "id": "team_01kq1a3c5e7g9j1l3n5q7s9u1w",
12480 "name": "acme/platform",
12481 "role": "admin",
12482 "created_at": "2026-10-01T09:00:00.000Z"
12483 },
12484 {
12485 "type": "user",
12486 "id": "usr_01kkntcg1eeb98j62xjm7eh09q",
12487 "name": "dana",
12488 "role": "write",
12489 "created_at": "2026-10-02T13:30:00.000Z"
12490 }
12491 ],
12492 "notes": "Give `username` or `team` (a team of the workspace, by slug). The role adds to what the repository or workspace already gives."
12493 },
12494 "remove_package_access": {
12495 "params": {
12496 "workspace": "acme",
12497 "package_type": "container",
12498 "package_name": "web"
12499 },
12500 "query": {
12501 "username": "dana"
12502 },
12503 "response": [
12504 {
12505 "type": "team",
12506 "id": "team_01kq1a3c5e7g9j1l3n5q7s9u1w",
12507 "name": "acme/platform",
12508 "role": "admin",
12509 "created_at": "2026-10-01T09:00:00.000Z"
12510 }
12511 ],
12512 "notes": "Over REST, name who in the query: `?username=dana` or `?team=platform`."
12513 },
12514 "list_package_actions_access": {
12515 "params": {
12516 "workspace": "acme",
12517 "package_type": "container",
12518 "package_name": "web"
12519 },
12520 "response": {
12521 "repositories": [
12522 {
12523 "repository_id": "rep_01kpw0a2c4e6g8j0m2p4r6t8v0",
12524 "repository": "acme/web",
12525 "role": "write",
12526 "linked": true,
12527 "created_at": null
12528 },
12529 {
12530 "repository_id": "rep_01kpw0d5f7h9k1m3p5r7t9v1x3",
12531 "repository": "acme/deploy",
12532 "role": "read",
12533 "linked": false,
12534 "created_at": "2026-10-03T10:00:00.000Z"
12535 }
12536 ]
12537 },
12538 "notes": "A workflow job's `G1T_TOKEN` reaches the package only from these repositories. The linked repository is always listed, with write."
12539 },
12540 "set_package_actions_access": {
12541 "params": {
12542 "workspace": "acme",
12543 "package_type": "container",
12544 "package_name": "web"
12545 },
12546 "request": {
12547 "repository": "deploy",
12548 "role": "read"
12549 },
12550 "response": {
12551 "repositories": [
12552 {
12553 "repository_id": "rep_01kpw0a2c4e6g8j0m2p4r6t8v0",
12554 "repository": "acme/web",
12555 "role": "write",
12556 "linked": true,
12557 "created_at": null
12558 },
12559 {
12560 "repository_id": "rep_01kpw0d5f7h9k1m3p5r7t9v1x3",
12561 "repository": "acme/deploy",
12562 "role": "read",
12563 "linked": false,
12564 "created_at": "2026-10-03T10:00:00.000Z"
12565 }
12566 ]
12567 }
12568 },
12569 "remove_package_actions_access": {
12570 "params": {
12571 "workspace": "acme",
12572 "package_type": "container",
12573 "package_name": "web",
12574 "repository": "deploy"
12575 },
12576 "response": {
12577 "repositories": [
12578 {
12579 "repository_id": "rep_01kpw0a2c4e6g8j0m2p4r6t8v0",
12580 "repository": "acme/web",
12581 "role": "write",
12582 "linked": true,
12583 "created_at": null
12584 }
12585 ]
12586 }
12587 },
12588 "list_workspace_artifacts": {
12589 "params": {
12590 "workspace": "acme"
12591 },
12592 "query": {
12593 "kind": "doc",
12594 "space": "general"
12595 },
12596 "response": {
12597 "items": [
12598 {
12599 "id": "fol_01kq7c4e6g8j0m2p4r6t8v0x2z",
12600 "kind": "doc",
12601 "title": "Q4 roadmap",
12602 "icon": "🗺️",
12603 "slug": "q4-roadmap-fol_01kq7c4e6g8j0m2p4r6t8v0x2z",
12604 "space": {
12605 "id": "spc_01kq1a3c5e7g9j1l3n5q7s9u1w",
12606 "slug": "general",
12607 "name": "General",
12608 "kind": "workspace"
12609 },
12610 "parent_id": null,
12611 "has_children": false,
12612 "owner": {
12613 "type": "user",
12614 "id": "usr_01kkntcg1eeb98j62xjm7eh09q",
12615 "username": "ana",
12616 "display_name": "Ana Lima"
12617 },
12618 "created_by": {
12619 "type": "user",
12620 "id": "usr_01kkntcg1eeb98j62xjm7eh09q",
12621 "username": "ana",
12622 "display_name": "Ana Lima"
12623 },
12624 "created_at": "2026-10-06T09:12:00.000Z",
12625 "updated_at": "2026-10-08T16:40:12.000Z",
12626 "edited_by": {
12627 "type": "user",
12628 "id": "usr_01kmb2d4f6h8k0m2p4r6t8v0x2",
12629 "username": "bo",
12630 "display_name": "Bo Chen"
12631 },
12632 "edited_at": "2026-10-08T16:40:12.000Z",
12633 "trashed_at": null,
12634 "viewer_role": "manage",
12635 "private": false,
12636 "shared_count": 1,
12637 "general_access": "workspace",
12638 "general_role": "view",
12639 "inherit": true,
12640 "agent_mode": "suggest",
12641 "excerpt": "What we ship this quarter, and what we leave for next.",
12642 "source": null,
12643 "stale": false,
12644 "html_url": "https://g1t.sh/acme/-/artifacts/q4-roadmap-fol_01kq7c4e6g8j0m2p4r6t8v0x2z"
12645 }
12646 ],
12647 "next_cursor": null
12648 },
12649 "notes": "Only artifacts you can open are listed, with `viewer_role` your own role on each. Page on with `cursor` set to `next_cursor` until it is null. With `state=trashed`, what you can restore from the trash. With `q`, the best matches first. These are Artifacts mode's docs, slides, designs and dashboards, not workflow runs' artifacts (`list_artifacts`)."
12650 },
12651 "search_workspace_artifacts": {
12652 "params": {
12653 "workspace": "acme"
12654 },
12655 "query": {
12656 "q": "what ships in Q4"
12657 },
12658 "response": [
12659 {
12660 "id": "fol_01kq7c4e6g8j0m2p4r6t8v0x2z",
12661 "kind": "doc",
12662 "title": "Q4 roadmap",
12663 "icon": "🗺️",
12664 "slug": "q4-roadmap-fol_01kq7c4e6g8j0m2p4r6t8v0x2z",
12665 "html_url": "https://g1t.sh/acme/-/artifacts/q4-roadmap-fol_01kq7c4e6g8j0m2p4r6t8v0x2z",
12666 "space_name": "General",
12667 "snippet": "We ship the merge queue and Artifacts in Q4; dashboards follow.",
12668 "heading": "This quarter",
12669 "matched": "both",
12670 "edited_at": "2026-10-08T16:40:12.000Z"
12671 }
12672 ],
12673 "notes": "Matches words and meaning, and is checked again against who can read each artifact now: one shared with you a minute ago is found, one taken away is not."
12674 },
12675 "get_workspace_artifact": {
12676 "params": {
12677 "workspace": "acme",
12678 "artifact_id": "fol_01kq7c4e6g8j0m2p4r6t8v0x2z"
12679 },
12680 "response": {
12681 "id": "fol_01kq7c4e6g8j0m2p4r6t8v0x2z",
12682 "kind": "doc",
12683 "title": "Q4 roadmap",
12684 "icon": "🗺️",
12685 "slug": "q4-roadmap-fol_01kq7c4e6g8j0m2p4r6t8v0x2z",
12686 "space": {
12687 "id": "spc_01kq1a3c5e7g9j1l3n5q7s9u1w",
12688 "slug": "general",
12689 "name": "General",
12690 "kind": "workspace"
12691 },
12692 "parent_id": null,
12693 "has_children": false,
12694 "owner": {
12695 "type": "user",
12696 "id": "usr_01kkntcg1eeb98j62xjm7eh09q",
12697 "username": "ana",
12698 "display_name": "Ana Lima"
12699 },
12700 "created_by": {
12701 "type": "user",
12702 "id": "usr_01kkntcg1eeb98j62xjm7eh09q",
12703 "username": "ana",
12704 "display_name": "Ana Lima"
12705 },
12706 "created_at": "2026-10-06T09:12:00.000Z",
12707 "updated_at": "2026-10-08T16:40:12.000Z",
12708 "edited_by": {
12709 "type": "user",
12710 "id": "usr_01kmb2d4f6h8k0m2p4r6t8v0x2",
12711 "username": "bo",
12712 "display_name": "Bo Chen"
12713 },
12714 "edited_at": "2026-10-08T16:40:12.000Z",
12715 "trashed_at": null,
12716 "viewer_role": "manage",
12717 "private": false,
12718 "shared_count": 1,
12719 "general_access": "workspace",
12720 "general_role": "view",
12721 "inherit": true,
12722 "agent_mode": "suggest",
12723 "excerpt": "What we ship this quarter, and what we leave for next.",
12724 "source": null,
12725 "stale": false,
12726 "html_url": "https://g1t.sh/acme/-/artifacts/q4-roadmap-fol_01kq7c4e6g8j0m2p4r6t8v0x2z"
12727 },
12728 "notes": "`artifact_id` is the id, or the artifact's address (`q4-roadmap-fol_…`, or its whole link). Not found when you cannot open it, the same as when it does not exist."
12729 },
12730 "get_workspace_artifact_content": {
12731 "params": {
12732 "workspace": "acme",
12733 "artifact_id": "fol_01kq7c4e6g8j0m2p4r6t8v0x2z"
12734 },
12735 "response": {
12736 "artifact": {
12737 "id": "fol_01kq7c4e6g8j0m2p4r6t8v0x2z",
12738 "kind": "doc",
12739 "title": "Q4 roadmap",
12740 "icon": "🗺️",
12741 "slug": "q4-roadmap-fol_01kq7c4e6g8j0m2p4r6t8v0x2z",
12742 "html_url": "https://g1t.sh/acme/-/artifacts/q4-roadmap-fol_01kq7c4e6g8j0m2p4r6t8v0x2z",
12743 "edited_at": "2026-10-08T16:40:12.000Z"
12744 },
12745 "space": {
12746 "id": "spc_01kq1a3c5e7g9j1l3n5q7s9u1w",
12747 "slug": "general",
12748 "name": "General",
12749 "agent_mode": "suggest"
12750 },
12751 "content": "# Q4 roadmap\n\n## This quarter\n\nWe ship the merge queue and Artifacts.\n",
12752 "blocks": [
12753 {
12754 "id": "b_4f1c",
12755 "type": "heading",
12756 "level": 1,
12757 "markdown": "# Q4 roadmap"
12758 },
12759 {
12760 "id": "b_9a02",
12761 "type": "heading",
12762 "level": 2,
12763 "markdown": "## This quarter"
12764 },
12765 {
12766 "id": "b_77d3",
12767 "type": "paragraph",
12768 "level": null,
12769 "markdown": "We ship the merge queue and Artifacts."
12770 }
12771 ],
12772 "can": {
12773 "read": true,
12774 "suggest": true,
12775 "edit": true
12776 }
12777 },
12778 "notes": "A doc's content is Markdown. `blocks` are its top-level blocks, whose ids an edit with a `blocks` target names. Slides, designs and dashboards answer `422` saying they are not here yet."
12779 },
12780 "list_workspace_artifact_versions": {
12781 "params": {
12782 "workspace": "acme",
12783 "artifact_id": "fol_01kq7c4e6g8j0m2p4r6t8v0x2z"
12784 },
12785 "response": [
12786 {
12787 "id": "ver_01kq9e6g8j0m2p4r6t8v0x2z4b",
12788 "artifact_id": "fol_01kq7c4e6g8j0m2p4r6t8v0x2z",
12789 "created_at": "2026-10-08T16:40:12.000Z",
12790 "kind": "edit",
12791 "note": null,
12792 "authors": [
12793 {
12794 "type": "user",
12795 "id": "usr_01kmb2d4f6h8k0m2p4r6t8v0x2",
12796 "username": "bo",
12797 "display_name": "Bo Chen"
12798 }
12799 ]
12800 },
12801 {
12802 "id": "ver_01kq7c4e6g8j0m2p4r6t8v0x2y",
12803 "artifact_id": "fol_01kq7c4e6g8j0m2p4r6t8v0x2z",
12804 "created_at": "2026-10-06T09:12:00.000Z",
12805 "kind": "created",
12806 "note": null,
12807 "authors": [
12808 {
12809 "type": "user",
12810 "id": "usr_01kkntcg1eeb98j62xjm7eh09q",
12811 "username": "ana",
12812 "display_name": "Ana Lima"
12813 }
12814 ]
12815 }
12816 ]
12817 },
12818 "get_workspace_artifact_access": {
12819 "params": {
12820 "workspace": "acme",
12821 "artifact_id": "fol_01kq7c4e6g8j0m2p4r6t8v0x2z"
12822 },
12823 "response": {
12824 "artifact_id": "fol_01kq7c4e6g8j0m2p4r6t8v0x2z",
12825 "owner": {
12826 "type": "user",
12827 "id": "usr_01kkntcg1eeb98j62xjm7eh09q",
12828 "username": "ana",
12829 "display_name": "Ana Lima"
12830 },
12831 "shared_with": [
12832 {
12833 "principal": "user:usr_01kmb2d4f6h8k0m2p4r6t8v0x2",
12834 "member": {
12835 "type": "user",
12836 "id": "usr_01kmb2d4f6h8k0m2p4r6t8v0x2",
12837 "username": "bo",
12838 "display_name": "Bo Chen"
12839 },
12840 "role": "edit",
12841 "inherited_from": null
12842 },
12843 {
12844 "principal": "team:design",
12845 "member": {
12846 "type": "team",
12847 "slug": "design",
12848 "display_name": "@acme/design"
12849 },
12850 "role": "comment",
12851 "inherited_from": null
12852 }
12853 ],
12854 "general_access": "workspace",
12855 "general_role": "view",
12856 "inherit": true,
12857 "inherited_from": {
12858 "type": "space",
12859 "id": "spc_01kq1a3c5e7g9j1l3n5q7s9u1w",
12860 "name": "General"
12861 },
12862 "agent_mode": null,
12863 "can_share": true
12864 },
12865 "notes": "Its owner always has full access and is not in `shared_with`. `inherited_from` on a row is the doc above it that gives that access; on the whole list, the space or doc it follows while `inherit` is true."
12866 },
12867 "list_workspace_artifact_templates": {
12868 "params": {
12869 "workspace": "acme"
12870 },
12871 "query": {
12872 "kind": "doc"
12873 },
12874 "response": [
12875 {
12876 "id": "builtin:doc:meeting-notes",
12877 "kind": "doc",
12878 "name": "Meeting notes",
12879 "description": "Who came, what was decided, and what happens next.",
12880 "icon": "📝",
12881 "builtin": true,
12882 "body": "# Meeting notes\n\n## Attendees\n\n## Decisions\n\n## Next steps\n"
12883 }
12884 ]
12885 },
12886 "list_workspace_artifact_spaces": {
12887 "params": {
12888 "workspace": "acme"
12889 },
12890 "response": [
12891 {
12892 "id": "spc_01kq1a3c5e7g9j1l3n5q7s9u1w",
12893 "slug": "general",
12894 "name": "General",
12895 "description": null,
12896 "icon": null,
12897 "kind": "workspace",
12898 "is_default": true,
12899 "joined": true,
12900 "viewer_role": "edit",
12901 "artifact_count": 14
12902 },
12903 {
12904 "id": "spc_01kq2b4d6f8h0k2m4p6r8t0v2x",
12905 "slug": "design",
12906 "name": "Design",
12907 "description": "The design team's specs.",
12908 "icon": "🎨",
12909 "kind": "team",
12910 "is_default": false,
12911 "joined": true,
12912 "viewer_role": "view",
12913 "artifact_count": 6
12914 }
12915 ],
12916 "notes": "Open spaces show once you join them in Artifacts; General always shows. Give a space's `slug` or `id` as `space` to the other artifact calls."
12917 },
12918 "query_workspace_dataset": {
12919 "params": {
12920 "workspace": "acme"
12921 },
12922 "request": {
12923 "query": {
12924 "dataset": "pull_requests",
12925 "measure": {
12926 "op": "count"
12927 },
12928 "group_by": "repo",
12929 "range": {
12930 "from": "2026-09-01",
12931 "to": "2026-09-30"
12932 }
12933 }
12934 },
12935 "response": {
12936 "columns": [
12937 {
12938 "name": "repo",
12939 "type": "string"
12940 },
12941 {
12942 "name": "count",
12943 "type": "number"
12944 }
12945 ],
12946 "rows": [
12947 [
12948 "acme/web",
12949 42
12950 ],
12951 [
12952 "acme/api",
12953 7
12954 ]
12955 ],
12956 "truncated": false,
12957 "partial": false,
12958 "as_of": "2026-10-09T12:00:00.000Z"
12959 },
12960 "notes": "Runs as you, over what you can read: `partial` is true when some of it was left out because you cannot read it. Until dashboards ship this answers `422` saying they are not here yet."
12961 },
12962 "create_workspace_artifact": {
12963 "params": {
12964 "workspace": "acme"
12965 },
12966 "request": {
12967 "kind": "doc",
12968 "title": "Release notes",
12969 "markdown": "# Release notes\n\nWhat changed in 2.4.\n"
12970 },
12971 "response": {
12972 "id": "fol_01kq8d5f7h9k1n3q5s7u9w1y3a",
12973 "kind": "doc",
12974 "title": "Release notes",
12975 "icon": null,
12976 "slug": "release-notes-fol_01kq8d5f7h9k1n3q5s7u9w1y3a",
12977 "space": null,
12978 "parent_id": null,
12979 "has_children": false,
12980 "owner": {
12981 "type": "user",
12982 "id": "usr_01kkntcg1eeb98j62xjm7eh09q",
12983 "username": "ana",
12984 "display_name": "Ana Lima"
12985 },
12986 "created_by": {
12987 "type": "user",
12988 "id": "usr_01kkntcg1eeb98j62xjm7eh09q",
12989 "username": "ana",
12990 "display_name": "Ana Lima"
12991 },
12992 "created_at": "2026-10-09T10:00:00.000Z",
12993 "updated_at": "2026-10-09T10:00:00.000Z",
12994 "edited_by": null,
12995 "edited_at": "2026-10-09T10:00:00.000Z",
12996 "trashed_at": null,
12997 "viewer_role": "manage",
12998 "private": true,
12999 "shared_count": 0,
13000 "general_access": "none",
13001 "general_role": null,
13002 "inherit": true,
13003 "agent_mode": null,
13004 "excerpt": "What changed in 2.4.",
13005 "source": null,
13006 "stale": false,
13007 "html_url": "https://g1t.sh/acme/-/artifacts/release-notes-fol_01kq8d5f7h9k1n3q5s7u9w1y3a"
13008 },
13009 "notes": "Left out `space` and `parent_id`, it lands in your Private, where only you can open it until you share it. `kind` is `doc` until slides, designs and dashboards ship; they answer `422` saying they are not here yet."
13010 },
13011 "update_workspace_artifact": {
13012 "params": {
13013 "workspace": "acme",
13014 "artifact_id": "fol_01kq8d5f7h9k1n3q5s7u9w1y3a"
13015 },
13016 "request": {
13017 "title": "Release notes 2.4",
13018 "space": "general"
13019 },
13020 "response": {
13021 "id": "fol_01kq8d5f7h9k1n3q5s7u9w1y3a",
13022 "kind": "doc",
13023 "title": "Release notes 2.4",
13024 "icon": null,
13025 "slug": "release-notes-2-4-fol_01kq8d5f7h9k1n3q5s7u9w1y3a",
13026 "space": {
13027 "id": "spc_01kq1a3c5e7g9j1l3n5q7s9u1w",
13028 "slug": "general",
13029 "name": "General",
13030 "kind": "workspace"
13031 },
13032 "parent_id": null,
13033 "has_children": false,
13034 "owner": {
13035 "type": "user",
13036 "id": "usr_01kkntcg1eeb98j62xjm7eh09q",
13037 "username": "ana",
13038 "display_name": "Ana Lima"
13039 },
13040 "created_by": {
13041 "type": "user",
13042 "id": "usr_01kkntcg1eeb98j62xjm7eh09q",
13043 "username": "ana",
13044 "display_name": "Ana Lima"
13045 },
13046 "created_at": "2026-10-09T10:00:00.000Z",
13047 "updated_at": "2026-10-09T10:00:00.000Z",
13048 "edited_by": null,
13049 "edited_at": "2026-10-09T10:00:00.000Z",
13050 "trashed_at": null,
13051 "viewer_role": "manage",
13052 "private": false,
13053 "shared_count": 0,
13054 "general_access": "none",
13055 "general_role": null,
13056 "inherit": true,
13057 "agent_mode": null,
13058 "excerpt": "What changed in 2.4.",
13059 "source": null,
13060 "stale": false,
13061 "html_url": "https://g1t.sh/acme/-/artifacts/release-notes-2-4-fol_01kq8d5f7h9k1n3q5s7u9w1y3a"
13062 },
13063 "notes": "Moving it into a space it follows (`inherit`) gives the space's members its access. `space` set to `private` moves it to the top of your Private, which only its owner can do."
13064 },
13065 "edit_workspace_artifact": {
13066 "params": {
13067 "workspace": "acme",
13068 "artifact_id": "fol_01kq7c4e6g8j0m2p4r6t8v0x2z"
13069 },
13070 "request": {
13071 "target": {
13072 "kind": "section",
13073 "heading": "This quarter"
13074 },
13075 "markdown": "## This quarter\n\nWe ship the merge queue, Artifacts and the API for both.\n",
13076 "note": "Adds the API"
13077 },
13078 "response": {
13079 "mode": "applied",
13080 "artifact": {
13081 "id": "fol_01kq7c4e6g8j0m2p4r6t8v0x2z",
13082 "kind": "doc",
13083 "title": "Q4 roadmap",
13084 "icon": "🗺️",
13085 "slug": "q4-roadmap-fol_01kq7c4e6g8j0m2p4r6t8v0x2z",
13086 "html_url": "https://g1t.sh/acme/-/artifacts/q4-roadmap-fol_01kq7c4e6g8j0m2p4r6t8v0x2z"
13087 },
13088 "version_id": "ver_01kqa7h9k1n3q5s7u9w1y3a5c",
13089 "summary": "Replaced the section This quarter."
13090 },
13091 "notes": "With only the comment role, or with `suggest_only`, the change is filed as a suggestion instead: `mode` is `suggested`, with the `suggestion` its editors accept or reject. A target that is not there any more answers `404`: read the content again."
13092 },
13093 "trash_workspace_artifact": {
13094 "params": {
13095 "workspace": "acme",
13096 "artifact_id": "fol_01kq8d5f7h9k1n3q5s7u9w1y3a"
13097 },
13098 "response": {
13099 "id": "fol_01kq8d5f7h9k1n3q5s7u9w1y3a",
13100 "kind": "doc",
13101 "title": "Release notes",
13102 "icon": null,
13103 "slug": "release-notes-fol_01kq8d5f7h9k1n3q5s7u9w1y3a",
13104 "space": null,
13105 "parent_id": null,
13106 "has_children": false,
13107 "owner": {
13108 "type": "user",
13109 "id": "usr_01kkntcg1eeb98j62xjm7eh09q",
13110 "username": "ana",
13111 "display_name": "Ana Lima"
13112 },
13113 "created_by": {
13114 "type": "user",
13115 "id": "usr_01kkntcg1eeb98j62xjm7eh09q",
13116 "username": "ana",
13117 "display_name": "Ana Lima"
13118 },
13119 "created_at": "2026-10-09T10:00:00.000Z",
13120 "updated_at": "2026-10-09T10:00:00.000Z",
13121 "edited_by": null,
13122 "edited_at": "2026-10-09T10:00:00.000Z",
13123 "trashed_at": "2026-10-09T11:30:00.000Z",
13124 "viewer_role": "manage",
13125 "private": true,
13126 "shared_count": 0,
13127 "general_access": "none",
13128 "general_role": null,
13129 "inherit": true,
13130 "agent_mode": null,
13131 "excerpt": "What changed in 2.4.",
13132 "source": null,
13133 "stale": false,
13134 "html_url": "https://g1t.sh/acme/-/artifacts/release-notes-fol_01kq8d5f7h9k1n3q5s7u9w1y3a"
13135 },
13136 "notes": "Everything under it goes to the trash with it. It is deleted for good 30 days later, or with `purge_workspace_artifact`."
13137 },
13138 "restore_workspace_artifact": {
13139 "params": {
13140 "workspace": "acme",
13141 "artifact_id": "fol_01kq8d5f7h9k1n3q5s7u9w1y3a"
13142 },
13143 "response": {
13144 "id": "fol_01kq8d5f7h9k1n3q5s7u9w1y3a",
13145 "kind": "doc",
13146 "title": "Release notes",
13147 "icon": null,
13148 "slug": "release-notes-fol_01kq8d5f7h9k1n3q5s7u9w1y3a",
13149 "space": null,
13150 "parent_id": null,
13151 "has_children": false,
13152 "owner": {
13153 "type": "user",
13154 "id": "usr_01kkntcg1eeb98j62xjm7eh09q",
13155 "username": "ana",
13156 "display_name": "Ana Lima"
13157 },
13158 "created_by": {
13159 "type": "user",
13160 "id": "usr_01kkntcg1eeb98j62xjm7eh09q",
13161 "username": "ana",
13162 "display_name": "Ana Lima"
13163 },
13164 "created_at": "2026-10-09T10:00:00.000Z",
13165 "updated_at": "2026-10-09T10:00:00.000Z",
13166 "edited_by": null,
13167 "edited_at": "2026-10-09T10:00:00.000Z",
13168 "trashed_at": null,
13169 "viewer_role": "manage",
13170 "private": true,
13171 "shared_count": 0,
13172 "general_access": "none",
13173 "general_role": null,
13174 "inherit": true,
13175 "agent_mode": null,
13176 "excerpt": "What changed in 2.4.",
13177 "source": null,
13178 "stale": false,
13179 "html_url": "https://g1t.sh/acme/-/artifacts/release-notes-fol_01kq8d5f7h9k1n3q5s7u9w1y3a"
13180 }
13181 },
13182 "restore_workspace_artifact_version": {
13183 "params": {
13184 "workspace": "acme",
13185 "artifact_id": "fol_01kq7c4e6g8j0m2p4r6t8v0x2z",
13186 "version_id": "ver_01kq7c4e6g8j0m2p4r6t8v0x2y"
13187 },
13188 "response": {
13189 "id": "ver_01kqb8j0m2p4r6t8v0x2z4b6d",
13190 "artifact_id": "fol_01kq7c4e6g8j0m2p4r6t8v0x2z",
13191 "created_at": "2026-10-09T12:00:00.000Z",
13192 "kind": "restore",
13193 "note": null,
13194 "authors": [
13195 {
13196 "type": "user",
13197 "id": "usr_01kkntcg1eeb98j62xjm7eh09q",
13198 "username": "ana",
13199 "display_name": "Ana Lima"
13200 }
13201 ]
13202 }
13203 },
13204 "set_workspace_artifact_access": {
13205 "params": {
13206 "workspace": "acme",
13207 "artifact_id": "fol_01kq7c4e6g8j0m2p4r6t8v0x2z"
13208 },
13209 "request": {
13210 "username": "bo",
13211 "role": "edit",
13212 "notify": "Can you fill in the dates?"
13213 },
13214 "response": {
13215 "artifact_id": "fol_01kq7c4e6g8j0m2p4r6t8v0x2z",
13216 "owner": {
13217 "type": "user",
13218 "id": "usr_01kkntcg1eeb98j62xjm7eh09q",
13219 "username": "ana",
13220 "display_name": "Ana Lima"
13221 },
13222 "shared_with": [
13223 {
13224 "principal": "user:usr_01kmb2d4f6h8k0m2p4r6t8v0x2",
13225 "member": {
13226 "type": "user",
13227 "id": "usr_01kmb2d4f6h8k0m2p4r6t8v0x2",
13228 "username": "bo",
13229 "display_name": "Bo Chen"
13230 },
13231 "role": "edit",
13232 "inherited_from": null
13233 },
13234 {
13235 "principal": "team:design",
13236 "member": {
13237 "type": "team",
13238 "slug": "design",
13239 "display_name": "@acme/design"
13240 },
13241 "role": "comment",
13242 "inherited_from": null
13243 }
13244 ],
13245 "general_access": "workspace",
13246 "general_role": "view",
13247 "inherit": true,
13248 "inherited_from": {
13249 "type": "space",
13250 "id": "spc_01kq1a3c5e7g9j1l3n5q7s9u1w",
13251 "name": "General"
13252 },
13253 "agent_mode": null,
13254 "can_share": true
13255 },
13256 "notes": "One call can share with one person, team or agent, and change `general_access`, `inherit` and `agent_mode`, in that order. `role` set to `none` takes someone's access away. General access never gives full access. On an artifact that follows the doc it is under, change general access on that doc, or set `inherit` to false first."
13257 },
13258 "purge_workspace_artifact": {
13259 "params": {
13260 "workspace": "acme",
13261 "artifact_id": "fol_01kq8d5f7h9k1n3q5s7u9w1y3a"
13262 },
13263 "response": {
13264 "deleted": true
13265 },
13266 "notes": "Only an artifact in the trash can be deleted for good: `trash_workspace_artifact` first."
13267 },
13268 "get_observability_overview": {
13269 "params": {
13270 "workspace": "flagon-io",
13271 "project": "g1t"
13272 },
13273 "query": {
13274 "from": "2026-10-12T13:00:00Z",
13275 "to": "2026-10-12T14:00:00Z",
13276 "environment": "production"
13277 },
13278 "response": {
13279 "from_us": 1791810000000000,
13280 "to_us": 1791813600000000,
13281 "step_s": 60,
13282 "totals": {
13283 "requests": 18204,
13284 "errors": 41,
13285 "error_rate": 0.0023,
13286 "latency": {
13287 "p50": 38.2,
13288 "p75": 71.5,
13289 "p95": 212.0,
13290 "p99": 640.0
13291 },
13292 "cpu": {
13293 "p50": 4.1,
13294 "p75": 6.8,
13295 "p95": 14.2,
13296 "p99": 29.5
13297 }
13298 },
13299 "previous": {
13300 "requests": 17650,
13301 "errors": 3,
13302 "error_rate": 0.0002,
13303 "latency": {
13304 "p50": 35.9,
13305 "p75": 66.0,
13306 "p95": 188.0,
13307 "p99": 402.0
13308 },
13309 "cpu": {
13310 "p50": 3.9,
13311 "p75": 6.5,
13312 "p95": 13.0,
13313 "p99": 22.1
13314 }
13315 },
13316 "points": [
13317 {
13318 "time_us": 1791810000000000,
13319 "requests": 302,
13320 "errors": 0,
13321 "status_2xx": 288,
13322 "status_3xx": 9,
13323 "status_4xx": 5,
13324 "status_5xx": 0,
13325 "latency": {
13326 "p50": 36.0,
13327 "p75": 68.0,
13328 "p95": 190.0,
13329 "p99": 410.0
13330 },
13331 "cpu": {
13332 "p50": 4.0,
13333 "p75": 6.6,
13334 "p95": 13.1,
13335 "p99": 22.0
13336 }
13337 }
13338 ],
13339 "routes": [
13340 {
13341 "route": "/:workspace/:repo/pulls/:number",
13342 "method": "GET",
13343 "requests": 2210,
13344 "errors": 37,
13345 "latency": {
13346 "p50": 61.0,
13347 "p75": 120.0,
13348 "p95": 480.0,
13349 "p99": 842.0
13350 }
13351 }
13352 ],
13353 "deployments": [
13354 {
13355 "deployment_id": "dpl_01kq9a2c4e6g8j0m2p4r6t8v0x",
13356 "environment": "production",
13357 "commit_sha": "7c1e9a4b2d6f80135ac9e2b7d4f6a8c0e1b3d5f7",
13358 "first_us": 1791813041000000,
13359 "requests": 2904,
13360 "errors": 39,
13361 "latency": {
13362 "p50": 40.1,
13363 "p75": 77.0,
13364 "p95": 260.0,
13365 "p99": 720.0
13366 }
13367 }
13368 ],
13369 "services": [
13370 {
13371 "service": "g1t-web",
13372 "source": "cloudflare",
13373 "requests": 18204,
13374 "errors": 41,
13375 "last_us": 1791813599000000
13376 }
13377 ],
13378 "regions": [
13379 {
13380 "region": "IAD",
13381 "requests": 9120
13382 },
13383 {
13384 "region": "AMS",
13385 "requests": 4410
13386 }
13387 ]
13388 },
13389 "notes": "`totals` is the period and `previous` the period of the same length before it, to compare. Latency and CPU are in milliseconds. `deployments` lists each deployment that answered in the period, newest first: when the error rate or latency rose, the deployment it began with is usually the first one with the higher numbers. Points are one per `step_s` seconds, chosen from the period unless `step` says. See [Observability](/guides/observability/)."
13390 },
13391 "list_requests": {
13392 "params": {
13393 "workspace": "flagon-io",
13394 "project": "g1t"
13395 },
13396 "query": {
13397 "errors_only": "true",
13398 "limit": "1"
13399 },
13400 "response": {
13401 "items": [
13402 {
13403 "id": "req_01kq9b7d9f1h3k5m7p9r1t3v5x",
13404 "time_us": 1791813807418000,
13405 "duration_us": 842000,
13406 "trigger": "fetch",
13407 "method": "GET",
13408 "url": "g1t.sh/flagon-io/g1t/pulls/412",
13409 "route": "/:workspace/:repo/pulls/:number",
13410 "status": 500,
13411 "outcome": "exception",
13412 "cpu_ms": 31.4,
13413 "region": "IAD",
13414 "country": "US",
13415 "trace_id": "4bf92f3577b34da6a3ce929d0e0e4736",
13416 "log_count": 2,
13417 "error": {
13418 "name": "TypeError",
13419 "message": "Cannot read properties of undefined (reading 'head')"
13420 },
13421 "service": "g1t-web",
13422 "environment": "production",
13423 "deployment_id": "dpl_01kq9a2c4e6g8j0m2p4r6t8v0x",
13424 "commit_sha": "7c1e9a4b2d6f80135ac9e2b7d4f6a8c0e1b3d5f7",
13425 "source": "cloudflare"
13426 }
13427 ],
13428 "next": "eyJ0IjoxNzkxODEzODA3NDE4MDAwfQ"
13429 },
13430 "notes": "Apps on g1t.page send their requests with nothing to set up; software hosted elsewhere sends them as OpenTelemetry server spans. `route` is the path with ids taken out, which the overview groups by. Pass `next` back as `cursor` for the next page; it is null on the last."
13431 },
13432 "get_request": {
13433 "params": {
13434 "workspace": "flagon-io",
13435 "project": "g1t",
13436 "id": "req_01kq9b7d9f1h3k5m7p9r1t3v5x"
13437 },
13438 "response": {
13439 "request": {
13440 "id": "req_01kq9b7d9f1h3k5m7p9r1t3v5x",
13441 "time_us": 1791813807418000,
13442 "duration_us": 842000,
13443 "trigger": "fetch",
13444 "method": "GET",
13445 "url": "g1t.sh/flagon-io/g1t/pulls/412",
13446 "route": "/:workspace/:repo/pulls/:number",
13447 "status": 500,
13448 "outcome": "exception",
13449 "cpu_ms": 31.4,
13450 "region": "IAD",
13451 "country": "US",
13452 "trace_id": "4bf92f3577b34da6a3ce929d0e0e4736",
13453 "log_count": 2,
13454 "error": {
13455 "name": "TypeError",
13456 "message": "Cannot read properties of undefined (reading 'head')"
13457 },
13458 "service": "g1t-web",
13459 "environment": "production",
13460 "deployment_id": "dpl_01kq9a2c4e6g8j0m2p4r6t8v0x",
13461 "commit_sha": "7c1e9a4b2d6f80135ac9e2b7d4f6a8c0e1b3d5f7",
13462 "source": "cloudflare"
13463 },
13464 "logs": [
13465 {
13466 "id": "log_01kq9b7d9f1h3k5m7p9r1t3v5y",
13467 "time_us": 1791813808251000,
13468 "severity": "error",
13469 "severity_number": 17,
13470 "body": "loading pull request 412 failed: Cannot read properties of undefined (reading 'head')",
13471 "trace_id": "4bf92f3577b34da6a3ce929d0e0e4736",
13472 "span_id": "00f067aa0ba902b7",
13473 "request_id": "req_01kq9b7d9f1h3k5m7p9r1t3v5x",
13474 "attributes": {
13475 "code.function": "loadPull",
13476 "http.route": "/:workspace/:repo/pulls/:number"
13477 },
13478 "service": "g1t-web",
13479 "environment": "production",
13480 "deployment_id": "dpl_01kq9a2c4e6g8j0m2p4r6t8v0x",
13481 "commit_sha": "7c1e9a4b2d6f80135ac9e2b7d4f6a8c0e1b3d5f7",
13482 "source": "cloudflare"
13483 }
13484 ]
13485 },
13486 "notes": "`404` when the project has no request with that id, or it is older than the project's retention."
13487 },
13488 "list_logs": {
13489 "params": {
13490 "workspace": "flagon-io",
13491 "project": "g1t"
13492 },
13493 "query": {
13494 "q": "\"failed\"",
13495 "level": "error,fatal",
13496 "limit": "1"
13497 },
13498 "response": {
13499 "items": [
13500 {
13501 "id": "log_01kq9b7d9f1h3k5m7p9r1t3v5y",
13502 "time_us": 1791813808251000,
13503 "severity": "error",
13504 "severity_number": 17,
13505 "body": "loading pull request 412 failed: Cannot read properties of undefined (reading 'head')",
13506 "trace_id": "4bf92f3577b34da6a3ce929d0e0e4736",
13507 "span_id": "00f067aa0ba902b7",
13508 "request_id": "req_01kq9b7d9f1h3k5m7p9r1t3v5x",
13509 "attributes": {
13510 "code.function": "loadPull",
13511 "http.route": "/:workspace/:repo/pulls/:number"
13512 },
13513 "service": "g1t-web",
13514 "environment": "production",
13515 "deployment_id": "dpl_01kq9a2c4e6g8j0m2p4r6t8v0x",
13516 "commit_sha": "7c1e9a4b2d6f80135ac9e2b7d4f6a8c0e1b3d5f7",
13517 "source": "cloudflare"
13518 }
13519 ],
13520 "next": null
13521 },
13522 "notes": "`q` finds lines holding all of its words, or a phrase in quotes. `level` takes one or more of `trace`, `debug`, `info`, `warn`, `error` and `fatal`. Follow `trace_id` to [the trace](/reference/api/observability/get-trace/) or `request_id` to [the request](/reference/api/observability/get-request/)."
13523 },
13524 "list_traces": {
13525 "params": {
13526 "workspace": "flagon-io",
13527 "project": "g1t"
13528 },
13529 "query": {
13530 "errors_only": "true",
13531 "min_duration_ms": "500"
13532 },
13533 "response": {
13534 "items": [
13535 {
13536 "trace_id": "4bf92f3577b34da6a3ce929d0e0e4736",
13537 "name": "GET /:workspace/:repo/pulls/:number",
13538 "start_us": 1791813807418000,
13539 "duration_us": 842000,
13540 "span_count": 6,
13541 "error_count": 1,
13542 "services": [
13543 "g1t-web",
13544 "g1t-work"
13545 ],
13546 "status": 500,
13547 "service": "g1t-web",
13548 "environment": "production",
13549 "deployment_id": "dpl_01kq9a2c4e6g8j0m2p4r6t8v0x",
13550 "commit_sha": "7c1e9a4b2d6f80135ac9e2b7d4f6a8c0e1b3d5f7",
13551 "source": "otlp"
13552 }
13553 ],
13554 "next": null
13555 },
13556 "notes": "Each trace is its root span (or its earliest, when the root has not arrived), with what the rest add up to."
13557 },
13558 "get_trace": {
13559 "params": {
13560 "workspace": "flagon-io",
13561 "project": "g1t",
13562 "trace_id": "4bf92f3577b34da6a3ce929d0e0e4736"
13563 },
13564 "response": {
13565 "trace_id": "4bf92f3577b34da6a3ce929d0e0e4736",
13566 "spans": [
13567 {
13568 "trace_id": "4bf92f3577b34da6a3ce929d0e0e4736",
13569 "span_id": "00f067aa0ba902b7",
13570 "parent_span_id": null,
13571 "name": "GET /:workspace/:repo/pulls/:number",
13572 "kind": "server",
13573 "start_us": 1791813807418000,
13574 "duration_us": 842000,
13575 "status": "error",
13576 "status_message": "TypeError",
13577 "attributes": {
13578 "http.request.method": "GET",
13579 "http.response.status_code": 500
13580 },
13581 "resource": {
13582 "service.name": "g1t-web",
13583 "deployment.environment.name": "production"
13584 },
13585 "events": [],
13586 "links": [],
13587 "service": "g1t-web",
13588 "environment": "production",
13589 "deployment_id": "dpl_01kq9a2c4e6g8j0m2p4r6t8v0x",
13590 "commit_sha": "7c1e9a4b2d6f80135ac9e2b7d4f6a8c0e1b3d5f7",
13591 "source": "otlp"
13592 }
13593 ],
13594 "logs": [
13595 {
13596 "id": "log_01kq9b7d9f1h3k5m7p9r1t3v5y",
13597 "time_us": 1791813808251000,
13598 "severity": "error",
13599 "severity_number": 17,
13600 "body": "loading pull request 412 failed: Cannot read properties of undefined (reading 'head')",
13601 "trace_id": "4bf92f3577b34da6a3ce929d0e0e4736",
13602 "span_id": "00f067aa0ba902b7",
13603 "request_id": "req_01kq9b7d9f1h3k5m7p9r1t3v5x",
13604 "attributes": {
13605 "code.function": "loadPull",
13606 "http.route": "/:workspace/:repo/pulls/:number"
13607 },
13608 "service": "g1t-web",
13609 "environment": "production",
13610 "deployment_id": "dpl_01kq9a2c4e6g8j0m2p4r6t8v0x",
13611 "commit_sha": "7c1e9a4b2d6f80135ac9e2b7d4f6a8c0e1b3d5f7",
13612 "source": "cloudflare"
13613 }
13614 ]
13615 },
13616 "notes": "Spans are in the order they started. `404` when the project has no spans of that trace."
13617 },
13618 "list_errors": {
13619 "params": {
13620 "workspace": "flagon-io",
13621 "project": "g1t"
13622 },
13623 "query": {
13624 "state": "open"
13625 },
13626 "response": [
13627 {
13628 "fingerprint": "9f2c41d07ab3e815",
13629 "name": "TypeError",
13630 "message": "Cannot read properties of undefined (reading 'head')",
13631 "stack": "TypeError: Cannot read properties of undefined (reading 'head')\n at loadPull (app/routes/pulls.ts:88:31)",
13632 "service": "g1t-web",
13633 "environment": "production",
13634 "first_us": 1791813062000000,
13635 "last_us": 1791813808000000,
13636 "count": 37,
13637 "first_deployment_id": "dpl_01kq9a2c4e6g8j0m2p4r6t8v0x",
13638 "last_request_id": "req_01kq9b7d9f1h3k5m7p9r1t3v5x",
13639 "last_trace_id": "4bf92f3577b34da6a3ce929d0e0e4736",
13640 "state": "open",
13641 "issue_number": null
13642 }
13643 ],
13644 "notes": "The same exception is one group: its name, its message with numbers and ids taken out, and the top frame of its stack. `first_deployment_id` is the deployment it was first seen on, what likely brought it in. At most 200 groups, most recently seen first."
13645 },
13646 "update_error": {
13647 "params": {
13648 "workspace": "flagon-io",
13649 "project": "g1t",
13650 "fingerprint": "9f2c41d07ab3e815"
13651 },
13652 "request": {
13653 "state": "resolved",
13654 "issue_number": 418
13655 },
13656 "response": {
13657 "fingerprint": "9f2c41d07ab3e815",
13658 "name": "TypeError",
13659 "message": "Cannot read properties of undefined (reading 'head')",
13660 "stack": "TypeError: Cannot read properties of undefined (reading 'head')\n at loadPull (app/routes/pulls.ts:88:31)",
13661 "service": "g1t-web",
13662 "environment": "production",
13663 "first_us": 1791813062000000,
13664 "last_us": 1791813808000000,
13665 "count": 37,
13666 "first_deployment_id": "dpl_01kq9a2c4e6g8j0m2p4r6t8v0x",
13667 "last_request_id": "req_01kq9b7d9f1h3k5m7p9r1t3v5x",
13668 "last_trace_id": "4bf92f3577b34da6a3ce929d0e0e4736",
13669 "state": "resolved",
13670 "issue_number": 418
13671 },
13672 "notes": "A resolved group that happens again opens again. `issue_number` links the issue made for it, so an agent can take it; null unlinks it. Needs the Triage role or higher."
13673 },
13674 "list_metrics": {
13675 "params": {
13676 "workspace": "flagon-io",
13677 "project": "g1t"
13678 },
13679 "response": [
13680 {
13681 "name": "http.server.request.duration",
13682 "kind": "histogram",
13683 "unit": "s",
13684 "description": "Duration of HTTP server requests.",
13685 "services": [
13686 "g1t-api"
13687 ],
13688 "last_us": 1791813800000000
13689 },
13690 {
13691 "name": "queue.depth",
13692 "kind": "gauge",
13693 "unit": "{message}",
13694 "description": "Messages waiting.",
13695 "services": [
13696 "g1t-work"
13697 ],
13698 "last_us": 1791813780000000
13699 }
13700 ]
13701 },
13702 "get_metric": {
13703 "params": {
13704 "workspace": "flagon-io",
13705 "project": "g1t",
13706 "metric": "http.server.request.duration"
13707 },
13708 "query": {
13709 "aggregate": "p95",
13710 "group_by": "http.route",
13711 "step": "300"
13712 },
13713 "response": {
13714 "name": "http.server.request.duration",
13715 "unit": "s",
13716 "step_s": 300,
13717 "series": [
13718 {
13719 "group": "/repos/:owner/:name/pulls",
13720 "points": [
13721 {
13722 "time_us": 1791813300000000,
13723 "value": 0.212
13724 },
13725 {
13726 "time_us": 1791813600000000,
13727 "value": 0.236
13728 }
13729 ]
13730 }
13731 ]
13732 },
13733 "notes": "A metric name with characters outside letters, digits, `.`, `_` and `-` is URL-encoded in the path. Gauges average in each step unless `aggregate` says `min` or `max`; sums add, and a cumulative sum becomes its increase; histograms give their mean, or a percentile from their buckets."
13734 },
13735 "get_observability_settings": {
13736 "params": {
13737 "workspace": "flagon-io",
13738 "project": "g1t"
13739 },
13740 "response": {
13741 "retention_days": 7,
13742 "deployments": true
13743 },
13744 "notes": "Requests, logs and spans are kept for `retention_days`; the overview's charts are kept longer, as per-minute counts. Needs the Admin role."
13745 },
13746 "update_observability_settings": {
13747 "params": {
13748 "workspace": "flagon-io",
13749 "project": "g1t"
13750 },
13751 "request": {
13752 "retention_days": 14
13753 },
13754 "response": {
13755 "retention_days": 14,
13756 "deployments": true
13757 },
13758 "notes": "`retention_days` is 1, 3, 7, 14 or 30. Turning `deployments` off stops the project's apps on g1t.page from sending and keeps its tokens and history. Needs the Admin role."
13759 },
13760 "list_ingest_tokens": {
13761 "params": {
13762 "workspace": "flagon-io",
13763 "project": "g1t"
13764 },
13765 "response": [
13766 {
13767 "id": "a1b2c3d4",
13768 "name": "Deployments on g1t.page",
13769 "hint": "g1to_prj_…2c8e",
13770 "created_by": null,
13771 "created_us": 1790841600000000,
13772 "last_used_us": 1791813809000000,
13773 "managed": true
13774 },
13775 {
13776 "id": "k3m9q2x7",
13777 "name": "fly.io collector",
13778 "hint": "g1to_prj_…9f3a",
13779 "created_by": "syntaqx",
13780 "created_us": 1791796364000000,
13781 "last_used_us": 1791813790000000,
13782 "managed": false
13783 }
13784 ],
13785 "notes": "Secrets are never returned: `hint` tells tokens apart. The `managed` one is g1t's own, for the project's apps on g1t.page, and is replaced by g1t, not by people. Needs the Admin role."
13786 },
13787 "create_ingest_token": {
13788 "params": {
13789 "workspace": "flagon-io",
13790 "project": "g1t"
13791 },
13792 "request": {
13793 "name": "fly.io collector"
13794 },
13795 "response": {
13796 "token": {
13797 "id": "k3m9q2x7",
13798 "name": "fly.io collector",
13799 "hint": "g1to_prj_…9f3a",
13800 "created_by": "syntaqx",
13801 "created_us": 1791796364000000,
13802 "last_used_us": null,
13803 "managed": false
13804 },
13805 "secret": "g1to_prj_…"
13806 },
13807 "notes": "The secret is returned this once. Send it as `Authorization: Bearer <secret>` (or the `x-g1t-token` header) with OTLP over HTTP, in JSON or protobuf, to `https://otel.g1t.sh/v1/traces`, `/v1/logs` and `/v1/metrics`, or to `/otlp/v1/…` on the API's own address. Needs the Admin role."
13808 },
13809 "delete_ingest_token": {
13810 "params": {
13811 "workspace": "flagon-io",
13812 "project": "g1t",
13813 "id": "k3m9q2x7"
13814 },
13815 "response": true,
13816 "notes": "What sends with it is refused from then on. `404` for the managed token, which people cannot delete. Needs the Admin role."
13817 },
13818 "list_telemetry_exports": {
13819 "params": {
13820 "workspace": "flagon-io",
13821 "project": "g1t"
13822 },
13823 "response": [
13824 {
13825 "id": "x7d2k9m4",
13826 "name": "Honeycomb",
13827 "endpoint": "https://api.honeycomb.io",
13828 "signals": [
13829 "traces",
13830 "logs"
13831 ],
13832 "header_names": [
13833 "x-honeycomb-team"
13834 ],
13835 "enabled": true,
13836 "last_error": null,
13837 "last_sent_us": 1791813809000000
13838 }
13839 ],
13840 "notes": "Header values are secrets: written, never read back, so only `header_names` are shown. `last_error` is what the endpoint answered the last time sending failed. Needs the Admin role."
13841 },
13842 "create_telemetry_export": {
13843 "params": {
13844 "workspace": "flagon-io",
13845 "project": "g1t"
13846 },
13847 "request": {
13848 "name": "Honeycomb",
13849 "endpoint": "https://api.honeycomb.io",
13850 "signals": [
13851 "traces",
13852 "logs"
13853 ],
13854 "headers": {
13855 "x-honeycomb-team": "hcaik_…"
13856 }
13857 },
13858 "response": {
13859 "id": "x7d2k9m4",
13860 "name": "Honeycomb",
13861 "endpoint": "https://api.honeycomb.io",
13862 "signals": [
13863 "traces",
13864 "logs"
13865 ],
13866 "header_names": [
13867 "x-honeycomb-team"
13868 ],
13869 "enabled": true,
13870 "last_error": null,
13871 "last_sent_us": null
13872 },
13873 "notes": "`endpoint` is the OTLP/HTTP base address; `/v1/traces`, `/v1/logs` and `/v1/metrics` are added. Requests go as log records. Telemetry is sent on as it arrives, from then on. Needs the Admin role."
13874 },
13875 "update_telemetry_export": {
13876 "params": {
13877 "workspace": "flagon-io",
13878 "project": "g1t",
13879 "id": "x7d2k9m4"
13880 },
13881 "request": {
13882 "enabled": false
13883 },
13884 "response": {
13885 "id": "x7d2k9m4",
13886 "name": "Honeycomb",
13887 "endpoint": "https://api.honeycomb.io",
13888 "signals": [
13889 "traces",
13890 "logs"
13891 ],
13892 "header_names": [
13893 "x-honeycomb-team"
13894 ],
13895 "enabled": false,
13896 "last_error": null,
13897 "last_sent_us": 1791813809000000
13898 },
13899 "notes": "Only what is given changes. A header given is set, a header given as `\"\"` is removed, and the rest are kept. Needs the Admin role."
13900 },
13901 "delete_telemetry_export": {
13902 "params": {
13903 "workspace": "flagon-io",
13904 "project": "g1t",
13905 "id": "x7d2k9m4"
13906 },
13907 "response": true,
13908 "notes": "Needs the Admin role."
13909 },
13910 "get_observability_usage": {
13911 "params": {
13912 "workspace": "flagon-io",
13913 "project": "g1t"
13914 },
13915 "response": {
13916 "month": "2026-10",
13917 "ingested_bytes": 4831920112,
13918 "requests": 1840221,
13919 "logs": 6204118,
13920 "spans": 9921540,
13921 "metric_points": 3120400,
13922 "stored_bytes": 1210443776
13923 },
13924 "notes": "This month so far. `ingested_bytes` is what arrived, after decoding: what ingest is metered by. Needs the Admin role."
13925 }
13926}