Documentation / Campaign management / Media eligibility

Update media eligibility scores

Apply eligibility scores to up to 500 tracked campaign posts in one request.

update media eligibility scores · bash
curl -sS "$BASE_URL/sdk/v1/campaign-media/eligibility-scores/bulk" \
  -X POST \
  -H "Content-Type: application/json" \
  -H "X-Application-Id: $APP_ID" \
  -H "X-Api-Key: $API_KEY" \
  -d '{
    "scores": [
      { "campaignCreatorMediaId": "CCMEDIA_123", "score": 82.5 },
      { "campaignCreatorMediaId": "CCMEDIA_456", "score": 67 }
    ]
  }'
All documentation

POST /sdk/v1/campaign-media/eligibility-scores/bulk

Applies eligibility scores to up to 500 tracked posts. Grade verifies every campaignCreatorMediaId belongs to your agency before saving it.

All requests require X-Application-Id and X-Api-Key.

Body

scores is a non-empty array with no more than 500 items. Each item requires:

  • campaignCreatorMediaId: the ID returned by campaign media or the eligibility score list.
  • score: a number from 0 through 100. Values are stored to two decimal places.

Each media ID can appear only once in a request.

Example request

curl -sS "$BASE_URL/sdk/v1/campaign-media/eligibility-scores/bulk" \
  -X POST \
  -H "Content-Type: application/json" \
  -H "X-Application-Id: $APP_ID" \
  -H "X-Api-Key: $API_KEY" \
  -d '{
    "scores": [
      { "campaignCreatorMediaId": "CCMEDIA_123", "score": 82.5 },
      { "campaignCreatorMediaId": "CCMEDIA_456", "score": 67 }
    ]
  }'

Response

The response follows the input order and reports each item separately. Media that was not found or does not belong to your agency is skipped.

{
  "success": true,
  "appliedCount": 1,
  "failedCount": 1,
  "results": [
    {
      "campaignCreatorMediaId": "CCMEDIA_123",
      "status": "APPLIED",
      "score": 82.5
    },
    {
      "campaignCreatorMediaId": "CCMEDIA_456",
      "status": "FAILED",
      "reason": "Campaign creator media was not found."
    }
  ]
}

After scores are applied, Grade refreshes the affected creators' calculated payment summaries.

For warm-up posts that should remain tracked but be excluded from payments, use Payment exclusions. Those controls operate independently of score-based payment filtering and support undo.

Common errors

  • 400: empty batch, invalid score, duplicate media ID, or more than 500 items
  • 401: missing or invalid SDK credentials

Describe your program.

Grade turns it into a program it can track and pay.