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 API App Token. This token can be found within a Project in Settings > Integrations > API Integration, within the App Token field.

🚧

Token security

The API token is unique to a project. It is generated as a random string when the project is created, with uniqueness checks performed against the Xtremepush environment.
The token is only available to users with an admin role for the project.
Care should be taken when sharing the token, as it grants full API access to the project.
A single token is available for the project and can only be rotated manually through coordination with our support team.

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 24 days 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.