> For the complete documentation index, see [llms.txt](https://help.paintscout.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.paintscout.com/developers/files.md).

# Files

## POST /files

> Create Files

```json
{"openapi":"3.0.0","info":{"title":"Core API","version":"v2"},"servers":[{"url":"https://openapi.paintscout.com/v2"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer"}},"schemas":{"FileCreate":{"type":"object","additionalProperties":false,"required":["files"],"properties":{"files":{"type":"array","description":"Array of files to upload","items":{"type":"object","additionalProperties":false,"required":["url"],"properties":{"url":{"type":"string","description":"The URL of the file to download and upload"},"title":{"type":"string","description":"Optional title for the file"},"visibility":{"type":"string","description":"The visibility of the file","enum":["visible","customer","crew","hidden"]}}}}}},"File":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","description":"The unique ID of the File"},"title":{"type":"string","nullable":true,"description":"The title of the File"},"src":{"type":"string","nullable":true,"description":"The URL of the File"},"type":{"type":"string","nullable":true,"description":"The MIME type of the File (e.g. image/jpeg, application/pdf)"},"format":{"type":"string","nullable":true,"description":"The file format/extension (e.g. jpg, pdf, png)"},"visibility":{"type":"string","nullable":true,"description":"The visibility of the File","enum":["visible","customer","crew","hidden"]},"timestamp":{"$ref":"#/components/schemas/Timestamp"}}},"Timestamp":{"type":"object","additionalProperties":false,"properties":{"created":{"type":"number","description":"The timestamp when this entity was created"},"updated":{"type":"number","description":"The timestamp when this entity was last updated"}}},"Error":{"type":"object","additionalProperties":false,"properties":{"errors":{"type":"array","items":{"type":"string"},"description":"Array of error messages"}}}}},"paths":{"/files":{"post":{"summary":"Create Files","operationId":"createFiles","tags":["Files"],"parameters":[{"name":"docId","in":"query","required":true,"schema":{"type":"string"},"description":"The document ID to attach files to"},{"name":"docType","in":"query","required":true,"schema":{"type":"string","enum":["deal","contact","company"]},"description":"The document type (deal, contact, or company)"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileCreate"}}}},"responses":{"200":{"description":"Array of created files","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/File"}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not Authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected error","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://help.paintscout.com/developers/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.
