curl --request PUT \
--url https://library-backend.dashsocial.com/brands/{brand_id}/media/v2 \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"filters": {
"brand_media_types": [
"INSTAGRAM_OWNED"
],
"source_created_at": {
"end": "2020-12-31",
"start": "2020-01-01"
},
"instagram": {
"caption_keywords": {
"contain": [
"<string>"
],
"not_contain": [
"<string>"
]
},
"features_account": "_flapjackie",
"is_boosted": true,
"post_type": "REEL",
"post_types": [
"REEL"
]
},
"instagram_story_frame": {
"caption_keywords": {
"contain": [
"<string>"
],
"not_contain": [
"<string>"
]
},
"contain_swipe_up_link": true
},
"instagram_ugc": {
"is_riq": true,
"post_types": [
"REEL"
],
"ugc_media_type": "MENTIONED"
},
"instagram_story_ugc": {
"is_riq": true,
"post_types": [
"REEL"
],
"ugc_media_type": "MENTIONED"
},
"facebook": {
"caption_keywords": {
"contain": [
"<string>"
],
"not_contain": [
"<string>"
]
},
"is_boosted": true,
"post_types": [
"VIDEO"
]
},
"tiktok": {
"caption_keywords": {
"contain": [
"<string>"
],
"not_contain": [
"<string>"
]
},
"distribution_type": "ORGANIC",
"media_type": [
"VIDEO"
]
},
"tiktok_ugc": {
"is_hashtag": true
},
"tiktok_ad": {
"source_campaign_ids": [
"123"
]
},
"pinterest": {
"is_video": true,
"pin_board_privacy": "public",
"post_types": [
"video"
]
},
"twitter": {
"caption_keywords": {
"contain": [
"<string>"
],
"not_contain": [
"<string>"
]
},
"is_dark_post": true,
"post_types": [
"VIDEO"
]
},
"youtube": {
"caption_keywords": {
"contain": [
"<string>"
],
"not_contain": [
"<string>"
]
},
"post_types": [
"LIVE"
],
"privacy_status": [
"PRIVATE"
]
},
"linkedin": {
"caption_keywords": {
"contain": [
"<string>"
],
"not_contain": [
"<string>"
]
},
"post_types": [
"IMAGE",
"VIDEO"
]
},
"threads": {
"caption_keywords": {
"contain": [
"<string>"
],
"not_contain": [
"<string>"
]
},
"post_types": [
"IMAGE",
"VIDEO"
]
},
"snapchat": {
"asset_types": [
"STORY",
"SAVED_STORY",
"SPOTLIGHT",
"SNAP"
],
"caption_keywords": {
"contain": [
"<string>"
],
"not_contain": [
"<string>"
]
},
"parent_story_source_id": "ac234340-eb80-5439-9906-8672bb73075c"
},
"content_tags": [
"Tag 1",
"Tag 2"
],
"content_tag_match_type": "ANY",
"ai_generated": {
"media_types": [
"IMAGE"
]
},
"boards": [
1234,
4567
],
"brand_ids": [
144,
1
],
"campaign_ids": [
1234,
4567
],
"campaigns": [
123,
456
],
"campaigns_post_type": "VIDEO",
"caption_is_negative": true,
"caption_is_neutral": true,
"caption_is_positive": true,
"caption_is_question": true,
"color": "red",
"colors": [
"red"
],
"comments_are_negative": true,
"comments_are_neutral": true,
"comments_are_positive": true,
"content_rights_requested_by": "12345",
"content_rights_requested_date": {
"end": "2020-12-31",
"start": "2020-01-01"
},
"content_rights_type": [
"APPROVED",
"REQUESTED"
],
"excluded_channels": [],
"excluded_media_ids": [
1234,
4567
],
"galleries": [
1234,
4567
],
"image_data": "data:image/jpeg;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",
"include_disconnected_story_ugc": true,
"indication_filter": {
"indications": [
"<string>"
],
"operator": "AND"
},
"media_id": 123,
"media_types": [
"VIDEO"
],
"prediction": {
"max": 0.85,
"min": 0.5
},
"ratio": "SQUARE",
"ratios": [
"SQUARE"
],
"rights_approved": true,
"scope_platform_filters": true,
"search_term": "<string>",
"search_terms": true,
"size": "800x600",
"source_account_ids": [
"123456789",
"987654321"
],
"source_ids": [
"1234",
"4567"
],
"uploads": {
"media_types": [
"VIDEO"
]
}
},
"limit": 100,
"offset": 0,
"sort_fields": [
"-DATE",
"-INSTAGRAM_TOTAL_ENGAGEMENTS"
],
"sort": "-DATE",
"ids": [
1234,
4567
],
"include_creator": false,
"include_instagram_users": true,
"collapse_field": "source_id",
"campaign_creator_filters_options": {
"only_excluded_media": false,
"show_excluded_media": false
}
}
'import requests
url = "https://library-backend.dashsocial.com/brands/{brand_id}/media/v2"
payload = {
"filters": {
"brand_media_types": ["INSTAGRAM_OWNED"],
"source_created_at": {
"end": "2020-12-31",
"start": "2020-01-01"
},
"instagram": {
"caption_keywords": {
"contain": ["<string>"],
"not_contain": ["<string>"]
},
"features_account": "_flapjackie",
"is_boosted": True,
"post_type": "REEL",
"post_types": ["REEL"]
},
"instagram_story_frame": {
"caption_keywords": {
"contain": ["<string>"],
"not_contain": ["<string>"]
},
"contain_swipe_up_link": True
},
"instagram_ugc": {
"is_riq": True,
"post_types": ["REEL"],
"ugc_media_type": "MENTIONED"
},
"instagram_story_ugc": {
"is_riq": True,
"post_types": ["REEL"],
"ugc_media_type": "MENTIONED"
},
"facebook": {
"caption_keywords": {
"contain": ["<string>"],
"not_contain": ["<string>"]
},
"is_boosted": True,
"post_types": ["VIDEO"]
},
"tiktok": {
"caption_keywords": {
"contain": ["<string>"],
"not_contain": ["<string>"]
},
"distribution_type": "ORGANIC",
"media_type": ["VIDEO"]
},
"tiktok_ugc": { "is_hashtag": True },
"tiktok_ad": { "source_campaign_ids": ["123"] },
"pinterest": {
"is_video": True,
"pin_board_privacy": "public",
"post_types": ["video"]
},
"twitter": {
"caption_keywords": {
"contain": ["<string>"],
"not_contain": ["<string>"]
},
"is_dark_post": True,
"post_types": ["VIDEO"]
},
"youtube": {
"caption_keywords": {
"contain": ["<string>"],
"not_contain": ["<string>"]
},
"post_types": ["LIVE"],
"privacy_status": ["PRIVATE"]
},
"linkedin": {
"caption_keywords": {
"contain": ["<string>"],
"not_contain": ["<string>"]
},
"post_types": ["IMAGE", "VIDEO"]
},
"threads": {
"caption_keywords": {
"contain": ["<string>"],
"not_contain": ["<string>"]
},
"post_types": ["IMAGE", "VIDEO"]
},
"snapchat": {
"asset_types": ["STORY", "SAVED_STORY", "SPOTLIGHT", "SNAP"],
"caption_keywords": {
"contain": ["<string>"],
"not_contain": ["<string>"]
},
"parent_story_source_id": "ac234340-eb80-5439-9906-8672bb73075c"
},
"content_tags": ["Tag 1", "Tag 2"],
"content_tag_match_type": "ANY",
"ai_generated": { "media_types": ["IMAGE"] },
"boards": [1234, 4567],
"brand_ids": [144, 1],
"campaign_ids": [1234, 4567],
"campaigns": [123, 456],
"campaigns_post_type": "VIDEO",
"caption_is_negative": True,
"caption_is_neutral": True,
"caption_is_positive": True,
"caption_is_question": True,
"color": "red",
"colors": ["red"],
"comments_are_negative": True,
"comments_are_neutral": True,
"comments_are_positive": True,
"content_rights_requested_by": "12345",
"content_rights_requested_date": {
"end": "2020-12-31",
"start": "2020-01-01"
},
"content_rights_type": ["APPROVED", "REQUESTED"],
"excluded_channels": [],
"excluded_media_ids": [1234, 4567],
"galleries": [1234, 4567],
"image_data": "data:image/jpeg;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",
"include_disconnected_story_ugc": True,
"indication_filter": {
"indications": ["<string>"],
"operator": "AND"
},
"media_id": 123,
"media_types": ["VIDEO"],
"prediction": {
"max": 0.85,
"min": 0.5
},
"ratio": "SQUARE",
"ratios": ["SQUARE"],
"rights_approved": True,
"scope_platform_filters": True,
"search_term": "<string>",
"search_terms": True,
"size": "800x600",
"source_account_ids": ["123456789", "987654321"],
"source_ids": ["1234", "4567"],
"uploads": { "media_types": ["VIDEO"] }
},
"limit": 100,
"offset": 0,
"sort_fields": ["-DATE", "-INSTAGRAM_TOTAL_ENGAGEMENTS"],
"sort": "-DATE",
"ids": [1234, 4567],
"include_creator": False,
"include_instagram_users": True,
"collapse_field": "source_id",
"campaign_creator_filters_options": {
"only_excluded_media": False,
"show_excluded_media": False
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
filters: {
brand_media_types: ['INSTAGRAM_OWNED'],
source_created_at: {end: '2020-12-31', start: '2020-01-01'},
instagram: {
caption_keywords: {contain: ['<string>'], not_contain: ['<string>']},
features_account: '_flapjackie',
is_boosted: true,
post_type: 'REEL',
post_types: ['REEL']
},
instagram_story_frame: {
caption_keywords: {contain: ['<string>'], not_contain: ['<string>']},
contain_swipe_up_link: true
},
instagram_ugc: {is_riq: true, post_types: ['REEL'], ugc_media_type: 'MENTIONED'},
instagram_story_ugc: {is_riq: true, post_types: ['REEL'], ugc_media_type: 'MENTIONED'},
facebook: {
caption_keywords: {contain: ['<string>'], not_contain: ['<string>']},
is_boosted: true,
post_types: ['VIDEO']
},
tiktok: {
caption_keywords: {contain: ['<string>'], not_contain: ['<string>']},
distribution_type: 'ORGANIC',
media_type: ['VIDEO']
},
tiktok_ugc: {is_hashtag: true},
tiktok_ad: {source_campaign_ids: ['123']},
pinterest: {is_video: true, pin_board_privacy: 'public', post_types: ['video']},
twitter: {
caption_keywords: {contain: ['<string>'], not_contain: ['<string>']},
is_dark_post: true,
post_types: ['VIDEO']
},
youtube: {
caption_keywords: {contain: ['<string>'], not_contain: ['<string>']},
post_types: ['LIVE'],
privacy_status: ['PRIVATE']
},
linkedin: {
caption_keywords: {contain: ['<string>'], not_contain: ['<string>']},
post_types: ['IMAGE', 'VIDEO']
},
threads: {
caption_keywords: {contain: ['<string>'], not_contain: ['<string>']},
post_types: ['IMAGE', 'VIDEO']
},
snapchat: {
asset_types: ['STORY', 'SAVED_STORY', 'SPOTLIGHT', 'SNAP'],
caption_keywords: {contain: ['<string>'], not_contain: ['<string>']},
parent_story_source_id: 'ac234340-eb80-5439-9906-8672bb73075c'
},
content_tags: ['Tag 1', 'Tag 2'],
content_tag_match_type: 'ANY',
ai_generated: {media_types: ['IMAGE']},
boards: [1234, 4567],
brand_ids: [144, 1],
campaign_ids: [1234, 4567],
campaigns: [123, 456],
campaigns_post_type: 'VIDEO',
caption_is_negative: true,
caption_is_neutral: true,
caption_is_positive: true,
caption_is_question: true,
color: 'red',
colors: ['red'],
comments_are_negative: true,
comments_are_neutral: true,
comments_are_positive: true,
content_rights_requested_by: '12345',
content_rights_requested_date: {end: '2020-12-31', start: '2020-01-01'},
content_rights_type: ['APPROVED', 'REQUESTED'],
excluded_channels: [],
excluded_media_ids: [1234, 4567],
galleries: [1234, 4567],
image_data: 'data:image/jpeg;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7',
include_disconnected_story_ugc: true,
indication_filter: {indications: ['<string>'], operator: 'AND'},
media_id: 123,
media_types: ['VIDEO'],
prediction: {max: 0.85, min: 0.5},
ratio: 'SQUARE',
ratios: ['SQUARE'],
rights_approved: true,
scope_platform_filters: true,
search_term: '<string>',
search_terms: true,
size: '800x600',
source_account_ids: ['123456789', '987654321'],
source_ids: ['1234', '4567'],
uploads: {media_types: ['VIDEO']}
},
limit: 100,
offset: 0,
sort_fields: ['-DATE', '-INSTAGRAM_TOTAL_ENGAGEMENTS'],
sort: '-DATE',
ids: [1234, 4567],
include_creator: false,
include_instagram_users: true,
collapse_field: 'source_id',
campaign_creator_filters_options: {only_excluded_media: false, show_excluded_media: false}
})
};
fetch('https://library-backend.dashsocial.com/brands/{brand_id}/media/v2', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://library-backend.dashsocial.com/brands/{brand_id}/media/v2",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'filters' => [
'brand_media_types' => [
'INSTAGRAM_OWNED'
],
'source_created_at' => [
'end' => '2020-12-31',
'start' => '2020-01-01'
],
'instagram' => [
'caption_keywords' => [
'contain' => [
'<string>'
],
'not_contain' => [
'<string>'
]
],
'features_account' => '_flapjackie',
'is_boosted' => true,
'post_type' => 'REEL',
'post_types' => [
'REEL'
]
],
'instagram_story_frame' => [
'caption_keywords' => [
'contain' => [
'<string>'
],
'not_contain' => [
'<string>'
]
],
'contain_swipe_up_link' => true
],
'instagram_ugc' => [
'is_riq' => true,
'post_types' => [
'REEL'
],
'ugc_media_type' => 'MENTIONED'
],
'instagram_story_ugc' => [
'is_riq' => true,
'post_types' => [
'REEL'
],
'ugc_media_type' => 'MENTIONED'
],
'facebook' => [
'caption_keywords' => [
'contain' => [
'<string>'
],
'not_contain' => [
'<string>'
]
],
'is_boosted' => true,
'post_types' => [
'VIDEO'
]
],
'tiktok' => [
'caption_keywords' => [
'contain' => [
'<string>'
],
'not_contain' => [
'<string>'
]
],
'distribution_type' => 'ORGANIC',
'media_type' => [
'VIDEO'
]
],
'tiktok_ugc' => [
'is_hashtag' => true
],
'tiktok_ad' => [
'source_campaign_ids' => [
'123'
]
],
'pinterest' => [
'is_video' => true,
'pin_board_privacy' => 'public',
'post_types' => [
'video'
]
],
'twitter' => [
'caption_keywords' => [
'contain' => [
'<string>'
],
'not_contain' => [
'<string>'
]
],
'is_dark_post' => true,
'post_types' => [
'VIDEO'
]
],
'youtube' => [
'caption_keywords' => [
'contain' => [
'<string>'
],
'not_contain' => [
'<string>'
]
],
'post_types' => [
'LIVE'
],
'privacy_status' => [
'PRIVATE'
]
],
'linkedin' => [
'caption_keywords' => [
'contain' => [
'<string>'
],
'not_contain' => [
'<string>'
]
],
'post_types' => [
'IMAGE',
'VIDEO'
]
],
'threads' => [
'caption_keywords' => [
'contain' => [
'<string>'
],
'not_contain' => [
'<string>'
]
],
'post_types' => [
'IMAGE',
'VIDEO'
]
],
'snapchat' => [
'asset_types' => [
'STORY',
'SAVED_STORY',
'SPOTLIGHT',
'SNAP'
],
'caption_keywords' => [
'contain' => [
'<string>'
],
'not_contain' => [
'<string>'
]
],
'parent_story_source_id' => 'ac234340-eb80-5439-9906-8672bb73075c'
],
'content_tags' => [
'Tag 1',
'Tag 2'
],
'content_tag_match_type' => 'ANY',
'ai_generated' => [
'media_types' => [
'IMAGE'
]
],
'boards' => [
1234,
4567
],
'brand_ids' => [
144,
1
],
'campaign_ids' => [
1234,
4567
],
'campaigns' => [
123,
456
],
'campaigns_post_type' => 'VIDEO',
'caption_is_negative' => true,
'caption_is_neutral' => true,
'caption_is_positive' => true,
'caption_is_question' => true,
'color' => 'red',
'colors' => [
'red'
],
'comments_are_negative' => true,
'comments_are_neutral' => true,
'comments_are_positive' => true,
'content_rights_requested_by' => '12345',
'content_rights_requested_date' => [
'end' => '2020-12-31',
'start' => '2020-01-01'
],
'content_rights_type' => [
'APPROVED',
'REQUESTED'
],
'excluded_channels' => [
],
'excluded_media_ids' => [
1234,
4567
],
'galleries' => [
1234,
4567
],
'image_data' => 'data:image/jpeg;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7',
'include_disconnected_story_ugc' => true,
'indication_filter' => [
'indications' => [
'<string>'
],
'operator' => 'AND'
],
'media_id' => 123,
'media_types' => [
'VIDEO'
],
'prediction' => [
'max' => 0.85,
'min' => 0.5
],
'ratio' => 'SQUARE',
'ratios' => [
'SQUARE'
],
'rights_approved' => true,
'scope_platform_filters' => true,
'search_term' => '<string>',
'search_terms' => true,
'size' => '800x600',
'source_account_ids' => [
'123456789',
'987654321'
],
'source_ids' => [
'1234',
'4567'
],
'uploads' => [
'media_types' => [
'VIDEO'
]
]
],
'limit' => 100,
'offset' => 0,
'sort_fields' => [
'-DATE',
'-INSTAGRAM_TOTAL_ENGAGEMENTS'
],
'sort' => '-DATE',
'ids' => [
1234,
4567
],
'include_creator' => false,
'include_instagram_users' => true,
'collapse_field' => 'source_id',
'campaign_creator_filters_options' => [
'only_excluded_media' => false,
'show_excluded_media' => false
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://library-backend.dashsocial.com/brands/{brand_id}/media/v2"
payload := strings.NewReader("{\n \"filters\": {\n \"brand_media_types\": [\n \"INSTAGRAM_OWNED\"\n ],\n \"source_created_at\": {\n \"end\": \"2020-12-31\",\n \"start\": \"2020-01-01\"\n },\n \"instagram\": {\n \"caption_keywords\": {\n \"contain\": [\n \"<string>\"\n ],\n \"not_contain\": [\n \"<string>\"\n ]\n },\n \"features_account\": \"_flapjackie\",\n \"is_boosted\": true,\n \"post_type\": \"REEL\",\n \"post_types\": [\n \"REEL\"\n ]\n },\n \"instagram_story_frame\": {\n \"caption_keywords\": {\n \"contain\": [\n \"<string>\"\n ],\n \"not_contain\": [\n \"<string>\"\n ]\n },\n \"contain_swipe_up_link\": true\n },\n \"instagram_ugc\": {\n \"is_riq\": true,\n \"post_types\": [\n \"REEL\"\n ],\n \"ugc_media_type\": \"MENTIONED\"\n },\n \"instagram_story_ugc\": {\n \"is_riq\": true,\n \"post_types\": [\n \"REEL\"\n ],\n \"ugc_media_type\": \"MENTIONED\"\n },\n \"facebook\": {\n \"caption_keywords\": {\n \"contain\": [\n \"<string>\"\n ],\n \"not_contain\": [\n \"<string>\"\n ]\n },\n \"is_boosted\": true,\n \"post_types\": [\n \"VIDEO\"\n ]\n },\n \"tiktok\": {\n \"caption_keywords\": {\n \"contain\": [\n \"<string>\"\n ],\n \"not_contain\": [\n \"<string>\"\n ]\n },\n \"distribution_type\": \"ORGANIC\",\n \"media_type\": [\n \"VIDEO\"\n ]\n },\n \"tiktok_ugc\": {\n \"is_hashtag\": true\n },\n \"tiktok_ad\": {\n \"source_campaign_ids\": [\n \"123\"\n ]\n },\n \"pinterest\": {\n \"is_video\": true,\n \"pin_board_privacy\": \"public\",\n \"post_types\": [\n \"video\"\n ]\n },\n \"twitter\": {\n \"caption_keywords\": {\n \"contain\": [\n \"<string>\"\n ],\n \"not_contain\": [\n \"<string>\"\n ]\n },\n \"is_dark_post\": true,\n \"post_types\": [\n \"VIDEO\"\n ]\n },\n \"youtube\": {\n \"caption_keywords\": {\n \"contain\": [\n \"<string>\"\n ],\n \"not_contain\": [\n \"<string>\"\n ]\n },\n \"post_types\": [\n \"LIVE\"\n ],\n \"privacy_status\": [\n \"PRIVATE\"\n ]\n },\n \"linkedin\": {\n \"caption_keywords\": {\n \"contain\": [\n \"<string>\"\n ],\n \"not_contain\": [\n \"<string>\"\n ]\n },\n \"post_types\": [\n \"IMAGE\",\n \"VIDEO\"\n ]\n },\n \"threads\": {\n \"caption_keywords\": {\n \"contain\": [\n \"<string>\"\n ],\n \"not_contain\": [\n \"<string>\"\n ]\n },\n \"post_types\": [\n \"IMAGE\",\n \"VIDEO\"\n ]\n },\n \"snapchat\": {\n \"asset_types\": [\n \"STORY\",\n \"SAVED_STORY\",\n \"SPOTLIGHT\",\n \"SNAP\"\n ],\n \"caption_keywords\": {\n \"contain\": [\n \"<string>\"\n ],\n \"not_contain\": [\n \"<string>\"\n ]\n },\n \"parent_story_source_id\": \"ac234340-eb80-5439-9906-8672bb73075c\"\n },\n \"content_tags\": [\n \"Tag 1\",\n \"Tag 2\"\n ],\n \"content_tag_match_type\": \"ANY\",\n \"ai_generated\": {\n \"media_types\": [\n \"IMAGE\"\n ]\n },\n \"boards\": [\n 1234,\n 4567\n ],\n \"brand_ids\": [\n 144,\n 1\n ],\n \"campaign_ids\": [\n 1234,\n 4567\n ],\n \"campaigns\": [\n 123,\n 456\n ],\n \"campaigns_post_type\": \"VIDEO\",\n \"caption_is_negative\": true,\n \"caption_is_neutral\": true,\n \"caption_is_positive\": true,\n \"caption_is_question\": true,\n \"color\": \"red\",\n \"colors\": [\n \"red\"\n ],\n \"comments_are_negative\": true,\n \"comments_are_neutral\": true,\n \"comments_are_positive\": true,\n \"content_rights_requested_by\": \"12345\",\n \"content_rights_requested_date\": {\n \"end\": \"2020-12-31\",\n \"start\": \"2020-01-01\"\n },\n \"content_rights_type\": [\n \"APPROVED\",\n \"REQUESTED\"\n ],\n \"excluded_channels\": [],\n \"excluded_media_ids\": [\n 1234,\n 4567\n ],\n \"galleries\": [\n 1234,\n 4567\n ],\n \"image_data\": \"data:image/jpeg;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7\",\n \"include_disconnected_story_ugc\": true,\n \"indication_filter\": {\n \"indications\": [\n \"<string>\"\n ],\n \"operator\": \"AND\"\n },\n \"media_id\": 123,\n \"media_types\": [\n \"VIDEO\"\n ],\n \"prediction\": {\n \"max\": 0.85,\n \"min\": 0.5\n },\n \"ratio\": \"SQUARE\",\n \"ratios\": [\n \"SQUARE\"\n ],\n \"rights_approved\": true,\n \"scope_platform_filters\": true,\n \"search_term\": \"<string>\",\n \"search_terms\": true,\n \"size\": \"800x600\",\n \"source_account_ids\": [\n \"123456789\",\n \"987654321\"\n ],\n \"source_ids\": [\n \"1234\",\n \"4567\"\n ],\n \"uploads\": {\n \"media_types\": [\n \"VIDEO\"\n ]\n }\n },\n \"limit\": 100,\n \"offset\": 0,\n \"sort_fields\": [\n \"-DATE\",\n \"-INSTAGRAM_TOTAL_ENGAGEMENTS\"\n ],\n \"sort\": \"-DATE\",\n \"ids\": [\n 1234,\n 4567\n ],\n \"include_creator\": false,\n \"include_instagram_users\": true,\n \"collapse_field\": \"source_id\",\n \"campaign_creator_filters_options\": {\n \"only_excluded_media\": false,\n \"show_excluded_media\": false\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://library-backend.dashsocial.com/brands/{brand_id}/media/v2")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"filters\": {\n \"brand_media_types\": [\n \"INSTAGRAM_OWNED\"\n ],\n \"source_created_at\": {\n \"end\": \"2020-12-31\",\n \"start\": \"2020-01-01\"\n },\n \"instagram\": {\n \"caption_keywords\": {\n \"contain\": [\n \"<string>\"\n ],\n \"not_contain\": [\n \"<string>\"\n ]\n },\n \"features_account\": \"_flapjackie\",\n \"is_boosted\": true,\n \"post_type\": \"REEL\",\n \"post_types\": [\n \"REEL\"\n ]\n },\n \"instagram_story_frame\": {\n \"caption_keywords\": {\n \"contain\": [\n \"<string>\"\n ],\n \"not_contain\": [\n \"<string>\"\n ]\n },\n \"contain_swipe_up_link\": true\n },\n \"instagram_ugc\": {\n \"is_riq\": true,\n \"post_types\": [\n \"REEL\"\n ],\n \"ugc_media_type\": \"MENTIONED\"\n },\n \"instagram_story_ugc\": {\n \"is_riq\": true,\n \"post_types\": [\n \"REEL\"\n ],\n \"ugc_media_type\": \"MENTIONED\"\n },\n \"facebook\": {\n \"caption_keywords\": {\n \"contain\": [\n \"<string>\"\n ],\n \"not_contain\": [\n \"<string>\"\n ]\n },\n \"is_boosted\": true,\n \"post_types\": [\n \"VIDEO\"\n ]\n },\n \"tiktok\": {\n \"caption_keywords\": {\n \"contain\": [\n \"<string>\"\n ],\n \"not_contain\": [\n \"<string>\"\n ]\n },\n \"distribution_type\": \"ORGANIC\",\n \"media_type\": [\n \"VIDEO\"\n ]\n },\n \"tiktok_ugc\": {\n \"is_hashtag\": true\n },\n \"tiktok_ad\": {\n \"source_campaign_ids\": [\n \"123\"\n ]\n },\n \"pinterest\": {\n \"is_video\": true,\n \"pin_board_privacy\": \"public\",\n \"post_types\": [\n \"video\"\n ]\n },\n \"twitter\": {\n \"caption_keywords\": {\n \"contain\": [\n \"<string>\"\n ],\n \"not_contain\": [\n \"<string>\"\n ]\n },\n \"is_dark_post\": true,\n \"post_types\": [\n \"VIDEO\"\n ]\n },\n \"youtube\": {\n \"caption_keywords\": {\n \"contain\": [\n \"<string>\"\n ],\n \"not_contain\": [\n \"<string>\"\n ]\n },\n \"post_types\": [\n \"LIVE\"\n ],\n \"privacy_status\": [\n \"PRIVATE\"\n ]\n },\n \"linkedin\": {\n \"caption_keywords\": {\n \"contain\": [\n \"<string>\"\n ],\n \"not_contain\": [\n \"<string>\"\n ]\n },\n \"post_types\": [\n \"IMAGE\",\n \"VIDEO\"\n ]\n },\n \"threads\": {\n \"caption_keywords\": {\n \"contain\": [\n \"<string>\"\n ],\n \"not_contain\": [\n \"<string>\"\n ]\n },\n \"post_types\": [\n \"IMAGE\",\n \"VIDEO\"\n ]\n },\n \"snapchat\": {\n \"asset_types\": [\n \"STORY\",\n \"SAVED_STORY\",\n \"SPOTLIGHT\",\n \"SNAP\"\n ],\n \"caption_keywords\": {\n \"contain\": [\n \"<string>\"\n ],\n \"not_contain\": [\n \"<string>\"\n ]\n },\n \"parent_story_source_id\": \"ac234340-eb80-5439-9906-8672bb73075c\"\n },\n \"content_tags\": [\n \"Tag 1\",\n \"Tag 2\"\n ],\n \"content_tag_match_type\": \"ANY\",\n \"ai_generated\": {\n \"media_types\": [\n \"IMAGE\"\n ]\n },\n \"boards\": [\n 1234,\n 4567\n ],\n \"brand_ids\": [\n 144,\n 1\n ],\n \"campaign_ids\": [\n 1234,\n 4567\n ],\n \"campaigns\": [\n 123,\n 456\n ],\n \"campaigns_post_type\": \"VIDEO\",\n \"caption_is_negative\": true,\n \"caption_is_neutral\": true,\n \"caption_is_positive\": true,\n \"caption_is_question\": true,\n \"color\": \"red\",\n \"colors\": [\n \"red\"\n ],\n \"comments_are_negative\": true,\n \"comments_are_neutral\": true,\n \"comments_are_positive\": true,\n \"content_rights_requested_by\": \"12345\",\n \"content_rights_requested_date\": {\n \"end\": \"2020-12-31\",\n \"start\": \"2020-01-01\"\n },\n \"content_rights_type\": [\n \"APPROVED\",\n \"REQUESTED\"\n ],\n \"excluded_channels\": [],\n \"excluded_media_ids\": [\n 1234,\n 4567\n ],\n \"galleries\": [\n 1234,\n 4567\n ],\n \"image_data\": \"data:image/jpeg;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7\",\n \"include_disconnected_story_ugc\": true,\n \"indication_filter\": {\n \"indications\": [\n \"<string>\"\n ],\n \"operator\": \"AND\"\n },\n \"media_id\": 123,\n \"media_types\": [\n \"VIDEO\"\n ],\n \"prediction\": {\n \"max\": 0.85,\n \"min\": 0.5\n },\n \"ratio\": \"SQUARE\",\n \"ratios\": [\n \"SQUARE\"\n ],\n \"rights_approved\": true,\n \"scope_platform_filters\": true,\n \"search_term\": \"<string>\",\n \"search_terms\": true,\n \"size\": \"800x600\",\n \"source_account_ids\": [\n \"123456789\",\n \"987654321\"\n ],\n \"source_ids\": [\n \"1234\",\n \"4567\"\n ],\n \"uploads\": {\n \"media_types\": [\n \"VIDEO\"\n ]\n }\n },\n \"limit\": 100,\n \"offset\": 0,\n \"sort_fields\": [\n \"-DATE\",\n \"-INSTAGRAM_TOTAL_ENGAGEMENTS\"\n ],\n \"sort\": \"-DATE\",\n \"ids\": [\n 1234,\n 4567\n ],\n \"include_creator\": false,\n \"include_instagram_users\": true,\n \"collapse_field\": \"source_id\",\n \"campaign_creator_filters_options\": {\n \"only_excluded_media\": false,\n \"show_excluded_media\": false\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://library-backend.dashsocial.com/brands/{brand_id}/media/v2")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"filters\": {\n \"brand_media_types\": [\n \"INSTAGRAM_OWNED\"\n ],\n \"source_created_at\": {\n \"end\": \"2020-12-31\",\n \"start\": \"2020-01-01\"\n },\n \"instagram\": {\n \"caption_keywords\": {\n \"contain\": [\n \"<string>\"\n ],\n \"not_contain\": [\n \"<string>\"\n ]\n },\n \"features_account\": \"_flapjackie\",\n \"is_boosted\": true,\n \"post_type\": \"REEL\",\n \"post_types\": [\n \"REEL\"\n ]\n },\n \"instagram_story_frame\": {\n \"caption_keywords\": {\n \"contain\": [\n \"<string>\"\n ],\n \"not_contain\": [\n \"<string>\"\n ]\n },\n \"contain_swipe_up_link\": true\n },\n \"instagram_ugc\": {\n \"is_riq\": true,\n \"post_types\": [\n \"REEL\"\n ],\n \"ugc_media_type\": \"MENTIONED\"\n },\n \"instagram_story_ugc\": {\n \"is_riq\": true,\n \"post_types\": [\n \"REEL\"\n ],\n \"ugc_media_type\": \"MENTIONED\"\n },\n \"facebook\": {\n \"caption_keywords\": {\n \"contain\": [\n \"<string>\"\n ],\n \"not_contain\": [\n \"<string>\"\n ]\n },\n \"is_boosted\": true,\n \"post_types\": [\n \"VIDEO\"\n ]\n },\n \"tiktok\": {\n \"caption_keywords\": {\n \"contain\": [\n \"<string>\"\n ],\n \"not_contain\": [\n \"<string>\"\n ]\n },\n \"distribution_type\": \"ORGANIC\",\n \"media_type\": [\n \"VIDEO\"\n ]\n },\n \"tiktok_ugc\": {\n \"is_hashtag\": true\n },\n \"tiktok_ad\": {\n \"source_campaign_ids\": [\n \"123\"\n ]\n },\n \"pinterest\": {\n \"is_video\": true,\n \"pin_board_privacy\": \"public\",\n \"post_types\": [\n \"video\"\n ]\n },\n \"twitter\": {\n \"caption_keywords\": {\n \"contain\": [\n \"<string>\"\n ],\n \"not_contain\": [\n \"<string>\"\n ]\n },\n \"is_dark_post\": true,\n \"post_types\": [\n \"VIDEO\"\n ]\n },\n \"youtube\": {\n \"caption_keywords\": {\n \"contain\": [\n \"<string>\"\n ],\n \"not_contain\": [\n \"<string>\"\n ]\n },\n \"post_types\": [\n \"LIVE\"\n ],\n \"privacy_status\": [\n \"PRIVATE\"\n ]\n },\n \"linkedin\": {\n \"caption_keywords\": {\n \"contain\": [\n \"<string>\"\n ],\n \"not_contain\": [\n \"<string>\"\n ]\n },\n \"post_types\": [\n \"IMAGE\",\n \"VIDEO\"\n ]\n },\n \"threads\": {\n \"caption_keywords\": {\n \"contain\": [\n \"<string>\"\n ],\n \"not_contain\": [\n \"<string>\"\n ]\n },\n \"post_types\": [\n \"IMAGE\",\n \"VIDEO\"\n ]\n },\n \"snapchat\": {\n \"asset_types\": [\n \"STORY\",\n \"SAVED_STORY\",\n \"SPOTLIGHT\",\n \"SNAP\"\n ],\n \"caption_keywords\": {\n \"contain\": [\n \"<string>\"\n ],\n \"not_contain\": [\n \"<string>\"\n ]\n },\n \"parent_story_source_id\": \"ac234340-eb80-5439-9906-8672bb73075c\"\n },\n \"content_tags\": [\n \"Tag 1\",\n \"Tag 2\"\n ],\n \"content_tag_match_type\": \"ANY\",\n \"ai_generated\": {\n \"media_types\": [\n \"IMAGE\"\n ]\n },\n \"boards\": [\n 1234,\n 4567\n ],\n \"brand_ids\": [\n 144,\n 1\n ],\n \"campaign_ids\": [\n 1234,\n 4567\n ],\n \"campaigns\": [\n 123,\n 456\n ],\n \"campaigns_post_type\": \"VIDEO\",\n \"caption_is_negative\": true,\n \"caption_is_neutral\": true,\n \"caption_is_positive\": true,\n \"caption_is_question\": true,\n \"color\": \"red\",\n \"colors\": [\n \"red\"\n ],\n \"comments_are_negative\": true,\n \"comments_are_neutral\": true,\n \"comments_are_positive\": true,\n \"content_rights_requested_by\": \"12345\",\n \"content_rights_requested_date\": {\n \"end\": \"2020-12-31\",\n \"start\": \"2020-01-01\"\n },\n \"content_rights_type\": [\n \"APPROVED\",\n \"REQUESTED\"\n ],\n \"excluded_channels\": [],\n \"excluded_media_ids\": [\n 1234,\n 4567\n ],\n \"galleries\": [\n 1234,\n 4567\n ],\n \"image_data\": \"data:image/jpeg;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7\",\n \"include_disconnected_story_ugc\": true,\n \"indication_filter\": {\n \"indications\": [\n \"<string>\"\n ],\n \"operator\": \"AND\"\n },\n \"media_id\": 123,\n \"media_types\": [\n \"VIDEO\"\n ],\n \"prediction\": {\n \"max\": 0.85,\n \"min\": 0.5\n },\n \"ratio\": \"SQUARE\",\n \"ratios\": [\n \"SQUARE\"\n ],\n \"rights_approved\": true,\n \"scope_platform_filters\": true,\n \"search_term\": \"<string>\",\n \"search_terms\": true,\n \"size\": \"800x600\",\n \"source_account_ids\": [\n \"123456789\",\n \"987654321\"\n ],\n \"source_ids\": [\n \"1234\",\n \"4567\"\n ],\n \"uploads\": {\n \"media_types\": [\n \"VIDEO\"\n ]\n }\n },\n \"limit\": 100,\n \"offset\": 0,\n \"sort_fields\": [\n \"-DATE\",\n \"-INSTAGRAM_TOTAL_ENGAGEMENTS\"\n ],\n \"sort\": \"-DATE\",\n \"ids\": [\n 1234,\n 4567\n ],\n \"include_creator\": false,\n \"include_instagram_users\": true,\n \"collapse_field\": \"source_id\",\n \"campaign_creator_filters_options\": {\n \"only_excluded_media\": false,\n \"show_excluded_media\": false\n }\n}"
response = http.request(request)
puts response.read_body{
"data": [
{
"brand_id": 123,
"brand_media_id": 123,
"brand_media_status": "<string>",
"callback_socket_id": "<string>",
"can_publish_within": {
"end": "<string>",
"start": "<string>"
},
"caption_question": {
"is_question": true,
"user_overridden": true
},
"caption_sentiment": {
"is_negative": true,
"is_neutral": true,
"is_positive": true,
"user_overridden": true
},
"collections": {},
"comment_sentiment": {
"is_negative": true,
"is_neutral": true,
"is_positive": true,
"user_overridden": true
},
"community_engagement": 123,
"content_rights_expiry_date": "2023-11-07T05:31:56Z",
"content_rights_requested_by": "<string>",
"content_rights_requested_date": "2023-11-07T05:31:56Z",
"content_tags": [
"Tag 1",
"Tag 2"
],
"created_at": "2023-11-07T05:31:56Z",
"creator": {
"avatar_url": "<string>",
"handle": "<string>"
},
"custom_metrics": [
{
"aggregation": "<string>",
"description": "<string>",
"formula": "<string>",
"id": 123,
"metric_format": "<string>",
"name": "<string>",
"value": 123
}
],
"facebook": {},
"id": 123,
"image": {
"sizes": {
"original": {
"url": "<string>",
"height": 123,
"size": 123,
"width": 123
},
"medium_square": {
"url": "<string>",
"height": 123,
"size": 123,
"width": 123
},
"original_converted": {
"url": "<string>",
"height": 123,
"size": 123,
"width": 123
},
"small": {
"url": "<string>",
"height": 123,
"size": 123,
"width": 123
},
"small_square": {
"url": "<string>",
"height": 123,
"size": 123,
"width": 123
}
},
"editor_data": {
"aspect_ratio": "<string>",
"canvas_data": {
"height": 123,
"left": 123,
"natural_height": 123,
"natural_width": 123,
"top": 123,
"width": 123
},
"zoom_value": 123
},
"transforms": {
"crop": {
"height": 123,
"width": 123,
"x": 123,
"y": 123
},
"parent_media_id": 123
}
},
"instagram": {},
"instagram_ads": {},
"instagram_story": {},
"instagram_story_frame": {},
"instagram_user": {},
"likeshop": {
"clicks": 123,
"links": "<string>",
"tiktok_clicks": 123
},
"linkedin": {},
"media_group": 123,
"meta": {
"filename": "<string>",
"last_modified_at": "<string>",
"uploaded_by": 123
},
"pinterest": {},
"predictions": {
"ad_engagement": 123,
"conversions": 123,
"engagement": 123,
"link_clicks": 123
},
"snapchat": {},
"source_account_id": "<string>",
"source_created_at": "2023-11-07T05:31:56Z",
"source_id": "<string>",
"threads": {},
"tiktok": {},
"tiktok_ad": {},
"twitter": {},
"updated_at": "2023-11-07T05:31:56Z",
"variants": [],
"video": {
"sizes": {
"original": {
"url": "<string>",
"height": 123,
"size": 123,
"width": 123
},
"medium_square": {
"url": "<string>",
"height": 123,
"size": 123,
"width": 123
},
"original_converted": {
"url": "<string>",
"height": 123,
"size": 123,
"width": 123
},
"small": {
"url": "<string>",
"height": 123,
"size": 123,
"width": 123
},
"small_square": {
"url": "<string>",
"height": 123,
"size": 123,
"width": 123
}
},
"duration": 123,
"editor_data": {
"aspect_ratio": "<string>"
},
"frame_rate": 123,
"thumbnails": {
"medium_square": {
"url": "<string>",
"height": 123,
"size": 123,
"width": 123
},
"original": {
"url": "<string>",
"height": 123,
"size": 123,
"width": 123
},
"original_converted": {
"url": "<string>",
"height": 123,
"size": 123,
"width": 123
},
"small": {
"url": "<string>",
"height": 123,
"size": 123,
"width": 123
},
"small_square": {
"url": "<string>",
"height": 123,
"size": 123,
"width": 123
}
},
"transforms": {
"crop": {
"height": 123,
"width": 123,
"x": 123,
"y": 123
},
"disable_audio_track": true,
"parent_media_id": 123,
"trim": {
"end_time": 123,
"start_time": 123
}
},
"video_conversion_warnings": "<unknown>"
},
"video_predictions": {
"engagement": [
123
]
},
"video_predictions_interval_sec": 123,
"video_suggested_thumbnail_list": [
{
"frame_position": 123,
"index": 123,
"predictions": {
"engagement": 123
},
"url": "<string>"
}
],
"visual_features": "<string>",
"youtube": {}
}
],
"paging": {
"count": 123,
"next": "<string>",
"previous": "<string>"
}
}{
"code": 123,
"errors": {},
"message": "<string>",
"status": "<string>"
}{
"code": 123,
"errors": {},
"message": "<string>",
"status": "<string>"
}Retrieve media
Returns a paginated list of media objects for a brand. Filter by platform, date range, media type, and more using the request body.
curl --request PUT \
--url https://library-backend.dashsocial.com/brands/{brand_id}/media/v2 \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"filters": {
"brand_media_types": [
"INSTAGRAM_OWNED"
],
"source_created_at": {
"end": "2020-12-31",
"start": "2020-01-01"
},
"instagram": {
"caption_keywords": {
"contain": [
"<string>"
],
"not_contain": [
"<string>"
]
},
"features_account": "_flapjackie",
"is_boosted": true,
"post_type": "REEL",
"post_types": [
"REEL"
]
},
"instagram_story_frame": {
"caption_keywords": {
"contain": [
"<string>"
],
"not_contain": [
"<string>"
]
},
"contain_swipe_up_link": true
},
"instagram_ugc": {
"is_riq": true,
"post_types": [
"REEL"
],
"ugc_media_type": "MENTIONED"
},
"instagram_story_ugc": {
"is_riq": true,
"post_types": [
"REEL"
],
"ugc_media_type": "MENTIONED"
},
"facebook": {
"caption_keywords": {
"contain": [
"<string>"
],
"not_contain": [
"<string>"
]
},
"is_boosted": true,
"post_types": [
"VIDEO"
]
},
"tiktok": {
"caption_keywords": {
"contain": [
"<string>"
],
"not_contain": [
"<string>"
]
},
"distribution_type": "ORGANIC",
"media_type": [
"VIDEO"
]
},
"tiktok_ugc": {
"is_hashtag": true
},
"tiktok_ad": {
"source_campaign_ids": [
"123"
]
},
"pinterest": {
"is_video": true,
"pin_board_privacy": "public",
"post_types": [
"video"
]
},
"twitter": {
"caption_keywords": {
"contain": [
"<string>"
],
"not_contain": [
"<string>"
]
},
"is_dark_post": true,
"post_types": [
"VIDEO"
]
},
"youtube": {
"caption_keywords": {
"contain": [
"<string>"
],
"not_contain": [
"<string>"
]
},
"post_types": [
"LIVE"
],
"privacy_status": [
"PRIVATE"
]
},
"linkedin": {
"caption_keywords": {
"contain": [
"<string>"
],
"not_contain": [
"<string>"
]
},
"post_types": [
"IMAGE",
"VIDEO"
]
},
"threads": {
"caption_keywords": {
"contain": [
"<string>"
],
"not_contain": [
"<string>"
]
},
"post_types": [
"IMAGE",
"VIDEO"
]
},
"snapchat": {
"asset_types": [
"STORY",
"SAVED_STORY",
"SPOTLIGHT",
"SNAP"
],
"caption_keywords": {
"contain": [
"<string>"
],
"not_contain": [
"<string>"
]
},
"parent_story_source_id": "ac234340-eb80-5439-9906-8672bb73075c"
},
"content_tags": [
"Tag 1",
"Tag 2"
],
"content_tag_match_type": "ANY",
"ai_generated": {
"media_types": [
"IMAGE"
]
},
"boards": [
1234,
4567
],
"brand_ids": [
144,
1
],
"campaign_ids": [
1234,
4567
],
"campaigns": [
123,
456
],
"campaigns_post_type": "VIDEO",
"caption_is_negative": true,
"caption_is_neutral": true,
"caption_is_positive": true,
"caption_is_question": true,
"color": "red",
"colors": [
"red"
],
"comments_are_negative": true,
"comments_are_neutral": true,
"comments_are_positive": true,
"content_rights_requested_by": "12345",
"content_rights_requested_date": {
"end": "2020-12-31",
"start": "2020-01-01"
},
"content_rights_type": [
"APPROVED",
"REQUESTED"
],
"excluded_channels": [],
"excluded_media_ids": [
1234,
4567
],
"galleries": [
1234,
4567
],
"image_data": "data:image/jpeg;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",
"include_disconnected_story_ugc": true,
"indication_filter": {
"indications": [
"<string>"
],
"operator": "AND"
},
"media_id": 123,
"media_types": [
"VIDEO"
],
"prediction": {
"max": 0.85,
"min": 0.5
},
"ratio": "SQUARE",
"ratios": [
"SQUARE"
],
"rights_approved": true,
"scope_platform_filters": true,
"search_term": "<string>",
"search_terms": true,
"size": "800x600",
"source_account_ids": [
"123456789",
"987654321"
],
"source_ids": [
"1234",
"4567"
],
"uploads": {
"media_types": [
"VIDEO"
]
}
},
"limit": 100,
"offset": 0,
"sort_fields": [
"-DATE",
"-INSTAGRAM_TOTAL_ENGAGEMENTS"
],
"sort": "-DATE",
"ids": [
1234,
4567
],
"include_creator": false,
"include_instagram_users": true,
"collapse_field": "source_id",
"campaign_creator_filters_options": {
"only_excluded_media": false,
"show_excluded_media": false
}
}
'import requests
url = "https://library-backend.dashsocial.com/brands/{brand_id}/media/v2"
payload = {
"filters": {
"brand_media_types": ["INSTAGRAM_OWNED"],
"source_created_at": {
"end": "2020-12-31",
"start": "2020-01-01"
},
"instagram": {
"caption_keywords": {
"contain": ["<string>"],
"not_contain": ["<string>"]
},
"features_account": "_flapjackie",
"is_boosted": True,
"post_type": "REEL",
"post_types": ["REEL"]
},
"instagram_story_frame": {
"caption_keywords": {
"contain": ["<string>"],
"not_contain": ["<string>"]
},
"contain_swipe_up_link": True
},
"instagram_ugc": {
"is_riq": True,
"post_types": ["REEL"],
"ugc_media_type": "MENTIONED"
},
"instagram_story_ugc": {
"is_riq": True,
"post_types": ["REEL"],
"ugc_media_type": "MENTIONED"
},
"facebook": {
"caption_keywords": {
"contain": ["<string>"],
"not_contain": ["<string>"]
},
"is_boosted": True,
"post_types": ["VIDEO"]
},
"tiktok": {
"caption_keywords": {
"contain": ["<string>"],
"not_contain": ["<string>"]
},
"distribution_type": "ORGANIC",
"media_type": ["VIDEO"]
},
"tiktok_ugc": { "is_hashtag": True },
"tiktok_ad": { "source_campaign_ids": ["123"] },
"pinterest": {
"is_video": True,
"pin_board_privacy": "public",
"post_types": ["video"]
},
"twitter": {
"caption_keywords": {
"contain": ["<string>"],
"not_contain": ["<string>"]
},
"is_dark_post": True,
"post_types": ["VIDEO"]
},
"youtube": {
"caption_keywords": {
"contain": ["<string>"],
"not_contain": ["<string>"]
},
"post_types": ["LIVE"],
"privacy_status": ["PRIVATE"]
},
"linkedin": {
"caption_keywords": {
"contain": ["<string>"],
"not_contain": ["<string>"]
},
"post_types": ["IMAGE", "VIDEO"]
},
"threads": {
"caption_keywords": {
"contain": ["<string>"],
"not_contain": ["<string>"]
},
"post_types": ["IMAGE", "VIDEO"]
},
"snapchat": {
"asset_types": ["STORY", "SAVED_STORY", "SPOTLIGHT", "SNAP"],
"caption_keywords": {
"contain": ["<string>"],
"not_contain": ["<string>"]
},
"parent_story_source_id": "ac234340-eb80-5439-9906-8672bb73075c"
},
"content_tags": ["Tag 1", "Tag 2"],
"content_tag_match_type": "ANY",
"ai_generated": { "media_types": ["IMAGE"] },
"boards": [1234, 4567],
"brand_ids": [144, 1],
"campaign_ids": [1234, 4567],
"campaigns": [123, 456],
"campaigns_post_type": "VIDEO",
"caption_is_negative": True,
"caption_is_neutral": True,
"caption_is_positive": True,
"caption_is_question": True,
"color": "red",
"colors": ["red"],
"comments_are_negative": True,
"comments_are_neutral": True,
"comments_are_positive": True,
"content_rights_requested_by": "12345",
"content_rights_requested_date": {
"end": "2020-12-31",
"start": "2020-01-01"
},
"content_rights_type": ["APPROVED", "REQUESTED"],
"excluded_channels": [],
"excluded_media_ids": [1234, 4567],
"galleries": [1234, 4567],
"image_data": "data:image/jpeg;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",
"include_disconnected_story_ugc": True,
"indication_filter": {
"indications": ["<string>"],
"operator": "AND"
},
"media_id": 123,
"media_types": ["VIDEO"],
"prediction": {
"max": 0.85,
"min": 0.5
},
"ratio": "SQUARE",
"ratios": ["SQUARE"],
"rights_approved": True,
"scope_platform_filters": True,
"search_term": "<string>",
"search_terms": True,
"size": "800x600",
"source_account_ids": ["123456789", "987654321"],
"source_ids": ["1234", "4567"],
"uploads": { "media_types": ["VIDEO"] }
},
"limit": 100,
"offset": 0,
"sort_fields": ["-DATE", "-INSTAGRAM_TOTAL_ENGAGEMENTS"],
"sort": "-DATE",
"ids": [1234, 4567],
"include_creator": False,
"include_instagram_users": True,
"collapse_field": "source_id",
"campaign_creator_filters_options": {
"only_excluded_media": False,
"show_excluded_media": False
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
filters: {
brand_media_types: ['INSTAGRAM_OWNED'],
source_created_at: {end: '2020-12-31', start: '2020-01-01'},
instagram: {
caption_keywords: {contain: ['<string>'], not_contain: ['<string>']},
features_account: '_flapjackie',
is_boosted: true,
post_type: 'REEL',
post_types: ['REEL']
},
instagram_story_frame: {
caption_keywords: {contain: ['<string>'], not_contain: ['<string>']},
contain_swipe_up_link: true
},
instagram_ugc: {is_riq: true, post_types: ['REEL'], ugc_media_type: 'MENTIONED'},
instagram_story_ugc: {is_riq: true, post_types: ['REEL'], ugc_media_type: 'MENTIONED'},
facebook: {
caption_keywords: {contain: ['<string>'], not_contain: ['<string>']},
is_boosted: true,
post_types: ['VIDEO']
},
tiktok: {
caption_keywords: {contain: ['<string>'], not_contain: ['<string>']},
distribution_type: 'ORGANIC',
media_type: ['VIDEO']
},
tiktok_ugc: {is_hashtag: true},
tiktok_ad: {source_campaign_ids: ['123']},
pinterest: {is_video: true, pin_board_privacy: 'public', post_types: ['video']},
twitter: {
caption_keywords: {contain: ['<string>'], not_contain: ['<string>']},
is_dark_post: true,
post_types: ['VIDEO']
},
youtube: {
caption_keywords: {contain: ['<string>'], not_contain: ['<string>']},
post_types: ['LIVE'],
privacy_status: ['PRIVATE']
},
linkedin: {
caption_keywords: {contain: ['<string>'], not_contain: ['<string>']},
post_types: ['IMAGE', 'VIDEO']
},
threads: {
caption_keywords: {contain: ['<string>'], not_contain: ['<string>']},
post_types: ['IMAGE', 'VIDEO']
},
snapchat: {
asset_types: ['STORY', 'SAVED_STORY', 'SPOTLIGHT', 'SNAP'],
caption_keywords: {contain: ['<string>'], not_contain: ['<string>']},
parent_story_source_id: 'ac234340-eb80-5439-9906-8672bb73075c'
},
content_tags: ['Tag 1', 'Tag 2'],
content_tag_match_type: 'ANY',
ai_generated: {media_types: ['IMAGE']},
boards: [1234, 4567],
brand_ids: [144, 1],
campaign_ids: [1234, 4567],
campaigns: [123, 456],
campaigns_post_type: 'VIDEO',
caption_is_negative: true,
caption_is_neutral: true,
caption_is_positive: true,
caption_is_question: true,
color: 'red',
colors: ['red'],
comments_are_negative: true,
comments_are_neutral: true,
comments_are_positive: true,
content_rights_requested_by: '12345',
content_rights_requested_date: {end: '2020-12-31', start: '2020-01-01'},
content_rights_type: ['APPROVED', 'REQUESTED'],
excluded_channels: [],
excluded_media_ids: [1234, 4567],
galleries: [1234, 4567],
image_data: 'data:image/jpeg;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7',
include_disconnected_story_ugc: true,
indication_filter: {indications: ['<string>'], operator: 'AND'},
media_id: 123,
media_types: ['VIDEO'],
prediction: {max: 0.85, min: 0.5},
ratio: 'SQUARE',
ratios: ['SQUARE'],
rights_approved: true,
scope_platform_filters: true,
search_term: '<string>',
search_terms: true,
size: '800x600',
source_account_ids: ['123456789', '987654321'],
source_ids: ['1234', '4567'],
uploads: {media_types: ['VIDEO']}
},
limit: 100,
offset: 0,
sort_fields: ['-DATE', '-INSTAGRAM_TOTAL_ENGAGEMENTS'],
sort: '-DATE',
ids: [1234, 4567],
include_creator: false,
include_instagram_users: true,
collapse_field: 'source_id',
campaign_creator_filters_options: {only_excluded_media: false, show_excluded_media: false}
})
};
fetch('https://library-backend.dashsocial.com/brands/{brand_id}/media/v2', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://library-backend.dashsocial.com/brands/{brand_id}/media/v2",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'filters' => [
'brand_media_types' => [
'INSTAGRAM_OWNED'
],
'source_created_at' => [
'end' => '2020-12-31',
'start' => '2020-01-01'
],
'instagram' => [
'caption_keywords' => [
'contain' => [
'<string>'
],
'not_contain' => [
'<string>'
]
],
'features_account' => '_flapjackie',
'is_boosted' => true,
'post_type' => 'REEL',
'post_types' => [
'REEL'
]
],
'instagram_story_frame' => [
'caption_keywords' => [
'contain' => [
'<string>'
],
'not_contain' => [
'<string>'
]
],
'contain_swipe_up_link' => true
],
'instagram_ugc' => [
'is_riq' => true,
'post_types' => [
'REEL'
],
'ugc_media_type' => 'MENTIONED'
],
'instagram_story_ugc' => [
'is_riq' => true,
'post_types' => [
'REEL'
],
'ugc_media_type' => 'MENTIONED'
],
'facebook' => [
'caption_keywords' => [
'contain' => [
'<string>'
],
'not_contain' => [
'<string>'
]
],
'is_boosted' => true,
'post_types' => [
'VIDEO'
]
],
'tiktok' => [
'caption_keywords' => [
'contain' => [
'<string>'
],
'not_contain' => [
'<string>'
]
],
'distribution_type' => 'ORGANIC',
'media_type' => [
'VIDEO'
]
],
'tiktok_ugc' => [
'is_hashtag' => true
],
'tiktok_ad' => [
'source_campaign_ids' => [
'123'
]
],
'pinterest' => [
'is_video' => true,
'pin_board_privacy' => 'public',
'post_types' => [
'video'
]
],
'twitter' => [
'caption_keywords' => [
'contain' => [
'<string>'
],
'not_contain' => [
'<string>'
]
],
'is_dark_post' => true,
'post_types' => [
'VIDEO'
]
],
'youtube' => [
'caption_keywords' => [
'contain' => [
'<string>'
],
'not_contain' => [
'<string>'
]
],
'post_types' => [
'LIVE'
],
'privacy_status' => [
'PRIVATE'
]
],
'linkedin' => [
'caption_keywords' => [
'contain' => [
'<string>'
],
'not_contain' => [
'<string>'
]
],
'post_types' => [
'IMAGE',
'VIDEO'
]
],
'threads' => [
'caption_keywords' => [
'contain' => [
'<string>'
],
'not_contain' => [
'<string>'
]
],
'post_types' => [
'IMAGE',
'VIDEO'
]
],
'snapchat' => [
'asset_types' => [
'STORY',
'SAVED_STORY',
'SPOTLIGHT',
'SNAP'
],
'caption_keywords' => [
'contain' => [
'<string>'
],
'not_contain' => [
'<string>'
]
],
'parent_story_source_id' => 'ac234340-eb80-5439-9906-8672bb73075c'
],
'content_tags' => [
'Tag 1',
'Tag 2'
],
'content_tag_match_type' => 'ANY',
'ai_generated' => [
'media_types' => [
'IMAGE'
]
],
'boards' => [
1234,
4567
],
'brand_ids' => [
144,
1
],
'campaign_ids' => [
1234,
4567
],
'campaigns' => [
123,
456
],
'campaigns_post_type' => 'VIDEO',
'caption_is_negative' => true,
'caption_is_neutral' => true,
'caption_is_positive' => true,
'caption_is_question' => true,
'color' => 'red',
'colors' => [
'red'
],
'comments_are_negative' => true,
'comments_are_neutral' => true,
'comments_are_positive' => true,
'content_rights_requested_by' => '12345',
'content_rights_requested_date' => [
'end' => '2020-12-31',
'start' => '2020-01-01'
],
'content_rights_type' => [
'APPROVED',
'REQUESTED'
],
'excluded_channels' => [
],
'excluded_media_ids' => [
1234,
4567
],
'galleries' => [
1234,
4567
],
'image_data' => 'data:image/jpeg;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7',
'include_disconnected_story_ugc' => true,
'indication_filter' => [
'indications' => [
'<string>'
],
'operator' => 'AND'
],
'media_id' => 123,
'media_types' => [
'VIDEO'
],
'prediction' => [
'max' => 0.85,
'min' => 0.5
],
'ratio' => 'SQUARE',
'ratios' => [
'SQUARE'
],
'rights_approved' => true,
'scope_platform_filters' => true,
'search_term' => '<string>',
'search_terms' => true,
'size' => '800x600',
'source_account_ids' => [
'123456789',
'987654321'
],
'source_ids' => [
'1234',
'4567'
],
'uploads' => [
'media_types' => [
'VIDEO'
]
]
],
'limit' => 100,
'offset' => 0,
'sort_fields' => [
'-DATE',
'-INSTAGRAM_TOTAL_ENGAGEMENTS'
],
'sort' => '-DATE',
'ids' => [
1234,
4567
],
'include_creator' => false,
'include_instagram_users' => true,
'collapse_field' => 'source_id',
'campaign_creator_filters_options' => [
'only_excluded_media' => false,
'show_excluded_media' => false
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://library-backend.dashsocial.com/brands/{brand_id}/media/v2"
payload := strings.NewReader("{\n \"filters\": {\n \"brand_media_types\": [\n \"INSTAGRAM_OWNED\"\n ],\n \"source_created_at\": {\n \"end\": \"2020-12-31\",\n \"start\": \"2020-01-01\"\n },\n \"instagram\": {\n \"caption_keywords\": {\n \"contain\": [\n \"<string>\"\n ],\n \"not_contain\": [\n \"<string>\"\n ]\n },\n \"features_account\": \"_flapjackie\",\n \"is_boosted\": true,\n \"post_type\": \"REEL\",\n \"post_types\": [\n \"REEL\"\n ]\n },\n \"instagram_story_frame\": {\n \"caption_keywords\": {\n \"contain\": [\n \"<string>\"\n ],\n \"not_contain\": [\n \"<string>\"\n ]\n },\n \"contain_swipe_up_link\": true\n },\n \"instagram_ugc\": {\n \"is_riq\": true,\n \"post_types\": [\n \"REEL\"\n ],\n \"ugc_media_type\": \"MENTIONED\"\n },\n \"instagram_story_ugc\": {\n \"is_riq\": true,\n \"post_types\": [\n \"REEL\"\n ],\n \"ugc_media_type\": \"MENTIONED\"\n },\n \"facebook\": {\n \"caption_keywords\": {\n \"contain\": [\n \"<string>\"\n ],\n \"not_contain\": [\n \"<string>\"\n ]\n },\n \"is_boosted\": true,\n \"post_types\": [\n \"VIDEO\"\n ]\n },\n \"tiktok\": {\n \"caption_keywords\": {\n \"contain\": [\n \"<string>\"\n ],\n \"not_contain\": [\n \"<string>\"\n ]\n },\n \"distribution_type\": \"ORGANIC\",\n \"media_type\": [\n \"VIDEO\"\n ]\n },\n \"tiktok_ugc\": {\n \"is_hashtag\": true\n },\n \"tiktok_ad\": {\n \"source_campaign_ids\": [\n \"123\"\n ]\n },\n \"pinterest\": {\n \"is_video\": true,\n \"pin_board_privacy\": \"public\",\n \"post_types\": [\n \"video\"\n ]\n },\n \"twitter\": {\n \"caption_keywords\": {\n \"contain\": [\n \"<string>\"\n ],\n \"not_contain\": [\n \"<string>\"\n ]\n },\n \"is_dark_post\": true,\n \"post_types\": [\n \"VIDEO\"\n ]\n },\n \"youtube\": {\n \"caption_keywords\": {\n \"contain\": [\n \"<string>\"\n ],\n \"not_contain\": [\n \"<string>\"\n ]\n },\n \"post_types\": [\n \"LIVE\"\n ],\n \"privacy_status\": [\n \"PRIVATE\"\n ]\n },\n \"linkedin\": {\n \"caption_keywords\": {\n \"contain\": [\n \"<string>\"\n ],\n \"not_contain\": [\n \"<string>\"\n ]\n },\n \"post_types\": [\n \"IMAGE\",\n \"VIDEO\"\n ]\n },\n \"threads\": {\n \"caption_keywords\": {\n \"contain\": [\n \"<string>\"\n ],\n \"not_contain\": [\n \"<string>\"\n ]\n },\n \"post_types\": [\n \"IMAGE\",\n \"VIDEO\"\n ]\n },\n \"snapchat\": {\n \"asset_types\": [\n \"STORY\",\n \"SAVED_STORY\",\n \"SPOTLIGHT\",\n \"SNAP\"\n ],\n \"caption_keywords\": {\n \"contain\": [\n \"<string>\"\n ],\n \"not_contain\": [\n \"<string>\"\n ]\n },\n \"parent_story_source_id\": \"ac234340-eb80-5439-9906-8672bb73075c\"\n },\n \"content_tags\": [\n \"Tag 1\",\n \"Tag 2\"\n ],\n \"content_tag_match_type\": \"ANY\",\n \"ai_generated\": {\n \"media_types\": [\n \"IMAGE\"\n ]\n },\n \"boards\": [\n 1234,\n 4567\n ],\n \"brand_ids\": [\n 144,\n 1\n ],\n \"campaign_ids\": [\n 1234,\n 4567\n ],\n \"campaigns\": [\n 123,\n 456\n ],\n \"campaigns_post_type\": \"VIDEO\",\n \"caption_is_negative\": true,\n \"caption_is_neutral\": true,\n \"caption_is_positive\": true,\n \"caption_is_question\": true,\n \"color\": \"red\",\n \"colors\": [\n \"red\"\n ],\n \"comments_are_negative\": true,\n \"comments_are_neutral\": true,\n \"comments_are_positive\": true,\n \"content_rights_requested_by\": \"12345\",\n \"content_rights_requested_date\": {\n \"end\": \"2020-12-31\",\n \"start\": \"2020-01-01\"\n },\n \"content_rights_type\": [\n \"APPROVED\",\n \"REQUESTED\"\n ],\n \"excluded_channels\": [],\n \"excluded_media_ids\": [\n 1234,\n 4567\n ],\n \"galleries\": [\n 1234,\n 4567\n ],\n \"image_data\": \"data:image/jpeg;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7\",\n \"include_disconnected_story_ugc\": true,\n \"indication_filter\": {\n \"indications\": [\n \"<string>\"\n ],\n \"operator\": \"AND\"\n },\n \"media_id\": 123,\n \"media_types\": [\n \"VIDEO\"\n ],\n \"prediction\": {\n \"max\": 0.85,\n \"min\": 0.5\n },\n \"ratio\": \"SQUARE\",\n \"ratios\": [\n \"SQUARE\"\n ],\n \"rights_approved\": true,\n \"scope_platform_filters\": true,\n \"search_term\": \"<string>\",\n \"search_terms\": true,\n \"size\": \"800x600\",\n \"source_account_ids\": [\n \"123456789\",\n \"987654321\"\n ],\n \"source_ids\": [\n \"1234\",\n \"4567\"\n ],\n \"uploads\": {\n \"media_types\": [\n \"VIDEO\"\n ]\n }\n },\n \"limit\": 100,\n \"offset\": 0,\n \"sort_fields\": [\n \"-DATE\",\n \"-INSTAGRAM_TOTAL_ENGAGEMENTS\"\n ],\n \"sort\": \"-DATE\",\n \"ids\": [\n 1234,\n 4567\n ],\n \"include_creator\": false,\n \"include_instagram_users\": true,\n \"collapse_field\": \"source_id\",\n \"campaign_creator_filters_options\": {\n \"only_excluded_media\": false,\n \"show_excluded_media\": false\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://library-backend.dashsocial.com/brands/{brand_id}/media/v2")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"filters\": {\n \"brand_media_types\": [\n \"INSTAGRAM_OWNED\"\n ],\n \"source_created_at\": {\n \"end\": \"2020-12-31\",\n \"start\": \"2020-01-01\"\n },\n \"instagram\": {\n \"caption_keywords\": {\n \"contain\": [\n \"<string>\"\n ],\n \"not_contain\": [\n \"<string>\"\n ]\n },\n \"features_account\": \"_flapjackie\",\n \"is_boosted\": true,\n \"post_type\": \"REEL\",\n \"post_types\": [\n \"REEL\"\n ]\n },\n \"instagram_story_frame\": {\n \"caption_keywords\": {\n \"contain\": [\n \"<string>\"\n ],\n \"not_contain\": [\n \"<string>\"\n ]\n },\n \"contain_swipe_up_link\": true\n },\n \"instagram_ugc\": {\n \"is_riq\": true,\n \"post_types\": [\n \"REEL\"\n ],\n \"ugc_media_type\": \"MENTIONED\"\n },\n \"instagram_story_ugc\": {\n \"is_riq\": true,\n \"post_types\": [\n \"REEL\"\n ],\n \"ugc_media_type\": \"MENTIONED\"\n },\n \"facebook\": {\n \"caption_keywords\": {\n \"contain\": [\n \"<string>\"\n ],\n \"not_contain\": [\n \"<string>\"\n ]\n },\n \"is_boosted\": true,\n \"post_types\": [\n \"VIDEO\"\n ]\n },\n \"tiktok\": {\n \"caption_keywords\": {\n \"contain\": [\n \"<string>\"\n ],\n \"not_contain\": [\n \"<string>\"\n ]\n },\n \"distribution_type\": \"ORGANIC\",\n \"media_type\": [\n \"VIDEO\"\n ]\n },\n \"tiktok_ugc\": {\n \"is_hashtag\": true\n },\n \"tiktok_ad\": {\n \"source_campaign_ids\": [\n \"123\"\n ]\n },\n \"pinterest\": {\n \"is_video\": true,\n \"pin_board_privacy\": \"public\",\n \"post_types\": [\n \"video\"\n ]\n },\n \"twitter\": {\n \"caption_keywords\": {\n \"contain\": [\n \"<string>\"\n ],\n \"not_contain\": [\n \"<string>\"\n ]\n },\n \"is_dark_post\": true,\n \"post_types\": [\n \"VIDEO\"\n ]\n },\n \"youtube\": {\n \"caption_keywords\": {\n \"contain\": [\n \"<string>\"\n ],\n \"not_contain\": [\n \"<string>\"\n ]\n },\n \"post_types\": [\n \"LIVE\"\n ],\n \"privacy_status\": [\n \"PRIVATE\"\n ]\n },\n \"linkedin\": {\n \"caption_keywords\": {\n \"contain\": [\n \"<string>\"\n ],\n \"not_contain\": [\n \"<string>\"\n ]\n },\n \"post_types\": [\n \"IMAGE\",\n \"VIDEO\"\n ]\n },\n \"threads\": {\n \"caption_keywords\": {\n \"contain\": [\n \"<string>\"\n ],\n \"not_contain\": [\n \"<string>\"\n ]\n },\n \"post_types\": [\n \"IMAGE\",\n \"VIDEO\"\n ]\n },\n \"snapchat\": {\n \"asset_types\": [\n \"STORY\",\n \"SAVED_STORY\",\n \"SPOTLIGHT\",\n \"SNAP\"\n ],\n \"caption_keywords\": {\n \"contain\": [\n \"<string>\"\n ],\n \"not_contain\": [\n \"<string>\"\n ]\n },\n \"parent_story_source_id\": \"ac234340-eb80-5439-9906-8672bb73075c\"\n },\n \"content_tags\": [\n \"Tag 1\",\n \"Tag 2\"\n ],\n \"content_tag_match_type\": \"ANY\",\n \"ai_generated\": {\n \"media_types\": [\n \"IMAGE\"\n ]\n },\n \"boards\": [\n 1234,\n 4567\n ],\n \"brand_ids\": [\n 144,\n 1\n ],\n \"campaign_ids\": [\n 1234,\n 4567\n ],\n \"campaigns\": [\n 123,\n 456\n ],\n \"campaigns_post_type\": \"VIDEO\",\n \"caption_is_negative\": true,\n \"caption_is_neutral\": true,\n \"caption_is_positive\": true,\n \"caption_is_question\": true,\n \"color\": \"red\",\n \"colors\": [\n \"red\"\n ],\n \"comments_are_negative\": true,\n \"comments_are_neutral\": true,\n \"comments_are_positive\": true,\n \"content_rights_requested_by\": \"12345\",\n \"content_rights_requested_date\": {\n \"end\": \"2020-12-31\",\n \"start\": \"2020-01-01\"\n },\n \"content_rights_type\": [\n \"APPROVED\",\n \"REQUESTED\"\n ],\n \"excluded_channels\": [],\n \"excluded_media_ids\": [\n 1234,\n 4567\n ],\n \"galleries\": [\n 1234,\n 4567\n ],\n \"image_data\": \"data:image/jpeg;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7\",\n \"include_disconnected_story_ugc\": true,\n \"indication_filter\": {\n \"indications\": [\n \"<string>\"\n ],\n \"operator\": \"AND\"\n },\n \"media_id\": 123,\n \"media_types\": [\n \"VIDEO\"\n ],\n \"prediction\": {\n \"max\": 0.85,\n \"min\": 0.5\n },\n \"ratio\": \"SQUARE\",\n \"ratios\": [\n \"SQUARE\"\n ],\n \"rights_approved\": true,\n \"scope_platform_filters\": true,\n \"search_term\": \"<string>\",\n \"search_terms\": true,\n \"size\": \"800x600\",\n \"source_account_ids\": [\n \"123456789\",\n \"987654321\"\n ],\n \"source_ids\": [\n \"1234\",\n \"4567\"\n ],\n \"uploads\": {\n \"media_types\": [\n \"VIDEO\"\n ]\n }\n },\n \"limit\": 100,\n \"offset\": 0,\n \"sort_fields\": [\n \"-DATE\",\n \"-INSTAGRAM_TOTAL_ENGAGEMENTS\"\n ],\n \"sort\": \"-DATE\",\n \"ids\": [\n 1234,\n 4567\n ],\n \"include_creator\": false,\n \"include_instagram_users\": true,\n \"collapse_field\": \"source_id\",\n \"campaign_creator_filters_options\": {\n \"only_excluded_media\": false,\n \"show_excluded_media\": false\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://library-backend.dashsocial.com/brands/{brand_id}/media/v2")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"filters\": {\n \"brand_media_types\": [\n \"INSTAGRAM_OWNED\"\n ],\n \"source_created_at\": {\n \"end\": \"2020-12-31\",\n \"start\": \"2020-01-01\"\n },\n \"instagram\": {\n \"caption_keywords\": {\n \"contain\": [\n \"<string>\"\n ],\n \"not_contain\": [\n \"<string>\"\n ]\n },\n \"features_account\": \"_flapjackie\",\n \"is_boosted\": true,\n \"post_type\": \"REEL\",\n \"post_types\": [\n \"REEL\"\n ]\n },\n \"instagram_story_frame\": {\n \"caption_keywords\": {\n \"contain\": [\n \"<string>\"\n ],\n \"not_contain\": [\n \"<string>\"\n ]\n },\n \"contain_swipe_up_link\": true\n },\n \"instagram_ugc\": {\n \"is_riq\": true,\n \"post_types\": [\n \"REEL\"\n ],\n \"ugc_media_type\": \"MENTIONED\"\n },\n \"instagram_story_ugc\": {\n \"is_riq\": true,\n \"post_types\": [\n \"REEL\"\n ],\n \"ugc_media_type\": \"MENTIONED\"\n },\n \"facebook\": {\n \"caption_keywords\": {\n \"contain\": [\n \"<string>\"\n ],\n \"not_contain\": [\n \"<string>\"\n ]\n },\n \"is_boosted\": true,\n \"post_types\": [\n \"VIDEO\"\n ]\n },\n \"tiktok\": {\n \"caption_keywords\": {\n \"contain\": [\n \"<string>\"\n ],\n \"not_contain\": [\n \"<string>\"\n ]\n },\n \"distribution_type\": \"ORGANIC\",\n \"media_type\": [\n \"VIDEO\"\n ]\n },\n \"tiktok_ugc\": {\n \"is_hashtag\": true\n },\n \"tiktok_ad\": {\n \"source_campaign_ids\": [\n \"123\"\n ]\n },\n \"pinterest\": {\n \"is_video\": true,\n \"pin_board_privacy\": \"public\",\n \"post_types\": [\n \"video\"\n ]\n },\n \"twitter\": {\n \"caption_keywords\": {\n \"contain\": [\n \"<string>\"\n ],\n \"not_contain\": [\n \"<string>\"\n ]\n },\n \"is_dark_post\": true,\n \"post_types\": [\n \"VIDEO\"\n ]\n },\n \"youtube\": {\n \"caption_keywords\": {\n \"contain\": [\n \"<string>\"\n ],\n \"not_contain\": [\n \"<string>\"\n ]\n },\n \"post_types\": [\n \"LIVE\"\n ],\n \"privacy_status\": [\n \"PRIVATE\"\n ]\n },\n \"linkedin\": {\n \"caption_keywords\": {\n \"contain\": [\n \"<string>\"\n ],\n \"not_contain\": [\n \"<string>\"\n ]\n },\n \"post_types\": [\n \"IMAGE\",\n \"VIDEO\"\n ]\n },\n \"threads\": {\n \"caption_keywords\": {\n \"contain\": [\n \"<string>\"\n ],\n \"not_contain\": [\n \"<string>\"\n ]\n },\n \"post_types\": [\n \"IMAGE\",\n \"VIDEO\"\n ]\n },\n \"snapchat\": {\n \"asset_types\": [\n \"STORY\",\n \"SAVED_STORY\",\n \"SPOTLIGHT\",\n \"SNAP\"\n ],\n \"caption_keywords\": {\n \"contain\": [\n \"<string>\"\n ],\n \"not_contain\": [\n \"<string>\"\n ]\n },\n \"parent_story_source_id\": \"ac234340-eb80-5439-9906-8672bb73075c\"\n },\n \"content_tags\": [\n \"Tag 1\",\n \"Tag 2\"\n ],\n \"content_tag_match_type\": \"ANY\",\n \"ai_generated\": {\n \"media_types\": [\n \"IMAGE\"\n ]\n },\n \"boards\": [\n 1234,\n 4567\n ],\n \"brand_ids\": [\n 144,\n 1\n ],\n \"campaign_ids\": [\n 1234,\n 4567\n ],\n \"campaigns\": [\n 123,\n 456\n ],\n \"campaigns_post_type\": \"VIDEO\",\n \"caption_is_negative\": true,\n \"caption_is_neutral\": true,\n \"caption_is_positive\": true,\n \"caption_is_question\": true,\n \"color\": \"red\",\n \"colors\": [\n \"red\"\n ],\n \"comments_are_negative\": true,\n \"comments_are_neutral\": true,\n \"comments_are_positive\": true,\n \"content_rights_requested_by\": \"12345\",\n \"content_rights_requested_date\": {\n \"end\": \"2020-12-31\",\n \"start\": \"2020-01-01\"\n },\n \"content_rights_type\": [\n \"APPROVED\",\n \"REQUESTED\"\n ],\n \"excluded_channels\": [],\n \"excluded_media_ids\": [\n 1234,\n 4567\n ],\n \"galleries\": [\n 1234,\n 4567\n ],\n \"image_data\": \"data:image/jpeg;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7\",\n \"include_disconnected_story_ugc\": true,\n \"indication_filter\": {\n \"indications\": [\n \"<string>\"\n ],\n \"operator\": \"AND\"\n },\n \"media_id\": 123,\n \"media_types\": [\n \"VIDEO\"\n ],\n \"prediction\": {\n \"max\": 0.85,\n \"min\": 0.5\n },\n \"ratio\": \"SQUARE\",\n \"ratios\": [\n \"SQUARE\"\n ],\n \"rights_approved\": true,\n \"scope_platform_filters\": true,\n \"search_term\": \"<string>\",\n \"search_terms\": true,\n \"size\": \"800x600\",\n \"source_account_ids\": [\n \"123456789\",\n \"987654321\"\n ],\n \"source_ids\": [\n \"1234\",\n \"4567\"\n ],\n \"uploads\": {\n \"media_types\": [\n \"VIDEO\"\n ]\n }\n },\n \"limit\": 100,\n \"offset\": 0,\n \"sort_fields\": [\n \"-DATE\",\n \"-INSTAGRAM_TOTAL_ENGAGEMENTS\"\n ],\n \"sort\": \"-DATE\",\n \"ids\": [\n 1234,\n 4567\n ],\n \"include_creator\": false,\n \"include_instagram_users\": true,\n \"collapse_field\": \"source_id\",\n \"campaign_creator_filters_options\": {\n \"only_excluded_media\": false,\n \"show_excluded_media\": false\n }\n}"
response = http.request(request)
puts response.read_body{
"data": [
{
"brand_id": 123,
"brand_media_id": 123,
"brand_media_status": "<string>",
"callback_socket_id": "<string>",
"can_publish_within": {
"end": "<string>",
"start": "<string>"
},
"caption_question": {
"is_question": true,
"user_overridden": true
},
"caption_sentiment": {
"is_negative": true,
"is_neutral": true,
"is_positive": true,
"user_overridden": true
},
"collections": {},
"comment_sentiment": {
"is_negative": true,
"is_neutral": true,
"is_positive": true,
"user_overridden": true
},
"community_engagement": 123,
"content_rights_expiry_date": "2023-11-07T05:31:56Z",
"content_rights_requested_by": "<string>",
"content_rights_requested_date": "2023-11-07T05:31:56Z",
"content_tags": [
"Tag 1",
"Tag 2"
],
"created_at": "2023-11-07T05:31:56Z",
"creator": {
"avatar_url": "<string>",
"handle": "<string>"
},
"custom_metrics": [
{
"aggregation": "<string>",
"description": "<string>",
"formula": "<string>",
"id": 123,
"metric_format": "<string>",
"name": "<string>",
"value": 123
}
],
"facebook": {},
"id": 123,
"image": {
"sizes": {
"original": {
"url": "<string>",
"height": 123,
"size": 123,
"width": 123
},
"medium_square": {
"url": "<string>",
"height": 123,
"size": 123,
"width": 123
},
"original_converted": {
"url": "<string>",
"height": 123,
"size": 123,
"width": 123
},
"small": {
"url": "<string>",
"height": 123,
"size": 123,
"width": 123
},
"small_square": {
"url": "<string>",
"height": 123,
"size": 123,
"width": 123
}
},
"editor_data": {
"aspect_ratio": "<string>",
"canvas_data": {
"height": 123,
"left": 123,
"natural_height": 123,
"natural_width": 123,
"top": 123,
"width": 123
},
"zoom_value": 123
},
"transforms": {
"crop": {
"height": 123,
"width": 123,
"x": 123,
"y": 123
},
"parent_media_id": 123
}
},
"instagram": {},
"instagram_ads": {},
"instagram_story": {},
"instagram_story_frame": {},
"instagram_user": {},
"likeshop": {
"clicks": 123,
"links": "<string>",
"tiktok_clicks": 123
},
"linkedin": {},
"media_group": 123,
"meta": {
"filename": "<string>",
"last_modified_at": "<string>",
"uploaded_by": 123
},
"pinterest": {},
"predictions": {
"ad_engagement": 123,
"conversions": 123,
"engagement": 123,
"link_clicks": 123
},
"snapchat": {},
"source_account_id": "<string>",
"source_created_at": "2023-11-07T05:31:56Z",
"source_id": "<string>",
"threads": {},
"tiktok": {},
"tiktok_ad": {},
"twitter": {},
"updated_at": "2023-11-07T05:31:56Z",
"variants": [],
"video": {
"sizes": {
"original": {
"url": "<string>",
"height": 123,
"size": 123,
"width": 123
},
"medium_square": {
"url": "<string>",
"height": 123,
"size": 123,
"width": 123
},
"original_converted": {
"url": "<string>",
"height": 123,
"size": 123,
"width": 123
},
"small": {
"url": "<string>",
"height": 123,
"size": 123,
"width": 123
},
"small_square": {
"url": "<string>",
"height": 123,
"size": 123,
"width": 123
}
},
"duration": 123,
"editor_data": {
"aspect_ratio": "<string>"
},
"frame_rate": 123,
"thumbnails": {
"medium_square": {
"url": "<string>",
"height": 123,
"size": 123,
"width": 123
},
"original": {
"url": "<string>",
"height": 123,
"size": 123,
"width": 123
},
"original_converted": {
"url": "<string>",
"height": 123,
"size": 123,
"width": 123
},
"small": {
"url": "<string>",
"height": 123,
"size": 123,
"width": 123
},
"small_square": {
"url": "<string>",
"height": 123,
"size": 123,
"width": 123
}
},
"transforms": {
"crop": {
"height": 123,
"width": 123,
"x": 123,
"y": 123
},
"disable_audio_track": true,
"parent_media_id": 123,
"trim": {
"end_time": 123,
"start_time": 123
}
},
"video_conversion_warnings": "<unknown>"
},
"video_predictions": {
"engagement": [
123
]
},
"video_predictions_interval_sec": 123,
"video_suggested_thumbnail_list": [
{
"frame_position": 123,
"index": 123,
"predictions": {
"engagement": 123
},
"url": "<string>"
}
],
"visual_features": "<string>",
"youtube": {}
}
],
"paging": {
"count": 123,
"next": "<string>",
"previous": "<string>"
}
}{
"code": 123,
"errors": {},
"message": "<string>",
"status": "<string>"
}{
"code": 123,
"errors": {},
"message": "<string>",
"status": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The Dash Social assigned ID of the brand.
Query Parameters
Number of results to return in a single response.
0 <= x <= 1000The offset of the first result to be returned.
x >= 0Comma-separated list of IDs to return.
[812371, 828318]
Comma-separated list of optional fields to include.
predictions, source_data, comment_sentiment, visual_features ["predictions"]
Comma-separated list of optional fields to exclude.
predictions, source_data, comment_sentiment, visual_features ["source_data"]
Next token for deep pagination
"123123123,321321321"
Body
Show child attributes
Show child attributes
Number of results to return in a single response.
0 <= x <= 1000The offset of the first result to be returned.
x >= 0List of sort fields to apply. Prefix any value with - for descending order (e.g., -DATE). For platform-specific sorting, use {PLATFORM}_{METRIC} (e.g., -INSTAGRAM_TOTAL_ENGAGEMENTS, -TIKTOK_VIEWS, -FACEBOOK_TOTAL_ENGAGEMENTS). Common platform prefixes: INSTAGRAM_, FACEBOOK_, TIKTOK_, TWITTER_, PINTEREST_, YOUTUBE_, LINKEDIN_, SNAPCHAT_, THREADS_.
Sort field. Prefix with - for descending order.
DATE, RELEVANCE, PERFORMANCE, LIKESHOP_CLICKS, CROSS_CHANNEL_VIDEO_VIEWS, CROSS_CHANNEL_ENGAGEMENT_RATE, CROSS_CHANNEL_IMPRESSIONS, CROSS_CHANNEL_ENTERTAINMENT_SCORE, CROSS_CHANNEL_TOTAL_ENGAGEMENTS, CROSS_CHANNEL_EMV, CROSS_CHANNEL_EFFECTIVENESS, CROSS_CHANNEL_REACH, CROSS_CHANNEL_SHARES, CONTENT_RIGHTS_EXPIRY_DATE, CONTENT_RIGHTS_REQUESTED_DATE ["-DATE", "-INSTAGRAM_TOTAL_ENGAGEMENTS"]
Sort field for results. Prefix with - for descending order (e.g., -DATE). For platform-specific sorting, use the format {PLATFORM}_{METRIC} (e.g., -INSTAGRAM_TOTAL_ENGAGEMENTS, -TIKTOK_VIEWS). Deprecated in favor of sort_fields.
DATE, RELEVANCE, PERFORMANCE, LIKESHOP_CLICKS, CROSS_CHANNEL_VIDEO_VIEWS, CROSS_CHANNEL_ENGAGEMENT_RATE, CROSS_CHANNEL_IMPRESSIONS, CROSS_CHANNEL_ENTERTAINMENT_SCORE, CROSS_CHANNEL_TOTAL_ENGAGEMENTS, CROSS_CHANNEL_EMV, CROSS_CHANNEL_EFFECTIVENESS, CROSS_CHANNEL_REACH, CROSS_CHANNEL_SHARES, CONTENT_RIGHTS_EXPIRY_DATE, CONTENT_RIGHTS_REQUESTED_DATE "-DATE"
Array of media ids to return
[1234, 4567]
Should include creator info
Should include instagram users
Field used to collapse hits (used to avoid duplicate posts)
"source_id"
When passing in a list of campaign IDs as a filter, these are options on how to apply the campaign's creator filters
Show child attributes
Show child attributes