g1t/apps/api/src/reference.json

4,238 lines124,021 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": ["repo:read", "issues:read", "issues:write", "pull_requests:read", "pull_requests:write"]
47 }
48 },
49 "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/)."
50 },
51 "create_workspace": {
52 "request": {
53 "slug": "acme-labs",
54 "name": "Acme Labs"
55 },
56 "response": {
57 "id": "wsp_01m43teqa9em6bje0bhvdj4jkb",
58 "slug": "acme-labs",
59 "name": "Acme Labs",
60 "description": null,
61 "created_at": "2026-10-04T16:02:51.337Z",
62 "member_count": 1,
63 "base_permission": "write"
64 },
65 "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/)."
66 },
67 "update_workspace": {
68 "params": {
69 "workspace": "acme-labs"
70 },
71 "request": {
72 "name": "Acme Labs",
73 "description": "Rockets, and the software that flies them."
74 },
75 "response": {
76 "id": "wsp_01m43teqa9em6bje0bhvdj4jkb",
77 "slug": "acme-labs",
78 "name": "Acme Labs",
79 "description": "Rockets, and the software that flies them.",
80 "created_at": "2026-10-04T16:02:51.337Z",
81 "member_count": 3,
82 "base_permission": "write"
83 },
84 "notes": "Only the fields given change. `name` is the display name; the slug, the first part of the workspace's addresses, stays as it is. `base_permission` needs the `access:admin` scope as well as `workspace:admin`; [`set_base_permission`](/reference/api/access/set-base-permission/) sets it alone. Refused with `403` for anyone but an owner signed in as a person. Recorded in the [audit log](/guides/audit-log/). See [Workspaces](/guides/workspaces/)."
85 },
86 "delete_workspace": {
87 "request": {
88 "confirm": "acme-labs"
89 },
90 "response": true,
91 "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)."
92 },
93 "list_emails": {
94 "response": {
95 "emails": [
96 {
97 "email": "ada@example.com",
98 "verified": true,
99 "primary": true,
100 "backup": false,
101 "created_at": "2026-09-01T10:00:00.000Z",
102 "verified_at": "2026-09-01T10:02:11.000Z"
103 },
104 {
105 "email": "ada@acme.com",
106 "verified": true,
107 "primary": false,
108 "backup": true,
109 "created_at": "2026-10-02T09:30:00.000Z",
110 "verified_at": "2026-10-02T09:31:40.000Z"
111 },
112 {
113 "email": "ada.l@example.org",
114 "verified": false,
115 "primary": false,
116 "backup": false,
117 "created_at": "2026-10-05T14:12:03.000Z",
118 "verified_at": null
119 }
120 ],
121 "private_email": true,
122 "block_private_pushes": false,
123 "noreply": "6c1d0efg+ada@users.noreply.g1t.sh",
124 "commit_email": "6c1d0efg+ada@users.noreply.g1t.sh",
125 "limit": 10
126 },
127 "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)."
128 },
129 "add_email": {
130 "request": {
131 "email": "ada.l@example.org",
132 "password": "…"
133 },
134 "response": {
135 "emails": [
136 {
137 "email": "ada@example.com",
138 "verified": true,
139 "primary": true,
140 "backup": false,
141 "created_at": "2026-09-01T10:00:00.000Z",
142 "verified_at": "2026-09-01T10:02:11.000Z"
143 },
144 {
145 "email": "ada@acme.com",
146 "verified": true,
147 "primary": false,
148 "backup": true,
149 "created_at": "2026-10-02T09:30:00.000Z",
150 "verified_at": "2026-10-02T09:31:40.000Z"
151 },
152 {
153 "email": "ada.l@example.org",
154 "verified": false,
155 "primary": false,
156 "backup": false,
157 "created_at": "2026-10-05T14:12:03.000Z",
158 "verified_at": null
159 }
160 ],
161 "private_email": true,
162 "block_private_pushes": false,
163 "noreply": "6c1d0efg+ada@users.noreply.g1t.sh",
164 "commit_email": "6c1d0efg+ada@users.noreply.g1t.sh",
165 "limit": 10
166 },
167 "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."
168 },
169 "remove_email": {
170 "request": {
171 "password": "…"
172 },
173 "response": {
174 "emails": [
175 {
176 "email": "ada@example.com",
177 "verified": true,
178 "primary": true,
179 "backup": false,
180 "created_at": "2026-09-01T10:00:00.000Z",
181 "verified_at": "2026-09-01T10:02:11.000Z"
182 },
183 {
184 "email": "ada@acme.com",
185 "verified": true,
186 "primary": false,
187 "backup": true,
188 "created_at": "2026-10-02T09:30:00.000Z",
189 "verified_at": "2026-10-02T09:31:40.000Z"
190 },
191 {
192 "email": "ada.l@example.org",
193 "verified": false,
194 "primary": false,
195 "backup": false,
196 "created_at": "2026-10-05T14:12:03.000Z",
197 "verified_at": null
198 }
199 ],
200 "private_email": true,
201 "block_private_pushes": false,
202 "noreply": "6c1d0efg+ada@users.noreply.g1t.sh",
203 "commit_email": "6c1d0efg+ada@users.noreply.g1t.sh",
204 "limit": 10
205 },
206 "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."
207 },
208 "update_email_settings": {
209 "request": {
210 "primary": "ada@acme.com",
211 "password": "…"
212 },
213 "response": {
214 "emails": [
215 {
216 "email": "ada@example.com",
217 "verified": true,
218 "primary": true,
219 "backup": false,
220 "created_at": "2026-09-01T10:00:00.000Z",
221 "verified_at": "2026-09-01T10:02:11.000Z"
222 },
223 {
224 "email": "ada@acme.com",
225 "verified": true,
226 "primary": false,
227 "backup": true,
228 "created_at": "2026-10-02T09:30:00.000Z",
229 "verified_at": "2026-10-02T09:31:40.000Z"
230 },
231 {
232 "email": "ada.l@example.org",
233 "verified": false,
234 "primary": false,
235 "backup": false,
236 "created_at": "2026-10-05T14:12:03.000Z",
237 "verified_at": null
238 }
239 ],
240 "private_email": true,
241 "block_private_pushes": false,
242 "noreply": "6c1d0efg+ada@users.noreply.g1t.sh",
243 "commit_email": "6c1d0efg+ada@users.noreply.g1t.sh",
244 "limit": 10
245 },
246 "notes": "Only the fields given change. `primary` and `backup` need `password`; `private_email` and `block_private_pushes` do not."
247 },
248 "list_invites": {
249 "response": {
250 "mode": "invite",
251 "allowance": {
252 "limit": 5,
253 "used": 2,
254 "remaining": 3
255 },
256 "workspaces": [
257 {
258 "slug": "acme-labs",
259 "allowance": {
260 "limit": 20,
261 "used": 4,
262 "remaining": 16
263 }
264 }
265 ],
266 "invites": [
267 {
268 "id": "inv_01kp2x7m8n9q0r1s2t3v4w5x6y",
269 "code": "g1t-k7m2-q9xd-4hpw-…",
270 "hint": "g1t-k7m2",
271 "email": "ada@example.com",
272 "kind": "account",
273 "workspace": null,
274 "status": "pending",
275 "charged_to": "user",
276 "invited_by": "syntaqx",
277 "redeemed_by": null,
278 "created_at": "2026-10-05T17:00:00.000Z",
279 "expires_at": "2026-11-04T17:00:00.000Z",
280 "redeemed_at": null,
281 "revoked_at": null
282 },
283 {
284 "id": "inv_01kp1v3c4d5e6f7g8h9j0k1m2n",
285 "code": null,
286 "hint": "g1t-p3rt",
287 "email": null,
288 "kind": "account",
289 "workspace": null,
290 "status": "redeemed",
291 "charged_to": "user",
292 "invited_by": "syntaqx",
293 "redeemed_by": "grace",
294 "created_at": "2026-10-02T09:12:40.000Z",
295 "expires_at": "2026-11-01T09:12:40.000Z",
296 "redeemed_at": "2026-10-02T11:30:05.000Z",
297 "revoked_at": null
298 }
299 ]
300 },
301 "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)."
302 },
303 "create_invite": {
304 "request": {
305 "email": "ada@example.com"
306 },
307 "response": {
308 "id": "inv_01kp2x7m8n9q0r1s2t3v4w5x6y",
309 "code": "g1t-k7m2-q9xd-4hpw-…",
310 "hint": "g1t-k7m2",
311 "email": "ada@example.com",
312 "kind": "account",
313 "workspace": null,
314 "status": "pending",
315 "charged_to": "user",
316 "invited_by": "syntaqx",
317 "redeemed_by": null,
318 "created_at": "2026-10-05T17:00:00.000Z",
319 "expires_at": "2026-11-04T17:00:00.000Z",
320 "redeemed_at": null,
321 "revoked_at": null
322 },
323 "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>`."
324 },
325 "revoke_invite": {
326 "response": {
327 "id": "inv_01kp2x7m8n9q0r1s2t3v4w5x6y",
328 "code": null,
329 "hint": "g1t-k7m2",
330 "email": "ada@example.com",
331 "kind": "account",
332 "workspace": null,
333 "status": "revoked",
334 "charged_to": "user",
335 "invited_by": "syntaqx",
336 "redeemed_by": null,
337 "created_at": "2026-10-05T17:00:00.000Z",
338 "expires_at": "2026-11-04T17:00:00.000Z",
339 "redeemed_at": null,
340 "revoked_at": "2026-10-06T08:00:00.000Z"
341 }
342 },
343 "list_workspace_invites": {
344 "response": [
345 {
346 "id": "inv_01kp2x7m8n9q0r1s2t3v4w5x6y",
347 "code": "g1t-k7m2-q9xd-4hpw-…",
348 "hint": "g1t-k7m2",
349 "email": "ada@example.com",
350 "kind": "account",
351 "workspace": "acme-labs",
352 "status": "pending",
353 "charged_to": "workspace",
354 "invited_by": "syntaqx",
355 "redeemed_by": null,
356 "created_at": "2026-10-05T17:00:00.000Z",
357 "expires_at": "2026-11-04T17:00:00.000Z",
358 "redeemed_at": null,
359 "revoked_at": null
360 },
361 {
362 "id": "inv_01kp1z9y8x7w6v5t4s3r2q1p0n",
363 "code": "g1t-k7m2-q9xd-4hpw-…",
364 "hint": "g1t-w2vb",
365 "email": "linus@example.com",
366 "kind": "workspace",
367 "workspace": "acme-labs",
368 "status": "pending",
369 "charged_to": "none",
370 "invited_by": "syntaqx",
371 "redeemed_by": null,
372 "created_at": "2026-10-05T17:00:00.000Z",
373 "expires_at": "2026-11-04T17:00:00.000Z",
374 "redeemed_at": null,
375 "revoked_at": null
376 }
377 ]
378 },
379 "invite_member": {
380 "request": {
381 "email": "ada@example.com"
382 },
383 "response": {
384 "id": "inv_01kp2x7m8n9q0r1s2t3v4w5x6y",
385 "code": "g1t-k7m2-q9xd-4hpw-…",
386 "hint": "g1t-k7m2",
387 "email": "ada@example.com",
388 "kind": "account",
389 "workspace": "acme-labs",
390 "status": "pending",
391 "charged_to": "workspace",
392 "invited_by": "syntaqx",
393 "redeemed_by": null,
394 "created_at": "2026-10-05T17:00:00.000Z",
395 "expires_at": "2026-11-04T17:00:00.000Z",
396 "redeemed_at": null,
397 "revoked_at": null
398 },
399 "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."
400 },
401 "revoke_workspace_invite": {
402 "response": {
403 "id": "inv_01kp2x7m8n9q0r1s2t3v4w5x6y",
404 "code": null,
405 "hint": "g1t-k7m2",
406 "email": "ada@example.com",
407 "kind": "account",
408 "workspace": "acme-labs",
409 "status": "revoked",
410 "charged_to": "workspace",
411 "invited_by": "syntaqx",
412 "redeemed_by": null,
413 "created_at": "2026-10-05T17:00:00.000Z",
414 "expires_at": "2026-11-04T17:00:00.000Z",
415 "redeemed_at": null,
416 "revoked_at": "2026-10-06T08:00:00.000Z"
417 }
418 },
419 "list_repos": {
420 "query": {
421 "q": "hello"
422 },
423 "response": [
424 {
425 "id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
426 "namespace": "flagon-io",
427 "name": "hello",
428 "description": "A tiny service that says hello.",
429 "is_private": false,
430 "owner_id": "usr_01kkntcg1eeb98j62xjm7eh09p",
431 "default_branch": "main",
432 "fork_of": null,
433 "protected": true,
434 "created_at": "2026-09-28T14:11:52.640Z",
435 "website": "https://hello.g1t.page",
436 "archived_at": null
437 }
438 ],
439 "notes": "Returns at most 50 repositories, newest first. Forks made for pull requests are left out."
440 },
441 "create_repo": {
442 "request": {
443 "workspace": "flagon-io",
444 "name": "hello-cli",
445 "description": "Command-line client for hello.",
446 "private": false
447 },
448 "response": {
449 "id": "rep_01m43tk1jhehztx23drs87f5fc",
450 "namespace": "flagon-io",
451 "name": "hello-cli",
452 "description": "Command-line client for hello.",
453 "is_private": false,
454 "owner_id": "usr_01kkntcg1eeb98j62xjm7eh09p",
455 "default_branch": "main",
456 "fork_of": null,
457 "protected": false,
458 "created_at": "2026-10-04T16:05:12.913Z",
459 "website": "https://hello.g1t.page",
460 "archived_at": null
461 },
462 "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."
463 },
464 "get_repo": {
465 "response": {
466 "id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
467 "namespace": "flagon-io",
468 "name": "hello",
469 "description": "A tiny service that says hello.",
470 "is_private": false,
471 "owner_id": "usr_01kkntcg1eeb98j62xjm7eh09p",
472 "default_branch": "main",
473 "fork_of": null,
474 "protected": true,
475 "created_at": "2026-09-28T14:11:52.640Z",
476 "website": "https://hello.g1t.page",
477 "archived_at": null
478 }
479 },
480 "update_repo": {
481 "request": {
482 "description": "Says hello, politely.",
483 "website": "hello.g1t.page",
484 "default_branch": "trunk",
485 "protected": true
486 },
487 "response": {
488 "id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
489 "namespace": "flagon-io",
490 "name": "hello",
491 "description": "Says hello, politely.",
492 "is_private": false,
493 "owner_id": "usr_01kkntcg1eeb98j62xjm7eh09p",
494 "default_branch": "trunk",
495 "fork_of": null,
496 "protected": true,
497 "created_at": "2026-09-28T14:11:52.640Z",
498 "topics": [
499 "http",
500 "example"
501 ],
502 "website": "https://hello.g1t.page",
503 "archived_at": null
504 },
505 "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/)."
506 },
507 "transfer_repo": {
508 "request": {
509 "to": "flagon-io"
510 },
511 "response": {
512 "id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
513 "namespace": "flagon-io",
514 "name": "hello",
515 "description": "A tiny service that says hello.",
516 "is_private": false,
517 "owner_id": "usr_01kkntcg1eeb98j62xjm7eh09p",
518 "default_branch": "main",
519 "fork_of": null,
520 "protected": true,
521 "created_at": "2026-09-28T14:11:52.640Z",
522 "website": "https://hello.g1t.page",
523 "archived_at": null
524 },
525 "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/)."
526 },
527 "rename_repo": {
528 "request": {
529 "name": "greeter"
530 },
531 "response": {
532 "id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
533 "namespace": "flagon-io",
534 "name": "greeter",
535 "description": "A tiny service that says hello.",
536 "is_private": false,
537 "owner_id": "usr_01kkntcg1eeb98j62xjm7eh09p",
538 "default_branch": "main",
539 "fork_of": null,
540 "protected": true,
541 "created_at": "2026-09-28T14:11:52.640Z",
542 "topics": [
543 "http",
544 "example"
545 ],
546 "website": "https://hello.g1t.page",
547 "archived_at": null
548 },
549 "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)."
550 },
551 "rename_branch": {
552 "params": {
553 "owner": "flagon-io",
554 "name": "hello",
555 "branch": "feature/login"
556 },
557 "request": {
558 "new_name": "feature/sign-in"
559 },
560 "response": {
561 "id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
562 "namespace": "flagon-io",
563 "name": "hello",
564 "description": "A tiny service that says hello.",
565 "is_private": false,
566 "owner_id": "usr_01kkntcg1eeb98j62xjm7eh09p",
567 "default_branch": "main",
568 "fork_of": null,
569 "protected": true,
570 "created_at": "2026-09-28T14:11:52.640Z",
571 "topics": [
572 "http",
573 "example"
574 ],
575 "website": "https://hello.g1t.page",
576 "archived_at": null
577 },
578 "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)."
579 },
580 "set_repo_visibility": {
581 "request": {
582 "private": true,
583 "confirm": "flagon-io/hello"
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": true,
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": "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)."
604 },
605 "archive_repo": {
606 "response": {
607 "id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
608 "namespace": "flagon-io",
609 "name": "hello",
610 "description": "A tiny service that says hello.",
611 "is_private": false,
612 "owner_id": "usr_01kkntcg1eeb98j62xjm7eh09p",
613 "default_branch": "main",
614 "fork_of": null,
615 "protected": true,
616 "created_at": "2026-09-28T14:11:52.640Z",
617 "topics": [
618 "http",
619 "example"
620 ],
621 "website": "https://hello.g1t.page",
622 "archived_at": "2026-10-05T09:30:00.000Z"
623 },
624 "notes": "The repository, with `archived_at` set. Needs the Admin role (`403` otherwise). See [Archive a repository](/guides/managing-repositories/#archive-a-repository)."
625 },
626 "unarchive_repo": {
627 "response": {
628 "id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
629 "namespace": "flagon-io",
630 "name": "hello",
631 "description": "A tiny service that says hello.",
632 "is_private": false,
633 "owner_id": "usr_01kkntcg1eeb98j62xjm7eh09p",
634 "default_branch": "main",
635 "fork_of": null,
636 "protected": true,
637 "created_at": "2026-09-28T14:11:52.640Z",
638 "topics": [
639 "http",
640 "example"
641 ],
642 "website": "https://hello.g1t.page",
643 "archived_at": null
644 },
645 "notes": "The repository, with `archived_at` null. Needs the Admin role (`403` otherwise)."
646 },
647 "delete_repo": {
648 "request": {
649 "confirm": "flagon-io/hello"
650 },
651 "response": {
652 "id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
653 "namespace": "flagon-io",
654 "name": "hello",
655 "description": "A tiny service that says hello.",
656 "is_private": false,
657 "deleted_at": "2026-10-05T09:30:00.000Z",
658 "deleted_by": "syntaqx",
659 "purge_after": "2026-11-04T09:30:00.000Z"
660 },
661 "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)."
662 },
663 "list_deleted_repos": {
664 "params": {
665 "workspace": "flagon-io"
666 },
667 "response": [
668 {
669 "id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
670 "namespace": "flagon-io",
671 "name": "hello",
672 "description": "A tiny service that says hello.",
673 "is_private": false,
674 "deleted_at": "2026-10-05T09:30:00.000Z",
675 "deleted_by": "syntaqx",
676 "purge_after": "2026-11-04T09:30:00.000Z"
677 }
678 ],
679 "notes": "Newest first. Empty for anyone who is not an owner of the workspace."
680 },
681 "restore_repo": {
682 "response": {
683 "id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
684 "namespace": "flagon-io",
685 "name": "hello",
686 "description": "A tiny service that says hello.",
687 "is_private": false,
688 "owner_id": "usr_01kkntcg1eeb98j62xjm7eh09p",
689 "default_branch": "main",
690 "fork_of": null,
691 "protected": true,
692 "created_at": "2026-09-28T14:11:52.640Z",
693 "topics": [
694 "http",
695 "example"
696 ],
697 "website": "https://hello.g1t.page",
698 "archived_at": null
699 },
700 "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)."
701 },
702 "purge_repo": {
703 "request": {
704 "confirm": "flagon-io/hello"
705 },
706 "response": true,
707 "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."
708 },
709 "get_repo_settings": {
710 "response": {
711 "auto_merge": false,
712 "required_checks": [
713 "CI"
714 ],
715 "require_up_to_date": false,
716 "required_approvals": 0,
717 "count_agent_approvals": true,
718 "allow_ignoring_checks": true,
719 "agent_review": true,
720 "max_revisions": 2,
721 "merge_queue": false,
722 "hold_low_confidence": true,
723 "updated_by": null,
724 "updated_at": null
725 }
726 },
727 "update_repo_settings": {
728 "request": {
729 "required_checks": [
730 "CI",
731 "g1t / deploy"
732 ],
733 "required_approvals": 1,
734 "count_agent_approvals": false,
735 "merge_queue": true
736 },
737 "response": {
738 "auto_merge": false,
739 "required_checks": [
740 "CI",
741 "g1t / deploy"
742 ],
743 "require_up_to_date": false,
744 "required_approvals": 1,
745 "count_agent_approvals": false,
746 "allow_ignoring_checks": true,
747 "agent_review": true,
748 "max_revisions": 2,
749 "merge_queue": true,
750 "hold_low_confidence": true,
751 "updated_by": "syntaqx",
752 "updated_at": "2026-10-04T16:20:37.508Z"
753 },
754 "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)."
755 },
756 "list_check_names": {
757 "response": [
758 {
759 "name": "CI",
760 "events": [
761 "pull_request",
762 "merge_group",
763 "push"
764 ],
765 "last_seen": "2026-10-06T09:14:02.118Z"
766 },
767 {
768 "name": "g1t / deploy",
769 "events": [],
770 "last_seen": "2026-10-06T08:51:40.006Z"
771 }
772 ],
773 "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."
774 },
775 "list_events": {
776 "query": {
777 "before": "evt_01m43t2a6c9e3g7j1m5q9t3x7b"
778 },
779 "response": [
780 {
781 "id": "evt_01m43smh3ve52vkcna207vqctf",
782 "type": "pull.opened",
783 "source": "work",
784 "time": "2026-10-01T18:20:02.117Z",
785 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
786 "actor": "usr_01kkntcg1eeb98j62xjm7eh09p",
787 "data": {
788 "pull_id": "pr_01m43smh3vexsr5pmp60qwv0vs",
789 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
790 "number": 14,
791 "issue": 12,
792 "agent": "claude-code"
793 }
794 },
795 {
796 "id": "evt_01m43shrzpf2vt5rxbb02z0xjt",
797 "type": "issue.opened",
798 "source": "work",
799 "time": "2026-10-01T18:04:11.482Z",
800 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
801 "actor": "usr_01kkntcg1eeb98j62xjm7eh09p",
802 "data": {
803 "issue_id": "iss_01m43shrzpfe49x74ga7sj1c6v",
804 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
805 "number": 12,
806 "title": "Greeting should name the caller"
807 }
808 }
809 ],
810 "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`."
811 },
812 "list_issues": {
813 "query": {
814 "state": "open",
815 "label": "feature"
816 },
817 "response": [
818 {
819 "id": "iss_01m43shrzpfe49x74ga7sj1c6v",
820 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
821 "number": 12,
822 "title": "Greeting should name the caller",
823 "body": "Take a name from the first argument; fall back to world.",
824 "labels": [
825 "feature"
826 ],
827 "state": "open",
828 "reason": null,
829 "resolved_by": null,
830 "author": {
831 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
832 "username": "syntaqx",
833 "kind": "user",
834 "verified": false,
835 "workspaces": []
836 },
837 "requested_by": null,
838 "created_at": "2026-10-01T18:04:11.482Z",
839 "updated_at": "2026-10-01T18:04:11.482Z",
840 "closed_at": null,
841 "pull_count": 1,
842 "comment_count": 0,
843 "assignees": [],
844 "blocked_by": [],
845 "queued": false,
846 "agent": "claude-code"
847 }
848 ],
849 "notes": "Returns at most 100 issues, newest first. `comment_count` counts comments, not events such as \"opened #14 for this\"."
850 },
851 "create_issue": {
852 "request": {
853 "title": "Greeting should name the caller",
854 "body": "Take a name from the first argument; fall back to world.",
855 "labels": [
856 "feature"
857 ]
858 },
859 "response": {
860 "id": "iss_01m43shrzpfe49x74ga7sj1c6v",
861 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
862 "number": 12,
863 "title": "Greeting should name the caller",
864 "body": "Take a name from the first argument; fall back to world.",
865 "labels": [
866 "feature"
867 ],
868 "state": "open",
869 "reason": null,
870 "resolved_by": null,
871 "author": {
872 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
873 "username": "syntaqx",
874 "kind": "user",
875 "verified": false,
876 "workspaces": []
877 },
878 "requested_by": null,
879 "created_at": "2026-10-01T18:04:11.482Z",
880 "updated_at": "2026-10-01T18:04:11.482Z",
881 "closed_at": null,
882 "pull_count": 0,
883 "comment_count": 0,
884 "assignees": [],
885 "blocked_by": [],
886 "queued": false,
887 "agent": null
888 },
889 "notes": "Labels are lowercased. A label not used before is created."
890 },
891 "get_issue": {
892 "response": {
893 "issue": {
894 "id": "iss_01m43shrzpfe49x74ga7sj1c6v",
895 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
896 "number": 12,
897 "title": "Greeting should name the caller",
898 "body": "Take a name from the first argument; fall back to world.",
899 "labels": [
900 "feature"
901 ],
902 "state": "closed",
903 "reason": "completed",
904 "resolved_by": 14,
905 "author": {
906 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
907 "username": "syntaqx",
908 "kind": "user",
909 "verified": false,
910 "workspaces": []
911 },
912 "requested_by": null,
913 "created_at": "2026-10-01T18:04:11.482Z",
914 "updated_at": "2026-10-01T18:52:17.093Z",
915 "closed_at": "2026-10-01T18:52:17.093Z",
916 "pull_count": 2,
917 "comment_count": 0,
918 "assignees": [],
919 "blocked_by": [],
920 "queued": false,
921 "agent": null
922 },
923 "pulls": [
924 {
925 "id": "pr_01m43sjq8tcz5rbm2a7k4d9e6w",
926 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
927 "number": 13,
928 "issue": 12,
929 "title": "Greeting should name the caller",
930 "body": null,
931 "agent": "claude-code",
932 "runtime": "external",
933 "status": "closed",
934 "fork": {
935 "namespace": "pulls",
936 "name": "pr_01m43sjq8tcz5rbm2a7k4d9e6w"
937 },
938 "fork_repo_id": "rep_01m43smh5xd7aw2kq9tv0b4c8e",
939 "branch": null,
940 "head_commit": null,
941 "merge_base": null,
942 "merged_by": null,
943 "merged_at": null,
944 "superseded_by": 14,
945 "check_status": null,
946 "files": [],
947 "assignees": [],
948 "reviewers": [],
949 "author": {
950 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
951 "username": "syntaqx",
952 "kind": "user",
953 "verified": false,
954 "workspaces": []
955 },
956 "requested_by": null,
957 "created_at": "2026-10-01T18:20:02.117Z",
958 "updated_at": "2026-10-01T18:20:02.117Z"
959 },
960 {
961 "id": "pr_01m43smh3vexsr5pmp60qwv0vs",
962 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
963 "number": 14,
964 "issue": 12,
965 "title": "Greeting should name the caller",
966 "body": "Reads a name from the first argument. `hello ana` prints \"Hello, ana!\".",
967 "agent": "claude-code",
968 "runtime": "external",
969 "status": "merged",
970 "fork": {
971 "namespace": "pulls",
972 "name": "pr_01m43smh3vexsr5pmp60qwv0vs"
973 },
974 "fork_repo_id": "rep_01m43smh5xd7aw2kq9tv0b4c8e",
975 "branch": null,
976 "head_commit": "9f2c4e1a7b3d5f60812a4c6e8b0d2f4a6c8e0b13",
977 "merge_base": "3a7e9c1b5d2f4a6c8e0b2d4f6a8c0e2b4d6f8a1c",
978 "merged_by": "syntaqx",
979 "merged_at": "2026-10-01T18:52:17.093Z",
980 "superseded_by": null,
981 "check_status": "passed",
982 "files": [
983 {
984 "path": "src/main.rs",
985 "additions": 6,
986 "deletions": 2
987 }
988 ],
989 "assignees": [],
990 "reviewers": [
991 "ana"
992 ],
993 "author": {
994 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
995 "username": "syntaqx",
996 "kind": "user",
997 "verified": false,
998 "workspaces": []
999 },
1000 "requested_by": null,
1001 "created_at": "2026-10-01T18:20:02.117Z",
1002 "updated_at": "2026-10-01T18:52:17.093Z"
1003 }
1004 ],
1005 "comments": [
1006 {
1007 "id": "cmt_01m43sr2b7d5f0j6k3n8p1q4v9",
1008 "kind": "event",
1009 "author": {
1010 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
1011 "username": "syntaqx",
1012 "kind": "user",
1013 "verified": false,
1014 "workspaces": []
1015 },
1016 "body": "opened #14 for this",
1017 "path": null,
1018 "line": null,
1019 "verdict": null,
1020 "created_at": "2026-10-01T18:20:02.141Z"
1021 }
1022 ]
1023 },
1024 "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."
1025 },
1026 "update_issue": {
1027 "request": {
1028 "labels": [
1029 "feature",
1030 "good first issue"
1031 ],
1032 "assignees": [
1033 "syntaqx"
1034 ]
1035 },
1036 "response": {
1037 "id": "iss_01m43shrzpfe49x74ga7sj1c6v",
1038 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
1039 "number": 12,
1040 "title": "Greeting should name the caller",
1041 "body": "Take a name from the first argument; fall back to world.",
1042 "labels": [
1043 "feature",
1044 "good first issue"
1045 ],
1046 "state": "open",
1047 "reason": null,
1048 "resolved_by": null,
1049 "author": {
1050 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
1051 "username": "syntaqx",
1052 "kind": "user",
1053 "verified": false,
1054 "workspaces": []
1055 },
1056 "requested_by": null,
1057 "created_at": "2026-10-01T18:04:11.482Z",
1058 "updated_at": "2026-10-01T18:09:47.305Z",
1059 "closed_at": null,
1060 "pull_count": 0,
1061 "comment_count": 0,
1062 "assignees": [
1063 "syntaqx"
1064 ],
1065 "blocked_by": [],
1066 "queued": false,
1067 "agent": null
1068 }
1069 },
1070 "close_issue": {
1071 "request": {
1072 "reason": "not_planned"
1073 },
1074 "response": {
1075 "id": "iss_01m43shrzpfe49x74ga7sj1c6v",
1076 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
1077 "number": 12,
1078 "title": "Greeting should name the caller",
1079 "body": "Take a name from the first argument; fall back to world.",
1080 "labels": [
1081 "feature"
1082 ],
1083 "state": "closed",
1084 "reason": "not_planned",
1085 "resolved_by": null,
1086 "author": {
1087 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
1088 "username": "syntaqx",
1089 "kind": "user",
1090 "verified": false,
1091 "workspaces": []
1092 },
1093 "requested_by": null,
1094 "created_at": "2026-10-01T18:04:11.482Z",
1095 "updated_at": "2026-10-01T19:30:00.214Z",
1096 "closed_at": "2026-10-01T19:30:00.214Z",
1097 "pull_count": 0,
1098 "comment_count": 0,
1099 "assignees": [],
1100 "blocked_by": [],
1101 "queued": false,
1102 "agent": null
1103 }
1104 },
1105 "reopen_issue": {
1106 "response": {
1107 "id": "iss_01m43shrzpfe49x74ga7sj1c6v",
1108 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
1109 "number": 12,
1110 "title": "Greeting should name the caller",
1111 "body": "Take a name from the first argument; fall back to world.",
1112 "labels": [
1113 "feature"
1114 ],
1115 "state": "open",
1116 "reason": null,
1117 "resolved_by": null,
1118 "author": {
1119 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
1120 "username": "syntaqx",
1121 "kind": "user",
1122 "verified": false,
1123 "workspaces": []
1124 },
1125 "requested_by": null,
1126 "created_at": "2026-10-01T18:04:11.482Z",
1127 "updated_at": "2026-10-01T19:41:52.830Z",
1128 "closed_at": null,
1129 "pull_count": 0,
1130 "comment_count": 0,
1131 "assignees": [],
1132 "blocked_by": [],
1133 "queued": false,
1134 "agent": null
1135 }
1136 },
1137 "assign_issue": {
1138 "request": {
1139 "instructions": "Keep the change to src/main.rs."
1140 },
1141 "response": {
1142 "id": "pr_01m43smh3vexsr5pmp60qwv0vs",
1143 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
1144 "number": 14,
1145 "issue": 12,
1146 "title": "Greeting should name the caller",
1147 "body": null,
1148 "agent": "g1t",
1149 "runtime": "hosted",
1150 "status": "draft",
1151 "fork": {
1152 "namespace": "pulls",
1153 "name": "pr_01m43smh3vexsr5pmp60qwv0vs"
1154 },
1155 "fork_repo_id": "rep_01m43smh5xd7aw2kq9tv0b4c8e",
1156 "branch": null,
1157 "head_commit": null,
1158 "merge_base": null,
1159 "merged_by": null,
1160 "merged_at": null,
1161 "superseded_by": null,
1162 "check_status": null,
1163 "files": [],
1164 "assignees": [],
1165 "reviewers": [],
1166 "author": {
1167 "id": "usr_g1t_agent",
1168 "username": "g1t",
1169 "kind": "agent",
1170 "verified": false,
1171 "workspaces": []
1172 },
1173 "requested_by": {
1174 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
1175 "username": "syntaqx",
1176 "kind": "user",
1177 "verified": false,
1178 "workspaces": []
1179 },
1180 "created_at": "2026-10-01T18:20:02.117Z",
1181 "updated_at": "2026-10-01T18:20:02.117Z",
1182 "confidence": null
1183 },
1184 "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."
1185 },
1186 "delegate": {
1187 "request": {
1188 "title": "Retry webhooks with exponential backoff",
1189 "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."
1190 },
1191 "response": {
1192 "issue": {
1193 "id": "iss_01m4a2c8v1t7k3q9x5n0r2w6yd",
1194 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
1195 "number": 41,
1196 "title": "Retry webhooks with exponential backoff",
1197 "body": "Deliveries that fail are dropped today. Retry them with exponential backoff, up to six times, then mark the delivery failed.",
1198 "labels": [],
1199 "state": "open",
1200 "reason": null,
1201 "resolved_by": null,
1202 "author": {
1203 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
1204 "username": "syntaqx",
1205 "kind": "user",
1206 "verified": false,
1207 "workspaces": []
1208 },
1209 "requested_by": null,
1210 "created_at": "2026-10-05T14:02:11.204Z",
1211 "updated_at": "2026-10-05T14:02:11.204Z",
1212 "closed_at": null,
1213 "pull_count": 1,
1214 "comment_count": 0,
1215 "assignees": [],
1216 "blocked_by": [],
1217 "queued": false,
1218 "agent": "g1t"
1219 },
1220 "pull": {
1221 "id": "pr_01m4a2c9b6e0h4m8q2t6x0a4d8",
1222 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
1223 "number": 42,
1224 "issue": 41,
1225 "title": "Retry webhooks with exponential backoff",
1226 "body": null,
1227 "agent": "g1t",
1228 "runtime": "hosted",
1229 "status": "draft",
1230 "fork": {
1231 "namespace": "pulls",
1232 "name": "pr_01m4a2c9b6e0h4m8q2t6x0a4d8"
1233 },
1234 "fork_repo_id": "rep_01m4a2c9d2g6k0n4r8v2z6c0f4",
1235 "branch": null,
1236 "head_commit": null,
1237 "merge_base": null,
1238 "merged_by": null,
1239 "merged_at": null,
1240 "superseded_by": null,
1241 "check_status": null,
1242 "files": [],
1243 "assignees": [],
1244 "reviewers": [],
1245 "author": {
1246 "id": "usr_g1t_agent",
1247 "username": "g1t",
1248 "kind": "agent",
1249 "verified": false,
1250 "workspaces": []
1251 },
1252 "requested_by": {
1253 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
1254 "username": "syntaqx",
1255 "kind": "user",
1256 "verified": false,
1257 "workspaces": []
1258 },
1259 "created_at": "2026-10-05T14:02:12.880Z",
1260 "updated_at": "2026-10-05T14:02:12.880Z",
1261 "confidence": null
1262 },
1263 "agent": {
1264 "status": "started",
1265 "code": null,
1266 "message": null,
1267 "fix_url": null
1268 }
1269 },
1270 "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)."
1271 },
1272 "add_comment": {
1273 "request": {
1274 "body": "Should an empty name fall back to \"world\"?"
1275 },
1276 "response": {
1277 "id": "cmt_01m43sv4c8e2g6j0m4q8t2x6a1",
1278 "kind": "comment",
1279 "author": {
1280 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
1281 "username": "syntaqx",
1282 "kind": "user",
1283 "verified": true,
1284 "workspaces": [
1285 {
1286 "slug": "flagon-io",
1287 "role": "owner"
1288 }
1289 ]
1290 },
1291 "body": "Should an empty name fall back to \"world\"?",
1292 "path": null,
1293 "line": null,
1294 "verdict": null,
1295 "created_at": "2026-10-01T18:12:30.551Z"
1296 }
1297 },
1298 "list_labels": {
1299 "response": [
1300 "bug",
1301 "feature",
1302 "docs",
1303 "chore",
1304 "question",
1305 "good first issue"
1306 ],
1307 "notes": "The five default labels come first, then the others used on the repository's issues, alphabetically."
1308 },
1309 "plan_work": {
1310 "request": {
1311 "brief": "Greet people by name, from the command line and the web page."
1312 },
1313 "response": {
1314 "plan_id": "pln_01m43s9c4e8g2j6m0q4t8x2b6d"
1315 }
1316 },
1317 "get_plan": {
1318 "params": {
1319 "plan": "pln_01m43s9c4e8g2j6m0q4t8x2b6d"
1320 },
1321 "response": {
1322 "id": "pln_01m43s9c4e8g2j6m0q4t8x2b6d",
1323 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
1324 "brief": "Greet people by name, from the command line and the web page.",
1325 "status": "ready",
1326 "summary": "Name parsing first, then the two places that print the greeting.",
1327 "issues": [
1328 {
1329 "title": "Greeting should name the caller",
1330 "body": "Accept an optional name in `greet()` and use it.",
1331 "labels": [
1332 "feature"
1333 ],
1334 "done": [
1335 "`greet` prints \"Hello, ana!\" when given \"ana\", and \"Hello, world!\" with no argument."
1336 ],
1337 "files": [
1338 "src/greet.rs"
1339 ],
1340 "depends_on": [],
1341 "number": null
1342 },
1343 {
1344 "title": "Show the caller's name on the web page",
1345 "body": "Read `?name=` and pass it to `greet()`.",
1346 "labels": [
1347 "feature"
1348 ],
1349 "done": [
1350 "The page at / shows the name given in ?name=, escaped."
1351 ],
1352 "files": [
1353 "src/web.rs"
1354 ],
1355 "depends_on": [
1356 1
1357 ],
1358 "number": null
1359 }
1360 ],
1361 "error": null,
1362 "author": {
1363 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
1364 "username": "syntaqx",
1365 "kind": "user",
1366 "verified": false,
1367 "workspaces": []
1368 },
1369 "created_at": "2026-10-01T17:58:40.006Z",
1370 "finished_at": "2026-10-01T18:01:12.774Z",
1371 "progress": [],
1372 "exchanges": []
1373 },
1374 "notes": "A plan still `planning` after 20 minutes is reported as `failed`. `progress` follows each issue once the plan is applied."
1375 },
1376 "apply_plan": {
1377 "params": {
1378 "plan": "pln_01m43s9c4e8g2j6m0q4t8x2b6d"
1379 },
1380 "request": {
1381 "assign": true
1382 },
1383 "response": {
1384 "id": "pln_01m43s9c4e8g2j6m0q4t8x2b6d",
1385 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
1386 "brief": "Greet people by name, from the command line and the web page.",
1387 "status": "applied",
1388 "summary": "Name parsing first, then the two places that print the greeting.",
1389 "issues": [
1390 {
1391 "title": "Greeting should name the caller",
1392 "body": "Accept an optional name in `greet()` and use it.",
1393 "labels": [
1394 "feature"
1395 ],
1396 "done": [
1397 "`greet` prints \"Hello, ana!\" when given \"ana\", and \"Hello, world!\" with no argument."
1398 ],
1399 "files": [
1400 "src/greet.rs"
1401 ],
1402 "depends_on": [],
1403 "number": 12
1404 },
1405 {
1406 "title": "Show the caller's name on the web page",
1407 "body": "Read `?name=` and pass it to `greet()`.",
1408 "labels": [
1409 "feature"
1410 ],
1411 "done": [
1412 "The page at / shows the name given in ?name=, escaped."
1413 ],
1414 "files": [
1415 "src/web.rs"
1416 ],
1417 "depends_on": [
1418 1
1419 ],
1420 "number": 13
1421 }
1422 ],
1423 "error": null,
1424 "author": {
1425 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
1426 "username": "syntaqx",
1427 "kind": "user",
1428 "verified": false,
1429 "workspaces": []
1430 },
1431 "created_at": "2026-10-01T17:58:40.006Z",
1432 "finished_at": "2026-10-01T18:01:12.774Z",
1433 "progress": [],
1434 "exchanges": []
1435 },
1436 "notes": "Each opened issue's `number` is filled in. Issues left out with `keep` stay `null`."
1437 },
1438 "list_pull_requests": {
1439 "query": {
1440 "state": "open"
1441 },
1442 "response": [
1443 {
1444 "id": "pr_01m43smh3vexsr5pmp60qwv0vs",
1445 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
1446 "number": 14,
1447 "issue": 12,
1448 "title": "Greeting should name the caller",
1449 "body": "Reads a name from the first argument. `hello ana` prints \"Hello, ana!\".",
1450 "agent": "claude-code",
1451 "runtime": "external",
1452 "status": "open",
1453 "fork": {
1454 "namespace": "pulls",
1455 "name": "pr_01m43smh3vexsr5pmp60qwv0vs"
1456 },
1457 "fork_repo_id": "rep_01m43smh5xd7aw2kq9tv0b4c8e",
1458 "branch": null,
1459 "head_commit": "9f2c4e1a7b3d5f60812a4c6e8b0d2f4a6c8e0b13",
1460 "merge_base": null,
1461 "merged_by": null,
1462 "merged_at": null,
1463 "superseded_by": null,
1464 "check_status": "passed",
1465 "files": [
1466 {
1467 "path": "src/main.rs",
1468 "additions": 6,
1469 "deletions": 2
1470 }
1471 ],
1472 "assignees": [],
1473 "reviewers": [
1474 "ana"
1475 ],
1476 "author": {
1477 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
1478 "username": "syntaqx",
1479 "kind": "user",
1480 "verified": false,
1481 "workspaces": []
1482 },
1483 "requested_by": null,
1484 "created_at": "2026-10-01T18:20:02.117Z",
1485 "updated_at": "2026-10-01T18:35:44.902Z"
1486 }
1487 ],
1488 "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."
1489 },
1490 "create_pull_request": {
1491 "request": {
1492 "issue": 12,
1493 "agent": "claude-code"
1494 },
1495 "response": {
1496 "pull": {
1497 "id": "pr_01m43smh3vexsr5pmp60qwv0vs",
1498 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
1499 "number": 14,
1500 "issue": 12,
1501 "title": "Greeting should name the caller",
1502 "body": null,
1503 "agent": "claude-code",
1504 "runtime": "external",
1505 "status": "draft",
1506 "fork": {
1507 "namespace": "pulls",
1508 "name": "pr_01m43smh3vexsr5pmp60qwv0vs"
1509 },
1510 "fork_repo_id": "rep_01m43smh5xd7aw2kq9tv0b4c8e",
1511 "branch": null,
1512 "head_commit": null,
1513 "merge_base": null,
1514 "merged_by": null,
1515 "merged_at": null,
1516 "superseded_by": null,
1517 "check_status": null,
1518 "files": [],
1519 "assignees": [],
1520 "reviewers": [],
1521 "author": {
1522 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
1523 "username": "syntaqx",
1524 "kind": "user",
1525 "verified": false,
1526 "workspaces": []
1527 },
1528 "requested_by": null,
1529 "created_at": "2026-10-01T18:20:02.117Z",
1530 "updated_at": "2026-10-01T18:20:02.117Z"
1531 },
1532 "git": {
1533 "remote": "https://g1t.sh/pulls/pr_01m43smh3vexsr5pmp60qwv0vs.git",
1534 "username": "syntaqx",
1535 "password": "your g1t access token"
1536 }
1537 },
1538 "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."
1539 },
1540 "get_pull_request": {
1541 "response": {
1542 "pull": {
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 "author": {
1576 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
1577 "username": "syntaqx",
1578 "kind": "user",
1579 "verified": false,
1580 "workspaces": []
1581 },
1582 "requested_by": null,
1583 "created_at": "2026-10-01T18:20:02.117Z",
1584 "updated_at": "2026-10-01T18:35:44.902Z",
1585 "confidence": null
1586 },
1587 "issue": {
1588 "id": "iss_01m43shrzpfe49x74ga7sj1c6v",
1589 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
1590 "number": 12,
1591 "title": "Greeting should name the caller",
1592 "body": "Take a name from the first argument; fall back to world.",
1593 "labels": [
1594 "feature"
1595 ],
1596 "state": "open",
1597 "reason": null,
1598 "resolved_by": null,
1599 "author": {
1600 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
1601 "username": "syntaqx",
1602 "kind": "user",
1603 "verified": false,
1604 "workspaces": []
1605 },
1606 "requested_by": null,
1607 "created_at": "2026-10-01T18:04:11.482Z",
1608 "updated_at": "2026-10-01T18:20:02.117Z",
1609 "closed_at": null,
1610 "pull_count": 1,
1611 "comment_count": 0,
1612 "assignees": [],
1613 "blocked_by": [],
1614 "queued": false,
1615 "agent": "claude-code"
1616 },
1617 "comments": [
1618 {
1619 "id": "cmt_01m43st6d0f4h8k2n6r0v4z8c2",
1620 "kind": "event",
1621 "author": {
1622 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
1623 "username": "syntaqx",
1624 "kind": "user",
1625 "verified": false,
1626 "workspaces": []
1627 },
1628 "body": "marked this ready for review",
1629 "path": null,
1630 "line": null,
1631 "verdict": null,
1632 "created_at": "2026-10-01T18:33:10.420Z"
1633 }
1634 ],
1635 "checks": null,
1636 "overlaps": [],
1637 "behind": false,
1638 "review_pending": false,
1639 "lifecycle": null,
1640 "landing": false,
1641 "stalled": null,
1642 "messages": [
1643 {
1644 "id": "msg_01m43tx5egeh4t3f9zcnjenqvz",
1645 "author": "syntaqx",
1646 "body": "Keep \"world\" as the default when no name is given.",
1647 "created_at": "2026-10-01T18:25:00.310Z",
1648 "delivered_at": "2026-10-01T18:25:31.007Z",
1649 "kind": "message",
1650 "from_number": null,
1651 "to_number": 14,
1652 "answer": null,
1653 "declined": false
1654 }
1655 ],
1656 "statuses": [
1657 {
1658 "context": "CI / pull_request",
1659 "state": "success",
1660 "description": "CI passed",
1661 "target_url": "https://g1t.sh/syntaqx/hello/actions/runs/run_01m43sw8e2g6j0m4q8t2x6a0c4",
1662 "updated_at": "2026-10-01T18:35:44.902Z"
1663 }
1664 ],
1665 "required_checks": [
1666 {
1667 "name": "CI",
1668 "state": "success",
1669 "description": "CI passed",
1670 "target_url": "https://g1t.sh/syntaqx/hello/actions/runs/run_01m43sw8e2g6j0m4q8t2x6a0c4"
1671 }
1672 ]
1673 },
1674 "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\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/)."
1675 },
1676 "get_pull_request_changes": {
1677 "response": {
1678 "base": "3a7e9c1b5d2f4a6c8e0b2d4f6a8c0e2b4d6f8a1c",
1679 "head": "9f2c4e1a7b3d5f60812a4c6e8b0d2f4a6c8e0b13",
1680 "files": [
1681 {
1682 "path": "src/main.rs",
1683 "status": "modified",
1684 "additions": 1,
1685 "deletions": 1,
1686 "binary": false,
1687 "hunks": [
1688 {
1689 "lines": [
1690 {
1691 "kind": "context",
1692 "old": 3,
1693 "new": 3,
1694 "text": "fn main() {"
1695 },
1696 {
1697 "kind": "delete",
1698 "old": 4,
1699 "new": null,
1700 "text": " println!(\"Hello, world!\");"
1701 },
1702 {
1703 "kind": "add",
1704 "old": null,
1705 "new": 4,
1706 "text": " println!(\"Hello, {}!\", std::env::args().nth(1).unwrap_or(\"world\".into()));"
1707 },
1708 {
1709 "kind": "context",
1710 "old": 5,
1711 "new": 5,
1712 "text": "}"
1713 }
1714 ]
1715 }
1716 ]
1717 }
1718 ],
1719 "truncated": false
1720 },
1721 "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."
1722 },
1723 "mark_pull_request_ready": {
1724 "request": {
1725 "summary": "Reads a name from the first argument. `hello ana` prints \"Hello, ana!\"."
1726 },
1727 "response": {
1728 "id": "pr_01m43smh3vexsr5pmp60qwv0vs",
1729 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
1730 "number": 14,
1731 "issue": 12,
1732 "title": "Greeting should name the caller",
1733 "body": "Reads a name from the first argument. `hello ana` prints \"Hello, ana!\".",
1734 "agent": "claude-code",
1735 "runtime": "external",
1736 "status": "open",
1737 "fork": {
1738 "namespace": "pulls",
1739 "name": "pr_01m43smh3vexsr5pmp60qwv0vs"
1740 },
1741 "fork_repo_id": "rep_01m43smh5xd7aw2kq9tv0b4c8e",
1742 "branch": null,
1743 "head_commit": "9f2c4e1a7b3d5f60812a4c6e8b0d2f4a6c8e0b13",
1744 "merge_base": null,
1745 "merged_by": null,
1746 "merged_at": null,
1747 "superseded_by": null,
1748 "check_status": null,
1749 "files": [
1750 {
1751 "path": "src/main.rs",
1752 "additions": 6,
1753 "deletions": 2
1754 }
1755 ],
1756 "assignees": [],
1757 "reviewers": [],
1758 "author": {
1759 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
1760 "username": "syntaqx",
1761 "kind": "user",
1762 "verified": false,
1763 "workspaces": []
1764 },
1765 "requested_by": null,
1766 "created_at": "2026-10-01T18:20:02.117Z",
1767 "updated_at": "2026-10-01T18:33:10.398Z"
1768 }
1769 },
1770 "review_pull_request": {
1771 "request": {
1772 "verdict": "request_changes",
1773 "body": "Trim the name before using it."
1774 },
1775 "response": {
1776 "id": "cmt_01m43sx9f3h7k1n5r9v3z7d1g5",
1777 "kind": "comment",
1778 "author": {
1779 "id": "usr_01kz9d3f7h1k5n9r3v7z1c5g9b",
1780 "username": "ana",
1781 "kind": "user",
1782 "verified": true,
1783 "workspaces": [
1784 {
1785 "slug": "flagon-io",
1786 "role": "member"
1787 }
1788 ]
1789 },
1790 "body": "Trim the name before using it.",
1791 "path": null,
1792 "line": null,
1793 "verdict": "request_changes",
1794 "created_at": "2026-10-01T18:40:05.019Z"
1795 }
1796 },
1797 "merge_pull_request": {
1798 "request": {
1799 "keep_issue_open": false
1800 },
1801 "response": {
1802 "id": "pr_01m43smh3vexsr5pmp60qwv0vs",
1803 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
1804 "number": 14,
1805 "issue": 12,
1806 "title": "Greeting should name the caller",
1807 "body": "Reads a name from the first argument. `hello ana` prints \"Hello, ana!\".",
1808 "agent": "claude-code",
1809 "runtime": "external",
1810 "status": "merged",
1811 "fork": {
1812 "namespace": "pulls",
1813 "name": "pr_01m43smh3vexsr5pmp60qwv0vs"
1814 },
1815 "fork_repo_id": "rep_01m43smh5xd7aw2kq9tv0b4c8e",
1816 "branch": null,
1817 "head_commit": "9f2c4e1a7b3d5f60812a4c6e8b0d2f4a6c8e0b13",
1818 "merge_base": "3a7e9c1b5d2f4a6c8e0b2d4f6a8c0e2b4d6f8a1c",
1819 "merged_by": "syntaqx",
1820 "merged_at": "2026-10-01T18:52:17.093Z",
1821 "superseded_by": null,
1822 "check_status": "passed",
1823 "files": [
1824 {
1825 "path": "src/main.rs",
1826 "additions": 6,
1827 "deletions": 2
1828 }
1829 ],
1830 "assignees": [],
1831 "reviewers": [
1832 "ana"
1833 ],
1834 "author": {
1835 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
1836 "username": "syntaqx",
1837 "kind": "user",
1838 "verified": false,
1839 "workspaces": []
1840 },
1841 "requested_by": null,
1842 "created_at": "2026-10-01T18:20:02.117Z",
1843 "updated_at": "2026-10-01T18:52:17.093Z"
1844 },
1845 "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."
1846 },
1847 "close_pull_request": {
1848 "response": {
1849 "id": "pr_01m43smh3vexsr5pmp60qwv0vs",
1850 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
1851 "number": 14,
1852 "issue": 12,
1853 "title": "Greeting should name the caller",
1854 "body": "Reads a name from the first argument. `hello ana` prints \"Hello, ana!\".",
1855 "agent": "claude-code",
1856 "runtime": "external",
1857 "status": "closed",
1858 "fork": {
1859 "namespace": "pulls",
1860 "name": "pr_01m43smh3vexsr5pmp60qwv0vs"
1861 },
1862 "fork_repo_id": "rep_01m43smh5xd7aw2kq9tv0b4c8e",
1863 "branch": null,
1864 "head_commit": "9f2c4e1a7b3d5f60812a4c6e8b0d2f4a6c8e0b13",
1865 "merge_base": null,
1866 "merged_by": null,
1867 "merged_at": null,
1868 "superseded_by": null,
1869 "check_status": null,
1870 "files": [
1871 {
1872 "path": "src/main.rs",
1873 "additions": 6,
1874 "deletions": 2
1875 }
1876 ],
1877 "assignees": [],
1878 "reviewers": [],
1879 "author": {
1880 "id": "usr_01kkntcg1eeb98j62xjm7eh09p",
1881 "username": "syntaqx",
1882 "kind": "user",
1883 "verified": false,
1884 "workspaces": []
1885 },
1886 "requested_by": null,
1887 "created_at": "2026-10-01T18:20:02.117Z",
1888 "updated_at": "2026-10-01T19:02:48.760Z"
1889 }
1890 },
1891 "get_merge_queue": {
1892 "response": {
1893 "enabled": true,
1894 "active": [
1895 {
1896 "id": "qen_01m43rn0qsft1tpap1awkewzbb",
1897 "number": 14,
1898 "title": "Greeting should name the caller",
1899 "agent": "claude-code",
1900 "state": "testing",
1901 "ahead": [],
1902 "base_commit": "3a7e9c1b5d2f4a6c8e0b2d4f6a8c0e2b4d6f8a1c",
1903 "combined_commit": null,
1904 "error": null,
1905 "results": [],
1906 "enqueued_by": "syntaqx",
1907 "created_at": "2026-10-04T15:31:20.441Z",
1908 "finished_at": null
1909 }
1910 ],
1911 "recent": [
1912 {
1913 "id": "qen_01m43khqjmeb5a1magayrnk63z",
1914 "number": 11,
1915 "title": "Fix trailing newline in greeting",
1916 "agent": "g1t",
1917 "state": "landed",
1918 "ahead": [],
1919 "base_commit": "4b1d7e9c2a5f8e3d6c0b9a7e5d3c1b8a6f4e2d0c",
1920 "combined_commit": "c3e8a1f6d4b2097e5c3a1f8d6b4e2c0a9f7d5b3e",
1921 "error": null,
1922 "results": [
1923 {
1924 "command": "cargo test",
1925 "passed": true,
1926 "exit_code": 0,
1927 "output": "test result: ok. 12 passed; 0 failed\n",
1928 "duration_ms": 48211
1929 }
1930 ],
1931 "enqueued_by": "g1t",
1932 "created_at": "2026-10-04T14:02:09.876Z",
1933 "finished_at": "2026-10-04T14:09:55.102Z"
1934 }
1935 ]
1936 },
1937 "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."
1938 },
1939 "message_agent": {
1940 "request": {
1941 "body": "Keep \"world\" as the default when no name is given."
1942 },
1943 "response": {
1944 "id": "msg_01m43tx5egeh4t3f9zcnjenqvz",
1945 "author": "syntaqx",
1946 "body": "Keep \"world\" as the default when no name is given.",
1947 "created_at": "2026-10-01T18:25:00.310Z",
1948 "delivered_at": null,
1949 "kind": "message",
1950 "from_number": null,
1951 "to_number": 14,
1952 "answer": null,
1953 "declined": false
1954 },
1955 "notes": "The response is the message. `delivered_at` is set once the agent has read it."
1956 },
1957 "answer_message": {
1958 "params": {
1959 "id": "msg_01m43t66tde8hs2vpxhh3v8tqw"
1960 },
1961 "request": {
1962 "body": "No. greet() keeps its name; only greet_named() is added."
1963 },
1964 "response": {
1965 "id": "msg_01m43t66tde8hs2vpxhh3v8tqw",
1966 "author": "g1t",
1967 "body": "Are you renaming greet() in src/lib.rs? I need to call it from #16.",
1968 "created_at": "2026-10-01T18:58:12.301Z",
1969 "delivered_at": "2026-10-01T18:58:40.117Z",
1970 "kind": "question",
1971 "from_number": 16,
1972 "to_number": 14,
1973 "answer": "No. greet() keeps its name; only greet_named() is added.",
1974 "declined": false
1975 },
1976 "notes": "The response is the question or handoff that was answered, with `answer` and `declined` filled in."
1977 },
1978 "take_messages": {
1979 "response": [
1980 {
1981 "id": "msg_01m43tx5egeh4t3f9zcnjenqvz",
1982 "author": "syntaqx",
1983 "body": "Keep \"world\" as the default when no name is given.",
1984 "created_at": "2026-10-01T18:25:00.310Z",
1985 "delivered_at": "2026-10-01T18:25:31.007Z",
1986 "kind": "message",
1987 "from_number": null,
1988 "to_number": 14,
1989 "answer": null,
1990 "declined": false
1991 }
1992 ],
1993 "notes": "Only a g1t agent's token can take messages. They come oldest first, and each is marked delivered."
1994 },
1995 "read_session": {
1996 "query": {
1997 "after": 0
1998 },
1999 "response": [
2000 {
2001 "seq": 1,
2002 "kind": "prompt",
2003 "text": "Make the greeting name the caller (issue #12).",
2004 "tool": null,
2005 "commit": null,
2006 "at": "2026-10-01T18:21:00.004Z"
2007 },
2008 {
2009 "seq": 2,
2010 "kind": "tool_call",
2011 "text": "cargo test",
2012 "tool": "bash",
2013 "commit": "9f2c4e1a7b3d5f60812a4c6e8b0d2f4a6c8e0b13",
2014 "at": "2026-10-01T18:30:12.660Z"
2015 }
2016 ]
2017 },
2018 "record_session": {
2019 "request": {
2020 "entries": [
2021 {
2022 "kind": "message",
2023 "text": "Reading src/main.rs."
2024 },
2025 {
2026 "kind": "tool_call",
2027 "text": "cargo test",
2028 "tool": "bash"
2029 }
2030 ]
2031 },
2032 "response": {
2033 "count": 2
2034 },
2035 "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/)."
2036 },
2037 "list_workflows": {
2038 "response": [
2039 {
2040 "id": "wfl_01kpw2c5d8e1f4g7h0j3k6m9np",
2041 "path": ".g1t/workflows/ci.yml",
2042 "name": "CI",
2043 "events": [
2044 "push",
2045 "pull_request",
2046 "workflow_dispatch"
2047 ],
2048 "state": "active",
2049 "error": null,
2050 "notes": [
2051 {
2052 "severity": "unsupported",
2053 "job": "test",
2054 "message": "`services` containers (such as a database) are not started on g1t yet."
2055 }
2056 ],
2057 "dispatch": {
2058 "debug": {
2059 "description": "Verbose logs",
2060 "type": "boolean",
2061 "default": false
2062 }
2063 },
2064 "last_run": {
2065 "id": "run_01kpx7b3c6d9e2f5g8h1j4k7mr",
2066 "workflow_id": "wfl_01kpw2c5d8e1f4g7h0j3k6m9np",
2067 "path": ".g1t/workflows/ci.yml",
2068 "name": "CI",
2069 "title": "Greeting should name the caller",
2070 "number": 12,
2071 "attempt": 1,
2072 "event": "push",
2073 "ref": "refs/heads/main",
2074 "sha": "9f2c4e1a7b3d5f60812a4c6e8b0d2f4a6c8e0b13",
2075 "pull": null,
2076 "status": "completed",
2077 "conclusion": "success",
2078 "error": null,
2079 "actor": "syntaqx",
2080 "created_at": "2026-10-04T15:42:07.318Z",
2081 "started_at": "2026-10-04T15:42:09.020Z",
2082 "finished_at": "2026-10-04T15:44:31.877Z"
2083 }
2084 },
2085 {
2086 "id": "wfl_01kpw2c5d8e1f4g7h0j3k6m9nq",
2087 "path": ".g1t/workflows/nightly.yml",
2088 "name": "Nightly",
2089 "events": [
2090 "schedule"
2091 ],
2092 "state": "disabled",
2093 "error": null,
2094 "notes": [],
2095 "dispatch": null,
2096 "last_run": null
2097 }
2098 ],
2099 "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/)."
2100 },
2101 "list_workflow_runs": {
2102 "query": {
2103 "workflow": "ci.yml",
2104 "branch": "main",
2105 "per_page": 20
2106 },
2107 "response": [
2108 {
2109 "id": "run_01kpx7b3c6d9e2f5g8h1j4k7mr",
2110 "workflow_id": "wfl_01kpw2c5d8e1f4g7h0j3k6m9np",
2111 "path": ".g1t/workflows/ci.yml",
2112 "name": "CI",
2113 "title": "Greeting should name the caller",
2114 "number": 12,
2115 "attempt": 1,
2116 "event": "push",
2117 "ref": "refs/heads/main",
2118 "sha": "9f2c4e1a7b3d5f60812a4c6e8b0d2f4a6c8e0b13",
2119 "pull": null,
2120 "status": "completed",
2121 "conclusion": "success",
2122 "error": null,
2123 "actor": "syntaqx",
2124 "created_at": "2026-10-04T15:42:07.318Z",
2125 "started_at": "2026-10-04T15:42:09.020Z",
2126 "finished_at": "2026-10-04T15:44:31.877Z"
2127 }
2128 ],
2129 "notes": "A run's `status` is `queued`, `pending` (waiting for its concurrency group), `in_progress` or `completed`; `conclusion` is set once it completes."
2130 },
2131 "list_runs_of_workflow": {
2132 "params": {
2133 "workflow": "ci.yml"
2134 },
2135 "query": {
2136 "branch": "main",
2137 "per_page": 20
2138 },
2139 "response": [
2140 {
2141 "id": "run_01kpx7b3c6d9e2f5g8h1j4k7mr",
2142 "workflow_id": "wfl_01kpw2c5d8e1f4g7h0j3k6m9np",
2143 "path": ".g1t/workflows/ci.yml",
2144 "name": "CI",
2145 "title": "Greeting should name the caller",
2146 "number": 12,
2147 "attempt": 1,
2148 "event": "push",
2149 "ref": "refs/heads/main",
2150 "sha": "9f2c4e1a7b3d5f60812a4c6e8b0d2f4a6c8e0b13",
2151 "pull": null,
2152 "status": "completed",
2153 "conclusion": "success",
2154 "error": null,
2155 "actor": "syntaqx",
2156 "created_at": "2026-10-04T15:42:07.318Z",
2157 "started_at": "2026-10-04T15:42:09.020Z",
2158 "finished_at": "2026-10-04T15:44:31.877Z"
2159 }
2160 ]
2161 },
2162 "get_workflow_run": {
2163 "params": {
2164 "id": "run_01kpx7b3c6d9e2f5g8h1j4k7mr"
2165 },
2166 "response": {
2167 "run": {
2168 "id": "run_01kpx7b3c6d9e2f5g8h1j4k7mr",
2169 "workflow_id": "wfl_01kpw2c5d8e1f4g7h0j3k6m9np",
2170 "path": ".g1t/workflows/ci.yml",
2171 "name": "CI",
2172 "title": "Greeting should name the caller",
2173 "number": 12,
2174 "attempt": 1,
2175 "event": "push",
2176 "ref": "refs/heads/main",
2177 "sha": "9f2c4e1a7b3d5f60812a4c6e8b0d2f4a6c8e0b13",
2178 "pull": null,
2179 "status": "completed",
2180 "conclusion": "failure",
2181 "error": null,
2182 "actor": "syntaqx",
2183 "created_at": "2026-10-04T15:42:07.318Z",
2184 "started_at": "2026-10-04T15:42:09.020Z",
2185 "finished_at": "2026-10-04T15:44:31.877Z"
2186 },
2187 "jobs": [
2188 {
2189 "id": "job_01kpx7b3d0e4f8g2h6j0k4m8ns",
2190 "run_id": "run_01kpx7b3c6d9e2f5g8h1j4k7mr",
2191 "key": "test",
2192 "name": "test",
2193 "needs": [],
2194 "status": "completed",
2195 "conclusion": "failure",
2196 "steps": [
2197 {
2198 "number": 1,
2199 "name": "Run actions/checkout@v4",
2200 "status": "completed",
2201 "conclusion": "success",
2202 "started_at": "2026-10-04T15:42:10.101Z",
2203 "finished_at": "2026-10-04T15:42:12.433Z"
2204 },
2205 {
2206 "number": 2,
2207 "name": "Run cargo test",
2208 "status": "completed",
2209 "conclusion": "failure",
2210 "started_at": "2026-10-04T15:42:12.440Z",
2211 "finished_at": "2026-10-04T15:44:30.902Z"
2212 }
2213 ],
2214 "annotations": [
2215 {
2216 "level": "error",
2217 "message": "assertion failed: greeting names the caller",
2218 "title": "greet",
2219 "file": "src/main.rs",
2220 "line": 41
2221 }
2222 ],
2223 "reason": null,
2224 "started_at": "2026-10-04T15:42:09.020Z",
2225 "finished_at": "2026-10-04T15:44:31.002Z"
2226 },
2227 {
2228 "id": "job_01kpx7b3d0e4f8g2h6j0k4m8nt",
2229 "run_id": "run_01kpx7b3c6d9e2f5g8h1j4k7mr",
2230 "key": "deploy",
2231 "name": "deploy",
2232 "needs": [
2233 "test"
2234 ],
2235 "status": "completed",
2236 "conclusion": "skipped",
2237 "steps": [],
2238 "annotations": [],
2239 "reason": "A job it needs did not succeed.",
2240 "started_at": null,
2241 "finished_at": "2026-10-04T15:44:31.877Z"
2242 }
2243 ],
2244 "notes": [
2245 {
2246 "severity": "unsupported",
2247 "job": "test",
2248 "message": "`services` containers (such as a database) are not started on g1t yet."
2249 }
2250 ]
2251 }
2252 },
2253 "get_job_logs": {
2254 "params": {
2255 "job": "job_01kpx7b3d0e4f8g2h6j0k4m8ns"
2256 },
2257 "query": {
2258 "after": 0
2259 },
2260 "response": {
2261 "chunks": [
2262 {
2263 "seq": 1,
2264 "step": 0,
2265 "text": "Preparing the sandbox\n"
2266 },
2267 {
2268 "seq": 2,
2269 "step": 2,
2270 "text": "> cargo test\ntest greet ... FAILED\n"
2271 }
2272 ],
2273 "done": true
2274 },
2275 "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`."
2276 },
2277 "dispatch_workflow": {
2278 "params": {
2279 "workflow": "ci.yml"
2280 },
2281 "request": {
2282 "ref": "main",
2283 "inputs": {
2284 "debug": true
2285 }
2286 },
2287 "response": {
2288 "id": "run_01kpx8d4e7f0g3h6j9k2m5n8pq",
2289 "workflow_id": "wfl_01kpw2c5d8e1f4g7h0j3k6m9np",
2290 "path": ".g1t/workflows/ci.yml",
2291 "name": "CI",
2292 "title": "CI run by syntaqx",
2293 "number": 13,
2294 "attempt": 1,
2295 "event": "workflow_dispatch",
2296 "ref": "refs/heads/main",
2297 "sha": "9f2c4e1a7b3d5f60812a4c6e8b0d2f4a6c8e0b13",
2298 "pull": null,
2299 "status": "queued",
2300 "conclusion": null,
2301 "error": null,
2302 "actor": "syntaqx",
2303 "created_at": "2026-10-04T16:30:00.512Z",
2304 "started_at": null,
2305 "finished_at": null
2306 }
2307 },
2308 "cancel_workflow_run": {
2309 "params": {
2310 "id": "run_01kpx7b3c6d9e2f5g8h1j4k7mr"
2311 },
2312 "response": {
2313 "id": "run_01kpx7b3c6d9e2f5g8h1j4k7mr",
2314 "workflow_id": "wfl_01kpw2c5d8e1f4g7h0j3k6m9np",
2315 "path": ".g1t/workflows/ci.yml",
2316 "name": "CI",
2317 "title": "Greeting should name the caller",
2318 "number": 12,
2319 "attempt": 1,
2320 "event": "push",
2321 "ref": "refs/heads/main",
2322 "sha": "9f2c4e1a7b3d5f60812a4c6e8b0d2f4a6c8e0b13",
2323 "pull": null,
2324 "status": "completed",
2325 "conclusion": "cancelled",
2326 "error": null,
2327 "actor": "syntaqx",
2328 "created_at": "2026-10-04T15:42:07.318Z",
2329 "started_at": "2026-10-04T15:42:09.020Z",
2330 "finished_at": "2026-10-04T15:44:31.877Z"
2331 }
2332 },
2333 "rerun_workflow_run": {
2334 "params": {
2335 "id": "run_01kpx7b3c6d9e2f5g8h1j4k7mr"
2336 },
2337 "request": {
2338 "failed_only": true
2339 },
2340 "response": {
2341 "id": "run_01kpx7b3c6d9e2f5g8h1j4k7mr",
2342 "workflow_id": "wfl_01kpw2c5d8e1f4g7h0j3k6m9np",
2343 "path": ".g1t/workflows/ci.yml",
2344 "name": "CI",
2345 "title": "Greeting should name the caller",
2346 "number": 12,
2347 "attempt": 2,
2348 "event": "push",
2349 "ref": "refs/heads/main",
2350 "sha": "9f2c4e1a7b3d5f60812a4c6e8b0d2f4a6c8e0b13",
2351 "pull": null,
2352 "status": "queued",
2353 "conclusion": null,
2354 "error": null,
2355 "actor": "syntaqx",
2356 "created_at": "2026-10-04T15:42:07.318Z",
2357 "started_at": null,
2358 "finished_at": null
2359 },
2360 "notes": "The run keeps its id; `attempt` goes up by one."
2361 },
2362 "rerun_failed_jobs": {
2363 "params": {
2364 "id": "run_01kpx7b3c6d9e2f5g8h1j4k7mr"
2365 },
2366 "response": {
2367 "id": "run_01kpx7b3c6d9e2f5g8h1j4k7mr",
2368 "workflow_id": "wfl_01kpw2c5d8e1f4g7h0j3k6m9np",
2369 "path": ".g1t/workflows/ci.yml",
2370 "name": "CI",
2371 "title": "Greeting should name the caller",
2372 "number": 12,
2373 "attempt": 2,
2374 "event": "push",
2375 "ref": "refs/heads/main",
2376 "sha": "9f2c4e1a7b3d5f60812a4c6e8b0d2f4a6c8e0b13",
2377 "pull": null,
2378 "status": "queued",
2379 "conclusion": null,
2380 "error": null,
2381 "actor": "syntaqx",
2382 "created_at": "2026-10-04T15:42:07.318Z",
2383 "started_at": null,
2384 "finished_at": null
2385 }
2386 },
2387 "update_workflow": {
2388 "params": {
2389 "workflow": "nightly.yml"
2390 },
2391 "request": {
2392 "enabled": false
2393 },
2394 "response": {
2395 "id": "wfl_01kpw2c5d8e1f4g7h0j3k6m9nq",
2396 "path": ".g1t/workflows/nightly.yml",
2397 "name": "Nightly",
2398 "events": [
2399 "schedule"
2400 ],
2401 "state": "disabled",
2402 "error": null,
2403 "notes": [],
2404 "dispatch": null,
2405 "last_run": null
2406 }
2407 },
2408 "enable_workflow": {
2409 "params": {
2410 "workflow": "nightly.yml"
2411 },
2412 "response": {
2413 "id": "wfl_01kpw2c5d8e1f4g7h0j3k6m9nq",
2414 "path": ".g1t/workflows/nightly.yml",
2415 "name": "Nightly",
2416 "events": [
2417 "schedule"
2418 ],
2419 "state": "active",
2420 "error": null,
2421 "notes": [],
2422 "dispatch": null,
2423 "last_run": null
2424 }
2425 },
2426 "disable_workflow": {
2427 "params": {
2428 "workflow": "nightly.yml"
2429 },
2430 "response": {
2431 "id": "wfl_01kpw2c5d8e1f4g7h0j3k6m9nq",
2432 "path": ".g1t/workflows/nightly.yml",
2433 "name": "Nightly",
2434 "events": [
2435 "schedule"
2436 ],
2437 "state": "disabled",
2438 "error": null,
2439 "notes": [],
2440 "dispatch": null,
2441 "last_run": null
2442 }
2443 },
2444 "list_actions_secrets": {
2445 "response": [
2446 {
2447 "id": "set_01kpv9q4r7s0t3v6w9x2y5z8ab",
2448 "name": "NPM_TOKEN",
2449 "kind": "secret",
2450 "value": null,
2451 "scope": "workspace",
2452 "updated_at": "2026-10-01T09:12:44.020Z",
2453 "available_to": [
2454 "workflows"
2455 ],
2456 "environments": [],
2457 "projects": [],
2458 "note": null,
2459 "updated_by": "syntaqx"
2460 },
2461 {
2462 "id": "set_01kpv9q4r7s0t3v6w9x2y5z8ac",
2463 "name": "STRIPE_KEY",
2464 "kind": "secret",
2465 "value": null,
2466 "scope": "project",
2467 "updated_at": "2026-10-04T15:42:07.318Z",
2468 "available_to": [
2469 "workflows",
2470 "deployments"
2471 ],
2472 "environments": [
2473 "production"
2474 ],
2475 "projects": [],
2476 "note": "Rotate in the Stripe dashboard.",
2477 "updated_by": "syntaqx"
2478 }
2479 ],
2480 "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."
2481 },
2482 "list_actions_secrets_for_workspace": {
2483 "params": {
2484 "workspace": "flagon-io"
2485 },
2486 "response": [
2487 {
2488 "id": "set_01kpv9q4r7s0t3v6w9x2y5z8ab",
2489 "name": "NPM_TOKEN",
2490 "kind": "secret",
2491 "value": null,
2492 "scope": "workspace",
2493 "updated_at": "2026-10-04T15:42:07.318Z",
2494 "available_to": [
2495 "workflows"
2496 ],
2497 "environments": [],
2498 "projects": [],
2499 "note": null,
2500 "updated_by": "syntaqx"
2501 }
2502 ],
2503 "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."
2504 },
2505 "set_actions_secret": {
2506 "params": {
2507 "setting": "STRIPE_KEY"
2508 },
2509 "request": {
2510 "value": "sk_live_…",
2511 "available_to": [
2512 "workflows",
2513 "deployments"
2514 ],
2515 "environments": [
2516 "production"
2517 ]
2518 },
2519 "response": {
2520 "id": "set_01kpv9q4r7s0t3v6w9x2y5z8ac",
2521 "name": "STRIPE_KEY",
2522 "kind": "secret",
2523 "value": null,
2524 "scope": "project",
2525 "updated_at": "2026-10-04T15:42:07.318Z",
2526 "available_to": [
2527 "workflows",
2528 "deployments"
2529 ],
2530 "environments": [
2531 "production"
2532 ],
2533 "projects": [],
2534 "note": null,
2535 "updated_by": "syntaqx"
2536 },
2537 "notes": "Keys are uppercased. See [secrets and variables](/guides/secrets-and-variables/)."
2538 },
2539 "set_actions_secret_for_workspace": {
2540 "params": {
2541 "workspace": "flagon-io",
2542 "setting": "NPM_TOKEN"
2543 },
2544 "request": {
2545 "value": "npm_…",
2546 "projects": [
2547 "hello"
2548 ]
2549 },
2550 "response": {
2551 "id": "set_01kpv9q4r7s0t3v6w9x2y5z8ac",
2552 "name": "NPM_TOKEN",
2553 "kind": "secret",
2554 "value": null,
2555 "scope": "workspace",
2556 "updated_at": "2026-10-04T15:42:07.318Z",
2557 "available_to": [
2558 "workflows"
2559 ],
2560 "environments": [],
2561 "projects": [
2562 "hello"
2563 ],
2564 "note": null,
2565 "updated_by": "syntaqx"
2566 }
2567 },
2568 "delete_actions_secret": {
2569 "params": {
2570 "setting": "STRIPE_KEY"
2571 },
2572 "response": true
2573 },
2574 "delete_actions_secret_for_workspace": {
2575 "params": {
2576 "workspace": "flagon-io",
2577 "setting": "NPM_TOKEN"
2578 },
2579 "response": true
2580 },
2581 "list_actions_variables": {
2582 "response": [
2583 {
2584 "id": "set_01kpv9q4r7s0t3v6w9x2y5z8ad",
2585 "name": "NODE_VERSION",
2586 "kind": "variable",
2587 "value": "20",
2588 "scope": "project",
2589 "updated_at": "2026-10-04T15:42:07.318Z",
2590 "available_to": [
2591 "workflows",
2592 "deployments"
2593 ],
2594 "environments": [],
2595 "projects": [],
2596 "note": null,
2597 "updated_by": "syntaqx"
2598 }
2599 ],
2600 "notes": "A repository's list includes the workspace's rows that reach it, with `scope` set to `workspace`. Empty `environments` means every environment."
2601 },
2602 "list_actions_variables_for_workspace": {
2603 "params": {
2604 "workspace": "flagon-io"
2605 },
2606 "response": [
2607 {
2608 "id": "set_01kpv9q4r7s0t3v6w9x2y5z8ad",
2609 "name": "NODE_VERSION",
2610 "kind": "variable",
2611 "value": "20",
2612 "scope": "workspace",
2613 "updated_at": "2026-10-04T15:42:07.318Z",
2614 "available_to": [
2615 "workflows",
2616 "deployments"
2617 ],
2618 "environments": [],
2619 "projects": [],
2620 "note": null,
2621 "updated_by": "syntaqx"
2622 }
2623 ]
2624 },
2625 "set_actions_variable": {
2626 "request": {
2627 "setting": "NODE_VERSION",
2628 "value": "20"
2629 },
2630 "response": {
2631 "id": "set_01kpv9q4r7s0t3v6w9x2y5z8ad",
2632 "name": "NODE_VERSION",
2633 "kind": "variable",
2634 "value": "20",
2635 "scope": "project",
2636 "updated_at": "2026-10-04T15:42:07.318Z",
2637 "available_to": [
2638 "workflows",
2639 "deployments"
2640 ],
2641 "environments": [],
2642 "projects": [],
2643 "note": null,
2644 "updated_by": "syntaqx"
2645 },
2646 "notes": "GitHub's clients send the key as `name`; that is accepted too."
2647 },
2648 "set_actions_variable_for_workspace": {
2649 "params": {
2650 "workspace": "flagon-io"
2651 },
2652 "request": {
2653 "setting": "NODE_VERSION",
2654 "value": "20"
2655 },
2656 "response": {
2657 "id": "set_01kpv9q4r7s0t3v6w9x2y5z8ad",
2658 "name": "NODE_VERSION",
2659 "kind": "variable",
2660 "value": "20",
2661 "scope": "workspace",
2662 "updated_at": "2026-10-04T15:42:07.318Z",
2663 "available_to": [
2664 "workflows",
2665 "deployments"
2666 ],
2667 "environments": [],
2668 "projects": [],
2669 "note": null,
2670 "updated_by": "syntaqx"
2671 }
2672 },
2673 "update_actions_variable": {
2674 "params": {
2675 "setting": "NODE_VERSION"
2676 },
2677 "request": {
2678 "value": "22"
2679 },
2680 "response": {
2681 "id": "set_01kpv9q4r7s0t3v6w9x2y5z8ad",
2682 "name": "NODE_VERSION",
2683 "kind": "variable",
2684 "value": "22",
2685 "scope": "project",
2686 "updated_at": "2026-10-04T15:42:07.318Z",
2687 "available_to": [
2688 "workflows",
2689 "deployments"
2690 ],
2691 "environments": [],
2692 "projects": [],
2693 "note": null,
2694 "updated_by": "syntaqx"
2695 }
2696 },
2697 "update_actions_variable_for_workspace": {
2698 "params": {
2699 "workspace": "flagon-io",
2700 "setting": "NODE_VERSION"
2701 },
2702 "request": {
2703 "value": "22"
2704 },
2705 "response": {
2706 "id": "set_01kpv9q4r7s0t3v6w9x2y5z8ad",
2707 "name": "NODE_VERSION",
2708 "kind": "variable",
2709 "value": "22",
2710 "scope": "workspace",
2711 "updated_at": "2026-10-04T15:42:07.318Z",
2712 "available_to": [
2713 "workflows",
2714 "deployments"
2715 ],
2716 "environments": [],
2717 "projects": [],
2718 "note": null,
2719 "updated_by": "syntaqx"
2720 }
2721 },
2722 "delete_actions_variable": {
2723 "params": {
2724 "setting": "NODE_VERSION"
2725 },
2726 "response": true
2727 },
2728 "delete_actions_variable_for_workspace": {
2729 "params": {
2730 "workspace": "flagon-io",
2731 "setting": "NODE_VERSION"
2732 },
2733 "response": true
2734 },
2735 "list_runners": {
2736 "response": [
2737 {
2738 "id": "rnr_01kq2m8v4c7f0h3k6n9q2t5w8z",
2739 "name": "build-01",
2740 "workspace": "flagon-io",
2741 "repo": null,
2742 "group": "Default",
2743 "labels": [
2744 "self-hosted",
2745 "linux",
2746 "x64",
2747 "gpu"
2748 ],
2749 "os": "linux",
2750 "arch": "x64",
2751 "version": "0.2.0",
2752 "ephemeral": false,
2753 "status": "busy",
2754 "work": {
2755 "kind": "workflow",
2756 "id": "job_01kq2m9b1d4g7j0m3p6s9v2y5b",
2757 "name": "test (linux, 24)",
2758 "repo": "flagon-io/hello",
2759 "run_id": "run_01kq2m9a8c1f4h7k0n3q6t9w2z",
2760 "started_at": "2026-10-06T14:02:11.000Z"
2761 },
2762 "last_seen_at": "2026-10-06T14:05:40.512Z",
2763 "created_at": "2026-10-02T09:30:00.000Z",
2764 "created_by": null
2765 },
2766 {
2767 "id": "rnr_01kq2m8v4c7f0h3k6n9q2t5w9a",
2768 "name": "mac-mini",
2769 "workspace": "flagon-io",
2770 "repo": null,
2771 "group": "Default",
2772 "labels": [
2773 "self-hosted",
2774 "macos",
2775 "arm64"
2776 ],
2777 "os": "macos",
2778 "arch": "arm64",
2779 "version": "0.2.0",
2780 "ephemeral": false,
2781 "status": "online",
2782 "work": null,
2783 "last_seen_at": "2026-10-06T14:05:40.512Z",
2784 "created_at": "2026-10-02T09:30:00.000Z",
2785 "created_by": null
2786 }
2787 ],
2788 "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."
2789 },
2790 "list_runners_for_workspace": {
2791 "params": {
2792 "workspace": "flagon-io"
2793 },
2794 "response": [
2795 {
2796 "id": "rnr_01kq2m8v4c7f0h3k6n9q2t5w8z",
2797 "name": "build-01",
2798 "workspace": "flagon-io",
2799 "repo": null,
2800 "group": "Default",
2801 "labels": [
2802 "self-hosted",
2803 "linux",
2804 "x64",
2805 "gpu"
2806 ],
2807 "os": "linux",
2808 "arch": "x64",
2809 "version": "0.2.0",
2810 "ephemeral": false,
2811 "status": "busy",
2812 "work": {
2813 "kind": "workflow",
2814 "id": "job_01kq2m9b1d4g7j0m3p6s9v2y5b",
2815 "name": "test (linux, 24)",
2816 "repo": "flagon-io/hello",
2817 "run_id": "run_01kq2m9a8c1f4h7k0n3q6t9w2z",
2818 "started_at": "2026-10-06T14:02:11.000Z"
2819 },
2820 "last_seen_at": "2026-10-06T14:05:40.512Z",
2821 "created_at": "2026-10-02T09:30:00.000Z",
2822 "created_by": null
2823 },
2824 {
2825 "id": "rnr_01kq2m8v4c7f0h3k6n9q2t5w9a",
2826 "name": "mac-mini",
2827 "workspace": "flagon-io",
2828 "repo": null,
2829 "group": "Default",
2830 "labels": [
2831 "self-hosted",
2832 "macos",
2833 "arm64"
2834 ],
2835 "os": "macos",
2836 "arch": "arm64",
2837 "version": "0.2.0",
2838 "ephemeral": false,
2839 "status": "online",
2840 "work": null,
2841 "last_seen_at": "2026-10-06T14:05:40.512Z",
2842 "created_at": "2026-10-02T09:30:00.000Z",
2843 "created_by": null
2844 }
2845 ]
2846 },
2847 "create_runner_registration_token": {
2848 "response": {
2849 "token": "g1trt_…",
2850 "expires_at": "2026-10-06T15:04:00.000Z",
2851 "workspace": "flagon-io",
2852 "repo": "flagon-io/hello",
2853 "group": null,
2854 "url": "https://g1t.sh"
2855 },
2856 "notes": "Pass it to `g1t-runner register --url https://g1t.sh --token …` within the hour. See [self-hosted runners](/guides/self-hosted-runners/)."
2857 },
2858 "create_runner_registration_token_for_workspace": {
2859 "params": {
2860 "workspace": "flagon-io"
2861 },
2862 "request": {
2863 "group": "Default"
2864 },
2865 "response": {
2866 "token": "g1trt_…",
2867 "expires_at": "2026-10-06T15:04:00.000Z",
2868 "workspace": "flagon-io",
2869 "repo": null,
2870 "group": "Default",
2871 "url": "https://g1t.sh"
2872 }
2873 },
2874 "remove_runner": {
2875 "params": {
2876 "id": "rnr_01kq2m8v4c7f0h3k6n9q2t5w8z"
2877 },
2878 "response": true
2879 },
2880 "remove_runner_for_workspace": {
2881 "params": {
2882 "workspace": "flagon-io",
2883 "id": "rnr_01kq2m8v4c7f0h3k6n9q2t5w8z"
2884 },
2885 "response": true
2886 },
2887 "get_runner_settings": {
2888 "response": {
2889 "agents_on_self_hosted": false,
2890 "agent_labels": [
2891 "self-hosted",
2892 "linux"
2893 ],
2894 "fork_pull_requests": false,
2895 "inherited": true
2896 }
2897 },
2898 "get_runner_settings_for_workspace": {
2899 "params": {
2900 "workspace": "flagon-io"
2901 },
2902 "response": {
2903 "agents_on_self_hosted": true,
2904 "agent_labels": [
2905 "self-hosted",
2906 "linux"
2907 ],
2908 "fork_pull_requests": false,
2909 "inherited": false
2910 }
2911 },
2912 "update_runner_settings": {
2913 "request": {
2914 "inherit": true
2915 },
2916 "response": {
2917 "agents_on_self_hosted": false,
2918 "agent_labels": [
2919 "self-hosted",
2920 "linux"
2921 ],
2922 "fork_pull_requests": false,
2923 "inherited": true
2924 }
2925 },
2926 "update_runner_settings_for_workspace": {
2927 "params": {
2928 "workspace": "flagon-io"
2929 },
2930 "request": {
2931 "agents_on_self_hosted": true,
2932 "agent_labels": [
2933 "linux"
2934 ]
2935 },
2936 "response": {
2937 "agents_on_self_hosted": true,
2938 "agent_labels": [
2939 "self-hosted",
2940 "linux"
2941 ],
2942 "fork_pull_requests": false,
2943 "inherited": false
2944 },
2945 "notes": "Agent work on your runners still uses g1t's model proxy, paid as before, unless the workspace has its own model provider."
2946 },
2947 "list_runner_groups": {
2948 "params": {
2949 "workspace": "flagon-io"
2950 },
2951 "response": [
2952 {
2953 "id": "rng_01kq2m7r2a5d8g1j4m7p0s3v6y",
2954 "name": "Default",
2955 "default": true,
2956 "repositories": [],
2957 "runners": 2,
2958 "updated_at": "2026-10-02T09:30:00.000Z"
2959 },
2960 {
2961 "id": "rng_01kq2m7r2a5d8g1j4m7p0s3v6z",
2962 "name": "GPU",
2963 "default": false,
2964 "repositories": [
2965 "hello",
2966 "models"
2967 ],
2968 "runners": 1,
2969 "updated_at": "2026-10-05T11:20:00.000Z"
2970 }
2971 ]
2972 },
2973 "create_runner_group": {
2974 "params": {
2975 "workspace": "flagon-io"
2976 },
2977 "request": {
2978 "name": "GPU",
2979 "repositories": [
2980 "hello",
2981 "models"
2982 ]
2983 },
2984 "response": {
2985 "id": "rng_01kq2m7r2a5d8g1j4m7p0s3v6z",
2986 "name": "GPU",
2987 "default": false,
2988 "repositories": [
2989 "hello",
2990 "models"
2991 ],
2992 "runners": 1,
2993 "updated_at": "2026-10-05T11:20:00.000Z"
2994 }
2995 },
2996 "update_runner_group": {
2997 "params": {
2998 "workspace": "flagon-io",
2999 "id": "rng_01kq2m7r2a5d8g1j4m7p0s3v6z"
3000 },
3001 "request": {
3002 "repositories": []
3003 },
3004 "response": {
3005 "id": "rng_01kq2m7r2a5d8g1j4m7p0s3v6z",
3006 "name": "GPU",
3007 "default": false,
3008 "repositories": [],
3009 "runners": 1,
3010 "updated_at": "2026-10-05T11:20:00.000Z"
3011 }
3012 },
3013 "delete_runner_group": {
3014 "params": {
3015 "workspace": "flagon-io",
3016 "id": "rng_01kq2m7r2a5d8g1j4m7p0s3v6z"
3017 },
3018 "response": true
3019 },
3020 "list_webhooks": {
3021 "response": [
3022 {
3023 "id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd",
3024 "scope": "repo",
3025 "workspace": "flagon-io",
3026 "repo": "flagon-io/hello",
3027 "url": "https://hooks.example.com/g1t",
3028 "events": [
3029 "git.push",
3030 "pull.merged"
3031 ],
3032 "active": true,
3033 "secret_hint": "…9c2e",
3034 "created_by": "syntaqx",
3035 "created_at": "2026-10-04T15:42:07.318Z",
3036 "last_status": "delivered",
3037 "last_delivered_at": "2026-10-04T15:42:07.611Z"
3038 }
3039 ]
3040 },
3041 "list_webhooks_for_workspace": {
3042 "params": {
3043 "workspace": "flagon-io"
3044 },
3045 "response": [
3046 {
3047 "id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd",
3048 "scope": "workspace",
3049 "workspace": "flagon-io",
3050 "repo": null,
3051 "url": "https://hooks.example.com/g1t",
3052 "events": [
3053 "git.push",
3054 "pull.merged"
3055 ],
3056 "active": true,
3057 "secret_hint": "…9c2e",
3058 "created_by": "syntaqx",
3059 "created_at": "2026-10-04T15:42:07.318Z",
3060 "last_status": "delivered",
3061 "last_delivered_at": "2026-10-04T15:42:07.611Z"
3062 }
3063 ]
3064 },
3065 "create_webhook": {
3066 "request": {
3067 "url": "https://hooks.example.com/g1t",
3068 "events": [
3069 "git.push",
3070 "pull.merged"
3071 ]
3072 },
3073 "response": {
3074 "hook": {
3075 "id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd",
3076 "scope": "repo",
3077 "workspace": "flagon-io",
3078 "repo": "flagon-io/hello",
3079 "url": "https://hooks.example.com/g1t",
3080 "events": [
3081 "git.push",
3082 "pull.merged"
3083 ],
3084 "active": true,
3085 "secret_hint": "…9c2e",
3086 "created_by": "syntaqx",
3087 "created_at": "2026-10-04T15:42:07.318Z",
3088 "last_status": "delivered",
3089 "last_delivered_at": "2026-10-04T15:42:07.611Z"
3090 },
3091 "secret": "whsec_…"
3092 },
3093 "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/)."
3094 },
3095 "create_webhook_for_workspace": {
3096 "params": {
3097 "workspace": "flagon-io"
3098 },
3099 "request": {
3100 "url": "https://hooks.example.com/g1t"
3101 },
3102 "response": {
3103 "hook": {
3104 "id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd",
3105 "scope": "workspace",
3106 "workspace": "flagon-io",
3107 "repo": null,
3108 "url": "https://hooks.example.com/g1t",
3109 "events": [
3110 "*"
3111 ],
3112 "active": true,
3113 "secret_hint": "…9c2e",
3114 "created_by": "syntaqx",
3115 "created_at": "2026-10-04T15:42:07.318Z",
3116 "last_status": "delivered",
3117 "last_delivered_at": "2026-10-04T15:42:07.611Z"
3118 },
3119 "secret": "whsec_…"
3120 },
3121 "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/)."
3122 },
3123 "update_webhook": {
3124 "params": {
3125 "id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd"
3126 },
3127 "request": {
3128 "active": false
3129 },
3130 "response": {
3131 "id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd",
3132 "scope": "repo",
3133 "workspace": "flagon-io",
3134 "repo": "flagon-io/hello",
3135 "url": "https://hooks.example.com/g1t",
3136 "events": [
3137 "git.push",
3138 "pull.merged"
3139 ],
3140 "active": false,
3141 "secret_hint": "…9c2e",
3142 "created_by": "syntaqx",
3143 "created_at": "2026-10-04T15:42:07.318Z",
3144 "last_status": "delivered",
3145 "last_delivered_at": "2026-10-04T15:42:07.611Z"
3146 }
3147 },
3148 "update_webhook_for_workspace": {
3149 "params": {
3150 "workspace": "flagon-io",
3151 "id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd"
3152 },
3153 "request": {
3154 "active": false
3155 },
3156 "response": {
3157 "id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd",
3158 "scope": "workspace",
3159 "workspace": "flagon-io",
3160 "repo": null,
3161 "url": "https://hooks.example.com/g1t",
3162 "events": [
3163 "git.push",
3164 "pull.merged"
3165 ],
3166 "active": false,
3167 "secret_hint": "…9c2e",
3168 "created_by": "syntaqx",
3169 "created_at": "2026-10-04T15:42:07.318Z",
3170 "last_status": "delivered",
3171 "last_delivered_at": "2026-10-04T15:42:07.611Z"
3172 }
3173 },
3174 "delete_webhook": {
3175 "params": {
3176 "id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd"
3177 },
3178 "response": true
3179 },
3180 "delete_webhook_for_workspace": {
3181 "params": {
3182 "workspace": "flagon-io",
3183 "id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd"
3184 },
3185 "response": true
3186 },
3187 "ping_webhook": {
3188 "params": {
3189 "id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd"
3190 },
3191 "response": {
3192 "id": "dlv_01kpx5p9v2j7k3m8n4p5q6r7st",
3193 "hook_id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd",
3194 "event_id": "",
3195 "event": "ping",
3196 "status": "delivered",
3197 "attempts": 1,
3198 "response_status": 200,
3199 "response_body": "ok",
3200 "error": null,
3201 "duration_ms": 184,
3202 "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\"}",
3203 "created_at": "2026-10-04T16:01:12.440Z",
3204 "delivered_at": "2026-10-04T16:01:12.631Z",
3205 "next_attempt_at": null
3206 },
3207 "notes": "`payload` is the JSON that was sent, as a string."
3208 },
3209 "ping_webhook_for_workspace": {
3210 "params": {
3211 "workspace": "flagon-io",
3212 "id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd"
3213 },
3214 "response": {
3215 "id": "dlv_01kpx5p9v2j7k3m8n4p5q6r7st",
3216 "hook_id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd",
3217 "event_id": "",
3218 "event": "ping",
3219 "status": "delivered",
3220 "attempts": 1,
3221 "response_status": 200,
3222 "response_body": "ok",
3223 "error": null,
3224 "duration_ms": 184,
3225 "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\"}",
3226 "created_at": "2026-10-04T16:01:12.440Z",
3227 "delivered_at": "2026-10-04T16:01:12.631Z",
3228 "next_attempt_at": null
3229 }
3230 },
3231 "list_webhook_deliveries": {
3232 "params": {
3233 "id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd"
3234 },
3235 "response": [
3236 {
3237 "id": "dlv_01kpx6a2b3c4d5e6f7g8h9j0kz",
3238 "hook_id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd",
3239 "event_id": "",
3240 "event": "ping",
3241 "status": "pending",
3242 "attempts": 1,
3243 "response_status": 503,
3244 "response_body": "Service Unavailable",
3245 "error": null,
3246 "duration_ms": 212,
3247 "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\"}",
3248 "created_at": "2026-10-04T16:20:03.100Z",
3249 "delivered_at": null,
3250 "next_attempt_at": "2026-10-04T16:21:03.312Z"
3251 },
3252 {
3253 "id": "dlv_01kpx5p9v2j7k3m8n4p5q6r7st",
3254 "hook_id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd",
3255 "event_id": "",
3256 "event": "ping",
3257 "status": "delivered",
3258 "attempts": 1,
3259 "response_status": 200,
3260 "response_body": "ok",
3261 "error": null,
3262 "duration_ms": 184,
3263 "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\"}",
3264 "created_at": "2026-10-04T16:01:12.440Z",
3265 "delivered_at": "2026-10-04T16:01:12.631Z",
3266 "next_attempt_at": null
3267 }
3268 ],
3269 "notes": "Returns at most 50, newest first. `status` is `pending`, `delivered` or `failed`; `next_attempt_at` is set while it is pending."
3270 },
3271 "list_webhook_deliveries_for_workspace": {
3272 "params": {
3273 "workspace": "flagon-io",
3274 "id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd"
3275 },
3276 "response": [
3277 {
3278 "id": "dlv_01kpx6a2b3c4d5e6f7g8h9j0kz",
3279 "hook_id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd",
3280 "event_id": "",
3281 "event": "ping",
3282 "status": "pending",
3283 "attempts": 1,
3284 "response_status": 503,
3285 "response_body": "Service Unavailable",
3286 "error": null,
3287 "duration_ms": 212,
3288 "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\"}",
3289 "created_at": "2026-10-04T16:20:03.100Z",
3290 "delivered_at": null,
3291 "next_attempt_at": "2026-10-04T16:21:03.312Z"
3292 },
3293 {
3294 "id": "dlv_01kpx5p9v2j7k3m8n4p5q6r7st",
3295 "hook_id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd",
3296 "event_id": "",
3297 "event": "ping",
3298 "status": "delivered",
3299 "attempts": 1,
3300 "response_status": 200,
3301 "response_body": "ok",
3302 "error": null,
3303 "duration_ms": 184,
3304 "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\"}",
3305 "created_at": "2026-10-04T16:01:12.440Z",
3306 "delivered_at": "2026-10-04T16:01:12.631Z",
3307 "next_attempt_at": null
3308 }
3309 ]
3310 },
3311 "redeliver_webhook": {
3312 "params": {
3313 "id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd",
3314 "delivery": "dlv_01kpx6a2b3c4d5e6f7g8h9j0kz"
3315 },
3316 "response": {
3317 "id": "dlv_01kpx6c8d1e2f3g4h5j6k7m8np",
3318 "hook_id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd",
3319 "event_id": "",
3320 "event": "ping",
3321 "status": "delivered",
3322 "attempts": 1,
3323 "response_status": 200,
3324 "response_body": "ok",
3325 "error": null,
3326 "duration_ms": 171,
3327 "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\"}",
3328 "created_at": "2026-10-04T16:25:40.007Z",
3329 "delivered_at": "2026-10-04T16:25:40.178Z",
3330 "next_attempt_at": null
3331 },
3332 "notes": "The response is the new delivery."
3333 },
3334 "redeliver_webhook_for_workspace": {
3335 "params": {
3336 "workspace": "flagon-io",
3337 "id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd",
3338 "delivery": "dlv_01kpx6a2b3c4d5e6f7g8h9j0kz"
3339 },
3340 "response": {
3341 "id": "dlv_01kpx6c8d1e2f3g4h5j6k7m8np",
3342 "hook_id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd",
3343 "event_id": "",
3344 "event": "ping",
3345 "status": "delivered",
3346 "attempts": 1,
3347 "response_status": 200,
3348 "response_body": "ok",
3349 "error": null,
3350 "duration_ms": 171,
3351 "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\"}",
3352 "created_at": "2026-10-04T16:25:40.007Z",
3353 "delivered_at": "2026-10-04T16:25:40.178Z",
3354 "next_attempt_at": null
3355 }
3356 },
3357 "list_integrations": {
3358 "params": {
3359 "workspace": "flagon-io"
3360 },
3361 "response": [
3362 {
3363 "id": "con_01kpx3m7q2f8r9t4v6w0y1z2ab",
3364 "workspace": "flagon-io",
3365 "provider": "anthropic",
3366 "kind": "models",
3367 "name": "Anthropic",
3368 "config": {
3369 "assign": false,
3370 "write_back": true
3371 },
3372 "secret_hint": "…3f9a",
3373 "webhook_url": null,
3374 "created_by": "syntaqx",
3375 "created_at": "2026-10-04T15:42:07.318Z",
3376 "last_used_at": "2026-10-04T15:42:08.102Z",
3377 "last_error": null,
3378 "models": [
3379 "claude-haiku-4-5",
3380 "claude-sonnet-4-5"
3381 ]
3382 },
3383 {
3384 "id": "con_01kpx4n8r3g9s0v5w7x1z2a3bc",
3385 "workspace": "flagon-io",
3386 "provider": "jira",
3387 "kind": "tracker",
3388 "name": "Jira",
3389 "config": {
3390 "assign": false,
3391 "write_back": true,
3392 "site": "https://acme.atlassian.net",
3393 "email": "syntaqx@example.com",
3394 "keys": [
3395 "TECH"
3396 ]
3397 },
3398 "secret_hint": "…x7Qe",
3399 "webhook_url": null,
3400 "created_by": "syntaqx",
3401 "created_at": "2026-10-04T15:42:07.318Z",
3402 "last_used_at": null,
3403 "last_error": null,
3404 "models": []
3405 }
3406 ],
3407 "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."
3408 },
3409 "connect_integration": {
3410 "params": {
3411 "workspace": "flagon-io"
3412 },
3413 "request": {
3414 "provider": "webhook",
3415 "config": {
3416 "repo": "flagon-io/hello",
3417 "label": "bug"
3418 }
3419 },
3420 "response": {
3421 "connection": {
3422 "id": "con_01kpx4n8r3g9s0v5w7x1z2a3bd",
3423 "workspace": "flagon-io",
3424 "provider": "webhook",
3425 "kind": "alerts",
3426 "name": "Webhook",
3427 "config": {
3428 "repo": "flagon-io/hello",
3429 "label": "bug",
3430 "assign": false,
3431 "write_back": true
3432 },
3433 "secret_hint": null,
3434 "webhook_url": "https://api.g1t.sh/hooks/con_01kpx4n8r3g9s0v5w7x1z2a3bd",
3435 "created_by": "syntaqx",
3436 "created_at": "2026-10-04T15:42:07.318Z",
3437 "last_used_at": null,
3438 "last_error": null,
3439 "models": []
3440 },
3441 "signing_secret": "g1ts_9f2c4a7e1b0d3c6f8a2e5b7d9c1f4a6e8b0d2c4f6a8e1b3d"
3442 },
3443 "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/)."
3444 },
3445 "disconnect_integration": {
3446 "params": {
3447 "workspace": "flagon-io",
3448 "id": "con_01kpx3m7q2f8r9t4v6w0y1z2ab"
3449 },
3450 "response": true
3451 },
3452 "test_integration": {
3453 "params": {
3454 "workspace": "flagon-io",
3455 "id": "con_01kpx3m7q2f8r9t4v6w0y1z2ab"
3456 },
3457 "response": {
3458 "ok": true,
3459 "message": "Anthropic accepted the key and offers 9 models."
3460 },
3461 "notes": "Credentials that do not work still answer `200`, with `ok` false and `message` saying what went wrong."
3462 },
3463 "get_model_routes": {
3464 "params": {
3465 "workspace": "flagon-io"
3466 },
3467 "response": [
3468 {
3469 "task": "default",
3470 "connection_id": "con_01kpx3m7q2f8r9t4v6w0y1z2ab",
3471 "model": "claude-sonnet-4-5"
3472 },
3473 {
3474 "task": "review",
3475 "connection_id": null,
3476 "model": null
3477 }
3478 ]
3479 },
3480 "set_model_routes": {
3481 "params": {
3482 "workspace": "flagon-io"
3483 },
3484 "request": {
3485 "routes": [
3486 {
3487 "task": "default",
3488 "connection_id": "con_01kpx3m7q2f8r9t4v6w0y1z2ab",
3489 "model": "claude-sonnet-4-5"
3490 },
3491 {
3492 "task": "review",
3493 "connection_id": null
3494 }
3495 ]
3496 },
3497 "response": [
3498 {
3499 "task": "default",
3500 "connection_id": "con_01kpx3m7q2f8r9t4v6w0y1z2ab",
3501 "model": "claude-sonnet-4-5"
3502 },
3503 {
3504 "task": "review",
3505 "connection_id": null,
3506 "model": null
3507 }
3508 ],
3509 "notes": "The response is the routes as saved, ordered by task."
3510 },
3511 "get_context": {
3512 "query": {
3513 "reference": "TECH-1234"
3514 },
3515 "response": {
3516 "provider": "jira",
3517 "key": "TECH-1234",
3518 "title": "Checkout fails for EU cards",
3519 "url": "https://acme.atlassian.net/browse/TECH-1234",
3520 "status": "In Progress",
3521 "body": "Customers with 3DS cards see a 500 at /pay.",
3522 "fetched_at": "2026-10-04T15:42:07.318Z"
3523 }
3524 },
3525 "import_issue": {
3526 "request": {
3527 "reference": "TECH-1234"
3528 },
3529 "response": {
3530 "number": 42,
3531 "item": {
3532 "provider": "jira",
3533 "key": "TECH-1234",
3534 "title": "Checkout fails for EU cards",
3535 "url": "https://acme.atlassian.net/browse/TECH-1234",
3536 "status": "In Progress",
3537 "body": "Customers with 3DS cards see a 500 at /pay.",
3538 "fetched_at": "2026-10-04T15:42:07.318Z"
3539 },
3540 "created": true
3541 },
3542 "notes": "`created` is false when the ticket was imported before; `number` is then that issue."
3543 },
3544 "remember": {
3545 "request": {
3546 "text": "The tests need TZ=UTC or the date tests fail.",
3547 "scope": "project",
3548 "kind": "gotcha",
3549 "from_number": 14
3550 },
3551 "response": {
3552 "id": "mem_01m43v8q2w3e4r5t6y7u8i9o0p",
3553 "scope": "project",
3554 "workspace": "flagon-io",
3555 "repo": {
3556 "namespace": "flagon-io",
3557 "name": "hello"
3558 },
3559 "text": "The tests need TZ=UTC or the date tests fail.",
3560 "kind": "gotcha",
3561 "source": {
3562 "kind": "run",
3563 "run_id": "arn_01m43v2c1p9k8d7e6f5a4b3c2d",
3564 "repo": {
3565 "namespace": "flagon-io",
3566 "name": "hello"
3567 },
3568 "number": 14
3569 },
3570 "created_by": "g1t",
3571 "pinned": false,
3572 "created_at": "2026-10-01T18:40:12.000Z",
3573 "updated_at": "2026-10-01T18:40:12.000Z",
3574 "last_used_at": null
3575 },
3576 "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."
3577 },
3578 "recall": {
3579 "query": {
3580 "q": "pnpm"
3581 },
3582 "response": {
3583 "project": [],
3584 "workspace": [
3585 {
3586 "id": "mem_01m43t0a1s2d3f4g5h6j7k8l9z",
3587 "scope": "workspace",
3588 "workspace": "flagon-io",
3589 "repo": null,
3590 "text": "We use pnpm everywhere, never npm or yarn.",
3591 "kind": "convention",
3592 "source": {
3593 "kind": "person",
3594 "run_id": null,
3595 "repo": null,
3596 "number": null
3597 },
3598 "created_by": "syntaqx",
3599 "pinned": true,
3600 "created_at": "2026-10-01T18:40:12.000Z",
3601 "updated_at": "2026-10-01T18:40:12.000Z",
3602 "last_used_at": null
3603 }
3604 ]
3605 },
3606 "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."
3607 },
3608 "search": {
3609 "query": {
3610 "q": "parse_query language:rust repo:acme/web",
3611 "type": "code"
3612 },
3613 "response": {
3614 "query": "parse_query repo:acme/web language:rust",
3615 "type": "code",
3616 "counts": {
3617 "repositories": 0,
3618 "code": 2,
3619 "issues": 0,
3620 "pulls": 0,
3621 "people": 0
3622 },
3623 "page": 1,
3624 "per_page": 20,
3625 "more": false,
3626 "hits": [
3627 {
3628 "kind": "code",
3629 "title": "src/search/query.rs",
3630 "url": "/acme/web/blob/main/src/search/query.rs#L42",
3631 "repo": "acme/web",
3632 "private": false,
3633 "description": null,
3634 "snippet": [],
3635 "lines": [
3636 {
3637 "number": 41,
3638 "parts": [
3639 {
3640 "text": "/// Reads a query typed into the search box.",
3641 "highlight": false
3642 }
3643 ]
3644 },
3645 {
3646 "number": 42,
3647 "parts": [
3648 {
3649 "text": "pub fn ",
3650 "highlight": false
3651 },
3652 {
3653 "text": "parse_query",
3654 "highlight": true
3655 },
3656 {
3657 "text": "(text: &str) -> Query {",
3658 "highlight": false
3659 }
3660 ]
3661 },
3662 {
3663 "number": 43,
3664 "parts": [
3665 {
3666 "text": " let mut query = Query::default();",
3667 "highlight": false
3668 }
3669 ]
3670 }
3671 ],
3672 "path": "src/search/query.rs",
3673 "language": "rust",
3674 "ref": "main",
3675 "number": null,
3676 "state": null,
3677 "author": null,
3678 "requested_by": null,
3679 "labels": [],
3680 "topics": [],
3681 "slug": null,
3682 "avatar": null,
3683 "updated_at": null
3684 }
3685 ],
3686 "notes": []
3687 },
3688 "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."
3689 },
3690 "search_context": {
3691 "params": {
3692 "workspace": "acme"
3693 },
3694 "query": {
3695 "q": "how do we run the web tests",
3696 "project": "web"
3697 },
3698 "response": {
3699 "query": "how do we run the web tests",
3700 "mode": "semantic",
3701 "hits": [
3702 {
3703 "kind": "memory",
3704 "id": "mem_01m4a0c2b7k3f9d1e5g8h2j6k4",
3705 "title": "Gotcha",
3706 "snippet": "The date tests fail unless TZ=UTC.",
3707 "project": "web",
3708 "url": "/acme/web/memory",
3709 "score": 0.82,
3710 "source": "AGENTS.md",
3711 "by": "g1t",
3712 "updated_at": "2026-10-04T21:10:02.000Z"
3713 },
3714 {
3715 "kind": "doc",
3716 "id": "ent_5f0c2a9e41d7b3c86a1e2f40:2",
3717 "title": "Web (README.md)",
3718 "snippet": "## Testing Run npm test. The end-to-end tests need the api running locally…",
3719 "project": "web",
3720 "url": "/acme/web/blob/main/README.md",
3721 "score": 0.77,
3722 "source": "README.md",
3723 "by": null,
3724 "updated_at": "2026-10-04T20:58:41.000Z"
3725 },
3726 {
3727 "kind": "project",
3728 "id": "ent_9b1d6f0a2c3e4b5d6e7f8a9b",
3729 "title": "web",
3730 "snippet": "The storefront. Written in TypeScript. Packages: @acme/web. Uses api. Owned by ana.",
3731 "project": "web",
3732 "url": "/acme/web",
3733 "score": 0.71,
3734 "source": "catalog",
3735 "by": null,
3736 "updated_at": "2026-10-04T20:58:41.000Z"
3737 }
3738 ]
3739 },
3740 "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."
3741 },
3742 "get_entity": {
3743 "params": {
3744 "workspace": "acme",
3745 "kind": "project",
3746 "id": "web"
3747 },
3748 "response": {
3749 "entity": {
3750 "id": "ent_9b1d6f0a2c3e4b5d6e7f8a9b",
3751 "workspace": "acme",
3752 "kind": "project",
3753 "key": "web",
3754 "name": "web",
3755 "summary": "The storefront. Written in TypeScript. Packages: @acme/web. Uses api. Owned by ana.",
3756 "project": "web",
3757 "private": true,
3758 "data": {
3759 "repo": "acme/web",
3760 "root_dir": "",
3761 "default_branch": "main",
3762 "languages": [
3763 "TypeScript"
3764 ],
3765 "owners": [
3766 "ana"
3767 ],
3768 "tests": true,
3769 "test_commands": [
3770 "npm test"
3771 ],
3772 "production_url": "https://web--acme.g1t.page"
3773 },
3774 "source": "scan",
3775 "ref": "/acme/web",
3776 "updated_at": "2026-10-04T20:58:41.000Z"
3777 },
3778 "relations": [
3779 {
3780 "kind": "depends_on",
3781 "direction": "out",
3782 "entity": {
3783 "id": "ent_0a7c3e5b9d1f2a4c6e8b0d2f",
3784 "workspace": "acme",
3785 "kind": "project",
3786 "key": "api",
3787 "name": "api",
3788 "summary": "The public API. Written in Rust.",
3789 "project": "api",
3790 "private": true,
3791 "data": {},
3792 "source": "scan",
3793 "ref": "/acme/api",
3794 "updated_at": "2026-10-04T20:57:12.000Z"
3795 }
3796 },
3797 {
3798 "kind": "owned_by",
3799 "direction": "out",
3800 "entity": {
3801 "id": "ent_3c5e7a9b1d2f4a6c8e0b2d4f",
3802 "workspace": "acme",
3803 "kind": "owner",
3804 "key": "ana",
3805 "name": "ana",
3806 "summary": null,
3807 "project": null,
3808 "private": false,
3809 "data": {},
3810 "source": "scan",
3811 "ref": "/u/ana",
3812 "updated_at": "2026-10-04T20:58:41.000Z"
3813 }
3814 }
3815 ]
3816 },
3817 "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."
3818 },
3819 "list_collaborators": {
3820 "response": {
3821 "repo": "flagon-io/hello",
3822 "base_permission": "write",
3823 "people": [
3824 {
3825 "username": "syntaqx",
3826 "name": "Chase Pierce",
3827 "avatar": null,
3828 "role": "admin",
3829 "source": "owner",
3830 "direct": null,
3831 "workspace_role": "owner"
3832 },
3833 {
3834 "username": "linus",
3835 "name": null,
3836 "avatar": null,
3837 "role": "maintain",
3838 "source": "direct",
3839 "direct": "maintain",
3840 "workspace_role": "member"
3841 },
3842 {
3843 "username": "grace",
3844 "name": "Grace Hopper",
3845 "avatar": null,
3846 "role": "write",
3847 "source": "base",
3848 "direct": null,
3849 "workspace_role": "member"
3850 },
3851 {
3852 "username": "ada",
3853 "name": "Ada Lovelace",
3854 "avatar": null,
3855 "role": "triage",
3856 "source": "direct",
3857 "direct": "triage",
3858 "workspace_role": null
3859 }
3860 ],
3861 "invitations": [
3862 {
3863 "id": "rin_01kp3c4d5e6f7g8h9j0k1m2n3p",
3864 "repo": "flagon-io/hello",
3865 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
3866 "invitee": "alan",
3867 "email": null,
3868 "role": "write",
3869 "invited_by": "syntaqx",
3870 "inviter_avatar": null,
3871 "status": "pending",
3872 "created_at": "2026-10-05T17:00:00.000Z",
3873 "expires_at": "2026-10-12T17:00:00.000Z"
3874 },
3875 {
3876 "id": "rin_01kp3d7e8f9g0h1j2k3m4n5p6q",
3877 "repo": "flagon-io/hello",
3878 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
3879 "invitee": null,
3880 "email": "joan@example.com",
3881 "role": "read",
3882 "invited_by": "syntaqx",
3883 "inviter_avatar": null,
3884 "status": "pending",
3885 "created_at": "2026-10-05T17:00:00.000Z",
3886 "expires_at": "2026-10-12T17:00:00.000Z"
3887 }
3888 ],
3889 "viewer_role": "admin",
3890 "can_manage": true
3891 },
3892 "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/)."
3893 },
3894 "add_collaborator": {
3895 "request": {
3896 "invitee": "ada",
3897 "role": "triage"
3898 },
3899 "response": {
3900 "result": "invited",
3901 "invitation": {
3902 "id": "rin_01kp3e9f0g1h2j3k4m5n6p7q8r",
3903 "repo": "flagon-io/hello",
3904 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
3905 "invitee": "ada",
3906 "email": null,
3907 "role": "triage",
3908 "invited_by": "syntaqx",
3909 "inviter_avatar": null,
3910 "status": "pending",
3911 "created_at": "2026-10-05T17:00:00.000Z",
3912 "expires_at": "2026-10-12T17:00:00.000Z"
3913 }
3914 },
3915 "notes": "`invitee` is a username or an email address. A member of the workspace answers `{\"result\": \"granted\", \"collaborator\": {…}}` with the role already given, shown as list_collaborators shows a person. Anyone else answers `{\"result\": \"invited\", \"invitation\": {…}}`: the invitation is emailed and waits 7 days, and the role is theirs once they accept it. An email address without an account gets an invitation with `email` set and `invitee` null, and an invite that makes the account and accepts in one step. Refused with `404` when no account has that username, `409` when they already have a role of their own or a pending invitation (change it with update_collaborator), and `403` without the Admin role, from an agent's or a workspace's token, or when the person does not meet what the workspace asks of everyone with access. The `repo.collaborator_added` webhook event is sent once they have the role. See [Access and roles](/guides/access-and-roles/)."
3916 },
3917 "update_collaborator": {
3918 "params": {
3919 "owner": "flagon-io",
3920 "name": "hello",
3921 "username": "ada"
3922 },
3923 "request": {
3924 "role": "write"
3925 },
3926 "response": {
3927 "username": "ada",
3928 "name": "Ada Lovelace",
3929 "avatar": null,
3930 "role": "write",
3931 "source": "direct",
3932 "direct": "write",
3933 "workspace_role": null
3934 },
3935 "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/)."
3936 },
3937 "remove_collaborator": {
3938 "params": {
3939 "owner": "flagon-io",
3940 "name": "hello",
3941 "username": "ada"
3942 },
3943 "response": true,
3944 "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/)."
3945 },
3946 "get_collaborator_permission": {
3947 "params": {
3948 "owner": "flagon-io",
3949 "name": "hello",
3950 "username": "ada"
3951 },
3952 "response": {
3953 "username": "ada",
3954 "role": "triage",
3955 "source": "direct",
3956 "capabilities": [
3957 "read",
3958 "participate",
3959 "triage"
3960 ]
3961 },
3962 "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/)."
3963 },
3964 "list_repo_invitations": {
3965 "response": [
3966 {
3967 "id": "rin_01kp3c4d5e6f7g8h9j0k1m2n3p",
3968 "repo": "flagon-io/hello",
3969 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
3970 "invitee": "alan",
3971 "email": null,
3972 "role": "write",
3973 "invited_by": "syntaqx",
3974 "inviter_avatar": null,
3975 "status": "pending",
3976 "created_at": "2026-10-05T17:00:00.000Z",
3977 "expires_at": "2026-10-12T17:00:00.000Z"
3978 },
3979 {
3980 "id": "rin_01kp3d7e8f9g0h1j2k3m4n5p6q",
3981 "repo": "flagon-io/hello",
3982 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
3983 "invitee": null,
3984 "email": "joan@example.com",
3985 "role": "read",
3986 "invited_by": "syntaqx",
3987 "inviter_avatar": null,
3988 "status": "pending",
3989 "created_at": "2026-10-05T17:00:00.000Z",
3990 "expires_at": "2026-10-12T17:00:00.000Z"
3991 }
3992 ],
3993 "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/)."
3994 },
3995 "revoke_repo_invitation": {
3996 "params": {
3997 "owner": "flagon-io",
3998 "name": "hello",
3999 "id": "rin_01kp3c4d5e6f7g8h9j0k1m2n3p"
4000 },
4001 "response": {
4002 "id": "rin_01kp3c4d5e6f7g8h9j0k1m2n3p",
4003 "repo": "flagon-io/hello",
4004 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
4005 "invitee": "alan",
4006 "email": null,
4007 "role": "write",
4008 "invited_by": "syntaqx",
4009 "inviter_avatar": null,
4010 "status": "revoked",
4011 "created_at": "2026-10-05T17:00:00.000Z",
4012 "expires_at": "2026-10-12T17:00:00.000Z"
4013 },
4014 "notes": "`404` when there is no pending invitation with that id on this repository."
4015 },
4016 "list_my_repo_invitations": {
4017 "response": [
4018 {
4019 "id": "rin_01kp3e9f0g1h2j3k4m5n6p7q8r",
4020 "repo": "flagon-io/hello",
4021 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
4022 "invitee": "ada",
4023 "email": null,
4024 "role": "triage",
4025 "invited_by": "syntaqx",
4026 "inviter_avatar": null,
4027 "status": "pending",
4028 "created_at": "2026-10-05T17:00:00.000Z",
4029 "expires_at": "2026-10-12T17:00:00.000Z"
4030 }
4031 ],
4032 "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."
4033 },
4034 "accept_repo_invitation": {
4035 "params": {
4036 "id": "rin_01kp3e9f0g1h2j3k4m5n6p7q8r"
4037 },
4038 "response": {
4039 "id": "rin_01kp3e9f0g1h2j3k4m5n6p7q8r",
4040 "repo": "flagon-io/hello",
4041 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
4042 "invitee": "ada",
4043 "email": null,
4044 "role": "triage",
4045 "invited_by": "syntaqx",
4046 "inviter_avatar": null,
4047 "status": "accepted",
4048 "created_at": "2026-10-05T17:00:00.000Z",
4049 "expires_at": "2026-10-12T17:00:00.000Z"
4050 },
4051 "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/)."
4052 },
4053 "decline_repo_invitation": {
4054 "params": {
4055 "id": "rin_01kp3e9f0g1h2j3k4m5n6p7q8r"
4056 },
4057 "response": {
4058 "id": "rin_01kp3e9f0g1h2j3k4m5n6p7q8r",
4059 "repo": "flagon-io/hello",
4060 "repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
4061 "invitee": "ada",
4062 "email": null,
4063 "role": "triage",
4064 "invited_by": "syntaqx",
4065 "inviter_avatar": null,
4066 "status": "declined",
4067 "created_at": "2026-10-05T17:00:00.000Z",
4068 "expires_at": "2026-10-12T17:00:00.000Z"
4069 },
4070 "notes": "`404` when you have no pending invitation with that id."
4071 },
4072 "set_base_permission": {
4073 "params": {
4074 "workspace": "flagon-io"
4075 },
4076 "request": {
4077 "base_permission": "read"
4078 },
4079 "response": {
4080 "workspace": "flagon-io",
4081 "base_permission": "read"
4082 },
4083 "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/)."
4084 },
4085 "list_outside_collaborators": {
4086 "params": {
4087 "workspace": "flagon-io"
4088 },
4089 "response": [
4090 {
4091 "username": "ada",
4092 "name": "Ada Lovelace",
4093 "avatar": null,
4094 "repos": [
4095 {
4096 "repo": "flagon-io/docs",
4097 "role": "write"
4098 },
4099 {
4100 "repo": "flagon-io/hello",
4101 "role": "triage"
4102 }
4103 ]
4104 }
4105 ],
4106 "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/)."
4107 },
4108 "list_security_alerts": {
4109 "params": {
4110 "owner": "flagon-io",
4111 "name": "hello"
4112 },
4113 "query": {
4114 "state": "open"
4115 },
4116 "response": [
4117 {
4118 "kind": "secret",
4119 "id": "sec_01kp4a7b2c3d4e5f6g7h8j9k0m",
4120 "state": "dismissed",
4121 "secret_type": "aws_access_key",
4122 "label": "an AWS access key",
4123 "path": "test/fixtures/aws.env",
4124 "line": 3,
4125 "commit": "9f2c1e04b7d3a8e6f5c2b1a0d9e8f7c6b5a4d3e2",
4126 "preview": "AKIA…MPLE",
4127 "status": "allowed",
4128 "source": "history",
4129 "test_value": "the documented example key",
4130 "found_by": null,
4131 "found_at": "2026-10-01T12:00:00.000Z",
4132 "dismissed_reason": "used_in_tests",
4133 "dismissed_comment": "Only in the test fixtures.",
4134 "dismissed_by": "syntaqx",
4135 "dismissed_at": "2026-10-02T09:15:00.000Z"
4136 },
4137 {
4138 "kind": "dependency",
4139 "id": "vul_01kp4b8c3d4e5f6g7h8j9k0m1n",
4140 "state": "open",
4141 "ecosystem": "npm",
4142 "package": "lodash",
4143 "version": "4.17.20",
4144 "manifest": "package-lock.json",
4145 "advisory": "GHSA-35jh-r3h4-6jhm",
4146 "osv_id": "GHSA-35jh-r3h4-6jhm",
4147 "summary": "Command Injection in lodash",
4148 "severity": "high",
4149 "fixed_version": "4.17.21",
4150 "fixed_at": null,
4151 "update": {
4152 "state": "open",
4153 "target": "4.17.21",
4154 "branch": "g1t/security/lodash-4.17.21",
4155 "pull": 42,
4156 "issue": null,
4157 "error": null,
4158 "updated_at": "2026-10-01T12:20:00.000Z"
4159 },
4160 "found_at": "2026-10-01T12:00:00.000Z",
4161 "dismissed_reason": null,
4162 "dismissed_comment": null,
4163 "dismissed_by": null,
4164 "dismissed_at": null
4165 }
4166 ],
4167 "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/)."
4168 },
4169 "dismiss_security_alert": {
4170 "params": {
4171 "owner": "flagon-io",
4172 "name": "hello",
4173 "id": "vul_01kp4b8c3d4e5f6g7h8j9k0m1n"
4174 },
4175 "request": {
4176 "reason": "tolerable_risk",
4177 "comment": "Only the build uses it, on trusted input."
4178 },
4179 "response": {
4180 "kind": "dependency",
4181 "id": "vul_01kp4b8c3d4e5f6g7h8j9k0m1n",
4182 "state": "dismissed",
4183 "ecosystem": "npm",
4184 "package": "lodash",
4185 "version": "4.17.20",
4186 "manifest": "package-lock.json",
4187 "advisory": "GHSA-35jh-r3h4-6jhm",
4188 "osv_id": "GHSA-35jh-r3h4-6jhm",
4189 "summary": "Command Injection in lodash",
4190 "severity": "high",
4191 "fixed_version": "4.17.21",
4192 "fixed_at": null,
4193 "update": {
4194 "state": "open",
4195 "target": "4.17.21",
4196 "branch": "g1t/security/lodash-4.17.21",
4197 "pull": 42,
4198 "issue": null,
4199 "error": null,
4200 "updated_at": "2026-10-01T12:20:00.000Z"
4201 },
4202 "found_at": "2026-10-01T12:00:00.000Z",
4203 "dismissed_reason": "tolerable_risk",
4204 "dismissed_comment": "Only the build uses it, on trusted input.",
4205 "dismissed_by": "syntaqx",
4206 "dismissed_at": "2026-10-06T10:00:00.000Z"
4207 },
4208 "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."
4209 },
4210 "reopen_security_alert": {
4211 "params": {
4212 "owner": "flagon-io",
4213 "name": "hello",
4214 "id": "sec_01kp4a7b2c3d4e5f6g7h8j9k0m"
4215 },
4216 "response": {
4217 "kind": "secret",
4218 "id": "sec_01kp4a7b2c3d4e5f6g7h8j9k0m",
4219 "state": "open",
4220 "secret_type": "aws_access_key",
4221 "label": "an AWS access key",
4222 "path": "test/fixtures/aws.env",
4223 "line": 3,
4224 "commit": "9f2c1e04b7d3a8e6f5c2b1a0d9e8f7c6b5a4d3e2",
4225 "preview": "AKIA…MPLE",
4226 "status": "open",
4227 "source": "history",
4228 "test_value": "the documented example key",
4229 "found_by": null,
4230 "found_at": "2026-10-01T12:00:00.000Z",
4231 "dismissed_reason": null,
4232 "dismissed_comment": null,
4233 "dismissed_by": null,
4234 "dismissed_at": null
4235 },
4236 "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."
4237 }
4238}