POST
/
optimize_me
/
register_campaign
Register Campaign
curl --request POST \
  --url https://public.plai.io/optimize_me/register_campaign \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '{
  "userId": "<string>",
  "campaignId": "<string>",
  "platform": "<string>"
}'
{
  "success": true,
  "results": {
    "success": true,
    "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
platform
string
Platform for the campaign — defines where the ads will be served.For Facebook or Instagram, set platform = FACEBOOK, for Google, set platform = GOOGLE.Valid values: GOOGLE, FACEBOOK
Default platform is FACEBOOK.

Response

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