---
title: "Upload file"
method: POST
path: "/partner/app/{appId}/bizai/agent_config/files"
tags: ["Knowledge — Files"]
---

# Upload file

`POST /partner/app/{appId}/bizai/agent_config/files`

## Request

- Base URL: `https://partner.gupshup.io`
- URL: `https://partner.gupshup.io/partner/app/{appId}/bizai/agent_config/files`
- Auth: API key in header `Authorization`

`file_name` must carry a supported extension (.pdf .doc .docx .png .jpg .jpeg; .csv and .xlsx only
when enabled for the account), the binary must match it, and the file must be 100 MB or smaller.

**Known product gap:** the passthrough currently rejects multipart uploads with
`400 JSON Schema Validation Error — Failed to parse the request body parameters`, and rejects JSON
with `400 Unsupported content type: application/json`. No upload succeeds through the wrapper today.

## Request body `multipart/form-data`

- object
  - `file_name` string, required
  - `file` string, binary, required

## Response `201`

File uploaded.

- KnowledgeFile: **Per Meta reference**. The returned `file_name` may have its extension appended.
  - `id` string, required: Meta resource id.
  - `file_name` string, required

## Other responses

- `400`: Rejected by Meta and forwarded unchanged.
- `401`: Missing, invalid, or foreign-app token. Raised by Partner Portal before any forwarding.
- `409`: A file with this name already exists.
- `429`: Per-app rate limit exceeded. Retry after the 60-second window.
- `503`: Upload service temporarily unavailable.

---

[API](https://skmtc.dev/gupshup/apis/partner-portal-meta-business-agent-bizai-api.md) - [All operations](https://skmtc.dev/gupshup/apis/partner-portal-meta-business-agent-bizai-api/llms.txt) - [OpenAPI document](https://skmtc.dev/gupshup/apis/partner-portal-meta-business-agent-bizai-api/revisions/4c52185f2153?raw)
