Memos unofficial
POST/api/v1/spaces

Create a space

Creates a space and makes the authenticated user its first administrator. Provide a title for the space, and optionally supply spaceId to choose its identifier; an empty or omitted spaceId generates a canonical UUID v4.

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

1 parameter · 6 body fields
spaceIdstringoptional
Optional space identifier matching `^[a-zA-Z0-9]([a-zA-Z0-9-]{0,34}[a-zA-Z0-9])?$`. Defaults to a generated canonical UUID v4 when omitted or empty.

The space details to create. Provide the required title; the authenticated user becomes the first administrator.

namestringoptional
The resource name of the space. Format: spaces/{space}.
titlestringrequired
Required. The human-readable title.
descriptionstringoptional
Optional. A description of the space.
currentUserRolestringoptional
Output only. The authenticated user's membership role in this space. ROLE_UNSPECIFIED when this Space is exposed as metadata-only.
Allowed:ROLE_UNSPECIFIEDADMINUSER
memberCountintegeroptional
Output only. The number of accepted members in this space. Pending invitations are excluded. Zero when this Space is exposed as metadata-only.
iconobjectoptional
Optional. Display icon. Omit when updating with the "icon" mask to reset to the default Space mark.

2 status codes
200Returns the created space, including its title, resource name, and available metadata.
namestringoptional
The resource name of the space. Format: spaces/{space}.
titlestringrequired
Required. The human-readable title.
descriptionstringoptional
Optional. A description of the space.
currentUserRolestringoptional
Output only. The authenticated user's membership role in this space. ROLE_UNSPECIFIED when this Space is exposed as metadata-only.
Allowed:ROLE_UNSPECIFIEDADMINUSER
memberCountintegeroptional
Output only. The number of accepted members in this space. Pending invitations are excluded. Zero when this Space is exposed as metadata-only.
iconobjectoptional
Optional. Display icon. Omit when updating with the "icon" mask to reset to the default Space mark.
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

title is required. If you provide a non-empty spaceId, it must match ^[a-zA-Z0-9]([a-zA-Z0-9-]{0,34}[a-zA-Z0-9])?$; an empty or omitted value generates a canonical UUID v4.