Campaigns

Create a campaign

POST
/api/v1/campaigns

Creates a campaign in PENDING_APPROVAL and builds its audience. Nothing is delivered until a user with campaign:approve approves it.

Authorization

HTTPBearer
AuthorizationBearer <token>

JWT access token

In: header

Query Parameters

merchant_id?|

Optional merchant to act on. Must be one you are a member of.

Formatuuid

Header Parameters

X-Merchant-ID?string|null

Request Body

application/json

audience?|null
budget?number
Range0 <= value
Default0
business_budget?number
Range0 <= value
Default0
channel?string
Default"paypal_app"

Value in

  • "paypal_app"
  • "sms"
  • "whatsapp"
  • "email"
  • "in_store"
end_date?|
Formatdate
estimated_impact?number
Range0 <= value
Default0
expected_incremental_revenue?|
Range0 <= value
message?string
Lengthlength <= 500
Default""
name*string
Length3 <= length <= 200
objective?string
Lengthlength <= 1000
Default""
objective_type?string
Default""

Value in

  • "RETENTION"
  • "REACTIVATION"
  • "ACQUISITION"
  • "CROSS_SELL"
  • "INVENTORY_CLEARANCE"
  • "CAPACITY_UTILIZATION"
  • "REVENUE_RECOVERY"
  • "PROFIT_OPTIMIZATION"
offer_description?string
Lengthlength <= 500
Default""
offer_type?string
Default"COMBO"

Value in

  • "COMBO"
  • "PERCENT_DISCOUNT"
  • "FLAT_DISCOUNT"
  • "CASHBACK"
  • "FREE_ITEM"
  • "NONE"
offer_value?number
Range0 <= value <= 100000
Default0
opportunity_id?|
Formatuuid
paypal_budget?number
Range0 <= value
Default0
paypal_surface?string
Lengthlength <= 24
Default""
start_date?|
Formatdate
surface?string
Default"BUSINESS"

Value in

  • "BUSINESS"
  • "PAYPAL"
  • "HYBRID"
tags?array<string>

Response Body

application/json

application/json

curl -X POST "https://example.com/api/v1/campaigns" \  -H "Content-Type: application/json" \  -d '{    "name": "string"  }'
{  "data": {    "actions": [      {        "action_type": "string",        "actor_label": "string",        "actor_type": "string",        "created_at": "2019-08-24T14:15:22Z",        "description": "string",        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",        "is_simulated": true,        "payload": {}      }    ],    "actual_cost": 0,    "actual_incremental_revenue": 0,    "agent_run_id": "c3317f32-e28b-4af1-a584-86ac8c788dd8",    "approved_at": "2019-08-24T14:15:22Z",    "audiences": [      {        "definition": {},        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",        "name": "string",        "role": "TEST",        "size": 0      }    ],    "budget": 0,    "business_budget": 0,    "channel": "paypal_app",    "completed_at": "2019-08-24T14:15:22Z",    "created_at": "2019-08-24T14:15:22Z",    "created_by_agent": "",    "end_date": "2019-08-24",    "estimated_cost": 0,    "estimated_impact": 0,    "expected_incremental_revenue": 0,    "experiment_id": "916afd89-cac5-4339-9c59-dd068abdfa69",    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "incremental_roi": 0,    "is_simulated": true,    "launched_at": "2019-08-24T14:15:22Z",    "measurement_status": "",    "message": "string",    "name": "string",    "objective": "string",    "objective_type": "RETENTION",    "offer_description": "string",    "offer_type": "COMBO",    "offer_value": 0,    "opportunity_id": "5c7fee95-8917-4b3c-8649-bbbc4ef0c4f7",    "paypal_budget": 0,    "paypal_surface": "",    "provenance": {      "data_source": "SEEDED",      "is_simulated": true,      "note": "Seeded demo dataset - not computed from a live PayPal merchant account."    },    "rejected_reason": "string",    "requires_approval": true,    "start_date": "2019-08-24",    "status": "DRAFT",    "surface": "BUSINESS",    "tags": [      "string"    ],    "updated_at": "2019-08-24T14:15:22Z"  },  "meta": {},  "success": true}