DocumentationAPI reference

Rust · 0.1.0

Accept Space Invitation

POST /api/v1/spaces/{space}/invitations/{invitation}:accept

SpaceService · SpaceService_AcceptSpaceInvitation

Protocol-derived reference. Authorization and instance policy still apply. Schema descriptions are inherited from the MIT-licensed application contract; examples here are not executed against a live server.

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.

Request

AcceptSpaceInvitation accepts a pending invitation and creates a membership.

POST/api/v1/spaces/{space}/invitations/{invitation}:accept

Parameters

Name / locationType / requirementDescription
space
path
string
Required
The space id.
invitation
path
string
Required
The invitation id.

Request body

Required

application/json · AcceptSpaceInvitationRequest

Responses

200 · OK

application/json · SpaceMember

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": "AcceptSpaceInvitation accepts a pending invitation and creates a membership.",
  "operationId": "SpaceService_AcceptSpaceInvitation",
  "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/AcceptSpaceInvitationRequest"
        }
      }
    },
    "required": true
  },
  "responses": {
    "200": {
      "description": "OK",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/SpaceMember"
          }
        }
      }
    },
    "default": {
      "description": "Default error response",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Status"
          }
        }
      }
    }
  }
}