Skip to main content
This guide shows you how to use the media/v2 endpoint to get access to your post stats for all your channels.

Use case examples

Each of these use cases highlights how teams use the media/v2 endpoint:

Campaign Performance Review

Pull all posts published during a campaign window to analyze impact over time.

UGC Engagement Analysis

Filter by source type to analyze performance of user-generated content separately.

Platform-Based Filtering

Fetch media from a single social platform to create focused reports or dashboards.

Media Insights

Compare performance across media types and surface high-performing assets.

Before you start

Make sure you have:
  • API access token with permissions to the relevant brand.
  • Brand ID for the account you want to query.
See API Quickstart for more details.

Setup and considerations

Endpoint: PUT https://library-backend.dashsocial.com/brands/{brand_id}/media/v2

Rate limit

To help you avoid hitting rate limits and ensure smooth data retrieval, follow these best practices:
  • Set limit=99 in your requests to keep requests efficient and light, allowing you to retrieve more data per minute.
  • Add a 1000ms (1 second) delay between requests to prevent hitting limits when paginating.

Data freshness

Metric updates vary by post age:
  • Recently published posts: updated more frequently
  • Older posts: updated less frequently
For most accurate reporting, focus on data from the last 90 days.

Implementation

To implement requests to the media/v2 endpoint, refer to the endpoint’s reference for detailed information. Here is an example request with the appropriate filters:

Key query parameters

brand_media_types — which platform and content type to include. Expand a platform below to see all valid values:
Due to a technical limitation, you cannot query Instagram (INSTAGRAM_OWNED, INSTAGRAM_STORY) media types in the same request as other social media platforms. Always separate Instagram queries from other social media platforms.
source_created_at — date range to filter posts. limit — max results per page. Set limit=99 for efficiency. offset — pagination offset.

Full example

A complete implementation that handles pagination and rate limiting:
Step 1 — Configure the request Set your brandId, token, platform (e.g. INSTAGRAM_OWNED), and date range via source_created_at. Step 2 — Set up headers and a delay helper Include the Authorization Bearer token and Content-Type: application/json. The delay helper adds a pause between paginated requests to respect rate limits. Step 3 — Paginate through results Send a PUT request and collect each page of results. If paging.next is present in the response, continue fetching until all pages are retrieved. Step 4 — Shape the response Map the raw response to only the fields you need — post ID, predicted engagement, actual engagement, and post URL — for clean integration into dashboards or reports.

Sample response

Each platform returns data in its own structure. When processing results, your integration should check the platform type and parse metrics accordingly.

Metrics

Select a platform to see the available metric names and their corresponding API key names.