Reach your audience instantly through mobile text messaging. Learn more.
Channel the power of our messaging and customer database platform into your applications.
Each business is different with unique needs and goals. That’s why we’ve opened our industry-leading messaging platform through application programming interfaces (APIs). Backed by a robust infrastructure designed for reliability, scalability, and security, our APIs provide powerful and efficient ways of integrating our features with your services and applications.
Our messaging system enables you to send outbound messages to your audience as well as collect inbound contact information and messages. Leverage our multi-channel messaging platform to communicate to and from SMS, MMS, email, voice, or instant messaging.
Send your message through one channel, all, or a combination of them to reach your subscribers on their preferred method of communication.
Deliver your message to one or a group of subscribers
Schedule messages to be delivered immediately or at a specific time and date.
Configure message delivery to be one time or recurring.
To be able to send and receive messages successfully, your contact database is key.
Add contacts manually or automatically (through mobile keywords, online sign-up pages, etc.).
Manage individual subscribers by adding, editing, or deleting their subscriptions.
Target your audience by grouping subscribers into distribution lists based on specific data.
The backbone of any mobile text campaign is the mobile keyword. Create and manage your keyword all through our API as well as create customized response messages to be sent to your users when they text in your keyword.
Check the availability of your desired mobile keyword.
Add, update, or delete keywords.
Configure response messages to be sent automatically when your keyword is texted in by customers.
Both dedicated and shared short codes are available.
Secure, scalable, and robust, our infrastructure provides maximum reliability.
Behind every great product is great planning and execution. We try to make sure every contingency is covered, good or bad. With redundant paths, servers, and multiple security measures in place, our infrastructure is designed to provide a high level of service 24-7.
The availability of our messaging system to end users is maintained in a number of ways that increase redundancy and scalability.
Connections. Redundant connections within our own infrastructure and to our gateways provide users with continuous availability of our services.
Servers. Our servers are designed to accept multiple concurrent connections from users. This provides for efficiency, scalability, and availability so that requests are processed in time and all the time.
Our infrastructure is locked down by layers of security measures to ensure that your connections and customer data are protected. We work hard to give you peace of mind.
On the frontline of our defenses are hardware firewalls that are configured only specified protocols and IP addresses.
IP filtering allows only approved protocol connections:
Detects and prevents denial-of-service attacks (DoS).
Tested to resist common hacking techniques.
No customers or outside groups are allowed any direct access to servers.
Behind the firewall is an up-to-date antivirus system that actively scans for security vulnerabilities and viruses. Any detected problems are immediately quarantined and resolved.
Our web-based services are always available - which means that we’re also on our toes round the clock. We regularly check security logs for suspicious activity and respond immediately to maintain maximum uptime and system integrity.
Access to security logs are restricted to authorized individuals only.
Security logs are reviewed periodically by authorized personnel.
Only on-site security administrators have the ability to configure host operating systems.
Good security starts with good password policies. We follow industry best practices to take this common vulnerability out of a hacker’s equation.
All default account passwords are periodically changed in accordance with password requirements.
All security administrative passwords are periodically changed in accordance with password requirements.
Access to the system is restricted by role. Customers have access to only their own data and services, while high-level privileges are strictly limited to our system administrators.
System administrator/root (e.g., privileged, super user) access to host operating systems is limited only to individuals requiring such high-level access in the performance of their jobs.
System administrators are required to restrict access by users to only the commands, data, and information resources necessary to perform authorized functions.
Your data is your gold. We respect that and have designed our infrastructure to keep your information secure in every aspect. Only you have the right to assign permission to your data.
For business processes, data integrity is mission critical, which is why we rely on Oracle database to manage your assets.
All access is prohibited except for the registered servers in the data center.
Data is strictly partitioned.
Multiple backups of the database.
Information resources that store information, such as our application and database servers, reside on a trusted internal network.
There is no external access to the protected internal network.
We’ve taken great care in designing the architecture of our system to be efficient, available, and secure. From the physical layer to the application layer, our network has been hardened against abuse, intentional or not.
Our network and information resources are located in secure physical facilities with access restricted to authorized individuals only.
Publicly accessible web server data is protected by the implementation of a network demilitarized zone (DMZ). Packet filtering is performed on the data in the DMZ.
HTTPS security protocol used on publicly open servers.
Redundant servers used for emergency purposes.
| REST | HTTP (ver.1, 2) |
|
| Subscription (Contacts) | ||
| Create. Adds a new contact to your database. | ![]() |
![]() |
| Update. Change the contact information for an existing contact. | - | ![]() |
| Delete. Permanently remove a contact from your database. | ![]() |
![]() |
| Add to List. Add an existing contact to a list. | ![]() |
![]() |
| List (Contact Groups) | ||
| Create. Create a new distribution list. | ![]() |
![]() |
| Update. Make changes to an existing distribution list. | ![]() |
![]() |
| Delete. Permanently remove a distribution list. | ![]() |
![]() |
| Message | ||
| SMS. Send an SMS message. | ![]() |
![]() |
| Email. Send an email message. | ![]() |
![]() |
| IM. Send an instant-messenger message via AIM. | ![]() |
![]() |
| MMS. Send a MMS message with pictures or video. | ![]() |
- |
| Voice. Send a voice broadcast message to mobile and/or landlines. | ![]() |
![]() (Ver. 2 only) |
| Send to a single contact. | ![]() |
![]() |
| Send to all contacts on a distribution list. | ![]() |
![]() |
| Keyword | ||
| Check keyword. Check the availability of a mobile keyword. | ![]() |
![]() |
| Create keyword. Create your own mobile keyword and its auto-response message. | ![]() |
![]() |
| Update keyword. Change the settings of your mobile keyword and auto-response message. | ![]() |
![]() |
| Delete keyword. Permanently remove one of your mobile keywords. | ![]() |
![]() |
Efficient and simple. Rest easier with our REST API.
The REST API is just as fully featured as our HTTP API, with the ability to add, update, and create contacts, lists, and keywords as well as the ability to send Multimedia Messaging Service (MMS) messages. As the REST version is the focus of our API development, more updates and features are on the way.
Trumpia’s REST API is asynchronous and non-blocking, so it can handle multiple calls simultaneously. Once a request for a resource is submitted, a request ID is immediately sent back. You can also ask our Support Team to enable PUSH results, which, on completion of the processing of each API request, will return a detailed report in JSON format to a URL you provide. Alternatively, you can also submit a GET Status Report call to retrieve the results of any process by request ID.
This updated version is an asynchronous, non-blocking API, which can process multiple calls simultaneously.
Updates are sent back with tracking IDs until the system is done processing, at which point results are sent as a response.
Supports all the same functions as HTTP API ver. 1, including voice.
Results are pushed.
Each type of call made through the REST API is a uniform resource identifier (URI) that identifies a resource and a method. Then, you can set the parameters and their unique values.
To demonstrate how our REST API works, let’s take a look at how subscriptions, or contacts, are added to your Trumpia database. First, you would send the following resource request URI using the PUT method:
PUT http://api.trumpia.com/rest/v1/{user_name}/subscription
{
"list_name" : "restapi",
"subscriptions" :
[
{
"first_name":"firstname01",
"last_name":"lastname01",
"email":"email01@address.com",
"aim":"testaim",
"mobile":
{
"number":"1010101010",
"country_code":"1"
},
"voice_device" : "mobile"
},
{
"first_name":"firstname02",
"email":"email02@address.com",
"landline":
{
"number":"1234567890",
"country_code":"1"
},
"voice_device" : "landline"
}
]
}
The following response will be sent back upon receipt of the API user’s request to show that the request had been received and to uniquely identify the request for future reference.
{"request_id":"11111aaaaa22a2a2a2a2"}
You can use this requestID to look up the status and results of your API request using the Check Response function.
When a request is completed, a brief report indicating success or failure will be returned in JSON format. Each request may have different response fields and error codes, so be sure to read each request's documentation.
In response to the PUT request example above, the following JSON will be returned, displaying the subscription IDs of the newly created subscriptions that you requested.
Example (Success):
[
{"subscription_id":11111111},
{"subscription_id":22222222}
]
Example (Failure):
[
{
"first_name":"firstname01",
"error_message":"Already Registered Tools : Mobile",
"mobile":
{
"number":"6501111111",
"country_code":"1"
}
},
{
"voice_device":"landline",
"landline":
{
"number":"6502222222",
"country_code":"1"
},
"first_name":"firstname02",
"error_message":"Already Registered Tools : Landline"
}
]
* NOTE: To enable this feature, you must submit a request to our support team.
Now that you’ve had a taste of what our REST API is like and what it can do, go here to see the full list of coding parameters and examples.
| Resource Call | Description |
|---|---|
| List | |
| PUT List | Create a distribution list. |
| POST List | Update the parameters of a list. |
| DELETE List | Delete a list. |
| GET List | Retrieve information about your lists, including the list IDs, names, and parameters. |
| Subscription | |
| PUT Subscription | Add a new subscription to your database and associate it with an existing distribution list. |
| POST Subscription | Update a subscription's information, including name, email, phone numbers, and associated lists. |
| DELETE Subscription | Permanently delete a subscription from your database and any associated lists. |
| GET Subscription | Retrieve subscription information of your most recently created subscriptions or for specific subscriptions. |
| GET Search Subscription | Search for subscription IDs by various data types, including first or last name, phone number, email address, date the account was created, and more. |
| Message | |
| PUT Message | Send a mobile text (SMS, MMS), email, and/or IM message to specific subscription(s) or distribution list(s). |
| GET Message | Retrieve a report with detailed delivery statistics, such as total messages sent, number of messages successfully delivered, and number of messages failed. |
| Keyword | |
| PUT Keyword | Set up a mobile keyword that users can text in to your short code. |
| POST Keyword | Update one of your keywords. |
| DELETE Keyword | Delete one of your keywords. |
| GET Keyword | Retrieve information about your mobile keywords. |
| Report | |
| GET Status Report | Manually check the success or failure of your request. |
| Push | |
| PUT List | Receive a brief report of whether your list was successfully added or not. |
| POST List | Receive a brief report of whether your list was successfully updated or not. |
| DELETE List | Receive a brief report of whether your list was successfully deleted or not. |
| PUT Subscription | Receive a brief report of whether your subscription(s) was successfully added or not. |
| POST Subscription | Receive a brief report of whether your subscription was successfully updated or not. |
| DELETE Subscription | Receive a brief report of whether your subscription was deleted or not. |
| PUT Message | Receive a detailed report of the success or failure of your message blast. |
| PUT Keyword | Receive a brief report of whether your mobile keyword was created or not. |
| POST Keyword | Receive a brief report of whether your mobile keyword was updated or not. |
| DELETE Keyword | Receive a brief report of whether your mobile keyword was deleted or not. |
| Resource | Description |
|---|---|
| Incoming SMS Message | Accept incoming SMS messages sent from users in response to a mobile keyword campaign. |
| System Error Messages | In case you receive an error message when issuing an API resource call, refer to these lists for more explanation. |
The following section provides relevant resource URIs, method parameters, and examples for resource requests to manage your distribution lists.
| URI | Method |
|---|---|
| /rest/v1/{user_name}/list | PUT |
| /rest/v1/{user_name}/list/{list_id} | PUT |
| /rest/v1/{user_name}/list | POST |
| /rest/v1/{user_name}/list/{list_id} | POST |
| /rest/v1/{user_name}/list/{list_id} | DELETE |
| /rest/v1/{user_name}/list/{list_id} | GET |
| /rest/v1/{user_name}/list/{list_id} | GET |
Using the PUT method, create a distribution list of subscriptions for targeted campaigns or otherwise sending a message to a specific group of people. You can also create a list by using the POST method.
After creating a list, if you want to verify the list’s unique identifier (i.e., list_id) that is generated, use the push service or request a status report.
To send a request, the developer must include X-Apikey and content-type parameters in the header.
X-Apikey: 12345aaaaa67890aaaaa
Content-Type: application/json
| Parameter | Required | Description |
|---|---|---|
| list_name | Required | The name of your distribution list is case-insensitive but must contain only alphanumeric characters. The maximum length for a list name is 32 characters. |
| display_name | Required | The display name will be the name that your subscriptions will see when signing up for your distribution list. As this name is public, make sure it makes sense to your future subscriptions. |
| frequency | Required | The frequency of messages your subscriptions receive each month must be disclosed, according to mobile industry regulations. |
| description | Required | The description of the kind of messages your subscriptions will receive when they opt into this list must be disclosed. |
PUT http://api.trumpia.com/rest/v1/{user_name}/list
{ "list_name" : "listname", "display_name" : "display name", "frequency" : "10", "description" : "test list" }
POST http://api.trumpia.com/rest/v1/{user_name}/list
{ "list_name" : "listname", "display_name" : "display name", "frequency" : "10", "description" : "test list" }
{"request_id":"aaaaa11111bbbbb22222","list_id":"12345"}
Update the parameters of one your lists using list ID and the POST method.
After updating a list, if you want to verify the list’s unique identifier (i.e., list_id) that is generated, use the push service or request a status report.
To send a request, the developer must include X-Apikey and content-type parameters in the header.
X-Apikey: 12345aaaaa67890aaaaa
Content-Type: application/json
POST http://api.trumpia.com/rest/v1/{user_name}/list/{list_id}
{ "list_name" : "listname", "display_name" : "display name", "frequency" : "10", "description" : "test list" }
{"request_id":"120708003054767e9734"}
Permanently remove a list from your account using the DELETE method and the list ID.
To send a request, the developer must include X-Apikey and content-type parameters in the header.
X-Apikey: 12345aaaaa67890aaaaa
Content-Type: application/json
DELETE http://api.trumpia.com/rest/v1/{user_name}/list/{list_id}
{"request_id":"120708003054767e9734"}
Retrieve basic information about all your lists, including list names and IDs, or look up parameters for a specific list using the GET method.
To send a request, the developer must include X-Apikey and content-type parameters in the header.
X-Apikey: 12345aaaaa67890aaaaa
Content-Type: application/json
GET http://api.trumpia.com/rest/v1/{user_name}/list
{
"list":
[
{
"list_id": "123456",
"list_name": "Contacts"
},
{
"list_id": "234567",
"list_name": "VIP"
},
{
"list_id": "345678",
"list_name": "Coupons"
}
]
}
GET http://api.trumpia.com/rest/v1/{user_name}/list/{list_id}
{
"display_name":"ahcgnuj0055",
"description":"5 list",
"list_name":"ahcgnuj0055",
"frequency":"10",
"subscription_count":"0",
"mobile_count":"0",
"im_count":"0",
"email_count":"0"
}
The following section provides relevant resource URIs, method parameters, and examples for resource requests to manage subscriptions, or contacts.
| URI | Method |
|---|---|
| /rest/v1/{user_name}/subscription | PUT |
| /rest/v1/{user_name}/subscription/{subscription_id} | POST |
| /rest/v1/{user_name}/subscription/{subscription_id} | DELETE |
| /rest/v1/{user_name}/subscription | GET |
| /rest/v1/{user_name}/subscription/{subscription_id} | GET |
| /rest/v1/{user_name}/subscription/search | GET |
Create one or multiple subscriptions, or contacts, at one time with the following PUT template. A response will be returned with the subscriptions' assigned subscription_id(s) as well as the other parameters you initially provided.
After creating a subscription(s), if you want to verify the subscription's unique identifier (i.e., subscription_id) that is generated, use the push service or request a status report.
To send a request, the developer must include X-Apikey and content-type parameters in the header.
X-Apikey: 12345aaaaa67890aaaaa
Content-Type: application/json
| Parameter | Required | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| list_name | Required | list to add the subscription to | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| subscriptions | Required |
Note: Subscription information must be provided for at least one of the tools: voice device, email, or AIM.
json array type
|
PUT http://api.trumpia.com/rest/v1/{user_name}/subscription
{ "list_name" : "restapi", "subscriptions" : [ { "first_name":"firstname01", "last_name":"lastname01", "email":"email01@address.com", "aim":"testaim", "mobile": { "number":"1010101010", "country_code":"1" }, "voice_device" : "mobile" }, { "first_name":"firstname02", "email":"email02@address.com", "landline": { "number":"1234567890", "country_code":"1" }, "voice_device" : "landline" } ] }
{"request_id":"11111aaaaa22a2a2a2a2"}
Update the parameters of one of your subscriptions (i.e., subscription) by using subscription_id and the POST method.
After updating a subscription, if you want to verify the subscription's unique identifier (i.e., subscription_id) that is generated, use the push service or request a status report.
To send a request, the developer must include X-Apikey and content-type parameters in the header.
X-Apikey: 12345aaaaa67890aaaaa
Content-Type: application/json
| Parameter | Required | Description | |||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| list_name | Optional | To change the distribution list(s) that the subscription is subscribed to, update this parameter. | |||||||||||||||||||||||||||||||||
| subscriptions | Optional |
Subscription information must be provided for at least one of the following keys.
Note: In case you are deleting specific data from a subscription, for the desired parameter or key, include the value "delete".
|
POST http://api.trumpia.com/rest/v1/{user_name}/subscription/{subscription_id}
{ "list_name" : "restapi", "subscriptions" : [ { "first_name":"John", "last_name":"Doh", "email":"johndoh@jk-mail.com", "aim":"johndoh", "mobile": { "number":"14155551234", "country_code":"1" } } ] }
{"request_id" : "11111aaaaa22222bbbbb"}
Using the DELETE method and the specific subscription_id, you can delete a subscription, or contact, from your database.
To send a request, the developer must include X-Apikey and content-type parameters in the header.
X-Apikey: 12345aaaaa67890aaaaa
Content-Type: application/json
DELETE http://api.trumpia.com/rest/v1/{user_name}/subscription/{subscription_id}
{"message":"Success Delete Subscription","subscription_id":1234567}
Retrieve a list with the subscription IDs of your most recent subscriptions or the information for specific subscriptions through the GET method.
To send a request, the developer must include X-Apikey and content-type parameters in the header.
X-Apikey: 12345aaaaa67890aaaaa
Content-Type: application/json
| Parameter | Required | Description |
|---|---|---|
| row_size | Optional | Default: 100 You can set the number of task IDs you want to check. |
GET http://api.trumpia.com/rest/v1/{user_name}/subscription?row_size=10
{
"subscription_id_list":
[
"111111","222222","333333","444444","555555","666666","777777","888888",
"999999","101010"
]
}
GET http://api.trumpia.com/rest/v1/{user_name}/subscription/{subscription_id}
{
"created_date":"2012-02-27 18:05:33",
"landline":
{
"value":"1234567890","country_code":1,"verified":"true"
},
"email":
{
"value":"email02@address.com","verified":"true"
},
"first_name":"firstname01"
}
Search for subscription IDs by various data types, including first or last name, phone number, email address, date the account was created, and more.
To send a request, the developer must include X-Apikey and content-type parameters in the header.
X-Apikey: 12345aaaaa67890aaaaa
Content-Type: application/json
The body of your call should include the following parameters and values.
| Parameter | Required | Description | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| search_type | Required |
Type of subscription data to search for your subscription by.
|
||||||||||||||||||
| search_data | Required |
Based on the search_type selected above, you must provide the appropriate data. For example, if you would like to search for a specific subscription ID by email, set search_type=1 and provide that contact’s email address for search_data, such as search_data=johndoh@mail.com. If you would like to retrieve all the subscription IDs for which there are data for particular search types, for example all subscriptions with email addresses, set search_data=all. This feature only works for search types 1-4.
For searching by created date (i.e., search_type=103), the search_data must be in the format: YYYY-MM-DD HH24:MI:SS~YYYY-MM-DD HH24:MI:SS (ex: 2013-03-01 13:00:00~2013-04-01 13:00:00). To search over a date range, use the character "~" between the two dates. |
||||||||||||||||||
| list_id | Optional | You may limit the search to a specific distribution list. |
The following example includes the parameters and values necessary to search for the subscription with the email address johndoh@mail.com from the distribution list 12345.
GET http://api.trumpia.com/rest/v1/{user_name}/subscription/search?search_type=1&search_data=johndoh@mail.com&list_id=12345
The desired subscription ID will be sent back to your designated URL:
{"subscription_id_list":["12121212"]}
To search your entire database for all the subscriptions that have a landline phone number saved, you would submit the following call:
GET http://api.trumpia.com/rest/v1/{user_name}/subscription/search?search_type=3&search_data=all
The subscription IDs for all the relevant subscriptions will be returned:
{
"subscription_id_list":
[
"12121212","12123434","12345678","23232323","34212345","45326178",
"98765432","78563412"
]
}
The following section provides relevant resource URIs, method parameters, and examples for resource requests to send messages via mobile text (SMS or MMS), email, or IM.
| URI | Method |
|---|---|
| /rest/v1/{user_name}/message | PUT |
| /rest/v1/{user_name}/message/{message_id} | GET |
Send a message via mobile text, email, and/or instant messenger to one or multiple subscriptions or distribution lists. Please note that there are two different sets of PUT body parameters based on whether your message blast includes an SMS or MMS message.
After sending a message, if you want to verify the message's unique identifier (i.e., message_id) that is generated, use the push service or request a status report.
To send a request, the developer must include X-Apikey and content-type parameters in the header.
X-Apikey: 12345aaaaa67890aaaaa
Content-Type: application/json
| Parameter | Required | Description | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| description | Required | description of your message for your reference | ||||||||||||||||||||||||||||
| Optional |
|
|||||||||||||||||||||||||||||
| im | Optional |
|
||||||||||||||||||||||||||||
| sms / mms (select one) |
Optional |
SMS:
MMS:
Characters allowed:
|
||||||||||||||||||||||||||||
| recipients | Required |
|
||||||||||||||||||||||||||||
| mail_merge | Optional |
|
||||||||||||||||||||||||||||
| send_date | Optional | yyyy-MM-dd HH:mm:ss (ex: 2009-04-22 14:10:32) |
PUT http://api.trumpia.com/rest/v1/{user_name}/message
{ "description" : "This is a description", "email" : { "subject" : "Trumpia REST API is here!", "body" : "Contact support for more info." }, "sms" : { "message" : "Hello, Trumpia REST API is out now!" }, "recipients" : { "type" : "list", "value" : "1234, 2345" } }
{
"request_id" : "abcde12345",
"message_id" : "1234500054321"
}
Receive a detailed delivery report for a specific message. Returned statistics include total messages, the number of messages successfully delivered, and the number of messages failed.
To send a request, the developer must include X-Apikey and content-type parameters in the header.
X-Apikey: 12345aaaaa67890aaaaa
Content-Type: application/json
GET http://api.trumpia.com/rest/v1/{user_name}/message/{message_id}
The following examples are for message blasts that include SMS. For blasts that include MMS, the only difference will be that the "sms" parameter will be called "mms".
{
"status":"sent",
"email":{"total":5,"sent":2,"failed":3},
"sms":{"total":5,"sent":5,"failed":0},
"im":{"total":5,"sent":1,"failed":4},
"coupon":
[
{"coupon_code":"1111","subscription":"6666666"},
{"coupon_code":"2222","subscription":"7777777"},
{"coupon_code":"3333","subscription":"8888888"},
{"coupon_code":"4444","subscription":"9999999"},
{"coupon_code":"5555","subscription":"0000000"}
]
}
{
"status":"sent",
"email":{"total":5,"sent":2,"failed":3},
"sms":{"total":5,"sent":5,"failed":0},
"im":{"total":5,"sent":1,"failed":4},
"coupon":
[
{"coupon_code":"1111","subscription":"6666666"},
{"coupon_code":"2222","subscription":"7777777"},
{"coupon_code":"3333","subscription":"8888888"},
{"coupon_code":"4444","subscription":"9999999"},
{"coupon_code":"5555","subscription":"0000000"}
]
}
{
"status":"scheduled",
"email":{"total":5,"sent":0,"failed":0},
"sms":{"total":5,"sent":0,"failed":0},
"im":{"total":5,"sent":0,"failed":0},
"coupon":
[
{"coupon_code":"1111","subscription":"6666666"},
{"coupon_code":"2222","subscription":"7777777"},
{"coupon_code":"3333","subscription":"8888888"},
{"coupon_code":"4444","subscription":"9999999"},
{"coupon_code":"5555","subscription":"0000000"}
]
}
{
"status":"sent",
"email":{"total":2,"sent":2,"failed":0},
"sms":{"total":1,"sent":1,"failed":0}
}
Enable users to receive an auto-response message or to send their own message to your designated email account by setting up a mobile keyword. A keyword is a unique name that you create, which users can text in to your assigned short code.
| URI | Method |
|---|---|
| /rest/{version}/{user_name}/keyword | POST |
| /rest/{version}/{user_name}/keyword/{keyword_id} | POST |
| /rest/{version}/{user_name}/keyword/{keyword_id} | DELETE |
| /rest/{version}/{user_name}/keyword | GET |
| /rest/{version}/{user_name}/keyword/{keyword_id} | GET |
Set up your mobile keyword by providing the following parameters.
After creating a keyword, if you want to verify the keyword's unique identifier (i.e., keyword_id) that is generated, use the push service or request a status report.
To send a request, the developer must include X-Apikey and content-type parameters in the header.
X-Apikey: 12345aaaaa67890aaaaa
Content-Type: application/json
| Parameter | Required | Description | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| keyword | Required | Enter the name of your mobile keyword. | |||||||||||||||
| lists | Required | The list that subscriptions will be added to. | |||||||||||||||
| allow_message | Required | Valid value is TRUE or FALSE. This enables users to add their own message or response after the keyword. This message will be sent to your Inbox. | |||||||||||||||
| auto_response | Required |
Configure the settings of your auto-response message.
Characters allowed: |
|||||||||||||||
| notify | Optional |
Configure to be notified of any messages from your users.
|
PUT http://api.trumpia.com/rest/{version}/{user_name}/keyword
{ "keyword" : "testKeyword", "lists" : "12345,67890", "allow_message" : "true", "auto_response" : { "frequency" : "2", "message" : "hi this is auto response message", "alternative_message" : "welcome back :)" }, "notify" : { "email" : "test@email.com", "mobile" : "7143330000", "subscription" : "new" } }
{"request_id":"aaaaa11111bbbbb22222"}
Update the information for a specific keyword by providing the keyword ID. All the parameters of the PUT Keyword call can be changed except for the "keyword" parameter; the keyword name cannot be changed.
After updating a keyword, if you want to verify the keyword's unique identifier (i.e., keyword_id) that is generated, use the push service or request a status report.
To send a request, the developer must include X-Apikey and content-type parameters in the header.
X-Apikey: 12345aaaaa67890aaaaa
Content-Type: application/json
POST http://api.trumpia.com/rest/{version}/{user_name}/keyword/{keyword_id}
{ "notify" : { "email" : "test01@email.com", "mobile" : "3533353535" } }
{"request_id":"120708003054767e9734"}
Delete one of your keywords by providing the keyword ID.
To send a request, the developer must include X-Apikey and content-type parameters in the header.
X-Apikey: 12345aaaaa67890aaaaa
Content-Type: application/json
DELETE http://api.trumpia.com/rest/{version}/{user_name}/keyword/{keyword_id}
{"request_id":"120708003054767e9734"}
Retrieve general information, like keyword names and associated short codes, for all your keywords, or get more complete details for a specific keyword by providing its keyword ID.
To send a request, the developer must include X-Apikey and content-type parameters in the header.
X-Apikey: 12345aaaaa67890aaaaa
Content-Type: application/json
GET http://api.trumpia.com/rest/{version}/{user_name}/keyword
{
"keyword":
[
{"keyword_id":"1111","keyword":"keyword01","shortcode":"69302"},
{"keyword_id":"2222","keyword":"keyword02","shortcode":"69302"},
{"keyword_id":"3333","keyword":"keyword03","shortcode":"69302"}
]
}
GET http://api.trumpia.com/rest/{version}/{user_name}/keyword
{
"keyword":"keyword",
"auto_response_message":"This is the keyword message.",
"shortcode":"69302",
"alternative_message":"Hi there!"
"alternative_coupon":"This is the alternative coupon message."
}
Manually check the success or failure of your request.
| URI | Method |
|---|---|
| /rest/v1/{user_name}/report/{request_id} | GET |
Retrieve the status of a request by providing the request ID. A successfully processed request will return the results of the request. If the request is currently being processed or has failed, a message indicating so will be returned.
To send a request, the developer must include X-Apikey and content-type parameters in the header.
X-Apikey: 12345aaaaa67890aaaaa
Content-Type: application/json
GET http://api.trumpia.com/rest/v1/{user_name}/report/{request_id}
{"request_id":"aaaaa11111bbbbb22222","list_id":"12345"}
Instead of a manual GET Status Report, you can have results automatically sent to you once our system has finished processing your resource call. Results will be delivered as JSON data to a URL you provide. To enable this functionality, contact our support team.
A brief report indicating whether your list was successfully added or not will be pushed to your designated URL.
{
"request_id":"aaaaa11111bbbbb22222",
"list_id":"123456",
"status":"Create List Success"
}
{
"request_id":"aaaaa11111bbbbb22222",
"error_message":"Invalid list_name : This list name is already registered."
}
A brief report indicating whether your list was successfully updated or not will be pushed to your designated URL.
{
"status":"Update List Success",
"list_id":"123456"
}
{
"request_id":"aaaaa11111bbbbb22222",
"error_message":"Invalid list_name : This list name is already registered."
}
A brief report indicating whether your list was successfully deleted or not will be pushed to your designated URL.
{
"request_id":"aaaaa11111bbbbb22222",
"list_id":"123456",
"status":"Delete List Success"
}
{
"request_id":"aaaaa11111bbbbb22222",
"error_message":"Authentication failed : Invalid API key for this list_id."
}
Results indicating which subscriptions were successfully added or not will be pushed to your designated URL.
[
{"subscription_id":11111111},
{"subscription_id":22222222}
]
[
{
"first_name":"firstname01",
"error_message":"Already Registered Tools : Mobile",
"mobile":
{
"number":"6501111111",
"country_code":"1"
}
},
{
"voice_device":"landline",
"landline":
{
"number":"6502222222",
"country_code":"1"
},
"first_name":"firstname02",
"error_message":"Already Registered Tools : Landline"
}
]
Results indicating which subscriptions were successfully updated or not will be pushed to your designated URL.
{
"request_id":"aaaaa11111bbbbb22222",
"subscription_id":"1234567",
"message":"Success Update Subscription"
}
{
"request_id":"aaaaa11111bbbbb22222",
"error_message":"Already Registered Tools : Mobile"
}
A brief report indicating whether your subscription was successfully deleted or not will be pushed to your designated URL.
{
"request_id":"aaaaa11111bbbbb22222",
"subscription_id":3861553,
"message":"Success Delete Subscription"
}
{
"request_id":"aaaaa11111bbbbb22222",
"error_message":"Invalid subscription_id."
}
Receive a detailed report of the success or failure of your message blast including tallies of the total messages in your blast, the number of messages successfully delivered, and the number of failed messages.
{
"request_id":"aaaaa11111bbbbb22222",
"message_id":"12345",
"status":"sent",
"sms":
{
"total":1,
"sent":1,
"failed":0
},
"email":
{
"total":2,
"sent":2,
"failed":0
}
}
{
"request_id":"aaaaa11111bbbbb22222",
"error_message":"Send message error : You have insufficient Text Credits."
}
A brief report indicating whether your mobile keyword was successfully created or not will be pushed to your designated URL.
{
"request_id":"aaaaa11111bbbbb22222",
"keyword_id":"1234",
"status":"Create keyword success."
}
{
"request_id":"aaaaa11111bbbbb22222",
"error_message":"Already Registered keyword."
}
A brief report indicating whether your mobile keyword was successfully updated or not will be pushed to your designated URL.
{
"request_id":"aaaaa11111bbbbb22222",
"keyword_id":"1234",
"status":"Update keyword success."
}
{
"request_id":"aaaaa11111bbbbb22222",
"error_message":"Invalid mobile number format."
}
A brief report indicating whether your mobile keyword was successfully deleted or not will be pushed to your designated URL.
{
"request_id":"aaaaa11111bbbbb22222",
"keyword_id":"1234",
"status":"Delete keyword success."
}
{
"request_id":"aaaaa11111bbbbb22222",
"error_message":"Authentication failed : Invalid keyword_id."
}
In addition to the primary functions of the API, the API can also forward incoming SMS messages from your users to you. And in case you encounter error messages in processing your API requests, we also provide a list of system error messages to help debug your commands.
Our API allows two-way communication for mobile text messages. When a user texts in a mobile keyword and an optional message, the text message can be forwarded to your server. Our system parses all incoming text messages and identifies the keyword and forwards to the keyword owner's server via HTTP GET.
There are many applications of this feature, including the ability to generate an automated response to a customer's text message based on the contents of the text message. You can also use this feature to trigger a procedure or some action on your server whenever a customer sends a text message to your keyword.
Keywords can be set up via our website or the API and can be configured to accept a message after the keyword. So, customers can text in the keyword followed by any message. This message is also forwarded to your server.
A simple example would be a search engine application where the keyword is "search" and the message would be the search criteria. Our system would forward this text message to the client's server and the client's server would run the query and send the results back to the customer using our API.
To enable this service, you will need to contact us and request this function.
You will need to provide a URL to which our servers will send a GET the incoming keyword text messages. You can also adjust the settings to bypass or skip any of our current normal keyword sign-up process.
| Paragmeter | Description |
|---|---|
| Receiving URL | This is where our system will GET the incoming keyword text messages. |
| Incoming Message | If you turn on this flag, our system will GET XML messages to the Receiving URL. |
| Sign-up via Keyword | If you turn off this flag, you can skip the normal sign-up process. Users will not be automatically added to the list in your account. |
| Notification for Keyword Sign-up or Message | If you turn off this flag, you can skip the sending of notifications when there is a sign-up for your account. |
| Auto-response for Keyword Sign-up or Message | If you turn off this flag, you can skip sending of the automated response messages for keywords. This option is usually set if you are generating your own response in your API code. |
| Inbox for Keyword Messages | If you turn off this flag, you can skip storing the incoming keyword messages in your account Inbox. |
XML String - Passed in query string:
<?xml version="1.0" encoding="UTF-8" ?>
<API>
<PHONENUMBER>1234567890</PHONENUMBER>
<KEYWORD>keyword</KEYWORD>
<SUBSCRIPTION_UID>12345<SUBSCRIPTION_UID>
<CONTENTS><![CDATA[contents]]></CONTENTS>
</API>
Sample GET call from our server to your URL:
http://www.yourserver.com/incomingsms.php?xml=<?xml version="1.0" encoding=
"UTF-8" ?><API><PHONENUMBER>1234567890</PHONENUMBER><KEYWORD />
<SUBSCRIPTION_UID /><CONTENTS><![CDATA[contents]]></CONTENTS></API>
Whenever there is a problem in processing your API request, an error message will be returned providing a reason why. For explanations of each error message, refer to the list of system error messages.
| Error Type | Description |
|---|---|
| Subscription | Errors in creating, deleting, or retrieving subscriptions (i.e., contacts). |
| List | Errors in creating, updating, deleting, or retrieving lists (i.e., contact groups). |
| Message | Errors in creating, updating, or retrieving messages. |
| Keyword | Errors in creating, updating, or deleting mobile keywords. |
| subscription_put Error Message | Description |
|---|---|
| Authentication failed : Invalid API key for this domain. | An invalid API key was used for the domain provided. |
| Authentication failed : Invalid IP address. | An invalid API key was used for the IP address provided. |
| Blocked tools : [tool list]* |
The tool being added is blocked.
* Tools include: email, mobile phone, landline phone, and AOL IM. |
| Distribution list not found. | The list being added was not found. |
| Invalid AIM ID format. | The AIM ID is incorrectly formatted. |
| Invalid country code. | An invalid country code was entered. |
| Invalid email address format. | The email address is incorrectly formatted. |
| Invalid first name : You have exceeded the maximum length of 30 characters. | The first name of the subscription exceeds the maximum length allowed. |
| Invalid landline number format. | The landline number is incorrectly formatted. |
| Invalid last name : You have exceeded the maximum length of 30 characters. | The last name of the subscription exceeds the maximum length allowed. |
| Invalid mobile number format. | The mobile number is incorrectly formatted. |
| List_name is empty. | The list_name is empty. |
| Missing subscription tools. | Tool information is missing for the subscription being added. |
| Registered tools : [tool list]* |
The tool being added has already been registered.
* Tools include: email, mobile phone, landline phone, and AOL IM. |
| Subscriptions is missing. | The subscriptions field is empty. |
| Voice device: Invalid phone number. US and Canada numbers only. | An invalid U.S. or Canadian phone number was entered. |
| Voice tool value for designated landline is empty. | Although landline is the voice tool selected, there are no landline values inputted. |
| Voice tool value for designated mobile is empty. | Although mobile is the voice tool selected, there are no mobile values inputted. |
| subscription{id}_delete Error Message | Description |
| Invalid subscription_id. | The requested subscription is invalid. |
| subscription{id}_get Error Message | Description |
| Invalid subscription_id. | The requested subscription is invalid. |
| subscription_search_get Error Message | Description |
| Authentication failed : Invalid API key for this domain. | An invalid API key was used for the domain provided. |
| Authentication failed : Invalid IP address. | An invalid API key was used for the IP address provided. |
| Date format must be YYYY-MM-DD HH24:MI:SS. | Unsupported date format. Dates have to be in the format of "YYYY-MM-DD HH24:MI:SS". |
| Invalid list_id. Please re-check the list_id. | Invalid list id is given. |
| Invalid search_data : Search_data must be 1-90 characters in length. | Length of search data exeeded the character length limit. Please limit the search_data to 1~90 characters. |
| No subscription found with given criteria. | No subscription was found with given criteria - search_type and search_data. |
| Search_data is empty. | Search data is not specified. |
| Search_type is empty. | Search type is not specified. |
| Search_type must be an integer value 1-4 or 102-105. Please see documentation for search_type values. | Search type value is unsupported type. Supported search type values are 1~4 and 102~105. |
| list_put, list_post | Description |
|---|---|
| Description is empty. | The description has not been inputted. |
| Display_name is empty. | The display name has not been inputted. |
| Frequency is empty. | The frequency has not been inputted. |
| Invalid description : Special characters are not allowed. | The description includes special characters, which are not allowed. |
| Invalid description : The display_name must be 1-20 characters in length. | The description exceeds the maximum length allowed. |
| Invalid display_name : Special characters are not allowed. | The display name includes special characters or spaces, which are not allowed. |
| Invalid display_name : The display_name must be 1-50 characters in length. | The frequency exceeds the maximum length allowed. |
| Invalid display_name : You have exceeded the maximum length of 50 characters. | The display name exceeds the maximum length allowed. |
| Invalid frequency : You have entered a non-numeric value. | The frequency includes a non-numeric value, which is not allowed. |
| Invalid list_name : Special characters are not allowed. | The list name includes special characters or spaces, which is not allowed. |
| Invalid list_name : This list name is already registered. | The list name is already registered. |
| Invalid list_name : This list name is already registered. | The list name is already registered. |
| Invalid list_name : The list_name must be 1-30 characters in length. | The list name exceeds the maximum length allowed. |
| list{id}_post, list{id}_put | Description |
| Authentication failed : Invalid API key for this list_id. | The list ID you queried does not belong to you. |
| Description is empty. | The description has not been inputted. |
| Display_name is empty. | The display name has not been inputted. |
| Frequency is empty. | The frequency has not been inputted. |
| Invalid description : Special characters are not allowed. | The description includes special characters, which are not allowed. |
| Invalid description : The display_name must be 1-20 characters in length. | The description exceeds the maximum length allowed. |
| Invalid display_name : Special characters are not allowed. | The display name includes special characters or spaces, which are not allowed. |
| Invalid display_name : The display_name must be 1-50 characters in length. | The display name exceeds the maximum length allowed. |
| Invalid frequency : You have entered a non-numeric value. | The frequency includes a non-numeric value, which is not allowed. |
| Invalid frequency : You have exceeded the maximum length of 3 characters. | The frequency exceeds the maximum length allowed. |
| Invalid list name : This list name is already registered. | This list name is already registered. |
| Invalid list_name : Special characters and spaces are not allowed. | The list name includes special characters or spaces, which is not allowed. |
| Invalid list_name : The list_name must be 1-30 characters in length. | The list leftBorder exceeds the maximum length allowed. |
| List_id not found. | The list you tried to edit does not exist. |
| List_name is empty. | The tool type has not been inputted. |
| list{id}_delete | Description |
| Authentication failed : Invalid API key for this list_id. | Description |
| list_put, list_post | The list ID you queried does not belong to you. |
| Authentication failed : Invalid API key for this list_id. | The list ID you queried does not belong to you. |
| Delete list : This list cannot be deleted. It is currently being used by another feature you have configured. | The list cannot be deleted because it is in use by another feature you are using. For example, you cannot delete a list for a mobile keyword if that same list has been assigned to mobile coupons. |
| list{id}_get | Description |
| Authentication failed : Invalid list_id. | The list ID you queried does not belong to you. |
| List_id not found. | The list ID you queried does not exist. |
| message_put | Description | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Invalid description. | No description was inputted. | ||||||||||
| Invalid email subject : You have exceeded the maximum length of 200 characters. | The subject line of your email message exceeds the maximum length allowed. | ||||||||||
| Invalid file type : [file extension]** is not supported. |
The file type of your MMS attachment is not supported.
** Supported image file extensions are .JPG, .PNG, .GIF (non-animated), and .BMP. The maximum image file size is 500 KB. Supported video file extensions are .AVI, .MP4, .WMV, and .MOV. For a list of supported video and audio codecs, go here.
|
||||||||||
| Invalid IM message : You have exceeded the maximum length of 500 characters. | The body of your IM message exceeds the maximum length allowed. | ||||||||||
| Invalid list_id : Special characters and spaces are not allowed. | Your list ID includes special characters or spaces, which are not allowed. | ||||||||||
| Invalid mail merge first name : You have exceeded the maximum length of 30 characters. | The first name from the mail merge exceeds the maximum length allowed. | ||||||||||
| Invalid mail merge last name : You have exceeded the maximum length of 30 characters. | The last name from the mail merge exceeds the maximum length allowed. | ||||||||||
| Invalid mail merge last name : You have exceeded the maximum length of 30 characters. | The last name from the mail merge exceeds the maximum length allowed. | ||||||||||
| Invalid MMS message : You have exceeded the maximum length of 500 characters. | The body of your MMS message exceeds the maximum length allowed. | ||||||||||
| Invalid recipient type. | The recipient type you have entered is not a valid subscription or list. | ||||||||||
| Invalid send_date : Format must be yyyy-MM-dd HH:mm:ss. | No description was inputted. | ||||||||||
| Invalid description. | The format of the send date and time is incorrect. | ||||||||||
| Invalid SMS message : You have exceeded the maximum length of 155 characters. | The body of your SMS message exceeds the maximum length allowed. | ||||||||||
| Invalid SMS, MMS. | Both SMS and MMS cannot be selected for the same mobile text campaign. | ||||||||||
| Invalid subscription_id : Please enter a valid subscription_id. | The subscription ID is empty. You must enter a valid one. | ||||||||||
| Invalid subscription_id : Special characters and spaces are not allowed. | Your subscription ID includes special characters or spaces, which are not allowed. | ||||||||||
| Invalid subscription_id selected. | No description was inputted. | ||||||||||
| Invalid description. | You have entered an invalid subscription ID. | ||||||||||
| MMS message body is empty. | The body of your MMS message is empty. | ||||||||||
| Invalid description. | No description was inputted. | ||||||||||
| Reply_to email address is empty. | The reply_to email address of your message is empty. | ||||||||||
| Send message error : Credit error. | There was some other type of credit error. | ||||||||||
| Send message error : Inadequate subscription information for the message tool selected. | You either have not selected a distribution list or the list you selected does not contain subscription information for the message send type that you have chosen. For example, if you checked mobile text as the send type, but there are no mobile phone numbers in the list you selected. | ||||||||||
| Send message error : Sorry! An error occurred due to issues with your account : ([error code(integer value)]) | In sending your message, there was an error during the text credit check. | ||||||||||
| Send message error : The number of mobile keywords created exceeds the current plan's limit. | The number of mobile keywords you are trying to create exceeds your current plan's limit. | ||||||||||
| Send message error : The number of subscriptions you have exceeds the current plan's limit. | The number of subscriptions you are trying to send a message to exceeds your current plan's limit. | ||||||||||
| Send message error : You have entered a date and time that are in the past. | You cannot enter a past time and date in sending messages. | ||||||||||
| Send message error : You have insufficient text credits. | You do not have enough text credits to send the message. | ||||||||||
| Send message error : Your account is past due. | Your account is past due. | ||||||||||
| Send message error : Your total number of emails has exceeded the current monthly plan's limit. | The total number of emails exceeds your current plant's limit. | ||||||||||
| Send message error : Your trial period has expired. | Your trial period has expired. | ||||||||||
| SMS message body is empty. | The body of your SMS message is empty. | ||||||||||
| The selected coupon campaign has an insufficient supply of coupons. Number of coupons must be 10% higher than selected subscriptions. | There is an insufficient supply of coupons. | ||||||||||
| To provide adequate time for coupon redemption, coupons must be sent out at least 24 hours before they expire. | The coupon included in your message expires in less than 24 hours. Please set a longer redemption period. | ||||||||||
| message{id}_get | Description | ||||||||||
| Invalid message_id. | You have entered an invalid message ID. | ||||||||||
| Send message failed. | Your request has failed due to inadequate conditions. | ||||||||||
| This message failed due to insufficient coupons. | Your message was not sent due to insufficient supply of coupons. |
| keyword_put | Description |
|---|---|
| Allow message is empty. | An option was not provided for the allow message parameter. |
| Alternative coupon is empty. | An alternative coupon message has not been inputted. |
| Auto response is empty. | An auto response has not been inputted. |
| Create keyword error : To create additional keywords, please upgrade your plan. | The number of keywords you can create is limited by your plan type. To add more keywords, you will need to upgrade your plan. |
| Invalid allow message : Special characters are not allowed. | The allow message parameter only accepts True or False as values. |
| Invalid alternative coupon : Special characters are not allowed. | An invalid character was inputted in your alternative coupon message. |
| Invalid alternative coupon message : You have exceeded the maximum length of [132 or 155] characters. | You have exceeded the maximum character limit for the alternative coupon message. |
| Invalid auto-response alternative message : You have exceeded the maximum length of [132 or 155] characters. | You have exceeded the maximum character limit for the auto-response alternative message. |
| Invalid auto-response message : You have exceeded the maximum length of [132 or 155] characters. | You have exceeded the maximum character limit for the auto-response message. |
| Invalid coupon. | An invalid coupon was inputted. |
| Invalid email address format. | The inputted email address is in an invalid format. |
| Invalid frequency : Value must be 1, 2, or 3. | The frequency parameter only accepts 1, 2, or 3 as values. |
| Invalid keyword : Mobile sign-up keyword must be 4-50 characters in length. | Keywords can only be 4-50 characters in length. |
| Invalid keyword : Special characters are not allowed. | An invalid character was inputted in your keyword. |
| Invalid list selected : [inserted list id] | An invalid list ID was inputted. |
| Invalid lists : Only numerical values are valid. | Your lists can only include numerical values; no other characters are allowed. |
| Invalid mobile number format. | The inputted mobile number is in an invalid format. |
| Invalid notify subscription : Special characters are not allowed. | An invalid character was inputted for notify subscription. |
| Invalid response message : Special characters are not allowed. | An invalid character was inputted in your response message. |
| Keyword already exists. | The keyword you submitted is already in use. |
| Keyword is empty. | A keyword name has not been inputted. |
| Lists is empty. | A list must be associated with your keyword. |
| Notify subscription is empty. | You did not provide a value for the notify subscription parameter. |
| Please enter a notify address. | You did not provide a mobile number or email address even though the notify parameter was set. |
| Response message is empty. | A response message has not been inputted. |
| keyword_post | Description |
| Allow message is empty. | An invalid character was inputted in your keyword. |
| Alternative coupon is empty. | An alternative coupon message has not been inputted. |
| Auto response is empty. | An auto response has not been inputted. |
| Invalid allow message : Special characters are not allowed. | The allow message parameter only accepts True or False as values. |
| Invalid alternative coupon : Special characters are not allowed. | An invalid character was inputted in your alternative coupon message. |
| Invalid alternative coupon message : You have exceeded the maximum length of [132 or 155] characters. | You have exceeded the maximum character limit for the alternative coupon message. |
| Invalid auto-response alternative message : You have exceeded the maximum length of [132 or 155] characters. | You have exceeded the maximum character limit for the auto-response alternative message. |
| Invalid auto-response message : You have exceeded the maximum length of [132 or 155] characters. | You have exceeded the maximum character limit for the auto-response message. |
| Invalid coupon. | An invalid coupon was inputted. |
| Invalid email address format. | The inputted email address is in an invalid format. |
| Invalid frequency : Value must be 1, 2, or 3. | The frequency parameter only accepts 1, 2, or 4 as values. |
| Invalid list selected : [inserted list id] | An invalid list ID was inputted. |
| Invalid lists : Only numerical values are valid. | Your lists can only include numerical values; no other characters are allowed. |
| Invalid mobile number format. | The inputted mobile number is in an invalid format. |
| Invalid notify subscription : Special characters are not allowed. | An invalid character was inputted for notify subscription. |
| Invalid response message : Special characters are not allowed. | An invalid character was inputted in your response message. |
| Lists is empty. | A list must be associated with your keyword. |
| Notify subscription is empty. | You did not provide a value for the notify subscription parameter. |
| Please enter notify address. | You did not provide a mobile number or email address even though the notify parameter was set. |
| Please enter notify address. | You did not provide a mobile number or email address even though the notify parameter was set. |
| Response message is empty. | A response message has not been inputted. |
| You cannot modify keyword name. | The keyword name cannot be updated. |
| keyword_delete | Description |
| Authentication failed : Invalid keyword_id. | You have attempted to delete an invalid keyword. |
Add messaging and contact collection to your system with just HTML.
Enhance your applications or services with our messaging and customer database features through our HTTP API. With our feature-rich, two-way API, you can send messages through SMS, instant messaging (AIM), voice network, and email to a single contact or to an entire distribution list. You can even manage the contacts and your mobile keywords programmatically.
This updated version is an asynchronous, non-blocking API, which can process multiple calls simultaneously.
Updates are sent back with tracking IDs until the system is done processing, at which point results are sent as a response.
Supports all the same functions as HTTP API ver. 1, including voice.
Results are pushed.
Each function is called by identifying the relevant uniform resource identifier (URI) and the POST method. Then, you can set the parameters and their unique values.
To demonstrate how our HTTP API works, let’s take a look at how to add an individual subscription, or contact, to your Trumpia database. First, you would send the following resource request URI using the POST method:
<form method = "post" action = "http://api.trumpia.com/http/v2/addcontact">
<input type="text" name="apikey" value="1234567890">
<input type="text" name="first_name" value="firstname">
<input type="text" name="last_name" value="lastname">
<input type="text" name="email" value="abc@abc.com">
<input type="text" name="country_code" value="1">
<input type="text" name="mobile_number" value="1234567890">
<input type="text" name="aim" value="abc">
<input type="text" name="list_name" value="listname">
<input type="text" name="send_verification" value="TRUE">
<input type="text" name="allow_access_info" value="TRUE">
<input type="text" name="custom_verification_msg" value="custom verify
message">
</form>
The following response will be sent back upon receipt of the API user’s request to show that the request had been received and to uniquely identify the request for future reference.
{"requestID":"123123123123123123123"}
You can use this requestID to look up the status and results of your API request using the Check Response function.
Now that you’ve had a taste of what our HTTP API is like and what it can do, go here to see the full list of coding parameters and examples.
| Resource Call | Description |
|---|---|
| Contact | |
| Add Contact | Adds a new contact to your database and associate it with an existing distribution list. |
| Update Contact Data | Update contact information by referencing contact ID. |
| Remove Contact | Remove a contact from a distribution list. |
| Delete Contact | Permanently delete a contact from your database and any associated lists. |
| Get Contact Data | Retrieve contact information including tools and associated lists. |
| Get Contact ID | Retrieve the contact ID to identify a specific contact. |
| List | |
| Create List | Create a distribution list. |
| Add Contact to List | Adds an existing contact to a list using the contact ID. |
| Rename List | Rename a list. |
| Delete List | Delete a list. |
| Message | |
| Send Message to List | Send an SMS, email, and/or IM message to all contacts on a list. |
| Send Message to Contact | Send an SMS, email, and/or IM message to a single contact. |
| Keyword | |
| Check Keyword | Check the availability of a mobile keyword. |
| Create Keyword | Create a mobile keyword. |
| Delete Keyword | Delete a mobile keyword. |
| Update Keyword | Update a mobile keyword. |
| Response | |
| Check Response | Check the response for a request. |
| Resource | Description |
|---|---|
| Incoming SMS Message | Accept incoming SMS messages sent from users in response to a mobile keyword campaign. |
The following section provides the parameters and template for making requests to manage subscriptions, or contacts. Example response from the system is also provided.
Add a new contact to your database and to a distribution list. At the beginning of your request, you must specify the URL of the resource: http://api.trumpia.com/http/v2/addcontact. Once the request is completed, a contact ID is returned, which will be needed to update or delete the contact. There can be only one instance of a tool, such as a unique mobile number, on a list; however, the same contact or some of the same contact information may exist on multiple lists.
| Parameter | Required | Description |
|---|---|---|
| apikey | Required | Your unique API key must be passed in. This will be matched with the IP address. |
| first_name | Required | First name of the contact |
| last_name | Optional | Last name of the contact |
| Optional | Email address of the contact | |
| country_code | Default : 1 | Mobile phone number's country code. If left blank then it will be assumed to be a U.S. number. |
| mobile_number | No symbols or spaces | For U.S., the 10-digit number without the leading 0 or 1. For some international numbers, the leading 0 or 1 must be omitted. |
| aim | Optional | AOL Instant Messenger screen name |
| list_name | Required | List to add the contact to |
| send_verification | Default : FALSE | TRUE or FALSE. If set to TRUE, this sends a verification message to each tool before they are added to your distribution list. If the tool is not verified, they will be marked as not verified and cannot be used. If set to FALSE, the verification step is bypassed and contacts will be added directly into your distribution list. A verification is omitted for an international phone number (not U.S.). |
| custom_verification_msg | Optional | Character limit of 60 characters Default verification message: Reply OK to start. Msg&Data rates may apply. Upto 30msg/mo. |
<input type="text" name="apikey" value="1234567890">
<input type="text" name="first_name" value="firstname">
<input type="text" name="last_name" value="lastname">
<input type="text" name="email" value="abc@abc.com">
<input type="text" name="country_code" value="1">
<input type="text" name="mobile_number" value="1234567890">
<input type="text" name="aim" value="abc">
<input type="text" name="list_name" value="listname">
<input type="text" name="send_verification" value="TRUE">
<input type="text" name="allow_access_info" value="TRUE">
<input type="text" name="custom_verification_msg" value="custom verify
message">
</form>
{"requestID":"123123123123123123123"}
This function allows you to update an existing contact record. At the beginning of your request, you must specify the URL of the resource: http://api.trumpia.com/http/v2/updatecontactdata. The contact ID must be provided to update the contact. Keep in mind that the same contact can exist on multiple lists.
| Parameter | Required | Description |
|---|---|---|
| apikey | Required | Your unique API key must be passed in. This will be matched with the IP address. |
| contact_id | Required | Unique ID of contact |
| first_name | Required | First name of the contact |
| last_name | Optional | Last name of the contact |
| Optional | Email address of the contact | |
| country_code | Default : 1 | Mobile phone number's country code. If left blank then it will be assumed to be a US number. |
| mobile_number | No symbols or spaces | For U.S., the 10 digit number without the leading 0 or 1. For some international numbers, the leading 0 or 1 must be omitted. |
| aim | Optional | AOL Instant Messenger screen name |
| send_verification | Default : TRUE | TRUE or FALSE. Sends a verification to each tool before adding them. If a tool is not verified, they will be marked as not verified and cannot be used until it is verified. A verification is omitted for an international phone number (not U.S.). |
| allow_access_info | Default : TRUE | (Depreciated) |
| custom_verification_msg | Optional | Character limit of 60 characters. Default verification message: Reply OK to start. Msg&Data rates may apply. Upto 30msg/mo. |
<input type="text" name="apikey" value="1234567890">
<input type="text" name="contact_id" value="123456">
<input type="text" name="first_name" value="firstname">
<input type="text" name="last_name" value="lastname">
<input type="text" name="email" value="abc@abc.com">
<input type="text" name="country_code" value="1">
<input type="text" name="mobile_number" value="1234657890">
<input type="text" name="aim" value="abc ">
<input type="text" name="send_verification" value="TRUE">
<input type="text" name="allow_access_info" value="TRUE">
<input type="text" name="custom_verification_msg" value="custom verify
message">
</form>
{"requestID":"123123123123123123123"}
This function removes a contact from one or all associated distribution lists by the contact's actual information instead of the contact ID. At the beginning of your request, you must specify the URL of the resource: http://api.trumpia.com/http/v2/removecontact.
| Parameter | Required | Description |
|---|---|---|
| apikey | Required | Your unique API key must be passed in. This will be matched with the IP address. |
| tool | Required | Email address, mobile number, or IM screen name, depending on the tool_type selected. |
| tool_type | Required (Integer) |
Contact information type:
|
| list_name | Optional | Distribution list name. If no name is specified then the tool will be removed from all lists. |
| remove_all | Optional(true,false) Default: false |
By setting this flag to TRUE, all other tools related to the specified tools will be deleted. In other words the whole subscription will be deleted. |
<input type="text" name="apikey" value="1234567890">
<input type="text" name="tool" value="abc@abc.com">
<input type="text" name="tool_type" value="1">
<input type="text" name="list_name" value="TestList">
<input type="text" name="remove_all" value="false">
</form>
{"requestID":"123123123123123123123"}
Permanently delete a contact from your database and any distribution lists it was on. At the beginning of your request, you must specify the URL of the resoure:
http://api.trumpia.com/http/v2/deletecontact.
| Parameter | Required | Description |
|---|---|---|
| apikey | Required | Your unique API key must be passed in. This will be matched with the IP address. |
| contact_id | Required | Unique ID of contact |
<input type="text" name="apikey" value="1234567890">
<input type="text" name="contact_id" value="123456">
</form>
{"requestID":"123123123123123123123"}
This function returns the contact's information and registered tools along with the tool's verification status. At the beginning of your request, you must specify the URL of the resource:
http://api.trumpia.com/http/v2/getcontactdata.
| Parameter | Required | Description |
|---|---|---|
| apikey | Required | Your unique API key must be passed in. This will be matched with the IP address. |
| contact_id | Required | Unique ID of contact |
<input type="text" name="apikey" value="1234567890">
<input type="text" name="contact_id" value="123456">
</form>
{
"message":"Query Success",
"contactcode":"aaa111bbb222",
"contactdata":
{
"tools":
{
"mobilephone":
{
"verify":"1",
"value":"1234567890",
"country_code":"1"
},
"email":
{
"verify":"1",
"value":"email@email.com"
}
},
"lastname":"doe",
"firstname":"jane"
},
"statuscode":"1"
}
This function can be used to find a contact record within a distribution list, searching by email address, phone number, or IM screen name. At the beginning of your request, you must specify the URL of the resource: http://api.trumpia.com/http/v2/getcontactid. Only one contact ID will be returned since a tool is unique within a list.
| Parameter | Required | Description |
|---|---|---|
| apikey | Required | Your unique API key must be passed in. This will be matched with the IP address. |
| list_name | Required | List to search in |
| tool_type | Required (integer) |
|
| tool_data | Required | Email address, mobile number, or IM screen name depending on the tool type selected. |
<input type="text" name="apikey" value="1234567890">
<input type="text" name="list_name" value="listname">
<input type="text" name="tool_type" value="1">
<input type="text" name="tool_data" value="abc@abc.com">
</form>
{
"statuscode":"1",
"message":"Query Success",
"contactid":"1234567"
}
The following section provides the parameters ad template for making requests to manage distribution lists. Example response from the system is also provided.
This function creates a new list. At the beginning of your request, you must specify the URL of the resource: http://api.trumpia.com/http/v2/createlist.
| Parameter | Required | Description |
|---|---|---|
| apikey | Required | Your unique API key must be passed in. This will be matched with the IP address. |
| list_name | Required | Enter the name of your list. List name is case-insensitive but must contain only alphanumeric characters. The maximum length for a list name is 32 characters. |
| display_name | Required | The display name will be the name that your subscriptions will see when signing up for your distribution list. As this name is public, make sure it makes sense to your future subscriptions. |
| frequency | Required | The frequency of messages your subscriptions receive each month must be disclosed, according to mobile industry regulations. |
| description | Required | The description of the kind of messages your subscriptions will receive when they opt into this list must be disclosed. |
<input type="text" name=apikey value="1234567890">
<input type="text" name=list_name value="TestList">
<input type="text" name=display_name value="TestDisplay">
<input type="text" name=frequency value="3">
<input type="text" name=description value="Promotions">
</form>
{
"message":"Create List Success",
"statuscode":"1",
"listname":"TestList"
"displayname":"TestDisplay"
"frequency":"3"
"description":"Promotions"
}
This function adds an existing contact to a list using contact ID. At the beginning of your request, you must specify the URL of the resource: http://api.trumpia.com/http/v2/addcontacttolist. You can copy the contact or use a pointer. Contacts with duplicate tool data, such as mobile phone number, cannot be added to the same list.
In the process of adding a contact to a list, the create_copy parameter is set by default to false to allow the same contact record to be linked to multiple lists. By setting the create_copy flag to true, a new unique contact record will be created and consequently return a new contact ID.
| Parameter | Required | Description |
|---|---|---|
| apikey | Required | Your unique API key must be passed in. This will be matched with the IP address. |
| contact_id | Required | The unique contact ID of the contact you would like to add to a particular list. |
| list_name | Required | The list to add the contact to |
| create_copy | Default: FALSE | By default, the same contact record is linked to the new list. Setting to TRUE will create a new contact record and return a new contact ID. |
<input type="text" name=apikey value="1234567890">
<input type="text" name=contact_id value="123456">
<input type="text" name=list_name value="TestList">
<input type="text" name=create_copy value="TRUE">
</form>
{"requestID":"123123123123123123123"}
This function renames an existing distribution list. At the beginning of your request, you must specify the URL of the resource: http://api.trumpia.com/http/v2/renamelist.
| Parameter | Required | Description |
|---|---|---|
| apikey | Required | Your unique API key must be passed in. This will be matched with the IP address. |
| list_name | Required | The distribution list to be renamed |
| new_list_name | Required | The new name of the distribution list |
<input type="text" name=apikey value="1234567890">
<input type="text" name=list_name value="TestList">
<input type="text" name=new_list_name value="NewList">
</form>
{"requestID":"123123123123123123123"}
This function deletes a list. At the beginning of your request, you must specify the URL of the resource: http://api.trumpia.com/http/v2/deletelist.
| Parameter | Required | Description |
|---|---|---|
| apikey | Required | Your unique API key must be passed in. This will be matched with the IP address. |
| list_name | Required | The distribution list you wish to delete |
| delete_contact | Default: FALSE | TRUE or FALSE. Setting this to TRUE will delete all contacts on the list; contact data cannot be restored. |
<input type="text" name=apikey value="1234567890">
<input type="text" name=list_name value="TestList">
<input type="text" name=delete_contact value="TRUE">
</form>
{"requestID":"123123123123123123123"}
The following section provides the parameters and template for making requests to send messages via mobile text (SMS), email, and/or instant messenger. Example response from the system is also provided.
This function sends a message to all the contacts in the specified list. At the beginning of your request, you must specify the URL of the resource: http://api.trumpia.com/http/v2/sendtolist. SMS, email, IM, or any combination of the three can be sent with one function call using the relevant mode parameters. Multiple lists can be selected by passing multiple list names separated by commas. Messages can also be scheduled to be sent automatically at a later date and time enabling the later_time parameter.
| Parameter | Required | Description |
|---|---|---|
| apikey | Required | Your unique API key must be passed in. This will be matched with the IP address. |
| email_mode | Required | Value must be TRUE or FALSE. Used for sending your message via email. |
| im_mode | Required | Value must be TRUE or FALSE. Used for sending your message via instant messenger. |
| sms_mode | Required | Value must be TRUE or FALSE. Used for sending your message via mobile text (SMS). |
| sb_mode | Required | Value must be TRUE or FALSE. Used to enable SmartBlast. |
| description | Required | Description of message for your reference |
| email_subject | Required if email_mode or sb_mode is TRUE. | Subject line for email. Plain text only. |
| email_message | Required if email_mode is TRUE. | Email message body with support for basic HTML. |
| im_message | Required if im_mode is TRUE. | IM message body must be in plain text. Character limit is 500 characters. |
| sms_message | Required if sms_mode is TRUE. |
SMS message body must be in plain text. Character limit is 132 characters, including the organization name.
Characters allowed:
|
| change_org_name | Optional. Required if sms_mode is TRUE. |
By setting this parameter, you can temporarily change your organization name for this message blast. The default structure of a mobile-text message is as follows:
<Organization Name>: <your message content> Reply HELP for help. |
| sb_message | Required if sb_mode is TRUE. | SmartBlast message body must be in plain text. |
| list_names | Required | Enter the names of lists to send message to. Separate multiple lists with commas: name1, name2, name3... |
| area_code | Optional | Enter the area codes to send message to. Separate multiple area codes with commas: areacode1, areacode2, areacode3... |
| mail_merge_first_name | Optional | Mail merge replacement for null values if email content contains mail merge variables. |
| mail_merge_last_name | Optional | See mail merge feature online in compose email. |
| later_time | Optional | Enable to schedule blast for a later date and time. The format is: YYYY-MM-DD HH:MM:SS (ex : 2011-10-01 08:32:00) |
<input type="text" name="apikey" value="1234567890">
<input type="text" name="email_mode" value="TRUE">
<input type="text" name="im_mode" value="TRUE">
<input type="text" name="sms_mode" value="TRUE">
<input type="text" name="sb_mode" value="FALSE">
<input type="text" name="description" value="test message">
<input type="text" name="email_subject" value="test subject">
<input type="text" name="email_message" value="test message">
<input type="text" name="im_message" value="test message">
<input type="text" name="sms_message" value="test message">
<input type="text" name="change_org_name" value="">
<input type="text" name="sb_message" value="">
<input type="text" name="list_names" value="TestList">
<input type="text" name="area_code" value="">
<input type="text" name="mail_merge_first_name" value="">
<input type="text" name="mail_merge_last_name" value="">
<input type="text" name="later_time" value="2009-04-22 14:10:32">
</form>
{"requestID":"123123123123123123123"}
This function is used to send a message to a single contact or multiple selected contacts using their contact ID numbers. At the beginning of your request, you must specify the URL of the resource: http://api.trumpia.com/http/v2/sendtocontact.
| Parameter | Required | Description |
|---|---|---|
| apikey | Required | Your unique API key must be passed in. This will be matched with the IP address. |
| email_mode | Required | Value must be TRUE or FALSE. Used for sending your message via email. |
| im_mode | Required (integer) | Value must be TRUE or FALSE. Used for sending your message via instant messenger. |
| sms_mode | Required | Value must be TRUE or FALSE. Used for sending your message via mobile text (SMS). |
| sb_mode | Required | Value must be TRUE or FALSE. Used to enable SmartBlast. |
| description | Required | Description of message for your reference |
| email_subject | Required if email_mode or sb_mode is TRUE. | Subject line for email. Plain text only. |
| email_message | Required if email_mode is TRUE. | Email message body with support for basic HTML. |
| im_message | Required if im_mode is TRUE. | IM message body must be in plain text. Character limit is 500 characters. |
| sms_message | Required if sms_mode is TRUE. |
SMS message body must be in plain text. Character limit is 132 characters, including the organization name.
Characters allowed:
|
| change_org_name | Optional. Required if sms_mode is TRUE. |
By setting this parameter, you can temporarily change your organization name for this message blast. The default structure of a mobile-text message is as follows:
<Organization Name>: <your message content> Reply HELP for help. |
| sb_message | Required if sb_mode is TRUE. | SmartBlast message body must be in plain text. |
| contact_ids | Required | Enter the contact IDs to send message to. Separate multiple contact IDs with commas: contact ID1, contact ID2, contact ID3... |
| mail_merge_first_name | Optional | Mail merge replacement for null values if email content contains mail merge variables. |
| mail_merge_last_name | Optional | See mail merge feature online in compose email. |
<input type="text" name=apikey value="1234567890">
<input type="text" name=email_mode value="TRUE">
<input type="text" name=im_mode value="TRUE">
<input type="text" name=sms_mode value="TRUE">
<input type="text" name=sb_mode value="FALSE">
<input type="text" name=description value="test message">
<input type="text" name=email_subject value="test subject">
<input type="text" name=email_message value="test message">
<input type="text" name=im_message value="test message">
<input type="text" name=sms_message value="test message">
<input type="text" name=sb_message value="test message">
<input type="text" name=contact_ids value="111111,111112">
<input type="text" name=mail_merge_first_name value="">
<input type="text" name=mail_merge_last_name value="">
</form>
{"requestID":"123123123123123123123"}
The following section provides the parameters and template for making requests to manage mobile keywords. Example response from the system is also provided.
This function returns whether a keyword is available or not. At the beginning of your request, you must specify the URL of the resource: http://api.trumpia.com/http/v2/checkkeyword.
| Parameter | Required | Description |
|---|---|---|
| apikey | Required | Your unique API key must be passed in. This will be matched with the IP address. |
| keyword | Required | The keyword you want to check the availability of. |
<input type="text" name=apikey value="1234567890">
<input type="text" name=keyword value="TestKeyword">
</form>
{
"statuscode":"1",
"message":"Query Success",
"isavailable":"AVAILABLE"
}
{
"statuscode":"1",
"message":"Query Success",
"isavailable":"UNAVAILABLE"
}
This function creates a new mobile keyword. At the beginning of your request, you must specify the URL of the resource: http://api.trumpia.com/http/v2/createkeyword.
| Parameter | Required | Description |
|---|---|---|
| apikey | Required | Your unique API key must be passed in. This will be matched with the IP address. |
| keyword | Required | The keyword to create. Check availability before creating. |
| list_names | Required | Enter the names of the lists you want to associate the keyword with. Separate multiple list names with commas: name1,name2,name3... |
| notify_email | Optional | Email address to where a notification will be sent when someone signs up via this keyword. |
| notify_mobile | Optional | Mobile phone numbers to where a notification will be sent when someone signs up via this keyword. |
| user_response | Required | TRUE or FALSE. This enables users to add an optional message or response after the keyword. This message will be sent to your Inbox. |
| keyword_message | Required |
The automated message to be sent to someone who texts in the keyword. Character limit is 132 characters including the organization name.
Characters allowed:
|
| use_notify | Default : FALSE | TRUE or FALSE. When someone texts in this keyword, send a notification. |
| notify_type1 | Default : FALSE | TRUE or FALSE. If user_response is TRUE and use_notify is TRUE, notify me when someone texts in this keyword without an optional message. |
| notify_type2 | Default : FALSE | TRUE or FALSE. If user_response is TRUE, use_notify is TRUE, and notify_type1 is TRUE, notify me only when the keyword subscriber's mobile number is new to my contact database. |
| notify_type3 | Default : FALSE | TRUE or FALSE. If user_response is TRUE and use_notify is TRUE, notify me when someone texts in this keyword with an optional message. |
| notify_type4 | Default : FALSE | TRUE or FALSE. If user_response is TRUE, use_notify is TRUE, and notify_type3 is TRUE, notify me only when the keyword subscriber's mobile number is new to my contact database. |
| notify_type5 | Default : FALSE | TRUE or FALSE. If user_response is TRUE and use_notify is TRUE, notify me only when the keyword subscriber's mobile number is new to my contact database. |
| send_auto_response | Default : 2 |
|
| send_alternate | Default : 'FALSE' | TRUE or FALSE. If send_auto_response is not '1', send an alternate auto response after the first time. This is sent only if the subscriber already exists in your contact database. |
| alternate_message | Optional |
Enter the body content of the alternate message that will be sent if send_alternate is TRUE. Character limit of 132 characters.
Characters allowed:
|
| change_org_name | Optional |
By setting this parameter, you can temporarily change your organization name in the keyword_message and alternate_message responses. The default structure of a mobile-text message is as follows:
<Organization Name>: <your message content> Reply HELP for help. |
<input type="text" name=apikey value="1234567890">
<input type="text" name=keyword value="TestKeyword">
<input type="text" name=list_names value="TestList1,TestList2">
<input type="text" name=notify_email value="abc@abc.com">
<input type="text" name=notify_mobile value="1234567890">
<input type="text" name=user_response value="TRUE">
<input type="text" name=keyword_message value="test message">
<input type="text" name=use_notify value="TRUE">
<input type="text" name=notify_type1 value="TRUE">
<input type="text" name=notify_type2 value="TRUE">
<input type="text" name=notify_type3 value="TRUE">
<input type="text" name=notify_type4 value="TRUE">
<input type="text" name=notify_type5 value="">
<input type="text" name=send_auto_response value="2">
<input type="text" name=send_alternate value="TRUE">
<input type="text" name=alternate_message value="test message">
<input type="text" name=change_org_name value="orgname">
</form>
{"requestID":"123123123123123123123"}
This function deletes a mobile keyword. By doing so, that keyword is available for use by other users. At the beginning of your request, you must specify the URL of the resource:
http://api.trumpia.com/http/v2/deletekeyword.
| Parameter | Required | Description |
|---|---|---|
| apikey | Required | Your unique API key must be passed in. This will be matched with the IP address. |
| keyword | Required | The keyword you wish to delete. |
<input type="text" name=apikey value="1234567890">
<input type="text" name=keyword value="TestKeyword">
</form>
{"requestID":"123123123123123123123"}
This function allows you to update an existing keyword. At the beginning of your request, you must specify the URL of the resource: http://api.trumpia.com/http/v2/updatekeyword.
| Parameter | Required | Description |
|---|---|---|
| apikey | Required | Your unique API key must be passed in. This will be matched with the IP address. |
| keyword | Required | The keyword to create. Check availability before creating. |
| list_names | Required | Enter the names of the lists you want to associate the keyword with. Separate multiple list names with commas: name1,name2,name3... |
| notify_email | Optional | Email address to where a notification will be sent when someone signs up via this keyword. |
| notify_mobile | Optional | Mobile phone numbers to where a notification will be sent when someone signs up via this keyword. |
| user_response | Required | TRUE or FALSE. This enables users to add an optional message or response after the keyword. This message will be sent to your Inbox. |
| keyword_message | Required |
The automated message to be sent to someone who texts in the keyword. Character limit is 132 characters including the organization name.
Characters allowed:
|
| use_notify | Default : FALSE | TRUE or FALSE. When someone texts in this keyword, send a notification. |
| notify_type1 | Default : FALSE | TRUE or FALSE. If user_response is TRUE and use_notify is TRUE, notify me when someone texts in this keyword without an optional message. |
| notify_type2 | Default : FALSE | TRUE or FALSE. If user_response is TRUE, use_notify is TRUE, and notify_type1 is TRUE, notify me only when the keyword subscriber's mobile number is new to my contact database. |
| notify_type3 | Default : FALSE | TRUE or FALSE. If user_response is TRUE and use_notify is TRUE, notify me when someone texts in this keyword with an optional message. |
| notify_type4 | Default : FALSE | TRUE or FALSE. If user_response is TRUE, use_notify is TRUE, and notify_type3 is TRUE, notify me only when the keyword subscriber's mobile number is new to my contact database. |
| notify_type5 | Default : FALSE | TRUE or FALSE. If user_response is TRUE and use_notify is TRUE, notify me only when the keyword subscriber's mobile number is new to my contact database. |
| send_auto_response | Default : 2 |
|
| send_alternate | Default : 'FALSE' | TRUE or FALSE. If send_auto_response is not '1', send an alternate auto response after the first time. This is sent only if the subscriber already exists in your contact database. |
| alternate_message | Optional |
Enter the body content of the alternate message that will be sent if send_alternate is TRUE. Character limit of 132 characters.
Characters allowed:
|
| change_org_name | Optional |
By setting this parameter, you can temporarily change your organization name in the keyword_message and alternate_message responses. The default structure of a mobile-text message is as follows:
<Organization Name>: <your message content> Reply HELP for help. |
<input type="text" name=apikey value="1234567890">
<input type="text" name=keyword value="TestKeyword">
<input type="text" name=list_names value="TestList1,TestList2">
<input type="text" name=notify_email value="abc@abc.com">
<input type="text" name=notify_mobile value="1234567890">
<input type="text" name=user_response value="TRUE">
<input type="text" name=keyword_message value="test message">
<input type="text" name=use_notify value="TRUE">
<input type="text" name=notify_type1 value="TRUE">
<input type="text" name=notify_type2 value="TRUE">
<input type="text" name=notify_type3 value="TRUE">
<input type="text" name=notify_type4 value="TRUE">
<input type="text" name=notify_type5 value="">
<input type="text" name=send_auto_response value="2">
<input type="text" name=send_alternate value="TRUE">
<input type="text" name=alternate_message value="test message">
<input type="text" name=change_org_name value="orgname">
</form>
{"requestID":"123123123123123123123"}
Check the response of any previous API request by looking up the unique request ID.
Checking the response of a request will return the status as having been completed or failed. You will also be provided with the credit process ID and task ID.
| Parameter | Required | Description |
|---|---|---|
| request_id | Required | The request ID is the unique identifier for the API request you would like to check the response for. |
<input type="text" name="request_id" value="1234567890">
</form>
{
"statuscode":"1",
"message" : "Send Success",
"creditProcessID" : "12345",
"taskID" : "123456"
}
In addition to the primary functions of the API, the API can also forward incoming SMS messages from your users to you.
Our API allows two-way communication for mobile text messages. When a user texts in a mobile keyword and an optional message, the text message can be forwarded to your server. Our system parses all incoming text messages and identifies the keyword and forwards to the keyword owner's server via HTTP GET.
There are many applications of this feature, including the ability to generate an automated response to a customer's text message based on the contents of the text message. You can also use this feature to trigger a procedure or some action on your server whenever a customer sends a text message to your keyword.
Keywords can be set up via our website or the API and can be configured to accept a message after the keyword. So, customers can text in the keyword followed by any message. This message is also forwarded to your server.
A simple example would be a search engine application where the keyword is "search" and the message would be the search criteria. Our system would forward this text message to the client's server and the client's server would run the query and send the results back to the customer using our API.
To enable this service, you will need to contact us and request this function.
You will need to provide a URL to which our servers will send a GET of the incoming keyword text messages. You can also adjust the settings to bypass or skip any of our current normal keyword sign-up process.
| Parameter | Description |
|---|---|
| Receiving URL | This is where our system will send a GET of the incoming keyword text messages. |
| Incoming Message | If you turn on this flag, our system will GET XML messages to the Receiving URL. |
| Sign-up via Keyword | If you turn off this flag, you can skip the normal sign-up process. Users will not be automatically added to the list in your account. |
| Notification for Keyword Sign-up or Message | If you turn off this flag, you can skip the sending of notifications when there is a sign-up for your account. |
| Auto-response for Keyword Sign-up or Message | If you turn off this flag, you can skip sending of the automated response messages for keywords. This option is usually set if you are generating your own response in your API code. |
| Inbox for Keyword Messages | If you turn off this flag, you can skip storing the incoming keyword messages in your account Inbox. |
XML String - Passed in query string:
<?xml version="1.0" encoding="UTF-8" ?>
<API>
<PHONENUMBER>1234567890</PHONENUMBER>
<KEYWORD>keyword</KEYWORD>
<SUBSCRIPTION_UID>12345</SUBSCRIPTION_UID>
<CONTENTS><![CDATA[contents]]></CONTENTS>
</API>
Sample GET call from our server to your URL:
http://www.yourserver.com/incomingsms.php?xml=<?xml version="1.0"
encoding="UTF-8" ?><API><PHONENUMBER>1234567890</PHONENUMBER><KEYWORD />
<SUBSCRIPTION_UID /><CONTENTS><![CDATA[contents]]></CONTENTS></API>
To integrate your platform or services with our Application Programming Interface (API), you’ll need to begin with these three simple steps:
Once you have your API key, you can begin coding. Each type of call made through the REST API is a uniform resource identifier (URI) that identifies a resource and a method. Methods are defined explicitly with one-to-one mapping between create, read, update, and delete (CRUD) operations and the following four HTTP-based methods.
| HTTP Method | CRUD Operation | Change Resource |
|---|---|---|
| PUT | Create resources | Change |
| GET | Read, or retrieve, resources | Does not change |
| POST | Update resources | Change |
| DELETE | Delete resources | Change |
Sending a message through our API, for example, requires the following logical steps:
* New contacts can join your distribution lists on their own by sending a text message that includes your mobile keyword, which is a unique one-word phrase that you create, to your assigned shortcode. You can create a mobile keyword through the API with the PUT Keyword resource call.
For complete information about all the available resource calls as well as coding parameters, templates, and examples, see the REST API Guidelines. Also, if you’re stuck or have a question, feel free to contact us through the Support Request page.
The HTTP version of our API has similar functionality and logic. Like the REST API, each type of call made through the HTTP API is a uniform resource identifier (URI) that identifies a resource and the POST method.
Using our API requires the following logical steps:
* New contacts can join your distribution lists on their own by sending a text message that includes your mobile keyword, which is a unique one-word phrase that you create, to your assigned shortcode. You can create a mobile keyword through the API with the PUT Keyword resource call.
For complete information about all the available resource calls as well as coding parameters, templates, and examples, see the HTTP API Guidelines. Also, if you’re stuck or have a question, feel free to contact us through the Support Request page.
Marketing Channels
Partner Programs
Features
About Us
Please note that by texting a keyword to 69302, 96362, or 99000 you will receive text alerts from Trumpia. Get up to 4 messages per month. Text HELP for help.
















