gohighlevel-php-sdk

Media Library API

MediaLibrary

The MediaLibrary class provides a set of methods for interacting with the GoHighLevel media library. You can use it to upload, list, and delete files associated with a location or company.


delete(string $id, string $altId, string $altType): array|string

Deletes a file from the media library.


upload(array $params): array|string

Uploads a new file to the media library. The $params array is expected to be structured for a multipart/form-data request, containing the file content and metadata.


list(string $altId, string $altType, string $sortBy, string $sortOrder, array $params = []): array|string

Retrieves a list of files from the media library.