$API_TOKEN=<YOUR_API_TOKEN>
$cat > input.json << 'EOF'
<{
< "reports": [
< {
< "format": "csv",
< "data": "acct,network,from,to,post,shown,unique_reach\nbrand-a,instagram,2026-10-01,2026-10-07,p-1,10,7",
< "mapping": {
< "business_account_key": "acct",
< "platform": "network",
< "period_start": "from",
< "period_end": "to",
< "post_key": "post",
< "impressions": "shown",
< "reach": "unique_reach"
< },
< "metric_definition_ids": {
< "impressions": "post_impressions_v1",
< "reach": "account_reach_v1"
< }
< },
< {
< "format": "json",
< "data": "[{\"business\":\"brand-a\",\"channel\":\"instagram\",\"start_date\":\"2026-10-08\",\"end_date\":\"2026-10-14\",\"content\":\"p-2\",\"views_total\":14,\"reach_total\":9}]",
< "mapping": {
< "business_account_key": "business",
< "platform": "channel",
< "period_start": "start_date",
< "period_end": "end_date",
< "post_key": "content",
< "impressions": "views_total",
< "reach": "reach_total"
< },
< "metric_definition_ids": {
< "impressions": "post_impressions_v1",
< "reach": "account_reach_v1"
< }
< }
< ]
<}
<EOF
$curl "https://api.apify.com/v2/actors/althorlabs~social-metrics-reconciler/runs?token=$API_TOKEN" \
< -X POST \
< -d @input.json \
< -H 'Content-Type: application/json'