SMS
Create SMS Template
Marketing
Common Guides
API Reference
- Templates
- Email
- In App
- SMS
- Omni-Channel
- Push
- Campaigns
- Content Blocks
SMS
Create SMS Template
POST
/
unified
/
marketing
/
templates
/
sms
import { StackOne } from "@stackone/stackone-client-ts";
import { SmsMessagesValue } from "@stackone/stackone-client-ts/sdk/models/shared";
const stackOne = new StackOne({
security: {
username: "",
password: "",
},
});
async function run() {
const result = await stackOne.marketing.createSmsTemplate({
xAccountId: "<id>",
marketingCreateSmsTemplateRequestDto: {
messages: [
{
id: "8187e5da-dc77-475e-9949-af0f1fa4e4e3",
remoteId: "8187e5da-dc77-475e-9949-af0f1fa4e4e3",
messageType: {
value: SmsMessagesValue.Email,
sourceValue: "Email",
},
},
{
id: "8187e5da-dc77-475e-9949-af0f1fa4e4e3",
remoteId: "8187e5da-dc77-475e-9949-af0f1fa4e4e3",
messageType: {
value: SmsMessagesValue.Email,
sourceValue: "Email",
},
},
{
id: "8187e5da-dc77-475e-9949-af0f1fa4e4e3",
remoteId: "8187e5da-dc77-475e-9949-af0f1fa4e4e3",
messageType: {
value: SmsMessagesValue.Email,
sourceValue: "Email",
},
},
],
passthrough: {
"other_known_names": "John Doe",
},
},
});
// Handle the result
console.log(result);
}
run();
{
"statusCode": 201,
"message": "Record created successfully.",
"timestamp": "2021-01-01T01:01:01.000Z",
"data": {
"id": "8187e5da-dc77-475e-9949-af0f1fa4e4e3",
"remote_id": "8187e5da-dc77-475e-9949-af0f1fa4e4e3"
}
}
Authorizations
Basic authentication header of the form Basic <encoded-value>
, where <encoded-value>
is the base64-encoded string username:password
.
Headers
The account identifier
Body
application/json
Response
201
application/json
Record created successfully.
The response is of type object
.
Was this page helpful?
import { StackOne } from "@stackone/stackone-client-ts";
import { SmsMessagesValue } from "@stackone/stackone-client-ts/sdk/models/shared";
const stackOne = new StackOne({
security: {
username: "",
password: "",
},
});
async function run() {
const result = await stackOne.marketing.createSmsTemplate({
xAccountId: "<id>",
marketingCreateSmsTemplateRequestDto: {
messages: [
{
id: "8187e5da-dc77-475e-9949-af0f1fa4e4e3",
remoteId: "8187e5da-dc77-475e-9949-af0f1fa4e4e3",
messageType: {
value: SmsMessagesValue.Email,
sourceValue: "Email",
},
},
{
id: "8187e5da-dc77-475e-9949-af0f1fa4e4e3",
remoteId: "8187e5da-dc77-475e-9949-af0f1fa4e4e3",
messageType: {
value: SmsMessagesValue.Email,
sourceValue: "Email",
},
},
{
id: "8187e5da-dc77-475e-9949-af0f1fa4e4e3",
remoteId: "8187e5da-dc77-475e-9949-af0f1fa4e4e3",
messageType: {
value: SmsMessagesValue.Email,
sourceValue: "Email",
},
},
],
passthrough: {
"other_known_names": "John Doe",
},
},
});
// Handle the result
console.log(result);
}
run();
{
"statusCode": 201,
"message": "Record created successfully.",
"timestamp": "2021-01-01T01:01:01.000Z",
"data": {
"id": "8187e5da-dc77-475e-9949-af0f1fa4e4e3",
"remote_id": "8187e5da-dc77-475e-9949-af0f1fa4e4e3"
}
}