Complete media upload
Optional. Adds a file uploaded through Create media upload to your media library now and returns it. Without this call the file is added the first time you use its id in a post, and an upload nobody completes or uses within 1 day expires.
Authorization
ApiKeyAuth PublishQ API key sent as Authorization: Bearer pq_live_....
In: header
Path Parameters
uuidResponse Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://publishq.com/api/v1/media/uploads/f6370ca1-1f47-4f68-be72-c1206913b326/complete"{
"id": "f6370ca1-1f47-4f68-be72-c1206913b326",
"type": "IMAGE",
"url": "https://cdn.publishq.com/uploads/images/f6370ca1-1f47-4f68-be72-c1206913b326.png",
"source": "UPLOAD",
"created_at": "2026-03-28T16:25:41.000Z",
"usageCount": 3
}{
"error": {
"title": "Unauthorized",
"status": 401,
"code": "missing_auth",
"message": "Missing Authorization header",
"instance": "/api/v1/posts"
}
}{
"error": {
"title": "Forbidden",
"status": 403,
"code": "insufficient_scope",
"message": "The API key does not have the required scope: posts:write",
"instance": "/api/v1/posts",
"details": {
"property1": {},
"property2": {}
}
}
}{
"error": {
"title": "Forbidden",
"status": 403,
"code": "insufficient_scope",
"message": "Missing required scope: media:write",
"instance": "/api/v1/media/uploads/f6370ca1-1f47-4f68-be72-c1206913b326/complete"
}
}{
"error": {
"title": "Not Found",
"status": 404,
"code": "media_not_found",
"message": "Media not found",
"instance": "/api/v1/media"
}
}{
"error": {
"title": "Conflict",
"status": 409,
"code": "media_upload_incomplete",
"message": "The file for media f6370ca1-1f47-4f68-be72-c1206913b326 has not been uploaded yet. Upload it to the uploadUrl returned when the upload was created, then retry.",
"instance": "/api/v1/media",
"details": {
"mediaId": "f6370ca1-1f47-4f68-be72-c1206913b326"
}
}
}{
"error": {
"title": "Payload Too Large",
"status": 413,
"code": "file_too_large",
"message": "File size too large. Free accounts can upload files up to 500 MB. Upgrade to upload files up to 4 GB.",
"instance": "/api/v1/media"
}
}{
"error": {
"title": "Unsupported Media Type",
"status": 415,
"code": "unsupported_file_type",
"message": "Unsupported file type: the file content is audio/mpeg, even though it is labelled video/mp4. Renaming a file does not change its format. Supported types: image/jpeg, image/png, image/gif, image/webp, video/mp4, video/webm, video/quicktime, video/x-msvideo.",
"instance": "/api/v1/media"
}
}{
"error": {
"title": "Too Many Requests",
"status": 429,
"code": "rate_limit_exceeded",
"message": "Too Many Requests",
"instance": "/api/v1/media/uploads/f6370ca1-1f47-4f68-be72-c1206913b326/complete",
"details": {
"retryAfter": 60
}
}
}Create media upload POST
Upload a file of up to 4 GB (500 MB on the Free plan) straight to storage: 1. Call this endpoint with `filename`, `contentType` and `fileSize`. You get back an `id` and an `uploadUrl`. 2. `PUT` the file to `uploadUrl` with the same `Content-Type` header. Storage answers `200`, or `403` if the file is not exactly `fileSize` bytes. 3. Optional: call Complete media upload to add the file to your media library now. 4. Put the `id` in `mediaIds` when you create or update a post.
List workspaces GET
Return your workspaces, including their names, colors, and account counts.