Decline a workspace invitation
Decline an invitation to a workspace sent to you.
POST
/user/invitations/{id}/declineWhoever sent it is told in their inbox, and the workspace’s owners can invite you again. People only.
Whoever sent it is told in their inbox. The workspace’s owners can invite you again. 404 when you have no open invitation with that id.
- Authentication: Required. Send an access token as
Authorization: Bearer. - MCP tool:
accountwithactiondecline_workspace_invitation, and the same inputs - Scope: An access token needs
account:write.
Path parameters
Section titled “Path parameters”| Name | Type | Required | Description |
|---|---|---|---|
id |
string | Yes | The invitation’s id, from list_invitations. |
Example request
Section titled “Example request”curl -X POST https://api.g1t.sh/user/invitations/inv_01kp2x7m8n9q0r1s2t3v4w5x6y/decline \ -H "Authorization: Bearer $G1T_TOKEN"Example response
Section titled “Example response”A successful request answers 200 with:
trueErrors
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. |