Basic authentication is required to access the REST API. Authentication includes the Request URL and API key. The first step is to create a header that includes the Content-Type and X-Apikey. A sample of the required header parameters with their values are listed below.
Example Request URL: http://api.trumpia.com/rest/v1/{username}/subscription
Header Parameters
Parameter | Description |
---|---|
Content-Type | application/json |
X-Apikey | Your API key (This can be found in the API Settings page after logging in.) Example value: 123456789abc1011 |
Response Formats | JSON |
Allowed Methods | PUT/GET/POST/DELETE |
URL | http://api.trumpia.com/rest/v1/{user_name}/{api_call} |
{user_name} | Your account username (this can be found in the Account Settings page after logging in.) |
{api_call} | The respective API function you are using. |
REST Methods
Method | Description |
---|---|
PUT | Used to create a resource. |
GET | Used to retrieve information. |
POST | Used to update a resource. |
DELETE | Used to delete a resource. |
Our System status codes page allows you to easily reference our REST API status codes and their definitions.
Code | Description |
---|---|
200 | OK |
403 | Access to resource is forbidden |
404 | Resource does not exist |
405 | Method not allowed |
Create a list → add subscription to a list(s) → send a message to a list or subscription |
Please note that a request_id is immediately returned after submitting an API request. Check the request_id using GET Report or you can set up PUSH Notifications for an automated process.