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

Accept a space invitation

Accepts a pending invitation to join a space and creates a membership for the invitee. Supply the invitation resource name in name; the returned membership includes the user's role in the space.

  • IdempotentThe SDK sends Idempotency-Key, so a retried request is only applied once.

2 parameters · 1 body field
spacestringrequired
The identifier of the space containing the invitation.
invitationstringrequired
The identifier of the pending invitation to accept.

The invitation resource name to accept.

namestringrequired
Required. Format: spaces/{space}/invitations/{username}.

2 status codes
200Returns the created space membership, including its resource name, user, and role.
namestringoptional
The resource name. Format: spaces/{space}/members/{username}.
userstringrequired
Required. The member user. Format: users/{username}.
rolestringrequired
Required. The member's role within this space.
Allowed:ROLE_UNSPECIFIEDADMINUSER
defaultDefault error response
codeintegeroptional
The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].
messagestringoptional
A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.
detailsarray<object>optional
A list of messages that carry the error details. There is a common set of message types for APIs to use.

Error handling

The space path parameter must identify the space containing the invitation, and the invitation path parameter must identify the pending invitation. The request body requires name in the format spaces/{space}/invitations/{username}.