POST
/
optimize_me
/
get_campaign_optimization_history
Get Campaign Optimization History
curl --request POST \
  --url https://public.plai.io/optimize_me/get_campaign_optimization_history \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '{
  "userId": "<string>",
  "campaignId": "<string>"
}'
{
  "success": true,
  "results": {
    "success": true,
    "campaign": {
      "campaignId": "<string>",
      "campaignName": "<string>",
      "startDate": 123,
      "timestamp": 123,
      "optimizationStatus": "<string>",
      "platform": "<string>",
      "history": [
        {
          "adId": "<string>",
          "headlines": [
            {
              "newText": "<string>",
              "oldText": "<string>"
            }
          ],
          "primaryTexts": [
            {
              "newText": "<string>",
              "oldText": "<string>"
            }
          ],
          "images": [
            {
              "url": "<string>",
              "width": 123,
              "height": 123,
              "id": "<string>"
            }
          ],
          "adSetId": "<string>",
          "timestamp": 123,
          "lastUpdate": {
            "_seconds": 123,
            "_nanoseconds": 123
          }
        }
      ]
    },
    "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
Campaign ID

Response

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