To start using Truepush APIs. Find the authorisation token in your settings(Your project -> settings -> Authentication Token).
Alternatively, you can find it in all projects page too (click 9 dots button on your top right). You can use the APIs by hitting our calls to api.truepush.com
Use this API to Create a new Campaign in your project.
Type | Params | Values |
---|---|---|
HEAD | authorization | string |
HEAD | content-type | application/json |
POST | title message link scheduled timings campaignExpiryTime buttons tags Segment userInteraction image icon | string string String boolean(true/false)(optional) object(optional) number(optional) list(optional) list(optional) segmentId(optional) boolean(optional)(true/false) URL(optional) URL(optional) |
If scheduled true | "timings": | |
If campaignExpiryTime | number(that takes hours)campaignExpiryTime: 2 | |
If campaignExpiryTime | number(that takes hours)campaignExpiryTime: 2 | |
If buttons | “buttons”: [ | |
If tags | “tags”: [“tag1”, “tag2”, “tag3”] | |
If segment | “segment”: “5f8d407ad11b5a2c2c524f63” |
curl -X POST \
--include \
--header "Authorization: YOUR-REST-API-TOKEN \
--header "Content-Type: application/json" \
-d '
https://api.truepush.com/api/v1/createCampaign
Status | Response |
---|---|
200 |
|
204 |
|
400 |
|
401 |
|
429 |
|
500 |
|
Use this API to Cancel Campaign in your project.
Type | Params | Values |
---|---|---|
HEAD | authorization | string |
HEAD | content-type | application/json |
GET | :id | campaignId |
curl -X PUT \
--include \
--header "Authorization:YOUR-REST-API-TOKEN \
https://api.truepush.com/api/v1/cancelCampaign/5fca2051f5dcf4f88078e23a
Status | Response |
---|---|
200 |
|
204 |
|
401 |
|
429 |
|
500 |
|
Use this API to see the stats of a particular campaign in your Project.
Type | Params | Values |
---|---|---|
HEAD | authorization | string |
HEAD | content-type | application/json |
GET | :id | campaignId |
curl -X GET \
--include \
--header "Authorization:YOUR-REST-API-TOKEN \
https://api.truepush.com/api/v1/campaignStats/5fca2051f5dcf4f88078e23a
Status | Response |
---|---|
200 |
|
204 |
|
401 |
|
429 |
|
500 |
|
Use this API to get list of all segments in ypur project.
Type | Params | Values |
---|---|---|
HEAD | authorization | string |
HEAD | authorization | string |
GET | :page | pageNumber |
curl -X GET \
--include \
--header "Authorization:YOUR-REST-API-TOKEN \
https://api.truepush.com/api/v1/listSegment/1
Status | Response |
---|---|
200 |
|
204 |
|
401 |
|
429 |
|
500 |
|
Use this API to delete the segments from your project
Type | Params | Values |
---|---|---|
HEAD | authorization | string |
HEAD | content-type | application/json |
DELETE | :id | segmentId |
curl -X DELETE \
--include \
--header "Authorization:YOUR-REST-API-TOKEN \
https://api.truepush.com/api/v1/deleteSegment/5f89365f51e2766113d29fd6
Status | Response |
---|---|
200 |
|
204 |
|
401 |
|
429 |
|
500 |
|
Use this API to create a new Template in your Project.
Type | Params | Values |
---|---|---|
HEAD | authorization | string |
HEAD | content-type | application/json |
POST | name title message link buttons tags userInteractionRequired image icon | string string string String list(optional) list(optional) boolean(optional)(true/false) URL(optional) URL(optional) |
If buttons | “buttons”: [ | |
If tags | “tags”: [“tag1”, “tag2”, “tag3”] |
curl -X POST \
--include \
--header "Authorization:YOUR-REST-API-TOKEN \
--header "Content-Type: application/json" \ -d '
https://api.truepush.com/api/v1/createTemplate
Status | Response |
---|---|
200 |
|
204 |
|
400 |
|
401 |
|
429 |
|
500 |
|
Use this API to Delete your existing templates from your Project.
Type | Params | Values |
---|---|---|
HEAD | authorization | string |
HEAD | content-type | application/json |
DELETE | :id | templateId |
curl -X DELETE \
--include \
--header "Authorization:YOUR-REST-API-TOKEN \
https://api.truepush.com/api/v1/deleteTemplate/5fb8d81b8deea45b89458df9
Status | Response |
---|---|
200 |
|
204 |
|
401 |
|
429 |
|
500 |
|
Use this API to see the list of Templates in your Project.
Type | Params | Values |
---|---|---|
HEAD | authorization | string |
HEAD | content-type | application/json |
GET | :page | pageNUmber |
curl -X GET \
--include \
--header "Authorization:YOUR-REST-API-TOKEN \
https://api.truepush.com/api/v1/listTemplate/1
Status | Response |
---|---|
200 |
|
204 |
|
401 |
|
429 |
|
500 |
|
Use this Campaign to a Create a new Trigger in your Project
Type | Params | Values |
---|---|---|
HEAD | authorization | string |
HEAD | content-type | application/json |
POST | namenote segmentId templateId type timings | string(Unique name) string(optional) string(segmentId) string(templateId) string(once/repeated/multiple) Object |
If type is once timings | timings : | |
If type is multiple timings | timings: | |
If type is multiple timings | If sub_type is daily timings: |
curl -X POST \
--include \
--header "Authorization:YOUR-REST-API-TOKEN \
--header "Content-Type: application/json" \
-d '
https://api.truepush.com/api/v1/createTrigger
Status | Response |
---|---|
200 |
|
204 |
|
400 |
|
401 |
|
429 |
|
500 |
|
Use this API to Delete Triggers from your project.
Type | Params | Values |
---|---|---|
HEAD | authorization | string |
HEAD | content-type | application/json |
DELETE | :id | triggerId |
curl -X DELETE \
--include \
--header "Authorization:YOUR-REST-API-TOKEN \
https://api.truepush.com/api/v1/deleteTrigger/5fb2087c68e8e445158b7307
Status | Response |
---|---|
200 |
|
204 |
|
401 |
|
429 |
|
500 |
|
Use this API to see the list of Triggers in your Project.
Type | Params | Values |
---|---|---|
HEAD | authorization | string |
HEAD | content-type | application/json |
GET | :page | pageNUmber |
curl -X GET \
--include \
--header "Authorization: YOUR-REST-API-TOKEN \
https://api.truepush.com/api/v1/listTrigger/1
Status | Response |
---|---|
200 |
|
204 |
|
401 |
|
429 |
|
500 |
|
Change this API to change the Trigger status from existing triggers in your project.
Type | Params | Values |
---|---|---|
HEAD | authorization | string |
HEAD | content-type | application/json |
PUT | :id status | triggerId string(active/inactive) |
curl -X PUT \
--include \
--header "Authorization:YOUR-REST-API-TOKEN \
--header "Content-Type: application/json" \
-d '
https://api.truepush.com/api/v1/triggerStatus/5fae1887042f2bee7ef8aef9
Status | Response |
---|---|
200 |
|
204 |
|
401 |
|
429 |
|
500 |
|
Use this API to see the List of campaigns in your Project.
Type | Params | Values |
---|---|---|
HEAD | authorization | string |
HEAD | content-type | application/json |
GET | :id :page | pageNUmber |
curl -X GET \
--include \
--header "Authorization:YOUR-REST-API-TOKEN \
https://api.truepush.com/api/v1/listCampaign/1
Status | Response |
---|---|
200 |
|
204 |
|
401 |
|
429 |
|
500 |
|