> For the complete documentation index, see [llms.txt](https://docs.archera.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.archera.ai/api-reference/public-api/uploads.md).

# Uploads

API for uploading billing files for savings analysis

## Upload a billing file for savings analysis

> Accepts a multipart PDF or CSV billing file, stores it in Archera's invoice upload bucket, and returns an upload ID. Use this upload ID when invoking the Savings Analysis MCP tool. The upload status workflow is: PENDING before storage begins, PROCESSING while the file is being transferred, COMPLETE once it is available for analysis, and ERROR if storage fails.

```json
{"openapi":"3.1.0","info":{"title":"Archera.ai API","version":"v1.0.0"},"tags":[{"name":"Uploads","description":"API for uploading billing files for savings analysis"}],"paths":{"/v1/org/{org_id}/uploads":{"post":{"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicUpload"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"405":{"description":"Method not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"$ref":"#/components/responses/UNPROCESSABLE_CONTENT"},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"default":{"$ref":"#/components/responses/DEFAULT_ERROR"}},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/CreatePublicUpload"}}}},"tags":["Uploads"],"summary":"Upload a billing file for savings analysis","description":"Accepts a multipart PDF or CSV billing file, stores it in Archera's invoice upload bucket, and returns an upload ID. Use this upload ID when invoking the Savings Analysis MCP tool. The upload status workflow is: PENDING before storage begins, PROCESSING while the file is being transferred, COMPLETE once it is available for analysis, and ERROR if storage fails."}}},"components":{"schemas":{"PublicUpload":{"type":"object","properties":{"id":{"type":"string","format":"uuid","readOnly":true},"created_at":{"type":"string","format":"date-time","readOnly":true},"org_id":{"type":"string","readOnly":true,"maxLength":50},"file_name":{"type":"string","readOnly":true,"maxLength":255},"content_type":{"type":"string","readOnly":true,"maxLength":255},"size_bytes":{"type":"integer","readOnly":true},"description":{"type":["string","null"],"readOnly":true,"maxLength":255},"upload_status":{"readOnly":true,"type":"string","enum":["PENDING","PROCESSING","COMPLETE","ERROR"]},"source":{"readOnly":true,"enum":["agent_upload","attachment","partner_api"]},"detected_type":{"type":["string","null"],"readOnly":true,"maxLength":64},"available_actions":{"type":"array","readOnly":true,"items":{"type":"string"}}},"required":["content_type","created_at","description","detected_type","file_name","id","org_id","size_bytes","source","upload_status"],"additionalProperties":false},"ApiErrorResponse":{"type":"object","properties":{"message":{"type":"string"},"detail":{},"code":{"type":["string","null"]},"url":{"type":["string","null"]},"timestamp":{"type":"string"},"type":{"type":"string"}},"required":["message","timestamp","type"]},"Error":{"type":"object","properties":{"code":{"type":"integer","description":"Error code"},"status":{"type":"string","description":"Error name"},"message":{"type":"string","description":"Error message"},"errors":{"type":"object","description":"Errors","additionalProperties":{}}},"additionalProperties":false},"CreatePublicUpload":{"type":"object","properties":{"description":{"type":["string","null"],"maxLength":255,"description":"Optional partner-supplied context for the uploaded billing file"},"file":{"writeOnly":true,"description":"Billing PDF or CSV file to upload for savings analysis","type":"string","format":"binary"}},"required":["file"],"additionalProperties":false}},"responses":{"UNPROCESSABLE_CONTENT":{"description":"Unprocessable Content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"DEFAULT_ERROR":{"description":"Default error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}
```

## Get uploaded billing file status

> Returns metadata and upload status for a partner API upload. Clients can poll this endpoint until upload\_status is COMPLETE, then pass the upload ID to the Savings Analysis MCP tool.

```json
{"openapi":"3.1.0","info":{"title":"Archera.ai API","version":"v1.0.0"},"tags":[{"name":"Uploads","description":"API for uploading billing files for savings analysis"}],"paths":{"/v1/org/{org_id}/uploads/{upload_id}":{"get":{"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicUpload"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"405":{"description":"Method not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"default":{"$ref":"#/components/responses/DEFAULT_ERROR"}},"tags":["Uploads"],"summary":"Get uploaded billing file status","description":"Returns metadata and upload status for a partner API upload. Clients can poll this endpoint until upload_status is COMPLETE, then pass the upload ID to the Savings Analysis MCP tool."}}},"components":{"schemas":{"PublicUpload":{"type":"object","properties":{"id":{"type":"string","format":"uuid","readOnly":true},"created_at":{"type":"string","format":"date-time","readOnly":true},"org_id":{"type":"string","readOnly":true,"maxLength":50},"file_name":{"type":"string","readOnly":true,"maxLength":255},"content_type":{"type":"string","readOnly":true,"maxLength":255},"size_bytes":{"type":"integer","readOnly":true},"description":{"type":["string","null"],"readOnly":true,"maxLength":255},"upload_status":{"readOnly":true,"type":"string","enum":["PENDING","PROCESSING","COMPLETE","ERROR"]},"source":{"readOnly":true,"enum":["agent_upload","attachment","partner_api"]},"detected_type":{"type":["string","null"],"readOnly":true,"maxLength":64},"available_actions":{"type":"array","readOnly":true,"items":{"type":"string"}}},"required":["content_type","created_at","description","detected_type","file_name","id","org_id","size_bytes","source","upload_status"],"additionalProperties":false},"ApiErrorResponse":{"type":"object","properties":{"message":{"type":"string"},"detail":{},"code":{"type":["string","null"]},"url":{"type":["string","null"]},"timestamp":{"type":"string"},"type":{"type":"string"}},"required":["message","timestamp","type"]},"Error":{"type":"object","properties":{"code":{"type":"integer","description":"Error code"},"status":{"type":"string","description":"Error name"},"message":{"type":"string","description":"Error message"},"errors":{"type":"object","description":"Errors","additionalProperties":{}}},"additionalProperties":false}},"responses":{"DEFAULT_ERROR":{"description":"Default error response","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, and the optional `goal` query parameter:

```
GET https://docs.archera.ai/api-reference/public-api/uploads.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
