Skip to content

Put your pins in a workspace in a new order: projects names every pinned project's slug, once, in the order you want them.

PUT/user/pinned_projects/{workspace}

Returns your pins, in order.

Name every pinned project once; anything else is refused with 422 invalid.

  • Authentication: Required. Send an access token as Authorization: Bearer.
  • MCP tool: workspace with action reorder_pinned_projects, 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”.

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

Name Type Required Description
projects array of strings Yes Every pinned project’s slug, once, in the order you want them.
curl -X PUT https://api.g1t.sh/user/pinned_projects/flagon-io \
-H "Authorization: Bearer $G1T_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"projects": [
"lab-api",
"g1t",
"hello"
]
}'

A successful request answers 200 with:

[
{
"position": 0,
"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"
},
{
"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_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"
}
]

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.