DocumentationAPI reference
Rust · 0.1.0
Decline Space Invitation
POST /api/v1/spaces/{space}/invitations/{invitation}:decline
SpaceService · SpaceService_DeclineSpaceInvitation
Access
Only the authenticated invitee may accept or decline. A space administrator cannot answer an invitation on another user's behalf.
Path-bound invitation, empty JSON body
The URL supplies the invitation name, so {} is sufficient for the REST JSON body. Accept converts the pending invitation into an active membership and returns SpaceMember. Decline removes the pending invitation and returns {}. Repeating the action after the invitation is consumed may return NOT_FOUND; inspect membership or invitations before treating that as failure.
Successful response
This operation has no resource to return. The Rust REST transport serializes protobuf Empty as HTTP 200 with JSON {}. The empty success-schema area in the generated contract is intentional, not missing request instructions.
Request
DeclineSpaceInvitation declines a pending invitation.
/api/v1/spaces/{space}/invitations/{invitation}:declineParameters
| Name / location | Type / requirement | Description |
|---|---|---|
spacepath | string Required | The space id. |
invitationpath | string Required | The invitation id. |
Request body
Required
application/json · DeclineSpaceInvitationRequest
Responses
200 · OK
default · Default error response
application/json · Status
Complete operation definition
All declared constraints, media types and response details are retained below. Schema references link to their complete definitions.
Open JSON definition
{
"tags": [
"SpaceService"
],
"description": "DeclineSpaceInvitation declines a pending invitation.",
"operationId": "SpaceService_DeclineSpaceInvitation",
"parameters": [
{
"name": "space",
"in": "path",
"description": "The space id.",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "invitation",
"in": "path",
"description": "The invitation id.",
"required": true,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DeclineSpaceInvitationRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "OK",
"content": {}
},
"default": {
"description": "Default error response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Status"
}
}
}
}
}
}