PUT api/v1/admin/templates/{id}

Modifies an existing message template.

Request Information

URI Parameters

NameDescriptionTypeAdditional information
id

The ID of the message template.

globally unique identifier

Required

Body Parameters

The details of the updated message template.

TwoSms.CustomerPortalRole.API.Admin.SMS.MessageTemplateRequest
NameDescriptionTypeAdditional 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.CustomerPortalRole.Models.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:

Sample not available.

Response Information

Resource Description

The ID of the message template

TwoSms.CustomerPortalRole.API.Misc.ResponseOfTwoSms.CustomerPortalRole.API.Admin.SMS.MessageTemplateResponse
NameDescriptionTypeAdditional 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": "e9ff67cc-7d10-4ae1-bf34-0c9aa274f44f",
      "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>e9ff67cc-7d10-4ae1-bf34-0c9aa274f44f</ID>
      <Enabled>true</Enabled>
    </Detail>
  </ResponseData>
</ResponseOfMessageTemplateResponse>