Skip to content

g1t/apps/api/src/reference.json

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