Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

 

Code Block
{
	"campaign_id": 1 (existing campaign id),
	"application_id": 1,
	"sound": "",
	"name": "",
	"description": "",
	"type": 0,
	"content_type": 1,
	"inbox_title": "title",
	"inbox_description": "description",
	"push_body": "body",
	"push_badge": 1,
	"schedule_type":0,
	"timezone": "Asia/Jerusalem",
	"overdue": 0,
	"schedule_date": 1345645282,
	"expire_date" : 1645645282,
	"content_units": [
		{ "size": "iphone4", "body": "[html code]" },(second value is “body or “url”)
		{ "size": "iphone5", "url": "http://yahoo.com" }, (second value is “body or “url”)
		{ "size": "ipad", "url": "http://google.com" } (second value is “body or “url”)
	],
	"segments": (optional - can send the id of an existing segment or create a new one or both) [
	{
		"name": "My Segment", "description": "My first segment",
		"rules": [
			{ "field": "appVersion", "operator": "=", "operand": [ "2.44" ], "case_sensitive": 1 },
			{ "field": "osNumber", "operator": ">=", "operand": [ "8.0", "8.01" ] }
		]
	},
    {
		"name": "Another Segment ", "description": "My first segment",
		"rules": [
			{ "field": "appVersion", "operator": "=", "operand": [ "2.44" ], "case_sensitive": 1 },
			{ "field": "osNumber", "operator": ">", "operand": [ "8.0", "8.015.1" ] }
		]
	},
    {
		"segment_id": 243
	},
	{
		"segment_id": 319
	}
 ]
}

 

Code Block
{
	"campaign_id":"161156",
    "application_id":"103012",
    "sound":"default",
    "name":"Test name",
    "description":"Test description",
    "type":0,
    "content_type":1,
    "push_body":"Test message (body)",
    "push_badge":1,
    "schedule_type":0,
    "segments":[
    {
    	"name":"Segment A",
        "description":"My A segment",
    	"rules":[
        	{"field":"alias", "operator":"=", "operand":["66473138"]} ]  
    }],
    "payload":{"apx_dpl":"myapp://product/4", "banner":"1234"}
}


Response

...