Create an invite
Make an invite.
/user/invitesWith email, it is sent there and only that address can use it; without, anyone with the code can, once. It works for 30 days. It uses one of your invites, or with workspace, one of the invites g1t granted that workspace (its owners only). Returns the invite with its code; the link is https://g1t.sh/invite/<code>. People only: an agent’s token or a workspace’s token cannot make invites.
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>.
- Authentication: Required. Send an access token as
Authorization: Bearer. - MCP tool:
accountwithactioncreate_invite, and the same inputs - Scope: An access token needs
account:write.
Body parameters
Section titled “Body parameters”Send a JSON object. Names are snake_case, as in responses; the camelCase spelling is accepted too.
| Name | Type | Required | Description |
|---|---|---|---|
email |
string | No | Only this address can use it, and it is emailed there. Left out, anyone with the code can. |
workspace |
string | No | Use one of the invites g1t granted this workspace instead of yours, by slug. Owners only. |
Example request
Section titled “Example request”curl -X POST https://api.g1t.sh/user/invites \ -H "Authorization: Bearer $G1T_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "email": "ada@example.com" }'Example response
Section titled “Example response”A successful request answers 200 with:
{ "id": "inv_01kp2x7m8n9q0r1s2t3v4w5x6y", "code": "g1t-k7m2-q9xd-4hpw-…", "hint": "g1t-k7m2", "email": "ada@example.com", "kind": "account", "workspace": null, "status": "pending", "charged_to": "user", "invited_by": "syntaqx", "redeemed_by": null, "created_at": "2026-10-05T17:00:00.000Z", "expires_at": "2026-11-04T17:00:00.000Z", "redeemed_at": null, "revoked_at": null}Errors
Section titled “Errors”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. |