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

The method will expire all advanced messages regardless of expiry date set in the original request. If the notify recipients option is set then the system will notify all receipients that the message has been expired and no longer viewable (Only for advanced messages). If the delete option is set and the account has the message deletion feature enabled, the contents of the standard and advanced messages will be deleted. The default search criteria will list all messages that have expired or all recipients have read the message the maximum number of times. A object listing the parameters for 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/standardsmsmessages

Sends SMS messages to the destinations specified in the request. This method cannot send from the address book contacts or groups and it can only SMS messages only.

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.

SSOAdminAPI

This allows users to manage their single sign on settings for their account.

APIDescription
DELETE api/v1/admin/identityproviders/{id}

This method 'deletes the Identity provider by ID.

GET api/v1/admin/identityproviders?Name={Name}

This method returns a list of all identity providers of TYPE=4 (SAML) on the customer’s account according to the name of the identity provider record. For each identity providers it will include all parameters stored for the identity provider. If the Name field is left blank, then no filter will be applied and a full list of identity providers will be returned for the domain

GET api/v1/admin/identityproviders/{id}

This method will retreive the identity provider for a particular ID

GET api/v1/admin/identityproviders/{ID}/verification

This method tests that your domain contains the TXT string assigned to the identity provider

POST api/v1/admin/identityproviders

This method adds an identity provider for the account. The system will check the domain used to determine the identity provider is unique for the account. It will return the domain TXT string. To successfully verify this Identity provider this TXT string should be added to your domain.

PUT api/v1/admin/identityproviders/{ID}

This method modifies an identity provider by ID.

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/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.

DELETE api/v1/addressbook/stoplog

Removes a number(s) from the 2sms stop log on a given short code. Each number is then sent a confirmation informing the user that they have been opted in of the short code.

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

Retrieve network data for the provided mobile number.

GET api/v1/addressbook/contacts?filter.Firstname={filter.Firstname}&filter.Lastname={filter.Lastname}&filter.MobilePhone={filter.MobilePhone}&filter.EmailAddress={filter.EmailAddress}&paging.Page={paging.Page}&paging.NoOfRecords={paging.NoOfRecords}&Inheritance={Inheritance}

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 in the users account. 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 any account.

GET api/v1/addressbook/validate

This method returns a list of all addressbook phone numbers and their associated shortcodes/headers that have a stop log request against them.

POST api/v1/addressbook/stoplog

Adds a number(s) to the 2sms stop log on a given short code. Each number is then sent a confirmation informing the user that they have been opt out of the short code.

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

This method updates the contact details of the contact provided.

ClientAdminAPI

This allows users to manage the number of clients that are allowed access to their account via the API of SMS+.

APIDescription
DELETE api/v1/admin/clients/{id}

This method deletes the client, given the id.

GET api/v1/admin/clients

Returns a list of clients.

POST api/v1/admin/clients

This method adds a new client. Returned is the client name, ID and secret. The client secret will not be available again, so it is very important that this information is saved and stored in a safe place.

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. There are three different ways to specify which values you want to include inside your report. These are 'Range', 'StartDate and EndDate' and 'RecentDays'. NOTE: at least one parameter needs to be used, otherwise the response will not return anything. Only one parameter can be used at the time to filter out the data when the report is returned. If more than one parameters are supplied, they will be prioritized in this order Range > RecentsDays > startDate and EndDate.

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.

GET api/v1/reports/standard/inbound?DaysToCover={DaysToCover}&InboundNumber={InboundNumber}&SoftwareVersion={SoftwareVersion}&StartDate={StartDate}&EndDate={EndDate}&Range={Range}&Destination={Destination}

Retrieves a report on all the Inbound Inbound 2way messages for the account. filtering can be applied. There are three different ways to specify the date ranges you want to include inside your report. These are 'Range', 'StartDate and EndDate' and 'RecentDays'. NOTE: at least one parameter needs to be used, otherwise the response will not return anything. Only one date parameter can be used at the time to filter out the data when the report is returned. If more than one parameter is supplied, they will be prioritized in this order Range > RecentsDays > startDate and EndDate. You can also filter on ShortCode and Inbound number

GET api/v1/reports/numberstatus?Destination={Destination}&ShortCode={ShortCode}&SoftwareVersion={SoftwareVersion}

This method checks a number provided against the 2sms stop log with the given shortcode.

AccountAdminAPI

The Account Admin API is for managing accounts and users. You can do several things with this class, such as retrieve information of the users accounts, get balance for the children accounts, manage children accounts and so on.

APIDescription
GET api/v1/admin/accounts/headers/{id}

Retrieves a list of ShortCodes/Headers for the account.

GET api/v1/admin/accounts/{id}/subaccounts?Name={Name}&MobilePhone={MobilePhone}&EmailAddress={EmailAddress}

Returns a list of sub accounts with information of how many credits they have. Filtering can be applied to tackle the specific records.

POST api/v1/admin/accounts/{id}

This api method creates a subaccount for your account. You need to pass in all the relevant details together with the master account id. A good amount of validation is added, so make sure that you follow the criteria for each of the attributes.

SMSAdminAPI

The SMS Admin Api allows the user to manage the SMS related Admin services. The SMS Admin Api methods can do several functions, such as managing your fixed messages.

APIDescription
GET api/v1/admin/fixedmessages?id={id}

Retrieves a fixed messages by its id. If the id field is left blank a full list of fixed messages will be returned.

DELETE api/v1/admin/fixedmessages

This method deletes a fixed message, given the id.

POST api/v1/admin/fixedmessages

This method adds a new fixed message.

PUT api/v1/admin/fixedmessages

This method modifies an existing fixed message.

TaskAdminAPI

This allows users to manage the tasks on their account. It will allow the users to add, modify, remove and run tasks.

APIDescription
DELETE api/v1/admin/tasks/account/{taskID}

Deletes a task from account.

GET api/v1/admin/tasks

List of all available tasks that can be scheduled for the account.

GET api/v1/admin/tasks/account

Displays all the tasks that have been created on the account.

GET api/v1/admin/tasks/account/{taskID}

Displays the task detail of the specific task specified.

POST api/v1/admin/tasks/account

Creates a new task for the account. Before a new task can be created a client must have been created before hand.

PUT api/v1/admin/tasks/account/{id}

Updates an existing task on the account.

POST api/v1/admin/tasks/account/run?id={id}

Allows the task to be run immediately.

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}

No documentation available.

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.