DocumentationAPI reference
Rust · 0.1.0
API reference
The complete REST contract for this Rust distribution. 92 operations, 119 schemas, one current version.
Start with API access for authentication, pagination and retries. Download the complete OpenAPI JSON.
Choose the application origin and credential
Send requests to your own application origin under /api/v1. A personal access token or session access token belongs in Authorization: Bearer … . The refresh cookie alone does not authenticate ordinary REST calls. A PAT acts as its account; it does not add permissions or bypass space membership. First verify the credential with GET /api/v1/auth/me. Never put real tokens in URLs, examples, screenshots or issue reports.
curl --fail-with-body \
-H "Authorization: Bearer $MEMOS_TOKEN" \
"$MEMOS_URL/api/v1/auth/me"Resource names and URL segments
A resource name such as memos/example is different from its final identifier example. For GET /api/v1/memos/{memo}, substitute only example into {memo}; use the full memos/example when another JSON field asks for a memo resource name. User paths use usernames, not display names or database IDs. Space members and invitations use the target username as their final segment. URL-encode query values with a client library or curl --data-urlencode.
JSON bodies are operation-specific
Use the body schema shown on the operation page. CreateMemo and UpdateMemo accept a Memo object directly, not a {memo: …} wrapper; set-attachment and set-relation calls accept their named request objects. Path-bound names are supplied by the URL. JSON bytes fields contain base64, 64-bit counts and offsets use decimal strings, and timestamps use RFC 3339 strings. Read-only fields describe output; a shared resource schema's required list is not a command to resend every field during PATCH. The examples are checked against the contract and Rust binding code, not executed against a live instance.
Use explicit update masks
The updateMask query value is a comma-separated list of protobuf field paths, such as content,pinned or display_name. These paths can differ from lowerCamelCase JSON field names such as displayName. REST can infer a mask for certain PATCH bodies, but nested settings have operation-specific behavior, so use an explicit supported mask. In particular, UpdateInstanceSetting ignores updateMask and replaces the entire selected setting payload; read its warning before changing configuration.
Page through the response you receive
Where pagination is implemented, reuse nextPageToken unchanged with the same filter, state and ordering until the token is empty. Treat tokens as opaque: ListAttachments uses a different cursor representation from most other lists. Defaults are generally 50 with a maximum of 1000, but some small collections intentionally return everything despite declaring pageSize/pageToken. Their operation notes identify the exceptions. Collection results are authorization-filtered; an empty list does not prove that an object does not exist.
Interpret errors before retrying
REST failures return an HTTP status and a JSON Status object with numeric gRPC code, message and details. Connect uses its own wire error representation, so do not parse the two transports identically. Invalid input, missing credentials, denied access, unavailable resources and failed preconditions need different fixes. NOT_FOUND may deliberately conceal an inaccessible or archived resource. Rate-limit failures can include Retry-After, RateLimit, RateLimit-Policy and structured RetryInfo; respect them. A lost response or a storage-cleanup error after a write can leave the database change committed. Read back state before repeating a creation, deletion or replacement.
Empty results and file downloads
No declared request body means there is no JSON payload to build. For commands returning protobuf Empty, the Rust REST transport returns HTTP 200 with JSON {}; the OpenAPI snapshot omits a response schema for those commands. ExportMemos is different: its successful response is raw ZIP bytes with the server's Content-Type, not JSON or a base64 wrapper. Save that response as a file and still inspect non-success responses as errors.
AIService
AttachmentService
- GETList Attachments
/api/v1/attachments - POSTCreate Attachment
/api/v1/attachments - GETGet Attachment
/api/v1/attachments/{attachment} - DELETEDelete Attachment
/api/v1/attachments/{attachment} - PATCHUpdate Attachment
/api/v1/attachments/{attachment} - POSTBatch Delete Attachments
/api/v1/attachments:batchDelete - POSTUpload Attachment
/api/v1/attachments:upload
AuthService
IdentityProviderService
- GETList Identity Providers
/api/v1/identity-providers - POSTCreate Identity Provider
/api/v1/identity-providers - GETGet Identity Provider
/api/v1/identity-providers/{identity-provider} - DELETEDelete Identity Provider
/api/v1/identity-providers/{identity-provider} - PATCHUpdate Identity Provider
/api/v1/identity-providers/{identity-provider}
InstanceService
- GETGet Instance Profile
/api/v1/instance/profile - POSTTest Instance Email Setting
/api/v1/instance/settings/notification:testEmail - POSTBatch Get Instance Settings
/api/v1/instance/settings:batchGet - GETGet Instance Stats
/api/v1/instance/stats - GETGet Instance Setting
/api/v1/instance/settings/{key} - PATCHUpdate Instance Setting
/api/v1/instance/settings/{key}
MemoService
- GETList Memos
/api/v1/memos - POSTCreate Memo
/api/v1/memos - GETGet Link Metadata
/api/v1/memos/-/linkMetadata - POSTBatch Get Link Metadata
/api/v1/memos/-/linkMetadata:batchGet - GETGet Memo
/api/v1/memos/{memo} - DELETEDelete Memo
/api/v1/memos/{memo} - PATCHUpdate Memo
/api/v1/memos/{memo} - GETList Memo Attachments
/api/v1/memos/{memo}/attachments - PATCHSet Memo Attachments
/api/v1/memos/{memo}/attachments - GETList Memo Comments
/api/v1/memos/{memo}/comments - POSTCreate Memo Comment
/api/v1/memos/{memo}/comments - GETList Memo Reactions
/api/v1/memos/{memo}/reactions - POSTUpsert Memo Reaction
/api/v1/memos/{memo}/reactions - DELETEDelete Memo Reaction
/api/v1/memos/{memo}/reactions/{reaction} - GETList Memo Relations
/api/v1/memos/{memo}/relations - PATCHSet Memo Relations
/api/v1/memos/{memo}/relations - GETList Memo Shares
/api/v1/memos/{memo}/shares - POSTCreate Memo Share
/api/v1/memos/{memo}/shares - DELETEDelete Memo Share
/api/v1/memos/{memo}/shares/{share} - GETGet Shared Memo
/api/v1/shares/{shareToken}/memo
SpaceService
- GETList Spaces
/api/v1/spaces - POSTCreate Space
/api/v1/spaces - GETGet Space
/api/v1/spaces/{space} - DELETEDelete Space
/api/v1/spaces/{space} - PATCHUpdate Space
/api/v1/spaces/{space} - GETList Space Invitations
/api/v1/spaces/{space}/invitations - POSTCreate Space Invitation
/api/v1/spaces/{space}/invitations - GETGet Space Invitation
/api/v1/spaces/{space}/invitations/{invitation} - DELETEDelete Space Invitation
/api/v1/spaces/{space}/invitations/{invitation} - POSTAccept Space Invitation
/api/v1/spaces/{space}/invitations/{invitation}:accept - POSTDecline Space Invitation
/api/v1/spaces/{space}/invitations/{invitation}:decline - GETList Space Members
/api/v1/spaces/{space}/members - GETGet Space Member
/api/v1/spaces/{space}/members/{member} - DELETEDelete Space Member
/api/v1/spaces/{space}/members/{member} - PATCHUpdate Space Member
/api/v1/spaces/{space}/members/{member} - GETList User Space Invitations
/api/v1/users/{user}/spaceInvitations
UserService
- GETList Users
/api/v1/users - POSTCreate User
/api/v1/users - GETGet User
/api/v1/users/{user} - DELETEDelete User
/api/v1/users/{user} - PATCHUpdate User
/api/v1/users/{user} - GETList Linked Identities
/api/v1/users/{user}/linkedIdentities - POSTCreate Linked Identity
/api/v1/users/{user}/linkedIdentities - GETGet Linked Identity
/api/v1/users/{user}/linkedIdentities/{linkedIdentity} - DELETEDelete Linked Identity
/api/v1/users/{user}/linkedIdentities/{linkedIdentity} - GETList User Notifications
/api/v1/users/{user}/notifications - DELETEDelete User Notification
/api/v1/users/{user}/notifications/{notification} - PATCHUpdate User Notification
/api/v1/users/{user}/notifications/{notification} - GETList Personal Access Tokens
/api/v1/users/{user}/personalAccessTokens - POSTCreate Personal Access Token
/api/v1/users/{user}/personalAccessTokens - DELETEDelete Personal Access Token
/api/v1/users/{user}/personalAccessTokens/{personalAccessToken} - GETList User Settings
/api/v1/users/{user}/settings - GETGet User Setting
/api/v1/users/{user}/settings/{setting} - PATCHUpdate User Setting
/api/v1/users/{user}/settings/{setting} - GETList Memo Views
/api/v1/users/{user}/views - POSTCreate Memo View
/api/v1/users/{user}/views - GETGet Memo View
/api/v1/users/{user}/views/{view} - DELETEDelete Memo View
/api/v1/users/{user}/views/{view} - PATCHUpdate Memo View
/api/v1/users/{user}/views/{view} - GETList User Webhooks
/api/v1/users/{user}/webhooks - POSTCreate User Webhook
/api/v1/users/{user}/webhooks - DELETEDelete User Webhook
/api/v1/users/{user}/webhooks/{webhook} - PATCHUpdate User Webhook
/api/v1/users/{user}/webhooks/{webhook} - GETGet User Webhook Signing Secret
/api/v1/users/{user}/webhooks/{webhook}:getSigningSecret - GETExport Memos
/api/v1/users/{user}:exportMemos - GETGet User Stats
/api/v1/users/{user}:getStats - POSTImport Memos
/api/v1/users/{user}:importMemos - POSTBatch Get Users
/api/v1/users:batchGet - GETList All User Stats
/api/v1/users:stats