Media List
Retrieve a list of recent media (posts, reels, carousels) from a connected social media account. Useful for building post selectors, displaying recent content, or getting media IDs for other API calls.
Get User Media
Endpoint
GET /api/uploadposts/media
Headers
| Name | Value | Description |
|---|---|---|
| Authorization | Apikey your-api-key-here | Your API key for authentication |
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| platform | String | Yes | The platform to retrieve media from (e.g., "instagram"). |
| user | String | Yes | Profile username (as configured in Upload-Post). |
Example Request
curl 'https://api.upload-post.com/api/uploadposts/media?platform=instagram&user=my-profile' \
-H 'Authorization: Apikey your-api-key-here'
Responses
- 200 OK
{
"success": true,
"media": [
{
"id": "17890455123456789",
"caption": "Check out our latest product launch!",
"media_type": "IMAGE",
"permalink": "https://www.instagram.com/p/ABC123/",
"timestamp": "2025-06-15T10:30:00+0000",
"thumbnail_url": null
},
{
"id": "17890455987654321",
"caption": "Behind the scenes",
"media_type": "VIDEO",
"permalink": "https://www.instagram.com/reel/DEF456/",
"timestamp": "2025-06-14T15:00:00+0000",
"thumbnail_url": "https://scontent.xx.fbcdn.net/..."
},
{
"id": "17890455111222333",
"caption": "Photo dump",
"media_type": "CAROUSEL_ALBUM",
"permalink": "https://www.instagram.com/p/GHI789/",
"timestamp": "2025-06-13T09:00:00+0000",
"thumbnail_url": null
}
]
}
- 400 Bad Request
{
"success": false,
"error": "Platform parameter is required"
}
- 500 Internal Server Error
{
"success": false,
"error": "An internal server error occurred."
}
Media Types
| Type | Description |
|---|---|
IMAGE | Single photo post |
VIDEO | Video post or reel |
CAROUSEL_ALBUM | Multi-image/video carousel post |
Common Use Cases
- Post selector UI: Display the user's recent posts so they can pick one for comment monitoring or AutoDMs.
- Get media IDs: Use the
idfield from the response as thepost_idparameter in the Comments endpoint. - Content overview: Show a dashboard of recent content with permalinks and captions.