Skip to content

Pin a project you can see, at position (0 first) or at the end; pinning one already pinned moves it.

PUT/user/pinned_projects/{workspace}/{project}

At most 8 a workspace: unpin one first when you have 8. Returns your pins, in order.

A ninth pin in a workspace is refused with 409 conflict: unpin one first.

  • Authentication: Required. Send an access token as Authorization: Bearer.
  • MCP tool: workspace with action pin_project, and the same inputs
  • Scope: An access token needs account:write.
Name Type Required Description
workspace string Yes The workspace’s slug, e.g. “flagon-io”.
project string Yes The project’s slug, as in g1t.sh/{workspace}/{project}.

Send a JSON object. Names are snake_case, as in responses; the camelCase spelling is accepted too.

Name Type Required Description
position integer No Where it goes, 0 first. Left out: at the end.
curl -X PUT https://api.g1t.sh/user/pinned_projects/flagon-io/hello \
-H "Authorization: Bearer $G1T_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"position": 0
}'

A successful request answers 200 with:

[
{
"position": 0,
"id": "prj_01kkp3n2a7e5v8sk3b6g9j4m1y",
"workspace": "flagon-io",
"slug": "hello",
"name": "hello",
"description": "Greets people from the command line.",
"private": false,
"archived": false,
"kind": "library",
"url": "https://g1t.sh/flagon-io/hello",
"pushed_at": null,
"updated_at": "2026-10-01T09:12:00.000Z"
},
{
"position": 1,
"id": "prj_01kkp3m8w2f6t9qh4c7d1r5n0x",
"workspace": "flagon-io",
"slug": "g1t",
"name": "g1t",
"description": null,
"private": false,
"archived": false,
"kind": "app",
"url": "https://g1t.sh/flagon-io/g1t",
"pushed_at": "2026-10-07T10:00:00.000Z",
"updated_at": "2026-10-01T09:12:00.000Z"
},
{
"position": 2,
"id": "prj_01kkq0c4d9h2w7rn5f8t3k6p2z",
"workspace": "flagon-io",
"slug": "lab-api",
"name": "lab-api",
"description": null,
"private": true,
"archived": false,
"kind": "app",
"url": "https://g1t.sh/flagon-io/lab-api",
"pushed_at": "2026-10-06T18:40:00.000Z",
"updated_at": "2026-10-01T09:12:00.000Z"
}
]

A failed request answers with one of these statuses and a body like {"error": {"code": "not_found", "message": "Repository not found."}}. See errors.

Status Code When
401 unauthenticated A token is required, or the one sent is not valid.
403 forbidden The token is valid but not allowed to do this, such as a member-only change or an agent token outside its repository.
404 not_found It does not exist, or you cannot see it.
409 conflict The request conflicts with the current state.
422 invalid The input is not valid. message says which field and why.