Upload Media
Upload media files (e.g., images, videos) for a specific brand to obtain encrypted media IDs.
Use this API before creating a new social media post to get media IDs for platforms like FACEBOOK, INSTAGRAM, LINKEDIN, YOUTUBE, or GOOGLEMYBUSINESS.
- Method: POST
- Endpoint:
/api/api-services/v1/brand-service/upload-media
- Returns: List of encrypted media IDs for the uploaded files
Upload Media
POST https://app.brand2social.com/api/api-services/v1/brand-service/upload-media
Form Field / Header | Type | Required | Description |
---|---|---|---|
Authorization | string (header) | Yes | Bearer token for authentication |
brand_id | int64 (form field) | Yes | ID of the brand |
fileupload | file (form field) | Yes | One or more media files to upload (e.g., images, videos) |
curl --location 'https://app.brand2social.com/api/api-services/v1/brand-service/upload-media' \
--header 'Authorization: Bearer B2S_dummyToken' \
--form 'brand_id="123"' \
--form 'fileupload=@"path/to/image.jpg"' \
--form 'fileupload=@"path/to/video.mp4"'
Response
{
"status": "SUCCESS",
"http_code": 200,
"message": "Media uploaded successfully",
"data": {
"media_ids": [
"encrypted_media_id_1",
"encrypted_media_id_2"
]
}
}