> ## Documentation Index
> Fetch the complete documentation index at: https://help.hoopai.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Media Library Overview

> Upload, organize, and manage images, videos, and documents in the HoopAI Platform REST API media library.

The Media Library API gives you programmatic access to the file storage system within your HoopAI Platform account. Use it to upload images, videos, and documents (up to 25 MB for general files, 500 MB for video), list and search existing files and folders, rename or bulk-update items, and soft-delete or permanently trash files.

## Base URL

```
https://services.leadconnectorhq.com
```

## Authentication

Every request must include a bearer token in the `Authorization` header.

```http theme={null}
Authorization: Bearer <access_token>
```

Use an access token generated for a **Account** user type, or a Private Integration Token scoped to the account. The `altType` query parameter must be set to `location` and `altId` to your location ID on all requests.

## OAuth scopes

| Scope             | Access                                             |
| ----------------- | -------------------------------------------------- |
| `medias.readonly` | Read and list files and folders                    |
| `medias.write`    | Upload, rename, move, and delete files and folders |

## Quick start

List files and folders in a location's media library:

```bash theme={null}
curl -X GET "https://services.leadconnectorhq.com/medias/files?altType=location&altId=sx6wyHhbFdRXh302LLNR&sortBy=createdAt&sortOrder=asc" \
  -H "Authorization: Bearer <access_token>"
```

## Endpoints

| Method   | Path                   | Description                          |
| -------- | ---------------------- | ------------------------------------ |
| `GET`    | `/medias/files`        | Get List of Files / Folders          |
| `POST`   | `/medias/upload-file`  | Upload File into Media Storage       |
| `POST`   | `/medias/folder`       | Create Folder                        |
| `POST`   | `/medias/{id}`         | Update File / Folder                 |
| `DELETE` | `/medias/{id}`         | Delete File or Folder                |
| `PUT`    | `/medias/update-files` | Bulk Update Files / Folders          |
| `PUT`    | `/medias/delete-files` | Bulk Delete / Trash Files or Folders |

## Related

* [OAuth 2.0 overview](/api-reference/oauth/overview) — obtain and refresh access tokens
* [Blogs API overview](/api-reference/blogs/overview) — embed media library assets in blog content
* [Funnels API overview](/api-reference/funnels/overview) — use uploaded images in funnel pages
