List media folders
Return every folder in your media library with the number of files in it and its subfolders. Use a folder path with folderPath to list, upload or move files.
Authorization
ApiKeyAuth PublishQ API key sent as Authorization: Bearer pq_live_....
In: header
Response Body
application/json
application/json
application/json
curl -X GET "https://publishq.com/api/v1/media/folders"{
"folders": [
{
"path": "Channel A/Shorts",
"name": "Shorts",
"fileCount": 12
}
]
}{
"error": {
"title": "Unauthorized",
"status": 401,
"code": "missing_auth",
"message": "Missing Authorization header",
"instance": "/api/v1/posts"
}
}{
"error": {
"title": "Too Many Requests",
"status": 429,
"code": "rate_limit_exceeded",
"message": "Too Many Requests",
"instance": "/api/v1/media/folders",
"details": {
"retryAfter": 60
}
}
}Delete media DELETE
Deletes a media file from your media library and from storage. Returns no body on success. A file attached to a draft or scheduled post, or used as its thumbnail, is refused with 409 until that post is published or deleted. Posts already published on a platform are not affected.
Move media POST
Move media files to a folder, or to the top level with `folderPath: null`. Moving files into a folder that does not exist yet creates it. Folder names ignore capitals, so a path that differs only in capitals from an existing folder is refused with 409. Posts use media ids, so moving a file never changes a post.