POST
/
meta
/
get_campaign_insights
Get Campaign Insights
curl --request POST \
  --url https://public.plai.io/meta/get_campaign_insights \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '{
  "userId": "<string>",
  "campaignId": "<string>",
  "startDate": "<string>",
  "endDate": "<string>",
  "currencySymbol": "<string>",
  "clientCostAdjustment": {
    "percentage": 123
  }
}'
{
  "success": true,
  "results": {
    "success": true,
    "insights": {
      "name": "<string>",
      "stats": {
        "campaignName": "<string>",
        "cpm": "<string>",
        "reach": "<string>",
        "cpc": "<string>",
        "ctr": "<string>",
        "clicks": "<string>",
        "spend": "<string>",
        "conversions": "<string>",
        "cost_per_conversion": "<string>",
        "conversion_rate_ranking": "<string>",
        "quality_ranking": "<string>",
        "date_start": "<string>",
        "date_end": "<string>",
        "leadCount": "<string>",
        "cost_per_action_type": [
          {}
        ],
        "actions": [
          {}
        ],
        "videoAvgTimeWatched": "<string>",
        "video30SecWatched": "<string>",
        "videoNoOfPlays": "<string>",
        "video25PercentWatched": "<string>",
        "video50PercentWatched": "<string>",
        "video75PercentWatched": "<string>",
        "video95PercentWatched": "<string>",
        "video100PercentWatched": "<string>",
        "postSaves": "<string>",
        "postShares": "<string>",
        "postReactions": "<string>",
        "postComments": "<string>",
        "postLikes": "<string>",
        "cpmPrevious": "<string>",
        "cpmPercent": "<string>"
      },
      "adsets": {
        "[adset_id]": {
          "name": "<string>",
          "stats": {
            "campaignName": "<string>",
            "cpm": "<string>",
            "reach": "<string>",
            "cpc": "<string>",
            "ctr": "<string>",
            "clicks": "<string>",
            "spend": "<string>",
            "conversions": "<string>",
            "cost_per_conversion": "<string>",
            "conversion_rate_ranking": "<string>",
            "quality_ranking": "<string>",
            "date_start": "<string>",
            "date_end": "<string>",
            "leadCount": "<string>",
            "cost_per_action_type": [
              {}
            ],
            "actions": [
              {}
            ],
            "videoAvgTimeWatched": "<string>",
            "video30SecWatched": "<string>",
            "videoNoOfPlays": "<string>",
            "video25PercentWatched": "<string>",
            "video50PercentWatched": "<string>",
            "video75PercentWatched": "<string>",
            "video95PercentWatched": "<string>",
            "video100PercentWatched": "<string>",
            "postSaves": "<string>",
            "postShares": "<string>",
            "postReactions": "<string>",
            "postComments": "<string>",
            "postLikes": "<string>",
            "cpmPrevious": "<string>",
            "cpmPercent": "<string>"
          },
          "ads": {}
        }
      },
      "error": "<string>"
    }
  }
}

Request Body

userId
string
required
User ID, If not already created, make a user on create user page first. If already created, retrieve the user ID from get profile page.
campaignId
string
required
The unique identifier of the campaign
startDate
string
The start date for the insights period in YYYY-MM-DD format. If the start date is not provided, insights will be generated for all time.
endDate
string
The end date for the insights period in YYYY-MM-DD format. If the end date is not provided, insights will be generated for all time.
currencySymbol
string
required
The currency symbol to be used for monetary values
clientCostAdjustment
object
required

Response

success
boolean
Indicates that the HTTP response was successful (status code 200 OK).
results
object