Memos unofficial
PATCH/api/v1/memos/{memo}

Update a memo

Updates a memo with the fields supplied in the request body. Use updateMask to identify the fields to update; state, content, and visibility are required by the request schema.

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

2 parameters · 17 body fields
memostringrequired
The identifier of the memo to update.
updateMaskstringoptional
Field mask specifying the memo fields to update.

The memo resource containing the fields to update. state, content, and visibility are required by the request schema.

namestringoptional
The resource name of the memo. Format: memos/{memo}, where memo is the user-defined UID.
statestringrequired
The state of the memo.
Allowed:STATE_UNSPECIFIEDNORMALARCHIVED
creatorstringoptional
The name of the creator. Format: users/{user}
createTimestringoptional
The creation timestamp. If not set on creation, the server will set it to the current time.
updateTimestringoptional
The last update timestamp. If not set on creation, the server will set it to the current time.
contentstringrequired
Required. The content of the memo in Markdown format.
visibilitystringrequired
The visibility of the memo. One of PRIVATE (creator only), PROTECTED (signed-in users), PUBLIC (anonymous-eligible), or SPACE (active space members). Defaults to PRIVATE on creation when unspecified.
Allowed:VISIBILITY_UNSPECIFIEDPRIVATEPROTECTEDPUBLICSPACE
tagsarray<string>optional
Output only. The tags extracted from the content.
pinnedbooleanoptional
Whether the memo is pinned.
attachmentsarray<object>optional
Optional. The attachments of the memo.
relationsarray<object>optional
Optional. The relations of the memo.
reactionsarray<object>optional
Output only. The reactions to the memo.
propertyobjectoptional
Output only. The computed properties of the memo.
parentstringoptional
Output only. The context memo of this COMMENT relation, if any. Its identity is returned even when the caller cannot read the parent. Fetch the parent independently; this field does not grant read access. Format: memos/{memo}
snippetstringoptional
Output only. The snippet of the memo content. Plain text only.
locationobjectoptional
Optional. The location of the memo.
spacestringoptional
Optional. The space in which this memo is placed. Format: spaces/{space}. Every memo, including a comment, owns its placement independently.

2 status codes
200Returns the updated memo resource, including its current content, visibility, state, and available attachments, relations, and reactions.
namestringoptional
The resource name of the memo. Format: memos/{memo}, where memo is the user-defined UID.
statestringrequired
The state of the memo.
Allowed:STATE_UNSPECIFIEDNORMALARCHIVED
creatorstringoptional
The name of the creator. Format: users/{user}
createTimestringoptional
The creation timestamp. If not set on creation, the server will set it to the current time.
updateTimestringoptional
The last update timestamp. If not set on creation, the server will set it to the current time.
contentstringrequired
Required. The content of the memo in Markdown format.
visibilitystringrequired
The visibility of the memo. One of PRIVATE (creator only), PROTECTED (signed-in users), PUBLIC (anonymous-eligible), or SPACE (active space members). Defaults to PRIVATE on creation when unspecified.
Allowed:VISIBILITY_UNSPECIFIEDPRIVATEPROTECTEDPUBLICSPACE
tagsarray<string>optional
Output only. The tags extracted from the content.
pinnedbooleanoptional
Whether the memo is pinned.
attachmentsarray<object>optional
Optional. The attachments of the memo.
relationsarray<object>optional
Optional. The relations of the memo.
reactionsarray<object>optional
Output only. The reactions to the memo.
propertyobjectoptional
Output only. The computed properties of the memo.
parentstringoptional
Output only. The context memo of this COMMENT relation, if any. Its identity is returned even when the caller cannot read the parent. Fetch the parent independently; this field does not grant read access. Format: memos/{memo}
snippetstringoptional
Output only. The snippet of the memo content. Plain text only.
locationobjectoptional
Optional. The location of the memo.
spacestringoptional
Optional. The space in which this memo is placed. Format: spaces/{space}. Every memo, including a comment, owns its placement independently.
defaultReturned when the request fails; includes an error code, a developer-facing message, and optional error details.
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

state, content, and visibility are required by the request schema; state must be STATE_UNSPECIFIED, NORMAL, or ARCHIVED, and visibility must be VISIBILITY_UNSPECIFIED, PRIVATE, PROTECTED, PUBLIC, or SPACE. The memo path parameter must identify the memo to update, and updateMask specifies the fields to change.