cancel_team_invitation
Withdraw a team invitation that has not been accepted.
Purpose
Withdraws a pending invitation. The link stops working and the invitee never becomes a member.
An invitee is not a member
Someone who has not accepted has no membership row — only a pending
invitation. That is why this is a separate tool from
remove_team_member: the two fail on
different things, and using the wrong one returns RESOURCE_NOT_FOUND instead
of doing something surprising.
Not tier-gated. See what the tier gates.
Required ability
team-member:remove — the same ability as removing a member, because withdrawing an invitation and removing a collaborator revoke the same prospective access.
Input schema
{
"type": "object",
"properties": {
"team_id": { "type": "string", "description": "UUID of the team." },
"invitation_id": {
"type": "string",
"description": "UUID of the pending invitation to withdraw."
}
},
"required": ["team_id", "invitation_id"]
}Output shape
{
"data": {
"team_id": "a83f0d51-4c92-4b7e-8615-2fd9e70a3c86",
"invitation_id": "b73c5f21-9d80-4a6e-8215-4f70ce13a9d6",
"cancelled": true
}
}No webhook event fires. An invitation that was never accepted changed nobody's access, so there is no membership transition to announce.
Example prompts
"Cancel the invitation we sent to the wrong address."
Failure modes
AUTHENTICATION_REQUIRED— no authenticated user on the request.TOKEN_MISSING_ABILITY— token lacksteam-member:remove.RESOURCE_NOT_FOUND— no such team, or no pending invitation with that id on it. An invitation that has already been accepted is gone from this list; remove the member instead.
Related
How is this guide?