- listEmailTemplates - List Email Templates
- createEmailTemplate - Create Email Templates
- getEmailTemplate - Get Email Templates
- updateEmailTemplate - Update Email Templates
- listInAppTemplates - List In-App Templates
- createInAppTemplate - Create In-App Template
- getInAppTemplate - Get In-App Template
- updateInAppTemplate - Update In-App Template
- listSmsTemplates - List SMS Templates
- createSmsTemplate - Create SMS Template
- getSmsTemplate - Get SMS Template
- updateSmsTemplate - Update SMS Template
listOmniChannelTemplates- List Omni-Channel Templates⚠️ DeprecatedcreateOmniChannelTemplate- Create Omni-Channel Template⚠️ DeprecatedgetOmniChannelTemplate- Get Omni-Channel Template⚠️ DeprecatedupdateOmniChannelTemplate- Update Omni-Channel Template⚠️ Deprecated- listPushTemplates - List Push Templates
- createPushTemplate - Create Push Template
- getPushTemplate - Get Push Template
- updatePushTemplate - Update Push Template
- listCampaigns - List campaigns
- getCampaign - Get campaign
- listContentBlocks - List Content Blocks
- createContentBlock - Create Content Block
- getContentBlock - Get Content Blocks
- updateContentBlock - Update Content Block
List Email Templates
declare(strict_types=1);
require 'vendor/autoload.php';
use StackOne\client;
use StackOne\client\Models\Components;
use StackOne\client\Models\Operations;
use StackOne\client\Utils;
$sdk = client\StackOne::builder()
->setSecurity(
new Components\Security(
username: '',
password: '',
)
)
->build();
$request = new Operations\MarketingListEmailTemplatesRequest(
xAccountId: '<id>',
fields: 'id,remote_id,name,messages,created_at,updated_at,tags,unified_custom_fields',
filter: new Operations\MarketingListEmailTemplatesQueryParamFilter(
updatedAfter: Utils\Utils::parseDateTime('2020-01-01T00:00:00.000Z'),
),
prefer: 'heartbeat',
);
$responses = $sdk->marketing->listEmailTemplates(
request: $request
);
foreach ($responses as $response) {
if ($response->statusCode === 200) {
// handle response
}
}| Parameter | Type | Required | Description |
|---|---|---|---|
$request |
Operations\MarketingListEmailTemplatesRequest | ✔️ | The request object to use for the request. |
?Operations\MarketingListEmailTemplatesResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| Errors\BadRequestResponse | 400 | application/json |
| Errors\UnauthorizedResponse | 401 | application/json |
| Errors\ForbiddenResponse | 403 | application/json |
| Errors\NotFoundResponse | 404 | application/json |
| Errors\RequestTimedOutResponse | 408 | application/json |
| Errors\ConflictResponse | 409 | application/json |
| Errors\PreconditionFailedResponse | 412 | application/json |
| Errors\UnprocessableEntityResponse | 422 | application/json |
| Errors\TooManyRequestsResponse | 429 | application/json |
| Errors\InternalServerErrorResponse | 500 | application/json |
| Errors\NotImplementedResponse | 501 | application/json |
| Errors\BadGatewayResponse | 502 | application/json |
| Errors\SDKException | 4XX, 5XX | */* |
Create Email Templates
declare(strict_types=1);
require 'vendor/autoload.php';
use StackOne\client;
use StackOne\client\Models\Components;
$sdk = client\StackOne::builder()
->setSecurity(
new Components\Security(
username: '',
password: '',
)
)
->build();
$marketingCreateEmailTemplateRequestDto = new Components\MarketingCreateEmailTemplateRequestDto(
messages: [
new Components\EmailMessages(
id: '8187e5da-dc77-475e-9949-af0f1fa4e4e3',
remoteId: '8187e5da-dc77-475e-9949-af0f1fa4e4e3',
messageType: null,
),
],
passthrough: [
'other_known_names' => 'John Doe',
],
);
$response = $sdk->marketing->createEmailTemplate(
xAccountId: '<id>',
marketingCreateEmailTemplateRequestDto: $marketingCreateEmailTemplateRequestDto,
prefer: 'heartbeat'
);
if ($response->createResult !== null) {
// handle response
}| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
xAccountId |
string | ✔️ | The account identifier | |
marketingCreateEmailTemplateRequestDto |
Components\MarketingCreateEmailTemplateRequestDto | ✔️ | N/A | |
prefer |
?string | ➖ | Set to "heartbeat" to enable keep-alive newline heartbeats during long-running requests. Response includes Preference-Applied: heartbeat header when honored. (RFC 7240) | heartbeat |
?Operations\MarketingCreateEmailTemplateResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| Errors\BadRequestResponse | 400 | application/json |
| Errors\UnauthorizedResponse | 401 | application/json |
| Errors\ForbiddenResponse | 403 | application/json |
| Errors\NotFoundResponse | 404 | application/json |
| Errors\RequestTimedOutResponse | 408 | application/json |
| Errors\ConflictResponse | 409 | application/json |
| Errors\PreconditionFailedResponse | 412 | application/json |
| Errors\UnprocessableEntityResponse | 422 | application/json |
| Errors\TooManyRequestsResponse | 429 | application/json |
| Errors\InternalServerErrorResponse | 500 | application/json |
| Errors\NotImplementedResponse | 501 | application/json |
| Errors\BadGatewayResponse | 502 | application/json |
| Errors\SDKException | 4XX, 5XX | */* |
Get Email Templates
declare(strict_types=1);
require 'vendor/autoload.php';
use StackOne\client;
use StackOne\client\Models\Components;
use StackOne\client\Models\Operations;
$sdk = client\StackOne::builder()
->setSecurity(
new Components\Security(
username: '',
password: '',
)
)
->build();
$request = new Operations\MarketingGetEmailTemplateRequest(
xAccountId: '<id>',
id: '<id>',
fields: 'id,remote_id,name,messages,created_at,updated_at,tags,unified_custom_fields',
prefer: 'heartbeat',
);
$response = $sdk->marketing->getEmailTemplate(
request: $request
);
if ($response->emailTemplateResult !== null) {
// handle response
}| Parameter | Type | Required | Description |
|---|---|---|---|
$request |
Operations\MarketingGetEmailTemplateRequest | ✔️ | The request object to use for the request. |
?Operations\MarketingGetEmailTemplateResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| Errors\BadRequestResponse | 400 | application/json |
| Errors\UnauthorizedResponse | 401 | application/json |
| Errors\ForbiddenResponse | 403 | application/json |
| Errors\NotFoundResponse | 404 | application/json |
| Errors\RequestTimedOutResponse | 408 | application/json |
| Errors\ConflictResponse | 409 | application/json |
| Errors\PreconditionFailedResponse | 412 | application/json |
| Errors\UnprocessableEntityResponse | 422 | application/json |
| Errors\TooManyRequestsResponse | 429 | application/json |
| Errors\InternalServerErrorResponse | 500 | application/json |
| Errors\NotImplementedResponse | 501 | application/json |
| Errors\BadGatewayResponse | 502 | application/json |
| Errors\SDKException | 4XX, 5XX | */* |
Update Email Templates
declare(strict_types=1);
require 'vendor/autoload.php';
use StackOne\client;
use StackOne\client\Models\Components;
$sdk = client\StackOne::builder()
->setSecurity(
new Components\Security(
username: '',
password: '',
)
)
->build();
$marketingCreateEmailTemplateRequestDto = new Components\MarketingCreateEmailTemplateRequestDto(
messages: [
new Components\EmailMessages(
id: '8187e5da-dc77-475e-9949-af0f1fa4e4e3',
remoteId: '8187e5da-dc77-475e-9949-af0f1fa4e4e3',
messageType: new Components\MessageType(
value: Components\EmailMessagesValue::Email,
sourceValue: 'Email',
),
),
],
passthrough: [
'other_known_names' => 'John Doe',
],
);
$response = $sdk->marketing->updateEmailTemplate(
xAccountId: '<id>',
id: '<id>',
marketingCreateEmailTemplateRequestDto: $marketingCreateEmailTemplateRequestDto,
prefer: 'heartbeat'
);
if ($response->createResult !== null) {
// handle response
}| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
xAccountId |
string | ✔️ | The account identifier | |
id |
string | ✔️ | N/A | |
marketingCreateEmailTemplateRequestDto |
Components\MarketingCreateEmailTemplateRequestDto | ✔️ | N/A | |
prefer |
?string | ➖ | Set to "heartbeat" to enable keep-alive newline heartbeats during long-running requests. Response includes Preference-Applied: heartbeat header when honored. (RFC 7240) | heartbeat |
?Operations\MarketingUpdateEmailTemplateResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| Errors\BadRequestResponse | 400 | application/json |
| Errors\UnauthorizedResponse | 401 | application/json |
| Errors\ForbiddenResponse | 403 | application/json |
| Errors\NotFoundResponse | 404 | application/json |
| Errors\RequestTimedOutResponse | 408 | application/json |
| Errors\ConflictResponse | 409 | application/json |
| Errors\PreconditionFailedResponse | 412 | application/json |
| Errors\UnprocessableEntityResponse | 422 | application/json |
| Errors\TooManyRequestsResponse | 429 | application/json |
| Errors\InternalServerErrorResponse | 500 | application/json |
| Errors\NotImplementedResponse | 501 | application/json |
| Errors\BadGatewayResponse | 502 | application/json |
| Errors\SDKException | 4XX, 5XX | */* |
List In-App Templates
declare(strict_types=1);
require 'vendor/autoload.php';
use StackOne\client;
use StackOne\client\Models\Components;
use StackOne\client\Models\Operations;
$sdk = client\StackOne::builder()
->setSecurity(
new Components\Security(
username: '',
password: '',
)
)
->build();
$request = new Operations\MarketingListInAppTemplatesRequest(
xAccountId: '<id>',
fields: 'id,remote_id,name,messages,created_at,updated_at,tags,unified_custom_fields',
filter: null,
prefer: 'heartbeat',
);
$responses = $sdk->marketing->listInAppTemplates(
request: $request
);
foreach ($responses as $response) {
if ($response->statusCode === 200) {
// handle response
}
}| Parameter | Type | Required | Description |
|---|---|---|---|
$request |
Operations\MarketingListInAppTemplatesRequest | ✔️ | The request object to use for the request. |
?Operations\MarketingListInAppTemplatesResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| Errors\BadRequestResponse | 400 | application/json |
| Errors\UnauthorizedResponse | 401 | application/json |
| Errors\ForbiddenResponse | 403 | application/json |
| Errors\NotFoundResponse | 404 | application/json |
| Errors\RequestTimedOutResponse | 408 | application/json |
| Errors\ConflictResponse | 409 | application/json |
| Errors\PreconditionFailedResponse | 412 | application/json |
| Errors\UnprocessableEntityResponse | 422 | application/json |
| Errors\TooManyRequestsResponse | 429 | application/json |
| Errors\InternalServerErrorResponse | 500 | application/json |
| Errors\NotImplementedResponse | 501 | application/json |
| Errors\BadGatewayResponse | 502 | application/json |
| Errors\SDKException | 4XX, 5XX | */* |
Create In-App Template
declare(strict_types=1);
require 'vendor/autoload.php';
use StackOne\client;
use StackOne\client\Models\Components;
$sdk = client\StackOne::builder()
->setSecurity(
new Components\Security(
username: '',
password: '',
)
)
->build();
$marketingCreateInAppTemplateRequestDto = new Components\MarketingCreateInAppTemplateRequestDto(
messages: [
new Components\InAppMessages(
id: '8187e5da-dc77-475e-9949-af0f1fa4e4e3',
remoteId: '8187e5da-dc77-475e-9949-af0f1fa4e4e3',
messageType: new Components\InAppMessagesMessageType(
value: Components\InAppMessagesValue::Email,
sourceValue: 'Email',
),
),
],
passthrough: [
'other_known_names' => 'John Doe',
],
);
$response = $sdk->marketing->createInAppTemplate(
xAccountId: '<id>',
marketingCreateInAppTemplateRequestDto: $marketingCreateInAppTemplateRequestDto,
prefer: 'heartbeat'
);
if ($response->createResult !== null) {
// handle response
}| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
xAccountId |
string | ✔️ | The account identifier | |
marketingCreateInAppTemplateRequestDto |
Components\MarketingCreateInAppTemplateRequestDto | ✔️ | N/A | |
prefer |
?string | ➖ | Set to "heartbeat" to enable keep-alive newline heartbeats during long-running requests. Response includes Preference-Applied: heartbeat header when honored. (RFC 7240) | heartbeat |
?Operations\MarketingCreateInAppTemplateResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| Errors\BadRequestResponse | 400 | application/json |
| Errors\UnauthorizedResponse | 401 | application/json |
| Errors\ForbiddenResponse | 403 | application/json |
| Errors\NotFoundResponse | 404 | application/json |
| Errors\RequestTimedOutResponse | 408 | application/json |
| Errors\ConflictResponse | 409 | application/json |
| Errors\PreconditionFailedResponse | 412 | application/json |
| Errors\UnprocessableEntityResponse | 422 | application/json |
| Errors\TooManyRequestsResponse | 429 | application/json |
| Errors\InternalServerErrorResponse | 500 | application/json |
| Errors\NotImplementedResponse | 501 | application/json |
| Errors\BadGatewayResponse | 502 | application/json |
| Errors\SDKException | 4XX, 5XX | */* |
Get In-App Template
declare(strict_types=1);
require 'vendor/autoload.php';
use StackOne\client;
use StackOne\client\Models\Components;
use StackOne\client\Models\Operations;
$sdk = client\StackOne::builder()
->setSecurity(
new Components\Security(
username: '',
password: '',
)
)
->build();
$request = new Operations\MarketingGetInAppTemplateRequest(
xAccountId: '<id>',
id: '<id>',
fields: 'id,remote_id,name,messages,created_at,updated_at,tags,unified_custom_fields',
prefer: 'heartbeat',
);
$response = $sdk->marketing->getInAppTemplate(
request: $request
);
if ($response->inAppTemplateResult !== null) {
// handle response
}| Parameter | Type | Required | Description |
|---|---|---|---|
$request |
Operations\MarketingGetInAppTemplateRequest | ✔️ | The request object to use for the request. |
?Operations\MarketingGetInAppTemplateResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| Errors\BadRequestResponse | 400 | application/json |
| Errors\UnauthorizedResponse | 401 | application/json |
| Errors\ForbiddenResponse | 403 | application/json |
| Errors\NotFoundResponse | 404 | application/json |
| Errors\RequestTimedOutResponse | 408 | application/json |
| Errors\ConflictResponse | 409 | application/json |
| Errors\PreconditionFailedResponse | 412 | application/json |
| Errors\UnprocessableEntityResponse | 422 | application/json |
| Errors\TooManyRequestsResponse | 429 | application/json |
| Errors\InternalServerErrorResponse | 500 | application/json |
| Errors\NotImplementedResponse | 501 | application/json |
| Errors\BadGatewayResponse | 502 | application/json |
| Errors\SDKException | 4XX, 5XX | */* |
Update In-App Template
declare(strict_types=1);
require 'vendor/autoload.php';
use StackOne\client;
use StackOne\client\Models\Components;
$sdk = client\StackOne::builder()
->setSecurity(
new Components\Security(
username: '',
password: '',
)
)
->build();
$marketingCreateInAppTemplateRequestDto = new Components\MarketingCreateInAppTemplateRequestDto(
messages: [
new Components\InAppMessages(
id: '8187e5da-dc77-475e-9949-af0f1fa4e4e3',
remoteId: '8187e5da-dc77-475e-9949-af0f1fa4e4e3',
messageType: new Components\InAppMessagesMessageType(
value: Components\InAppMessagesValue::Email,
sourceValue: 'Email',
),
),
],
passthrough: [
'other_known_names' => 'John Doe',
],
);
$response = $sdk->marketing->updateInAppTemplate(
xAccountId: '<id>',
id: '<id>',
marketingCreateInAppTemplateRequestDto: $marketingCreateInAppTemplateRequestDto,
prefer: 'heartbeat'
);
if ($response->createResult !== null) {
// handle response
}| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
xAccountId |
string | ✔️ | The account identifier | |
id |
string | ✔️ | N/A | |
marketingCreateInAppTemplateRequestDto |
Components\MarketingCreateInAppTemplateRequestDto | ✔️ | N/A | |
prefer |
?string | ➖ | Set to "heartbeat" to enable keep-alive newline heartbeats during long-running requests. Response includes Preference-Applied: heartbeat header when honored. (RFC 7240) | heartbeat |
?Operations\MarketingUpdateInAppTemplateResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| Errors\BadRequestResponse | 400 | application/json |
| Errors\UnauthorizedResponse | 401 | application/json |
| Errors\ForbiddenResponse | 403 | application/json |
| Errors\NotFoundResponse | 404 | application/json |
| Errors\RequestTimedOutResponse | 408 | application/json |
| Errors\ConflictResponse | 409 | application/json |
| Errors\PreconditionFailedResponse | 412 | application/json |
| Errors\UnprocessableEntityResponse | 422 | application/json |
| Errors\TooManyRequestsResponse | 429 | application/json |
| Errors\InternalServerErrorResponse | 500 | application/json |
| Errors\NotImplementedResponse | 501 | application/json |
| Errors\BadGatewayResponse | 502 | application/json |
| Errors\SDKException | 4XX, 5XX | */* |
List SMS Templates
declare(strict_types=1);
require 'vendor/autoload.php';
use StackOne\client;
use StackOne\client\Models\Components;
use StackOne\client\Models\Operations;
use StackOne\client\Utils;
$sdk = client\StackOne::builder()
->setSecurity(
new Components\Security(
username: '',
password: '',
)
)
->build();
$request = new Operations\MarketingListSmsTemplatesRequest(
xAccountId: '<id>',
fields: 'id,remote_id,name,messages,created_at,updated_at,tags,unified_custom_fields',
filter: new Operations\MarketingListSmsTemplatesQueryParamFilter(
updatedAfter: Utils\Utils::parseDateTime('2020-01-01T00:00:00.000Z'),
),
prefer: 'heartbeat',
);
$responses = $sdk->marketing->listSmsTemplates(
request: $request
);
foreach ($responses as $response) {
if ($response->statusCode === 200) {
// handle response
}
}| Parameter | Type | Required | Description |
|---|---|---|---|
$request |
Operations\MarketingListSmsTemplatesRequest | ✔️ | The request object to use for the request. |
?Operations\MarketingListSmsTemplatesResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| Errors\BadRequestResponse | 400 | application/json |
| Errors\UnauthorizedResponse | 401 | application/json |
| Errors\ForbiddenResponse | 403 | application/json |
| Errors\NotFoundResponse | 404 | application/json |
| Errors\RequestTimedOutResponse | 408 | application/json |
| Errors\ConflictResponse | 409 | application/json |
| Errors\PreconditionFailedResponse | 412 | application/json |
| Errors\UnprocessableEntityResponse | 422 | application/json |
| Errors\TooManyRequestsResponse | 429 | application/json |
| Errors\InternalServerErrorResponse | 500 | application/json |
| Errors\NotImplementedResponse | 501 | application/json |
| Errors\BadGatewayResponse | 502 | application/json |
| Errors\SDKException | 4XX, 5XX | */* |
Create SMS Template
declare(strict_types=1);
require 'vendor/autoload.php';
use StackOne\client;
use StackOne\client\Models\Components;
$sdk = client\StackOne::builder()
->setSecurity(
new Components\Security(
username: '',
password: '',
)
)
->build();
$marketingCreateSmsTemplateRequestDto = new Components\MarketingCreateSmsTemplateRequestDto(
messages: [
new Components\SmsMessages(
id: '8187e5da-dc77-475e-9949-af0f1fa4e4e3',
remoteId: '8187e5da-dc77-475e-9949-af0f1fa4e4e3',
messageType: new Components\SmsMessagesMessageType(
value: Components\SmsMessagesValue::Email,
sourceValue: 'Email',
),
),
],
passthrough: [
'other_known_names' => 'John Doe',
],
);
$response = $sdk->marketing->createSmsTemplate(
xAccountId: '<id>',
marketingCreateSmsTemplateRequestDto: $marketingCreateSmsTemplateRequestDto,
prefer: 'heartbeat'
);
if ($response->createResult !== null) {
// handle response
}| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
xAccountId |
string | ✔️ | The account identifier | |
marketingCreateSmsTemplateRequestDto |
Components\MarketingCreateSmsTemplateRequestDto | ✔️ | N/A | |
prefer |
?string | ➖ | Set to "heartbeat" to enable keep-alive newline heartbeats during long-running requests. Response includes Preference-Applied: heartbeat header when honored. (RFC 7240) | heartbeat |
?Operations\MarketingCreateSmsTemplateResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| Errors\BadRequestResponse | 400 | application/json |
| Errors\UnauthorizedResponse | 401 | application/json |
| Errors\ForbiddenResponse | 403 | application/json |
| Errors\NotFoundResponse | 404 | application/json |
| Errors\RequestTimedOutResponse | 408 | application/json |
| Errors\ConflictResponse | 409 | application/json |
| Errors\PreconditionFailedResponse | 412 | application/json |
| Errors\UnprocessableEntityResponse | 422 | application/json |
| Errors\TooManyRequestsResponse | 429 | application/json |
| Errors\InternalServerErrorResponse | 500 | application/json |
| Errors\NotImplementedResponse | 501 | application/json |
| Errors\BadGatewayResponse | 502 | application/json |
| Errors\SDKException | 4XX, 5XX | */* |
Get SMS Template
declare(strict_types=1);
require 'vendor/autoload.php';
use StackOne\client;
use StackOne\client\Models\Components;
use StackOne\client\Models\Operations;
$sdk = client\StackOne::builder()
->setSecurity(
new Components\Security(
username: '',
password: '',
)
)
->build();
$request = new Operations\MarketingGetSmsTemplateRequest(
xAccountId: '<id>',
id: '<id>',
fields: 'id,remote_id,name,messages,created_at,updated_at,tags,unified_custom_fields',
prefer: 'heartbeat',
);
$response = $sdk->marketing->getSmsTemplate(
request: $request
);
if ($response->smsTemplateResult !== null) {
// handle response
}| Parameter | Type | Required | Description |
|---|---|---|---|
$request |
Operations\MarketingGetSmsTemplateRequest | ✔️ | The request object to use for the request. |
?Operations\MarketingGetSmsTemplateResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| Errors\BadRequestResponse | 400 | application/json |
| Errors\UnauthorizedResponse | 401 | application/json |
| Errors\ForbiddenResponse | 403 | application/json |
| Errors\NotFoundResponse | 404 | application/json |
| Errors\RequestTimedOutResponse | 408 | application/json |
| Errors\ConflictResponse | 409 | application/json |
| Errors\PreconditionFailedResponse | 412 | application/json |
| Errors\UnprocessableEntityResponse | 422 | application/json |
| Errors\TooManyRequestsResponse | 429 | application/json |
| Errors\InternalServerErrorResponse | 500 | application/json |
| Errors\NotImplementedResponse | 501 | application/json |
| Errors\BadGatewayResponse | 502 | application/json |
| Errors\SDKException | 4XX, 5XX | */* |
Update SMS Template
declare(strict_types=1);
require 'vendor/autoload.php';
use StackOne\client;
use StackOne\client\Models\Components;
$sdk = client\StackOne::builder()
->setSecurity(
new Components\Security(
username: '',
password: '',
)
)
->build();
$marketingCreateSmsTemplateRequestDto = new Components\MarketingCreateSmsTemplateRequestDto(
messages: [
new Components\SmsMessages(
id: '8187e5da-dc77-475e-9949-af0f1fa4e4e3',
remoteId: '8187e5da-dc77-475e-9949-af0f1fa4e4e3',
messageType: new Components\SmsMessagesMessageType(
value: Components\SmsMessagesValue::Email,
sourceValue: 'Email',
),
),
],
passthrough: [
'other_known_names' => 'John Doe',
],
);
$response = $sdk->marketing->updateSmsTemplate(
xAccountId: '<id>',
id: '<id>',
marketingCreateSmsTemplateRequestDto: $marketingCreateSmsTemplateRequestDto,
prefer: 'heartbeat'
);
if ($response->createResult !== null) {
// handle response
}| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
xAccountId |
string | ✔️ | The account identifier | |
id |
string | ✔️ | N/A | |
marketingCreateSmsTemplateRequestDto |
Components\MarketingCreateSmsTemplateRequestDto | ✔️ | N/A | |
prefer |
?string | ➖ | Set to "heartbeat" to enable keep-alive newline heartbeats during long-running requests. Response includes Preference-Applied: heartbeat header when honored. (RFC 7240) | heartbeat |
?Operations\MarketingUpdateSmsTemplateResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| Errors\BadRequestResponse | 400 | application/json |
| Errors\UnauthorizedResponse | 401 | application/json |
| Errors\ForbiddenResponse | 403 | application/json |
| Errors\NotFoundResponse | 404 | application/json |
| Errors\RequestTimedOutResponse | 408 | application/json |
| Errors\ConflictResponse | 409 | application/json |
| Errors\PreconditionFailedResponse | 412 | application/json |
| Errors\UnprocessableEntityResponse | 422 | application/json |
| Errors\TooManyRequestsResponse | 429 | application/json |
| Errors\InternalServerErrorResponse | 500 | application/json |
| Errors\NotImplementedResponse | 501 | application/json |
| Errors\BadGatewayResponse | 502 | application/json |
| Errors\SDKException | 4XX, 5XX | */* |
List Omni-Channel Templates
⚠️ DEPRECATED: This will be removed in a future release, please migrate away from it as soon as possible.
declare(strict_types=1);
require 'vendor/autoload.php';
use StackOne\client;
use StackOne\client\Models\Components;
use StackOne\client\Models\Operations;
use StackOne\client\Utils;
$sdk = client\StackOne::builder()
->setSecurity(
new Components\Security(
username: '',
password: '',
)
)
->build();
$request = new Operations\MarketingListOmniChannelTemplatesRequest(
xAccountId: '<id>',
fields: 'id,remote_id,name,messages,created_at,updated_at,tags,unified_custom_fields',
filter: new Operations\MarketingListOmniChannelTemplatesQueryParamFilter(
updatedAfter: Utils\Utils::parseDateTime('2020-01-01T00:00:00.000Z'),
),
prefer: 'heartbeat',
);
$responses = $sdk->marketing->listOmniChannelTemplates(
request: $request
);
foreach ($responses as $response) {
if ($response->statusCode === 200) {
// handle response
}
}| Parameter | Type | Required | Description |
|---|---|---|---|
$request |
Operations\MarketingListOmniChannelTemplatesRequest | ✔️ | The request object to use for the request. |
?Operations\MarketingListOmniChannelTemplatesResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| Errors\BadRequestResponse | 400 | application/json |
| Errors\UnauthorizedResponse | 401 | application/json |
| Errors\ForbiddenResponse | 403 | application/json |
| Errors\NotFoundResponse | 404 | application/json |
| Errors\RequestTimedOutResponse | 408 | application/json |
| Errors\ConflictResponse | 409 | application/json |
| Errors\PreconditionFailedResponse | 412 | application/json |
| Errors\UnprocessableEntityResponse | 422 | application/json |
| Errors\TooManyRequestsResponse | 429 | application/json |
| Errors\InternalServerErrorResponse | 500 | application/json |
| Errors\NotImplementedResponse | 501 | application/json |
| Errors\BadGatewayResponse | 502 | application/json |
| Errors\SDKException | 4XX, 5XX | */* |
Create Omni-Channel Template
⚠️ DEPRECATED: This will be removed in a future release, please migrate away from it as soon as possible.
declare(strict_types=1);
require 'vendor/autoload.php';
use StackOne\client;
use StackOne\client\Models\Components;
$sdk = client\StackOne::builder()
->setSecurity(
new Components\Security(
username: '',
password: '',
)
)
->build();
$marketingCreateTemplateRequestDto = new Components\MarketingCreateTemplateRequestDto(
messages: [
new Components\CreateMessage(
id: '8187e5da-dc77-475e-9949-af0f1fa4e4e3',
messageType: new Components\CreateMessageMessageType(
value: Components\CreateMessageValue::Email,
sourceValue: 'Email',
),
),
],
passthrough: [
'other_known_names' => 'John Doe',
],
);
$response = $sdk->marketing->createOmniChannelTemplate(
xAccountId: '<id>',
marketingCreateTemplateRequestDto: $marketingCreateTemplateRequestDto,
prefer: 'heartbeat'
);
if ($response->createResult !== null) {
// handle response
}| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
xAccountId |
string | ✔️ | The account identifier | |
marketingCreateTemplateRequestDto |
Components\MarketingCreateTemplateRequestDto | ✔️ | N/A | |
prefer |
?string | ➖ | Set to "heartbeat" to enable keep-alive newline heartbeats during long-running requests. Response includes Preference-Applied: heartbeat header when honored. (RFC 7240) | heartbeat |
?Operations\MarketingCreateOmniChannelTemplateResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| Errors\BadRequestResponse | 400 | application/json |
| Errors\UnauthorizedResponse | 401 | application/json |
| Errors\ForbiddenResponse | 403 | application/json |
| Errors\NotFoundResponse | 404 | application/json |
| Errors\RequestTimedOutResponse | 408 | application/json |
| Errors\ConflictResponse | 409 | application/json |
| Errors\PreconditionFailedResponse | 412 | application/json |
| Errors\UnprocessableEntityResponse | 422 | application/json |
| Errors\TooManyRequestsResponse | 429 | application/json |
| Errors\InternalServerErrorResponse | 500 | application/json |
| Errors\NotImplementedResponse | 501 | application/json |
| Errors\BadGatewayResponse | 502 | application/json |
| Errors\SDKException | 4XX, 5XX | */* |
Get Omni-Channel Template
⚠️ DEPRECATED: This will be removed in a future release, please migrate away from it as soon as possible.
declare(strict_types=1);
require 'vendor/autoload.php';
use StackOne\client;
use StackOne\client\Models\Components;
use StackOne\client\Models\Operations;
$sdk = client\StackOne::builder()
->setSecurity(
new Components\Security(
username: '',
password: '',
)
)
->build();
$request = new Operations\MarketingGetOmniChannelTemplateRequest(
xAccountId: '<id>',
id: '<id>',
fields: 'id,remote_id,name,messages,created_at,updated_at,tags,unified_custom_fields',
prefer: 'heartbeat',
);
$response = $sdk->marketing->getOmniChannelTemplate(
request: $request
);
if ($response->templateResult !== null) {
// handle response
}| Parameter | Type | Required | Description |
|---|---|---|---|
$request |
Operations\MarketingGetOmniChannelTemplateRequest | ✔️ | The request object to use for the request. |
?Operations\MarketingGetOmniChannelTemplateResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| Errors\BadRequestResponse | 400 | application/json |
| Errors\UnauthorizedResponse | 401 | application/json |
| Errors\ForbiddenResponse | 403 | application/json |
| Errors\NotFoundResponse | 404 | application/json |
| Errors\RequestTimedOutResponse | 408 | application/json |
| Errors\ConflictResponse | 409 | application/json |
| Errors\PreconditionFailedResponse | 412 | application/json |
| Errors\UnprocessableEntityResponse | 422 | application/json |
| Errors\TooManyRequestsResponse | 429 | application/json |
| Errors\InternalServerErrorResponse | 500 | application/json |
| Errors\NotImplementedResponse | 501 | application/json |
| Errors\BadGatewayResponse | 502 | application/json |
| Errors\SDKException | 4XX, 5XX | */* |
Update Omni-Channel Template
⚠️ DEPRECATED: This will be removed in a future release, please migrate away from it as soon as possible.
declare(strict_types=1);
require 'vendor/autoload.php';
use StackOne\client;
use StackOne\client\Models\Components;
$sdk = client\StackOne::builder()
->setSecurity(
new Components\Security(
username: '',
password: '',
)
)
->build();
$marketingCreateTemplateRequestDto = new Components\MarketingCreateTemplateRequestDto(
messages: [
new Components\CreateMessage(
id: '8187e5da-dc77-475e-9949-af0f1fa4e4e3',
messageType: new Components\CreateMessageMessageType(
value: Components\CreateMessageValue::Email,
sourceValue: 'Email',
),
),
],
passthrough: [
'other_known_names' => 'John Doe',
],
);
$response = $sdk->marketing->updateOmniChannelTemplate(
xAccountId: '<id>',
id: '<id>',
marketingCreateTemplateRequestDto: $marketingCreateTemplateRequestDto,
prefer: 'heartbeat'
);
if ($response->createResult !== null) {
// handle response
}| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
xAccountId |
string | ✔️ | The account identifier | |
id |
string | ✔️ | N/A | |
marketingCreateTemplateRequestDto |
Components\MarketingCreateTemplateRequestDto | ✔️ | N/A | |
prefer |
?string | ➖ | Set to "heartbeat" to enable keep-alive newline heartbeats during long-running requests. Response includes Preference-Applied: heartbeat header when honored. (RFC 7240) | heartbeat |
?Operations\MarketingUpdateOmniChannelTemplateResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| Errors\BadRequestResponse | 400 | application/json |
| Errors\UnauthorizedResponse | 401 | application/json |
| Errors\ForbiddenResponse | 403 | application/json |
| Errors\NotFoundResponse | 404 | application/json |
| Errors\RequestTimedOutResponse | 408 | application/json |
| Errors\ConflictResponse | 409 | application/json |
| Errors\PreconditionFailedResponse | 412 | application/json |
| Errors\UnprocessableEntityResponse | 422 | application/json |
| Errors\TooManyRequestsResponse | 429 | application/json |
| Errors\InternalServerErrorResponse | 500 | application/json |
| Errors\NotImplementedResponse | 501 | application/json |
| Errors\BadGatewayResponse | 502 | application/json |
| Errors\SDKException | 4XX, 5XX | */* |
List Push Templates
declare(strict_types=1);
require 'vendor/autoload.php';
use StackOne\client;
use StackOne\client\Models\Components;
use StackOne\client\Models\Operations;
use StackOne\client\Utils;
$sdk = client\StackOne::builder()
->setSecurity(
new Components\Security(
username: '',
password: '',
)
)
->build();
$request = new Operations\MarketingListPushTemplatesRequest(
xAccountId: '<id>',
fields: 'id,remote_id,name,messages,created_at,updated_at,tags,unified_custom_fields',
filter: new Operations\MarketingListPushTemplatesQueryParamFilter(
updatedAfter: Utils\Utils::parseDateTime('2020-01-01T00:00:00.000Z'),
),
prefer: 'heartbeat',
);
$responses = $sdk->marketing->listPushTemplates(
request: $request
);
foreach ($responses as $response) {
if ($response->statusCode === 200) {
// handle response
}
}| Parameter | Type | Required | Description |
|---|---|---|---|
$request |
Operations\MarketingListPushTemplatesRequest | ✔️ | The request object to use for the request. |
?Operations\MarketingListPushTemplatesResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| Errors\BadRequestResponse | 400 | application/json |
| Errors\UnauthorizedResponse | 401 | application/json |
| Errors\ForbiddenResponse | 403 | application/json |
| Errors\NotFoundResponse | 404 | application/json |
| Errors\RequestTimedOutResponse | 408 | application/json |
| Errors\ConflictResponse | 409 | application/json |
| Errors\PreconditionFailedResponse | 412 | application/json |
| Errors\UnprocessableEntityResponse | 422 | application/json |
| Errors\TooManyRequestsResponse | 429 | application/json |
| Errors\InternalServerErrorResponse | 500 | application/json |
| Errors\NotImplementedResponse | 501 | application/json |
| Errors\BadGatewayResponse | 502 | application/json |
| Errors\SDKException | 4XX, 5XX | */* |
Create Push Template
declare(strict_types=1);
require 'vendor/autoload.php';
use StackOne\client;
use StackOne\client\Models\Components;
$sdk = client\StackOne::builder()
->setSecurity(
new Components\Security(
username: '',
password: '',
)
)
->build();
$marketingCreatePushTemplateRequestDto = new Components\MarketingCreatePushTemplateRequestDto(
messages: [
new Components\PushMessages(
id: '8187e5da-dc77-475e-9949-af0f1fa4e4e3',
remoteId: '8187e5da-dc77-475e-9949-af0f1fa4e4e3',
messageType: new Components\PushMessagesMessageType(
value: Components\PushMessagesValue::Email,
sourceValue: 'Email',
),
),
],
passthrough: [
'other_known_names' => 'John Doe',
],
);
$response = $sdk->marketing->createPushTemplate(
xAccountId: '<id>',
marketingCreatePushTemplateRequestDto: $marketingCreatePushTemplateRequestDto,
prefer: 'heartbeat'
);
if ($response->createResult !== null) {
// handle response
}| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
xAccountId |
string | ✔️ | The account identifier | |
marketingCreatePushTemplateRequestDto |
Components\MarketingCreatePushTemplateRequestDto | ✔️ | N/A | |
prefer |
?string | ➖ | Set to "heartbeat" to enable keep-alive newline heartbeats during long-running requests. Response includes Preference-Applied: heartbeat header when honored. (RFC 7240) | heartbeat |
?Operations\MarketingCreatePushTemplateResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| Errors\BadRequestResponse | 400 | application/json |
| Errors\UnauthorizedResponse | 401 | application/json |
| Errors\ForbiddenResponse | 403 | application/json |
| Errors\NotFoundResponse | 404 | application/json |
| Errors\RequestTimedOutResponse | 408 | application/json |
| Errors\ConflictResponse | 409 | application/json |
| Errors\PreconditionFailedResponse | 412 | application/json |
| Errors\UnprocessableEntityResponse | 422 | application/json |
| Errors\TooManyRequestsResponse | 429 | application/json |
| Errors\InternalServerErrorResponse | 500 | application/json |
| Errors\NotImplementedResponse | 501 | application/json |
| Errors\BadGatewayResponse | 502 | application/json |
| Errors\SDKException | 4XX, 5XX | */* |
Get Push Template
declare(strict_types=1);
require 'vendor/autoload.php';
use StackOne\client;
use StackOne\client\Models\Components;
use StackOne\client\Models\Operations;
$sdk = client\StackOne::builder()
->setSecurity(
new Components\Security(
username: '',
password: '',
)
)
->build();
$request = new Operations\MarketingGetPushTemplateRequest(
xAccountId: '<id>',
id: '<id>',
fields: 'id,remote_id,name,messages,created_at,updated_at,tags,unified_custom_fields',
prefer: 'heartbeat',
);
$response = $sdk->marketing->getPushTemplate(
request: $request
);
if ($response->pushTemplateResult !== null) {
// handle response
}| Parameter | Type | Required | Description |
|---|---|---|---|
$request |
Operations\MarketingGetPushTemplateRequest | ✔️ | The request object to use for the request. |
?Operations\MarketingGetPushTemplateResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| Errors\BadRequestResponse | 400 | application/json |
| Errors\UnauthorizedResponse | 401 | application/json |
| Errors\ForbiddenResponse | 403 | application/json |
| Errors\NotFoundResponse | 404 | application/json |
| Errors\RequestTimedOutResponse | 408 | application/json |
| Errors\ConflictResponse | 409 | application/json |
| Errors\PreconditionFailedResponse | 412 | application/json |
| Errors\UnprocessableEntityResponse | 422 | application/json |
| Errors\TooManyRequestsResponse | 429 | application/json |
| Errors\InternalServerErrorResponse | 500 | application/json |
| Errors\NotImplementedResponse | 501 | application/json |
| Errors\BadGatewayResponse | 502 | application/json |
| Errors\SDKException | 4XX, 5XX | */* |
Update Push Template
declare(strict_types=1);
require 'vendor/autoload.php';
use StackOne\client;
use StackOne\client\Models\Components;
$sdk = client\StackOne::builder()
->setSecurity(
new Components\Security(
username: '',
password: '',
)
)
->build();
$marketingCreatePushTemplateRequestDto = new Components\MarketingCreatePushTemplateRequestDto(
messages: [
new Components\PushMessages(
id: '8187e5da-dc77-475e-9949-af0f1fa4e4e3',
remoteId: '8187e5da-dc77-475e-9949-af0f1fa4e4e3',
messageType: new Components\PushMessagesMessageType(
value: Components\PushMessagesValue::Email,
sourceValue: 'Email',
),
),
],
passthrough: [
'other_known_names' => 'John Doe',
],
);
$response = $sdk->marketing->updatePushTemplate(
xAccountId: '<id>',
id: '<id>',
marketingCreatePushTemplateRequestDto: $marketingCreatePushTemplateRequestDto,
prefer: 'heartbeat'
);
if ($response->createResult !== null) {
// handle response
}| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
xAccountId |
string | ✔️ | The account identifier | |
id |
string | ✔️ | N/A | |
marketingCreatePushTemplateRequestDto |
Components\MarketingCreatePushTemplateRequestDto | ✔️ | N/A | |
prefer |
?string | ➖ | Set to "heartbeat" to enable keep-alive newline heartbeats during long-running requests. Response includes Preference-Applied: heartbeat header when honored. (RFC 7240) | heartbeat |
?Operations\MarketingUpdatePushTemplateResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| Errors\BadRequestResponse | 400 | application/json |
| Errors\UnauthorizedResponse | 401 | application/json |
| Errors\ForbiddenResponse | 403 | application/json |
| Errors\NotFoundResponse | 404 | application/json |
| Errors\RequestTimedOutResponse | 408 | application/json |
| Errors\ConflictResponse | 409 | application/json |
| Errors\PreconditionFailedResponse | 412 | application/json |
| Errors\UnprocessableEntityResponse | 422 | application/json |
| Errors\TooManyRequestsResponse | 429 | application/json |
| Errors\InternalServerErrorResponse | 500 | application/json |
| Errors\NotImplementedResponse | 501 | application/json |
| Errors\BadGatewayResponse | 502 | application/json |
| Errors\SDKException | 4XX, 5XX | */* |
List campaigns
declare(strict_types=1);
require 'vendor/autoload.php';
use StackOne\client;
use StackOne\client\Models\Components;
use StackOne\client\Models\Operations;
use StackOne\client\Utils;
$sdk = client\StackOne::builder()
->setSecurity(
new Components\Security(
username: '',
password: '',
)
)
->build();
$request = new Operations\MarketingListCampaignsRequest(
xAccountId: '<id>',
fields: 'id,remote_id,name,created_at,updated_at,description,schedule_type,status,channels,first_sent_at,last_sent_at,tags,messages,unified_custom_fields',
filter: new Operations\MarketingListCampaignsQueryParamFilter(
updatedAfter: Utils\Utils::parseDateTime('2020-01-01T00:00:00.000Z'),
),
prefer: 'heartbeat',
);
$responses = $sdk->marketing->listCampaigns(
request: $request
);
foreach ($responses as $response) {
if ($response->statusCode === 200) {
// handle response
}
}| Parameter | Type | Required | Description |
|---|---|---|---|
$request |
Operations\MarketingListCampaignsRequest | ✔️ | The request object to use for the request. |
?Operations\MarketingListCampaignsResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| Errors\BadRequestResponse | 400 | application/json |
| Errors\UnauthorizedResponse | 401 | application/json |
| Errors\ForbiddenResponse | 403 | application/json |
| Errors\NotFoundResponse | 404 | application/json |
| Errors\RequestTimedOutResponse | 408 | application/json |
| Errors\ConflictResponse | 409 | application/json |
| Errors\PreconditionFailedResponse | 412 | application/json |
| Errors\UnprocessableEntityResponse | 422 | application/json |
| Errors\TooManyRequestsResponse | 429 | application/json |
| Errors\InternalServerErrorResponse | 500 | application/json |
| Errors\NotImplementedResponse | 501 | application/json |
| Errors\BadGatewayResponse | 502 | application/json |
| Errors\SDKException | 4XX, 5XX | */* |
Get campaign
declare(strict_types=1);
require 'vendor/autoload.php';
use StackOne\client;
use StackOne\client\Models\Components;
use StackOne\client\Models\Operations;
$sdk = client\StackOne::builder()
->setSecurity(
new Components\Security(
username: '',
password: '',
)
)
->build();
$request = new Operations\MarketingGetCampaignRequest(
xAccountId: '<id>',
id: '<id>',
fields: 'id,remote_id,name,created_at,updated_at,description,schedule_type,status,channels,first_sent_at,last_sent_at,tags,messages,unified_custom_fields',
prefer: 'heartbeat',
);
$response = $sdk->marketing->getCampaign(
request: $request
);
if ($response->campaignResult !== null) {
// handle response
}| Parameter | Type | Required | Description |
|---|---|---|---|
$request |
Operations\MarketingGetCampaignRequest | ✔️ | The request object to use for the request. |
?Operations\MarketingGetCampaignResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| Errors\BadRequestResponse | 400 | application/json |
| Errors\UnauthorizedResponse | 401 | application/json |
| Errors\ForbiddenResponse | 403 | application/json |
| Errors\NotFoundResponse | 404 | application/json |
| Errors\RequestTimedOutResponse | 408 | application/json |
| Errors\ConflictResponse | 409 | application/json |
| Errors\PreconditionFailedResponse | 412 | application/json |
| Errors\UnprocessableEntityResponse | 422 | application/json |
| Errors\TooManyRequestsResponse | 429 | application/json |
| Errors\InternalServerErrorResponse | 500 | application/json |
| Errors\NotImplementedResponse | 501 | application/json |
| Errors\BadGatewayResponse | 502 | application/json |
| Errors\SDKException | 4XX, 5XX | */* |
List Content Blocks
declare(strict_types=1);
require 'vendor/autoload.php';
use StackOne\client;
use StackOne\client\Models\Components;
use StackOne\client\Models\Operations;
use StackOne\client\Utils;
$sdk = client\StackOne::builder()
->setSecurity(
new Components\Security(
username: '',
password: '',
)
)
->build();
$request = new Operations\MarketingListContentBlocksRequest(
xAccountId: '<id>',
fields: 'id,remote_id,name,type,content,status,tags,created_at,updated_at,unified_custom_fields',
filter: new Operations\MarketingListContentBlocksQueryParamFilter(
updatedAfter: Utils\Utils::parseDateTime('2020-01-01T00:00:00.000Z'),
),
prefer: 'heartbeat',
);
$responses = $sdk->marketing->listContentBlocks(
request: $request
);
foreach ($responses as $response) {
if ($response->statusCode === 200) {
// handle response
}
}| Parameter | Type | Required | Description |
|---|---|---|---|
$request |
Operations\MarketingListContentBlocksRequest | ✔️ | The request object to use for the request. |
?Operations\MarketingListContentBlocksResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| Errors\BadRequestResponse | 400 | application/json |
| Errors\UnauthorizedResponse | 401 | application/json |
| Errors\ForbiddenResponse | 403 | application/json |
| Errors\NotFoundResponse | 404 | application/json |
| Errors\RequestTimedOutResponse | 408 | application/json |
| Errors\ConflictResponse | 409 | application/json |
| Errors\PreconditionFailedResponse | 412 | application/json |
| Errors\UnprocessableEntityResponse | 422 | application/json |
| Errors\TooManyRequestsResponse | 429 | application/json |
| Errors\InternalServerErrorResponse | 500 | application/json |
| Errors\NotImplementedResponse | 501 | application/json |
| Errors\BadGatewayResponse | 502 | application/json |
| Errors\SDKException | 4XX, 5XX | */* |
Create Content Block
declare(strict_types=1);
require 'vendor/autoload.php';
use StackOne\client;
use StackOne\client\Models\Components;
$sdk = client\StackOne::builder()
->setSecurity(
new Components\Security(
username: '',
password: '',
)
)
->build();
$marketingCreateContentBlocksRequestDto = new Components\MarketingCreateContentBlocksRequestDto(
type: new Components\MarketingCreateContentBlocksRequestDtoType(
value: Components\MarketingCreateContentBlocksRequestDtoValue::Html,
sourceValue: 'text',
),
passthrough: [
'other_known_names' => 'John Doe',
],
);
$response = $sdk->marketing->createContentBlock(
xAccountId: '<id>',
marketingCreateContentBlocksRequestDto: $marketingCreateContentBlocksRequestDto,
prefer: 'heartbeat'
);
if ($response->createResult !== null) {
// handle response
}| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
xAccountId |
string | ✔️ | The account identifier | |
marketingCreateContentBlocksRequestDto |
Components\MarketingCreateContentBlocksRequestDto | ✔️ | N/A | |
prefer |
?string | ➖ | Set to "heartbeat" to enable keep-alive newline heartbeats during long-running requests. Response includes Preference-Applied: heartbeat header when honored. (RFC 7240) | heartbeat |
?Operations\MarketingCreateContentBlockResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| Errors\BadRequestResponse | 400 | application/json |
| Errors\UnauthorizedResponse | 401 | application/json |
| Errors\ForbiddenResponse | 403 | application/json |
| Errors\NotFoundResponse | 404 | application/json |
| Errors\RequestTimedOutResponse | 408 | application/json |
| Errors\ConflictResponse | 409 | application/json |
| Errors\PreconditionFailedResponse | 412 | application/json |
| Errors\UnprocessableEntityResponse | 422 | application/json |
| Errors\TooManyRequestsResponse | 429 | application/json |
| Errors\InternalServerErrorResponse | 500 | application/json |
| Errors\NotImplementedResponse | 501 | application/json |
| Errors\BadGatewayResponse | 502 | application/json |
| Errors\SDKException | 4XX, 5XX | */* |
Get Content Blocks
declare(strict_types=1);
require 'vendor/autoload.php';
use StackOne\client;
use StackOne\client\Models\Components;
use StackOne\client\Models\Operations;
$sdk = client\StackOne::builder()
->setSecurity(
new Components\Security(
username: '',
password: '',
)
)
->build();
$request = new Operations\MarketingGetContentBlockRequest(
xAccountId: '<id>',
id: '<id>',
fields: 'id,remote_id,name,type,content,status,tags,created_at,updated_at,unified_custom_fields',
prefer: 'heartbeat',
);
$response = $sdk->marketing->getContentBlock(
request: $request
);
if ($response->contentBlockResult !== null) {
// handle response
}| Parameter | Type | Required | Description |
|---|---|---|---|
$request |
Operations\MarketingGetContentBlockRequest | ✔️ | The request object to use for the request. |
?Operations\MarketingGetContentBlockResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| Errors\BadRequestResponse | 400 | application/json |
| Errors\UnauthorizedResponse | 401 | application/json |
| Errors\ForbiddenResponse | 403 | application/json |
| Errors\NotFoundResponse | 404 | application/json |
| Errors\RequestTimedOutResponse | 408 | application/json |
| Errors\ConflictResponse | 409 | application/json |
| Errors\PreconditionFailedResponse | 412 | application/json |
| Errors\UnprocessableEntityResponse | 422 | application/json |
| Errors\TooManyRequestsResponse | 429 | application/json |
| Errors\InternalServerErrorResponse | 500 | application/json |
| Errors\NotImplementedResponse | 501 | application/json |
| Errors\BadGatewayResponse | 502 | application/json |
| Errors\SDKException | 4XX, 5XX | */* |
Update Content Block
declare(strict_types=1);
require 'vendor/autoload.php';
use StackOne\client;
use StackOne\client\Models\Components;
$sdk = client\StackOne::builder()
->setSecurity(
new Components\Security(
username: '',
password: '',
)
)
->build();
$marketingCreateContentBlocksRequestDto = new Components\MarketingCreateContentBlocksRequestDto(
type: new Components\MarketingCreateContentBlocksRequestDtoType(
value: Components\MarketingCreateContentBlocksRequestDtoValue::Html,
sourceValue: 'text',
),
passthrough: [
'other_known_names' => 'John Doe',
],
);
$response = $sdk->marketing->updateContentBlock(
xAccountId: '<id>',
id: '<id>',
marketingCreateContentBlocksRequestDto: $marketingCreateContentBlocksRequestDto,
prefer: 'heartbeat'
);
if ($response->createResult !== null) {
// handle response
}| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
xAccountId |
string | ✔️ | The account identifier | |
id |
string | ✔️ | N/A | |
marketingCreateContentBlocksRequestDto |
Components\MarketingCreateContentBlocksRequestDto | ✔️ | N/A | |
prefer |
?string | ➖ | Set to "heartbeat" to enable keep-alive newline heartbeats during long-running requests. Response includes Preference-Applied: heartbeat header when honored. (RFC 7240) | heartbeat |
?Operations\MarketingUpdateContentBlockResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| Errors\BadRequestResponse | 400 | application/json |
| Errors\UnauthorizedResponse | 401 | application/json |
| Errors\ForbiddenResponse | 403 | application/json |
| Errors\NotFoundResponse | 404 | application/json |
| Errors\RequestTimedOutResponse | 408 | application/json |
| Errors\ConflictResponse | 409 | application/json |
| Errors\PreconditionFailedResponse | 412 | application/json |
| Errors\UnprocessableEntityResponse | 422 | application/json |
| Errors\TooManyRequestsResponse | 429 | application/json |
| Errors\InternalServerErrorResponse | 500 | application/json |
| Errors\NotImplementedResponse | 501 | application/json |
| Errors\BadGatewayResponse | 502 | application/json |
| Errors\SDKException | 4XX, 5XX | */* |