> For the complete documentation index, see [llms.txt](https://guide.plusai.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://guide.plusai.com/apis-for-presentations/api-reference/files.md).

# Files

Upload, list, and delete user files.

## Upload a file

> Uploads a file as \`multipart/form-data\`. The upload is validated and\
> accepted synchronously, then processed asynchronously.\
> \
> Constraints:\
> \- The request method must be \`PUT\`.\
> \- \`Content-Type\` must be \`multipart/form-data\`.\
> \- \`Content-Length\` is required (chunked transfer encoding is not\
> &#x20; supported).\
> \- Maximum size is 125 MB.<br>

```json
{"openapi":"3.1.0","info":{"title":"PlusAI REST API","version":"v0"},"tags":[{"name":"Files","description":"Upload, list, and delete user files."}],"servers":[{"url":"https://api.plusdocs.com","description":"Production"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","description":"API key issued for your Plus organization, sent as a bearer token."}},"schemas":{"UploadAccepted":{"type":"object","properties":{"status":{"type":"string"},"uploadId":{"type":"string"},"message":{"type":"string"}},"required":["status","uploadId","message"]},"Error":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]},"UploadError":{"type":"object","description":"Error envelope returned by the file-upload endpoint.","properties":{"error":{"type":"string"}},"required":["error"]}},"responses":{"Unauthorized":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/r/v0/files/upload":{"put":{"operationId":"uploadFile","tags":["Files"],"summary":"Upload a file","description":"Uploads a file as `multipart/form-data`. The upload is validated and\naccepted synchronously, then processed asynchronously.\n\nConstraints:\n- The request method must be `PUT`.\n- `Content-Type` must be `multipart/form-data`.\n- `Content-Length` is required (chunked transfer encoding is not\n  supported).\n- Maximum size is 125 MB.\n","requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary","description":"The file to upload."}},"required":["file"]}}}},"responses":{"202":{"description":"File received; processing will begin shortly.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadAccepted"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"405":{"description":"Method not allowed (must use PUT).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadError"}}}},"411":{"description":"Content-Length header is required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadError"}}}},"413":{"description":"File exceeds the size limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadError"}}}},"415":{"description":"Content-Type must be multipart/form-data.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadError"}}}}}}}}}
```

## List files

> Lists the authenticated user's files in the organization, ordered by\
> creation time (newest first). Supports cursor-based pagination.<br>

```json
{"openapi":"3.1.0","info":{"title":"PlusAI REST API","version":"v0"},"tags":[{"name":"Files","description":"Upload, list, and delete user files."}],"servers":[{"url":"https://api.plusdocs.com","description":"Production"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","description":"API key issued for your Plus organization, sent as a bearer token."}},"schemas":{"FileListResponse":{"type":"object","properties":{"files":{"type":"array","items":{"$ref":"#/components/schemas/File"}},"nextCursor":{"type":["string","null"],"description":"Cursor for the next page, or null if there are no more files."}},"required":["files","nextCursor"]},"File":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":["string","null"]},"contentType":{"type":["string","null"]},"urn":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","urn"]},"Error":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}},"responses":{"Unauthorized":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/r/v0/files":{"get":{"operationId":"listFiles","tags":["Files"],"summary":"List files","description":"Lists the authenticated user's files in the organization, ordered by\ncreation time (newest first). Supports cursor-based pagination.\n","parameters":[{"name":"limit","in":"query","required":false,"description":"Page size (1–100). Defaults to 50.","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"cursor","in":"query","required":false,"description":"The `nextCursor` returned by a previous page.","schema":{"type":"string"}}],"responses":{"200":{"description":"A page of files.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileListResponse"}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}}}}}
```

## Delete a file

> Deletes a file the caller owns.\
> Returns \`204\` on success.<br>

```json
{"openapi":"3.1.0","info":{"title":"PlusAI REST API","version":"v0"},"tags":[{"name":"Files","description":"Upload, list, and delete user files."}],"servers":[{"url":"https://api.plusdocs.com","description":"Production"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","description":"API key issued for your Plus organization, sent as a bearer token."}},"responses":{"BadRequest":{"description":"The request was malformed or missing required fields.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unauthorized":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"schemas":{"Error":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"paths":{"/r/v0/files/{fileId}":{"delete":{"operationId":"deleteFile","tags":["Files"],"summary":"Delete a file","description":"Deletes a file the caller owns.\nReturns `204` on success.\n","parameters":[{"name":"fileId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Deletion accepted; no content."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"description":"File not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://guide.plusai.com/apis-for-presentations/api-reference/files.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
