External API Overview

In this section, we give a quick overview of what you need to start using the external API, how you create remote requests and process the responses.

1. Prerequisites

To use the Xtremepush test app you must have the app token from an application that is live in a user account on external-api.xtremepush.com. This token can be found in your App Home in Settings > General Settings as shown below.

If you don't have an app integrated with the Xtremepush platform then you should check out our integration documentation first.

2. Creating remote requests

The external API methods are used by sending HTTP POST requests with JSON body to https://external-api.xtremepush.com.

The url is constructed from a combination of: Protocol identifier, HTTP secure is used for secure communication: https:// The domain name: external-api.xtremepush.com The API constant request identifier: /api/external/ The method name, action you are applying to data, for example: create The model name, this identifies the class storing the current model data that you want to change or view for example: campaign.

Each method also has its required attributes. Every method requires that the app token attribute is filled with the app token from your app settings on external-api.xtremepush.com. The API methods are covered in detail, in the following sections of the API documentation:

The API can be quickly tested from a command line terminal using curl (curl is a command line tool for transferring data with URL syntax). For example here is how you create a test push with curl and the Xtremepush API:

The command has the format of the curl command followed by the -d option followed by the JSON body, followed by the API URL. This is useful for some quick initial testing before integrating with your application.

3. Processing server responses

After making a HTTPS POST request to external-api.xtremepush.com using an API method any response is returned as a JSON formatted object. These JSON objects take the following form.