External API Overview

What you need to start using the external API, how you create remote requests and process the responses.

Prerequisites

To use the Xtremepush API you must have the App Token. This token can be found within a Project in Settings > Integrations > API Integration, within the App Token field. The token is unique to a Project.

Creating Requests

The external API methods are used by sending HTTP POST requests with JSON body to an API Endpoint.

https://external-api.xtremepush.com/api/external/{method name}/{model name}

Xtremepush manages a number of different instances located in different world regions. Each project on the platform is located in a single region, which is be selected when creating a project. You should use the corresponding API endpoint for each project:

The method and model names are shown in detail in the API Reference along with the available parameters. Examples are provided for cURL for easy testing, and the documentation allows live testing by supplying your own values for parameters.

Processing responses

After making a request to the API, the response is returned as a JSON formatted object. Specific examples are given in the API Reference for each method, but they all follow a basic structure:

{
  "code"      : integer http error/success code
  "success"   : boolean - whether client request is successful
  "message"   : string - system error message if code is error (4xx-5xx) for use in logging so can be reviewed in the event of errors 
  "errors"    : errors list if success is false (optional)
  "data"      : contains array of response data (optional)
  "model"     : contains created / updated object attributes (optional)
}
{
  "code": 200,
  "success": true,
  "message": "Campaign successfully created",
  "model": {
    "id": CAMPAIGN_ID,
    "text": "Testing Campaign is sent to subscribers to 15_01_04",
    "title": "Flag Test Campaign",
    ....
  }
}
{
  "code": 400,
  "success": false,
  "message": "Campaign is not created",
  "errors": {
    "text": ["Text cannot be blank."]
  }
}

Updated 3 months ago


External API Overview


What you need to start using the external API, how you create remote requests and process the responses.

Suggested Edits are limited on API Reference Pages

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