Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
89 changes: 89 additions & 0 deletions docs/reference/openapi-2025-05-20.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1375,6 +1375,25 @@ components:
- ObjectLayoutSet
- ObjectLayoutCollection
- ObjectLayoutParticipant
apimodel.FileUploadResponse:
description: The response after uploading a file
properties:
details:
additionalProperties: true
description: Additional file metadata (size, mime type, etc.)
type: object
file_id:
description: The file ID (IPFS CID)
example: bafyreie6n5l5nkbjal37su54cha4coy7qzuhrnajluzv5qd5jvtsrxkequ
type: string
object_id:
description: The ID of the created file object
example: bafyreiabc123def456
type: string
required:
- file_id
- object_id
type: object
apimodel.ObjectResponse:
properties:
object:
Expand Down Expand Up @@ -3470,6 +3489,76 @@ paths:
summary: Update object
tags:
- Objects
/v1/spaces/{space_id}/files:
post:
description: Uploads a file to the specified space using multipart/form-data.
The file is processed and stored, then a file object is created. Returns the
file object ID and file ID (IPFS CID).
operationId: upload_file
parameters:
- description: The version of the API to use
in: header
name: Anytype-Version
required: true
schema:
default: "2025-05-20"
type: string
- description: The ID of the space to upload the file to
in: path
name: space_id
required: true
schema:
type: string
requestBody:
content:
multipart/form-data:
schema:
properties:
file:
description: The file to upload
format: binary
type: string
required:
- file
type: object
description: The file to upload
required: true
responses:
"200":
content:
application/json:
schema:
$ref: "#/components/schemas/apimodel.FileUploadResponse"
description: File uploaded successfully
"400":
content:
application/json:
schema:
$ref: "#/components/schemas/util.BadRequestError"
description: Bad request
"401":
content:
application/json:
schema:
$ref: "#/components/schemas/util.UnauthorizedError"
description: Unauthorized
"429":
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: Upload file
tags:
- Files
/v1/spaces/{space_id}/properties:
get:
description: "⚠ Warning: Properties are experimental and may change in the next
Expand Down