Memos unofficial
POST/api/v1/spaces/{space}/invitations

Invite a user to a space

Creates an invitation for an existing active user to join a space. Provide the invitee's user resource name in invitee and choose the role they will receive after accepting.

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

1 parameter · 4 body fields
spacestringrequired
The identifier of the space to invite the user to.

The invitation details for an existing active user to join the specified space.

namestringoptional
The resource name. Format: spaces/{space}/invitations/{username}.
inviteestringrequired
Required. The invited user. Format: users/{username}.
rolestringrequired
Required. The role the user will receive after accepting the invitation.
Allowed:ROLE_UNSPECIFIEDADMINUSER
spaceobjectoptional
Output only. The Space the user is invited to. This lets an invitee understand the invitation without granting membership-based GetSpace access.

2 status codes
200Returns the created invitation, including the invitee, assigned role, and available space information.
namestringoptional
The resource name. Format: spaces/{space}/invitations/{username}.
inviteestringrequired
Required. The invited user. Format: users/{username}.
rolestringrequired
Required. The role the user will receive after accepting the invitation.
Allowed:ROLE_UNSPECIFIEDADMINUSER
spaceobjectoptional
Output only. The Space the user is invited to. This lets an invitee understand the invitation without granting membership-based GetSpace access.
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

invitee and role are required. invitee must use the format users/{username} and identify an existing active user; role must be one of ROLE_UNSPECIFIED, ADMIN, or USER.