POST api/v1/admin/templates
Creates a new message template.
Request Information
URI Parameters
None.
Body Parameters
The details of the new message template.
TwoSms.CustomerPortalRole.API.Admin.SMS.MessageTemplateRequestName | Description | Type | Additional information |
---|---|---|---|
Name |
The name for the message template. |
string |
Required |
Template |
The message template. |
string |
Required |
Type |
Determines which type of messages the template can be used for. |
TwoSms.Platform.Database.CustomerPortal.Tables.SMS.MessageTemplateType |
Required |
Request Formats
application/json, text/json
Sample:
{ "Name": "sample string 1", "Template": "sample string 2", "Type": 1 }
application/xml, text/xml
Sample:
<MessageTemplateRequest xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <Name>sample string 1</Name> <Template>sample string 2</Template> <Type>ALL</Type> </MessageTemplateRequest>
application/x-www-form-urlencoded
Sample:
Response Information
Resource Description
The ID of the new message template
TwoSms.CustomerPortalRole.API.Misc.ResponseOfTwoSms.CustomerPortalRole.API.Admin.SMS.MessageTemplateResponseName | Description | Type | Additional information |
---|---|---|---|
Error | TwoSms.CustomerPortalRole.API.Misc.Error |
None. |
|
ResponseData | TwoSms.CustomerPortalRole.API.Misc.ResponseDataOfTwoSms.CustomerPortalRole.API.Admin.SMS.MessageTemplateResponse |
None. |
Response Formats
application/json, text/json
Sample:
{ "Error": { "ErrorCode": "sample string 1", "ErrorReason": "sample string 2" }, "ResponseData": { "Identification": { "UserId": "sample string 1" }, "Result": "sample string 1", "Detail": { "ID": "3040ab6e-72ae-442d-9d75-d12e6caef299", "Enabled": true, "Name": "sample string 3", "Template": "sample string 4", "Type": 1 } } }
application/xml, text/xml
Sample:
<ResponseOfMessageTemplateResponse xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <Error> <ErrorCode>sample string 1</ErrorCode> <ErrorReason>sample string 2</ErrorReason> </Error> <ResponseData> <Result>sample string 1</Result> <Identification> <UserId>sample string 1</UserId> </Identification> <Detail> <Name>sample string 3</Name> <Template>sample string 4</Template> <Type>ALL</Type> <ID>3040ab6e-72ae-442d-9d75-d12e6caef299</ID> <Enabled>true</Enabled> </Detail> </ResponseData> </ResponseOfMessageTemplateResponse>