SMSAPI

The SMSAPI allows the user to manage the SMS service.It allows creation of secure, long and standard SMS messages.Allows for updating secure and long messages. Removing secure/long messages and scheduled SMS messages. Finally it allows for fetching messages, fixed messages and templates.

APIDescription
DELETE api/v1/sms/messages/pendings/{list}

This method allows the client to cancel all the pending messages specified in the list supplied.

DELETE api/v1/sms/messages/recurrings/{list}

This method allows the client to cancel all the recurring messages specified in the list supplied.

DELETE api/v1/sms/messages

This method allows the user to cancel the messages specified to prevent the end users from viewing the messages. The messages will not be removed from the user’s account but be marked as removed. The system will check that the user has permission to perform this action and the action of the user is log. If the NotifiyRecipients flag is set to true, then the system will notify all the recipients of the message that the message has been expired and is no longer viewable A object listing all the messages to be deleted.

DELETE api/v1/sms/templates/{templateID}

This method allows the user to remove a notification template from the system. If the account does not have any more templates for the type that was removed, the system will revert back to the default template for that type.

GET api/v1/sms/templates

This method retrieves all the notification templates that the system can send out for the account.

GET api/v1/sms/templates/{templateID}

This method retrieves the notification template specified in the request.

PUT api/v1/sms/templates/{templateID}

This method updates an existing notification template with the new information provided in the request. All fields must be present as all fields will be updated even if they have not been changed.

POST api/v1/sms/templates

This method creates a new notification template that will overwrite the system default notification template for the specified type.

PUT api/v1/sms/messages/{messageID}

This method allows the user to update a message that has already been sent. The updates that are allowed are: 1. The content of the message. 2. Add new contacts to the message. 3. Removing contacts from the message. 4. Updating the expiration date. 5. Updating the dissolve settings. Updates are allowed only if the following conditions are met: 1) The message has not expired. 2) The message has not been read by any of the recipients if updating the contents of the message.

GET api/v1/sms/fixedmessages/{id}

This method retrieves the fixed message that has been specified by the parameter.

POST api/v1/sms/messages/fof

Sends a FOF Message to a group of people.

POST api/v1/sms/messages

This method creates a secure message and sends the notification message to the recipients selected in the request. The recipients must be in the address book. This method allows the requester to set the expiry date for the message, the number of reads that each recipient is allowed to view the message, whether the recipient is allowed to response to the message. Also the method allows the requester whether to they receive delivery and read notifications.

POST api/v1/sms/messages/replies

This method sends a message to the contacts specified in the request or contained in the groups specified in the request. This allows the user to set an expiry of the message and how many times the end user can view the message. The system will check that the contact has permission to perform this action.

POST api/v1/sms/messages/replies/sender

POST api/v1/sms/standardmessages

This method sends a standard SMS or Email using the 2sms XML Gateway.

POST api/v1/sms/standardmessages/recurringmessages

This method setups a standard recurring message using the 2sms XML Gateway.

POST api/v1/sms/messages/longmessages

This method sends a long message to the contacts specified in the request or contained in the groups specified in the request. The system will check that the contact has permission to perform this action.

GET api/v1/sms/messages/{Id}?contactId={contactId}

This method decrypts the encoded string and fetches the long message details for the contact.

GET api/v1/sms/messages/authenticated/{Id}?contactId={contactId}

This method decrypts the encoded string and fetches the secure message details for the contact. This method is called after the recipient has authenticated with an identity provider.

AddressBookApi

The Address Book Api allows the user to manage the Address Book service. The Address book Api methods can do several functions, such as retrieving information of the groups and contacts in the Address Book with the GET method. These methods also allows the system to delete and update group/contacts with DELETE and PUT method, as well as adding new groups/contacts and much more with the POST method.

APIDescription
DELETE api/v1/addressbook/contacts/{contactID}

The method removes the contact from the account.

GET api/v1/addressbook/contacts/{contactID}

This method returns the details of the specified contact. This detail of the contact will include their first name, last name, mobile number, email address and the type of authentication the contact has chosen if used with an SMS+ message. The system checks the contact ID is valid and belongs to the account

POST api/v1/addressbook/contacts

This method adds a new contact to the system. The system checks that the mobile number and email address are valid and if the validation is requested, the system will send a message to the contact to check the details are correct.

DELETE api/v1/addressbook/groups/{groupID}

The method removes the group from the account.

POST api/v1/addressbook/groups

This method creates an empty group for the user to add contacts to. The system will check that the name of the group is not already present for that account.

PUT api/v1/addressbook/groups/{groupID}

This method updates the group name of the group provided. The system will check that the new name does not already exist for the account.

DELETE api/v1/addressbook/groups/{groupID}/contacts/{contactID}

The method removes the contact from a group.

PUT api/v1/addressbook/groups/{groupID}/contacts

This method adds a contact to selected group. The system will check that the user adding a contact is allowed. If the contact is already in the group, this method does nothing.

GET api/v1/addressbook/networks/{mobileNumber}

Retrieve network data for the provided mobile number.

GET api/v1/addressbook/contacts?count={count}&startIndex={startIndex}&filter={filter}

This method returns a list of all the contacts stored on the customer’s account if no parameters are provided. For each contact it will include their first name, last name, mobile number, email address and the type of authentication the contact has chosen if used with an SMS+ message. This method allows the list to be page for large address books and filtered to reduce the size of the data returned.

GET api/v1/addressbook/groups/{groupID}/contacts?count={count}&startIndex={startIndex}

This method returns a list of all the contacts that are in the group specified. It will also include the details for each contact.

GET api/v1/addressbook/groups?count={count}&startIndex={startIndex}

This method returns a list of all the groups stored on the customer’s account if no parameters are provided.

GET api/v1/addressbook/groups/{groupID}

This method returns a group stored on the customer’s account.

PUT api/v1/addressbook/contacts/{contactID}

This method updates the contact details of the contact provided.

ReportAPI

The ReportAPI allows you produce reports on secure messages, long messages, standard SMS messages. It also allows to report on number of reads for secure/long messages and the notification messages sent to the recipients.

APIDescription
GET api/v1/reports/messages?filter.User={filter.User}&filter.Status={filter.Status}&filter.ReadStatus={filter.ReadStatus}&filter.StartDate={filter.StartDate}&filter.EndDate={filter.EndDate}&filter.Range={filter.Range}&filter.Destination={filter.Destination}&paging.Page={paging.Page}&paging.NoOfRecords={paging.NoOfRecords}&sort.Field={sort.Field}&sort.AscendingDescending={sort.AscendingDescending}

Retrieves all the details for the secure/long message for a given contact.

GET api/v1/reports/messages/fof

Fetches all the messages that the user has sent a FOF message with a list of all the people who have replied to the message.

GET api/v1/reports/messages/{messageId}/details

Retrieves the secure/long message for the given message. This includes all the recipients, notifications, responses and reads.

GET api/v1/reports/messages/{messageId}/reads

Retrieves all the reads the secure/long message has received for a given message.

GET api/v1/reports/messages/{messageId}/responses?filter.User={filter.User}&filter.Status={filter.Status}&filter.StartDate={filter.StartDate}&filter.EndDate={filter.EndDate}&filter.Range={filter.Range}&filter.Destination={filter.Destination}&paging.Page={paging.Page}&paging.NoOfRecords={paging.NoOfRecords}&sort.Field={sort.Field}&sort.AscendingDescending={sort.AscendingDescending}

Retrieves all the recipients that have responded to the message. It will also display whether there are any unread responses.

GET api/v1/reports/messages/{messageId}/responses/{recipient}

Retrieves all the responses that have been received/sent from/to the recipient specified in the request.

GET api/v1/reports/messages/{messageId}/notifications

Retrieves all the notifications the secure/long message has sent out along with the status of the notification messages.

GET api/v1/reports/messages/standard?filter.RecentDays={filter.RecentDays}&filter.Status={filter.Status}&filter.Reference={filter.Reference}&filter.ReportDetailedErrorInfo={filter.ReportDetailedErrorInfo}&filter.SoftwareVersion={filter.SoftwareVersion}&filter.StartDate={filter.StartDate}&filter.EndDate={filter.EndDate}&filter.Range={filter.Range}&filter.Destination={filter.Destination}&paging.ReportID={paging.ReportID}&paging.Page={paging.Page}&paging.NoOfRecords={paging.NoOfRecords}

Retrieves a report on all the standard SMS messages for the account. Paging and filtering can be applied.

GET api/v1/reports/messages/pendingandrecurring?filter.Range={filter.Range}&filter.RecentDays={filter.RecentDays}&filter.Referenece={filter.Referenece}&filter.ReportType={filter.ReportType}&filter.SoftwareVersion={filter.SoftwareVersion}&filter.StartDate={filter.StartDate}&filter.EndDate={filter.EndDate}&filter.Destination={filter.Destination}&paging.ReportID={paging.ReportID}&paging.Page={paging.Page}&paging.NoOfRecords={paging.NoOfRecords}

Retrieves all messages that are scheduled or all recurring messages setup on the account. Paging and filtering can be applied.

TeamDataAPI

The Team Data Api allows the user to manage the Team Data service. The TeamDataAPI methods allow the creation of question sets that allow recipients to answer a series of questions, allows the creator amend the questions and add new recipients. It also allows creation of recurring question sets. The methods also allow to recipients to view the answers of the question sets.

APIDescription
DELETE api/v1/teamdata/datasets/{id}

This method deletes and disables a data set. The dataset will be deleted when the status of the team data is already open.

GET api/v1/teamdata/accesslists/{contactId}

This method retrieves the access list of the team data with the unique id of that TeamData. The list will give detail of the type of access that the contact id has.

GET api/v1/teamdata/answersets/{id}/{contactId}

This method retrieves the answer sets of a data set for a given contact.

GET api/v1/teamdata/datasets/{id}

This method retrieves all the details of a dataset, the dataset id is required.

GET api/v1/teamdata/datasets/{id}/filters/{filter}

This method gets the filtered data set list. The system will return the details of the filtered data set.

GET api/v1/teamdata/externalanswersets/{id}/{contactId}

This method will get the external answer sets detail for a given contact id.

GET api/v1/teamdata/externaldatasets/{id}/questions/{questionId}

This method gets the details of a question in the external dataset. The system requires an id for the question and will return the information for that question.

GET api/v1/teamdata/externalteamdatas/{contactId}/filters/{filter}

This method filters the external team data of the given contact id. The system returns details of the team data list that have been filtered.

GET api/v1/teamdata/externaldatas/{contactId}/{teamdataId}

This method retrieves details of an external dataset. The dataset will give details only if the user that created the dataset, has given the permission to view the results of the external answer. If the user has no permission access the external answer set, the Error code "22" will occur. Error Reason "Access Denied. Administrative privileges may be required".

GET api/v1/teamdata/externalquestionsets/{teamdataId}/contacts/{contactId}/datasets/{datasetId}

This method retrieves the questions from the data set the recipient has been given access to. This method is called by the recipients only.

GET api/v1/teamdata/questionsets/{id}

This method gets the questions set of a team data. The method returns the number of questions that are in that data set. The question set id can be retrieved in the following method in the TeamData Api: "GET api/v1/teamdata/datasets/{id}".

GET api/v1/teamdata/teamdatas/{id}/responses/{questionId}

This method retrieves the responses of the team data with a TeamData Id and question Id. The system will return a respondent list and a non-response list in that team data.

GET api/v1/teamdata/teamdatas/{id}

This method retrieves the details of a team data, the system returns the details only if the team data it's still active and not deleted.

GET api/v1/teamdata/teamdatas?teamdatas={teamdatas}

This method retrieves all the TeamDatas that have been setup for the account.

PATCH api/v1/teamdata/questions/{id}

Disables and enables the TeamData question.

POST api/v1/teamdata/questions

This method posts a new set of questions in the existing team data.

POST api/v1/teamdata/datasets

This method creates a dataset that will be then sent to a group list or contact list. The dataset can be set to be repeated by setting the start date and end date, by having occurrences that will allow the dataset to be sent at the time and date set.

POST api/v1/teamdata/teamdatas

This method posts a new team data, it creates a new question list that can then be sent to your already existing team data contacts, groups or new contacts.

POST api/v1/teamdata/externalanswersets

This method creates a set of external answers for a team data.

PUT api/v1/teamdata/datasets/{id}

This method updates a dataset that has been then sent to a group list or contact list with the unique Id. The dataset can be set to be repeated by setting the start date and end date, or having occurrences that will allow the dataset to repeat itself.

PUT api/v1/teamdata/teamdatas/{id}

This method updates the team data by updating a specific field such as comment, date insert, name or updating and editing the contacts in team data.