Campaigns
Create a campaign
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.
Format
uuidHeader Parameters
X-Merchant-ID?string|null
Request Body
application/json
audience?|null
budget?number
Range
0 <= valueDefault
0business_budget?number
Range
0 <= valueDefault
0channel?string
Default
"paypal_app"Value in
- "paypal_app"
- "sms"
- "whatsapp"
- "email"
- "in_store"
end_date?|
Format
dateestimated_impact?number
Range
0 <= valueDefault
0expected_incremental_revenue?|
Range
0 <= valuemessage?string
Length
length <= 500Default
""name*string
Length
3 <= length <= 200objective?string
Length
length <= 1000Default
""objective_type?string
Default
""Value in
- "RETENTION"
- "REACTIVATION"
- "ACQUISITION"
- "CROSS_SELL"
- "INVENTORY_CLEARANCE"
- "CAPACITY_UTILIZATION"
- "REVENUE_RECOVERY"
- "PROFIT_OPTIMIZATION"
offer_description?string
Length
length <= 500Default
""offer_type?string
Default
"COMBO"Value in
- "COMBO"
- "PERCENT_DISCOUNT"
- "FLAT_DISCOUNT"
- "CASHBACK"
- "FREE_ITEM"
- "NONE"
offer_value?number
Range
0 <= value <= 100000Default
0opportunity_id?|
Format
uuidpaypal_budget?number
Range
0 <= valueDefault
0paypal_surface?string
Length
length <= 24Default
""start_date?|
Format
datesurface?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}