//[[restapi:start|RESTful API]]//
====== Send Templates with Chasers & Timeout ======
==== Overview ====
Send a text message to a cell phone using its mobile number as target and a predefined template.
==== URL ====
Http access method: POST
Parameters on the following URL are inside braces { }
{base_url}/rest/api/template/{instanceId}/{publicKey}/{signature}
^ Parameter Name ^ Description ^
| instanceId | An **instance id** is the workspace identification number, //if you don't know yours please request it using our [[misc:otto|ticketing tool]], you will need to provide your Mobile Engagement Campaign Manager's URL and your user login// |
| body \\ POST | The configuration file for this template. See our [[restapi:appx_template_send_3_35|Template Configuration]] section to learn how to generate this file. |
| publicKey | The public key to access this API. //if you don't know yours please request it using our [[misc:otto|ticketing tool]], you will need to provide your Mobile Engagement Campaign Manager's URL and your user login// |
| signature | The unique [[restapi:appx_ciphering#SHA256 - Cipher|SHA256]] signature for this call, it's involve all input parameters. To learn about generating the correct signature please visit our [[restapi:appx_call_ex|Java Example]] |
==== Response ====
The response is a JSON Object as follows
{
"mobilenumber":"13055468310",
"companyId":127,
"template_name":"Transaction Alert",
"template_id":"939",
"message":"ALERT: Transaction for $500 detected in Location Name with ID 4122. Send AUTHORIZE if you approve this transaction, DENY if you don't.",
"broadcast_ids":"9559,9560,9561,9563"
}
== Result parameters ==
^ Parameter Name ^ Description ^ Possible Values ^
| mobilenumber | The mobile number who will receive this message | Text |
| companyId | Client Company Id / Workspace Id | Text |
| template_name | The template name used for this delivery | Text |
| template_id | The template id used for this delivery | Number |
| message | Message's content. Recovered from the template with the place holders already applied | Text |
| broadcast_ids | All the broadcast ID's for the messages, the chasers and the timeout if configured. This is the information you need to provide if you want to cancel this using the [[restapi:broadcasts#delete_broadcast|Delete Broadcast]] method. | Text |