> For the complete documentation index, see [llms.txt](https://docs.etelecom.vn/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.etelecom.vn/tich-hop-api/zalo-cloud/zalo-cloud-api/upload-file.md).

# Upload file

{% hint style="info" %}
**Lưu ý:**

* Đối với các API sử dụng cho Shop thì API\_KEY: [`<api_key>`](https://docs.etelecom.vn/tich-hop-api/shop/tai-khoan#api-key).Thông tin base\_url của [Shop](https://docs.etelecom.vn/tich-hop-api/shop/tai-khoan)
* Đối với các API sử dụng cho Partner thì API\_KEY: [`<shop_key>`](https://docs.etelecom.vn/tich-hop-api/partner/su-dung#ket-noi-lan-thu-hai-tro-di).Thông tin base\_url của [Partner](https://docs.etelecom.vn/tich-hop-api/partner/tai-khoan)
  {% endhint %}

**Request:**

```json
curl --location '$BASE_URL.OA/UploadFile' \
--header 'Authorization: Bearer $API_KEY' \
--form 'type="image"' \
--form 'oa_id="<int64>"' \
--form 'file=@"/path/to/file"'
```

**Response:**

```json
{
    "token": "string"
}
```

**Cấu trúc body của request**

<table><thead><tr><th width="234.33333333333331">Tham số</th><th width="201">Kiểu dữ liệu</th><th>Mô tả</th></tr></thead><tbody><tr><td>type</td><td>string</td><td>kiểu dữ liệu</td></tr><tr><td>oa_id</td><td>int64</td><td>ID của OA</td></tr></tbody></table>

**Cấu trúc thuộc tính dữ liệu trả về**

<table><thead><tr><th width="77.96968587239581">Tham số</th><th width="98.45458984375">Kiểu dữ liệu</th><th>Mô tả</th></tr></thead><tbody><tr><td>token</td><td>string</td><td>Token của file/hình ảnh, sử dụng cho API gửi tin dạng file/hình ả</td></tr></tbody></table>
