Smartech

Push Notification API Campaigns

API Types

URL Schema:
US IDC: api1.netcoresmartech.com/campaign/
Indian IDC: api1-in.netcoresmartech.com/campaign/

Endpoint

Request Type

What it Does?

/create

POST

Send campaign creation details to the server, which stores it as a campaign

/execute

POST

Assign an audience to a successfully created campaign.

Header:

Key

Value

Authorization

API_KEY

Content-Type

application/json

🚧

Prerequisites

For implementing APN campaign APIs, it is a prerequisite that the client has the smartech SDK integrated in their apps.

Create APN Campaign

URL Schema:
US IDC: api1.netcoresmartech.com/campaign/create
Indian IDC: api1-in.netcoresmartech.com/campaign/create
Method:POST
Parameters:

Parameter

Description

Data Type

Required

type

This is the Campaign Type.
Will have ‘apn’, as this is API is for campaign creation.

String

Yes

app_id

App IDs of the mobile assets.

Array

Yes

name

Name of the Campaign

String

Optional

template_id

ID of the template used

String

Optional

tags

Tags the user wants to assign to the campaign

Array

Optional

Request Body:

{
    "type": "apn" ,  
    "app_ids" : ["1234679jbwdclc67akj","1234679jbwdclc67akj"], // Max 5 appids are allowed
    "name" : "<campaignName>",
    "template_id": "<templateId>",
    "tags" : ["Sale","Brand"], //Optional Max 5 tags, each tag min 5 and max 25
    }
}

Response:

{
    "status": "success",
    "message": "Campaign created successfully",
    "campaign_id" : 10001
}

Execute APN Campaign

URL Schema:
US IDC: api1.netcoresmartech.com/campaign/execute
Indian IDC: api1-in.netcoresmartech.com/campaign/execute
Method:POST
Parameters:

Parameter

Description

Data Type

Required

type

This is the Campaign Type.
Will have ‘apn’, as this is API is for campaign creation

String

Yes

campiagn_id

This is the ID of the successfully created campaign created that you receive as a response of the create campaign AP.

String

Yes

data_source

The type of audience selection that you have chosen.(segment/list)

String

Yes

frequency_capping

Whether the user wants to frequency cap the campaign sent out.(yes/no)

String

Yes

📘

Data Source

Data Sources in the execution API currently supported are Lists and Segment. The data sources specify the audience to which the campaign is to be sent out.

Request Body:

{
    "type":"apn",
    "campaign_id" : 123 ,//Provided after successful execution of campaign creation API
    "data_source": "segment" or "list",
    "frequency_capping" : "false", //default panel setting value
    "list_id":"<listId>"
}
OR
{
    "type": "apn",
    "campaign_id": 123,
    "data_source": "segment",
    "frequency_capping" : "ture",
    "segment_id":"<segmentId>"
}

Response:

{
    "status": "success",
    "message": "Request received successfully",
    "request_id" : 10001
}

Updated 3 months ago


Push Notification API Campaigns


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.