Skip to content

g1t/apps/api/src/reference.json

7,940 lines225,232 bytesCodeBlame
1{
2 "device_code": {
3 "request": {
4 "client_name": "Claude Code"
5 },
6 "response": {
7 "device_code": "Gm3k…",
8 "user_code": "WDJB-MJHT",
9 "verification_uri": "https://g1t.sh/device",
10 "verification_uri_complete": "https://g1t.sh/device?code=WDJB-MJHT",
11 "expires_in": 900,
12 "interval": 5
13 }
14 },
15 "device_token": {
16 "request": {
17 "device_code": "Gm3k…"
18 },
19 "response": {
20 "status": "approved",
21 "token": "g1t_…",
22 "username": "syntaqx",
23 "verified": true
24 }
25 },
26 "whoami": {
27 "response": {
28 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
29 "username": "syntaqx",
30 "kind": "user",
31 "verified": true,
32 "workspaces": [
33 {
34 "slug": "acme",
35 "role": "member",
36 "base_permission": "write"
37 },
38 {
39 "slug": "flagon-io",
40 "role": "owner",
41 "base_permission": "write"
42 }
43 ],
44 "token": {
45 "token_id": "tok_01kkntd3p2v8x6ym5r0c1q7a9e",
46 "scopes": [
47 "repo:read",
48 "issues:read",
49 "issues:write",
50 "pull_requests:read",
51 "pull_requests:write"
52 ]
53 }
54 },
55 "notes": "`token` is what the access token you called with may do: its `scopes` (left out for full access) and `legacy` when it was made before tokens had scopes. A token reaches every workspace and repository whoever it acts as can; its scopes say what it may do there. See [Scopes](/guides/authentication/#scopes). `kind` is `user`, `workspace` for a [workspace access token](/guides/workspaces/#workspace-access-tokens), or `agent` for the token a g1t agent works with. For a workspace token, `username` is the workspace's slug and `workspaces` holds only that workspace. Each workspace carries its `base_permission`: what a member gets on each of its repositories (owners have Admin). Roles given on single repositories are in `grants`, each with `repo_id`, `workspace` and `role`; it is left out when there are none. See [Access and roles](/guides/access-and-roles/)."
56 },
57 "create_workspace": {
58 "request": {
59 "slug": "acme-labs",
60 "name": "Acme Labs"
61 },
62 "response": {
63 "id": "wsp_01m43teqa9em6bje0bhvdj4jkb",
64 "slug": "acme-labs",
65 "name": "Acme Labs",
66 "description": null,
67 "created_at": "2026-10-04T16:02:51.337Z",
68 "member_count": 1,
69 "base_permission": "write"
70 },
71 "notes": "`base_permission` is what every member gets on each of its repositories: `write` until an owner changes it with `PATCH /workspaces/{workspace}` or `PUT /workspaces/{workspace}/base_permission`. See [Access and roles](/guides/access-and-roles/)."
72 },
73 "update_workspace": {
74 "params": {
75 "workspace": "acme-labs"
76 },
77 "request": {
78 "name": "Acme Labs",
79 "description": "Rockets, and the software that flies them."
80 },
81 "response": {
82 "id": "wsp_01m43teqa9em6bje0bhvdj4jkb",
83 "slug": "acme-labs",
84 "name": "Acme Labs",
85 "description": "Rockets, and the software that flies them.",
86 "created_at": "2026-10-04T16:02:51.337Z",
87 "member_count": 3,
88 "base_permission": "write"
89 },
90 "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. 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/)."
91 },
92 "delete_workspace": {
93 "request": {
94 "confirm": "acme-labs"
95 },
96 "response": true,
97 "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)."
98 },
99 "list_emails": {
100 "response": {
101 "emails": [
102 {
103 "email": "ada@example.com",
104 "verified": true,
105 "primary": true,
106 "backup": false,
107 "created_at": "2026-09-01T10:00:00.000Z",
108 "verified_at": "2026-09-01T10:02:11.000Z"
109 },
110 {
111 "email": "ada@acme.com",
112 "verified": true,
113 "primary": false,
114 "backup": true,
115 "created_at": "2026-10-02T09:30:00.000Z",
116 "verified_at": "2026-10-02T09:31:40.000Z"
117 },
118 {
119 "email": "ada.l@example.org",
120 "verified": false,
121 "primary": false,
122 "backup": false,
123 "created_at": "2026-10-05T14:12:03.000Z",
124 "verified_at": null
125 }
126 ],
127 "private_email": true,
128 "block_private_pushes": false,
129 "noreply": "6c1d0efg+ada@users.noreply.g1t.sh",
130 "commit_email": "6c1d0efg+ada@users.noreply.g1t.sh",
131 "limit": 10
132 },
133 "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)."
134 },
135 "add_email": {
136 "request": {
137 "email": "ada.l@example.org",
138 "password": "…"
139 },
140 "response": {
141 "emails": [
142 {
143 "email": "ada@example.com",
144 "verified": true,
145 "primary": true,
146 "backup": false,
147 "created_at": "2026-09-01T10:00:00.000Z",
148 "verified_at": "2026-09-01T10:02:11.000Z"
149 },
150 {
151 "email": "ada@acme.com",
152 "verified": true,
153 "primary": false,
154 "backup": true,
155 "created_at": "2026-10-02T09:30:00.000Z",
156 "verified_at": "2026-10-02T09:31:40.000Z"
157 },
158 {
159 "email": "ada.l@example.org",
160 "verified": false,
161 "primary": false,
162 "backup": false,
163 "created_at": "2026-10-05T14:12:03.000Z",
164 "verified_at": null
165 }
166 ],
167 "private_email": true,
168 "block_private_pushes": false,
169 "noreply": "6c1d0efg+ada@users.noreply.g1t.sh",
170 "commit_email": "6c1d0efg+ada@users.noreply.g1t.sh",
171 "limit": 10
172 },
173 "notes": "Answers `403` with code `reauth_required` when `password` is missing or wrong, and `409` when another account has confirmed the address. The new address stays unconfirmed until its link is followed."
174 },
175 "remove_email": {
176 "request": {
177 "password": "…"
178 },
179 "response": {
180 "emails": [
181 {
182 "email": "ada@example.com",
183 "verified": true,
184 "primary": true,
185 "backup": false,
186 "created_at": "2026-09-01T10:00:00.000Z",
187 "verified_at": "2026-09-01T10:02:11.000Z"
188 },
189 {
190 "email": "ada@acme.com",
191 "verified": true,
192 "primary": false,
193 "backup": true,
194 "created_at": "2026-10-02T09:30:00.000Z",
195 "verified_at": "2026-10-02T09:31:40.000Z"
196 },
197 {
198 "email": "ada.l@example.org",
199 "verified": false,
200 "primary": false,
201 "backup": false,
202 "created_at": "2026-10-05T14:12:03.000Z",
203 "verified_at": null
204 }
205 ],
206 "private_email": true,
207 "block_private_pushes": false,
208 "noreply": "6c1d0efg+ada@users.noreply.g1t.sh",
209 "commit_email": "6c1d0efg+ada@users.noreply.g1t.sh",
210 "limit": 10
211 },
212 "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."
213 },
214 "update_email_settings": {
215 "request": {
216 "primary": "ada@acme.com",
217 "password": "…"
218 },
219 "response": {
220 "emails": [
221 {
222 "email": "ada@example.com",
223 "verified": true,
224 "primary": true,
225 "backup": false,
226 "created_at": "2026-09-01T10:00:00.000Z",
227 "verified_at": "2026-09-01T10:02:11.000Z"
228 },
229 {
230 "email": "ada@acme.com",
231 "verified": true,
232 "primary": false,
233 "backup": true,
234 "created_at": "2026-10-02T09:30:00.000Z",
235 "verified_at": "2026-10-02T09:31:40.000Z"
236 },
237 {
238 "email": "ada.l@example.org",
239 "verified": false,
240 "primary": false,
241 "backup": false,
242 "created_at": "2026-10-05T14:12:03.000Z",
243 "verified_at": null
244 }
245 ],
246 "private_email": true,
247 "block_private_pushes": false,
248 "noreply": "6c1d0efg+ada@users.noreply.g1t.sh",
249 "commit_email": "6c1d0efg+ada@users.noreply.g1t.sh",
250 "limit": 10
251 },
252 "notes": "Only the fields given change. `primary` and `backup` need `password`; `private_email` and `block_private_pushes` do not."
253 },
254 "list_invites": {
255 "response": {
256 "mode": "invite",
257 "allowance": {
258 "limit": 5,
259 "used": 2,
260 "remaining": 3
261 },
262 "workspaces": [
263 {
264 "slug": "acme-labs",
265 "allowance": {
266 "limit": 20,
267 "used": 4,
268 "remaining": 16
269 }
270 }
271 ],
272 "invites": [
273 {
274 "id": "inv_01kp2x7m8n9q0r1s2t3v4w5x6y",
275 "code": "g1t-k7m2-q9xd-4hpw-…",
276 "hint": "g1t-k7m2",
277 "email": "ada@example.com",
278 "kind": "account",
279 "workspace": null,
280 "status": "pending",
281 "charged_to": "user",
282 "invited_by": "syntaqx",
283 "redeemed_by": null,
284 "created_at": "2026-10-05T17:00:00.000Z",
285 "expires_at": "2026-11-04T17:00:00.000Z",
286 "redeemed_at": null,
287 "revoked_at": null
288 },
289 {
290 "id": "inv_01kp1v3c4d5e6f7g8h9j0k1m2n",
291 "code": null,
292 "hint": "g1t-p3rt",
293 "email": null,
294 "kind": "account",
295 "workspace": null,
296 "status": "redeemed",
297 "charged_to": "user",
298 "invited_by": "syntaqx",
299 "redeemed_by": "grace",
300 "created_at": "2026-10-02T09:12:40.000Z",
301 "expires_at": "2026-11-01T09:12:40.000Z",
302 "redeemed_at": "2026-10-02T11:30:05.000Z",
303 "revoked_at": null
304 }
305 ]
306 },
307 "notes": "`allowance.limit` and `allowance.remaining` are null when you have no limit. A revoked or expired invite that was never used is not counted. Ask for more at hey@flagon.io with the subject `[g1t Invites]`. See [Invites](/guides/authentication/#invites)."
308 },
309 "create_invite": {
310 "request": {
311 "email": "ada@example.com"
312 },
313 "response": {
314 "id": "inv_01kp2x7m8n9q0r1s2t3v4w5x6y",
315 "code": "g1t-k7m2-q9xd-4hpw-…",
316 "hint": "g1t-k7m2",
317 "email": "ada@example.com",
318 "kind": "account",
319 "workspace": null,
320 "status": "pending",
321 "charged_to": "user",
322 "invited_by": "syntaqx",
323 "redeemed_by": null,
324 "created_at": "2026-10-05T17:00:00.000Z",
325 "expires_at": "2026-11-04T17:00:00.000Z",
326 "redeemed_at": null,
327 "revoked_at": null
328 },
329 "notes": "Refused with `402` (`limit`) when you have no invites left, with `409` when you already have a pending invite for that address or it already has a g1t account, and with `403` for an agent's or a workspace's token. The code is returned in full; send people the link `https://g1t.sh/invite/<code>`."
330 },
331 "revoke_invite": {
332 "response": {
333 "id": "inv_01kp2x7m8n9q0r1s2t3v4w5x6y",
334 "code": null,
335 "hint": "g1t-k7m2",
336 "email": "ada@example.com",
337 "kind": "account",
338 "workspace": null,
339 "status": "revoked",
340 "charged_to": "user",
341 "invited_by": "syntaqx",
342 "redeemed_by": null,
343 "created_at": "2026-10-05T17:00:00.000Z",
344 "expires_at": "2026-11-04T17:00:00.000Z",
345 "redeemed_at": null,
346 "revoked_at": "2026-10-06T08:00:00.000Z"
347 }
348 },
349 "list_workspace_invites": {
350 "response": [
351 {
352 "id": "inv_01kp2x7m8n9q0r1s2t3v4w5x6y",
353 "code": "g1t-k7m2-q9xd-4hpw-…",
354 "hint": "g1t-k7m2",
355 "email": "ada@example.com",
356 "kind": "account",
357 "workspace": "acme-labs",
358 "status": "pending",
359 "charged_to": "workspace",
360 "invited_by": "syntaqx",
361 "redeemed_by": null,
362 "created_at": "2026-10-05T17:00:00.000Z",
363 "expires_at": "2026-11-04T17:00:00.000Z",
364 "redeemed_at": null,
365 "revoked_at": null
366 },
367 {
368 "id": "inv_01kp1z9y8x7w6v5t4s3r2q1p0n",
369 "code": "g1t-k7m2-q9xd-4hpw-…",
370 "hint": "g1t-w2vb",
371 "email": "linus@example.com",
372 "kind": "workspace",
373 "workspace": "acme-labs",
374 "status": "pending",
375 "charged_to": "none",
376 "invited_by": "syntaqx",
377 "redeemed_by": null,
378 "created_at": "2026-10-05T17:00:00.000Z",
379 "expires_at": "2026-11-04T17:00:00.000Z",
380 "redeemed_at": null,
381 "revoked_at": null
382 }
383 ]
384 },
385 "invite_member": {
386 "request": {
387 "email": "ada@example.com"
388 },
389 "response": {
390 "id": "inv_01kp2x7m8n9q0r1s2t3v4w5x6y",
391 "code": "g1t-k7m2-q9xd-4hpw-…",
392 "hint": "g1t-k7m2",
393 "email": "ada@example.com",
394 "kind": "account",
395 "workspace": "acme-labs",
396 "status": "pending",
397 "charged_to": "workspace",
398 "invited_by": "syntaqx",
399 "redeemed_by": null,
400 "created_at": "2026-10-05T17:00:00.000Z",
401 "expires_at": "2026-11-04T17:00:00.000Z",
402 "redeemed_at": null,
403 "revoked_at": null
404 },
405 "notes": "`kind` is `workspace` when the address already has a g1t account (`charged_to` is then `none`), and `account` when accepting makes one. Both answers look alike to the caller on purpose: the invite is emailed either way."
406 },
407 "revoke_workspace_invite": {
408 "response": {
409 "id": "inv_01kp2x7m8n9q0r1s2t3v4w5x6y",
410 "code": null,
411 "hint": "g1t-k7m2",
412 "email": "ada@example.com",
413 "kind": "account",
414 "workspace": "acme-labs",
415 "status": "revoked",
416 "charged_to": "workspace",
417 "invited_by": "syntaqx",
418 "redeemed_by": null,
419 "created_at": "2026-10-05T17:00:00.000Z",
420 "expires_at": "2026-11-04T17:00:00.000Z",
421 "redeemed_at": null,
422 "revoked_at": "2026-10-06T08:00:00.000Z"
423 }
424 },
425 "list_repos": {
426 "query": {
427 "q": "hello"
428 },
429 "response": [
430 {
431 "id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
432 "namespace": "flagon-io",
433 "name": "hello",
434 "description": "A tiny service that says hello.",
435 "is_private": false,
436 "owner_id": "usr_01kkntcg1eeb98j62xjm7eh09p",
437 "default_branch": "main",
438 "fork_of": null,
439 "protected": true,
440 "created_at": "2026-09-28T14:11:52.640Z",
441 "website": "https://hello.g1t.page",
442 "archived_at": null
443 }
444 ],
445 "notes": "Returns at most 50 repositories, newest first. Forks made for pull requests are left out."
446 },
447 "create_repo": {
448 "request": {
449 "workspace": "flagon-io",
450 "name": "hello-cli",
451 "description": "Command-line client for hello.",
452 "private": false
453 },
454 "response": {
455 "id": "rep_01m43tk1jhehztx23drs87f5fc",
456 "namespace": "flagon-io",
457 "name": "hello-cli",
458 "description": "Command-line client for hello.",
459 "is_private": false,
460 "owner_id": "usr_01kkntcg1eeb98j62xjm7eh09p",
461 "default_branch": "main",
462 "fork_of": null,
463 "protected": false,
464 "created_at": "2026-10-04T16:05:12.913Z",
465 "website": "https://hello.g1t.page",
466 "archived_at": null
467 },
468 "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."
469 },
470 "get_repo": {
471 "response": {
472 "id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
473 "namespace": "flagon-io",
474 "name": "hello",
475 "description": "A tiny service that says hello.",
476 "is_private": false,
477 "owner_id": "usr_01kkntcg1eeb98j62xjm7eh09p",
478 "default_branch": "main",
479 "fork_of": null,
480 "protected": true,
481 "created_at": "2026-09-28T14:11:52.640Z",
482 "website": "https://hello.g1t.page",
483 "archived_at": null
484 }
485 },
486 "update_repo": {
487 "request": {
488 "description": "Says hello, politely.",
489 "website": "hello.g1t.page",
490 "default_branch": "trunk",
491 "protected": true
492 },
493 "response": {
494 "id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
495 "namespace": "flagon-io",
496 "name": "hello",
497 "description": "Says hello, politely.",
498 "is_private": false,
499 "owner_id": "usr_01kkntcg1eeb98j62xjm7eh09p",
500 "default_branch": "trunk",
501 "fork_of": null,
502 "protected": true,
503 "created_at": "2026-09-28T14:11:52.640Z",
504 "topics": [
505 "http",
506 "example"
507 ],
508 "website": "https://hello.g1t.page",
509 "archived_at": null
510 },
511 "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/)."
512 },
513 "transfer_repo": {
514 "request": {
515 "to": "flagon-io"
516 },
517 "response": {
518 "id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
519 "namespace": "flagon-io",
520 "name": "hello",
521 "description": "A tiny service that says hello.",
522 "is_private": false,
523 "owner_id": "usr_01kkntcg1eeb98j62xjm7eh09p",
524 "default_branch": "main",
525 "fork_of": null,
526 "protected": true,
527 "created_at": "2026-09-28T14:11:52.640Z",
528 "website": "https://hello.g1t.page",
529 "archived_at": null
530 },
531 "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/)."
532 },
533 "rename_repo": {
534 "request": {
535 "name": "greeter"
536 },
537 "response": {
538 "id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
539 "namespace": "flagon-io",
540 "name": "greeter",
541 "description": "A tiny service that says hello.",
542 "is_private": false,
543 "owner_id": "usr_01kkntcg1eeb98j62xjm7eh09p",
544 "default_branch": "main",
545 "fork_of": null,
546 "protected": true,
547 "created_at": "2026-09-28T14:11:52.640Z",
548 "topics": [
549 "http",
550 "example"
551 ],
552 "website": "https://hello.g1t.page",
553 "archived_at": null
554 },
555 "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)."
556 },
557 "rename_branch": {
558 "params": {
559 "owner": "flagon-io",
560 "name": "hello",
561 "branch": "feature/login"
562 },
563 "request": {
564 "new_name": "feature/sign-in"
565 },
566 "response": {
567 "id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
568 "namespace": "flagon-io",
569 "name": "hello",
570 "description": "A tiny service that says hello.",
571 "is_private": false,
572 "owner_id": "usr_01kkntcg1eeb98j62xjm7eh09p",
573 "default_branch": "main",
574 "fork_of": null,
575 "protected": true,
576 "created_at": "2026-09-28T14:11:52.640Z",
577 "topics": [
578 "http",
579 "example"
580 ],
581 "website": "https://hello.g1t.page",
582 "archived_at": null
583 },
584 "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)."
585 },
586 "set_repo_visibility": {
587 "request": {
588 "private": true,
589 "confirm": "flagon-io/hello"
590 },
591 "response": {
592 "id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
593 "namespace": "flagon-io",
594 "name": "hello",
595 "description": "A tiny service that says hello.",
596 "is_private": true,
597 "owner_id": "usr_01kkntcg1eeb98j62xjm7eh09p",
598 "default_branch": "main",
599 "fork_of": null,
600 "protected": true,
601 "created_at": "2026-09-28T14:11:52.640Z",
602 "topics": [
603 "http",
604 "example"
605 ],
606 "website": "https://hello.g1t.page",
607 "archived_at": null
608 },
609 "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)."
610 },
611 "archive_repo": {
612 "response": {
613 "id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
614 "namespace": "flagon-io",
615 "name": "hello",
616 "description": "A tiny service that says hello.",
617 "is_private": false,
618 "owner_id": "usr_01kkntcg1eeb98j62xjm7eh09p",
619 "default_branch": "main",
620 "fork_of": null,
621 "protected": true,
622 "created_at": "2026-09-28T14:11:52.640Z",
623 "topics": [
624 "http",
625 "example"
626 ],
627 "website": "https://hello.g1t.page",
628 "archived_at": "2026-10-05T09:30:00.000Z"
629 },
630 "notes": "The repository, with `archived_at` set. Needs the Admin role (`403` otherwise). See [Archive a repository](/guides/managing-repositories/#archive-a-repository)."
631 },
632 "unarchive_repo": {
633 "response": {
634 "id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
635 "namespace": "flagon-io",
636 "name": "hello",
637 "description": "A tiny service that says hello.",
638 "is_private": false,
639 "owner_id": "usr_01kkntcg1eeb98j62xjm7eh09p",
640 "default_branch": "main",
641 "fork_of": null,
642 "protected": true,
643 "created_at": "2026-09-28T14:11:52.640Z",
644 "topics": [
645 "http",
646 "example"
647 ],
648 "website": "https://hello.g1t.page",
649 "archived_at": null
650 },
651 "notes": "The repository, with `archived_at` null. Needs the Admin role (`403` otherwise)."
652 },
653 "delete_repo": {
654 "request": {
655 "confirm": "flagon-io/hello"
656 },
657 "response": {
658 "id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
659 "namespace": "flagon-io",
660 "name": "hello",
661 "description": "A tiny service that says hello.",
662 "is_private": false,
663 "deleted_at": "2026-10-05T09:30:00.000Z",
664 "deleted_by": "syntaqx",
665 "purge_after": "2026-11-04T09:30:00.000Z"
666 },
667 "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)."
668 },
669 "list_deleted_repos": {
670 "params": {
671 "workspace": "flagon-io"
672 },
673 "response": [
674 {
675 "id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
676 "namespace": "flagon-io",
677 "name": "hello",
678 "description": "A tiny service that says hello.",
679 "is_private": false,
680 "deleted_at": "2026-10-05T09:30:00.000Z",
681 "deleted_by": "syntaqx",
682 "purge_after": "2026-11-04T09:30:00.000Z"
683 }
684 ],
685 "notes": "Newest first. Empty for anyone who is not an owner of the workspace."
686 },
687 "restore_repo": {
688 "response": {
689 "id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
690 "namespace": "flagon-io",
691 "name": "hello",
692 "description": "A tiny service that says hello.",
693 "is_private": false,
694 "owner_id": "usr_01kkntcg1eeb98j62xjm7eh09p",
695 "default_branch": "main",
696 "fork_of": null,
697 "protected": true,
698 "created_at": "2026-09-28T14:11:52.640Z",
699 "topics": [
700 "http",
701 "example"
702 ],
703 "website": "https://hello.g1t.page",
704 "archived_at": null
705 },
706 "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)."
707 },
708 "purge_repo": {
709 "request": {
710 "confirm": "flagon-io/hello"
711 },
712 "response": true,
713 "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."
714 },
715 "get_repo_settings": {
716 "response": {
717 "auto_merge": false,
718 "required_checks": [
719 "CI"
720 ],
721 "require_up_to_date": false,
722 "required_approvals": 0,
723 "count_agent_approvals": true,
724 "allow_ignoring_checks": true,
725 "agent_review": true,
726 "max_revisions": 2,
727 "merge_queue": false,
728 "hold_low_confidence": true,
729 "require_code_owner_review": false,
730 "updated_by": null,
731 "updated_at": null
732 }
733 },
734 "update_repo_settings": {
735 "request": {
736 "required_checks": [
737 "CI",
738 "g1t / deploy"
739 ],
740 "required_approvals": 1,
741 "count_agent_approvals": false,
742 "merge_queue": true,
743 "require_code_owner_review": true
744 },
745 "response": {
746 "auto_merge": false,
747 "required_checks": [
748 "CI",
749 "g1t / deploy"
750 ],
751 "require_up_to_date": false,
752 "required_approvals": 1,
753 "count_agent_approvals": false,
754 "allow_ignoring_checks": true,
755 "agent_review": true,
756 "max_revisions": 2,
757 "merge_queue": true,
758 "hold_low_confidence": true,
759 "require_code_owner_review": true,
760 "updated_by": "syntaqx",
761 "updated_at": "2026-10-04T16:20:37.508Z"
762 },
763 "notes": "`required_checks` replaces the whole list: at most 20 names, each a workflow's name or another status's context, as [`list_check_names`](/reference/api/repositories/list-check-names/) gives them. A pull request merges only once each passes on its head; one nothing has reported holds it too. With the merge queue on, each must also pass on the queued state, so the workflows behind them need `merge_group` in their `on:`. `required_approvals` is at most 6 and `max_revisions` at most 5. See [what a repository can ask for](/guides/working-with-g1t/#what-a-repository-can-ask-for). `hold_low_confidence` is on unless turned off: see [confidence](/guides/working-with-g1t/#how-sure-the-agent-is). With `require_code_owner_review`, a pull request into the default branch merges only once the code owners of every file it changes have approved it, as many as each section of its CODEOWNERS file asks: see [Code owners](/guides/codeowners/)."
764 },
765 "list_check_names": {
766 "response": [
767 {
768 "name": "CI",
769 "events": [
770 "pull_request",
771 "merge_group",
772 "push"
773 ],
774 "last_seen": "2026-10-06T09:14:02.118Z"
775 },
776 {
777 "name": "g1t / deploy",
778 "events": [],
779 "last_seen": "2026-10-06T08:51:40.006Z"
780 }
781 ],
782 "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."
783 },
784 "get_codeowners_errors": {
785 "params": {
786 "owner": "flagon-io",
787 "name": "hello"
788 },
789 "query": {
790 "ref": "main"
791 },
792 "response": {
793 "path": ".github/CODEOWNERS",
794 "ref": "main",
795 "size": 412,
796 "rules": 9,
797 "sections": [
798 "Docs"
799 ],
800 "errors": [
801 {
802 "line": 4,
803 "kind": "unknown_team",
804 "token": "@flagon-io/platform",
805 "message": "@flagon-io/platform is not a team of flagon-io."
806 },
807 {
808 "line": 7,
809 "kind": "negation",
810 "token": "!docs/internal/",
811 "message": "!docs/internal/ starts with !, and negation is not supported; this line is skipped. Give the path a later rule with no owners instead."
812 }
813 ]
814 },
815 "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/)."
816 },
817 "list_events": {
818 "query": {
819 "before": "evt_01m43t2a6c9e3g7j1m5q9t3x7b"
820 },
821 "response": [
822 {
823 "id": "evt_01m43smh3ve52vkcna207vqctf",
824 "type": "pull.opened",
825 "source": "work",
826 "time": "2026-10-01T18:20:02.117Z",
827 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
828 "actor": "usr_01kkntcg1eeb98j62xjm7eh09p",
829 "data": {
830 "pull_id": "pr_01m43smh3vexsr5pmp60qwv0vs",
831 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
832 "number": 14,
833 "issue": 12,
834 "agent": "claude-code"
835 }
836 },
837 {
838 "id": "evt_01m43shrzpf2vt5rxbb02z0xjt",
839 "type": "issue.opened",
840 "source": "work",
841 "time": "2026-10-01T18:04:11.482Z",
842 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
843 "actor": "usr_01kkntcg1eeb98j62xjm7eh09p",
844 "data": {
845 "issue_id": "iss_01m43shrzpfe49x74ga7sj1c6v",
846 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
847 "number": 12,
848 "title": "Greeting should name the caller"
849 }
850 }
851 ],
852 "notes": "Returns 50 events a page. To page back, send the `id` of the last event you have as `before`. `actor` is a user id, and `data` depends on `type`."
853 },
854 "list_issues": {
855 "query": {
856 "state": "open",
857 "label": "feature"
858 },
859 "response": [
860 {
861 "id": "iss_01m43shrzpfe49x74ga7sj1c6v",
862 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
863 "number": 12,
864 "title": "Greeting should name the caller",
865 "body": "Take a name from the first argument; fall back to world.",
866 "labels": [
867 "feature"
868 ],
869 "state": "open",
870 "reason": null,
871 "resolved_by": null,
872 "author": {
873 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
874 "username": "syntaqx",
875 "kind": "user",
876 "verified": false,
877 "workspaces": []
878 },
879 "requested_by": null,
880 "created_at": "2026-10-01T18:04:11.482Z",
881 "updated_at": "2026-10-01T18:04:11.482Z",
882 "closed_at": null,
883 "pull_count": 1,
884 "comment_count": 0,
885 "assignees": [],
886 "blocked_by": [],
887 "queued": false,
888 "agent": "claude-code",
889 "milestone": null
890 }
891 ],
892 "notes": "Returns at most 100 issues, newest first. `comment_count` counts comments, not events such as \"opened #14 for this\"."
893 },
894 "create_issue": {
895 "request": {
896 "title": "Greeting should name the caller",
897 "body": "Take a name from the first argument; fall back to world.",
898 "labels": [
899 "feature"
900 ]
901 },
902 "response": {
903 "id": "iss_01m43shrzpfe49x74ga7sj1c6v",
904 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
905 "number": 12,
906 "title": "Greeting should name the caller",
907 "body": "Take a name from the first argument; fall back to world.",
908 "labels": [
909 "feature"
910 ],
911 "state": "open",
912 "reason": null,
913 "resolved_by": null,
914 "author": {
915 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
916 "username": "syntaqx",
917 "kind": "user",
918 "verified": false,
919 "workspaces": []
920 },
921 "requested_by": null,
922 "created_at": "2026-10-01T18:04:11.482Z",
923 "updated_at": "2026-10-01T18:04:11.482Z",
924 "closed_at": null,
925 "pull_count": 0,
926 "comment_count": 0,
927 "assignees": [],
928 "blocked_by": [],
929 "queued": false,
930 "agent": null,
931 "milestone": null
932 },
933 "notes": "Labels are lowercased. A label not used before is created."
934 },
935 "get_issue": {
936 "response": {
937 "issue": {
938 "id": "iss_01m43shrzpfe49x74ga7sj1c6v",
939 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
940 "number": 12,
941 "title": "Greeting should name the caller",
942 "body": "Take a name from the first argument; fall back to world.",
943 "labels": [
944 "feature"
945 ],
946 "state": "closed",
947 "reason": "completed",
948 "resolved_by": 14,
949 "author": {
950 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
951 "username": "syntaqx",
952 "kind": "user",
953 "verified": false,
954 "workspaces": []
955 },
956 "requested_by": null,
957 "created_at": "2026-10-01T18:04:11.482Z",
958 "updated_at": "2026-10-01T18:52:17.093Z",
959 "closed_at": "2026-10-01T18:52:17.093Z",
960 "pull_count": 2,
961 "comment_count": 0,
962 "assignees": [],
963 "blocked_by": [],
964 "queued": false,
965 "agent": null,
966 "milestone": null
967 },
968 "pulls": [
969 {
970 "id": "pr_01m43sjq8tcz5rbm2a7k4d9e6w",
971 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
972 "number": 13,
973 "issue": 12,
974 "title": "Greeting should name the caller",
975 "body": null,
976 "agent": "claude-code",
977 "runtime": "external",
978 "status": "closed",
979 "fork": {
980 "namespace": "pulls",
981 "name": "pr_01m43sjq8tcz5rbm2a7k4d9e6w"
982 },
983 "fork_repo_id": "rep_01m43smh5xd7aw2kq9tv0b4c8e",
984 "branch": null,
985 "head_commit": null,
986 "merge_base": null,
987 "merged_by": null,
988 "merged_at": null,
989 "superseded_by": 14,
990 "check_status": null,
991 "files": [],
992 "assignees": [],
993 "reviewers": [],
994 "labels": [],
995 "milestone": null,
996 "base": "main",
997 "author": {
998 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
999 "username": "syntaqx",
1000 "kind": "user",
1001 "verified": false,
1002 "workspaces": []
1003 },
1004 "requested_by": null,
1005 "created_at": "2026-10-01T18:20:02.117Z",
1006 "updated_at": "2026-10-01T18:20:02.117Z"
1007 },
1008 {
1009 "id": "pr_01m43smh3vexsr5pmp60qwv0vs",
1010 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
1011 "number": 14,
1012 "issue": 12,
1013 "title": "Greeting should name the caller",
1014 "body": "Reads a name from the first argument. `hello ana` prints \"Hello, ana!\".",
1015 "agent": "claude-code",
1016 "runtime": "external",
1017 "status": "merged",
1018 "fork": {
1019 "namespace": "pulls",
1020 "name": "pr_01m43smh3vexsr5pmp60qwv0vs"
1021 },
1022 "fork_repo_id": "rep_01m43smh5xd7aw2kq9tv0b4c8e",
1023 "branch": null,
1024 "head_commit": "9f2c4e1a7b3d5f60812a4c6e8b0d2f4a6c8e0b13",
1025 "merge_base": "3a7e9c1b5d2f4a6c8e0b2d4f6a8c0e2b4d6f8a1c",
1026 "merged_by": "syntaqx",
1027 "merged_at": "2026-10-01T18:52:17.093Z",
1028 "superseded_by": null,
1029 "check_status": "passed",
1030 "files": [
1031 {
1032 "path": "src/main.rs",
1033 "additions": 6,
1034 "deletions": 2
1035 }
1036 ],
1037 "assignees": [],
1038 "reviewers": [
1039 "ana"
1040 ],
1041 "labels": [],
1042 "milestone": null,
1043 "base": "main",
1044 "author": {
1045 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
1046 "username": "syntaqx",
1047 "kind": "user",
1048 "verified": false,
1049 "workspaces": []
1050 },
1051 "requested_by": null,
1052 "created_at": "2026-10-01T18:20:02.117Z",
1053 "updated_at": "2026-10-01T18:52:17.093Z"
1054 }
1055 ],
1056 "comments": [
1057 {
1058 "id": "cmt_01m43sr2b7d5f0j6k3n8p1q4v9",
1059 "kind": "event",
1060 "author": {
1061 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
1062 "username": "syntaqx",
1063 "kind": "user",
1064 "verified": false,
1065 "workspaces": []
1066 },
1067 "body": "opened #14 for this",
1068 "path": null,
1069 "line": null,
1070 "verdict": null,
1071 "created_at": "2026-10-01T18:20:02.141Z"
1072 }
1073 ]
1074 },
1075 "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."
1076 },
1077 "update_issue": {
1078 "request": {
1079 "labels": [
1080 "feature",
1081 "good first issue"
1082 ],
1083 "assignees": [
1084 "syntaqx"
1085 ],
1086 "milestone": 3
1087 },
1088 "response": {
1089 "id": "iss_01m43shrzpfe49x74ga7sj1c6v",
1090 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
1091 "number": 12,
1092 "title": "Greeting should name the caller",
1093 "body": "Take a name from the first argument; fall back to world.",
1094 "labels": [
1095 "feature",
1096 "good first issue"
1097 ],
1098 "state": "open",
1099 "reason": null,
1100 "resolved_by": null,
1101 "author": {
1102 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
1103 "username": "syntaqx",
1104 "kind": "user",
1105 "verified": false,
1106 "workspaces": []
1107 },
1108 "requested_by": null,
1109 "created_at": "2026-10-01T18:04:11.482Z",
1110 "updated_at": "2026-10-01T18:09:47.305Z",
1111 "closed_at": null,
1112 "pull_count": 0,
1113 "comment_count": 0,
1114 "assignees": [
1115 "syntaqx"
1116 ],
1117 "blocked_by": [],
1118 "queued": false,
1119 "agent": null,
1120 "milestone": {
1121 "number": 3,
1122 "title": "Launch"
1123 }
1124 }
1125 },
1126 "close_issue": {
1127 "request": {
1128 "reason": "not_planned"
1129 },
1130 "response": {
1131 "id": "iss_01m43shrzpfe49x74ga7sj1c6v",
1132 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
1133 "number": 12,
1134 "title": "Greeting should name the caller",
1135 "body": "Take a name from the first argument; fall back to world.",
1136 "labels": [
1137 "feature"
1138 ],
1139 "state": "closed",
1140 "reason": "not_planned",
1141 "resolved_by": null,
1142 "author": {
1143 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
1144 "username": "syntaqx",
1145 "kind": "user",
1146 "verified": false,
1147 "workspaces": []
1148 },
1149 "requested_by": null,
1150 "created_at": "2026-10-01T18:04:11.482Z",
1151 "updated_at": "2026-10-01T19:30:00.214Z",
1152 "closed_at": "2026-10-01T19:30:00.214Z",
1153 "pull_count": 0,
1154 "comment_count": 0,
1155 "assignees": [],
1156 "blocked_by": [],
1157 "queued": false,
1158 "agent": null,
1159 "milestone": null
1160 }
1161 },
1162 "reopen_issue": {
1163 "response": {
1164 "id": "iss_01m43shrzpfe49x74ga7sj1c6v",
1165 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
1166 "number": 12,
1167 "title": "Greeting should name the caller",
1168 "body": "Take a name from the first argument; fall back to world.",
1169 "labels": [
1170 "feature"
1171 ],
1172 "state": "open",
1173 "reason": null,
1174 "resolved_by": null,
1175 "author": {
1176 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
1177 "username": "syntaqx",
1178 "kind": "user",
1179 "verified": false,
1180 "workspaces": []
1181 },
1182 "requested_by": null,
1183 "created_at": "2026-10-01T18:04:11.482Z",
1184 "updated_at": "2026-10-01T19:41:52.830Z",
1185 "closed_at": null,
1186 "pull_count": 0,
1187 "comment_count": 0,
1188 "assignees": [],
1189 "blocked_by": [],
1190 "queued": false,
1191 "agent": null,
1192 "milestone": null
1193 }
1194 },
1195 "assign_issue": {
1196 "request": {
1197 "instructions": "Keep the change to src/main.rs."
1198 },
1199 "response": {
1200 "id": "pr_01m43smh3vexsr5pmp60qwv0vs",
1201 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
1202 "number": 14,
1203 "issue": 12,
1204 "title": "Greeting should name the caller",
1205 "body": null,
1206 "agent": "g1t",
1207 "runtime": "hosted",
1208 "status": "draft",
1209 "fork": {
1210 "namespace": "pulls",
1211 "name": "pr_01m43smh3vexsr5pmp60qwv0vs"
1212 },
1213 "fork_repo_id": "rep_01m43smh5xd7aw2kq9tv0b4c8e",
1214 "branch": null,
1215 "head_commit": null,
1216 "merge_base": null,
1217 "merged_by": null,
1218 "merged_at": null,
1219 "superseded_by": null,
1220 "check_status": null,
1221 "files": [],
1222 "assignees": [],
1223 "reviewers": [],
1224 "labels": [],
1225 "milestone": null,
1226 "base": "main",
1227 "author": {
1228 "id": "usr_g1t_agent",
1229 "username": "g1t",
1230 "kind": "agent",
1231 "verified": false,
1232 "workspaces": []
1233 },
1234 "requested_by": {
1235 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
1236 "username": "syntaqx",
1237 "kind": "user",
1238 "verified": false,
1239 "workspaces": []
1240 },
1241 "created_at": "2026-10-01T18:20:02.117Z",
1242 "updated_at": "2026-10-01T18:20:02.117Z",
1243 "confidence": null
1244 },
1245 "notes": "The response is the pull request g1t opened, still a draft. g1t is its `author` and you are its `requested_by`: you may manage it as if you had opened it, and cannot approve it yourself. Follow it with [get a pull request](/reference/api/pull-requests/get-pull-request/): `lifecycle` says what the agent is doing."
1246 },
1247 "delegate": {
1248 "request": {
1249 "title": "Retry webhooks with exponential backoff",
1250 "body": "Deliveries that fail are dropped today. Retry them with exponential backoff, up to six times, then mark the delivery failed.\n\n## Definition of done\n\n- A delivery that fails is retried after 1, 2, 4, 8, 16 and 32 seconds.\n- After the sixth failure it is marked failed and shows on the webhook's page."
1251 },
1252 "response": {
1253 "issue": {
1254 "id": "iss_01m4a2c8v1t7k3q9x5n0r2w6yd",
1255 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
1256 "number": 41,
1257 "title": "Retry webhooks with exponential backoff",
1258 "body": "Deliveries that fail are dropped today. Retry them with exponential backoff, up to six times, then mark the delivery failed.",
1259 "labels": [],
1260 "state": "open",
1261 "reason": null,
1262 "resolved_by": null,
1263 "author": {
1264 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
1265 "username": "syntaqx",
1266 "kind": "user",
1267 "verified": false,
1268 "workspaces": []
1269 },
1270 "requested_by": null,
1271 "created_at": "2026-10-05T14:02:11.204Z",
1272 "updated_at": "2026-10-05T14:02:11.204Z",
1273 "closed_at": null,
1274 "pull_count": 1,
1275 "comment_count": 0,
1276 "assignees": [],
1277 "blocked_by": [],
1278 "queued": false,
1279 "agent": "g1t",
1280 "milestone": null
1281 },
1282 "pull": {
1283 "id": "pr_01m4a2c9b6e0h4m8q2t6x0a4d8",
1284 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
1285 "number": 42,
1286 "issue": 41,
1287 "title": "Retry webhooks with exponential backoff",
1288 "body": null,
1289 "agent": "g1t",
1290 "runtime": "hosted",
1291 "status": "draft",
1292 "fork": {
1293 "namespace": "pulls",
1294 "name": "pr_01m4a2c9b6e0h4m8q2t6x0a4d8"
1295 },
1296 "fork_repo_id": "rep_01m4a2c9d2g6k0n4r8v2z6c0f4",
1297 "branch": null,
1298 "head_commit": null,
1299 "merge_base": null,
1300 "merged_by": null,
1301 "merged_at": null,
1302 "superseded_by": null,
1303 "check_status": null,
1304 "files": [],
1305 "assignees": [],
1306 "reviewers": [],
1307 "labels": [],
1308 "milestone": null,
1309 "base": "main",
1310 "author": {
1311 "id": "usr_g1t_agent",
1312 "username": "g1t",
1313 "kind": "agent",
1314 "verified": false,
1315 "workspaces": []
1316 },
1317 "requested_by": {
1318 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
1319 "username": "syntaqx",
1320 "kind": "user",
1321 "verified": false,
1322 "workspaces": []
1323 },
1324 "created_at": "2026-10-05T14:02:12.880Z",
1325 "updated_at": "2026-10-05T14:02:12.880Z",
1326 "confidence": null
1327 },
1328 "agent": {
1329 "status": "started",
1330 "code": null,
1331 "message": null,
1332 "fix_url": null
1333 }
1334 },
1335 "notes": "The issue is opened whatever becomes of the agent. When the workspace's plan does not let it start, `pull` is null and `agent` says why and where to fix it, for example `{ \"status\": \"not_started\", \"code\": \"not_paid\", \"message\": \"Agents need a paid workspace. Start the $20 plan or try it with $5 of free usage after a card check: /acme/-/billing\", \"fix_url\": \"https://g1t.sh/acme/-/billing\" }`. With every agent slot busy, `status` is `queued` and it starts by itself when one frees up. See [putting an agent on something](/guides/working-with-g1t/#put-an-agent-on-it-in-one-step)."
1336 },
1337 "add_comment": {
1338 "request": {
1339 "body": "Should an empty name fall back to \"world\"?"
1340 },
1341 "response": {
1342 "id": "cmt_01m43sv4c8e2g6j0m4q8t2x6a1",
1343 "kind": "comment",
1344 "author": {
1345 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
1346 "username": "syntaqx",
1347 "kind": "user",
1348 "verified": true,
1349 "workspaces": [
1350 {
1351 "slug": "flagon-io",
1352 "role": "owner"
1353 }
1354 ]
1355 },
1356 "body": "Should an empty name fall back to \"world\"?",
1357 "path": null,
1358 "line": null,
1359 "verdict": null,
1360 "created_at": "2026-10-01T18:12:30.551Z"
1361 }
1362 },
1363 "list_labels": {
1364 "response": [
1365 {
1366 "name": "bug",
1367 "color": "d73a4a",
1368 "description": "Something isn't working",
1369 "issues": 4,
1370 "pulls": 1
1371 },
1372 {
1373 "name": "dependencies",
1374 "color": "0366d6",
1375 "description": "Updates a dependency",
1376 "issues": 0,
1377 "pulls": 6
1378 },
1379 {
1380 "name": "good first issue",
1381 "color": "7057ff",
1382 "description": "Good for newcomers",
1383 "issues": 2,
1384 "pulls": 0
1385 }
1386 ],
1387 "notes": "By name. A new repository starts with the default labels; add_default_labels adds those an older one is missing."
1388 },
1389 "plan_work": {
1390 "request": {
1391 "brief": "Greet people by name, from the command line and the web page."
1392 },
1393 "response": {
1394 "plan_id": "pln_01m43s9c4e8g2j6m0q4t8x2b6d"
1395 }
1396 },
1397 "get_plan": {
1398 "params": {
1399 "plan": "pln_01m43s9c4e8g2j6m0q4t8x2b6d"
1400 },
1401 "response": {
1402 "id": "pln_01m43s9c4e8g2j6m0q4t8x2b6d",
1403 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
1404 "brief": "Greet people by name, from the command line and the web page.",
1405 "status": "ready",
1406 "summary": "Name parsing first, then the two places that print the greeting.",
1407 "issues": [
1408 {
1409 "title": "Greeting should name the caller",
1410 "body": "Accept an optional name in `greet()` and use it.",
1411 "labels": [
1412 "feature"
1413 ],
1414 "done": [
1415 "`greet` prints \"Hello, ana!\" when given \"ana\", and \"Hello, world!\" with no argument."
1416 ],
1417 "files": [
1418 "src/greet.rs"
1419 ],
1420 "depends_on": [],
1421 "number": null
1422 },
1423 {
1424 "title": "Show the caller's name on the web page",
1425 "body": "Read `?name=` and pass it to `greet()`.",
1426 "labels": [
1427 "feature"
1428 ],
1429 "done": [
1430 "The page at / shows the name given in ?name=, escaped."
1431 ],
1432 "files": [
1433 "src/web.rs"
1434 ],
1435 "depends_on": [
1436 1
1437 ],
1438 "number": null
1439 }
1440 ],
1441 "error": null,
1442 "author": {
1443 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
1444 "username": "syntaqx",
1445 "kind": "user",
1446 "verified": false,
1447 "workspaces": []
1448 },
1449 "created_at": "2026-10-01T17:58:40.006Z",
1450 "finished_at": "2026-10-01T18:01:12.774Z",
1451 "progress": [],
1452 "exchanges": []
1453 },
1454 "notes": "A plan still `planning` after 20 minutes is reported as `failed`. `progress` follows each issue once the plan is applied."
1455 },
1456 "apply_plan": {
1457 "params": {
1458 "plan": "pln_01m43s9c4e8g2j6m0q4t8x2b6d"
1459 },
1460 "request": {
1461 "assign": true
1462 },
1463 "response": {
1464 "id": "pln_01m43s9c4e8g2j6m0q4t8x2b6d",
1465 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
1466 "brief": "Greet people by name, from the command line and the web page.",
1467 "status": "applied",
1468 "summary": "Name parsing first, then the two places that print the greeting.",
1469 "issues": [
1470 {
1471 "title": "Greeting should name the caller",
1472 "body": "Accept an optional name in `greet()` and use it.",
1473 "labels": [
1474 "feature"
1475 ],
1476 "done": [
1477 "`greet` prints \"Hello, ana!\" when given \"ana\", and \"Hello, world!\" with no argument."
1478 ],
1479 "files": [
1480 "src/greet.rs"
1481 ],
1482 "depends_on": [],
1483 "number": 12
1484 },
1485 {
1486 "title": "Show the caller's name on the web page",
1487 "body": "Read `?name=` and pass it to `greet()`.",
1488 "labels": [
1489 "feature"
1490 ],
1491 "done": [
1492 "The page at / shows the name given in ?name=, escaped."
1493 ],
1494 "files": [
1495 "src/web.rs"
1496 ],
1497 "depends_on": [
1498 1
1499 ],
1500 "number": 13
1501 }
1502 ],
1503 "error": null,
1504 "author": {
1505 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
1506 "username": "syntaqx",
1507 "kind": "user",
1508 "verified": false,
1509 "workspaces": []
1510 },
1511 "created_at": "2026-10-01T17:58:40.006Z",
1512 "finished_at": "2026-10-01T18:01:12.774Z",
1513 "progress": [],
1514 "exchanges": []
1515 },
1516 "notes": "Each opened issue's `number` is filled in. Issues left out with `keep` stay `null`."
1517 },
1518 "list_pull_requests": {
1519 "query": {
1520 "state": "open"
1521 },
1522 "response": [
1523 {
1524 "id": "pr_01m43smh3vexsr5pmp60qwv0vs",
1525 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
1526 "number": 14,
1527 "issue": 12,
1528 "title": "Greeting should name the caller",
1529 "body": "Reads a name from the first argument. `hello ana` prints \"Hello, ana!\".",
1530 "agent": "claude-code",
1531 "runtime": "external",
1532 "status": "open",
1533 "fork": {
1534 "namespace": "pulls",
1535 "name": "pr_01m43smh3vexsr5pmp60qwv0vs"
1536 },
1537 "fork_repo_id": "rep_01m43smh5xd7aw2kq9tv0b4c8e",
1538 "branch": null,
1539 "head_commit": "9f2c4e1a7b3d5f60812a4c6e8b0d2f4a6c8e0b13",
1540 "merge_base": null,
1541 "merged_by": null,
1542 "merged_at": null,
1543 "superseded_by": null,
1544 "check_status": "passed",
1545 "files": [
1546 {
1547 "path": "src/main.rs",
1548 "additions": 6,
1549 "deletions": 2
1550 }
1551 ],
1552 "assignees": [],
1553 "reviewers": [
1554 "ana"
1555 ],
1556 "team_reviewers": [],
1557 "author": {
1558 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
1559 "username": "syntaqx",
1560 "kind": "user",
1561 "verified": false,
1562 "workspaces": []
1563 },
1564 "requested_by": null,
1565 "created_at": "2026-10-01T18:20:02.117Z",
1566 "updated_at": "2026-10-01T18:35:44.902Z",
1567 "labels": [],
1568 "milestone": null,
1569 "base": "main"
1570 }
1571 ],
1572 "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."
1573 },
1574 "create_pull_request": {
1575 "request": {
1576 "issue": 12,
1577 "agent": "claude-code"
1578 },
1579 "response": {
1580 "pull": {
1581 "id": "pr_01m43smh3vexsr5pmp60qwv0vs",
1582 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
1583 "number": 14,
1584 "issue": 12,
1585 "title": "Greeting should name the caller",
1586 "body": null,
1587 "agent": "claude-code",
1588 "runtime": "external",
1589 "status": "draft",
1590 "fork": {
1591 "namespace": "pulls",
1592 "name": "pr_01m43smh3vexsr5pmp60qwv0vs"
1593 },
1594 "fork_repo_id": "rep_01m43smh5xd7aw2kq9tv0b4c8e",
1595 "branch": null,
1596 "head_commit": null,
1597 "merge_base": null,
1598 "merged_by": null,
1599 "merged_at": null,
1600 "superseded_by": null,
1601 "check_status": null,
1602 "files": [],
1603 "assignees": [],
1604 "reviewers": [],
1605 "labels": [],
1606 "milestone": null,
1607 "base": "main",
1608 "author": {
1609 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
1610 "username": "syntaqx",
1611 "kind": "user",
1612 "verified": false,
1613 "workspaces": []
1614 },
1615 "requested_by": null,
1616 "created_at": "2026-10-01T18:20:02.117Z",
1617 "updated_at": "2026-10-01T18:20:02.117Z"
1618 },
1619 "git": {
1620 "remote": "https://g1t.sh/pulls/pr_01m43smh3vexsr5pmp60qwv0vs.git",
1621 "username": "syntaqx",
1622 "password": "your g1t access token"
1623 }
1624 },
1625 "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."
1626 },
1627 "get_pull_request": {
1628 "response": {
1629 "pull": {
1630 "id": "pr_01m43smh3vexsr5pmp60qwv0vs",
1631 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
1632 "number": 14,
1633 "issue": 12,
1634 "title": "Greeting should name the caller",
1635 "body": "Reads a name from the first argument. `hello ana` prints \"Hello, ana!\".",
1636 "agent": "claude-code",
1637 "runtime": "external",
1638 "status": "open",
1639 "fork": {
1640 "namespace": "pulls",
1641 "name": "pr_01m43smh3vexsr5pmp60qwv0vs"
1642 },
1643 "fork_repo_id": "rep_01m43smh5xd7aw2kq9tv0b4c8e",
1644 "branch": null,
1645 "head_commit": "9f2c4e1a7b3d5f60812a4c6e8b0d2f4a6c8e0b13",
1646 "merge_base": null,
1647 "merged_by": null,
1648 "merged_at": null,
1649 "superseded_by": null,
1650 "check_status": "passed",
1651 "files": [
1652 {
1653 "path": "src/main.rs",
1654 "additions": 6,
1655 "deletions": 2
1656 }
1657 ],
1658 "assignees": [],
1659 "reviewers": [
1660 "ana"
1661 ],
1662 "team_reviewers": [
1663 "flagon-io/backend"
1664 ],
1665 "author": {
1666 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
1667 "username": "syntaqx",
1668 "kind": "user",
1669 "verified": false,
1670 "workspaces": []
1671 },
1672 "requested_by": null,
1673 "created_at": "2026-10-01T18:20:02.117Z",
1674 "updated_at": "2026-10-01T18:35:44.902Z",
1675 "confidence": null,
1676 "labels": [],
1677 "milestone": null,
1678 "base": "main"
1679 },
1680 "issue": {
1681 "id": "iss_01m43shrzpfe49x74ga7sj1c6v",
1682 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
1683 "number": 12,
1684 "title": "Greeting should name the caller",
1685 "body": "Take a name from the first argument; fall back to world.",
1686 "labels": [
1687 "feature"
1688 ],
1689 "state": "open",
1690 "reason": null,
1691 "resolved_by": null,
1692 "author": {
1693 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
1694 "username": "syntaqx",
1695 "kind": "user",
1696 "verified": false,
1697 "workspaces": []
1698 },
1699 "requested_by": null,
1700 "created_at": "2026-10-01T18:04:11.482Z",
1701 "updated_at": "2026-10-01T18:20:02.117Z",
1702 "closed_at": null,
1703 "pull_count": 1,
1704 "comment_count": 0,
1705 "assignees": [],
1706 "blocked_by": [],
1707 "queued": false,
1708 "agent": "claude-code",
1709 "milestone": null
1710 },
1711 "comments": [
1712 {
1713 "id": "cmt_01m43st6d0f4h8k2n6r0v4z8c2",
1714 "kind": "event",
1715 "author": {
1716 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
1717 "username": "syntaqx",
1718 "kind": "user",
1719 "verified": false,
1720 "workspaces": []
1721 },
1722 "body": "marked this ready for review",
1723 "path": null,
1724 "line": null,
1725 "verdict": null,
1726 "created_at": "2026-10-01T18:33:10.420Z"
1727 }
1728 ],
1729 "checks": null,
1730 "overlaps": [],
1731 "behind": false,
1732 "review_pending": false,
1733 "lifecycle": null,
1734 "landing": false,
1735 "stalled": null,
1736 "messages": [
1737 {
1738 "id": "msg_01m43tx5egeh4t3f9zcnjenqvz",
1739 "author": "syntaqx",
1740 "body": "Keep \"world\" as the default when no name is given.",
1741 "created_at": "2026-10-01T18:25:00.310Z",
1742 "delivered_at": "2026-10-01T18:25:31.007Z",
1743 "kind": "message",
1744 "from_number": null,
1745 "to_number": 14,
1746 "answer": null,
1747 "declined": false
1748 }
1749 ],
1750 "statuses": [
1751 {
1752 "context": "CI / pull_request",
1753 "state": "success",
1754 "description": "CI passed",
1755 "target_url": "https://g1t.sh/syntaqx/hello/actions/runs/run_01m43sw8e2g6j0m4q8t2x6a0c4",
1756 "updated_at": "2026-10-01T18:35:44.902Z"
1757 }
1758 ],
1759 "required_checks": [
1760 {
1761 "name": "CI",
1762 "state": "success",
1763 "description": "CI passed",
1764 "target_url": "https://g1t.sh/syntaqx/hello/actions/runs/run_01m43sw8e2g6j0m4q8t2x6a0c4"
1765 }
1766 ],
1767 "code_owners": {
1768 "path": ".github/CODEOWNERS",
1769 "required": true,
1770 "reviews": [
1771 {
1772 "section": null,
1773 "line": 3,
1774 "pattern": "/src/",
1775 "owners": [
1776 "@flagon-io/backend"
1777 ],
1778 "files": [
1779 "src/main.rs"
1780 ],
1781 "optional": false,
1782 "required": 1,
1783 "approved_by": [],
1784 "changes_requested_by": [],
1785 "satisfied": false
1786 }
1787 ],
1788 "missing": "Code owners have not approved: @flagon-io/backend for /src/.",
1789 "errors": 0
1790 }
1791 },
1792 "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/)."
1793 },
1794 "get_pull_request_changes": {
1795 "response": {
1796 "base": "3a7e9c1b5d2f4a6c8e0b2d4f6a8c0e2b4d6f8a1c",
1797 "head": "9f2c4e1a7b3d5f60812a4c6e8b0d2f4a6c8e0b13",
1798 "files": [
1799 {
1800 "path": "src/main.rs",
1801 "status": "modified",
1802 "additions": 1,
1803 "deletions": 1,
1804 "binary": false,
1805 "hunks": [
1806 {
1807 "lines": [
1808 {
1809 "kind": "context",
1810 "old": 3,
1811 "new": 3,
1812 "text": "fn main() {"
1813 },
1814 {
1815 "kind": "delete",
1816 "old": 4,
1817 "new": null,
1818 "text": " println!(\"Hello, world!\");"
1819 },
1820 {
1821 "kind": "add",
1822 "old": null,
1823 "new": 4,
1824 "text": " println!(\"Hello, {}!\", std::env::args().nth(1).unwrap_or(\"world\".into()));"
1825 },
1826 {
1827 "kind": "context",
1828 "old": 5,
1829 "new": 5,
1830 "text": "}"
1831 }
1832 ]
1833 }
1834 ]
1835 }
1836 ],
1837 "truncated": false
1838 },
1839 "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."
1840 },
1841 "mark_pull_request_ready": {
1842 "request": {
1843 "summary": "Reads a name from the first argument. `hello ana` prints \"Hello, ana!\"."
1844 },
1845 "response": {
1846 "id": "pr_01m43smh3vexsr5pmp60qwv0vs",
1847 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
1848 "number": 14,
1849 "issue": 12,
1850 "title": "Greeting should name the caller",
1851 "body": "Reads a name from the first argument. `hello ana` prints \"Hello, ana!\".",
1852 "agent": "claude-code",
1853 "runtime": "external",
1854 "status": "open",
1855 "fork": {
1856 "namespace": "pulls",
1857 "name": "pr_01m43smh3vexsr5pmp60qwv0vs"
1858 },
1859 "fork_repo_id": "rep_01m43smh5xd7aw2kq9tv0b4c8e",
1860 "branch": null,
1861 "head_commit": "9f2c4e1a7b3d5f60812a4c6e8b0d2f4a6c8e0b13",
1862 "merge_base": null,
1863 "merged_by": null,
1864 "merged_at": null,
1865 "superseded_by": null,
1866 "check_status": null,
1867 "files": [
1868 {
1869 "path": "src/main.rs",
1870 "additions": 6,
1871 "deletions": 2
1872 }
1873 ],
1874 "assignees": [],
1875 "reviewers": [],
1876 "labels": [],
1877 "milestone": null,
1878 "base": "main",
1879 "author": {
1880 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
1881 "username": "syntaqx",
1882 "kind": "user",
1883 "verified": false,
1884 "workspaces": []
1885 },
1886 "requested_by": null,
1887 "created_at": "2026-10-01T18:20:02.117Z",
1888 "updated_at": "2026-10-01T18:33:10.398Z"
1889 }
1890 },
1891 "review_pull_request": {
1892 "request": {
1893 "verdict": "request_changes",
1894 "body": "Trim the name before using it."
1895 },
1896 "response": {
1897 "id": "cmt_01m43sx9f3h7k1n5r9v3z7d1g5",
1898 "kind": "comment",
1899 "author": {
1900 "id": "usr_01kz9d3f7h1k5n9r3v7z1c5g9b",
1901 "username": "ana",
1902 "kind": "user",
1903 "verified": true,
1904 "workspaces": [
1905 {
1906 "slug": "flagon-io",
1907 "role": "member"
1908 }
1909 ]
1910 },
1911 "body": "Trim the name before using it.",
1912 "path": null,
1913 "line": null,
1914 "verdict": "request_changes",
1915 "created_at": "2026-10-01T18:40:05.019Z"
1916 }
1917 },
1918 "request_reviewers": {
1919 "params": {
1920 "owner": "flagon-io",
1921 "name": "hello",
1922 "number": 14
1923 },
1924 "request": {
1925 "reviewers": [
1926 "bo"
1927 ],
1928 "team_reviewers": [
1929 "backend"
1930 ]
1931 },
1932 "response": {
1933 "id": "pr_01m43smh3vexsr5pmp60qwv0vs",
1934 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
1935 "number": 14,
1936 "issue": 12,
1937 "title": "Greeting should name the caller",
1938 "body": "Reads a name from the first argument. `hello ana` prints \"Hello, ana!\".",
1939 "agent": "claude-code",
1940 "runtime": "external",
1941 "status": "open",
1942 "fork": {
1943 "namespace": "pulls",
1944 "name": "pr_01m43smh3vexsr5pmp60qwv0vs"
1945 },
1946 "fork_repo_id": "rep_01m43smh5xd7aw2kq9tv0b4c8e",
1947 "branch": null,
1948 "head_commit": "9f2c4e1a7b3d5f60812a4c6e8b0d2f4a6c8e0b13",
1949 "merge_base": null,
1950 "merged_by": null,
1951 "merged_at": null,
1952 "superseded_by": null,
1953 "check_status": "passed",
1954 "files": [
1955 {
1956 "path": "src/main.rs",
1957 "additions": 6,
1958 "deletions": 2
1959 }
1960 ],
1961 "assignees": [],
1962 "reviewers": [
1963 "ana",
1964 "bo"
1965 ],
1966 "team_reviewers": [
1967 "flagon-io/backend"
1968 ],
1969 "author": {
1970 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
1971 "username": "syntaqx",
1972 "kind": "user",
1973 "verified": false,
1974 "workspaces": []
1975 },
1976 "requested_by": null,
1977 "created_at": "2026-10-01T18:20:02.117Z",
1978 "updated_at": "2026-10-01T18:40:12.331Z"
1979 },
1980 "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/)."
1981 },
1982 "remove_requested_reviewers": {
1983 "params": {
1984 "owner": "flagon-io",
1985 "name": "hello",
1986 "number": 14
1987 },
1988 "request": {
1989 "reviewers": [
1990 "bo"
1991 ],
1992 "team_reviewers": [
1993 "flagon-io/backend"
1994 ]
1995 },
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": "open",
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": "passed",
2018 "files": [
2019 {
2020 "path": "src/main.rs",
2021 "additions": 6,
2022 "deletions": 2
2023 }
2024 ],
2025 "assignees": [],
2026 "reviewers": [
2027 "ana"
2028 ],
2029 "team_reviewers": [],
2030 "author": {
2031 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
2032 "username": "syntaqx",
2033 "kind": "user",
2034 "verified": false,
2035 "workspaces": []
2036 },
2037 "requested_by": null,
2038 "created_at": "2026-10-01T18:20:02.117Z",
2039 "updated_at": "2026-10-01T18:41:30.904Z"
2040 },
2041 "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."
2042 },
2043 "merge_pull_request": {
2044 "request": {
2045 "keep_issue_open": false
2046 },
2047 "response": {
2048 "id": "pr_01m43smh3vexsr5pmp60qwv0vs",
2049 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
2050 "number": 14,
2051 "issue": 12,
2052 "title": "Greeting should name the caller",
2053 "body": "Reads a name from the first argument. `hello ana` prints \"Hello, ana!\".",
2054 "agent": "claude-code",
2055 "runtime": "external",
2056 "status": "merged",
2057 "fork": {
2058 "namespace": "pulls",
2059 "name": "pr_01m43smh3vexsr5pmp60qwv0vs"
2060 },
2061 "fork_repo_id": "rep_01m43smh5xd7aw2kq9tv0b4c8e",
2062 "branch": null,
2063 "head_commit": "9f2c4e1a7b3d5f60812a4c6e8b0d2f4a6c8e0b13",
2064 "merge_base": "3a7e9c1b5d2f4a6c8e0b2d4f6a8c0e2b4d6f8a1c",
2065 "merged_by": "syntaqx",
2066 "merged_at": "2026-10-01T18:52:17.093Z",
2067 "superseded_by": null,
2068 "check_status": "passed",
2069 "files": [
2070 {
2071 "path": "src/main.rs",
2072 "additions": 6,
2073 "deletions": 2
2074 }
2075 ],
2076 "assignees": [],
2077 "reviewers": [
2078 "ana"
2079 ],
2080 "labels": [],
2081 "milestone": null,
2082 "base": "main",
2083 "author": {
2084 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
2085 "username": "syntaqx",
2086 "kind": "user",
2087 "verified": false,
2088 "workspaces": []
2089 },
2090 "requested_by": null,
2091 "created_at": "2026-10-01T18:20:02.117Z",
2092 "updated_at": "2026-10-01T18:52:17.093Z"
2093 },
2094 "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."
2095 },
2096 "close_pull_request": {
2097 "response": {
2098 "id": "pr_01m43smh3vexsr5pmp60qwv0vs",
2099 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
2100 "number": 14,
2101 "issue": 12,
2102 "title": "Greeting should name the caller",
2103 "body": "Reads a name from the first argument. `hello ana` prints \"Hello, ana!\".",
2104 "agent": "claude-code",
2105 "runtime": "external",
2106 "status": "closed",
2107 "fork": {
2108 "namespace": "pulls",
2109 "name": "pr_01m43smh3vexsr5pmp60qwv0vs"
2110 },
2111 "fork_repo_id": "rep_01m43smh5xd7aw2kq9tv0b4c8e",
2112 "branch": null,
2113 "head_commit": "9f2c4e1a7b3d5f60812a4c6e8b0d2f4a6c8e0b13",
2114 "merge_base": null,
2115 "merged_by": null,
2116 "merged_at": null,
2117 "superseded_by": null,
2118 "check_status": null,
2119 "files": [
2120 {
2121 "path": "src/main.rs",
2122 "additions": 6,
2123 "deletions": 2
2124 }
2125 ],
2126 "assignees": [],
2127 "reviewers": [],
2128 "labels": [],
2129 "milestone": null,
2130 "base": "main",
2131 "author": {
2132 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
2133 "username": "syntaqx",
2134 "kind": "user",
2135 "verified": false,
2136 "workspaces": []
2137 },
2138 "requested_by": null,
2139 "created_at": "2026-10-01T18:20:02.117Z",
2140 "updated_at": "2026-10-01T19:02:48.760Z"
2141 }
2142 },
2143 "get_merge_queue": {
2144 "response": {
2145 "enabled": true,
2146 "active": [
2147 {
2148 "id": "qen_01m43rn0qsft1tpap1awkewzbb",
2149 "number": 14,
2150 "title": "Greeting should name the caller",
2151 "agent": "claude-code",
2152 "state": "testing",
2153 "ahead": [],
2154 "base_commit": "3a7e9c1b5d2f4a6c8e0b2d4f6a8c0e2b4d6f8a1c",
2155 "combined_commit": null,
2156 "error": null,
2157 "results": [],
2158 "enqueued_by": "syntaqx",
2159 "created_at": "2026-10-04T15:31:20.441Z",
2160 "finished_at": null
2161 }
2162 ],
2163 "recent": [
2164 {
2165 "id": "qen_01m43khqjmeb5a1magayrnk63z",
2166 "number": 11,
2167 "title": "Fix trailing newline in greeting",
2168 "agent": "g1t",
2169 "state": "landed",
2170 "ahead": [],
2171 "base_commit": "4b1d7e9c2a5f8e3d6c0b9a7e5d3c1b8a6f4e2d0c",
2172 "combined_commit": "c3e8a1f6d4b2097e5c3a1f8d6b4e2c0a9f7d5b3e",
2173 "error": null,
2174 "results": [
2175 {
2176 "command": "cargo test",
2177 "passed": true,
2178 "exit_code": 0,
2179 "output": "test result: ok. 12 passed; 0 failed\n",
2180 "duration_ms": 48211
2181 }
2182 ],
2183 "enqueued_by": "g1t",
2184 "created_at": "2026-10-04T14:02:09.876Z",
2185 "finished_at": "2026-10-04T14:09:55.102Z"
2186 }
2187 ]
2188 },
2189 "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."
2190 },
2191 "message_agent": {
2192 "request": {
2193 "body": "Keep \"world\" as the default when no name is given."
2194 },
2195 "response": {
2196 "id": "msg_01m43tx5egeh4t3f9zcnjenqvz",
2197 "author": "syntaqx",
2198 "body": "Keep \"world\" as the default when no name is given.",
2199 "created_at": "2026-10-01T18:25:00.310Z",
2200 "delivered_at": null,
2201 "kind": "message",
2202 "from_number": null,
2203 "to_number": 14,
2204 "answer": null,
2205 "declined": false
2206 },
2207 "notes": "The response is the message. `delivered_at` is set once the agent has read it."
2208 },
2209 "answer_message": {
2210 "params": {
2211 "id": "msg_01m43t66tde8hs2vpxhh3v8tqw"
2212 },
2213 "request": {
2214 "body": "No. greet() keeps its name; only greet_named() is added."
2215 },
2216 "response": {
2217 "id": "msg_01m43t66tde8hs2vpxhh3v8tqw",
2218 "author": "g1t",
2219 "body": "Are you renaming greet() in src/lib.rs? I need to call it from #16.",
2220 "created_at": "2026-10-01T18:58:12.301Z",
2221 "delivered_at": "2026-10-01T18:58:40.117Z",
2222 "kind": "question",
2223 "from_number": 16,
2224 "to_number": 14,
2225 "answer": "No. greet() keeps its name; only greet_named() is added.",
2226 "declined": false
2227 },
2228 "notes": "The response is the question or handoff that was answered, with `answer` and `declined` filled in."
2229 },
2230 "take_messages": {
2231 "response": [
2232 {
2233 "id": "msg_01m43tx5egeh4t3f9zcnjenqvz",
2234 "author": "syntaqx",
2235 "body": "Keep \"world\" as the default when no name is given.",
2236 "created_at": "2026-10-01T18:25:00.310Z",
2237 "delivered_at": "2026-10-01T18:25:31.007Z",
2238 "kind": "message",
2239 "from_number": null,
2240 "to_number": 14,
2241 "answer": null,
2242 "declined": false
2243 }
2244 ],
2245 "notes": "Only a g1t agent's token can take messages. They come oldest first, and each is marked delivered."
2246 },
2247 "read_session": {
2248 "query": {
2249 "after": 0
2250 },
2251 "response": [
2252 {
2253 "seq": 1,
2254 "kind": "prompt",
2255 "text": "Make the greeting name the caller (issue #12).",
2256 "tool": null,
2257 "commit": null,
2258 "at": "2026-10-01T18:21:00.004Z"
2259 },
2260 {
2261 "seq": 2,
2262 "kind": "tool_call",
2263 "text": "cargo test",
2264 "tool": "bash",
2265 "commit": "9f2c4e1a7b3d5f60812a4c6e8b0d2f4a6c8e0b13",
2266 "at": "2026-10-01T18:30:12.660Z"
2267 }
2268 ]
2269 },
2270 "record_session": {
2271 "request": {
2272 "entries": [
2273 {
2274 "kind": "message",
2275 "text": "Reading src/main.rs."
2276 },
2277 {
2278 "kind": "tool_call",
2279 "text": "cargo test",
2280 "tool": "bash"
2281 }
2282 ]
2283 },
2284 "response": {
2285 "count": 2
2286 },
2287 "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/)."
2288 },
2289 "list_workflows": {
2290 "response": [
2291 {
2292 "id": "wfl_01kpw2c5d8e1f4g7h0j3k6m9np",
2293 "path": ".g1t/workflows/ci.yml",
2294 "name": "CI",
2295 "events": [
2296 "push",
2297 "pull_request",
2298 "workflow_dispatch"
2299 ],
2300 "state": "active",
2301 "error": null,
2302 "notes": [
2303 {
2304 "severity": "unsupported",
2305 "job": "test",
2306 "message": "`services` containers (such as a database) are not started on g1t yet."
2307 }
2308 ],
2309 "dispatch": {
2310 "debug": {
2311 "description": "Verbose logs",
2312 "type": "boolean",
2313 "default": false
2314 }
2315 },
2316 "last_run": {
2317 "id": "run_01kpx7b3c6d9e2f5g8h1j4k7mr",
2318 "workflow_id": "wfl_01kpw2c5d8e1f4g7h0j3k6m9np",
2319 "path": ".g1t/workflows/ci.yml",
2320 "name": "CI",
2321 "title": "Greeting should name the caller",
2322 "number": 12,
2323 "attempt": 1,
2324 "event": "push",
2325 "ref": "refs/heads/main",
2326 "sha": "9f2c4e1a7b3d5f60812a4c6e8b0d2f4a6c8e0b13",
2327 "pull": null,
2328 "status": "completed",
2329 "conclusion": "success",
2330 "error": null,
2331 "actor": "syntaqx",
2332 "created_at": "2026-10-04T15:42:07.318Z",
2333 "started_at": "2026-10-04T15:42:09.020Z",
2334 "finished_at": "2026-10-04T15:44:31.877Z"
2335 }
2336 },
2337 {
2338 "id": "wfl_01kpw2c5d8e1f4g7h0j3k6m9nq",
2339 "path": ".g1t/workflows/nightly.yml",
2340 "name": "Nightly",
2341 "events": [
2342 "schedule"
2343 ],
2344 "state": "disabled",
2345 "error": null,
2346 "notes": [],
2347 "dispatch": null,
2348 "last_run": null
2349 }
2350 ],
2351 "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/)."
2352 },
2353 "list_workflow_runs": {
2354 "query": {
2355 "workflow": "ci.yml",
2356 "branch": "main",
2357 "per_page": 20
2358 },
2359 "response": [
2360 {
2361 "id": "run_01kpx7b3c6d9e2f5g8h1j4k7mr",
2362 "workflow_id": "wfl_01kpw2c5d8e1f4g7h0j3k6m9np",
2363 "path": ".g1t/workflows/ci.yml",
2364 "name": "CI",
2365 "title": "Greeting should name the caller",
2366 "number": 12,
2367 "attempt": 1,
2368 "event": "push",
2369 "ref": "refs/heads/main",
2370 "sha": "9f2c4e1a7b3d5f60812a4c6e8b0d2f4a6c8e0b13",
2371 "pull": null,
2372 "status": "completed",
2373 "conclusion": "success",
2374 "error": null,
2375 "actor": "syntaqx",
2376 "created_at": "2026-10-04T15:42:07.318Z",
2377 "started_at": "2026-10-04T15:42:09.020Z",
2378 "finished_at": "2026-10-04T15:44:31.877Z"
2379 }
2380 ],
2381 "notes": "A run's `status` is `queued`, `pending` (waiting for its concurrency group), `in_progress` or `completed`; `conclusion` is set once it completes."
2382 },
2383 "list_runs_of_workflow": {
2384 "params": {
2385 "workflow": "ci.yml"
2386 },
2387 "query": {
2388 "branch": "main",
2389 "per_page": 20
2390 },
2391 "response": [
2392 {
2393 "id": "run_01kpx7b3c6d9e2f5g8h1j4k7mr",
2394 "workflow_id": "wfl_01kpw2c5d8e1f4g7h0j3k6m9np",
2395 "path": ".g1t/workflows/ci.yml",
2396 "name": "CI",
2397 "title": "Greeting should name the caller",
2398 "number": 12,
2399 "attempt": 1,
2400 "event": "push",
2401 "ref": "refs/heads/main",
2402 "sha": "9f2c4e1a7b3d5f60812a4c6e8b0d2f4a6c8e0b13",
2403 "pull": null,
2404 "status": "completed",
2405 "conclusion": "success",
2406 "error": null,
2407 "actor": "syntaqx",
2408 "created_at": "2026-10-04T15:42:07.318Z",
2409 "started_at": "2026-10-04T15:42:09.020Z",
2410 "finished_at": "2026-10-04T15:44:31.877Z"
2411 }
2412 ]
2413 },
2414 "get_workflow_run": {
2415 "params": {
2416 "id": "run_01kpx7b3c6d9e2f5g8h1j4k7mr"
2417 },
2418 "response": {
2419 "run": {
2420 "id": "run_01kpx7b3c6d9e2f5g8h1j4k7mr",
2421 "workflow_id": "wfl_01kpw2c5d8e1f4g7h0j3k6m9np",
2422 "path": ".g1t/workflows/ci.yml",
2423 "name": "CI",
2424 "title": "Greeting should name the caller",
2425 "number": 12,
2426 "attempt": 1,
2427 "event": "push",
2428 "ref": "refs/heads/main",
2429 "sha": "9f2c4e1a7b3d5f60812a4c6e8b0d2f4a6c8e0b13",
2430 "pull": null,
2431 "status": "completed",
2432 "conclusion": "failure",
2433 "error": null,
2434 "actor": "syntaqx",
2435 "created_at": "2026-10-04T15:42:07.318Z",
2436 "started_at": "2026-10-04T15:42:09.020Z",
2437 "finished_at": "2026-10-04T15:44:31.877Z"
2438 },
2439 "jobs": [
2440 {
2441 "id": "job_01kpx7b3d0e4f8g2h6j0k4m8ns",
2442 "run_id": "run_01kpx7b3c6d9e2f5g8h1j4k7mr",
2443 "key": "test",
2444 "name": "test",
2445 "needs": [],
2446 "status": "completed",
2447 "conclusion": "failure",
2448 "steps": [
2449 {
2450 "number": 1,
2451 "name": "Run actions/checkout@v4",
2452 "status": "completed",
2453 "conclusion": "success",
2454 "started_at": "2026-10-04T15:42:10.101Z",
2455 "finished_at": "2026-10-04T15:42:12.433Z"
2456 },
2457 {
2458 "number": 2,
2459 "name": "Run cargo test",
2460 "status": "completed",
2461 "conclusion": "failure",
2462 "started_at": "2026-10-04T15:42:12.440Z",
2463 "finished_at": "2026-10-04T15:44:30.902Z"
2464 }
2465 ],
2466 "annotations": [
2467 {
2468 "level": "error",
2469 "message": "assertion failed: greeting names the caller",
2470 "title": "greet",
2471 "file": "src/main.rs",
2472 "line": 41
2473 }
2474 ],
2475 "reason": null,
2476 "started_at": "2026-10-04T15:42:09.020Z",
2477 "finished_at": "2026-10-04T15:44:31.002Z"
2478 },
2479 {
2480 "id": "job_01kpx7b3d0e4f8g2h6j0k4m8nt",
2481 "run_id": "run_01kpx7b3c6d9e2f5g8h1j4k7mr",
2482 "key": "deploy",
2483 "name": "deploy",
2484 "needs": [
2485 "test"
2486 ],
2487 "status": "completed",
2488 "conclusion": "skipped",
2489 "steps": [],
2490 "annotations": [],
2491 "reason": "A job it needs did not succeed.",
2492 "started_at": null,
2493 "finished_at": "2026-10-04T15:44:31.877Z"
2494 }
2495 ],
2496 "notes": [
2497 {
2498 "severity": "unsupported",
2499 "job": "test",
2500 "message": "`services` containers (such as a database) are not started on g1t yet."
2501 }
2502 ]
2503 }
2504 },
2505 "get_job_logs": {
2506 "params": {
2507 "job": "job_01kpx7b3d0e4f8g2h6j0k4m8ns"
2508 },
2509 "query": {
2510 "after": 0
2511 },
2512 "response": {
2513 "chunks": [
2514 {
2515 "seq": 1,
2516 "step": 0,
2517 "text": "Preparing the sandbox\n"
2518 },
2519 {
2520 "seq": 2,
2521 "step": 2,
2522 "text": "> cargo test\ntest greet ... FAILED\n"
2523 }
2524 ],
2525 "done": true
2526 },
2527 "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`."
2528 },
2529 "dispatch_workflow": {
2530 "params": {
2531 "workflow": "ci.yml"
2532 },
2533 "request": {
2534 "ref": "main",
2535 "inputs": {
2536 "debug": true
2537 }
2538 },
2539 "response": {
2540 "id": "run_01kpx8d4e7f0g3h6j9k2m5n8pq",
2541 "workflow_id": "wfl_01kpw2c5d8e1f4g7h0j3k6m9np",
2542 "path": ".g1t/workflows/ci.yml",
2543 "name": "CI",
2544 "title": "CI run by syntaqx",
2545 "number": 13,
2546 "attempt": 1,
2547 "event": "workflow_dispatch",
2548 "ref": "refs/heads/main",
2549 "sha": "9f2c4e1a7b3d5f60812a4c6e8b0d2f4a6c8e0b13",
2550 "pull": null,
2551 "status": "queued",
2552 "conclusion": null,
2553 "error": null,
2554 "actor": "syntaqx",
2555 "created_at": "2026-10-04T16:30:00.512Z",
2556 "started_at": null,
2557 "finished_at": null
2558 }
2559 },
2560 "cancel_workflow_run": {
2561 "params": {
2562 "id": "run_01kpx7b3c6d9e2f5g8h1j4k7mr"
2563 },
2564 "response": {
2565 "id": "run_01kpx7b3c6d9e2f5g8h1j4k7mr",
2566 "workflow_id": "wfl_01kpw2c5d8e1f4g7h0j3k6m9np",
2567 "path": ".g1t/workflows/ci.yml",
2568 "name": "CI",
2569 "title": "Greeting should name the caller",
2570 "number": 12,
2571 "attempt": 1,
2572 "event": "push",
2573 "ref": "refs/heads/main",
2574 "sha": "9f2c4e1a7b3d5f60812a4c6e8b0d2f4a6c8e0b13",
2575 "pull": null,
2576 "status": "completed",
2577 "conclusion": "cancelled",
2578 "error": null,
2579 "actor": "syntaqx",
2580 "created_at": "2026-10-04T15:42:07.318Z",
2581 "started_at": "2026-10-04T15:42:09.020Z",
2582 "finished_at": "2026-10-04T15:44:31.877Z"
2583 }
2584 },
2585 "rerun_workflow_run": {
2586 "params": {
2587 "id": "run_01kpx7b3c6d9e2f5g8h1j4k7mr"
2588 },
2589 "request": {
2590 "failed_only": true
2591 },
2592 "response": {
2593 "id": "run_01kpx7b3c6d9e2f5g8h1j4k7mr",
2594 "workflow_id": "wfl_01kpw2c5d8e1f4g7h0j3k6m9np",
2595 "path": ".g1t/workflows/ci.yml",
2596 "name": "CI",
2597 "title": "Greeting should name the caller",
2598 "number": 12,
2599 "attempt": 2,
2600 "event": "push",
2601 "ref": "refs/heads/main",
2602 "sha": "9f2c4e1a7b3d5f60812a4c6e8b0d2f4a6c8e0b13",
2603 "pull": null,
2604 "status": "queued",
2605 "conclusion": null,
2606 "error": null,
2607 "actor": "syntaqx",
2608 "created_at": "2026-10-04T15:42:07.318Z",
2609 "started_at": null,
2610 "finished_at": null
2611 },
2612 "notes": "The run keeps its id; `attempt` goes up by one."
2613 },
2614 "rerun_failed_jobs": {
2615 "params": {
2616 "id": "run_01kpx7b3c6d9e2f5g8h1j4k7mr"
2617 },
2618 "response": {
2619 "id": "run_01kpx7b3c6d9e2f5g8h1j4k7mr",
2620 "workflow_id": "wfl_01kpw2c5d8e1f4g7h0j3k6m9np",
2621 "path": ".g1t/workflows/ci.yml",
2622 "name": "CI",
2623 "title": "Greeting should name the caller",
2624 "number": 12,
2625 "attempt": 2,
2626 "event": "push",
2627 "ref": "refs/heads/main",
2628 "sha": "9f2c4e1a7b3d5f60812a4c6e8b0d2f4a6c8e0b13",
2629 "pull": null,
2630 "status": "queued",
2631 "conclusion": null,
2632 "error": null,
2633 "actor": "syntaqx",
2634 "created_at": "2026-10-04T15:42:07.318Z",
2635 "started_at": null,
2636 "finished_at": null
2637 }
2638 },
2639 "update_workflow": {
2640 "params": {
2641 "workflow": "nightly.yml"
2642 },
2643 "request": {
2644 "enabled": false
2645 },
2646 "response": {
2647 "id": "wfl_01kpw2c5d8e1f4g7h0j3k6m9nq",
2648 "path": ".g1t/workflows/nightly.yml",
2649 "name": "Nightly",
2650 "events": [
2651 "schedule"
2652 ],
2653 "state": "disabled",
2654 "error": null,
2655 "notes": [],
2656 "dispatch": null,
2657 "last_run": null
2658 }
2659 },
2660 "enable_workflow": {
2661 "params": {
2662 "workflow": "nightly.yml"
2663 },
2664 "response": {
2665 "id": "wfl_01kpw2c5d8e1f4g7h0j3k6m9nq",
2666 "path": ".g1t/workflows/nightly.yml",
2667 "name": "Nightly",
2668 "events": [
2669 "schedule"
2670 ],
2671 "state": "active",
2672 "error": null,
2673 "notes": [],
2674 "dispatch": null,
2675 "last_run": null
2676 }
2677 },
2678 "disable_workflow": {
2679 "params": {
2680 "workflow": "nightly.yml"
2681 },
2682 "response": {
2683 "id": "wfl_01kpw2c5d8e1f4g7h0j3k6m9nq",
2684 "path": ".g1t/workflows/nightly.yml",
2685 "name": "Nightly",
2686 "events": [
2687 "schedule"
2688 ],
2689 "state": "disabled",
2690 "error": null,
2691 "notes": [],
2692 "dispatch": null,
2693 "last_run": null
2694 }
2695 },
2696 "list_actions_secrets": {
2697 "response": [
2698 {
2699 "id": "set_01kpv9q4r7s0t3v6w9x2y5z8ab",
2700 "name": "NPM_TOKEN",
2701 "kind": "secret",
2702 "value": null,
2703 "scope": "workspace",
2704 "updated_at": "2026-10-01T09:12:44.020Z",
2705 "available_to": [
2706 "workflows"
2707 ],
2708 "environments": [],
2709 "projects": [],
2710 "note": null,
2711 "updated_by": "syntaqx"
2712 },
2713 {
2714 "id": "set_01kpv9q4r7s0t3v6w9x2y5z8ac",
2715 "name": "STRIPE_KEY",
2716 "kind": "secret",
2717 "value": null,
2718 "scope": "project",
2719 "updated_at": "2026-10-04T15:42:07.318Z",
2720 "available_to": [
2721 "workflows",
2722 "deployments"
2723 ],
2724 "environments": [
2725 "production"
2726 ],
2727 "projects": [],
2728 "note": "Rotate in the Stripe dashboard.",
2729 "updated_by": "syntaqx"
2730 }
2731 ],
2732 "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."
2733 },
2734 "list_actions_secrets_for_workspace": {
2735 "params": {
2736 "workspace": "flagon-io"
2737 },
2738 "response": [
2739 {
2740 "id": "set_01kpv9q4r7s0t3v6w9x2y5z8ab",
2741 "name": "NPM_TOKEN",
2742 "kind": "secret",
2743 "value": null,
2744 "scope": "workspace",
2745 "updated_at": "2026-10-04T15:42:07.318Z",
2746 "available_to": [
2747 "workflows"
2748 ],
2749 "environments": [],
2750 "projects": [],
2751 "note": null,
2752 "updated_by": "syntaqx"
2753 }
2754 ],
2755 "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."
2756 },
2757 "set_actions_secret": {
2758 "params": {
2759 "setting": "STRIPE_KEY"
2760 },
2761 "request": {
2762 "value": "sk_live_…",
2763 "available_to": [
2764 "workflows",
2765 "deployments"
2766 ],
2767 "environments": [
2768 "production"
2769 ]
2770 },
2771 "response": {
2772 "id": "set_01kpv9q4r7s0t3v6w9x2y5z8ac",
2773 "name": "STRIPE_KEY",
2774 "kind": "secret",
2775 "value": null,
2776 "scope": "project",
2777 "updated_at": "2026-10-04T15:42:07.318Z",
2778 "available_to": [
2779 "workflows",
2780 "deployments"
2781 ],
2782 "environments": [
2783 "production"
2784 ],
2785 "projects": [],
2786 "note": null,
2787 "updated_by": "syntaqx"
2788 },
2789 "notes": "Keys are uppercased. See [secrets and variables](/guides/secrets-and-variables/)."
2790 },
2791 "set_actions_secret_for_workspace": {
2792 "params": {
2793 "workspace": "flagon-io",
2794 "setting": "NPM_TOKEN"
2795 },
2796 "request": {
2797 "value": "npm_…",
2798 "projects": [
2799 "hello"
2800 ]
2801 },
2802 "response": {
2803 "id": "set_01kpv9q4r7s0t3v6w9x2y5z8ac",
2804 "name": "NPM_TOKEN",
2805 "kind": "secret",
2806 "value": null,
2807 "scope": "workspace",
2808 "updated_at": "2026-10-04T15:42:07.318Z",
2809 "available_to": [
2810 "workflows"
2811 ],
2812 "environments": [],
2813 "projects": [
2814 "hello"
2815 ],
2816 "note": null,
2817 "updated_by": "syntaqx"
2818 }
2819 },
2820 "delete_actions_secret": {
2821 "params": {
2822 "setting": "STRIPE_KEY"
2823 },
2824 "response": true
2825 },
2826 "delete_actions_secret_for_workspace": {
2827 "params": {
2828 "workspace": "flagon-io",
2829 "setting": "NPM_TOKEN"
2830 },
2831 "response": true
2832 },
2833 "list_actions_variables": {
2834 "response": [
2835 {
2836 "id": "set_01kpv9q4r7s0t3v6w9x2y5z8ad",
2837 "name": "NODE_VERSION",
2838 "kind": "variable",
2839 "value": "20",
2840 "scope": "project",
2841 "updated_at": "2026-10-04T15:42:07.318Z",
2842 "available_to": [
2843 "workflows",
2844 "deployments"
2845 ],
2846 "environments": [],
2847 "projects": [],
2848 "note": null,
2849 "updated_by": "syntaqx"
2850 }
2851 ],
2852 "notes": "A repository's list includes the workspace's rows that reach it, with `scope` set to `workspace`. Empty `environments` means every environment."
2853 },
2854 "list_actions_variables_for_workspace": {
2855 "params": {
2856 "workspace": "flagon-io"
2857 },
2858 "response": [
2859 {
2860 "id": "set_01kpv9q4r7s0t3v6w9x2y5z8ad",
2861 "name": "NODE_VERSION",
2862 "kind": "variable",
2863 "value": "20",
2864 "scope": "workspace",
2865 "updated_at": "2026-10-04T15:42:07.318Z",
2866 "available_to": [
2867 "workflows",
2868 "deployments"
2869 ],
2870 "environments": [],
2871 "projects": [],
2872 "note": null,
2873 "updated_by": "syntaqx"
2874 }
2875 ]
2876 },
2877 "set_actions_variable": {
2878 "request": {
2879 "setting": "NODE_VERSION",
2880 "value": "20"
2881 },
2882 "response": {
2883 "id": "set_01kpv9q4r7s0t3v6w9x2y5z8ad",
2884 "name": "NODE_VERSION",
2885 "kind": "variable",
2886 "value": "20",
2887 "scope": "project",
2888 "updated_at": "2026-10-04T15:42:07.318Z",
2889 "available_to": [
2890 "workflows",
2891 "deployments"
2892 ],
2893 "environments": [],
2894 "projects": [],
2895 "note": null,
2896 "updated_by": "syntaqx"
2897 },
2898 "notes": "GitHub's clients send the key as `name`; that is accepted too."
2899 },
2900 "set_actions_variable_for_workspace": {
2901 "params": {
2902 "workspace": "flagon-io"
2903 },
2904 "request": {
2905 "setting": "NODE_VERSION",
2906 "value": "20"
2907 },
2908 "response": {
2909 "id": "set_01kpv9q4r7s0t3v6w9x2y5z8ad",
2910 "name": "NODE_VERSION",
2911 "kind": "variable",
2912 "value": "20",
2913 "scope": "workspace",
2914 "updated_at": "2026-10-04T15:42:07.318Z",
2915 "available_to": [
2916 "workflows",
2917 "deployments"
2918 ],
2919 "environments": [],
2920 "projects": [],
2921 "note": null,
2922 "updated_by": "syntaqx"
2923 }
2924 },
2925 "update_actions_variable": {
2926 "params": {
2927 "setting": "NODE_VERSION"
2928 },
2929 "request": {
2930 "value": "22"
2931 },
2932 "response": {
2933 "id": "set_01kpv9q4r7s0t3v6w9x2y5z8ad",
2934 "name": "NODE_VERSION",
2935 "kind": "variable",
2936 "value": "22",
2937 "scope": "project",
2938 "updated_at": "2026-10-04T15:42:07.318Z",
2939 "available_to": [
2940 "workflows",
2941 "deployments"
2942 ],
2943 "environments": [],
2944 "projects": [],
2945 "note": null,
2946 "updated_by": "syntaqx"
2947 }
2948 },
2949 "update_actions_variable_for_workspace": {
2950 "params": {
2951 "workspace": "flagon-io",
2952 "setting": "NODE_VERSION"
2953 },
2954 "request": {
2955 "value": "22"
2956 },
2957 "response": {
2958 "id": "set_01kpv9q4r7s0t3v6w9x2y5z8ad",
2959 "name": "NODE_VERSION",
2960 "kind": "variable",
2961 "value": "22",
2962 "scope": "workspace",
2963 "updated_at": "2026-10-04T15:42:07.318Z",
2964 "available_to": [
2965 "workflows",
2966 "deployments"
2967 ],
2968 "environments": [],
2969 "projects": [],
2970 "note": null,
2971 "updated_by": "syntaqx"
2972 }
2973 },
2974 "delete_actions_variable": {
2975 "params": {
2976 "setting": "NODE_VERSION"
2977 },
2978 "response": true
2979 },
2980 "delete_actions_variable_for_workspace": {
2981 "params": {
2982 "workspace": "flagon-io",
2983 "setting": "NODE_VERSION"
2984 },
2985 "response": true
2986 },
2987 "list_runners": {
2988 "response": [
2989 {
2990 "id": "rnr_01kq2m8v4c7f0h3k6n9q2t5w8z",
2991 "name": "build-01",
2992 "workspace": "flagon-io",
2993 "repo": null,
2994 "group": "Default",
2995 "labels": [
2996 "self-hosted",
2997 "linux",
2998 "x64",
2999 "gpu"
3000 ],
3001 "os": "linux",
3002 "arch": "x64",
3003 "version": "0.2.0",
3004 "ephemeral": false,
3005 "status": "busy",
3006 "work": {
3007 "kind": "workflow",
3008 "id": "job_01kq2m9b1d4g7j0m3p6s9v2y5b",
3009 "name": "test (linux, 24)",
3010 "repo": "flagon-io/hello",
3011 "run_id": "run_01kq2m9a8c1f4h7k0n3q6t9w2z",
3012 "started_at": "2026-10-06T14:02:11.000Z"
3013 },
3014 "last_seen_at": "2026-10-06T14:05:40.512Z",
3015 "created_at": "2026-10-02T09:30:00.000Z",
3016 "created_by": null
3017 },
3018 {
3019 "id": "rnr_01kq2m8v4c7f0h3k6n9q2t5w9a",
3020 "name": "mac-mini",
3021 "workspace": "flagon-io",
3022 "repo": null,
3023 "group": "Default",
3024 "labels": [
3025 "self-hosted",
3026 "macos",
3027 "arm64"
3028 ],
3029 "os": "macos",
3030 "arch": "arm64",
3031 "version": "0.2.0",
3032 "ephemeral": false,
3033 "status": "online",
3034 "work": null,
3035 "last_seen_at": "2026-10-06T14:05:40.512Z",
3036 "created_at": "2026-10-02T09:30:00.000Z",
3037 "created_by": null
3038 }
3039 ],
3040 "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."
3041 },
3042 "list_runners_for_workspace": {
3043 "params": {
3044 "workspace": "flagon-io"
3045 },
3046 "response": [
3047 {
3048 "id": "rnr_01kq2m8v4c7f0h3k6n9q2t5w8z",
3049 "name": "build-01",
3050 "workspace": "flagon-io",
3051 "repo": null,
3052 "group": "Default",
3053 "labels": [
3054 "self-hosted",
3055 "linux",
3056 "x64",
3057 "gpu"
3058 ],
3059 "os": "linux",
3060 "arch": "x64",
3061 "version": "0.2.0",
3062 "ephemeral": false,
3063 "status": "busy",
3064 "work": {
3065 "kind": "workflow",
3066 "id": "job_01kq2m9b1d4g7j0m3p6s9v2y5b",
3067 "name": "test (linux, 24)",
3068 "repo": "flagon-io/hello",
3069 "run_id": "run_01kq2m9a8c1f4h7k0n3q6t9w2z",
3070 "started_at": "2026-10-06T14:02:11.000Z"
3071 },
3072 "last_seen_at": "2026-10-06T14:05:40.512Z",
3073 "created_at": "2026-10-02T09:30:00.000Z",
3074 "created_by": null
3075 },
3076 {
3077 "id": "rnr_01kq2m8v4c7f0h3k6n9q2t5w9a",
3078 "name": "mac-mini",
3079 "workspace": "flagon-io",
3080 "repo": null,
3081 "group": "Default",
3082 "labels": [
3083 "self-hosted",
3084 "macos",
3085 "arm64"
3086 ],
3087 "os": "macos",
3088 "arch": "arm64",
3089 "version": "0.2.0",
3090 "ephemeral": false,
3091 "status": "online",
3092 "work": null,
3093 "last_seen_at": "2026-10-06T14:05:40.512Z",
3094 "created_at": "2026-10-02T09:30:00.000Z",
3095 "created_by": null
3096 }
3097 ]
3098 },
3099 "create_runner_registration_token": {
3100 "response": {
3101 "token": "g1trt_…",
3102 "expires_at": "2026-10-06T15:04:00.000Z",
3103 "workspace": "flagon-io",
3104 "repo": "flagon-io/hello",
3105 "group": null,
3106 "url": "https://g1t.sh"
3107 },
3108 "notes": "Pass it to `g1t-runner register --url https://g1t.sh --token …` within the hour. See [self-hosted runners](/guides/self-hosted-runners/)."
3109 },
3110 "create_runner_registration_token_for_workspace": {
3111 "params": {
3112 "workspace": "flagon-io"
3113 },
3114 "request": {
3115 "group": "Default"
3116 },
3117 "response": {
3118 "token": "g1trt_…",
3119 "expires_at": "2026-10-06T15:04:00.000Z",
3120 "workspace": "flagon-io",
3121 "repo": null,
3122 "group": "Default",
3123 "url": "https://g1t.sh"
3124 }
3125 },
3126 "remove_runner": {
3127 "params": {
3128 "id": "rnr_01kq2m8v4c7f0h3k6n9q2t5w8z"
3129 },
3130 "response": true
3131 },
3132 "remove_runner_for_workspace": {
3133 "params": {
3134 "workspace": "flagon-io",
3135 "id": "rnr_01kq2m8v4c7f0h3k6n9q2t5w8z"
3136 },
3137 "response": true
3138 },
3139 "get_runner_settings": {
3140 "response": {
3141 "agents_on_self_hosted": false,
3142 "agent_labels": [
3143 "self-hosted",
3144 "linux"
3145 ],
3146 "fork_pull_requests": false,
3147 "inherited": true
3148 }
3149 },
3150 "get_runner_settings_for_workspace": {
3151 "params": {
3152 "workspace": "flagon-io"
3153 },
3154 "response": {
3155 "agents_on_self_hosted": true,
3156 "agent_labels": [
3157 "self-hosted",
3158 "linux"
3159 ],
3160 "fork_pull_requests": false,
3161 "inherited": false
3162 }
3163 },
3164 "update_runner_settings": {
3165 "request": {
3166 "inherit": true
3167 },
3168 "response": {
3169 "agents_on_self_hosted": false,
3170 "agent_labels": [
3171 "self-hosted",
3172 "linux"
3173 ],
3174 "fork_pull_requests": false,
3175 "inherited": true
3176 }
3177 },
3178 "update_runner_settings_for_workspace": {
3179 "params": {
3180 "workspace": "flagon-io"
3181 },
3182 "request": {
3183 "agents_on_self_hosted": true,
3184 "agent_labels": [
3185 "linux"
3186 ]
3187 },
3188 "response": {
3189 "agents_on_self_hosted": true,
3190 "agent_labels": [
3191 "self-hosted",
3192 "linux"
3193 ],
3194 "fork_pull_requests": false,
3195 "inherited": false
3196 },
3197 "notes": "Agent work on your runners still uses g1t's model proxy, paid as before, unless the workspace has its own model provider."
3198 },
3199 "list_runner_groups": {
3200 "params": {
3201 "workspace": "flagon-io"
3202 },
3203 "response": [
3204 {
3205 "id": "rng_01kq2m7r2a5d8g1j4m7p0s3v6y",
3206 "name": "Default",
3207 "default": true,
3208 "repositories": [],
3209 "runners": 2,
3210 "updated_at": "2026-10-02T09:30:00.000Z"
3211 },
3212 {
3213 "id": "rng_01kq2m7r2a5d8g1j4m7p0s3v6z",
3214 "name": "GPU",
3215 "default": false,
3216 "repositories": [
3217 "hello",
3218 "models"
3219 ],
3220 "runners": 1,
3221 "updated_at": "2026-10-05T11:20:00.000Z"
3222 }
3223 ]
3224 },
3225 "create_runner_group": {
3226 "params": {
3227 "workspace": "flagon-io"
3228 },
3229 "request": {
3230 "name": "GPU",
3231 "repositories": [
3232 "hello",
3233 "models"
3234 ]
3235 },
3236 "response": {
3237 "id": "rng_01kq2m7r2a5d8g1j4m7p0s3v6z",
3238 "name": "GPU",
3239 "default": false,
3240 "repositories": [
3241 "hello",
3242 "models"
3243 ],
3244 "runners": 1,
3245 "updated_at": "2026-10-05T11:20:00.000Z"
3246 }
3247 },
3248 "update_runner_group": {
3249 "params": {
3250 "workspace": "flagon-io",
3251 "id": "rng_01kq2m7r2a5d8g1j4m7p0s3v6z"
3252 },
3253 "request": {
3254 "repositories": []
3255 },
3256 "response": {
3257 "id": "rng_01kq2m7r2a5d8g1j4m7p0s3v6z",
3258 "name": "GPU",
3259 "default": false,
3260 "repositories": [],
3261 "runners": 1,
3262 "updated_at": "2026-10-05T11:20:00.000Z"
3263 }
3264 },
3265 "delete_runner_group": {
3266 "params": {
3267 "workspace": "flagon-io",
3268 "id": "rng_01kq2m7r2a5d8g1j4m7p0s3v6z"
3269 },
3270 "response": true
3271 },
3272 "list_webhooks": {
3273 "response": [
3274 {
3275 "id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd",
3276 "scope": "repo",
3277 "workspace": "flagon-io",
3278 "repo": "flagon-io/hello",
3279 "url": "https://hooks.example.com/g1t",
3280 "events": [
3281 "git.push",
3282 "pull.merged"
3283 ],
3284 "active": true,
3285 "secret_hint": "…9c2e",
3286 "created_by": "syntaqx",
3287 "created_at": "2026-10-04T15:42:07.318Z",
3288 "last_status": "delivered",
3289 "last_delivered_at": "2026-10-04T15:42:07.611Z"
3290 }
3291 ]
3292 },
3293 "list_webhooks_for_workspace": {
3294 "params": {
3295 "workspace": "flagon-io"
3296 },
3297 "response": [
3298 {
3299 "id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd",
3300 "scope": "workspace",
3301 "workspace": "flagon-io",
3302 "repo": null,
3303 "url": "https://hooks.example.com/g1t",
3304 "events": [
3305 "git.push",
3306 "pull.merged"
3307 ],
3308 "active": true,
3309 "secret_hint": "…9c2e",
3310 "created_by": "syntaqx",
3311 "created_at": "2026-10-04T15:42:07.318Z",
3312 "last_status": "delivered",
3313 "last_delivered_at": "2026-10-04T15:42:07.611Z"
3314 }
3315 ]
3316 },
3317 "create_webhook": {
3318 "request": {
3319 "url": "https://hooks.example.com/g1t",
3320 "events": [
3321 "git.push",
3322 "pull.merged"
3323 ]
3324 },
3325 "response": {
3326 "hook": {
3327 "id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd",
3328 "scope": "repo",
3329 "workspace": "flagon-io",
3330 "repo": "flagon-io/hello",
3331 "url": "https://hooks.example.com/g1t",
3332 "events": [
3333 "git.push",
3334 "pull.merged"
3335 ],
3336 "active": true,
3337 "secret_hint": "…9c2e",
3338 "created_by": "syntaqx",
3339 "created_at": "2026-10-04T15:42:07.318Z",
3340 "last_status": "delivered",
3341 "last_delivered_at": "2026-10-04T15:42:07.611Z"
3342 },
3343 "secret": "whsec_…"
3344 },
3345 "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/)."
3346 },
3347 "create_webhook_for_workspace": {
3348 "params": {
3349 "workspace": "flagon-io"
3350 },
3351 "request": {
3352 "url": "https://hooks.example.com/g1t"
3353 },
3354 "response": {
3355 "hook": {
3356 "id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd",
3357 "scope": "workspace",
3358 "workspace": "flagon-io",
3359 "repo": null,
3360 "url": "https://hooks.example.com/g1t",
3361 "events": [
3362 "*"
3363 ],
3364 "active": true,
3365 "secret_hint": "…9c2e",
3366 "created_by": "syntaqx",
3367 "created_at": "2026-10-04T15:42:07.318Z",
3368 "last_status": "delivered",
3369 "last_delivered_at": "2026-10-04T15:42:07.611Z"
3370 },
3371 "secret": "whsec_…"
3372 },
3373 "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/)."
3374 },
3375 "update_webhook": {
3376 "params": {
3377 "id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd"
3378 },
3379 "request": {
3380 "active": false
3381 },
3382 "response": {
3383 "id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd",
3384 "scope": "repo",
3385 "workspace": "flagon-io",
3386 "repo": "flagon-io/hello",
3387 "url": "https://hooks.example.com/g1t",
3388 "events": [
3389 "git.push",
3390 "pull.merged"
3391 ],
3392 "active": false,
3393 "secret_hint": "…9c2e",
3394 "created_by": "syntaqx",
3395 "created_at": "2026-10-04T15:42:07.318Z",
3396 "last_status": "delivered",
3397 "last_delivered_at": "2026-10-04T15:42:07.611Z"
3398 }
3399 },
3400 "update_webhook_for_workspace": {
3401 "params": {
3402 "workspace": "flagon-io",
3403 "id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd"
3404 },
3405 "request": {
3406 "active": false
3407 },
3408 "response": {
3409 "id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd",
3410 "scope": "workspace",
3411 "workspace": "flagon-io",
3412 "repo": null,
3413 "url": "https://hooks.example.com/g1t",
3414 "events": [
3415 "git.push",
3416 "pull.merged"
3417 ],
3418 "active": false,
3419 "secret_hint": "…9c2e",
3420 "created_by": "syntaqx",
3421 "created_at": "2026-10-04T15:42:07.318Z",
3422 "last_status": "delivered",
3423 "last_delivered_at": "2026-10-04T15:42:07.611Z"
3424 }
3425 },
3426 "delete_webhook": {
3427 "params": {
3428 "id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd"
3429 },
3430 "response": true
3431 },
3432 "delete_webhook_for_workspace": {
3433 "params": {
3434 "workspace": "flagon-io",
3435 "id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd"
3436 },
3437 "response": true
3438 },
3439 "ping_webhook": {
3440 "params": {
3441 "id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd"
3442 },
3443 "response": {
3444 "id": "dlv_01kpx5p9v2j7k3m8n4p5q6r7st",
3445 "hook_id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd",
3446 "event_id": "",
3447 "event": "ping",
3448 "status": "delivered",
3449 "attempts": 1,
3450 "response_status": 200,
3451 "response_body": "ok",
3452 "error": null,
3453 "duration_ms": 184,
3454 "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\"}",
3455 "created_at": "2026-10-04T16:01:12.440Z",
3456 "delivered_at": "2026-10-04T16:01:12.631Z",
3457 "next_attempt_at": null
3458 },
3459 "notes": "`payload` is the JSON that was sent, as a string."
3460 },
3461 "ping_webhook_for_workspace": {
3462 "params": {
3463 "workspace": "flagon-io",
3464 "id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd"
3465 },
3466 "response": {
3467 "id": "dlv_01kpx5p9v2j7k3m8n4p5q6r7st",
3468 "hook_id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd",
3469 "event_id": "",
3470 "event": "ping",
3471 "status": "delivered",
3472 "attempts": 1,
3473 "response_status": 200,
3474 "response_body": "ok",
3475 "error": null,
3476 "duration_ms": 184,
3477 "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\"}",
3478 "created_at": "2026-10-04T16:01:12.440Z",
3479 "delivered_at": "2026-10-04T16:01:12.631Z",
3480 "next_attempt_at": null
3481 }
3482 },
3483 "list_webhook_deliveries": {
3484 "params": {
3485 "id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd"
3486 },
3487 "response": [
3488 {
3489 "id": "dlv_01kpx6a2b3c4d5e6f7g8h9j0kz",
3490 "hook_id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd",
3491 "event_id": "",
3492 "event": "ping",
3493 "status": "pending",
3494 "attempts": 1,
3495 "response_status": 503,
3496 "response_body": "Service Unavailable",
3497 "error": null,
3498 "duration_ms": 212,
3499 "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\"}",
3500 "created_at": "2026-10-04T16:20:03.100Z",
3501 "delivered_at": null,
3502 "next_attempt_at": "2026-10-04T16:21:03.312Z"
3503 },
3504 {
3505 "id": "dlv_01kpx5p9v2j7k3m8n4p5q6r7st",
3506 "hook_id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd",
3507 "event_id": "",
3508 "event": "ping",
3509 "status": "delivered",
3510 "attempts": 1,
3511 "response_status": 200,
3512 "response_body": "ok",
3513 "error": null,
3514 "duration_ms": 184,
3515 "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\"}",
3516 "created_at": "2026-10-04T16:01:12.440Z",
3517 "delivered_at": "2026-10-04T16:01:12.631Z",
3518 "next_attempt_at": null
3519 }
3520 ],
3521 "notes": "Returns at most 50, newest first. `status` is `pending`, `delivered` or `failed`; `next_attempt_at` is set while it is pending."
3522 },
3523 "list_webhook_deliveries_for_workspace": {
3524 "params": {
3525 "workspace": "flagon-io",
3526 "id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd"
3527 },
3528 "response": [
3529 {
3530 "id": "dlv_01kpx6a2b3c4d5e6f7g8h9j0kz",
3531 "hook_id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd",
3532 "event_id": "",
3533 "event": "ping",
3534 "status": "pending",
3535 "attempts": 1,
3536 "response_status": 503,
3537 "response_body": "Service Unavailable",
3538 "error": null,
3539 "duration_ms": 212,
3540 "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\"}",
3541 "created_at": "2026-10-04T16:20:03.100Z",
3542 "delivered_at": null,
3543 "next_attempt_at": "2026-10-04T16:21:03.312Z"
3544 },
3545 {
3546 "id": "dlv_01kpx5p9v2j7k3m8n4p5q6r7st",
3547 "hook_id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd",
3548 "event_id": "",
3549 "event": "ping",
3550 "status": "delivered",
3551 "attempts": 1,
3552 "response_status": 200,
3553 "response_body": "ok",
3554 "error": null,
3555 "duration_ms": 184,
3556 "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\"}",
3557 "created_at": "2026-10-04T16:01:12.440Z",
3558 "delivered_at": "2026-10-04T16:01:12.631Z",
3559 "next_attempt_at": null
3560 }
3561 ]
3562 },
3563 "redeliver_webhook": {
3564 "params": {
3565 "id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd",
3566 "delivery": "dlv_01kpx6a2b3c4d5e6f7g8h9j0kz"
3567 },
3568 "response": {
3569 "id": "dlv_01kpx6c8d1e2f3g4h5j6k7m8np",
3570 "hook_id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd",
3571 "event_id": "",
3572 "event": "ping",
3573 "status": "delivered",
3574 "attempts": 1,
3575 "response_status": 200,
3576 "response_body": "ok",
3577 "error": null,
3578 "duration_ms": 171,
3579 "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\"}",
3580 "created_at": "2026-10-04T16:25:40.007Z",
3581 "delivered_at": "2026-10-04T16:25:40.178Z",
3582 "next_attempt_at": null
3583 },
3584 "notes": "The response is the new delivery."
3585 },
3586 "redeliver_webhook_for_workspace": {
3587 "params": {
3588 "workspace": "flagon-io",
3589 "id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd",
3590 "delivery": "dlv_01kpx6a2b3c4d5e6f7g8h9j0kz"
3591 },
3592 "response": {
3593 "id": "dlv_01kpx6c8d1e2f3g4h5j6k7m8np",
3594 "hook_id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd",
3595 "event_id": "",
3596 "event": "ping",
3597 "status": "delivered",
3598 "attempts": 1,
3599 "response_status": 200,
3600 "response_body": "ok",
3601 "error": null,
3602 "duration_ms": 171,
3603 "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\"}",
3604 "created_at": "2026-10-04T16:25:40.007Z",
3605 "delivered_at": "2026-10-04T16:25:40.178Z",
3606 "next_attempt_at": null
3607 }
3608 },
3609 "list_integrations": {
3610 "params": {
3611 "workspace": "flagon-io"
3612 },
3613 "response": [
3614 {
3615 "id": "con_01kpx3m7q2f8r9t4v6w0y1z2ab",
3616 "workspace": "flagon-io",
3617 "provider": "anthropic",
3618 "kind": "models",
3619 "name": "Anthropic",
3620 "config": {
3621 "assign": false,
3622 "write_back": true
3623 },
3624 "secret_hint": "…3f9a",
3625 "webhook_url": null,
3626 "created_by": "syntaqx",
3627 "created_at": "2026-10-04T15:42:07.318Z",
3628 "last_used_at": "2026-10-04T15:42:08.102Z",
3629 "last_error": null,
3630 "models": [
3631 "claude-haiku-4-5",
3632 "claude-sonnet-4-5"
3633 ]
3634 },
3635 {
3636 "id": "con_01kpx4n8r3g9s0v5w7x1z2a3bc",
3637 "workspace": "flagon-io",
3638 "provider": "jira",
3639 "kind": "tracker",
3640 "name": "Jira",
3641 "config": {
3642 "assign": false,
3643 "write_back": true,
3644 "site": "https://acme.atlassian.net",
3645 "email": "syntaqx@example.com",
3646 "keys": [
3647 "TECH"
3648 ]
3649 },
3650 "secret_hint": "…x7Qe",
3651 "webhook_url": null,
3652 "created_by": "syntaqx",
3653 "created_at": "2026-10-04T15:42:07.318Z",
3654 "last_used_at": null,
3655 "last_error": null,
3656 "models": []
3657 }
3658 ],
3659 "notes": "`kind` is `models`, `alerts` or `tracker`. `secret_hint` shows the end of the secret; the secret itself is never returned. `webhook_url` is where an alert source sends its alerts."
3660 },
3661 "connect_integration": {
3662 "params": {
3663 "workspace": "flagon-io"
3664 },
3665 "request": {
3666 "provider": "webhook",
3667 "config": {
3668 "repo": "flagon-io/hello",
3669 "label": "bug"
3670 }
3671 },
3672 "response": {
3673 "connection": {
3674 "id": "con_01kpx4n8r3g9s0v5w7x1z2a3bd",
3675 "workspace": "flagon-io",
3676 "provider": "webhook",
3677 "kind": "alerts",
3678 "name": "Webhook",
3679 "config": {
3680 "repo": "flagon-io/hello",
3681 "label": "bug",
3682 "assign": false,
3683 "write_back": true
3684 },
3685 "secret_hint": null,
3686 "webhook_url": "https://api.g1t.sh/hooks/con_01kpx4n8r3g9s0v5w7x1z2a3bd",
3687 "created_by": "syntaqx",
3688 "created_at": "2026-10-04T15:42:07.318Z",
3689 "last_used_at": null,
3690 "last_error": null,
3691 "models": []
3692 },
3693 "signing_secret": "g1ts_9f2c4a7e1b0d3c6f8a2e5b7d9c1f4a6e8b0d2c4f6a8e1b3d"
3694 },
3695 "notes": "`signing_secret` is set only when g1t made it, for `datadog` and `webhook`, and is shown only this once. A model provider is tested as it is connected. See [integrations](/guides/integrations/) and [model providers](/guides/models/)."
3696 },
3697 "disconnect_integration": {
3698 "params": {
3699 "workspace": "flagon-io",
3700 "id": "con_01kpx3m7q2f8r9t4v6w0y1z2ab"
3701 },
3702 "response": true
3703 },
3704 "test_integration": {
3705 "params": {
3706 "workspace": "flagon-io",
3707 "id": "con_01kpx3m7q2f8r9t4v6w0y1z2ab"
3708 },
3709 "response": {
3710 "ok": true,
3711 "message": "Anthropic accepted the key and offers 9 models."
3712 },
3713 "notes": "Credentials that do not work still answer `200`, with `ok` false and `message` saying what went wrong."
3714 },
3715 "get_model_routes": {
3716 "params": {
3717 "workspace": "flagon-io"
3718 },
3719 "response": [
3720 {
3721 "task": "default",
3722 "connection_id": "con_01kpx3m7q2f8r9t4v6w0y1z2ab",
3723 "model": "claude-sonnet-4-5"
3724 },
3725 {
3726 "task": "review",
3727 "connection_id": null,
3728 "model": null
3729 }
3730 ]
3731 },
3732 "set_model_routes": {
3733 "params": {
3734 "workspace": "flagon-io"
3735 },
3736 "request": {
3737 "routes": [
3738 {
3739 "task": "default",
3740 "connection_id": "con_01kpx3m7q2f8r9t4v6w0y1z2ab",
3741 "model": "claude-sonnet-4-5"
3742 },
3743 {
3744 "task": "review",
3745 "connection_id": null
3746 }
3747 ]
3748 },
3749 "response": [
3750 {
3751 "task": "default",
3752 "connection_id": "con_01kpx3m7q2f8r9t4v6w0y1z2ab",
3753 "model": "claude-sonnet-4-5"
3754 },
3755 {
3756 "task": "review",
3757 "connection_id": null,
3758 "model": null
3759 }
3760 ],
3761 "notes": "The response is the routes as saved, ordered by task."
3762 },
3763 "get_context": {
3764 "query": {
3765 "reference": "TECH-1234"
3766 },
3767 "response": {
3768 "provider": "jira",
3769 "key": "TECH-1234",
3770 "title": "Checkout fails for EU cards",
3771 "url": "https://acme.atlassian.net/browse/TECH-1234",
3772 "status": "In Progress",
3773 "body": "Customers with 3DS cards see a 500 at /pay.",
3774 "fetched_at": "2026-10-04T15:42:07.318Z"
3775 }
3776 },
3777 "import_issue": {
3778 "request": {
3779 "reference": "TECH-1234"
3780 },
3781 "response": {
3782 "number": 42,
3783 "item": {
3784 "provider": "jira",
3785 "key": "TECH-1234",
3786 "title": "Checkout fails for EU cards",
3787 "url": "https://acme.atlassian.net/browse/TECH-1234",
3788 "status": "In Progress",
3789 "body": "Customers with 3DS cards see a 500 at /pay.",
3790 "fetched_at": "2026-10-04T15:42:07.318Z"
3791 },
3792 "created": true
3793 },
3794 "notes": "`created` is false when the ticket was imported before; `number` is then that issue."
3795 },
3796 "remember": {
3797 "request": {
3798 "text": "The tests need TZ=UTC or the date tests fail.",
3799 "scope": "project",
3800 "kind": "gotcha",
3801 "from_number": 14
3802 },
3803 "response": {
3804 "id": "mem_01m43v8q2w3e4r5t6y7u8i9o0p",
3805 "scope": "project",
3806 "workspace": "flagon-io",
3807 "repo": {
3808 "namespace": "flagon-io",
3809 "name": "hello"
3810 },
3811 "text": "The tests need TZ=UTC or the date tests fail.",
3812 "kind": "gotcha",
3813 "source": {
3814 "kind": "run",
3815 "run_id": "arn_01m43v2c1p9k8d7e6f5a4b3c2d",
3816 "repo": {
3817 "namespace": "flagon-io",
3818 "name": "hello"
3819 },
3820 "number": 14
3821 },
3822 "created_by": "g1t",
3823 "pinned": false,
3824 "created_at": "2026-10-01T18:40:12.000Z",
3825 "updated_at": "2026-10-01T18:40:12.000Z",
3826 "last_used_at": null
3827 },
3828 "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."
3829 },
3830 "recall": {
3831 "query": {
3832 "q": "pnpm"
3833 },
3834 "response": {
3835 "project": [],
3836 "workspace": [
3837 {
3838 "id": "mem_01m43t0a1s2d3f4g5h6j7k8l9z",
3839 "scope": "workspace",
3840 "workspace": "flagon-io",
3841 "repo": null,
3842 "text": "We use pnpm everywhere, never npm or yarn.",
3843 "kind": "convention",
3844 "source": {
3845 "kind": "person",
3846 "run_id": null,
3847 "repo": null,
3848 "number": null
3849 },
3850 "created_by": "syntaqx",
3851 "pinned": true,
3852 "created_at": "2026-10-01T18:40:12.000Z",
3853 "updated_at": "2026-10-01T18:40:12.000Z",
3854 "last_used_at": null
3855 }
3856 ]
3857 },
3858 "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."
3859 },
3860 "search": {
3861 "query": {
3862 "q": "parse_query language:rust repo:acme/web",
3863 "type": "code"
3864 },
3865 "response": {
3866 "query": "parse_query repo:acme/web language:rust",
3867 "type": "code",
3868 "counts": {
3869 "repositories": 0,
3870 "code": 2,
3871 "issues": 0,
3872 "pulls": 0,
3873 "people": 0
3874 },
3875 "page": 1,
3876 "per_page": 20,
3877 "more": false,
3878 "hits": [
3879 {
3880 "kind": "code",
3881 "title": "src/search/query.rs",
3882 "url": "/acme/web/blob/main/src/search/query.rs#L42",
3883 "repo": "acme/web",
3884 "private": false,
3885 "description": null,
3886 "snippet": [],
3887 "lines": [
3888 {
3889 "number": 41,
3890 "parts": [
3891 {
3892 "text": "/// Reads a query typed into the search box.",
3893 "highlight": false
3894 }
3895 ]
3896 },
3897 {
3898 "number": 42,
3899 "parts": [
3900 {
3901 "text": "pub fn ",
3902 "highlight": false
3903 },
3904 {
3905 "text": "parse_query",
3906 "highlight": true
3907 },
3908 {
3909 "text": "(text: &str) -> Query {",
3910 "highlight": false
3911 }
3912 ]
3913 },
3914 {
3915 "number": 43,
3916 "parts": [
3917 {
3918 "text": " let mut query = Query::default();",
3919 "highlight": false
3920 }
3921 ]
3922 }
3923 ],
3924 "path": "src/search/query.rs",
3925 "language": "rust",
3926 "ref": "main",
3927 "number": null,
3928 "state": null,
3929 "author": null,
3930 "requested_by": null,
3931 "labels": [],
3932 "topics": [],
3933 "slug": null,
3934 "avatar": null,
3935 "updated_at": null
3936 }
3937 ],
3938 "notes": []
3939 },
3940 "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."
3941 },
3942 "search_context": {
3943 "params": {
3944 "workspace": "acme"
3945 },
3946 "query": {
3947 "q": "how do we run the web tests",
3948 "project": "web"
3949 },
3950 "response": {
3951 "query": "how do we run the web tests",
3952 "mode": "semantic",
3953 "hits": [
3954 {
3955 "kind": "memory",
3956 "id": "mem_01m4a0c2b7k3f9d1e5g8h2j6k4",
3957 "title": "Gotcha",
3958 "snippet": "The date tests fail unless TZ=UTC.",
3959 "project": "web",
3960 "url": "/acme/web/memory",
3961 "score": 0.82,
3962 "source": "AGENTS.md",
3963 "by": "g1t",
3964 "updated_at": "2026-10-04T21:10:02.000Z"
3965 },
3966 {
3967 "kind": "doc",
3968 "id": "ent_5f0c2a9e41d7b3c86a1e2f40:2",
3969 "title": "Web (README.md)",
3970 "snippet": "## Testing Run npm test. The end-to-end tests need the api running locally…",
3971 "project": "web",
3972 "url": "/acme/web/blob/main/README.md",
3973 "score": 0.77,
3974 "source": "README.md",
3975 "by": null,
3976 "updated_at": "2026-10-04T20:58:41.000Z"
3977 },
3978 {
3979 "kind": "project",
3980 "id": "ent_9b1d6f0a2c3e4b5d6e7f8a9b",
3981 "title": "web",
3982 "snippet": "The storefront. Written in TypeScript. Packages: @acme/web. Uses api. Owned by ana.",
3983 "project": "web",
3984 "url": "/acme/web",
3985 "score": 0.71,
3986 "source": "catalog",
3987 "by": null,
3988 "updated_at": "2026-10-04T20:58:41.000Z"
3989 }
3990 ]
3991 },
3992 "notes": "Give `workspace`, or `repo` as `owner/name` for its workspace. `kinds` narrows to some of `project`, `app`, `api`, `package`, `language`, `owner`, `environment`, `integration`, `doc`, `memory`, `issue` and `pull`; in a URL, comma-separated. `mode` is `text` when the search index could not answer and words were matched instead. Memory is returned only to members of the workspace and its agents; anything from a private project, only to those who can read it (members, unless the base permission is None, and people given a role on its repository). A g1t agent searches its own workspace only."
3993 },
3994 "get_entity": {
3995 "params": {
3996 "workspace": "acme",
3997 "kind": "project",
3998 "id": "web"
3999 },
4000 "response": {
4001 "entity": {
4002 "id": "ent_9b1d6f0a2c3e4b5d6e7f8a9b",
4003 "workspace": "acme",
4004 "kind": "project",
4005 "key": "web",
4006 "name": "web",
4007 "summary": "The storefront. Written in TypeScript. Packages: @acme/web. Uses api. Owned by ana.",
4008 "project": "web",
4009 "private": true,
4010 "data": {
4011 "repo": "acme/web",
4012 "root_dir": "",
4013 "default_branch": "main",
4014 "languages": [
4015 "TypeScript"
4016 ],
4017 "owners": [
4018 "ana"
4019 ],
4020 "tests": true,
4021 "test_commands": [
4022 "npm test"
4023 ],
4024 "production_url": "https://web--acme.g1t.page"
4025 },
4026 "source": "scan",
4027 "ref": "/acme/web",
4028 "updated_at": "2026-10-04T20:58:41.000Z"
4029 },
4030 "relations": [
4031 {
4032 "kind": "depends_on",
4033 "direction": "out",
4034 "entity": {
4035 "id": "ent_0a7c3e5b9d1f2a4c6e8b0d2f",
4036 "workspace": "acme",
4037 "kind": "project",
4038 "key": "api",
4039 "name": "api",
4040 "summary": "The public API. Written in Rust.",
4041 "project": "api",
4042 "private": true,
4043 "data": {},
4044 "source": "scan",
4045 "ref": "/acme/api",
4046 "updated_at": "2026-10-04T20:57:12.000Z"
4047 }
4048 },
4049 {
4050 "kind": "owned_by",
4051 "direction": "out",
4052 "entity": {
4053 "id": "ent_3c5e7a9b1d2f4a6c8e0b2d4f",
4054 "workspace": "acme",
4055 "kind": "owner",
4056 "key": "ana",
4057 "name": "ana",
4058 "summary": null,
4059 "project": null,
4060 "private": false,
4061 "data": {},
4062 "source": "scan",
4063 "ref": "/u/ana",
4064 "updated_at": "2026-10-04T20:58:41.000Z"
4065 }
4066 }
4067 ]
4068 },
4069 "notes": "`id` is the entry's id, or its key: a project's or app's slug, `npm:<name>` (or `cargo:`, `go:`, `pypi:`) for a package, a username for an owner, `<project>/production` for an environment. `data` depends on the kind: a package's version and dependencies, an API's routes, an app's production address."
4070 },
4071 "list_collaborators": {
4072 "response": {
4073 "repo": "flagon-io/hello",
4074 "base_permission": "write",
4075 "people": [
4076 {
4077 "username": "syntaqx",
4078 "name": "Chase Pierce",
4079 "avatar": null,
4080 "role": "admin",
4081 "source": "owner",
4082 "direct": null,
4083 "workspace_role": "owner"
4084 },
4085 {
4086 "username": "linus",
4087 "name": null,
4088 "avatar": null,
4089 "role": "maintain",
4090 "source": "direct",
4091 "direct": "maintain",
4092 "workspace_role": "member"
4093 },
4094 {
4095 "username": "grace",
4096 "name": "Grace Hopper",
4097 "avatar": null,
4098 "role": "write",
4099 "source": "base",
4100 "direct": null,
4101 "workspace_role": "member"
4102 },
4103 {
4104 "username": "ada",
4105 "name": "Ada Lovelace",
4106 "avatar": null,
4107 "role": "triage",
4108 "source": "direct",
4109 "direct": "triage",
4110 "workspace_role": null
4111 }
4112 ],
4113 "invitations": [
4114 {
4115 "id": "rin_01kp3c4d5e6f7g8h9j0k1m2n3p",
4116 "repo": "flagon-io/hello",
4117 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
4118 "invitee": "alan",
4119 "email": null,
4120 "role": "write",
4121 "invited_by": "syntaqx",
4122 "inviter_avatar": null,
4123 "status": "pending",
4124 "created_at": "2026-10-05T17:00:00.000Z",
4125 "expires_at": "2026-10-12T17:00:00.000Z"
4126 },
4127 {
4128 "id": "rin_01kp3d7e8f9g0h1j2k3m4n5p6q",
4129 "repo": "flagon-io/hello",
4130 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
4131 "invitee": null,
4132 "email": "joan@example.com",
4133 "role": "read",
4134 "invited_by": "syntaqx",
4135 "inviter_avatar": null,
4136 "status": "pending",
4137 "created_at": "2026-10-05T17:00:00.000Z",
4138 "expires_at": "2026-10-12T17:00:00.000Z"
4139 }
4140 ],
4141 "viewer_role": "admin",
4142 "can_manage": true
4143 },
4144 "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/)."
4145 },
4146 "add_collaborator": {
4147 "request": {
4148 "invitee": "ada",
4149 "role": "triage"
4150 },
4151 "response": {
4152 "result": "invited",
4153 "invitation": {
4154 "id": "rin_01kp3e9f0g1h2j3k4m5n6p7q8r",
4155 "repo": "flagon-io/hello",
4156 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
4157 "invitee": "ada",
4158 "email": null,
4159 "role": "triage",
4160 "invited_by": "syntaqx",
4161 "inviter_avatar": null,
4162 "status": "pending",
4163 "created_at": "2026-10-05T17:00:00.000Z",
4164 "expires_at": "2026-10-12T17:00:00.000Z"
4165 }
4166 },
4167 "notes": "`invitee` is a username or an email address. A member of the workspace answers `{\"result\": \"granted\", \"collaborator\": {…}}` with the role already given, shown as list_collaborators shows a person. Anyone else answers `{\"result\": \"invited\", \"invitation\": {…}}`: the invitation is emailed and waits 7 days, and the role is theirs once they accept it. An email address without an account gets an invitation with `email` set and `invitee` null, and an invite that makes the account and accepts in one step. Refused with `404` when no account has that username, `409` when they already have a role of their own or a pending invitation (change it with update_collaborator), and `403` without the Admin role, from an agent's or a workspace's token, or when the person does not meet what the workspace asks of everyone with access. The `repo.collaborator_added` webhook event is sent once they have the role. See [Access and roles](/guides/access-and-roles/)."
4168 },
4169 "update_collaborator": {
4170 "params": {
4171 "owner": "flagon-io",
4172 "name": "hello",
4173 "username": "ada"
4174 },
4175 "request": {
4176 "role": "write"
4177 },
4178 "response": {
4179 "username": "ada",
4180 "name": "Ada Lovelace",
4181 "avatar": null,
4182 "role": "write",
4183 "source": "direct",
4184 "direct": "write",
4185 "workspace_role": null
4186 },
4187 "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/)."
4188 },
4189 "remove_collaborator": {
4190 "params": {
4191 "owner": "flagon-io",
4192 "name": "hello",
4193 "username": "ada"
4194 },
4195 "response": true,
4196 "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/)."
4197 },
4198 "get_collaborator_permission": {
4199 "params": {
4200 "owner": "flagon-io",
4201 "name": "hello",
4202 "username": "ada"
4203 },
4204 "response": {
4205 "username": "ada",
4206 "role": "triage",
4207 "source": "direct",
4208 "capabilities": [
4209 "read",
4210 "participate",
4211 "triage"
4212 ]
4213 },
4214 "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/)."
4215 },
4216 "list_repo_invitations": {
4217 "response": [
4218 {
4219 "id": "rin_01kp3c4d5e6f7g8h9j0k1m2n3p",
4220 "repo": "flagon-io/hello",
4221 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
4222 "invitee": "alan",
4223 "email": null,
4224 "role": "write",
4225 "invited_by": "syntaqx",
4226 "inviter_avatar": null,
4227 "status": "pending",
4228 "created_at": "2026-10-05T17:00:00.000Z",
4229 "expires_at": "2026-10-12T17:00:00.000Z"
4230 },
4231 {
4232 "id": "rin_01kp3d7e8f9g0h1j2k3m4n5p6q",
4233 "repo": "flagon-io/hello",
4234 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
4235 "invitee": null,
4236 "email": "joan@example.com",
4237 "role": "read",
4238 "invited_by": "syntaqx",
4239 "inviter_avatar": null,
4240 "status": "pending",
4241 "created_at": "2026-10-05T17:00:00.000Z",
4242 "expires_at": "2026-10-12T17:00:00.000Z"
4243 }
4244 ],
4245 "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/)."
4246 },
4247 "revoke_repo_invitation": {
4248 "params": {
4249 "owner": "flagon-io",
4250 "name": "hello",
4251 "id": "rin_01kp3c4d5e6f7g8h9j0k1m2n3p"
4252 },
4253 "response": {
4254 "id": "rin_01kp3c4d5e6f7g8h9j0k1m2n3p",
4255 "repo": "flagon-io/hello",
4256 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
4257 "invitee": "alan",
4258 "email": null,
4259 "role": "write",
4260 "invited_by": "syntaqx",
4261 "inviter_avatar": null,
4262 "status": "revoked",
4263 "created_at": "2026-10-05T17:00:00.000Z",
4264 "expires_at": "2026-10-12T17:00:00.000Z"
4265 },
4266 "notes": "`404` when there is no pending invitation with that id on this repository."
4267 },
4268 "list_my_repo_invitations": {
4269 "response": [
4270 {
4271 "id": "rin_01kp3e9f0g1h2j3k4m5n6p7q8r",
4272 "repo": "flagon-io/hello",
4273 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
4274 "invitee": "ada",
4275 "email": null,
4276 "role": "triage",
4277 "invited_by": "syntaqx",
4278 "inviter_avatar": null,
4279 "status": "pending",
4280 "created_at": "2026-10-05T17:00:00.000Z",
4281 "expires_at": "2026-10-12T17:00:00.000Z"
4282 }
4283 ],
4284 "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."
4285 },
4286 "accept_repo_invitation": {
4287 "params": {
4288 "id": "rin_01kp3e9f0g1h2j3k4m5n6p7q8r"
4289 },
4290 "response": {
4291 "id": "rin_01kp3e9f0g1h2j3k4m5n6p7q8r",
4292 "repo": "flagon-io/hello",
4293 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
4294 "invitee": "ada",
4295 "email": null,
4296 "role": "triage",
4297 "invited_by": "syntaqx",
4298 "inviter_avatar": null,
4299 "status": "accepted",
4300 "created_at": "2026-10-05T17:00:00.000Z",
4301 "expires_at": "2026-10-12T17:00:00.000Z"
4302 },
4303 "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/)."
4304 },
4305 "decline_repo_invitation": {
4306 "params": {
4307 "id": "rin_01kp3e9f0g1h2j3k4m5n6p7q8r"
4308 },
4309 "response": {
4310 "id": "rin_01kp3e9f0g1h2j3k4m5n6p7q8r",
4311 "repo": "flagon-io/hello",
4312 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
4313 "invitee": "ada",
4314 "email": null,
4315 "role": "triage",
4316 "invited_by": "syntaqx",
4317 "inviter_avatar": null,
4318 "status": "declined",
4319 "created_at": "2026-10-05T17:00:00.000Z",
4320 "expires_at": "2026-10-12T17:00:00.000Z"
4321 },
4322 "notes": "`404` when you have no pending invitation with that id."
4323 },
4324 "set_base_permission": {
4325 "params": {
4326 "workspace": "flagon-io"
4327 },
4328 "request": {
4329 "base_permission": "read"
4330 },
4331 "response": {
4332 "workspace": "flagon-io",
4333 "base_permission": "read"
4334 },
4335 "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/)."
4336 },
4337 "list_outside_collaborators": {
4338 "params": {
4339 "workspace": "flagon-io"
4340 },
4341 "response": [
4342 {
4343 "username": "ada",
4344 "name": "Ada Lovelace",
4345 "avatar": null,
4346 "repos": [
4347 {
4348 "repo": "flagon-io/docs",
4349 "role": "write"
4350 },
4351 {
4352 "repo": "flagon-io/hello",
4353 "role": "triage"
4354 }
4355 ]
4356 }
4357 ],
4358 "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/)."
4359 },
4360 "list_teams": {
4361 "params": {
4362 "workspace": "flagon-io"
4363 },
4364 "query": {
4365 "q": "back"
4366 },
4367 "response": [
4368 {
4369 "id": "team_01m52k8d3f7h1k5n9r3v7z1c5g",
4370 "workspace": "flagon-io",
4371 "slug": "backend",
4372 "name": "Backend",
4373 "description": "The API and the services behind it.",
4374 "visibility": "visible",
4375 "parent": {
4376 "slug": "engineering",
4377 "name": "Engineering"
4378 },
4379 "notify": true,
4380 "review_assignment": {
4381 "enabled": false,
4382 "algorithm": "round_robin",
4383 "count": 1,
4384 "skip_busy": false,
4385 "busy_at": 5,
4386 "include_child_teams": false,
4387 "excluded": [],
4388 "notify_team": false
4389 },
4390 "members_count": 4,
4391 "repos_count": 2,
4392 "child_teams_count": 1,
4393 "viewer_role": "maintainer",
4394 "can_manage": true,
4395 "created_at": "2026-10-06T15:02:11.480Z",
4396 "updated_at": "2026-10-06T15:02:11.480Z"
4397 }
4398 ],
4399 "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/)."
4400 },
4401 "create_team": {
4402 "params": {
4403 "workspace": "flagon-io"
4404 },
4405 "request": {
4406 "name": "Backend",
4407 "description": "The API and the services behind it.",
4408 "visibility": "visible",
4409 "parent": "engineering",
4410 "members": [
4411 "ana"
4412 ]
4413 },
4414 "response": {
4415 "id": "team_01m52k8d3f7h1k5n9r3v7z1c5g",
4416 "workspace": "flagon-io",
4417 "slug": "backend",
4418 "name": "Backend",
4419 "description": "The API and the services behind it.",
4420 "visibility": "visible",
4421 "parent": {
4422 "slug": "engineering",
4423 "name": "Engineering"
4424 },
4425 "notify": true,
4426 "review_assignment": {
4427 "enabled": false,
4428 "algorithm": "round_robin",
4429 "count": 1,
4430 "skip_busy": false,
4431 "busy_at": 5,
4432 "include_child_teams": false,
4433 "excluded": [],
4434 "notify_team": false
4435 },
4436 "members_count": 2,
4437 "repos_count": 0,
4438 "child_teams_count": 0,
4439 "viewer_role": "maintainer",
4440 "can_manage": true,
4441 "created_at": "2026-10-06T15:02:11.480Z",
4442 "updated_at": "2026-10-06T15:02:11.480Z"
4443 },
4444 "notes": "You become the team's maintainer. `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/)."
4445 },
4446 "get_team": {
4447 "params": {
4448 "workspace": "flagon-io",
4449 "team": "backend"
4450 },
4451 "response": {
4452 "id": "team_01m52k8d3f7h1k5n9r3v7z1c5g",
4453 "workspace": "flagon-io",
4454 "slug": "backend",
4455 "name": "Backend",
4456 "description": "The API and the services behind it.",
4457 "visibility": "visible",
4458 "parent": {
4459 "slug": "engineering",
4460 "name": "Engineering"
4461 },
4462 "notify": true,
4463 "review_assignment": {
4464 "enabled": false,
4465 "algorithm": "round_robin",
4466 "count": 1,
4467 "skip_busy": false,
4468 "busy_at": 5,
4469 "include_child_teams": false,
4470 "excluded": [],
4471 "notify_team": false
4472 },
4473 "members_count": 4,
4474 "repos_count": 2,
4475 "child_teams_count": 1,
4476 "viewer_role": "maintainer",
4477 "can_manage": true,
4478 "created_at": "2026-10-06T15:02:11.480Z",
4479 "updated_at": "2026-10-06T15:02:11.480Z"
4480 },
4481 "notes": "`404` for a team that does not exist, or a secret one you are not in, unless you are an owner."
4482 },
4483 "update_team": {
4484 "params": {
4485 "workspace": "flagon-io",
4486 "team": "backend"
4487 },
4488 "request": {
4489 "description": "The API, the services behind it, and their on-call.",
4490 "visibility": "secret",
4491 "parent": ""
4492 },
4493 "response": {
4494 "id": "team_01m52k8d3f7h1k5n9r3v7z1c5g",
4495 "workspace": "flagon-io",
4496 "slug": "backend",
4497 "name": "Backend",
4498 "description": "The API, the services behind it, and their on-call.",
4499 "visibility": "secret",
4500 "parent": null,
4501 "notify": true,
4502 "review_assignment": {
4503 "enabled": false,
4504 "algorithm": "round_robin",
4505 "count": 1,
4506 "skip_busy": false,
4507 "busy_at": 5,
4508 "include_child_teams": false,
4509 "excluded": [],
4510 "notify_team": false
4511 },
4512 "members_count": 4,
4513 "repos_count": 2,
4514 "child_teams_count": 1,
4515 "viewer_role": "maintainer",
4516 "can_manage": true,
4517 "created_at": "2026-10-06T15:02:11.480Z",
4518 "updated_at": "2026-10-07T09:41:52.006Z"
4519 },
4520 "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)."
4521 },
4522 "delete_team": {
4523 "params": {
4524 "workspace": "flagon-io",
4525 "team": "backend"
4526 },
4527 "response": true,
4528 "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)."
4529 },
4530 "list_team_members": {
4531 "params": {
4532 "workspace": "flagon-io",
4533 "team": "backend"
4534 },
4535 "query": {
4536 "include_child_teams": "true"
4537 },
4538 "response": [
4539 {
4540 "username": "syntaqx",
4541 "name": "Chase Pierce",
4542 "avatar": null,
4543 "role": "maintainer",
4544 "via": null
4545 },
4546 {
4547 "username": "ana",
4548 "name": "Ana Lima",
4549 "avatar": null,
4550 "role": "member",
4551 "via": null
4552 },
4553 {
4554 "username": "bo",
4555 "name": null,
4556 "avatar": null,
4557 "role": "member",
4558 "via": "payments"
4559 }
4560 ],
4561 "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."
4562 },
4563 "set_team_member": {
4564 "params": {
4565 "workspace": "flagon-io",
4566 "team": "backend",
4567 "username": "ana"
4568 },
4569 "request": {
4570 "role": "maintainer"
4571 },
4572 "response": {
4573 "username": "ana",
4574 "name": "Ana Lima",
4575 "avatar": null,
4576 "role": "maintainer",
4577 "via": null
4578 },
4579 "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)."
4580 },
4581 "remove_team_member": {
4582 "params": {
4583 "workspace": "flagon-io",
4584 "team": "backend",
4585 "username": "ana"
4586 },
4587 "response": true,
4588 "notes": "Anyone may take themselves out of a team. Leaving the workspace takes a person out of all its teams."
4589 },
4590 "list_child_teams": {
4591 "params": {
4592 "workspace": "flagon-io",
4593 "team": "engineering"
4594 },
4595 "response": [
4596 {
4597 "id": "team_01m52k8d3f7h1k5n9r3v7z1c5g",
4598 "workspace": "flagon-io",
4599 "slug": "backend",
4600 "name": "Backend",
4601 "description": "The API and the services behind it.",
4602 "visibility": "visible",
4603 "parent": {
4604 "slug": "engineering",
4605 "name": "Engineering"
4606 },
4607 "notify": true,
4608 "review_assignment": {
4609 "enabled": false,
4610 "algorithm": "round_robin",
4611 "count": 1,
4612 "skip_busy": false,
4613 "busy_at": 5,
4614 "include_child_teams": false,
4615 "excluded": [],
4616 "notify_team": false
4617 },
4618 "members_count": 4,
4619 "repos_count": 2,
4620 "child_teams_count": 0,
4621 "viewer_role": "maintainer",
4622 "can_manage": true,
4623 "created_at": "2026-10-06T15:02:11.480Z",
4624 "updated_at": "2026-10-06T15:02:11.480Z"
4625 }
4626 ],
4627 "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."
4628 },
4629 "list_team_repos": {
4630 "params": {
4631 "workspace": "flagon-io",
4632 "team": "backend"
4633 },
4634 "response": [
4635 {
4636 "repo": "flagon-io/hello",
4637 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
4638 "role": "write",
4639 "inherited_from": null
4640 },
4641 {
4642 "repo": "flagon-io/docs",
4643 "repo_id": "rep_01m3m5r2a8c4e6g8j0m2p4r6t8",
4644 "role": "read",
4645 "inherited_from": "engineering"
4646 }
4647 ],
4648 "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."
4649 },
4650 "set_team_repo": {
4651 "params": {
4652 "workspace": "flagon-io",
4653 "team": "backend",
4654 "repo": "hello"
4655 },
4656 "request": {
4657 "role": "maintain"
4658 },
4659 "response": {
4660 "repo": "flagon-io/hello",
4661 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
4662 "role": "maintain",
4663 "inherited_from": null
4664 },
4665 "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/)."
4666 },
4667 "remove_team_repo": {
4668 "params": {
4669 "workspace": "flagon-io",
4670 "team": "backend",
4671 "repo": "hello"
4672 },
4673 "response": true,
4674 "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."
4675 },
4676 "set_team_review_assignment": {
4677 "params": {
4678 "workspace": "flagon-io",
4679 "team": "backend"
4680 },
4681 "request": {
4682 "enabled": true,
4683 "algorithm": "load_balance",
4684 "count": 2,
4685 "skip_busy": true,
4686 "busy_at": 5,
4687 "excluded": [
4688 "syntaqx"
4689 ]
4690 },
4691 "response": {
4692 "id": "team_01m52k8d3f7h1k5n9r3v7z1c5g",
4693 "workspace": "flagon-io",
4694 "slug": "backend",
4695 "name": "Backend",
4696 "description": "The API and the services behind it.",
4697 "visibility": "visible",
4698 "parent": {
4699 "slug": "engineering",
4700 "name": "Engineering"
4701 },
4702 "notify": true,
4703 "review_assignment": {
4704 "enabled": true,
4705 "algorithm": "load_balance",
4706 "count": 2,
4707 "skip_busy": true,
4708 "busy_at": 5,
4709 "include_child_teams": false,
4710 "excluded": [
4711 "syntaqx"
4712 ],
4713 "notify_team": false
4714 },
4715 "members_count": 4,
4716 "repos_count": 2,
4717 "child_teams_count": 1,
4718 "viewer_role": "maintainer",
4719 "can_manage": true,
4720 "created_at": "2026-10-06T15:02:11.480Z",
4721 "updated_at": "2026-10-07T09:44:03.512Z"
4722 },
4723 "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/)."
4724 },
4725 "list_user_teams": {
4726 "params": {
4727 "workspace": "flagon-io",
4728 "username": "ana"
4729 },
4730 "response": [
4731 {
4732 "id": "team_01m52k8d3f7h1k5n9r3v7z1c5g",
4733 "workspace": "flagon-io",
4734 "slug": "backend",
4735 "name": "Backend",
4736 "description": "The API and the services behind it.",
4737 "visibility": "visible",
4738 "parent": {
4739 "slug": "engineering",
4740 "name": "Engineering"
4741 },
4742 "notify": true,
4743 "review_assignment": {
4744 "enabled": false,
4745 "algorithm": "round_robin",
4746 "count": 1,
4747 "skip_busy": false,
4748 "busy_at": 5,
4749 "include_child_teams": false,
4750 "excluded": [],
4751 "notify_team": false
4752 },
4753 "members_count": 4,
4754 "repos_count": 2,
4755 "child_teams_count": 1,
4756 "viewer_role": null,
4757 "can_manage": false,
4758 "created_at": "2026-10-06T15:02:11.480Z",
4759 "updated_at": "2026-10-06T15:02:11.480Z"
4760 }
4761 ],
4762 "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."
4763 },
4764 "list_security_alerts": {
4765 "params": {
4766 "owner": "flagon-io",
4767 "name": "hello"
4768 },
4769 "query": {
4770 "state": "open"
4771 },
4772 "response": [
4773 {
4774 "kind": "secret",
4775 "id": "sec_01kp4a7b2c3d4e5f6g7h8j9k0m",
4776 "state": "dismissed",
4777 "secret_type": "aws_access_key",
4778 "label": "an AWS access key",
4779 "path": "test/fixtures/aws.env",
4780 "line": 3,
4781 "commit": "9f2c1e04b7d3a8e6f5c2b1a0d9e8f7c6b5a4d3e2",
4782 "preview": "AKIA…MPLE",
4783 "status": "allowed",
4784 "source": "history",
4785 "test_value": "the documented example key",
4786 "found_by": null,
4787 "found_at": "2026-10-01T12:00:00.000Z",
4788 "dismissed_reason": "used_in_tests",
4789 "dismissed_comment": "Only in the test fixtures.",
4790 "dismissed_by": "syntaqx",
4791 "dismissed_at": "2026-10-02T09:15:00.000Z"
4792 },
4793 {
4794 "kind": "dependency",
4795 "id": "vul_01kp4b8c3d4e5f6g7h8j9k0m1n",
4796 "state": "open",
4797 "ecosystem": "npm",
4798 "package": "lodash",
4799 "version": "4.17.20",
4800 "manifest": "package-lock.json",
4801 "advisory": "GHSA-35jh-r3h4-6jhm",
4802 "osv_id": "GHSA-35jh-r3h4-6jhm",
4803 "summary": "Command Injection in lodash",
4804 "severity": "high",
4805 "fixed_version": "4.17.21",
4806 "fixed_at": null,
4807 "update": {
4808 "state": "open",
4809 "target": "4.17.21",
4810 "branch": "g1t/security/lodash-4.17.21",
4811 "pull": 42,
4812 "issue": null,
4813 "error": null,
4814 "updated_at": "2026-10-01T12:20:00.000Z"
4815 },
4816 "found_at": "2026-10-01T12:00:00.000Z",
4817 "dismissed_reason": null,
4818 "dismissed_comment": null,
4819 "dismissed_by": null,
4820 "dismissed_at": null
4821 }
4822 ],
4823 "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/)."
4824 },
4825 "dismiss_security_alert": {
4826 "params": {
4827 "owner": "flagon-io",
4828 "name": "hello",
4829 "id": "vul_01kp4b8c3d4e5f6g7h8j9k0m1n"
4830 },
4831 "request": {
4832 "reason": "tolerable_risk",
4833 "comment": "Only the build uses it, on trusted input."
4834 },
4835 "response": {
4836 "kind": "dependency",
4837 "id": "vul_01kp4b8c3d4e5f6g7h8j9k0m1n",
4838 "state": "dismissed",
4839 "ecosystem": "npm",
4840 "package": "lodash",
4841 "version": "4.17.20",
4842 "manifest": "package-lock.json",
4843 "advisory": "GHSA-35jh-r3h4-6jhm",
4844 "osv_id": "GHSA-35jh-r3h4-6jhm",
4845 "summary": "Command Injection in lodash",
4846 "severity": "high",
4847 "fixed_version": "4.17.21",
4848 "fixed_at": null,
4849 "update": {
4850 "state": "open",
4851 "target": "4.17.21",
4852 "branch": "g1t/security/lodash-4.17.21",
4853 "pull": 42,
4854 "issue": null,
4855 "error": null,
4856 "updated_at": "2026-10-01T12:20:00.000Z"
4857 },
4858 "found_at": "2026-10-01T12:00:00.000Z",
4859 "dismissed_reason": "tolerable_risk",
4860 "dismissed_comment": "Only the build uses it, on trusted input.",
4861 "dismissed_by": "syntaqx",
4862 "dismissed_at": "2026-10-06T10:00:00.000Z"
4863 },
4864 "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."
4865 },
4866 "reopen_security_alert": {
4867 "params": {
4868 "owner": "flagon-io",
4869 "name": "hello",
4870 "id": "sec_01kp4a7b2c3d4e5f6g7h8j9k0m"
4871 },
4872 "response": {
4873 "kind": "secret",
4874 "id": "sec_01kp4a7b2c3d4e5f6g7h8j9k0m",
4875 "state": "open",
4876 "secret_type": "aws_access_key",
4877 "label": "an AWS access key",
4878 "path": "test/fixtures/aws.env",
4879 "line": 3,
4880 "commit": "9f2c1e04b7d3a8e6f5c2b1a0d9e8f7c6b5a4d3e2",
4881 "preview": "AKIA…MPLE",
4882 "status": "open",
4883 "source": "history",
4884 "test_value": "the documented example key",
4885 "found_by": null,
4886 "found_at": "2026-10-01T12:00:00.000Z",
4887 "dismissed_reason": null,
4888 "dismissed_comment": null,
4889 "dismissed_by": null,
4890 "dismissed_at": null
4891 },
4892 "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."
4893 },
4894 "list_notifications": {
4895 "query": {
4896 "participating": "true"
4897 },
4898 "response": {
4899 "items": [
4900 {
4901 "id": "ntf_01kp7m2q3r4s5t6v7w8x9y0z1a",
4902 "reason": "review_requested",
4903 "severity": "warning",
4904 "title": "ada asked you to review flagon-io/hello#14",
4905 "body": "Add a greeting to the README",
4906 "event": "pull.review_requested",
4907 "repo": "flagon-io/hello",
4908 "workspace": "flagon-io",
4909 "subject": "pull",
4910 "number": 14,
4911 "url": "/flagon-io/hello/pull/14",
4912 "actor": "ada",
4913 "count": 3,
4914 "created_at": "2026-10-06T15:02:11.000Z",
4915 "updated_at": "2026-10-07T09:41:30.000Z",
4916 "read_at": null,
4917 "done_at": null,
4918 "saved": false,
4919 "snoozed_until": null
4920 },
4921 {
4922 "id": "ntf_01kp7k9a8b7c6d5e4f3g2h1j0k",
4923 "reason": "ci_activity",
4924 "severity": "error",
4925 "title": "Production of hello failed to deploy",
4926 "body": "The build failed: npm run build exited with 1.",
4927 "event": "deployment.failed",
4928 "repo": "flagon-io/hello",
4929 "workspace": "flagon-io",
4930 "subject": "deploy",
4931 "number": null,
4932 "url": "/flagon-io/hello/deployments/dpl_01kp7k8z7y6x5w4v3t2s1r0q9p",
4933 "actor": "syntaqx",
4934 "count": 1,
4935 "created_at": "2026-10-07T08:12:40.000Z",
4936 "updated_at": "2026-10-07T08:12:40.000Z",
4937 "read_at": null,
4938 "done_at": null,
4939 "saved": false,
4940 "snoozed_until": null
4941 }
4942 ],
4943 "next": null
4944 },
4945 "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."
4946 },
4947 "list_repo_notifications": {
4948 "params": {
4949 "owner": "flagon-io",
4950 "name": "hello"
4951 },
4952 "query": {
4953 "all": "true"
4954 },
4955 "response": {
4956 "items": [
4957 {
4958 "id": "ntf_01kp7m2q3r4s5t6v7w8x9y0z1a",
4959 "reason": "review_requested",
4960 "severity": "warning",
4961 "title": "ada asked you to review flagon-io/hello#14",
4962 "body": "Add a greeting to the README",
4963 "event": "pull.review_requested",
4964 "repo": "flagon-io/hello",
4965 "workspace": "flagon-io",
4966 "subject": "pull",
4967 "number": 14,
4968 "url": "/flagon-io/hello/pull/14",
4969 "actor": "ada",
4970 "count": 3,
4971 "created_at": "2026-10-06T15:02:11.000Z",
4972 "updated_at": "2026-10-07T09:41:30.000Z",
4973 "read_at": "2026-10-07T09:50:00.000Z",
4974 "done_at": null,
4975 "saved": false,
4976 "snoozed_until": null
4977 },
4978 {
4979 "id": "ntf_01kp7k9a8b7c6d5e4f3g2h1j0k",
4980 "reason": "ci_activity",
4981 "severity": "error",
4982 "title": "Production of hello failed to deploy",
4983 "body": "The build failed: npm run build exited with 1.",
4984 "event": "deployment.failed",
4985 "repo": "flagon-io/hello",
4986 "workspace": "flagon-io",
4987 "subject": "deploy",
4988 "number": null,
4989 "url": "/flagon-io/hello/deployments/dpl_01kp7k8z7y6x5w4v3t2s1r0q9p",
4990 "actor": "syntaqx",
4991 "count": 1,
4992 "created_at": "2026-10-07T08:12:40.000Z",
4993 "updated_at": "2026-10-07T08:12:40.000Z",
4994 "read_at": null,
4995 "done_at": null,
4996 "saved": false,
4997 "snoozed_until": null
4998 }
4999 ],
5000 "next": "ntf_01kp7k9a8b7c6d5e4f3g2h1j0k"
5001 },
5002 "notes": "The same as `GET /notifications`, for one repository you can read."
5003 },
5004 "mark_notifications_read": {
5005 "request": {
5006 "last_read_at": "2026-10-07T10:00:00Z"
5007 },
5008 "response": {
5009 "marked": 12,
5010 "last_read_at": "2026-10-07T10:00:00.000Z"
5011 },
5012 "notes": "Threads with activity after `last_read_at` stay unread, so send the time you last listed them."
5013 },
5014 "mark_repo_notifications_read": {
5015 "params": {
5016 "owner": "flagon-io",
5017 "name": "hello"
5018 },
5019 "request": {},
5020 "response": {
5021 "marked": 3,
5022 "last_read_at": "2026-10-07T10:02:41.512Z"
5023 }
5024 },
5025 "get_notification_thread": {
5026 "params": {
5027 "id": "ntf_01kp7m2q3r4s5t6v7w8x9y0z1a"
5028 },
5029 "response": {
5030 "id": "ntf_01kp7m2q3r4s5t6v7w8x9y0z1a",
5031 "reason": "review_requested",
5032 "severity": "warning",
5033 "title": "ada asked you to review flagon-io/hello#14",
5034 "body": "Add a greeting to the README",
5035 "event": "pull.review_requested",
5036 "repo": "flagon-io/hello",
5037 "workspace": "flagon-io",
5038 "subject": "pull",
5039 "number": 14,
5040 "url": "/flagon-io/hello/pull/14",
5041 "actor": "ada",
5042 "count": 3,
5043 "created_at": "2026-10-06T15:02:11.000Z",
5044 "updated_at": "2026-10-07T09:41:30.000Z",
5045 "read_at": null,
5046 "done_at": null,
5047 "saved": false,
5048 "snoozed_until": null,
5049 "activity": [
5050 {
5051 "reason": "review_requested",
5052 "severity": "warning",
5053 "title": "ada asked you to review flagon-io/hello#14",
5054 "body": "Add a greeting to the README",
5055 "event": "pull.review_requested",
5056 "actor": "ada",
5057 "created_at": "2026-10-07T09:41:30.000Z"
5058 },
5059 {
5060 "reason": "comment",
5061 "severity": "info",
5062 "title": "ada commented on flagon-io/hello#14",
5063 "body": "Pushed the fix for the heading.",
5064 "event": "comment.created",
5065 "actor": "ada",
5066 "created_at": "2026-10-06T18:20:02.000Z"
5067 },
5068 {
5069 "reason": "comment",
5070 "severity": "info",
5071 "title": "g1t commented on flagon-io/hello#14",
5072 "body": "The heading level is off by one.",
5073 "event": "comment.created",
5074 "actor": "g1t",
5075 "created_at": "2026-10-06T15:02:11.000Z"
5076 }
5077 ],
5078 "subscription": {
5079 "subscribed": true,
5080 "ignored": false,
5081 "reason": "review_requested",
5082 "repo": "flagon-io/hello",
5083 "number": 14,
5084 "updated_at": null
5085 }
5086 },
5087 "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."
5088 },
5089 "mark_thread_read": {
5090 "params": {
5091 "id": "ntf_01kp7m2q3r4s5t6v7w8x9y0z1a"
5092 },
5093 "request": {},
5094 "response": {
5095 "id": "ntf_01kp7m2q3r4s5t6v7w8x9y0z1a",
5096 "reason": "review_requested",
5097 "severity": "warning",
5098 "title": "ada asked you to review flagon-io/hello#14",
5099 "body": "Add a greeting to the README",
5100 "event": "pull.review_requested",
5101 "repo": "flagon-io/hello",
5102 "workspace": "flagon-io",
5103 "subject": "pull",
5104 "number": 14,
5105 "url": "/flagon-io/hello/pull/14",
5106 "actor": "ada",
5107 "count": 3,
5108 "created_at": "2026-10-06T15:02:11.000Z",
5109 "updated_at": "2026-10-07T09:41:30.000Z",
5110 "read_at": "2026-10-07T10:03:00.000Z",
5111 "done_at": null,
5112 "saved": false,
5113 "snoozed_until": null,
5114 "activity": [
5115 {
5116 "reason": "review_requested",
5117 "severity": "warning",
5118 "title": "ada asked you to review flagon-io/hello#14",
5119 "body": "Add a greeting to the README",
5120 "event": "pull.review_requested",
5121 "actor": "ada",
5122 "created_at": "2026-10-07T09:41:30.000Z"
5123 },
5124 {
5125 "reason": "comment",
5126 "severity": "info",
5127 "title": "ada commented on flagon-io/hello#14",
5128 "body": "Pushed the fix for the heading.",
5129 "event": "comment.created",
5130 "actor": "ada",
5131 "created_at": "2026-10-06T18:20:02.000Z"
5132 },
5133 {
5134 "reason": "comment",
5135 "severity": "info",
5136 "title": "g1t commented on flagon-io/hello#14",
5137 "body": "The heading level is off by one.",
5138 "event": "comment.created",
5139 "actor": "g1t",
5140 "created_at": "2026-10-06T15:02:11.000Z"
5141 }
5142 ],
5143 "subscription": {
5144 "subscribed": true,
5145 "ignored": false,
5146 "reason": "review_requested",
5147 "repo": "flagon-io/hello",
5148 "number": 14,
5149 "updated_at": null
5150 }
5151 }
5152 },
5153 "mark_thread_done": {
5154 "params": {
5155 "id": "ntf_01kp7m2q3r4s5t6v7w8x9y0z1a"
5156 },
5157 "response": {
5158 "id": "ntf_01kp7m2q3r4s5t6v7w8x9y0z1a",
5159 "reason": "review_requested",
5160 "severity": "warning",
5161 "title": "ada asked you to review flagon-io/hello#14",
5162 "body": "Add a greeting to the README",
5163 "event": "pull.review_requested",
5164 "repo": "flagon-io/hello",
5165 "workspace": "flagon-io",
5166 "subject": "pull",
5167 "number": 14,
5168 "url": "/flagon-io/hello/pull/14",
5169 "actor": "ada",
5170 "count": 3,
5171 "created_at": "2026-10-06T15:02:11.000Z",
5172 "updated_at": "2026-10-07T09:41:30.000Z",
5173 "read_at": "2026-10-07T10:03:00.000Z",
5174 "done_at": "2026-10-07T10:03:00.000Z",
5175 "saved": false,
5176 "snoozed_until": null,
5177 "activity": [
5178 {
5179 "reason": "review_requested",
5180 "severity": "warning",
5181 "title": "ada asked you to review flagon-io/hello#14",
5182 "body": "Add a greeting to the README",
5183 "event": "pull.review_requested",
5184 "actor": "ada",
5185 "created_at": "2026-10-07T09:41:30.000Z"
5186 },
5187 {
5188 "reason": "comment",
5189 "severity": "info",
5190 "title": "ada commented on flagon-io/hello#14",
5191 "body": "Pushed the fix for the heading.",
5192 "event": "comment.created",
5193 "actor": "ada",
5194 "created_at": "2026-10-06T18:20:02.000Z"
5195 },
5196 {
5197 "reason": "comment",
5198 "severity": "info",
5199 "title": "g1t commented on flagon-io/hello#14",
5200 "body": "The heading level is off by one.",
5201 "event": "comment.created",
5202 "actor": "g1t",
5203 "created_at": "2026-10-06T15:02:11.000Z"
5204 }
5205 ],
5206 "subscription": {
5207 "subscribed": true,
5208 "ignored": false,
5209 "reason": "review_requested",
5210 "repo": "flagon-io/hello",
5211 "number": 14,
5212 "updated_at": null
5213 }
5214 },
5215 "notes": "New activity on a done thread brings it back to the inbox, unread."
5216 },
5217 "save_thread": {
5218 "params": {
5219 "id": "ntf_01kp7m2q3r4s5t6v7w8x9y0z1a"
5220 },
5221 "request": {},
5222 "response": {
5223 "id": "ntf_01kp7m2q3r4s5t6v7w8x9y0z1a",
5224 "reason": "review_requested",
5225 "severity": "warning",
5226 "title": "ada asked you to review flagon-io/hello#14",
5227 "body": "Add a greeting to the README",
5228 "event": "pull.review_requested",
5229 "repo": "flagon-io/hello",
5230 "workspace": "flagon-io",
5231 "subject": "pull",
5232 "number": 14,
5233 "url": "/flagon-io/hello/pull/14",
5234 "actor": "ada",
5235 "count": 3,
5236 "created_at": "2026-10-06T15:02:11.000Z",
5237 "updated_at": "2026-10-07T09:41:30.000Z",
5238 "read_at": null,
5239 "done_at": null,
5240 "saved": true,
5241 "snoozed_until": null,
5242 "activity": [
5243 {
5244 "reason": "review_requested",
5245 "severity": "warning",
5246 "title": "ada asked you to review flagon-io/hello#14",
5247 "body": "Add a greeting to the README",
5248 "event": "pull.review_requested",
5249 "actor": "ada",
5250 "created_at": "2026-10-07T09:41:30.000Z"
5251 },
5252 {
5253 "reason": "comment",
5254 "severity": "info",
5255 "title": "ada commented on flagon-io/hello#14",
5256 "body": "Pushed the fix for the heading.",
5257 "event": "comment.created",
5258 "actor": "ada",
5259 "created_at": "2026-10-06T18:20:02.000Z"
5260 },
5261 {
5262 "reason": "comment",
5263 "severity": "info",
5264 "title": "g1t commented on flagon-io/hello#14",
5265 "body": "The heading level is off by one.",
5266 "event": "comment.created",
5267 "actor": "g1t",
5268 "created_at": "2026-10-06T15:02:11.000Z"
5269 }
5270 ],
5271 "subscription": {
5272 "subscribed": true,
5273 "ignored": false,
5274 "reason": "review_requested",
5275 "repo": "flagon-io/hello",
5276 "number": 14,
5277 "updated_at": null
5278 }
5279 }
5280 },
5281 "unsave_thread": {
5282 "params": {
5283 "id": "ntf_01kp7m2q3r4s5t6v7w8x9y0z1a"
5284 },
5285 "response": {
5286 "id": "ntf_01kp7m2q3r4s5t6v7w8x9y0z1a",
5287 "reason": "review_requested",
5288 "severity": "warning",
5289 "title": "ada asked you to review flagon-io/hello#14",
5290 "body": "Add a greeting to the README",
5291 "event": "pull.review_requested",
5292 "repo": "flagon-io/hello",
5293 "workspace": "flagon-io",
5294 "subject": "pull",
5295 "number": 14,
5296 "url": "/flagon-io/hello/pull/14",
5297 "actor": "ada",
5298 "count": 3,
5299 "created_at": "2026-10-06T15:02:11.000Z",
5300 "updated_at": "2026-10-07T09:41:30.000Z",
5301 "read_at": null,
5302 "done_at": null,
5303 "saved": false,
5304 "snoozed_until": null,
5305 "activity": [
5306 {
5307 "reason": "review_requested",
5308 "severity": "warning",
5309 "title": "ada asked you to review flagon-io/hello#14",
5310 "body": "Add a greeting to the README",
5311 "event": "pull.review_requested",
5312 "actor": "ada",
5313 "created_at": "2026-10-07T09:41:30.000Z"
5314 },
5315 {
5316 "reason": "comment",
5317 "severity": "info",
5318 "title": "ada commented on flagon-io/hello#14",
5319 "body": "Pushed the fix for the heading.",
5320 "event": "comment.created",
5321 "actor": "ada",
5322 "created_at": "2026-10-06T18:20:02.000Z"
5323 },
5324 {
5325 "reason": "comment",
5326 "severity": "info",
5327 "title": "g1t commented on flagon-io/hello#14",
5328 "body": "The heading level is off by one.",
5329 "event": "comment.created",
5330 "actor": "g1t",
5331 "created_at": "2026-10-06T15:02:11.000Z"
5332 }
5333 ],
5334 "subscription": {
5335 "subscribed": true,
5336 "ignored": false,
5337 "reason": "review_requested",
5338 "repo": "flagon-io/hello",
5339 "number": 14,
5340 "updated_at": null
5341 }
5342 }
5343 },
5344 "snooze_thread": {
5345 "params": {
5346 "id": "ntf_01kp7m2q3r4s5t6v7w8x9y0z1a"
5347 },
5348 "request": {
5349 "until": "2026-10-08T09:00:00Z"
5350 },
5351 "response": {
5352 "id": "ntf_01kp7m2q3r4s5t6v7w8x9y0z1a",
5353 "reason": "review_requested",
5354 "severity": "warning",
5355 "title": "ada asked you to review flagon-io/hello#14",
5356 "body": "Add a greeting to the README",
5357 "event": "pull.review_requested",
5358 "repo": "flagon-io/hello",
5359 "workspace": "flagon-io",
5360 "subject": "pull",
5361 "number": 14,
5362 "url": "/flagon-io/hello/pull/14",
5363 "actor": "ada",
5364 "count": 3,
5365 "created_at": "2026-10-06T15:02:11.000Z",
5366 "updated_at": "2026-10-07T09:41:30.000Z",
5367 "read_at": "2026-10-07T10:03:00.000Z",
5368 "done_at": null,
5369 "saved": false,
5370 "snoozed_until": "2026-10-08T09:00:00.000Z",
5371 "activity": [
5372 {
5373 "reason": "review_requested",
5374 "severity": "warning",
5375 "title": "ada asked you to review flagon-io/hello#14",
5376 "body": "Add a greeting to the README",
5377 "event": "pull.review_requested",
5378 "actor": "ada",
5379 "created_at": "2026-10-07T09:41:30.000Z"
5380 },
5381 {
5382 "reason": "comment",
5383 "severity": "info",
5384 "title": "ada commented on flagon-io/hello#14",
5385 "body": "Pushed the fix for the heading.",
5386 "event": "comment.created",
5387 "actor": "ada",
5388 "created_at": "2026-10-06T18:20:02.000Z"
5389 },
5390 {
5391 "reason": "comment",
5392 "severity": "info",
5393 "title": "g1t commented on flagon-io/hello#14",
5394 "body": "The heading level is off by one.",
5395 "event": "comment.created",
5396 "actor": "g1t",
5397 "created_at": "2026-10-06T15:02:11.000Z"
5398 }
5399 ],
5400 "subscription": {
5401 "subscribed": true,
5402 "ignored": false,
5403 "reason": "review_requested",
5404 "repo": "flagon-io/hello",
5405 "number": 14,
5406 "updated_at": null
5407 }
5408 }
5409 },
5410 "unsnooze_thread": {
5411 "params": {
5412 "id": "ntf_01kp7m2q3r4s5t6v7w8x9y0z1a"
5413 },
5414 "response": {
5415 "id": "ntf_01kp7m2q3r4s5t6v7w8x9y0z1a",
5416 "reason": "review_requested",
5417 "severity": "warning",
5418 "title": "ada asked you to review flagon-io/hello#14",
5419 "body": "Add a greeting to the README",
5420 "event": "pull.review_requested",
5421 "repo": "flagon-io/hello",
5422 "workspace": "flagon-io",
5423 "subject": "pull",
5424 "number": 14,
5425 "url": "/flagon-io/hello/pull/14",
5426 "actor": "ada",
5427 "count": 3,
5428 "created_at": "2026-10-06T15:02:11.000Z",
5429 "updated_at": "2026-10-07T09:41:30.000Z",
5430 "read_at": "2026-10-07T10:03:00.000Z",
5431 "done_at": null,
5432 "saved": false,
5433 "snoozed_until": null,
5434 "activity": [
5435 {
5436 "reason": "review_requested",
5437 "severity": "warning",
5438 "title": "ada asked you to review flagon-io/hello#14",
5439 "body": "Add a greeting to the README",
5440 "event": "pull.review_requested",
5441 "actor": "ada",
5442 "created_at": "2026-10-07T09:41:30.000Z"
5443 },
5444 {
5445 "reason": "comment",
5446 "severity": "info",
5447 "title": "ada commented on flagon-io/hello#14",
5448 "body": "Pushed the fix for the heading.",
5449 "event": "comment.created",
5450 "actor": "ada",
5451 "created_at": "2026-10-06T18:20:02.000Z"
5452 },
5453 {
5454 "reason": "comment",
5455 "severity": "info",
5456 "title": "g1t commented on flagon-io/hello#14",
5457 "body": "The heading level is off by one.",
5458 "event": "comment.created",
5459 "actor": "g1t",
5460 "created_at": "2026-10-06T15:02:11.000Z"
5461 }
5462 ],
5463 "subscription": {
5464 "subscribed": true,
5465 "ignored": false,
5466 "reason": "review_requested",
5467 "repo": "flagon-io/hello",
5468 "number": 14,
5469 "updated_at": null
5470 }
5471 }
5472 },
5473 "get_thread_subscription": {
5474 "params": {
5475 "id": "ntf_01kp7m2q3r4s5t6v7w8x9y0z1a"
5476 },
5477 "response": {
5478 "subscribed": true,
5479 "ignored": false,
5480 "reason": "review_requested",
5481 "repo": "flagon-io/hello",
5482 "number": 14,
5483 "updated_at": null
5484 }
5485 },
5486 "set_thread_subscription": {
5487 "params": {
5488 "id": "ntf_01kp7m2q3r4s5t6v7w8x9y0z1a"
5489 },
5490 "request": {
5491 "ignored": true
5492 },
5493 "response": {
5494 "subscribed": false,
5495 "ignored": true,
5496 "reason": null,
5497 "repo": "flagon-io/hello",
5498 "number": 14,
5499 "updated_at": "2026-10-07T10:04:00.000Z"
5500 },
5501 "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 |"
5502 },
5503 "delete_thread_subscription": {
5504 "params": {
5505 "id": "ntf_01kp7m2q3r4s5t6v7w8x9y0z1a"
5506 },
5507 "response": {
5508 "subscribed": false,
5509 "ignored": false,
5510 "reason": null,
5511 "repo": "flagon-io/hello",
5512 "number": 14,
5513 "updated_at": "2026-10-07T10:04:00.000Z"
5514 }
5515 },
5516 "get_issue_subscription": {
5517 "params": {
5518 "owner": "flagon-io",
5519 "name": "hello",
5520 "number": 14
5521 },
5522 "response": {
5523 "subscribed": true,
5524 "ignored": false,
5525 "reason": "author",
5526 "repo": null,
5527 "number": 14,
5528 "updated_at": null
5529 }
5530 },
5531 "set_issue_subscription": {
5532 "params": {
5533 "owner": "flagon-io",
5534 "name": "hello",
5535 "number": 14
5536 },
5537 "request": {
5538 "subscribed": true
5539 },
5540 "response": {
5541 "subscribed": true,
5542 "ignored": false,
5543 "reason": "manual",
5544 "repo": null,
5545 "number": 14,
5546 "updated_at": "2026-10-07T10:05:00.000Z"
5547 }
5548 },
5549 "delete_issue_subscription": {
5550 "params": {
5551 "owner": "flagon-io",
5552 "name": "hello",
5553 "number": 14
5554 },
5555 "response": {
5556 "subscribed": false,
5557 "ignored": false,
5558 "reason": null,
5559 "repo": null,
5560 "number": 14,
5561 "updated_at": "2026-10-07T10:05:30.000Z"
5562 }
5563 },
5564 "get_repo_subscription": {
5565 "params": {
5566 "owner": "flagon-io",
5567 "name": "hello"
5568 },
5569 "response": {
5570 "repo": "flagon-io/hello",
5571 "level": "participating",
5572 "events": [],
5573 "subscribed": false,
5574 "ignored": false,
5575 "updated_at": null
5576 }
5577 },
5578 "set_repo_subscription": {
5579 "params": {
5580 "owner": "flagon-io",
5581 "name": "hello"
5582 },
5583 "request": {
5584 "level": "custom",
5585 "events": [
5586 "pulls",
5587 "deployments"
5588 ]
5589 },
5590 "response": {
5591 "repo": "flagon-io/hello",
5592 "level": "custom",
5593 "events": [
5594 "pulls",
5595 "deployments"
5596 ],
5597 "subscribed": true,
5598 "ignored": false,
5599 "updated_at": "2026-10-07T10:06:00.000Z"
5600 },
5601 "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`."
5602 },
5603 "delete_repo_subscription": {
5604 "params": {
5605 "owner": "flagon-io",
5606 "name": "hello"
5607 },
5608 "response": {
5609 "repo": "flagon-io/hello",
5610 "level": "participating",
5611 "events": [],
5612 "subscribed": false,
5613 "ignored": false,
5614 "updated_at": null
5615 }
5616 },
5617 "list_watched_repos": {
5618 "response": [
5619 {
5620 "repo": "flagon-io/hello",
5621 "level": "all",
5622 "events": [],
5623 "subscribed": true,
5624 "ignored": false,
5625 "updated_at": "2026-10-07T10:00:00.000Z"
5626 },
5627 {
5628 "repo": "flagon-io/docs",
5629 "level": "ignore",
5630 "events": [],
5631 "subscribed": false,
5632 "ignored": true,
5633 "updated_at": "2026-10-05T14:30:00.000Z"
5634 }
5635 ]
5636 },
5637 "get_usage": {
5638 "params": {
5639 "workspace": "flagon-io"
5640 },
5641 "query": {
5642 "from": "2026-10-01",
5643 "until": "2026-10-07",
5644 "group_by": "project"
5645 },
5646 "response": {
5647 "from": "2026-10-01",
5648 "until": "2026-10-07",
5649 "totals": {
5650 "price_micros": 48210000,
5651 "discount_micros": 0,
5652 "included_micros": 20000000,
5653 "credits_micros": 18000000,
5654 "charged_micros": 10210000,
5655 "pending_micros": 1340000,
5656 "cost_micros": 40100000
5657 },
5658 "days": [
5659 {
5660 "day": "2026-10-06",
5661 "product": "agent",
5662 "micros": 12400000
5663 },
5664 {
5665 "day": "2026-10-06",
5666 "product": "sandboxes",
5667 "micros": 2100000
5668 },
5669 {
5670 "day": "2026-10-07",
5671 "product": "agent",
5672 "micros": 9800000
5673 }
5674 ],
5675 "products": [
5676 {
5677 "key": "agent",
5678 "label": "Agent",
5679 "micros": 41000000,
5680 "meters": [
5681 {
5682 "key": "agent_models",
5683 "label": "Models",
5684 "product": "agent",
5685 "unit": "tokens",
5686 "quantity": 9120000,
5687 "micros": 41000000,
5688 "pending_micros": 0,
5689 "daily": [
5690 3100000,
5691 5200000,
5692 4400000,
5693 6000000,
5694 0,
5695 12400000,
5696 9800000
5697 ],
5698 "allowance": null,
5699 "by_project": [
5700 {
5701 "project": "flagon-io/g1t",
5702 "micros": 36000000,
5703 "quantity": 8010000
5704 },
5705 {
5706 "project": "flagon-io/hello",
5707 "micros": 5000000,
5708 "quantity": 1110000
5709 }
5710 ]
5711 }
5712 ],
5713 "features": [
5714 {
5715 "key": "runs",
5716 "label": "Runs",
5717 "micros": 33000000,
5718 "count": 14
5719 },
5720 {
5721 "key": "reviews",
5722 "label": "Reviews",
5723 "micros": 8000000,
5724 "count": 9
5725 }
5726 ]
5727 },
5728 {
5729 "key": "sandboxes",
5730 "label": "Sandboxes",
5731 "micros": 7210000,
5732 "meters": [
5733 {
5734 "key": "sandbox",
5735 "label": "Sandbox time",
5736 "product": "sandboxes",
5737 "unit": "seconds",
5738 "quantity": 41300,
5739 "micros": 7210000,
5740 "pending_micros": 0,
5741 "daily": [
5742 900000,
5743 1200000,
5744 800000,
5745 1100000,
5746 0,
5747 2100000,
5748 1110000
5749 ],
5750 "allowance": {
5751 "used": 41300,
5752 "of": 108000,
5753 "unit": "seconds"
5754 },
5755 "by_project": [
5756 {
5757 "project": "flagon-io/g1t",
5758 "micros": 7210000,
5759 "quantity": 41300
5760 }
5761 ]
5762 }
5763 ],
5764 "features": []
5765 }
5766 ],
5767 "projects": [
5768 "flagon-io/g1t",
5769 "flagon-io/hello"
5770 ],
5771 "included": {
5772 "used": 20,
5773 "of": 20,
5774 "unit": "dollars"
5775 },
5776 "discount_percent": null,
5777 "ai_credit_micros": 62000000,
5778 "credit_micros": 0,
5779 "trial_micros": null,
5780 "plan": "pro",
5781 "free": false,
5782 "group_by": "project",
5783 "groups": [
5784 {
5785 "key": "flagon-io/g1t",
5786 "micros": 43210000
5787 },
5788 {
5789 "key": "flagon-io/hello",
5790 "micros": 5000000
5791 }
5792 ]
5793 },
5794 "notes": "Every product family is listed, in order, even with nothing used; this example shows two. `daily` has one amount for each day of the range, oldest first. `projects` and `products` take several values separated by commas: `?products=agent,sandboxes`. A range of more than 400 days, or one that ends before it starts, is refused with `invalid`."
5795 },
5796 "get_budget": {
5797 "params": {
5798 "workspace": "flagon-io"
5799 },
5800 "response": {
5801 "workspace": "flagon-io",
5802 "amount_micros": 500000000,
5803 "automatic": false,
5804 "spent_micros": 132450000,
5805 "max_amount_micros": 2000000000,
5806 "alerts": [
5807 50,
5808 75,
5809 90,
5810 100
5811 ],
5812 "pause_at_limit": true,
5813 "webhook": "https://ops.example.com/g1t/budget",
5814 "state": "ok",
5815 "message": null
5816 },
5817 "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."
5818 },
5819 "set_budget": {
5820 "params": {
5821 "workspace": "flagon-io"
5822 },
5823 "request": {
5824 "amount_micros": 500000000,
5825 "alerts": [
5826 50,
5827 75,
5828 90,
5829 100
5830 ],
5831 "webhook": "https://ops.example.com/g1t/budget"
5832 },
5833 "response": {
5834 "workspace": "flagon-io",
5835 "amount_micros": 500000000,
5836 "automatic": false,
5837 "spent_micros": 132450000,
5838 "max_amount_micros": 2000000000,
5839 "alerts": [
5840 50,
5841 75,
5842 90,
5843 100
5844 ],
5845 "pause_at_limit": true,
5846 "webhook": "https://ops.example.com/g1t/budget",
5847 "state": "ok",
5848 "message": null
5849 },
5850 "notes": "Fields left out keep their value. A limit above `max_amount_micros` is refused with `invalid`. Called by anyone but an owner signed in as a person, or by a workspace's own token or one of g1t's agents, it is refused with `forbidden`. Each alert is sent once a month, to the owners by email and, with `webhook`, as a JSON POST."
5851 },
5852 "get_ai_credit": {
5853 "params": {
5854 "workspace": "flagon-io"
5855 },
5856 "response": {
5857 "balance_micros": 62000000,
5858 "purchased_micros": 50000000,
5859 "given_micros": 12000000,
5860 "grants": [
5861 {
5862 "id": "crd_01kkr2m4c8f1t7qh3d6n9w5p0x",
5863 "workspace": "flagon-io",
5864 "kind": "purchase",
5865 "amount_micros": 50000000,
5866 "used_micros": 0,
5867 "left_micros": 50000000,
5868 "note": "AI credit bought",
5869 "refund_for": null,
5870 "refund_day": null,
5871 "expires_at": "2027-10-02T00:00:00.000Z",
5872 "created_by": "ana",
5873 "created_at": "2026-10-02T16:20:00.000Z",
5874 "state": "open",
5875 "closed_at": null,
5876 "closed_note": null,
5877 "closed_by": null
5878 }
5879 ],
5880 "free_via_discount": false,
5881 "postpaid": false,
5882 "blocked": false,
5883 "can_buy": true,
5884 "presets_cents": [
5885 2500,
5886 5000,
5887 10000,
5888 25000
5889 ],
5890 "min_cents": 1000,
5891 "max_cents": 100000,
5892 "card_fee": {
5893 "on": true,
5894 "percent_micros": 29000,
5895 "fixed_cents": 30
5896 },
5897 "reload": {
5898 "enabled": false,
5899 "threshold_micros": 10000000,
5900 "target_micros": 50000000,
5901 "monthly_max_micros": 200000000,
5902 "reloaded_micros": 0,
5903 "failed_at": null,
5904 "error": null
5905 },
5906 "agent_rate_micros": 3.6,
5907 "model_markup_percent": 10,
5908 "gateway_markup_percent": 5,
5909 "upgrade_credit_micros": 10000000,
5910 "expires_days": 365
5911 },
5912 "notes": "`card_fee.percent_micros` is per dollar charged, in millionths: 29000 is 2.9%. `blocked` is true when the credit has run out and new runs on g1t's models wait for more; runs on a model provider the workspace connected itself never need it."
5913 },
5914 "buy_ai_credit": {
5915 "params": {
5916 "workspace": "flagon-io"
5917 },
5918 "request": {
5919 "amount_cents": 5000
5920 },
5921 "response": {
5922 "url": "https://checkout.example.com/c/pay/cs_test_a1b2c3"
5923 },
5924 "notes": "Open `url` in a browser to pay. Nothing is charged until the payment is made there; the credit then shows in get_ai_credit. An amount outside `min_cents` to `max_cents`, or not in whole dollars, is refused with `invalid`; a workspace that cannot buy credit (see `can_buy`) gets `conflict` or `payment_required`."
5925 },
5926 "list_invoices": {
5927 "params": {
5928 "workspace": "flagon-io"
5929 },
5930 "response": {
5931 "invoices": [
5932 {
5933 "id": "in_1Q2w3E4r5T6y7U8i",
5934 "number": "FLAGON-0004",
5935 "status": "paid",
5936 "total_cents": 4210,
5937 "currency": "usd",
5938 "created_at": "2026-10-01T00:05:00.000Z",
5939 "description": "Usage for 2026-09",
5940 "hosted_url": "https://invoice.example.com/i/acct_1/in_1Q2w3E4r5T6y7U8i",
5941 "pdf_url": "https://invoice.example.com/i/acct_1/in_1Q2w3E4r5T6y7U8i/pdf"
5942 }
5943 ],
5944 "usage_invoices": [
5945 {
5946 "id": "inv_01kkqz8d3c6f9t2wq5n8h1m4r7",
5947 "workspace": "flagon-io",
5948 "reason": "month",
5949 "period": "2026-09",
5950 "amount_micros": 42100000,
5951 "status": "paid",
5952 "hosted_url": "https://invoice.example.com/i/acct_1/in_1Q2w3E4r5T6y7U8i",
5953 "pdf_url": "https://invoice.example.com/i/acct_1/in_1Q2w3E4r5T6y7U8i/pdf",
5954 "lines": [
5955 {
5956 "description": "Agent: models",
5957 "amount_micros": 35900000
5958 },
5959 {
5960 "description": "Sandbox time",
5961 "amount_micros": 6200000
5962 }
5963 ],
5964 "created_at": "2026-10-01T00:05:00.000Z"
5965 }
5966 ],
5967 "upcoming": {
5968 "closes_at": "2026-11-01T00:00:00.000Z",
5969 "subscriptions_micros": 20000000,
5970 "usage_micros": 10210000,
5971 "total_micros": 30210000
5972 },
5973 "unavailable": null
5974 },
5975 "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`."
5976 },
5977 "get_billing_details": {
5978 "params": {
5979 "workspace": "flagon-io"
5980 },
5981 "response": {
5982 "customer": true,
5983 "email": "billing@flagon.example.com",
5984 "name": "Flagon, Inc.",
5985 "address": {
5986 "line1": "100 Market Street",
5987 "line2": "",
5988 "city": "San Francisco",
5989 "state": "CA",
5990 "postal_code": "94105",
5991 "country": "US"
5992 },
5993 "tax_id_type": "us_ein",
5994 "tax_id": "12-3456789",
5995 "po_number": null,
5996 "language": "en",
5997 "payment_method": {
5998 "kind": "card",
5999 "brand": "visa",
6000 "last4": "4242",
6001 "exp_month": 12,
6002 "exp_year": 2028
6003 }
6004 },
6005 "notes": "Owners change these on the workspace's billing page. `payment_method` is null until a card or other way to pay is saved."
6006 },
6007 "list_pinned_projects": {
6008 "params": {
6009 "workspace": "flagon-io"
6010 },
6011 "response": [
6012 {
6013 "position": 0,
6014 "id": "prj_01kkp3m8w2f6t9qh4c7d1r5n0x",
6015 "workspace": "flagon-io",
6016 "slug": "g1t",
6017 "name": "g1t",
6018 "description": null,
6019 "private": false,
6020 "archived": false,
6021 "kind": "app",
6022 "url": "https://g1t.sh/flagon-io/g1t",
6023 "pushed_at": "2026-10-07T10:00:00.000Z",
6024 "updated_at": "2026-10-01T09:12:00.000Z"
6025 },
6026 {
6027 "position": 1,
6028 "id": "prj_01kkq0c4d9h2w7rn5f8t3k6p2z",
6029 "workspace": "flagon-io",
6030 "slug": "lab-api",
6031 "name": "lab-api",
6032 "description": null,
6033 "private": true,
6034 "archived": false,
6035 "kind": "app",
6036 "url": "https://g1t.sh/flagon-io/lab-api",
6037 "pushed_at": "2026-10-06T18:40:00.000Z",
6038 "updated_at": "2026-10-01T09:12:00.000Z"
6039 },
6040 {
6041 "position": 2,
6042 "id": "prj_01kkp3n2a7e5v8sk3b6g9j4m1y",
6043 "workspace": "flagon-io",
6044 "slug": "hello",
6045 "name": "hello",
6046 "description": "Greets people from the command line.",
6047 "private": false,
6048 "archived": false,
6049 "kind": "library",
6050 "url": "https://g1t.sh/flagon-io/hello",
6051 "pushed_at": null,
6052 "updated_at": "2026-10-01T09:12:00.000Z"
6053 }
6054 ],
6055 "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."
6056 },
6057 "pin_project": {
6058 "params": {
6059 "workspace": "flagon-io",
6060 "project": "hello"
6061 },
6062 "request": {
6063 "position": 0
6064 },
6065 "response": [
6066 {
6067 "position": 0,
6068 "id": "prj_01kkp3n2a7e5v8sk3b6g9j4m1y",
6069 "workspace": "flagon-io",
6070 "slug": "hello",
6071 "name": "hello",
6072 "description": "Greets people from the command line.",
6073 "private": false,
6074 "archived": false,
6075 "kind": "library",
6076 "url": "https://g1t.sh/flagon-io/hello",
6077 "pushed_at": null,
6078 "updated_at": "2026-10-01T09:12:00.000Z"
6079 },
6080 {
6081 "position": 1,
6082 "id": "prj_01kkp3m8w2f6t9qh4c7d1r5n0x",
6083 "workspace": "flagon-io",
6084 "slug": "g1t",
6085 "name": "g1t",
6086 "description": null,
6087 "private": false,
6088 "archived": false,
6089 "kind": "app",
6090 "url": "https://g1t.sh/flagon-io/g1t",
6091 "pushed_at": "2026-10-07T10:00:00.000Z",
6092 "updated_at": "2026-10-01T09:12:00.000Z"
6093 },
6094 {
6095 "position": 2,
6096 "id": "prj_01kkq0c4d9h2w7rn5f8t3k6p2z",
6097 "workspace": "flagon-io",
6098 "slug": "lab-api",
6099 "name": "lab-api",
6100 "description": null,
6101 "private": true,
6102 "archived": false,
6103 "kind": "app",
6104 "url": "https://g1t.sh/flagon-io/lab-api",
6105 "pushed_at": "2026-10-06T18:40:00.000Z",
6106 "updated_at": "2026-10-01T09:12:00.000Z"
6107 }
6108 ],
6109 "notes": "A ninth pin in a workspace is refused with `409 conflict`: unpin one first."
6110 },
6111 "unpin_project": {
6112 "params": {
6113 "workspace": "flagon-io",
6114 "project": "lab-api"
6115 },
6116 "response": [
6117 {
6118 "position": 0,
6119 "id": "prj_01kkp3m8w2f6t9qh4c7d1r5n0x",
6120 "workspace": "flagon-io",
6121 "slug": "g1t",
6122 "name": "g1t",
6123 "description": null,
6124 "private": false,
6125 "archived": false,
6126 "kind": "app",
6127 "url": "https://g1t.sh/flagon-io/g1t",
6128 "pushed_at": "2026-10-07T10:00:00.000Z",
6129 "updated_at": "2026-10-01T09:12:00.000Z"
6130 },
6131 {
6132 "position": 1,
6133 "id": "prj_01kkp3n2a7e5v8sk3b6g9j4m1y",
6134 "workspace": "flagon-io",
6135 "slug": "hello",
6136 "name": "hello",
6137 "description": "Greets people from the command line.",
6138 "private": false,
6139 "archived": false,
6140 "kind": "library",
6141 "url": "https://g1t.sh/flagon-io/hello",
6142 "pushed_at": null,
6143 "updated_at": "2026-10-01T09:12:00.000Z"
6144 }
6145 ]
6146 },
6147 "reorder_pinned_projects": {
6148 "params": {
6149 "workspace": "flagon-io"
6150 },
6151 "request": {
6152 "projects": [
6153 "lab-api",
6154 "g1t",
6155 "hello"
6156 ]
6157 },
6158 "response": [
6159 {
6160 "position": 0,
6161 "id": "prj_01kkq0c4d9h2w7rn5f8t3k6p2z",
6162 "workspace": "flagon-io",
6163 "slug": "lab-api",
6164 "name": "lab-api",
6165 "description": null,
6166 "private": true,
6167 "archived": false,
6168 "kind": "app",
6169 "url": "https://g1t.sh/flagon-io/lab-api",
6170 "pushed_at": "2026-10-06T18:40:00.000Z",
6171 "updated_at": "2026-10-01T09:12:00.000Z"
6172 },
6173 {
6174 "position": 1,
6175 "id": "prj_01kkp3m8w2f6t9qh4c7d1r5n0x",
6176 "workspace": "flagon-io",
6177 "slug": "g1t",
6178 "name": "g1t",
6179 "description": null,
6180 "private": false,
6181 "archived": false,
6182 "kind": "app",
6183 "url": "https://g1t.sh/flagon-io/g1t",
6184 "pushed_at": "2026-10-07T10:00:00.000Z",
6185 "updated_at": "2026-10-01T09:12:00.000Z"
6186 },
6187 {
6188 "position": 2,
6189 "id": "prj_01kkp3n2a7e5v8sk3b6g9j4m1y",
6190 "workspace": "flagon-io",
6191 "slug": "hello",
6192 "name": "hello",
6193 "description": "Greets people from the command line.",
6194 "private": false,
6195 "archived": false,
6196 "kind": "library",
6197 "url": "https://g1t.sh/flagon-io/hello",
6198 "pushed_at": null,
6199 "updated_at": "2026-10-01T09:12:00.000Z"
6200 }
6201 ],
6202 "notes": "Name every pinned project once; anything else is refused with `422 invalid`."
6203 },
6204 "list_secret_scanning_alerts": {
6205 "params": {
6206 "owner": "flagon-io",
6207 "name": "hello"
6208 },
6209 "query": {
6210 "state": "open"
6211 },
6212 "response": [
6213 {
6214 "id": "sec_01kq2m7d4e5f6g7h8j9k0m1n2p",
6215 "repo_id": "rep_01kp0a1b2c3d4e5f6g7h8j9k0m",
6216 "kind": "github_token",
6217 "label": "a GitHub token",
6218 "path": "scripts/release.sh",
6219 "line": 12,
6220 "commit": "4807077b296e6edbf410d55e72749d3e1170c291",
6221 "preview": "ghp_X7…",
6222 "status": "open",
6223 "source": "push",
6224 "found_by": "syntaqx",
6225 "found_at": "2026-10-06T09:14:02.118Z",
6226 "decided_by": null,
6227 "reason": null,
6228 "decided_at": null,
6229 "dismissed_reason": null,
6230 "test_value": null,
6231 "state": "open",
6232 "validity": "active",
6233 "validity_checked_at": "2026-10-06T09:20:41.502Z",
6234 "bypass": {
6235 "reason": "will_fix_later",
6236 "comment": "Rotating it this afternoon.",
6237 "by": "syntaqx",
6238 "at": "2026-10-06T09:14:02.118Z",
6239 "approved_by": null
6240 },
6241 "pattern_id": null,
6242 "pattern_name": null,
6243 "locations": 1
6244 }
6245 ],
6246 "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`."
6247 },
6248 "list_secret_scanning_alerts_for_workspace": {
6249 "params": {
6250 "workspace": "flagon-io"
6251 },
6252 "query": {
6253 "state": "open"
6254 },
6255 "response": [
6256 {
6257 "repo": "hello",
6258 "secret": {
6259 "id": "sec_01kq2m7d4e5f6g7h8j9k0m1n2p",
6260 "repo_id": "rep_01kp0a1b2c3d4e5f6g7h8j9k0m",
6261 "kind": "github_token",
6262 "label": "a GitHub token",
6263 "path": "scripts/release.sh",
6264 "line": 12,
6265 "commit": "4807077b296e6edbf410d55e72749d3e1170c291",
6266 "preview": "ghp_X7…",
6267 "status": "open",
6268 "source": "push",
6269 "found_by": "syntaqx",
6270 "found_at": "2026-10-06T09:14:02.118Z",
6271 "decided_by": null,
6272 "reason": null,
6273 "decided_at": null,
6274 "dismissed_reason": null,
6275 "test_value": null,
6276 "state": "open",
6277 "validity": "active",
6278 "validity_checked_at": "2026-10-06T09:20:41.502Z",
6279 "bypass": {
6280 "reason": "will_fix_later",
6281 "comment": "Rotating it this afternoon.",
6282 "by": "syntaqx",
6283 "at": "2026-10-06T09:14:02.118Z",
6284 "approved_by": null
6285 },
6286 "pattern_id": null,
6287 "pattern_name": null,
6288 "locations": 1
6289 }
6290 }
6291 ],
6292 "notes": "Every repository whose findings you may see, each alert with its repository's name."
6293 },
6294 "get_secret_scanning_alert": {
6295 "params": {
6296 "owner": "flagon-io",
6297 "name": "hello",
6298 "id": "sec_01kq2m7d4e5f6g7h8j9k0m1n2p"
6299 },
6300 "response": {
6301 "secret": {
6302 "id": "sec_01kq2m7d4e5f6g7h8j9k0m1n2p",
6303 "repo_id": "rep_01kp0a1b2c3d4e5f6g7h8j9k0m",
6304 "kind": "github_token",
6305 "label": "a GitHub token",
6306 "path": "scripts/release.sh",
6307 "line": 12,
6308 "commit": "4807077b296e6edbf410d55e72749d3e1170c291",
6309 "preview": "ghp_X7…",
6310 "status": "blocked",
6311 "source": "push",
6312 "found_by": "syntaqx",
6313 "found_at": "2026-10-06T09:14:02.118Z",
6314 "decided_by": null,
6315 "reason": null,
6316 "decided_at": null,
6317 "dismissed_reason": null,
6318 "test_value": null,
6319 "state": "open",
6320 "validity": null,
6321 "validity_checked_at": null,
6322 "bypass": null,
6323 "pattern_id": null,
6324 "pattern_name": null,
6325 "locations": 1
6326 },
6327 "locations": [
6328 {
6329 "path": "scripts/release.sh",
6330 "line": 12,
6331 "commit": "4807077b296e6edbf410d55e72749d3e1170c291",
6332 "source": "push",
6333 "found_at": "2026-10-06T09:14:02.118Z"
6334 }
6335 ],
6336 "activity": [],
6337 "requests": [],
6338 "checkable": true,
6339 "can_bypass": true,
6340 "can_request_bypass": false
6341 }
6342 },
6343 "update_secret_scanning_alert": {
6344 "params": {
6345 "owner": "flagon-io",
6346 "name": "hello",
6347 "id": "sec_01kq2m7d4e5f6g7h8j9k0m1n2p"
6348 },
6349 "request": {
6350 "state": "dismissed",
6351 "reason": "revoked",
6352 "comment": "Rotated in the issuer's settings."
6353 },
6354 "response": {
6355 "id": "sec_01kq2m7d4e5f6g7h8j9k0m1n2p",
6356 "repo_id": "rep_01kp0a1b2c3d4e5f6g7h8j9k0m",
6357 "kind": "github_token",
6358 "label": "a GitHub token",
6359 "path": "scripts/release.sh",
6360 "line": 12,
6361 "commit": "4807077b296e6edbf410d55e72749d3e1170c291",
6362 "preview": "ghp_X7…",
6363 "status": "resolved",
6364 "source": "push",
6365 "found_by": "syntaqx",
6366 "found_at": "2026-10-06T09:14:02.118Z",
6367 "decided_by": "syntaqx",
6368 "reason": "Rotated in the issuer's settings.",
6369 "decided_at": "2026-10-06T09:20:41.502Z",
6370 "dismissed_reason": "revoked",
6371 "test_value": null,
6372 "state": "fixed",
6373 "validity": "active",
6374 "validity_checked_at": "2026-10-06T09:20:41.502Z",
6375 "bypass": {
6376 "reason": "will_fix_later",
6377 "comment": "Rotating it this afternoon.",
6378 "by": "syntaqx",
6379 "at": "2026-10-06T09:14:02.118Z",
6380 "approved_by": null
6381 },
6382 "pattern_id": null,
6383 "pattern_name": null,
6384 "locations": 1
6385 },
6386 "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."
6387 },
6388 "list_secret_scanning_locations": {
6389 "params": {
6390 "owner": "flagon-io",
6391 "name": "hello",
6392 "id": "sec_01kq2m7d4e5f6g7h8j9k0m1n2p"
6393 },
6394 "response": [
6395 {
6396 "path": "scripts/release.sh",
6397 "line": 12,
6398 "commit": "4807077b296e6edbf410d55e72749d3e1170c291",
6399 "source": "push",
6400 "found_at": "2026-10-06T09:14:02.118Z"
6401 }
6402 ]
6403 },
6404 "bypass_push_protection": {
6405 "params": {
6406 "owner": "flagon-io",
6407 "name": "hello",
6408 "id": "sec_01kq2m7d4e5f6g7h8j9k0m1n2p"
6409 },
6410 "request": {
6411 "reason": "will_fix_later",
6412 "comment": "Rotating it this afternoon."
6413 },
6414 "response": {
6415 "secret": {
6416 "id": "sec_01kq2m7d4e5f6g7h8j9k0m1n2p",
6417 "repo_id": "rep_01kp0a1b2c3d4e5f6g7h8j9k0m",
6418 "kind": "github_token",
6419 "label": "a GitHub token",
6420 "path": "scripts/release.sh",
6421 "line": 12,
6422 "commit": "4807077b296e6edbf410d55e72749d3e1170c291",
6423 "preview": "ghp_X7…",
6424 "status": "open",
6425 "source": "push",
6426 "found_by": "syntaqx",
6427 "found_at": "2026-10-06T09:14:02.118Z",
6428 "decided_by": null,
6429 "reason": null,
6430 "decided_at": null,
6431 "dismissed_reason": null,
6432 "test_value": null,
6433 "state": "open",
6434 "validity": null,
6435 "validity_checked_at": null,
6436 "bypass": {
6437 "reason": "will_fix_later",
6438 "comment": "Rotating it this afternoon.",
6439 "by": "syntaqx",
6440 "at": "2026-10-06T09:14:02.118Z",
6441 "approved_by": null
6442 },
6443 "pattern_id": null,
6444 "pattern_name": null,
6445 "locations": 1
6446 },
6447 "request": null
6448 },
6449 "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."
6450 },
6451 "check_secret_validity": {
6452 "params": {
6453 "owner": "flagon-io",
6454 "name": "hello",
6455 "id": "sec_01kq2m7d4e5f6g7h8j9k0m1n2p"
6456 },
6457 "response": {
6458 "id": "sec_01kq2m7d4e5f6g7h8j9k0m1n2p",
6459 "repo_id": "rep_01kp0a1b2c3d4e5f6g7h8j9k0m",
6460 "kind": "github_token",
6461 "label": "a GitHub token",
6462 "path": "scripts/release.sh",
6463 "line": 12,
6464 "commit": "4807077b296e6edbf410d55e72749d3e1170c291",
6465 "preview": "ghp_X7…",
6466 "status": "open",
6467 "source": "push",
6468 "found_by": "syntaqx",
6469 "found_at": "2026-10-06T09:14:02.118Z",
6470 "decided_by": null,
6471 "reason": null,
6472 "decided_at": null,
6473 "dismissed_reason": null,
6474 "test_value": null,
6475 "state": "open",
6476 "validity": "active",
6477 "validity_checked_at": "2026-10-06T09:20:41.502Z",
6478 "bypass": {
6479 "reason": "will_fix_later",
6480 "comment": "Rotating it this afternoon.",
6481 "by": "syntaqx",
6482 "at": "2026-10-06T09:14:02.118Z",
6483 "approved_by": null
6484 },
6485 "pattern_id": null,
6486 "pattern_name": null,
6487 "locations": 1
6488 },
6489 "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`."
6490 },
6491 "list_bypass_requests": {
6492 "params": {
6493 "workspace": "flagon-io"
6494 },
6495 "query": {
6496 "state": "pending"
6497 },
6498 "response": [
6499 {
6500 "id": "byp_01kq2n8e5f6g7h8j9k0m1n2p3q",
6501 "repo_id": "rep_01kp0a1b2c3d4e5f6g7h8j9k0m",
6502 "workspace": "flagon-io",
6503 "repo": "hello",
6504 "secret_id": "sec_01kq2m7d4e5f6g7h8j9k0m1n2p",
6505 "label": "a GitHub token",
6506 "path": "scripts/release.sh",
6507 "line": 12,
6508 "preview": "ghp_X7…",
6509 "requester": "ana",
6510 "reason": "used_in_tests",
6511 "comment": "A token from the test fixtures, never issued.",
6512 "state": "pending",
6513 "reviewer": null,
6514 "review_comment": null,
6515 "created_at": "2026-10-06T09:14:02.118Z",
6516 "reviewed_at": null
6517 }
6518 ]
6519 },
6520 "review_bypass_request": {
6521 "params": {
6522 "workspace": "flagon-io",
6523 "id": "byp_01kq2n8e5f6g7h8j9k0m1n2p3q"
6524 },
6525 "request": {
6526 "decision": "approve",
6527 "comment": "A fixture."
6528 },
6529 "response": {
6530 "id": "byp_01kq2n8e5f6g7h8j9k0m1n2p3q",
6531 "repo_id": "rep_01kp0a1b2c3d4e5f6g7h8j9k0m",
6532 "workspace": "flagon-io",
6533 "repo": "hello",
6534 "secret_id": "sec_01kq2m7d4e5f6g7h8j9k0m1n2p",
6535 "label": "a GitHub token",
6536 "path": "scripts/release.sh",
6537 "line": 12,
6538 "preview": "ghp_X7…",
6539 "requester": "ana",
6540 "reason": "used_in_tests",
6541 "comment": "A token from the test fixtures, never issued.",
6542 "state": "approved",
6543 "reviewer": "syntaqx",
6544 "review_comment": "A fixture.",
6545 "created_at": "2026-10-06T09:14:02.118Z",
6546 "reviewed_at": "2026-10-06T09:20:41.502Z"
6547 }
6548 },
6549 "list_custom_patterns": {
6550 "params": {
6551 "owner": "flagon-io",
6552 "name": "hello"
6553 },
6554 "response": {
6555 "patterns": [
6556 {
6557 "id": "pat_01kq2p9f6g7h8j9k0m1n2p3q4r",
6558 "scope": "repository",
6559 "workspace": "flagon-io",
6560 "repo": "hello",
6561 "name": "Acme API key",
6562 "pattern": "acme_[a-z0-9]{32}",
6563 "before": null,
6564 "after": null,
6565 "test_strings": [
6566 "ACME_KEY=acme_0123456789abcdef0123456789abcdef"
6567 ],
6568 "state": "published",
6569 "created_by": "syntaqx",
6570 "created_at": "2026-10-06T09:14:02.118Z",
6571 "updated_by": "syntaqx",
6572 "updated_at": "2026-10-06T09:14:02.118Z",
6573 "open_alerts": 0
6574 }
6575 ],
6576 "entitled": true
6577 },
6578 "notes": "A repository's list includes its workspace's patterns, with `scope` `workspace`. `entitled` says whether they run here: always on a public repository, and on a private one with the Security and quality activation."
6579 },
6580 "list_custom_patterns_for_workspace": {
6581 "params": {
6582 "workspace": "flagon-io"
6583 },
6584 "response": {
6585 "patterns": [
6586 {
6587 "id": "pat_01kq2p9f6g7h8j9k0m1n2p3q4r",
6588 "scope": "workspace",
6589 "workspace": "flagon-io",
6590 "repo": null,
6591 "name": "Acme API key",
6592 "pattern": "acme_[a-z0-9]{32}",
6593 "before": null,
6594 "after": null,
6595 "test_strings": [
6596 "ACME_KEY=acme_0123456789abcdef0123456789abcdef"
6597 ],
6598 "state": "published",
6599 "created_by": "syntaqx",
6600 "created_at": "2026-10-06T09:14:02.118Z",
6601 "updated_by": "syntaqx",
6602 "updated_at": "2026-10-06T09:14:02.118Z",
6603 "open_alerts": 0
6604 }
6605 ],
6606 "entitled": true
6607 }
6608 },
6609 "create_custom_pattern": {
6610 "params": {
6611 "owner": "flagon-io",
6612 "name": "hello"
6613 },
6614 "request": {
6615 "pattern_name": "Acme API key",
6616 "pattern": "acme_[a-z0-9]{32}",
6617 "test_strings": [
6618 "ACME_KEY=acme_0123456789abcdef0123456789abcdef"
6619 ],
6620 "publish": true
6621 },
6622 "response": {
6623 "pattern": {
6624 "id": "pat_01kq2p9f6g7h8j9k0m1n2p3q4r",
6625 "scope": "repository",
6626 "workspace": "flagon-io",
6627 "repo": "hello",
6628 "name": "Acme API key",
6629 "pattern": "acme_[a-z0-9]{32}",
6630 "before": null,
6631 "after": null,
6632 "test_strings": [
6633 "ACME_KEY=acme_0123456789abcdef0123456789abcdef"
6634 ],
6635 "state": "published",
6636 "created_by": "syntaqx",
6637 "created_at": "2026-10-06T09:14:02.118Z",
6638 "updated_by": "syntaqx",
6639 "updated_at": "2026-10-06T09:14:02.118Z",
6640 "open_alerts": 0
6641 },
6642 "tests": [
6643 [
6644 9,
6645 46
6646 ]
6647 ]
6648 },
6649 "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."
6650 },
6651 "create_custom_pattern_for_workspace": {
6652 "params": {
6653 "workspace": "flagon-io"
6654 },
6655 "request": {
6656 "pattern_name": "Acme API key",
6657 "pattern": "acme_[a-z0-9]{32}",
6658 "publish": false
6659 },
6660 "response": {
6661 "pattern": {
6662 "id": "pat_01kq2p9f6g7h8j9k0m1n2p3q4r",
6663 "scope": "workspace",
6664 "workspace": "flagon-io",
6665 "repo": null,
6666 "name": "Acme API key",
6667 "pattern": "acme_[a-z0-9]{32}",
6668 "before": null,
6669 "after": null,
6670 "test_strings": [],
6671 "state": "draft",
6672 "created_by": "syntaqx",
6673 "created_at": "2026-10-06T09:14:02.118Z",
6674 "updated_by": "syntaqx",
6675 "updated_at": "2026-10-06T09:14:02.118Z",
6676 "open_alerts": 0
6677 },
6678 "tests": []
6679 }
6680 },
6681 "update_custom_pattern": {
6682 "params": {
6683 "owner": "flagon-io",
6684 "name": "hello",
6685 "id": "pat_01kq2p9f6g7h8j9k0m1n2p3q4r"
6686 },
6687 "request": {
6688 "pattern_name": "Acme API key",
6689 "pattern": "acme_[a-z0-9]{32,40}",
6690 "publish": true
6691 },
6692 "response": {
6693 "pattern": {
6694 "id": "pat_01kq2p9f6g7h8j9k0m1n2p3q4r",
6695 "scope": "repository",
6696 "workspace": "flagon-io",
6697 "repo": "hello",
6698 "name": "Acme API key",
6699 "pattern": "acme_[a-z0-9]{32,40}",
6700 "before": null,
6701 "after": null,
6702 "test_strings": [
6703 "ACME_KEY=acme_0123456789abcdef0123456789abcdef"
6704 ],
6705 "state": "published",
6706 "created_by": "syntaqx",
6707 "created_at": "2026-10-06T09:14:02.118Z",
6708 "updated_by": "syntaqx",
6709 "updated_at": "2026-10-06T09:14:02.118Z",
6710 "open_alerts": 0
6711 },
6712 "tests": [
6713 [
6714 9,
6715 46
6716 ]
6717 ]
6718 }
6719 },
6720 "update_custom_pattern_for_workspace": {
6721 "params": {
6722 "workspace": "flagon-io",
6723 "id": "pat_01kq2p9f6g7h8j9k0m1n2p3q4r"
6724 },
6725 "request": {
6726 "pattern_name": "Acme API key",
6727 "pattern": "acme_[a-z0-9]{32}",
6728 "publish": true
6729 },
6730 "response": {
6731 "pattern": {
6732 "id": "pat_01kq2p9f6g7h8j9k0m1n2p3q4r",
6733 "scope": "workspace",
6734 "workspace": "flagon-io",
6735 "repo": null,
6736 "name": "Acme API key",
6737 "pattern": "acme_[a-z0-9]{32}",
6738 "before": null,
6739 "after": null,
6740 "test_strings": [
6741 "ACME_KEY=acme_0123456789abcdef0123456789abcdef"
6742 ],
6743 "state": "published",
6744 "created_by": "syntaqx",
6745 "created_at": "2026-10-06T09:14:02.118Z",
6746 "updated_by": "syntaqx",
6747 "updated_at": "2026-10-06T09:14:02.118Z",
6748 "open_alerts": 0
6749 },
6750 "tests": [
6751 [
6752 9,
6753 46
6754 ]
6755 ]
6756 }
6757 },
6758 "delete_custom_pattern": {
6759 "params": {
6760 "owner": "flagon-io",
6761 "name": "hello",
6762 "id": "pat_01kq2p9f6g7h8j9k0m1n2p3q4r"
6763 },
6764 "response": {
6765 "deleted": true
6766 }
6767 },
6768 "delete_custom_pattern_for_workspace": {
6769 "params": {
6770 "workspace": "flagon-io",
6771 "id": "pat_01kq2p9f6g7h8j9k0m1n2p3q4r"
6772 },
6773 "response": {
6774 "deleted": true
6775 }
6776 },
6777 "dry_run_custom_pattern": {
6778 "params": {
6779 "owner": "flagon-io",
6780 "name": "hello"
6781 },
6782 "request": {
6783 "pattern": "acme_[a-z0-9]{32}"
6784 },
6785 "response": {
6786 "repos": [
6787 {
6788 "name": "hello",
6789 "files_scanned": 214,
6790 "matches": [
6791 {
6792 "path": "config/dev.env",
6793 "line": 3,
6794 "preview": "ACME_KEY=acme_01••••••••••••••••••••••••"
6795 }
6796 ],
6797 "truncated": false,
6798 "commit": "4807077b296e6edbf410d55e72749d3e1170c291"
6799 }
6800 ]
6801 },
6802 "notes": "Reads up to 2,000 files and 20 MB of the default branch, skipping what secret scanning skips. Nothing is recorded."
6803 },
6804 "dry_run_custom_pattern_for_workspace": {
6805 "params": {
6806 "workspace": "flagon-io"
6807 },
6808 "request": {
6809 "pattern": "acme_[a-z0-9]{32}",
6810 "repos": [
6811 "hello"
6812 ]
6813 },
6814 "response": {
6815 "repos": [
6816 {
6817 "name": "hello",
6818 "files_scanned": 214,
6819 "matches": [],
6820 "truncated": false,
6821 "commit": "4807077b296e6edbf410d55e72749d3e1170c291"
6822 }
6823 ]
6824 }
6825 },
6826 "list_code_scanning_alerts": {
6827 "params": {
6828 "owner": "flagon-io",
6829 "name": "hello"
6830 },
6831 "query": {
6832 "state": "open",
6833 "severity": "high"
6834 },
6835 "response": [
6836 {
6837 "id": "cod_01kq2qag7h8j9k0m1n2p3q4r5s",
6838 "number": 4,
6839 "repo_id": "rep_01kp0a1b2c3d4e5f6g7h8j9k0m",
6840 "tool": "Semgrep OSS",
6841 "category": "Semgrep OSS",
6842 "rule_id": "javascript.lang.security.detect-child-process.detect-child-process",
6843 "rule_name": "javascript.lang.security.detect-child-process.detect-child-process",
6844 "rule_description": "Detected calls to child_process from a function argument.",
6845 "help": null,
6846 "help_uri": "https://semgrep.dev/r/javascript.lang.security.detect-child-process.detect-child-process",
6847 "tags": [
6848 "security",
6849 "CWE-78"
6850 ],
6851 "level": "error",
6852 "security_severity": null,
6853 "severity": "high",
6854 "message": "Detected calls to child_process from a function argument `req`. This could lead to a command injection.",
6855 "path": "src/server.js",
6856 "start_line": 6,
6857 "end_line": 6,
6858 "start_column": 3,
6859 "end_column": 60,
6860 "state": "open",
6861 "fingerprint": "3f1c9a0e7b2d4c5e6f708192a3b4c5d6",
6862 "first_commit": "4807077b296e6edbf410d55e72749d3e1170c291",
6863 "last_commit": "4807077b296e6edbf410d55e72749d3e1170c291",
6864 "created_at": "2026-10-06T09:14:02.118Z",
6865 "updated_at": "2026-10-06T09:14:02.118Z",
6866 "fixed_at": null,
6867 "dismissed_by": null,
6868 "dismissed_reason": null,
6869 "dismissed_comment": null,
6870 "dismissed_at": null,
6871 "issue": null
6872 }
6873 ],
6874 "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."
6875 },
6876 "list_code_scanning_alerts_for_workspace": {
6877 "params": {
6878 "workspace": "flagon-io"
6879 },
6880 "query": {
6881 "state": "open"
6882 },
6883 "response": [
6884 {
6885 "repo": "hello",
6886 "code": {
6887 "id": "cod_01kq2qag7h8j9k0m1n2p3q4r5s",
6888 "number": 4,
6889 "repo_id": "rep_01kp0a1b2c3d4e5f6g7h8j9k0m",
6890 "tool": "Semgrep OSS",
6891 "category": "Semgrep OSS",
6892 "rule_id": "javascript.lang.security.detect-child-process.detect-child-process",
6893 "rule_name": "javascript.lang.security.detect-child-process.detect-child-process",
6894 "rule_description": "Detected calls to child_process from a function argument.",
6895 "help": null,
6896 "help_uri": "https://semgrep.dev/r/javascript.lang.security.detect-child-process.detect-child-process",
6897 "tags": [
6898 "security",
6899 "CWE-78"
6900 ],
6901 "level": "error",
6902 "security_severity": null,
6903 "severity": "high",
6904 "message": "Detected calls to child_process from a function argument `req`. This could lead to a command injection.",
6905 "path": "src/server.js",
6906 "start_line": 6,
6907 "end_line": 6,
6908 "start_column": 3,
6909 "end_column": 60,
6910 "state": "open",
6911 "fingerprint": "3f1c9a0e7b2d4c5e6f708192a3b4c5d6",
6912 "first_commit": "4807077b296e6edbf410d55e72749d3e1170c291",
6913 "last_commit": "4807077b296e6edbf410d55e72749d3e1170c291",
6914 "created_at": "2026-10-06T09:14:02.118Z",
6915 "updated_at": "2026-10-06T09:14:02.118Z",
6916 "fixed_at": null,
6917 "dismissed_by": null,
6918 "dismissed_reason": null,
6919 "dismissed_comment": null,
6920 "dismissed_at": null,
6921 "issue": null
6922 }
6923 }
6924 ]
6925 },
6926 "get_code_scanning_alert": {
6927 "params": {
6928 "owner": "flagon-io",
6929 "name": "hello",
6930 "number": 4
6931 },
6932 "response": {
6933 "alert": {
6934 "id": "cod_01kq2qag7h8j9k0m1n2p3q4r5s",
6935 "number": 4,
6936 "repo_id": "rep_01kp0a1b2c3d4e5f6g7h8j9k0m",
6937 "tool": "Semgrep OSS",
6938 "category": "Semgrep OSS",
6939 "rule_id": "javascript.lang.security.detect-child-process.detect-child-process",
6940 "rule_name": "javascript.lang.security.detect-child-process.detect-child-process",
6941 "rule_description": "Detected calls to child_process from a function argument.",
6942 "help": null,
6943 "help_uri": "https://semgrep.dev/r/javascript.lang.security.detect-child-process.detect-child-process",
6944 "tags": [
6945 "security",
6946 "CWE-78"
6947 ],
6948 "level": "error",
6949 "security_severity": null,
6950 "severity": "high",
6951 "message": "Detected calls to child_process from a function argument `req`. This could lead to a command injection.",
6952 "path": "src/server.js",
6953 "start_line": 6,
6954 "end_line": 6,
6955 "start_column": 3,
6956 "end_column": 60,
6957 "state": "open",
6958 "fingerprint": "3f1c9a0e7b2d4c5e6f708192a3b4c5d6",
6959 "first_commit": "4807077b296e6edbf410d55e72749d3e1170c291",
6960 "last_commit": "4807077b296e6edbf410d55e72749d3e1170c291",
6961 "created_at": "2026-10-06T09:14:02.118Z",
6962 "updated_at": "2026-10-06T09:14:02.118Z",
6963 "fixed_at": null,
6964 "dismissed_by": null,
6965 "dismissed_reason": null,
6966 "dismissed_comment": null,
6967 "dismissed_at": null,
6968 "issue": null
6969 },
6970 "activity": [],
6971 "analyses": [
6972 {
6973 "id": "ana_01kq2rbh8j9k0m1n2p3q4r5s6t",
6974 "repo_id": "rep_01kp0a1b2c3d4e5f6g7h8j9k0m",
6975 "sarif_id": "sar_01kq2scj9k0m1n2p3q4r5s6t7v",
6976 "tool": "Semgrep OSS",
6977 "tool_version": "1.140.0",
6978 "category": "Semgrep OSS",
6979 "commit_sha": "4807077b296e6edbf410d55e72749d3e1170c291",
6980 "git_ref": "refs/heads/main",
6981 "pull": null,
6982 "results": 7,
6983 "new_alerts": 2,
6984 "fixed_alerts": 1,
6985 "dropped": 0,
6986 "created_at": "2026-10-06T09:14:02.118Z"
6987 }
6988 ]
6989 }
6990 },
6991 "update_code_scanning_alert": {
6992 "params": {
6993 "owner": "flagon-io",
6994 "name": "hello",
6995 "number": 4
6996 },
6997 "request": {
6998 "state": "dismissed",
6999 "dismissed_reason": "false_positive",
7000 "dismissed_comment": "The argument is a constant."
7001 },
7002 "response": {
7003 "id": "cod_01kq2qag7h8j9k0m1n2p3q4r5s",
7004 "number": 4,
7005 "repo_id": "rep_01kp0a1b2c3d4e5f6g7h8j9k0m",
7006 "tool": "Semgrep OSS",
7007 "category": "Semgrep OSS",
7008 "rule_id": "javascript.lang.security.detect-child-process.detect-child-process",
7009 "rule_name": "javascript.lang.security.detect-child-process.detect-child-process",
7010 "rule_description": "Detected calls to child_process from a function argument.",
7011 "help": null,
7012 "help_uri": "https://semgrep.dev/r/javascript.lang.security.detect-child-process.detect-child-process",
7013 "tags": [
7014 "security",
7015 "CWE-78"
7016 ],
7017 "level": "error",
7018 "security_severity": null,
7019 "severity": "high",
7020 "message": "Detected calls to child_process from a function argument `req`. This could lead to a command injection.",
7021 "path": "src/server.js",
7022 "start_line": 6,
7023 "end_line": 6,
7024 "start_column": 3,
7025 "end_column": 60,
7026 "state": "dismissed",
7027 "fingerprint": "3f1c9a0e7b2d4c5e6f708192a3b4c5d6",
7028 "first_commit": "4807077b296e6edbf410d55e72749d3e1170c291",
7029 "last_commit": "4807077b296e6edbf410d55e72749d3e1170c291",
7030 "created_at": "2026-10-06T09:14:02.118Z",
7031 "updated_at": "2026-10-06T09:14:02.118Z",
7032 "fixed_at": null,
7033 "dismissed_by": "syntaqx",
7034 "dismissed_reason": "false_positive",
7035 "dismissed_comment": "The argument is a constant.",
7036 "dismissed_at": "2026-10-06T09:20:41.502Z",
7037 "issue": null
7038 }
7039 },
7040 "list_code_scanning_analyses": {
7041 "params": {
7042 "owner": "flagon-io",
7043 "name": "hello"
7044 },
7045 "response": [
7046 {
7047 "id": "ana_01kq2rbh8j9k0m1n2p3q4r5s6t",
7048 "repo_id": "rep_01kp0a1b2c3d4e5f6g7h8j9k0m",
7049 "sarif_id": "sar_01kq2scj9k0m1n2p3q4r5s6t7v",
7050 "tool": "Semgrep OSS",
7051 "tool_version": "1.140.0",
7052 "category": "Semgrep OSS",
7053 "commit_sha": "4807077b296e6edbf410d55e72749d3e1170c291",
7054 "git_ref": "refs/heads/main",
7055 "pull": null,
7056 "results": 7,
7057 "new_alerts": 2,
7058 "fixed_alerts": 1,
7059 "dropped": 0,
7060 "created_at": "2026-10-06T09:14:02.118Z"
7061 }
7062 ]
7063 },
7064 "upload_sarif": {
7065 "params": {
7066 "owner": "flagon-io",
7067 "name": "hello"
7068 },
7069 "request": {
7070 "commit_sha": "4807077b296e6edbf410d55e72749d3e1170c291",
7071 "ref": "refs/heads/main",
7072 "sarif": "H4sIAAAAAAAA…",
7073 "checkout_uri": "file:///home/runner/work/repo"
7074 },
7075 "response": {
7076 "id": "sar_01kq2scj9k0m1n2p3q4r5s6t7v",
7077 "processing_status": "complete",
7078 "analyses": [
7079 "ana_01kq2rbh8j9k0m1n2p3q4r5s6t"
7080 ],
7081 "errors": [],
7082 "commit_sha": "4807077b296e6edbf410d55e72749d3e1170c291",
7083 "git_ref": "refs/heads/main",
7084 "created_at": "2026-10-06T09:14:02.118Z"
7085 },
7086 "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."
7087 },
7088 "get_sarif_upload": {
7089 "params": {
7090 "owner": "flagon-io",
7091 "name": "hello",
7092 "id": "sar_01kq2scj9k0m1n2p3q4r5s6t7v"
7093 },
7094 "response": {
7095 "id": "sar_01kq2scj9k0m1n2p3q4r5s6t7v",
7096 "processing_status": "complete",
7097 "analyses": [
7098 "ana_01kq2rbh8j9k0m1n2p3q4r5s6t"
7099 ],
7100 "errors": [],
7101 "commit_sha": "4807077b296e6edbf410d55e72749d3e1170c291",
7102 "git_ref": "refs/heads/main",
7103 "created_at": "2026-10-06T09:14:02.118Z"
7104 }
7105 },
7106 "list_vulnerability_alerts": {
7107 "params": {
7108 "owner": "flagon-io",
7109 "name": "hello"
7110 },
7111 "query": {
7112 "state": "open"
7113 },
7114 "response": [
7115 {
7116 "id": "vul_01kp4b8c3d4e5f6g7h8j9k0m1n",
7117 "repo_id": "rep_01kp0a1b2c3d4e5f6g7h8j9k0m",
7118 "ecosystem": "npm",
7119 "package": "lodash",
7120 "version": "4.17.20",
7121 "manifest": "package-lock.json",
7122 "advisory": "GHSA-35jh-r3h4-6jhm",
7123 "osv_id": "GHSA-35jh-r3h4-6jhm",
7124 "summary": "Command Injection in lodash",
7125 "severity": "high",
7126 "fixed_version": "4.17.21",
7127 "status": "open",
7128 "issue": null,
7129 "found_at": "2026-10-06T09:14:02.118Z",
7130 "fixed_at": null,
7131 "state": "open",
7132 "dismissed_by": null,
7133 "dismissed_reason": null,
7134 "dismissed_comment": null,
7135 "dismissed_at": null,
7136 "update": null
7137 }
7138 ]
7139 },
7140 "list_vulnerability_alerts_for_workspace": {
7141 "params": {
7142 "workspace": "flagon-io"
7143 },
7144 "query": {
7145 "severity": "critical"
7146 },
7147 "response": [
7148 {
7149 "repo": "hello",
7150 "vulnerability": {
7151 "id": "vul_01kp4b8c3d4e5f6g7h8j9k0m1n",
7152 "repo_id": "rep_01kp0a1b2c3d4e5f6g7h8j9k0m",
7153 "ecosystem": "npm",
7154 "package": "lodash",
7155 "version": "4.17.20",
7156 "manifest": "package-lock.json",
7157 "advisory": "GHSA-35jh-r3h4-6jhm",
7158 "osv_id": "GHSA-35jh-r3h4-6jhm",
7159 "summary": "Command Injection in lodash",
7160 "severity": "high",
7161 "fixed_version": "4.17.21",
7162 "status": "open",
7163 "issue": null,
7164 "found_at": "2026-10-06T09:14:02.118Z",
7165 "fixed_at": null,
7166 "state": "open",
7167 "dismissed_by": null,
7168 "dismissed_reason": null,
7169 "dismissed_comment": null,
7170 "dismissed_at": null,
7171 "update": null
7172 }
7173 }
7174 ]
7175 },
7176 "get_vulnerability_alert": {
7177 "params": {
7178 "owner": "flagon-io",
7179 "name": "hello",
7180 "id": "vul_01kp4b8c3d4e5f6g7h8j9k0m1n"
7181 },
7182 "response": {
7183 "id": "vul_01kp4b8c3d4e5f6g7h8j9k0m1n",
7184 "repo_id": "rep_01kp0a1b2c3d4e5f6g7h8j9k0m",
7185 "ecosystem": "npm",
7186 "package": "lodash",
7187 "version": "4.17.20",
7188 "manifest": "package-lock.json",
7189 "advisory": "GHSA-35jh-r3h4-6jhm",
7190 "osv_id": "GHSA-35jh-r3h4-6jhm",
7191 "summary": "Command Injection in lodash",
7192 "severity": "high",
7193 "fixed_version": "4.17.21",
7194 "status": "open",
7195 "issue": null,
7196 "found_at": "2026-10-06T09:14:02.118Z",
7197 "fixed_at": null,
7198 "state": "open",
7199 "dismissed_by": null,
7200 "dismissed_reason": null,
7201 "dismissed_comment": null,
7202 "dismissed_at": null,
7203 "update": null
7204 }
7205 },
7206 "update_vulnerability_alert": {
7207 "params": {
7208 "owner": "flagon-io",
7209 "name": "hello",
7210 "id": "vul_01kp4b8c3d4e5f6g7h8j9k0m1n"
7211 },
7212 "request": {
7213 "state": "dismissed",
7214 "reason": "tolerable_risk",
7215 "comment": "Only the build uses it."
7216 },
7217 "response": {
7218 "id": "vul_01kp4b8c3d4e5f6g7h8j9k0m1n",
7219 "repo_id": "rep_01kp0a1b2c3d4e5f6g7h8j9k0m",
7220 "ecosystem": "npm",
7221 "package": "lodash",
7222 "version": "4.17.20",
7223 "manifest": "package-lock.json",
7224 "advisory": "GHSA-35jh-r3h4-6jhm",
7225 "osv_id": "GHSA-35jh-r3h4-6jhm",
7226 "summary": "Command Injection in lodash",
7227 "severity": "high",
7228 "fixed_version": "4.17.21",
7229 "status": "dismissed",
7230 "issue": null,
7231 "found_at": "2026-10-06T09:14:02.118Z",
7232 "fixed_at": null,
7233 "state": "dismissed",
7234 "dismissed_by": "syntaqx",
7235 "dismissed_reason": "tolerable_risk",
7236 "dismissed_comment": "Only the build uses it.",
7237 "dismissed_at": "2026-10-06T09:20:41.502Z",
7238 "update": null
7239 }
7240 },
7241 "fix_security_alert": {
7242 "params": {
7243 "owner": "flagon-io",
7244 "name": "hello",
7245 "id": "cod_01kq2qag7h8j9k0m1n2p3q4r5s"
7246 },
7247 "response": {
7248 "issue": 57,
7249 "started": true,
7250 "message": null
7251 },
7252 "notes": "Opens an issue with what is wrong and what done means, and puts g1t on it as you. Its run is charged as agent usage, and its pull request lands through the repository's required checks. Asking again while the issue is open returns it."
7253 },
7254 "get_dependency_graph": {
7255 "params": {
7256 "owner": "flagon-io",
7257 "name": "hello"
7258 },
7259 "response": {
7260 "commit": "4807077b296e6edbf410d55e72749d3e1170c291",
7261 "manifests": [
7262 {
7263 "path": "package-lock.json",
7264 "ecosystem": "npm",
7265 "dependencies": 2,
7266 "direct": 1
7267 }
7268 ],
7269 "dependencies": [
7270 {
7271 "ecosystem": "npm",
7272 "name": "lodash",
7273 "version": "4.17.20",
7274 "manifest": "package-lock.json",
7275 "relationship": "direct",
7276 "development": false,
7277 "license": "MIT",
7278 "purl": "pkg:npm/lodash@4.17.20",
7279 "vulnerabilities": 1
7280 },
7281 {
7282 "ecosystem": "npm",
7283 "name": "ms",
7284 "version": "2.1.3",
7285 "manifest": "package-lock.json",
7286 "relationship": "transitive",
7287 "development": false,
7288 "license": "MIT",
7289 "purl": "pkg:npm/ms@2.1.3",
7290 "vulnerabilities": 0
7291 }
7292 ]
7293 }
7294 },
7295 "get_sbom": {
7296 "params": {
7297 "owner": "flagon-io",
7298 "name": "hello"
7299 },
7300 "response": {
7301 "sbom": {
7302 "spdxVersion": "SPDX-2.3",
7303 "dataLicense": "CC0-1.0",
7304 "SPDXID": "SPDXRef-DOCUMENT",
7305 "name": "flagon-io/hello dependency graph",
7306 "documentNamespace": "https://g1t.sh/flagon-io/hello/sbom/sbom_01kq2tdk0m1n2p3q4r5s6t7v8w",
7307 "creationInfo": {
7308 "created": "2026-10-06T09:14:02Z",
7309 "creators": [
7310 "Tool: g1t",
7311 "Organization: g1t"
7312 ],
7313 "comment": "Read from the repository's lockfiles on its default branch."
7314 },
7315 "documentDescribes": [
7316 "SPDXRef-Repository-flagon-io-hello"
7317 ],
7318 "packages": [
7319 {
7320 "SPDXID": "SPDXRef-Repository-flagon-io-hello",
7321 "name": "flagon-io/hello",
7322 "versionInfo": "4807077b296e6edbf410d55e72749d3e1170c291",
7323 "downloadLocation": "git+https://g1t.sh/flagon-io/hello.git",
7324 "filesAnalyzed": false,
7325 "licenseConcluded": "NOASSERTION",
7326 "licenseDeclared": "NOASSERTION",
7327 "copyrightText": "NOASSERTION",
7328 "primaryPackagePurpose": "SOURCE",
7329 "externalRefs": []
7330 },
7331 {
7332 "SPDXID": "SPDXRef-Package-npm-lodash-4.17.20",
7333 "name": "lodash",
7334 "versionInfo": "4.17.20",
7335 "downloadLocation": "NOASSERTION",
7336 "filesAnalyzed": false,
7337 "licenseConcluded": "NOASSERTION",
7338 "licenseDeclared": "MIT",
7339 "copyrightText": "NOASSERTION",
7340 "primaryPackagePurpose": "LIBRARY",
7341 "comment": "Resolved by package-lock.json (direct dependency).",
7342 "externalRefs": [
7343 {
7344 "referenceCategory": "PACKAGE-MANAGER",
7345 "referenceType": "purl",
7346 "referenceLocator": "pkg:npm/lodash@4.17.20"
7347 }
7348 ]
7349 }
7350 ],
7351 "relationships": [
7352 {
7353 "spdxElementId": "SPDXRef-DOCUMENT",
7354 "relationshipType": "DESCRIBES",
7355 "relatedSpdxElement": "SPDXRef-Repository-flagon-io-hello"
7356 },
7357 {
7358 "spdxElementId": "SPDXRef-Repository-flagon-io-hello",
7359 "relationshipType": "DEPENDS_ON",
7360 "relatedSpdxElement": "SPDXRef-Package-npm-lodash-4.17.20"
7361 }
7362 ]
7363 }
7364 },
7365 "notes": "`sbom` is an SPDX 2.3 JSON document, sent as SPDX spells it. Save it with `jq .sbom`."
7366 },
7367 "compare_dependencies": {
7368 "params": {
7369 "owner": "flagon-io",
7370 "name": "hello",
7371 "basehead": "main...upgrade-deps"
7372 },
7373 "response": {
7374 "base": "main",
7375 "head": "upgrade-deps",
7376 "changes": [
7377 {
7378 "change_type": "added",
7379 "manifest": "package-lock.json",
7380 "ecosystem": "npm",
7381 "name": "lodash",
7382 "version": "4.17.20",
7383 "relationship": "direct",
7384 "development": false,
7385 "license": "MIT",
7386 "purl": "pkg:npm/lodash@4.17.20",
7387 "vulnerabilities": [
7388 {
7389 "advisory": "GHSA-35jh-r3h4-6jhm",
7390 "osv_id": "GHSA-35jh-r3h4-6jhm",
7391 "summary": "Command Injection in lodash",
7392 "severity": "high",
7393 "fixed_version": "4.17.21",
7394 "url": "https://osv.dev/vulnerability/GHSA-35jh-r3h4-6jhm"
7395 }
7396 ],
7397 "denied_license": false,
7398 "failing": true
7399 },
7400 {
7401 "change_type": "removed",
7402 "manifest": "package-lock.json",
7403 "ecosystem": "npm",
7404 "name": "lodash",
7405 "version": "4.17.21",
7406 "relationship": "direct",
7407 "development": false,
7408 "license": "MIT",
7409 "purl": "pkg:npm/lodash@4.17.21",
7410 "vulnerabilities": [],
7411 "denied_license": false,
7412 "failing": false
7413 }
7414 ],
7415 "passed": false,
7416 "headline": "Adds 1 vulnerable package",
7417 "fail_on": "high",
7418 "deny_licenses": []
7419 }
7420 },
7421 "get_security_settings": {
7422 "params": {
7423 "owner": "flagon-io",
7424 "name": "hello"
7425 },
7426 "response": {
7427 "settings": {
7428 "code_scanning_gate": "high",
7429 "dependency_review": true,
7430 "review_fail_on": "high",
7431 "review_deny_licenses": [
7432 "AGPL-3.0-only"
7433 ],
7434 "review_comment": true
7435 },
7436 "workspace": {
7437 "delegated_bypass": true,
7438 "validity_checks": true
7439 },
7440 "private": true,
7441 "entitled": true,
7442 "upkeep": true
7443 }
7444 },
7445 "update_security_settings": {
7446 "params": {
7447 "owner": "flagon-io",
7448 "name": "hello"
7449 },
7450 "request": {
7451 "code_scanning_gate": "high",
7452 "review_deny_licenses": [
7453 "AGPL-3.0-only"
7454 ]
7455 },
7456 "response": {
7457 "settings": {
7458 "code_scanning_gate": "high",
7459 "dependency_review": true,
7460 "review_fail_on": "high",
7461 "review_deny_licenses": [
7462 "AGPL-3.0-only"
7463 ],
7464 "review_comment": true
7465 },
7466 "workspace": {
7467 "delegated_bypass": true,
7468 "validity_checks": true
7469 },
7470 "private": true,
7471 "entitled": true,
7472 "upkeep": true
7473 },
7474 "notes": "Only what you send changes. The `Code scanning` and `Dependency review` checks gate merges once you require them in branch protection."
7475 },
7476 "get_workspace_security_settings": {
7477 "params": {
7478 "workspace": "flagon-io"
7479 },
7480 "response": {
7481 "settings": {
7482 "delegated_bypass": true,
7483 "validity_checks": true
7484 },
7485 "activated": true
7486 }
7487 },
7488 "update_workspace_security_settings": {
7489 "params": {
7490 "workspace": "flagon-io"
7491 },
7492 "request": {
7493 "delegated_bypass": true
7494 },
7495 "response": {
7496 "settings": {
7497 "delegated_bypass": true,
7498 "validity_checks": true
7499 },
7500 "activated": true
7501 }
7502 },
7503 "get_security_overview": {
7504 "params": {
7505 "workspace": "flagon-io"
7506 },
7507 "query": {
7508 "days": "30"
7509 },
7510 "response": {
7511 "activated": true,
7512 "private_hidden": 0,
7513 "totals": [
7514 {
7515 "alert_type": "secret_scanning",
7516 "open": {
7517 "critical": 1,
7518 "high": 0,
7519 "medium": 0,
7520 "low": 0,
7521 "unknown": 0
7522 },
7523 "opened": 2,
7524 "closed": 1
7525 },
7526 {
7527 "alert_type": "code_scanning",
7528 "open": {
7529 "critical": 0,
7530 "high": 3,
7531 "medium": 4,
7532 "low": 0,
7533 "unknown": 0
7534 },
7535 "opened": 7,
7536 "closed": 2
7537 },
7538 {
7539 "alert_type": "vulnerability",
7540 "open": {
7541 "critical": 0,
7542 "high": 1,
7543 "medium": 2,
7544 "low": 1,
7545 "unknown": 0
7546 },
7547 "opened": 3,
7548 "closed": 5
7549 }
7550 ],
7551 "trend": [
7552 {
7553 "day": "2026-10-05",
7554 "secret_scanning": 1,
7555 "code_scanning": 8,
7556 "vulnerability": 6
7557 },
7558 {
7559 "day": "2026-10-06",
7560 "secret_scanning": 1,
7561 "code_scanning": 7,
7562 "vulnerability": 4
7563 }
7564 ],
7565 "repos": [
7566 {
7567 "repo_id": "rep_01kp0a1b2c3d4e5f6g7h8j9k0m",
7568 "name": "hello",
7569 "private": true,
7570 "custom_patterns": 1,
7571 "validity_checks": true,
7572 "code_scanning_at": "2026-10-06T09:14:02.118Z",
7573 "dependency_review": true,
7574 "security_updates": true,
7575 "lockfiles": 1,
7576 "secrets": {
7577 "critical": 1,
7578 "high": 0,
7579 "medium": 0,
7580 "low": 0,
7581 "unknown": 0
7582 },
7583 "code": {
7584 "critical": 0,
7585 "high": 3,
7586 "medium": 4,
7587 "low": 0,
7588 "unknown": 0
7589 },
7590 "vulnerabilities": {
7591 "critical": 0,
7592 "high": 1,
7593 "medium": 2,
7594 "low": 1,
7595 "unknown": 0
7596 }
7597 }
7598 ]
7599 }
7600 },
7601 "create_label": {
7602 "request": {
7603 "label": "area: cli",
7604 "color": "1d76db",
7605 "description": "The command-line tool"
7606 },
7607 "response": {
7608 "name": "area: cli",
7609 "color": "1d76db",
7610 "description": "The command-line tool",
7611 "issues": 0,
7612 "pulls": 0
7613 }
7614 },
7615 "update_label": {
7616 "params": {
7617 "label": "area: cli"
7618 },
7619 "request": {
7620 "new_name": "cli",
7621 "color": "0052cc"
7622 },
7623 "response": {
7624 "name": "cli",
7625 "color": "0052cc",
7626 "description": "The command-line tool",
7627 "issues": 3,
7628 "pulls": 1
7629 },
7630 "notes": "Renaming a label renames it on every issue and pull request that carries it."
7631 },
7632 "delete_label": {
7633 "params": {
7634 "label": "wontfix"
7635 },
7636 "response": true
7637 },
7638 "add_default_labels": {
7639 "response": [
7640 {
7641 "name": "bug",
7642 "color": "d73a4a",
7643 "description": "Something isn't working",
7644 "issues": 4,
7645 "pulls": 1
7646 },
7647 {
7648 "name": "documentation",
7649 "color": "0075ca",
7650 "description": "Improvements or additions to documentation",
7651 "issues": 0,
7652 "pulls": 0
7653 }
7654 ],
7655 "notes": "Every label the repository has afterwards, shortened here. Labels it already had are left as they were."
7656 },
7657 "list_issue_labels": {
7658 "response": [
7659 {
7660 "name": "bug",
7661 "color": "d73a4a",
7662 "description": "Something isn't working",
7663 "issues": 4,
7664 "pulls": 1
7665 },
7666 {
7667 "name": "help wanted",
7668 "color": "008672",
7669 "description": "Extra attention is needed",
7670 "issues": 1,
7671 "pulls": 0
7672 }
7673 ]
7674 },
7675 "add_issue_labels": {
7676 "request": {
7677 "labels": [
7678 "help wanted"
7679 ]
7680 },
7681 "response": [
7682 "bug",
7683 "help wanted"
7684 ],
7685 "notes": "Returns its labels now, by name."
7686 },
7687 "set_issue_labels": {
7688 "request": {
7689 "labels": [
7690 "bug"
7691 ]
7692 },
7693 "response": [
7694 "bug"
7695 ]
7696 },
7697 "remove_issue_labels": {
7698 "response": []
7699 },
7700 "remove_issue_label": {
7701 "params": {
7702 "label": "help wanted"
7703 },
7704 "response": [
7705 "bug"
7706 ]
7707 },
7708 "list_milestones": {
7709 "response": [
7710 {
7711 "number": 3,
7712 "title": "Launch",
7713 "description": "Everything that has to land before the launch on October 14.",
7714 "due_on": "2026-10-14",
7715 "state": "open",
7716 "open_items": 5,
7717 "closed_items": 12,
7718 "created_at": "2026-09-20T09:00:00.000Z",
7719 "updated_at": "2026-10-06T16:12:40.118Z",
7720 "closed_at": null
7721 }
7722 ],
7723 "notes": "Open milestones soonest due first, then closed ones. Progress is closed_items out of open_items plus closed_items."
7724 },
7725 "create_milestone": {
7726 "request": {
7727 "title": "Launch",
7728 "description": "Everything that has to land before the launch on October 14.",
7729 "due_on": "2026-10-14"
7730 },
7731 "response": {
7732 "number": 3,
7733 "title": "Launch",
7734 "description": "Everything that has to land before the launch on October 14.",
7735 "due_on": "2026-10-14",
7736 "state": "open",
7737 "open_items": 0,
7738 "closed_items": 0,
7739 "created_at": "2026-09-20T09:00:00.000Z",
7740 "updated_at": "2026-09-20T09:00:00.000Z",
7741 "closed_at": null
7742 }
7743 },
7744 "update_milestone": {
7745 "params": {
7746 "milestone": 3
7747 },
7748 "request": {
7749 "state": "closed"
7750 },
7751 "response": {
7752 "number": 3,
7753 "title": "Launch",
7754 "description": "Everything that has to land before the launch on October 14.",
7755 "due_on": "2026-10-14",
7756 "state": "closed",
7757 "open_items": 0,
7758 "closed_items": 17,
7759 "created_at": "2026-09-20T09:00:00.000Z",
7760 "updated_at": "2026-10-14T18:00:00.000Z",
7761 "closed_at": "2026-10-14T18:00:00.000Z"
7762 }
7763 },
7764 "delete_milestone": {
7765 "params": {
7766 "milestone": 3
7767 },
7768 "response": true
7769 },
7770 "get_milestone": {
7771 "params": {
7772 "milestone": 3
7773 },
7774 "response": {
7775 "milestone": {
7776 "number": 3,
7777 "title": "Launch",
7778 "description": "Everything that has to land before the launch on October 14.",
7779 "due_on": "2026-10-14",
7780 "state": "open",
7781 "open_items": 5,
7782 "closed_items": 12,
7783 "created_at": "2026-09-20T09:00:00.000Z",
7784 "updated_at": "2026-10-06T16:12:40.118Z",
7785 "closed_at": null
7786 },
7787 "issues": [
7788 {
7789 "id": "iss_01m43shrzpfe49x74ga7sj1c6v",
7790 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
7791 "number": 12,
7792 "title": "Greeting should name the caller",
7793 "body": "Take a name from the first argument; fall back to world.",
7794 "labels": [
7795 "feature",
7796 "good first issue"
7797 ],
7798 "state": "open",
7799 "reason": null,
7800 "resolved_by": null,
7801 "author": {
7802 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
7803 "username": "syntaqx",
7804 "kind": "user",
7805 "verified": false,
7806 "workspaces": []
7807 },
7808 "requested_by": null,
7809 "created_at": "2026-10-01T18:04:11.482Z",
7810 "updated_at": "2026-10-01T18:09:47.305Z",
7811 "closed_at": null,
7812 "pull_count": 0,
7813 "comment_count": 0,
7814 "assignees": [
7815 "syntaqx"
7816 ],
7817 "blocked_by": [],
7818 "queued": false,
7819 "agent": null,
7820 "milestone": {
7821 "number": 3,
7822 "title": "Launch"
7823 }
7824 }
7825 ],
7826 "pulls": [
7827 {
7828 "id": "pr_01m43smh3vexsr5pmp60qwv0vs",
7829 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
7830 "number": 14,
7831 "issue": 12,
7832 "title": "Greeting should name the caller",
7833 "body": "Reads a name from the first argument. `hello ana` prints \"Hello, ana!\".",
7834 "agent": "claude-code",
7835 "runtime": "external",
7836 "status": "open",
7837 "fork": {
7838 "namespace": "pulls",
7839 "name": "pr_01m43smh3vexsr5pmp60qwv0vs"
7840 },
7841 "fork_repo_id": "rep_01m43smh5xd7aw2kq9tv0b4c8e",
7842 "branch": null,
7843 "head_commit": "9f2c4e1a7b3d5f60812a4c6e8b0d2f4a6c8e0b13",
7844 "merge_base": null,
7845 "merged_by": null,
7846 "merged_at": null,
7847 "superseded_by": null,
7848 "check_status": "passed",
7849 "files": [
7850 {
7851 "path": "src/main.rs",
7852 "additions": 6,
7853 "deletions": 2
7854 }
7855 ],
7856 "assignees": [],
7857 "reviewers": [
7858 "ana"
7859 ],
7860 "labels": [],
7861 "milestone": {
7862 "number": 3,
7863 "title": "Launch"
7864 },
7865 "base": "main",
7866 "author": {
7867 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
7868 "username": "syntaqx",
7869 "kind": "user",
7870 "verified": false,
7871 "workspaces": []
7872 },
7873 "requested_by": null,
7874 "created_at": "2026-10-01T18:20:02.117Z",
7875 "updated_at": "2026-10-01T18:35:44.902Z",
7876 "confidence": null
7877 }
7878 ]
7879 }
7880 },
7881 "update_pull_request": {
7882 "request": {
7883 "base": "release/1.x",
7884 "labels": [
7885 "bug"
7886 ]
7887 },
7888 "response": {
7889 "id": "pr_01m43smh3vexsr5pmp60qwv0vs",
7890 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
7891 "number": 14,
7892 "issue": 12,
7893 "title": "Greeting should name the caller",
7894 "body": "Reads a name from the first argument. `hello ana` prints \"Hello, ana!\".",
7895 "agent": "claude-code",
7896 "runtime": "external",
7897 "status": "open",
7898 "fork": {
7899 "namespace": "pulls",
7900 "name": "pr_01m43smh3vexsr5pmp60qwv0vs"
7901 },
7902 "fork_repo_id": "rep_01m43smh5xd7aw2kq9tv0b4c8e",
7903 "branch": null,
7904 "head_commit": "9f2c4e1a7b3d5f60812a4c6e8b0d2f4a6c8e0b13",
7905 "merge_base": null,
7906 "merged_by": null,
7907 "merged_at": null,
7908 "superseded_by": null,
7909 "check_status": "passed",
7910 "files": [
7911 {
7912 "path": "src/main.rs",
7913 "additions": 6,
7914 "deletions": 2
7915 }
7916 ],
7917 "assignees": [],
7918 "reviewers": [
7919 "ana"
7920 ],
7921 "labels": [
7922 "bug"
7923 ],
7924 "milestone": null,
7925 "base": "release/1.x",
7926 "author": {
7927 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
7928 "username": "syntaqx",
7929 "kind": "user",
7930 "verified": false,
7931 "workspaces": []
7932 },
7933 "requested_by": null,
7934 "created_at": "2026-10-01T18:20:02.117Z",
7935 "updated_at": "2026-10-01T18:35:44.902Z",
7936 "confidence": null
7937 },
7938 "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."
7939 }
7940}