components: schemas: auth.DisplayCodeResponse: properties: challenge_id: description: The challenge id associated with the displayed code and needed to solve the challenge for token example: 67647f5ecda913e9a2e11b26 type: string type: object auth.TokenResponse: properties: app_key: description: The permanent app key example: zhSG/zQRmgADyilWPtgdnfo1qD60oK02/SVgi1GaFt6= type: string session_token: description: The ephemeral session token example: eyJhbGciOeJIRzI1NiIsInR5cCI6IkpXVCJ1.eyJzZWVkIjaiY0dmVndlUnAifQ.Y1EZecYnwmvMkrXKOa2XJnAbaRt34urBabe06tmDQII type: string type: object export.ObjectExportResponse: properties: markdown: example: |- # This is the title ... type: string type: object list.Filter: properties: condition: description: The filter condition example: contains type: string format: description: The format of the property used for filtering example: text type: string id: description: The id of the filter example: 67bf3f21cda9134102e2422c type: string property_key: description: The property key used for filtering example: name type: string value: description: The value used for filtering example: Some value... type: string type: object list.Sort: properties: format: description: The format of the property used for sorting example: text type: string id: description: The id of the sort example: 67bf3f21cda9134102e2422c type: string property_key: description: The property key used for sorting example: name type: string sort_type: description: The sort direction example: asc type: string type: object list.View: properties: filters: description: The list of filters items: $ref: "#/components/schemas/list.Filter" type: array uniqueItems: false id: description: The id of the view example: 67bf3f21cda9134102e2422c type: string layout: description: The layout of the view enum: - grid - table example: grid type: string name: description: The name of the view example: All type: string sorts: description: The list of sorts items: $ref: "#/components/schemas/list.Sort" type: array uniqueItems: false type: object object.Block: properties: align: description: The alignment of the block enum: - AlignLeft - AlignCenter - AlignRight - AlignJustify example: AlignLeft type: string background_color: description: The background color of the block example: red type: string children_ids: description: The ids of the block's children example: - "['6797ce8ecda913cde14b02dc']" items: type: string type: array uniqueItems: false file: $ref: "#/components/schemas/object.File" id: description: The id of the block example: 64394517de52ad5acb89c66c type: string property: $ref: "#/components/schemas/object.Property" text: $ref: "#/components/schemas/object.Text" vertical_align: description: The vertical alignment of the block enum: - VerticalAlignTop - VerticalAlignMiddle - VerticalAlignBottom example: VerticalAlignTop type: string type: object object.CreateObjectRequest: properties: body: description: The body of the object example: This is the body of the object. Markdown syntax is supported here. type: string description: description: The description of the object example: This is a description of the object. type: string icon: $ref: "#/components/schemas/util.Icon" name: description: The name of the object example: My object type: string source: description: The source url, only applicable for bookmarks example: https://bookmark-source.com type: string template_id: description: The id of the template to use example: bafyreictrp3obmnf6dwejy5o4p7bderaaia4bdg2psxbfzf44yya5uutge type: string type_key: description: The key of the type of object to create example: ot-page type: string type: object object.File: description: The file of the block, if applicable properties: added_at: description: The added at of the file type: integer hash: description: The hash of the file type: string mime: description: The mime of the file type: string name: description: The name of the file type: string size: description: The size of the file type: integer state: description: The state of the file type: string style: description: The style of the file type: string target_object_id: description: The target object id of the file type: string type: description: The type of the file type: string type: object object.Object: description: The object properties: archived: description: Whether the object is archived example: false type: boolean blocks: description: The blocks of the object. Omitted in Search endpoints, returned only in GetObject endpoint items: $ref: "#/components/schemas/object.Block" type: array uniqueItems: false icon: $ref: "#/components/schemas/util.Icon" id: description: The id of the object example: bafyreie6n5l5nkbjal37su54cha4coy7qzuhrnajluzv5qd5jvtsrxkequ type: string layout: description: The layout of the object example: basic type: string name: description: The name of the object example: My object type: string object: description: The data model of the object example: object type: string properties: description: The properties of the object items: $ref: "#/components/schemas/object.Property" type: array uniqueItems: false snippet: description: The snippet of the object, especially important for notes as they don't have a name example: The beginning of the object body... type: string space_id: description: The id of the space the object is in example: bafyreigyfkt6rbv24sbv5aq2hko3bhmv5xxlf22b4bypdu6j7hnphm3psq.23me69r569oi1 type: string type: $ref: "#/components/schemas/object.Type" type: object object.ObjectResponse: properties: object: $ref: "#/components/schemas/object.Object" type: object object.Property: description: The property block, if applicable properties: checkbox: description: The checkbox value, if applicable example: true type: boolean date: description: The date value, if applicable example: "2025-02-14T12:34:56Z" type: string email: description: The email value, if applicable example: example@example.com type: string file: description: The file references, if applicable example: - "['fileId']" items: type: string type: array uniqueItems: false format: description: The format of the property enum: - text - number - select - multi_select - date - file - checkbox - url - email - phone - object example: date type: string id: description: The id of the property example: last_modified_date type: string multi_select: description: The multi-select values, if applicable items: $ref: "#/components/schemas/object.Tag" type: array uniqueItems: false name: description: The name of the property example: Last modified date type: string number: description: The number value, if applicable example: 42 type: number object: description: The object references, if applicable example: - "['objectId']" items: type: string type: array uniqueItems: false phone: description: The phone number value, if applicable example: "+1234567890" type: string select: $ref: "#/components/schemas/object.Tag" text: description: The text value, if applicable example: Some text... type: string url: description: The url value, if applicable example: https://example.com type: string type: object object.Tag: description: The select value, if applicable properties: color: description: The color of the tag example: yellow type: string id: description: The id of the tag example: bafyreiaixlnaefu3ci22zdenjhsdlyaeeoyjrsid5qhfeejzlccijbj7sq type: string name: description: The name of the tag example: in-progress type: string type: object object.Template: description: The template properties: archived: description: Whether the template is archived example: false type: boolean icon: $ref: "#/components/schemas/util.Icon" id: description: The id of the template example: bafyreictrp3obmnf6dwejy5o4p7bderaaia4bdg2psxbfzf44yya5uutge type: string name: description: The name of the template example: My template type: string object: description: The data model of the object example: template type: string type: object object.TemplateResponse: properties: template: $ref: "#/components/schemas/object.Template" type: object object.Text: description: The text of the block, if applicable properties: checked: description: Whether the text is checked example: true type: boolean color: description: The color of the text example: red type: string icon: $ref: "#/components/schemas/util.Icon" style: description: The style of the text enum: - Paragraph - Header1 - Header2 - Header3 - Header4 - Quote - Code - Title - Checkbox - Marked - Numbered - Toggle - Description - Callout example: Paragraph type: string text: description: The text example: Some text... type: string type: object object.Type: description: The type of the object properties: archived: description: Whether the type is archived example: false type: boolean icon: $ref: "#/components/schemas/util.Icon" id: description: The id of the type (which is unique across spaces) example: bafyreigyb6l5szohs32ts26ku2j42yd65e6hqy2u3gtzgdwqv6hzftsetu type: string key: description: The key of the type (can be the same across spaces for known types) example: ot-page type: string name: description: The name of the type example: Page type: string object: description: The data model of the object example: type type: string recommended_layout: description: The recommended layout of the type example: todo type: string type: object object.TypeResponse: properties: type: $ref: "#/components/schemas/object.Type" type: object pagination.PaginatedResponse-list_View: properties: data: description: The list of items in the current result set items: $ref: "#/components/schemas/list.View" type: array uniqueItems: false pagination: $ref: "#/components/schemas/pagination.PaginationMeta" type: object pagination.PaginatedResponse-object_Object: properties: data: description: The list of items in the current result set items: $ref: "#/components/schemas/object.Object" type: array uniqueItems: false pagination: $ref: "#/components/schemas/pagination.PaginationMeta" type: object pagination.PaginatedResponse-object_Template: properties: data: description: The list of items in the current result set items: $ref: "#/components/schemas/object.Template" type: array uniqueItems: false pagination: $ref: "#/components/schemas/pagination.PaginationMeta" type: object pagination.PaginatedResponse-object_Type: properties: data: description: The list of items in the current result set items: $ref: "#/components/schemas/object.Type" type: array uniqueItems: false pagination: $ref: "#/components/schemas/pagination.PaginationMeta" type: object pagination.PaginatedResponse-space_Member: properties: data: description: The list of items in the current result set items: $ref: "#/components/schemas/space.Member" type: array uniqueItems: false pagination: $ref: "#/components/schemas/pagination.PaginationMeta" type: object pagination.PaginatedResponse-space_Space: properties: data: description: The list of items in the current result set items: $ref: "#/components/schemas/space.Space" type: array uniqueItems: false pagination: $ref: "#/components/schemas/pagination.PaginationMeta" type: object pagination.PaginationMeta: description: The pagination metadata for the response properties: has_more: description: Indicates if there are more items available beyond the current result set example: true type: boolean limit: description: The maximum number of items returned in the result set example: 100 type: integer offset: description: The number of items skipped before starting to collect the result set example: 0 type: integer total: description: The total number of items available for the endpoint example: 1024 type: integer type: object search.SearchRequest: properties: query: description: The search term to look for in object names and snippets example: test type: string sort: $ref: "#/components/schemas/search.SortOptions" types: description: The types of objects to search for, specified by key or ID example: - ot-page - ot-678043f0cda9133be777049f - bafyreightzrdts2ymxyaeyzspwdfo2juspyam76ewq6qq7ixnw3523gs7q items: type: string type: array uniqueItems: false type: object search.SortDirection: default: desc description: The direction to sort the search results enum: - asc - desc type: string x-enum-varnames: - Asc - Desc search.SortOptions: description: The sorting criteria and direction for the search results properties: direction: $ref: "#/components/schemas/search.SortDirection" property: $ref: "#/components/schemas/search.SortProperty" type: object search.SortProperty: default: last_modified_date description: The property to sort the search results by enum: - created_date - last_modified_date - last_opened_date - name type: string x-enum-varnames: - CreatedDate - LastModifiedDate - LastOpenedDate - Name space.CreateSpaceRequest: properties: description: description: The description of the space example: The local-first wiki type: string name: description: The name of the space example: New Space type: string type: object space.Member: description: The member properties: global_name: description: The global name of the member in the network example: john.any type: string icon: $ref: "#/components/schemas/util.Icon" id: description: The profile object id of the member example: _participant_bafyreigyfkt6rbv24sbv5aq2hko1bhmv5xxlf22b4bypdu6j7hnphm3psq_23me69r569oi1_AAjEaEwPF4nkEh9AWkqEnzcQ8HziBB4ETjiTpvRCQvWnSMDZ type: string identity: description: The identity of the member in the network example: AAjEaEwPF4nkEh7AWkqEnzcQ8HziGB4ETjiTpvRCQvWnSMDZ type: string name: description: The name of the member example: John Doe type: string object: description: The data model of the object example: member type: string role: description: The role of the member enum: - viewer - editor - owner - no_permission example: owner type: string status: description: The status of the member enum: - joining - active - removed - declined - removing - canceled example: active type: string type: object space.MemberResponse: properties: member: $ref: "#/components/schemas/space.Member" type: object space.Space: description: The space properties: description: description: The description of the space example: The local-first wiki type: string gateway_url: description: The gateway url to serve files and media example: http://127.0.0.1:31006 type: string icon: $ref: "#/components/schemas/util.Icon" id: description: The id of the space example: bafyreigyfkt6rbv24sbv5aq2hko3bhmv5xxlf22b4bypdu6j7hnphm3psq.23me69r569oi1 type: string name: description: The name of the space example: My Space type: string network_id: description: The network id of the space example: N83gJpVd9MuNRZAuJLZ7LiMntTThhPc6DtzWWVjb1M3PouVU type: string object: description: The data model of the object example: space type: string type: object space.SpaceResponse: properties: space: $ref: "#/components/schemas/space.Space" type: object util.ForbiddenError: properties: error: properties: message: example: Forbidden type: string type: object type: object util.GoneError: properties: error: properties: message: example: Resource is gone type: string type: object type: object util.Icon: description: The icon of the object properties: color: description: The color of the icon example: red type: string emoji: description: The emoji of the icon example: "\U0001F4C4" type: string file: description: The file of the icon example: http://127.0.0.1:31006/image/bafybeieptz5hvcy6txplcvphjbbh5yjc2zqhmihs3owkh5oab4ezauzqay type: string format: $ref: "#/components/schemas/util.IconFormat" name: description: The name of the icon example: document type: string type: object util.IconFormat: description: The type of the icon enum: - emoji - file - icon example: emoji type: string x-enum-varnames: - IconFormatEmoji - IconFormatFile - IconFormatIcon util.NotFoundError: properties: error: properties: message: example: Resource not found type: string type: object type: object util.RateLimitError: properties: error: properties: message: example: Rate limit exceeded type: string type: object type: object util.ServerError: properties: error: properties: message: example: Internal server error type: string type: object type: object util.UnauthorizedError: properties: error: properties: message: example: Unauthorized type: string type: object type: object util.ValidationError: properties: error: properties: message: example: Bad request type: string type: object type: object securitySchemes: bearerauth: bearerFormat: JWT scheme: bearer type: http externalDocs: description: OpenAPI url: https://swagger.io/resources/open-api/ info: contact: email: support@anytype.io name: Anytype Support url: https://anytype.io/contact description: This API allows interaction with Anytype resources such as spaces, objects and types. license: name: Any Source Available License 1.0 url: https://github.com/anyproto/anytype-api/blob/main/LICENSE.md termsOfService: https://anytype.io/terms_of_use title: Anytype API version: "2025-03-17" openapi: 3.1.0 paths: /auth/display_code: post: description: This endpoint initiates a secure authentication flow by generating a new challenge. Clients must supply the name of the application (via a query parameter) that is requesting authentication. On success, the service returns a unique challenge ID. This challenge ID must then be used with the token endpoint (see below) to solve the challenge and retrieve an authentication token. In essence, this endpoint “boots up” the login process and is the first step in a multi-phase authentication sequence. parameters: - description: The version of the API to use in: header name: Anytype-Version schema: default: "2025-03-17" type: string - description: App name requesting the challenge in: query name: app_name required: true schema: type: string requestBody: content: application/json: schema: type: object responses: "200": content: application/json: schema: $ref: "#/components/schemas/auth.DisplayCodeResponse" description: Challenge ID "400": content: application/json: schema: $ref: "#/components/schemas/util.ValidationError" description: Invalid input "500": content: application/json: schema: $ref: "#/components/schemas/util.ServerError" description: Internal server error summary: Start new challenge tags: - auth /auth/token: post: description: After receiving a challenge ID from the display_code endpoint, the client calls this endpoint to provide the corresponding 4-digit code (also via a query parameter) along with the challenge ID. The endpoint verifies that the challenge solution is correct and, if it is, returns an ephemeral session token together with a permanent app key. These tokens are then used in subsequent API requests to authorize access. This endpoint is central to ensuring that only properly authenticated sessions can access further resources. parameters: - description: The version of the API to use in: header name: Anytype-Version schema: default: "2025-03-17" type: string - description: Challenge ID in: query name: challenge_id required: true schema: type: string - description: 4-digit code retrieved from Anytype Desktop app in: query name: code required: true schema: type: string requestBody: content: application/json: schema: type: object responses: "200": content: application/json: schema: $ref: "#/components/schemas/auth.TokenResponse" description: Authentication token "400": content: application/json: schema: $ref: "#/components/schemas/util.ValidationError" description: Invalid input "500": content: application/json: schema: $ref: "#/components/schemas/util.ServerError" description: Internal server error summary: Retrieve token tags: - auth /search: post: description: This endpoint executes a global search over every space the user has access to. It accepts pagination parameters (offset and limit) and a JSON body containing search criteria. The criteria include a search query string, an optional list of object types, and sort options (e.g. ascending/descending by creation, modification, or last opened dates). Internally, the endpoint aggregates results from each space, merges and sorts them (after last modified date by default), and returns a unified, paginated list of objects that match the search parameters. parameters: - description: The version of the API to use in: header name: Anytype-Version schema: default: "2025-03-17" type: string - description: The number of items to skip before starting to collect the result set in: query name: offset schema: default: 0 type: integer - description: The number of items to return in: query name: limit schema: default: 100 maximum: 1000 type: integer requestBody: content: application/json: schema: $ref: "#/components/schemas/search.SearchRequest" description: Search parameters required: true responses: "200": content: application/json: schema: $ref: "#/components/schemas/pagination.PaginatedResponse-object_Object" description: List of objects "401": content: application/json: schema: $ref: "#/components/schemas/util.UnauthorizedError" description: Unauthorized "500": content: application/json: schema: $ref: "#/components/schemas/util.ServerError" description: Internal server error security: - bearerauth: [] summary: Search objects across all spaces tags: - search /spaces: get: description: Retrieves a paginated list of all spaces that are accessible by the authenticated user. Each space record contains detailed information such as the space ID, name, icon (derived either from an emoji or image URL), and additional metadata. This endpoint is key to displaying a user’s workspaces. parameters: - description: The version of the API to use in: header name: Anytype-Version schema: default: "2025-03-17" type: string - description: The number of items to skip before starting to collect the result set in: query name: offset schema: default: 0 type: integer - description: The number of items to return in: query name: limit schema: default: 100 maximum: 1000 type: integer responses: "200": content: application/json: schema: $ref: "#/components/schemas/pagination.PaginatedResponse-space_Space" description: List of spaces "401": content: application/json: schema: $ref: "#/components/schemas/util.UnauthorizedError" description: Unauthorized "500": content: application/json: schema: $ref: "#/components/schemas/util.ServerError" description: Internal server error security: - bearerauth: [] summary: List spaces tags: - spaces post: description: Creates a new workspace (or space) based on a supplied name in the JSON request body. The endpoint is subject to rate limiting and automatically applies default configurations such as generating a random icon and initializing the workspace with default settings (for example, a default dashboard or home page). On success, the new space’s full metadata is returned, enabling the client to immediately switch context to the new space. parameters: - description: The version of the API to use in: header name: Anytype-Version schema: default: "2025-03-17" type: string requestBody: content: application/json: schema: $ref: "#/components/schemas/space.CreateSpaceRequest" description: Space to create required: true responses: "200": content: application/json: schema: $ref: "#/components/schemas/space.SpaceResponse" description: Space created successfully "400": content: application/json: schema: $ref: "#/components/schemas/util.ValidationError" description: Bad request "401": content: application/json: schema: $ref: "#/components/schemas/util.UnauthorizedError" description: Unauthorized "423": content: application/json: schema: $ref: "#/components/schemas/util.RateLimitError" description: Rate limit exceeded "500": content: application/json: schema: $ref: "#/components/schemas/util.ServerError" description: Internal server error security: - bearerauth: [] summary: Create space tags: - spaces /spaces/{space_id}: get: description: Fetches full details about a single space identified by its space ID. The response includes metadata such as the space name, icon, and various workspace IDs (home, archive, profile, etc.). This detailed view supports use cases such as displaying space-specific settings. parameters: - description: The version of the API to use in: header name: Anytype-Version schema: default: "2025-03-17" type: string - description: Space ID in: path name: space_id required: true schema: type: string responses: "200": content: application/json: schema: $ref: "#/components/schemas/space.SpaceResponse" description: Space "401": content: application/json: schema: $ref: "#/components/schemas/util.UnauthorizedError" description: Unauthorized "404": content: application/json: schema: $ref: "#/components/schemas/util.NotFoundError" description: Space not found "500": content: application/json: schema: $ref: "#/components/schemas/util.ServerError" description: Internal server error security: - bearerauth: [] summary: Get space tags: - spaces /spaces/{space_id}/lists/{list_id}/{view_id}/objects: get: description: Returns a paginated list of objects associated with a specific list (query or collection) within a space. When a view ID is provided, the objects are filtered and sorted according to the view's configuration. If no view ID is specified, all list objects are returned without filtering and sorting. This endpoint helps clients to manage grouped objects (for example, tasks within a list) by returning information for each item of the list. parameters: - description: The version of the API to use in: header name: Anytype-Version schema: default: "2025-03-17" type: string - description: Space ID in: path name: space_id required: true schema: type: string - description: List ID in: path name: list_id required: true schema: type: string - description: View ID in: path name: view_id required: true schema: type: string - description: The number of items to skip before starting to collect the result set in: query name: offset schema: default: 0 type: integer - description: The number of items to return in: query name: limit schema: type: integer responses: "200": content: application/json: schema: $ref: "#/components/schemas/pagination.PaginatedResponse-object_Object" description: List of objects "401": content: application/json: schema: $ref: "#/components/schemas/util.UnauthorizedError" description: Unauthorized "404": content: application/json: schema: $ref: "#/components/schemas/util.NotFoundError" description: Not found "500": content: application/json: schema: $ref: "#/components/schemas/util.ServerError" description: Internal server error security: - bearerauth: [] summary: Get objects in list tags: - lists /spaces/{space_id}/lists/{list_id}/objects: post: description: Enables clients to add one or more objects to a specific list (collection only) by submitting a JSON array of object IDs. Upon success, the endpoint returns a confirmation message. This endpoint is vital for building user interfaces that allow drag‑and‑drop or multi‑select additions to collections. parameters: - description: The version of the API to use in: header name: Anytype-Version schema: default: "2025-03-17" type: string - description: Space ID in: path name: space_id required: true schema: type: string - description: List ID in: path name: list_id required: true schema: type: string requestBody: content: application/json: schema: items: type: string type: array description: List of object IDs required: true responses: "200": content: application/json: schema: type: string description: Objects added successfully "400": content: application/json: schema: $ref: "#/components/schemas/util.ValidationError" description: Bad request "401": content: application/json: schema: $ref: "#/components/schemas/util.UnauthorizedError" description: Unauthorized "404": content: application/json: schema: $ref: "#/components/schemas/util.NotFoundError" description: Not found "500": content: application/json: schema: $ref: "#/components/schemas/util.ServerError" description: Internal server error security: - bearerauth: [] summary: Add objects to list tags: - lists /spaces/{space_id}/lists/{list_id}/objects/{object_id}: delete: description: Removes a given object from the specified list (collection only) in a space. The endpoint takes the space, list, and object identifiers as path parameters. It's subject to rate limiting and returns a success message on completion. It is used for dynamically managing collections without affecting the underlying object data. parameters: - description: The version of the API to use in: header name: Anytype-Version schema: default: "2025-03-17" type: string - description: Space ID in: path name: space_id required: true schema: type: string - description: List ID in: path name: list_id required: true schema: type: string - description: Object ID in: path name: object_id required: true schema: type: string responses: "200": content: application/json: schema: type: string description: Objects removed successfully "400": content: application/json: schema: $ref: "#/components/schemas/util.ValidationError" description: Bad request "401": content: application/json: schema: $ref: "#/components/schemas/util.UnauthorizedError" description: Unauthorized "404": content: application/json: schema: $ref: "#/components/schemas/util.NotFoundError" description: Not found "500": content: application/json: schema: $ref: "#/components/schemas/util.ServerError" description: Internal server error security: - bearerauth: [] summary: Remove object from list tags: - lists /spaces/{space_id}/lists/{list_id}/views: get: description: Returns a paginated list of views defined for a specific list (query or collection) within a space. Each view includes configuration details such as layout, applied filters, and sorting options, enabling clients to render the list according to user preferences and context. This endpoint supports pagination parameters to control the number of views returned and the starting point of the result set. parameters: - description: The version of the API to use in: header name: Anytype-Version schema: default: "2025-03-17" type: string - description: Space ID in: path name: space_id required: true schema: type: string - description: List ID in: path name: list_id required: true schema: type: string - description: The number of items to skip before starting to collect the result set in: query name: offset schema: default: 0 type: integer - description: The number of items to return in: query name: limit schema: type: integer responses: "200": content: application/json: schema: $ref: "#/components/schemas/pagination.PaginatedResponse-list_View" description: List of views "401": content: application/json: schema: $ref: "#/components/schemas/util.UnauthorizedError" description: Unauthorized "404": content: application/json: schema: $ref: "#/components/schemas/util.NotFoundError" description: Not found "500": content: application/json: schema: $ref: "#/components/schemas/util.ServerError" description: Internal server error security: - bearerauth: [] summary: Get list views tags: - lists /spaces/{space_id}/members: get: description: Returns a paginated list of members belonging to the specified space. Each member record includes the member’s profile ID, name, icon (which may be derived from an emoji or image), network identity, global name, status (e.g. joining, active) and role (e.g. Viewer, Editor, Owner). This endpoint supports collaborative features by allowing clients to show who is in a space and manage access rights. parameters: - description: The version of the API to use in: header name: Anytype-Version schema: default: "2025-03-17" type: string - description: Space ID in: path name: space_id required: true schema: type: string - description: The number of items to skip before starting to collect the result set in: query name: offset schema: default: 0 type: integer - description: The number of items to return in: query name: limit schema: default: 100 maximum: 1000 type: integer responses: "200": content: application/json: schema: $ref: "#/components/schemas/pagination.PaginatedResponse-space_Member" description: List of members "401": content: application/json: schema: $ref: "#/components/schemas/util.UnauthorizedError" description: Unauthorized "500": content: application/json: schema: $ref: "#/components/schemas/util.ServerError" description: Internal server error security: - bearerauth: [] summary: List members tags: - members /spaces/{space_id}/members/{member_id}: get: description: Fetches detailed information about a single member within a space. The endpoint returns the member’s identifier, name, icon, identity, global name, status and role. The member_id path parameter can be provided as either the member's ID (starting with `_participant`) or the member's identity. This is useful for user profile pages, permission management, and displaying member-specific information in collaborative environments. parameters: - description: The version of the API to use in: header name: Anytype-Version schema: default: "2025-03-17" type: string - description: Space ID in: path name: space_id required: true schema: type: string - description: Member ID or Identity in: path name: member_id required: true schema: type: string responses: "200": content: application/json: schema: $ref: "#/components/schemas/space.MemberResponse" description: Member "401": content: application/json: schema: $ref: "#/components/schemas/util.UnauthorizedError" description: Unauthorized "404": content: application/json: schema: $ref: "#/components/schemas/util.NotFoundError" description: Member not found "500": content: application/json: schema: $ref: "#/components/schemas/util.ServerError" description: Internal server error security: - bearerauth: [] summary: Get member tags: - members /spaces/{space_id}/objects: get: description: Retrieves a paginated list of objects in the given space. The endpoint takes query parameters for pagination (offset and limit) and returns detailed data about each object including its ID, name, icon, type information, a snippet of the content (if applicable), layout, space ID, blocks and details. It is intended for building views where users can see all objects in a space at a glance. parameters: - description: The version of the API to use in: header name: Anytype-Version schema: default: "2025-03-17" type: string - description: Space ID in: path name: space_id required: true schema: type: string - description: The number of items to skip before starting to collect the result set in: query name: offset schema: default: 0 type: integer - description: The number of items to return in: query name: limit schema: default: 100 maximum: 1000 type: integer responses: "200": content: application/json: schema: $ref: "#/components/schemas/pagination.PaginatedResponse-object_Object" description: List of objects "401": content: application/json: schema: $ref: "#/components/schemas/util.UnauthorizedError" description: Unauthorized "500": content: application/json: schema: $ref: "#/components/schemas/util.ServerError" description: Internal server error security: - bearerauth: [] summary: List objects tags: - objects post: description: Creates a new object in the specified space using a JSON payload. The creation process is subject to rate limiting. The payload must include key details such as the object name, icon, description, body content (which may support Markdown), source URL (required for bookmark objects), template identifier, and the type_key (which is the non-unique identifier of the type of object to create). Post-creation, additional operations (like setting featured properties or fetching bookmark metadata) may occur. The endpoint then returns the full object data, ready for further interactions. parameters: - description: The version of the API to use in: header name: Anytype-Version schema: default: "2025-03-17" type: string - description: Space ID in: path name: space_id required: true schema: type: string requestBody: content: application/json: schema: $ref: "#/components/schemas/object.CreateObjectRequest" description: Object to create required: true responses: "200": content: application/json: schema: $ref: "#/components/schemas/object.ObjectResponse" description: The created object "400": content: application/json: schema: $ref: "#/components/schemas/util.ValidationError" description: Bad request "401": content: application/json: schema: $ref: "#/components/schemas/util.UnauthorizedError" description: Unauthorized "423": content: application/json: schema: $ref: "#/components/schemas/util.RateLimitError" description: Rate limit exceeded "500": content: application/json: schema: $ref: "#/components/schemas/util.ServerError" description: Internal server error security: - bearerauth: [] summary: Create object tags: - objects /spaces/{space_id}/objects/{object_id}: delete: description: This endpoint “deletes” an object by marking it as archived. The deletion process is performed safely and is subject to rate limiting. It returns the object’s details after it has been archived. Proper error handling is in place for situations such as when the object isn’t found or the deletion cannot be performed because of permission issues. parameters: - description: The version of the API to use in: header name: Anytype-Version schema: default: "2025-03-17" type: string - description: Space ID in: path name: space_id required: true schema: type: string - description: Object ID in: path name: object_id required: true schema: type: string responses: "200": content: application/json: schema: $ref: "#/components/schemas/object.ObjectResponse" description: The deleted object "401": content: application/json: schema: $ref: "#/components/schemas/util.UnauthorizedError" description: Unauthorized "403": content: application/json: schema: $ref: "#/components/schemas/util.ForbiddenError" description: Forbidden "404": content: application/json: schema: $ref: "#/components/schemas/util.NotFoundError" description: Resource not found "423": content: application/json: schema: $ref: "#/components/schemas/util.RateLimitError" description: Rate limit exceeded "500": content: application/json: schema: $ref: "#/components/schemas/util.ServerError" description: Internal server error security: - bearerauth: [] summary: Delete object tags: - objects get: description: Fetches the full details of a single object identified by the object ID within the specified space. The response includes not only basic metadata (ID, name, icon, type) but also the complete set of blocks (which may include text, files, properties and dataviews) and extra details (such as timestamps and linked member information). This endpoint is essential when a client needs to render or edit the full object view. parameters: - description: The version of the API to use in: header name: Anytype-Version schema: default: "2025-03-17" type: string - description: Space ID in: path name: space_id required: true schema: type: string - description: Object ID in: path name: object_id required: true schema: type: string responses: "200": content: application/json: schema: $ref: "#/components/schemas/object.ObjectResponse" description: The requested object "401": content: application/json: schema: $ref: "#/components/schemas/util.UnauthorizedError" description: Unauthorized "404": content: application/json: schema: $ref: "#/components/schemas/util.NotFoundError" description: Resource not found "410": content: application/json: schema: $ref: "#/components/schemas/util.GoneError" description: Resource deleted "500": content: application/json: schema: $ref: "#/components/schemas/util.ServerError" description: Internal server error security: - bearerauth: [] summary: Get object tags: - objects /spaces/{space_id}/objects/{object_id}/{format}: get: description: This endpoint exports a single object from the specified space into a desired format. The export format is provided as a path parameter (currently supporting “markdown” only). The endpoint calls the export service which converts the object’s content into the requested format. It is useful for sharing, or displaying the markdown representation of the objecte externally. parameters: - description: The version of the API to use in: header name: Anytype-Version schema: default: "2025-03-17" type: string - description: Space ID in: path name: space_id required: true schema: type: string - description: Object ID in: path name: object_id required: true schema: type: string - description: Export format in: path name: format required: true schema: enum: - markdown type: string requestBody: content: application/json: schema: type: object responses: "200": content: application/json: schema: $ref: "#/components/schemas/export.ObjectExportResponse" description: Object exported successfully "400": content: application/json: schema: $ref: "#/components/schemas/util.ValidationError" description: Bad request "401": content: application/json: schema: $ref: "#/components/schemas/util.UnauthorizedError" description: Unauthorized "500": content: application/json: schema: $ref: "#/components/schemas/util.ServerError" description: Internal server error security: - bearerauth: [] summary: Export object tags: - export /spaces/{space_id}/search: post: description: This endpoint performs a focused search within a single space (specified by the space_id path parameter). Like the global search, it accepts pagination parameters and a JSON payload containing the search query, object types, and sorting preferences. The search is limited to the provided space and returns a list of objects that match the query. This allows clients to implement space‑specific filtering without having to process extraneous results. parameters: - description: The version of the API to use in: header name: Anytype-Version schema: default: "2025-03-17" type: string - description: Space ID in: path name: space_id required: true schema: type: string - description: The number of items to skip before starting to collect the result set in: query name: offset schema: default: 0 type: integer - description: The number of items to return in: query name: limit schema: default: 100 maximum: 1000 type: integer requestBody: content: application/json: schema: $ref: "#/components/schemas/search.SearchRequest" description: Search parameters required: true responses: "200": content: application/json: schema: $ref: "#/components/schemas/pagination.PaginatedResponse-object_Object" description: List of objects "401": content: application/json: schema: $ref: "#/components/schemas/util.UnauthorizedError" description: Unauthorized "500": content: application/json: schema: $ref: "#/components/schemas/util.ServerError" description: Internal server error security: - bearerauth: [] summary: Search objects within a space tags: - search /spaces/{space_id}/types: get: description: This endpoint retrieves a paginated list of object types (e.g. 'Page', 'Note', 'Task') available within the specified space. Each type’s record includes its unique identifier, type key, display name, icon, and a recommended layout. While a type's id is truly unique, a type's key can be the same across spaces for known types, e.g. 'ot-page' for 'Page'. Clients use this information when offering choices for object creation or for filtering objects by type through search. parameters: - description: The version of the API to use in: header name: Anytype-Version schema: default: "2025-03-17" type: string - description: Space ID in: path name: space_id required: true schema: type: string - description: The number of items to skip before starting to collect the result set in: query name: offset schema: default: 0 type: integer - description: The number of items to return in: query name: limit schema: default: 100 maximum: 1000 type: integer responses: "200": content: application/json: schema: $ref: "#/components/schemas/pagination.PaginatedResponse-object_Type" description: List of types "401": content: application/json: schema: $ref: "#/components/schemas/util.UnauthorizedError" description: Unauthorized "500": content: application/json: schema: $ref: "#/components/schemas/util.ServerError" description: Internal server error security: - bearerauth: [] summary: List types tags: - types /spaces/{space_id}/types/{type_id}: get: description: Fetches detailed information about one specific object type by its ID. This includes the type’s unique key, name, icon, and recommended layout. This detailed view assists clients in understanding the expected structure and style for objects of that type and in guiding the user interface (such as displaying appropriate icons or layout hints). parameters: - description: The version of the API to use in: header name: Anytype-Version schema: default: "2025-03-17" type: string - description: Space ID in: path name: space_id required: true schema: type: string - description: Type ID in: path name: type_id required: true schema: type: string responses: "200": content: application/json: schema: $ref: "#/components/schemas/object.TypeResponse" description: The requested type "401": content: application/json: schema: $ref: "#/components/schemas/util.UnauthorizedError" description: Unauthorized "404": content: application/json: schema: $ref: "#/components/schemas/util.NotFoundError" description: Resource not found "410": content: application/json: schema: $ref: "#/components/schemas/util.GoneError" description: Resource deleted "500": content: application/json: schema: $ref: "#/components/schemas/util.ServerError" description: Internal server error security: - bearerauth: [] summary: Get type tags: - types /spaces/{space_id}/types/{type_id}/templates: get: description: This endpoint returns a paginated list of templates that are associated with a specific object type within a space. Templates provide pre‑configured structures for creating new objects. Each template record contains its identifier, name, and icon, so that clients can offer users a selection of templates when creating objects. parameters: - description: The version of the API to use in: header name: Anytype-Version schema: default: "2025-03-17" type: string - description: Space ID in: path name: space_id required: true schema: type: string - description: Type ID in: path name: type_id required: true schema: type: string - description: The number of items to skip before starting to collect the result set in: query name: offset schema: default: 0 type: integer - description: The number of items to return in: query name: limit schema: default: 100 maximum: 1000 type: integer responses: "200": content: application/json: schema: $ref: "#/components/schemas/pagination.PaginatedResponse-object_Template" description: List of templates "401": content: application/json: schema: $ref: "#/components/schemas/util.UnauthorizedError" description: Unauthorized "500": content: application/json: schema: $ref: "#/components/schemas/util.ServerError" description: Internal server error security: - bearerauth: [] summary: List templates tags: - templates /spaces/{space_id}/types/{type_id}/templates/{template_id}: get: description: Fetches full details for one template associated with a particular object type in a space. The response provides the template’s identifier, name, icon, and any other relevant metadata. This endpoint is useful when a client needs to preview or apply a template to prefill object creation fields. parameters: - description: The version of the API to use in: header name: Anytype-Version schema: default: "2025-03-17" type: string - description: Space ID in: path name: space_id required: true schema: type: string - description: Type ID in: path name: type_id required: true schema: type: string - description: Template ID in: path name: template_id required: true schema: type: string responses: "200": content: application/json: schema: $ref: "#/components/schemas/object.TemplateResponse" description: The requested template "401": content: application/json: schema: $ref: "#/components/schemas/util.UnauthorizedError" description: Unauthorized "404": content: application/json: schema: $ref: "#/components/schemas/util.NotFoundError" description: Resource not found "410": content: application/json: schema: $ref: "#/components/schemas/util.GoneError" description: Resource deleted "500": content: application/json: schema: $ref: "#/components/schemas/util.ServerError" description: Internal server error security: - bearerauth: [] summary: Get template tags: - templates servers: - url: http://localhost:31009/v1