# Files

## Upload files to an account

> Uploads one or more files to an account by ID or external ID.\
> \
> \*\*Rate limit:\*\* 10 requests per minute

```json
{"openapi":"3.0.1","info":{"title":"Pylon API.","version":"1.0.0"},"servers":[{"url":"https://api.usepylon.com"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"description":"Authorization: Bearer <token>","scheme":"bearer","type":"http"}},"schemas":{"UploadAccountFileResponseBody":{"properties":{"data":{"description":"The data payload of the response.","items":{"$ref":"#/components/schemas/Attachment"},"type":"array"},"request_id":{"description":"The request ID for tracking.","type":"string"}},"type":"object"},"Attachment":{"properties":{"description":{"description":"The description of the attachment.","type":"string"},"id":{"description":"The ID of the attachment.","type":"string"},"name":{"description":"The name of the attachment.","type":"string"},"url":{"description":"The URL of the attachment.","type":"string"}},"type":"object"},"ErrorApiResponseBody":{"properties":{"errors":{"description":"The list of errors.","items":{"type":"string"},"type":"array"},"exists_id":{"description":"The ID of the object that already exists if this is a duplicate object error.","type":"string"},"request_id":{"description":"The request ID for tracking.","type":"string"}},"type":"object"}}},"paths":{"/accounts/{id}/files":{"post":{"description":"Uploads one or more files to an account by ID or external ID.\n\n**Rate limit:** 10 requests per minute","operationId":"UploadAccountFile","parameters":[{"description":"The ID or external ID of the account to upload files to.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"file":{"description":"The file to upload.","format":"binary","type":"string"},"file_url":{"description":"The URL to fetch the file from, if the file is not provided.","type":"string"}},"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadAccountFileResponseBody"}}},"description":""},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":""},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":""},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":""}},"summary":"Upload files to an account","tags":["accounts"]}}}}
```


---

# Agent Instructions: 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://docs.usepylon.com/pylon-docs/developer/api/api-reference/accounts/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.
