Push
Update Push Template
Marketing
Common Guides
API Reference
- Templates
- Email
- In App
- SMS
- Omni-Channel
- Push
- Campaigns
- Content Blocks
Push
Update Push Template
PATCH
/
unified
/
marketing
/
templates
/
push
/
{id}
import { StackOne } from "@stackone/stackone-client-ts";
import { PushMessagesValue } from "@stackone/stackone-client-ts/sdk/models/shared";
const stackOne = new StackOne({
security: {
username: "",
password: "",
},
});
async function run() {
const result = await stackOne.marketing.updatePushTemplate({
id: "<id>",
xAccountId: "<id>",
marketingCreatePushTemplateRequestDto: {
messages: [
{
id: "8187e5da-dc77-475e-9949-af0f1fa4e4e3",
remoteId: "8187e5da-dc77-475e-9949-af0f1fa4e4e3",
messageType: {
value: PushMessagesValue.Email,
sourceValue: "Email",
},
},
{
id: "8187e5da-dc77-475e-9949-af0f1fa4e4e3",
remoteId: "8187e5da-dc77-475e-9949-af0f1fa4e4e3",
messageType: {
value: PushMessagesValue.Email,
sourceValue: "Email",
},
},
{
id: "8187e5da-dc77-475e-9949-af0f1fa4e4e3",
remoteId: "8187e5da-dc77-475e-9949-af0f1fa4e4e3",
messageType: {
value: PushMessagesValue.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
Path Parameters
Body
application/json
Response
200
application/json
Record updated successfully
The response is of type object
.
Was this page helpful?
import { StackOne } from "@stackone/stackone-client-ts";
import { PushMessagesValue } from "@stackone/stackone-client-ts/sdk/models/shared";
const stackOne = new StackOne({
security: {
username: "",
password: "",
},
});
async function run() {
const result = await stackOne.marketing.updatePushTemplate({
id: "<id>",
xAccountId: "<id>",
marketingCreatePushTemplateRequestDto: {
messages: [
{
id: "8187e5da-dc77-475e-9949-af0f1fa4e4e3",
remoteId: "8187e5da-dc77-475e-9949-af0f1fa4e4e3",
messageType: {
value: PushMessagesValue.Email,
sourceValue: "Email",
},
},
{
id: "8187e5da-dc77-475e-9949-af0f1fa4e4e3",
remoteId: "8187e5da-dc77-475e-9949-af0f1fa4e4e3",
messageType: {
value: PushMessagesValue.Email,
sourceValue: "Email",
},
},
{
id: "8187e5da-dc77-475e-9949-af0f1fa4e4e3",
remoteId: "8187e5da-dc77-475e-9949-af0f1fa4e4e3",
messageType: {
value: PushMessagesValue.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"
}
}