PHP SDK

Setup & Initialization

  1. Install Package:
composer require pingram/php
  1. Import:
use Pingram\Client;
  1. Initialize:
$client = new Pingram\Client('YOUR_API_KEY');
NameTypeDescription
api_key*stringYour Pingram API key. You can get it from your dashboard under Environments.
base_urlstringOptional. Override the base URL. Use https://api.ca.pingram.io for the Canada region, and https://api.eu.pingram.io for the EU region. Default: US region.

* required

Region specific example:

use Pingram\Client;

$client = new Pingram\Client('YOUR_API_KEY', 'https://api.eu.pingram.io');

Send

send()

Send a notification

<?php
require_once(__DIR__ . '/vendor/autoload.php');

use Pingram\Client;

$client = new Client('YOUR_API_KEY');
$body = new \Pingram\Model\SenderPostBody(); // configure as needed

try {
    $result = $client->send($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling send: ', $e->getMessage(), PHP_EOL;
}

Parameters

NameTypeDescriptionNotes
sender_post_body\Pingram\Model\SenderPostBodySee Request Body Properties below

Request Body Properties

NameTypeDescription
typestring
toobject
to.idstring
to.emailstring
to.numberstring
to.pushTokensobject[]
to.pushTokens[].type”FCM” | “APN”(required)
to.pushTokens[].tokenstring(required)
to.pushTokens[].deviceobject(required)
to.pushTokens[].device.app_idstring
to.pushTokens[].device.ad_idstring
to.pushTokens[].device.device_idstring(required)
to.pushTokens[].device.platformstring
to.pushTokens[].device.manufacturerstring
to.pushTokens[].device.modelstring
to.pushTokens[].environmentstringused by APN to differentiate between sandbox and production builds (sandbox/undefined or production)
to.webPushTokensobject[]
to.webPushTokens[].subobject(required) Configuration for a Push Subscription. This can be obtained on the frontend by calling serviceWorkerRegistration.pushManager.subscribe(). The expected format is the same output as JSON.stringify’ing a PushSubscription in the browser.
to.webPushTokens[].sub.endpointstring(required)
to.webPushTokens[].sub.keysobject(required)
to.webPushTokens[].sub.keys.p256dhstring(required)
to.webPushTokens[].sub.keys.authstring(required)
to.timezonestring
to.slackChannelstringThe destination channel of slack notifications sent to this user. Can be either of the following: - Channel name, e.g. “test” - Channel name with # prefix, e.g. “#test” - Channel ID, e.g. “C1234567890” - User ID for DM, e.g. “U1234567890” - Username with @ prefix, e.g. “@test”
to.slackTokenobject
to.slackToken.access_tokenstring
to.slackToken.app_idstring
to.slackToken.authed_userobject
to.slackToken.authed_user.access_tokenstring
to.slackToken.authed_user.expires_innumber
to.slackToken.authed_user.idstring
to.slackToken.authed_user.refresh_tokenstring
to.slackToken.authed_user.scopestring
to.slackToken.authed_user.token_typestring
to.slackToken.bot_user_idstring
to.slackToken.enterpriseobject
to.slackToken.enterprise.idstring
to.slackToken.enterprise.namestring
to.slackToken.errorstring
to.slackToken.expires_innumber
to.slackToken.incoming_webhookobject
to.slackToken.incoming_webhook.channelstring
to.slackToken.incoming_webhook.channel_idstring
to.slackToken.incoming_webhook.configuration_urlstring
to.slackToken.incoming_webhook.urlstring
to.slackToken.is_enterprise_installboolean
to.slackToken.neededstring
to.slackToken.okboolean(required)
to.slackToken.providedstring
to.slackToken.refresh_tokenstring
to.slackToken.scopestring
to.slackToken.teamobject
to.slackToken.team.idstring
to.slackToken.team.namestring
to.slackToken.token_typestring
to.slackToken.warningstring
to.slackToken.response_metadataobject
to.slackToken.response_metadata.warningsstring[]
to.slackToken.response_metadata.next_cursorstring
to.slackToken.response_metadata.scopesstring[]
to.slackToken.response_metadata.acceptedScopesstring[]
to.slackToken.response_metadata.retryAfternumber
to.slackToken.response_metadata.messagesstring[]
to.lastSeenTimestring
to.updatedAtstring
to.createdAtstring
to.emailSuppressionStatusobject
to.emailSuppressionStatus.reason”Bounce” | “Complaint”(required)
to.emailSuppressionStatus.detailsobject(required)
forceChannels(“EMAIL” | “INAPP_WEB” | “SMS” | “CALL” | “PUSH” | “WEB_PUSH” | “SLACK”)[]
parametersRecord<string, any>
secondaryIdstring
templateIdstring
subNotificationIdstring
optionsobject
options.emailobject
options.email.replyToAddressesstring[]
options.email.ccAddressesstring[]
options.email.bccAddressesstring[]
options.email.fromAddressstring
options.email.fromNamestring
options.email.attachments(object | object)[]
options.email.conditionstring
options.apnobject
options.apn.expirynumber
options.apn.prioritynumber
options.apn.collapseIdstring
options.apn.threadIdstring
options.apn.badgenumber
options.apn.soundstring
options.apn.contentAvailableboolean
options.fcmobject
options.fcm.androidobject
options.fcm.android.collapseKeystring
options.fcm.android.priority”high” | “normal”
options.fcm.android.ttlnumber
options.fcm.android.restrictedPackageNamestring
schedulestring
emailobject
email.subjectstring(required)
email.htmlstring(required)
email.previewTextstring
email.senderNamestring
email.senderEmailstring
inappobject
inapp.titlestring(required)
inapp.urlstring
inapp.imagestring
smsobject
sms.messagestring
sms.autoReplyobject
sms.autoReply.messagestring(required)
callobject
call.messagestring(required)
web_pushobject
web_push.titlestring(required)
web_push.messagestring(required)
web_push.iconstring
web_push.urlstring
mobile_pushobject
mobile_push.titlestring(required)
mobile_push.messagestring(required)
slackobject
slack.textstring(required)
slack.blocksRecord<string, any>[]
slack.usernamestring
slack.iconstring
slack.thread_tsstring
slack.reply_broadcastboolean
slack.parse”full” | “none”
slack.link_namesboolean
slack.mrkdwnboolean
slack.unfurl_linksboolean
slack.unfurl_mediaboolean
slack.metadataobjectSlack message metadata with optional work object entities. Combines standard Slack message metadata fields with an array of entity objects.
slack.metadata.entitiesobject[]An array of work object entities.
slack.metadata.entities[].entity_typestring(required) Entity type (e.g., ‘slack#/entities/task’, ‘slack#/entities/file’).
slack.metadata.entities[].entity_payloadRecord<string, any>(required) Schema for the given entity type.
slack.metadata.entities[].external_refobject(required) Reference used to identify an entity within the developer’s system.
slack.metadata.entities[].external_ref.idstring(required)
slack.metadata.entities[].external_ref.typestring
slack.metadata.entities[].urlstring(required) URL used to identify an entity within the developer’s system.
slack.metadata.entities[].app_unfurl_urlstringThe exact URL posted in the source message. Required in metadata passed to chat.unfurl.
slack.metadata.event_typestringA human readable alphanumeric string representing your application’s metadata event.
slack.metadata.event_payloadRecord<string, any>A free-form object containing whatever data your application wishes to attach to messages.

Return Type

PingramModelSenderPostResponse

Domains

domainsAddDomain()

Request to verify a new sender domain

<?php
require_once(__DIR__ . '/vendor/autoload.php');

use Pingram\Client;

$client = new Client('YOUR_API_KEY');
$body = new \Pingram\Model\PostSendersRequestBody(); // configure as needed

try {
    $result = $client->getDomainsApi()->domainsAddDomain($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling domainsAddDomain: ', $e->getMessage(), PHP_EOL;
}

Parameters

NameTypeDescriptionNotes
post_senders_request_body\Pingram\Model\PostSendersRequestBodySee Request Body Properties below

Request Body Properties

NameTypeDescription
senderstring(required)

Return Type

[PingramModelGetSendersResponseInner[]](../Model/GetSendersResponseInner.md)

domainsDeleteDomain()

Delete a sender domain or email address

<?php
require_once(__DIR__ . '/vendor/autoload.php');

use Pingram\Client;

$client = new Client('YOUR_API_KEY');

try {
    $result = $client->getDomainsApi()->domainsDeleteDomain();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling domainsDeleteDomain: ', $e->getMessage(), PHP_EOL;
}

Parameters

NameTypeDescriptionNotes
senderstringSender domain or email address (URL encoded)

Return Type

PingramModelSuccessResponse

domainsListDomains()

Get all sender domains configured for the account

<?php
require_once(__DIR__ . '/vendor/autoload.php');

use Pingram\Client;

$client = new Client('YOUR_API_KEY');

try {
    $result = $client->getDomainsApi()->domainsListDomains();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling domainsListDomains: ', $e->getMessage(), PHP_EOL;
}

Parameters

This endpoint does not need any parameter.

Return Type

[PingramModelGetSendersResponseInner[]](../Model/GetSendersResponseInner.md)

Environments

environmentsCreateEnvironment()

Create a new environment for the account

<?php
require_once(__DIR__ . '/vendor/autoload.php');

use Pingram\Client;

$client = new Client('YOUR_API_KEY');
$body = new \Pingram\Model\EnvironmentCreateRequest(); // configure as needed

try {
    $result = $client->getEnvironmentsApi()->environmentsCreateEnvironment($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling environmentsCreateEnvironment: ', $e->getMessage(), PHP_EOL;
}

Parameters

NameTypeDescriptionNotes
environment_create_request\Pingram\Model\EnvironmentCreateRequestSee Request Body Properties below

Request Body Properties

NameTypeDescription
titlestring(required)

Return Type

PingramModelEnvironment

environmentsListEnvironments()

Get all environments for the authenticated account

<?php
require_once(__DIR__ . '/vendor/autoload.php');

use Pingram\Client;

$client = new Client('YOUR_API_KEY');

try {
    $result = $client->getEnvironmentsApi()->environmentsListEnvironments();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling environmentsListEnvironments: ', $e->getMessage(), PHP_EOL;
}

Parameters

This endpoint does not need any parameter.

Return Type

[PingramModelGetEnvironmentsResponseInner[]](../Model/GetEnvironmentsResponseInner.md)

environmentsUpdateEnvironment()

Update environment settings (title, secret, disable sending, secure mode)

<?php
require_once(__DIR__ . '/vendor/autoload.php');

use Pingram\Client;

$client = new Client('YOUR_API_KEY');
$body = new \Pingram\Model\EnvironmentPatchRequest(); // configure as needed

try {
    $result = $client->getEnvironmentsApi()->environmentsUpdateEnvironment($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling environmentsUpdateEnvironment: ', $e->getMessage(), PHP_EOL;
}

Parameters

NameTypeDescriptionNotes
client_idstringEnvironment client ID
environment_patch_request\Pingram\Model\EnvironmentPatchRequestSee Request Body Properties below

Request Body Properties

NameTypeDescription
resetSecretboolean
disableSending(“EMAIL” | “INAPP_WEB” | “SMS” | “CALL” | “PUSH” | “WEB_PUSH” | “SLACK”)[]
titlestring
secureModeboolean

Return Type

PingramModelEnvironment

Logs

logsGetLogRetention()

Get log retention period in days for the account

<?php
require_once(__DIR__ . '/vendor/autoload.php');

use Pingram\Client;

$client = new Client('YOUR_API_KEY');

try {
    $result = $client->getLogsApi()->logsGetLogRetention();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling logsGetLogRetention: ', $e->getMessage(), PHP_EOL;
}

Parameters

This endpoint does not need any parameter.

Return Type

PingramModelLogsRetentionResponse

logsGetLogs()

List logs for the authenticated account

<?php
require_once(__DIR__ . '/vendor/autoload.php');

use Pingram\Client;

$client = new Client('YOUR_API_KEY');

try {
    $result = $client->getLogsApi()->logsGetLogs();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling logsGetLogs: ', $e->getMessage(), PHP_EOL;
}

Parameters

NameTypeDescriptionNotes
limitfloatMaximum number of logs to return (default[optional]
cursorstringPagination cursor for next page[optional]

Return Type

PingramModelGetLogsResponse

logsGetLogsByTrackingIds()

Get logs by tracking IDs (comma-separated, max 25 IDs)

<?php
require_once(__DIR__ . '/vendor/autoload.php');

use Pingram\Client;

$client = new Client('YOUR_API_KEY');

try {
    $result = $client->getLogsApi()->logsGetLogsByTrackingIds();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling logsGetLogsByTrackingIds: ', $e->getMessage(), PHP_EOL;
}

Parameters

NameTypeDescriptionNotes
tracking_idsstringComma-separated tracking IDs (URL encoded)

Return Type

PingramModelLogsGetResponse

logsGetLogsQueryResult()

Get results from a query ID

<?php
require_once(__DIR__ . '/vendor/autoload.php');

use Pingram\Client;

$client = new Client('YOUR_API_KEY');

try {
    $result = $client->getLogsApi()->logsGetLogsQueryResult();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling logsGetLogsQueryResult: ', $e->getMessage(), PHP_EOL;
}

Parameters

NameTypeDescriptionNotes
query_idstringQuery ID

Return Type

PingramModelLogsQueryResultResponse

logsStartLogsQuery()

Start a log query and return query ID for asynchronous log searching

<?php
require_once(__DIR__ . '/vendor/autoload.php');

use Pingram\Client;

$client = new Client('YOUR_API_KEY');
$body = new \Pingram\Model\LogQueryPostBody(); // configure as needed

try {
    $result = $client->getLogsApi()->logsStartLogsQuery($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling logsStartLogsQuery: ', $e->getMessage(), PHP_EOL;
}

Parameters

NameTypeDescriptionNotes
log_query_post_body\Pingram\Model\LogQueryPostBodySee Request Body Properties below

Request Body Properties

NameTypeDescription
dateRangeFilternumber[]A tuple of [startTime, endTime] for the date range filter, each representing a unix timestamp.
userFilterstring
envIdFilterstring[]
statusFilterstring
channelFilter(“email” | “inapp” | “sms” | “call” | “web_push” | “mobile_push” | “slack”)[]
notificationFilterstring[]

Return Type

PingramModelLogsQueryResponse

logsTailLogs()

Get last 100 logs from the stream

<?php
require_once(__DIR__ . '/vendor/autoload.php');

use Pingram\Client;

$client = new Client('YOUR_API_KEY');

try {
    $result = $client->getLogsApi()->logsTailLogs();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling logsTailLogs: ', $e->getMessage(), PHP_EOL;
}

Parameters

This endpoint does not need any parameter.

Return Type

PingramModelLogsTailResponse

Sender

senderDeleteSchedule()

Delete (unschedule) an already scheduled notification

<?php
require_once(__DIR__ . '/vendor/autoload.php');

use Pingram\Client;

$client = new Client('YOUR_API_KEY');

try {
    $result = $client->getSenderApi()->senderDeleteSchedule();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling senderDeleteSchedule: ', $e->getMessage(), PHP_EOL;
}

Parameters

NameTypeDescriptionNotes
tracking_idstringThe tracking ID of the scheduled notification

Return Type

PingramModelMessageResponse

senderTestEmail()

Test the emailer with a sample email

<?php
require_once(__DIR__ . '/vendor/autoload.php');

use Pingram\Client;

$client = new Client('YOUR_API_KEY');
$body = new \Pingram\Model\PostEmailTestRequest(); // configure as needed

try {
    $result = $client->getSenderApi()->senderTestEmail($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling senderTestEmail: ', $e->getMessage(), PHP_EOL;
}

Parameters

NameTypeDescriptionNotes
post_email_test_request\Pingram\Model\PostEmailTestRequestSee Request Body Properties below

Request Body Properties

NameTypeDescription
notificationIdstring(required)
tostring(required)
subjectstring(required)
htmlstring(required)
fromAddressstring(required)
fromNamestring(required)
previewTextstring

Return Type

PingramModelPostEmailTestResponse

senderUpdateSchedule()

Update the body or schedule of an already scheduled notification.

<?php
require_once(__DIR__ . '/vendor/autoload.php');

use Pingram\Client;

$client = new Client('YOUR_API_KEY');
$body = new \Pingram\Model\SenderPostBody(); // configure as needed

try {
    $result = $client->getSenderApi()->senderUpdateSchedule($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling senderUpdateSchedule: ', $e->getMessage(), PHP_EOL;
}

Parameters

NameTypeDescriptionNotes
tracking_idstringThe tracking ID of the scheduled notification
sender_post_body\Pingram\Model\SenderPostBodySee Request Body Properties below

Request Body Properties

NameTypeDescription
typestring
toobject
to.idstring
to.emailstring
to.numberstring
to.pushTokensobject[]
to.pushTokens[].type”FCM” | “APN”(required)
to.pushTokens[].tokenstring(required)
to.pushTokens[].deviceobject(required)
to.pushTokens[].device.app_idstring
to.pushTokens[].device.ad_idstring
to.pushTokens[].device.device_idstring(required)
to.pushTokens[].device.platformstring
to.pushTokens[].device.manufacturerstring
to.pushTokens[].device.modelstring
to.pushTokens[].environmentstringused by APN to differentiate between sandbox and production builds (sandbox/undefined or production)
to.webPushTokensobject[]
to.webPushTokens[].subobject(required) Configuration for a Push Subscription. This can be obtained on the frontend by calling serviceWorkerRegistration.pushManager.subscribe(). The expected format is the same output as JSON.stringify’ing a PushSubscription in the browser.
to.webPushTokens[].sub.endpointstring(required)
to.webPushTokens[].sub.keysobject(required)
to.webPushTokens[].sub.keys.p256dhstring(required)
to.webPushTokens[].sub.keys.authstring(required)
to.timezonestring
to.slackChannelstringThe destination channel of slack notifications sent to this user. Can be either of the following: - Channel name, e.g. “test” - Channel name with # prefix, e.g. “#test” - Channel ID, e.g. “C1234567890” - User ID for DM, e.g. “U1234567890” - Username with @ prefix, e.g. “@test”
to.slackTokenobject
to.slackToken.access_tokenstring
to.slackToken.app_idstring
to.slackToken.authed_userobject
to.slackToken.authed_user.access_tokenstring
to.slackToken.authed_user.expires_innumber
to.slackToken.authed_user.idstring
to.slackToken.authed_user.refresh_tokenstring
to.slackToken.authed_user.scopestring
to.slackToken.authed_user.token_typestring
to.slackToken.bot_user_idstring
to.slackToken.enterpriseobject
to.slackToken.enterprise.idstring
to.slackToken.enterprise.namestring
to.slackToken.errorstring
to.slackToken.expires_innumber
to.slackToken.incoming_webhookobject
to.slackToken.incoming_webhook.channelstring
to.slackToken.incoming_webhook.channel_idstring
to.slackToken.incoming_webhook.configuration_urlstring
to.slackToken.incoming_webhook.urlstring
to.slackToken.is_enterprise_installboolean
to.slackToken.neededstring
to.slackToken.okboolean(required)
to.slackToken.providedstring
to.slackToken.refresh_tokenstring
to.slackToken.scopestring
to.slackToken.teamobject
to.slackToken.team.idstring
to.slackToken.team.namestring
to.slackToken.token_typestring
to.slackToken.warningstring
to.slackToken.response_metadataobject
to.slackToken.response_metadata.warningsstring[]
to.slackToken.response_metadata.next_cursorstring
to.slackToken.response_metadata.scopesstring[]
to.slackToken.response_metadata.acceptedScopesstring[]
to.slackToken.response_metadata.retryAfternumber
to.slackToken.response_metadata.messagesstring[]
to.lastSeenTimestring
to.updatedAtstring
to.createdAtstring
to.emailSuppressionStatusobject
to.emailSuppressionStatus.reason”Bounce” | “Complaint”(required)
to.emailSuppressionStatus.detailsobject(required)
forceChannels(“EMAIL” | “INAPP_WEB” | “SMS” | “CALL” | “PUSH” | “WEB_PUSH” | “SLACK”)[]
parametersRecord<string, any>
secondaryIdstring
templateIdstring
subNotificationIdstring
optionsobject
options.emailobject
options.email.replyToAddressesstring[]
options.email.ccAddressesstring[]
options.email.bccAddressesstring[]
options.email.fromAddressstring
options.email.fromNamestring
options.email.attachments(object | object)[]
options.email.conditionstring
options.apnobject
options.apn.expirynumber
options.apn.prioritynumber
options.apn.collapseIdstring
options.apn.threadIdstring
options.apn.badgenumber
options.apn.soundstring
options.apn.contentAvailableboolean
options.fcmobject
options.fcm.androidobject
options.fcm.android.collapseKeystring
options.fcm.android.priority”high” | “normal”
options.fcm.android.ttlnumber
options.fcm.android.restrictedPackageNamestring
schedulestring
emailobject
email.subjectstring(required)
email.htmlstring(required)
email.previewTextstring
email.senderNamestring
email.senderEmailstring
inappobject
inapp.titlestring(required)
inapp.urlstring
inapp.imagestring
smsobject
sms.messagestring
sms.autoReplyobject
sms.autoReply.messagestring(required)
callobject
call.messagestring(required)
web_pushobject
web_push.titlestring(required)
web_push.messagestring(required)
web_push.iconstring
web_push.urlstring
mobile_pushobject
mobile_push.titlestring(required)
mobile_push.messagestring(required)
slackobject
slack.textstring(required)
slack.blocksRecord<string, any>[]
slack.usernamestring
slack.iconstring
slack.thread_tsstring
slack.reply_broadcastboolean
slack.parse”full” | “none”
slack.link_namesboolean
slack.mrkdwnboolean
slack.unfurl_linksboolean
slack.unfurl_mediaboolean
slack.metadataobjectSlack message metadata with optional work object entities. Combines standard Slack message metadata fields with an array of entity objects.
slack.metadata.entitiesobject[]An array of work object entities.
slack.metadata.entities[].entity_typestring(required) Entity type (e.g., ‘slack#/entities/task’, ‘slack#/entities/file’).
slack.metadata.entities[].entity_payloadRecord<string, any>(required) Schema for the given entity type.
slack.metadata.entities[].external_refobject(required) Reference used to identify an entity within the developer’s system.
slack.metadata.entities[].external_ref.idstring(required)
slack.metadata.entities[].external_ref.typestring
slack.metadata.entities[].urlstring(required) URL used to identify an entity within the developer’s system.
slack.metadata.entities[].app_unfurl_urlstringThe exact URL posted in the source message. Required in metadata passed to chat.unfurl.
slack.metadata.event_typestringA human readable alphanumeric string representing your application’s metadata event.
slack.metadata.event_payloadRecord<string, any>A free-form object containing whatever data your application wishes to attach to messages.

Return Type

PingramModelMessageResponse

Templates

templatesCreateTemplate()

Create a new template for a notification

<?php
require_once(__DIR__ . '/vendor/autoload.php');

use Pingram\Client;

$client = new Client('YOUR_API_KEY');
$body = new \Pingram\Model\TemplatePostRequest(); // configure as needed

try {
    $result = $client->getTemplatesApi()->templatesCreateTemplate($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling templatesCreateTemplate: ', $e->getMessage(), PHP_EOL;
}

Parameters

NameTypeDescriptionNotes
notification_idstringNotification ID
channelstringChannel type
template_post_request\Pingram\Model\TemplatePostRequestSee Request Body Properties below

Request Body Properties

NameTypeDescription
templateIdstring(required) Unique ID for this template within the notification and channel. Required.
htmlstringHTML body of the email.
previewTextstringPreview text (e.g. for inbox).
internalstringInternal editor representation of the email content (e.g. Bee or Redactor JSON). Used for editing and component embedding; the actual email sent to recipients uses the html field.
subjectstringEmail subject line.
senderNamestringSender display name.
senderEmailstringSender email address.
migrationstringMigration metadata (e.g. from template migration).
titlestringNotification title (in-app).
redirectURLstringURL to open when the user taps the notification.
imageURLstringImage URL shown in the in-app notification.
instantobjectCopy for instant (real-time) delivery.
instant.titlestring
instant.redirectURLstring
instant.imageURLstring(required)
batchobjectCopy for batch delivery.
batch.titlestring(required)
batch.redirectURLstring(required)
batch.imageURLstring(required)
textstringMessage text (SMS or call).
messagestringPush notification body text. (title is shared with INAPP_WEB above.)
iconstringWeb push: icon URL. Slack: bot icon (emoji or URL).
urlstringWeb push: URL to open when the notification is clicked.
blocksRecord<string, any>[]Slack message blocks (optional).
usernamestringSlack bot username.

Return Type

PingramModelTemplate

templatesDeleteTemplate()

Delete a template

<?php
require_once(__DIR__ . '/vendor/autoload.php');

use Pingram\Client;

$client = new Client('YOUR_API_KEY');

try {
    $result = $client->getTemplatesApi()->templatesDeleteTemplate();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling templatesDeleteTemplate: ', $e->getMessage(), PHP_EOL;
}

Parameters

NameTypeDescriptionNotes
notification_idstringNotification ID
channelstringChannel type
template_idstringTemplate ID

Return Type

void (empty response body)

templatesGetTemplate()

Get a single template by ID

<?php
require_once(__DIR__ . '/vendor/autoload.php');

use Pingram\Client;

$client = new Client('YOUR_API_KEY');

try {
    $result = $client->getTemplatesApi()->templatesGetTemplate();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling templatesGetTemplate: ', $e->getMessage(), PHP_EOL;
}

Parameters

NameTypeDescriptionNotes
notification_idstringNotification ID
channelstringChannel type
template_idstringTemplate ID

Return Type

PingramModelGetTemplatesResponse

templatesListTemplates()

List all templates for a notification and channel

<?php
require_once(__DIR__ . '/vendor/autoload.php');

use Pingram\Client;

$client = new Client('YOUR_API_KEY');

try {
    $result = $client->getTemplatesApi()->templatesListTemplates();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling templatesListTemplates: ', $e->getMessage(), PHP_EOL;
}

Parameters

NameTypeDescriptionNotes
notification_idstringNotification ID
channelstringChannel type

Return Type

[PingramModelGetTemplatesListResponseInner[]](../Model/GetTemplatesListResponseInner.md)

templatesSetDefaultTemplate()

Set a template as default for specific delivery modes

<?php
require_once(__DIR__ . '/vendor/autoload.php');

use Pingram\Client;

$client = new Client('YOUR_API_KEY');
$body = new \Pingram\Model\SetDefaultTemplateRequest(); // configure as needed

try {
    $result = $client->getTemplatesApi()->templatesSetDefaultTemplate($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling templatesSetDefaultTemplate: ', $e->getMessage(), PHP_EOL;
}

Parameters

NameTypeDescriptionNotes
notification_idstringNotification ID
channelstringChannel type
set_default_template_request\Pingram\Model\SetDefaultTemplateRequestSee Request Body Properties below

Request Body Properties

NameTypeDescription
templateIdstring(required)
modes(“instant” | “hourly” | “daily” | “weekly” | “monthly”)[](required)

Return Type

PingramModelTemplate

templatesUpdateTemplate()

Update a template’s properties

<?php
require_once(__DIR__ . '/vendor/autoload.php');

use Pingram\Client;

$client = new Client('YOUR_API_KEY');
$body = new \Pingram\Model\TemplatePatchRequest(); // configure as needed

try {
    $result = $client->getTemplatesApi()->templatesUpdateTemplate($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling templatesUpdateTemplate: ', $e->getMessage(), PHP_EOL;
}

Parameters

NameTypeDescriptionNotes
notification_idstringNotification ID
channelstringChannel type
template_idstringTemplate ID
template_patch_request\Pingram\Model\TemplatePatchRequestSee Request Body Properties below

Return Type

PingramModelTemplate

Types

typesCreateNotificationType()

Create a new notification

<?php
require_once(__DIR__ . '/vendor/autoload.php');

use Pingram\Client;

$client = new Client('YOUR_API_KEY');
$body = new \Pingram\Model\NotificationCreateRequest(); // configure as needed

try {
    $result = $client->getTypesApi()->typesCreateNotificationType($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling typesCreateNotificationType: ', $e->getMessage(), PHP_EOL;
}

Parameters

NameTypeDescriptionNotes
notification_create_request\Pingram\Model\NotificationCreateRequestSee Request Body Properties below

Request Body Properties

NameTypeDescription
notificationIdstring(required)
titlestring(required)
channelsstring[](required)
optionsobject
options.EMAILobject
options.EMAIL.defaultDeliveryOption”off” | “instant” | “hourly” | “daily” | “weekly” | “monthly”(required)
options.EMAIL.offobject
options.EMAIL.off.enabledboolean(required)
options.EMAIL.instantobject
options.EMAIL.instant.enabledboolean(required)
options.EMAIL.hourlyobject
options.EMAIL.hourly.enabledboolean(required)
options.EMAIL.dailyobject
options.EMAIL.daily.enabledboolean(required)
options.EMAIL.daily.hourstring
options.EMAIL.weeklyobject
options.EMAIL.weekly.enabledboolean(required)
options.EMAIL.weekly.hourstring
options.EMAIL.weekly.daystring
options.EMAIL.monthlyobject
options.EMAIL.monthly.enabledboolean(required)
options.EMAIL.monthly.hourstring
options.EMAIL.monthly.date”first” | “last”
options.INAPP_WEBobject
options.INAPP_WEB.defaultDeliveryOption”off” | “instant”(required)
options.INAPP_WEB.offobject
options.INAPP_WEB.off.enabledboolean(required)
options.INAPP_WEB.instantobject
options.INAPP_WEB.instant.enabledboolean(required)
options.INAPP_WEB.instant.batchingboolean
options.INAPP_WEB.instant.batchingKeystring
options.INAPP_WEB.instant.batchingWindownumber
options.SMSobject
options.SMS.defaultDeliveryOption”off” | “instant” | “hourly” | “daily” | “weekly” | “monthly”(required)
options.SMS.offobject
options.SMS.off.enabledboolean(required)
options.SMS.instantobject
options.SMS.instant.enabledboolean(required)
options.SMS.hourlyobject
options.SMS.hourly.enabledboolean(required)
options.SMS.dailyobject
options.SMS.daily.enabledboolean(required)
options.SMS.daily.hourstring
options.SMS.weeklyobject
options.SMS.weekly.enabledboolean(required)
options.SMS.weekly.hourstring
options.SMS.weekly.daystring
options.SMS.monthlyobject
options.SMS.monthly.enabledboolean(required)
options.SMS.monthly.hourstring
options.SMS.monthly.date”first” | “last”
options.CALLobject
options.CALL.defaultDeliveryOption”off” | “instant” | “hourly” | “daily” | “weekly” | “monthly”(required)
options.CALL.offobject
options.CALL.off.enabledboolean(required)
options.CALL.instantobject
options.CALL.instant.enabledboolean(required)
options.CALL.hourlyobject
options.CALL.hourly.enabledboolean(required)
options.CALL.dailyobject
options.CALL.daily.enabledboolean(required)
options.CALL.daily.hourstring
options.CALL.weeklyobject
options.CALL.weekly.enabledboolean(required)
options.CALL.weekly.hourstring
options.CALL.weekly.daystring
options.CALL.monthlyobject
options.CALL.monthly.enabledboolean(required)
options.CALL.monthly.hourstring
options.CALL.monthly.date”first” | “last”
options.PUSHobject
options.PUSH.defaultDeliveryOption”off” | “instant” | “hourly” | “daily” | “weekly” | “monthly”(required)
options.PUSH.offobject
options.PUSH.off.enabledboolean(required)
options.PUSH.instantobject
options.PUSH.instant.enabledboolean(required)
options.PUSH.hourlyobject
options.PUSH.hourly.enabledboolean(required)
options.PUSH.dailyobject
options.PUSH.daily.enabledboolean(required)
options.PUSH.daily.hourstring
options.PUSH.weeklyobject
options.PUSH.weekly.enabledboolean(required)
options.PUSH.weekly.hourstring
options.PUSH.weekly.daystring
options.PUSH.monthlyobject
options.PUSH.monthly.enabledboolean(required)
options.PUSH.monthly.hourstring
options.PUSH.monthly.date”first” | “last”
options.WEB_PUSHobject
options.WEB_PUSH.defaultDeliveryOption”off” | “instant” | “hourly” | “daily” | “weekly” | “monthly”(required)
options.WEB_PUSH.offobject
options.WEB_PUSH.off.enabledboolean(required)
options.WEB_PUSH.instantobject
options.WEB_PUSH.instant.enabledboolean(required)
options.WEB_PUSH.hourlyobject
options.WEB_PUSH.hourly.enabledboolean(required)
options.WEB_PUSH.dailyobject
options.WEB_PUSH.daily.enabledboolean(required)
options.WEB_PUSH.daily.hourstring
options.WEB_PUSH.weeklyobject
options.WEB_PUSH.weekly.enabledboolean(required)
options.WEB_PUSH.weekly.hourstring
options.WEB_PUSH.weekly.daystring
options.WEB_PUSH.monthlyobject
options.WEB_PUSH.monthly.enabledboolean(required)
options.WEB_PUSH.monthly.hourstring
options.WEB_PUSH.monthly.date”first” | “last”
options.SLACKobject
options.SLACK.defaultDeliveryOption”off” | “instant” | “hourly” | “daily” | “weekly” | “monthly”(required)
options.SLACK.offobject
options.SLACK.off.enabledboolean(required)
options.SLACK.instantobject
options.SLACK.instant.enabledboolean(required)
options.SLACK.hourlyobject
options.SLACK.hourly.enabledboolean(required)
options.SLACK.dailyobject
options.SLACK.daily.enabledboolean(required)
options.SLACK.daily.hourstring
options.SLACK.weeklyobject
options.SLACK.weekly.enabledboolean(required)
options.SLACK.weekly.hourstring
options.SLACK.weekly.daystring
options.SLACK.monthlyobject
options.SLACK.monthly.enabledboolean(required)
options.SLACK.monthly.hourstring
options.SLACK.monthly.date”first” | “last”

Return Type

PingramModelNotification

typesDeleteNotificationType()

Delete a notification

<?php
require_once(__DIR__ . '/vendor/autoload.php');

use Pingram\Client;

$client = new Client('YOUR_API_KEY');

try {
    $result = $client->getTypesApi()->typesDeleteNotificationType();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling typesDeleteNotificationType: ', $e->getMessage(), PHP_EOL;
}

Parameters

NameTypeDescriptionNotes
notification_idstringThe notification ID

Return Type

void (empty response body)

typesGetNotificationType()

Get a specific notification by ID

<?php
require_once(__DIR__ . '/vendor/autoload.php');

use Pingram\Client;

$client = new Client('YOUR_API_KEY');

try {
    $result = $client->getTypesApi()->typesGetNotificationType();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling typesGetNotificationType: ', $e->getMessage(), PHP_EOL;
}

Parameters

NameTypeDescriptionNotes
notification_idstringThe notification ID

Return Type

[PingramModelGetNotificationsResponseInner[]](../Model/GetNotificationsResponseInner.md)

typesListNotificationTypes()

Get all notifications for an account with their templates

<?php
require_once(__DIR__ . '/vendor/autoload.php');

use Pingram\Client;

$client = new Client('YOUR_API_KEY');

try {
    $result = $client->getTypesApi()->typesListNotificationTypes();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling typesListNotificationTypes: ', $e->getMessage(), PHP_EOL;
}

Parameters

This endpoint does not need any parameter.

Return Type

[PingramModelGetNotificationsResponseInner[]](../Model/GetNotificationsResponseInner.md)

typesUpdateNotificationType()

Update a notification’s settings

<?php
require_once(__DIR__ . '/vendor/autoload.php');

use Pingram\Client;

$client = new Client('YOUR_API_KEY');
$body = new \Pingram\Model\NotificationPatchRequest(); // configure as needed

try {
    $result = $client->getTypesApi()->typesUpdateNotificationType($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling typesUpdateNotificationType: ', $e->getMessage(), PHP_EOL;
}

Parameters

NameTypeDescriptionNotes
notification_idstringThe notification ID
notification_patch_request\Pingram\Model\NotificationPatchRequestSee Request Body Properties below

Request Body Properties

NameTypeDescription
titlestring
channels(“EMAIL” | “INAPP_WEB” | “SMS” | “CALL” | “PUSH” | “WEB_PUSH” | “SLACK”)[]
enabledboolean
deduplicationobject
deduplication.durationnumber(required)
throttlingobject
throttling.maxnumber(required)
throttling.periodnumber(required)
throttling.unit”seconds” | “minutes” | “hours” | “days” | “months” | “years”(required)
throttling.foreverboolean(required)
throttling.scope(“userId” | “notificationId”)[](required)
retentionnumber
optionsobject
options.EMAILobject
options.EMAIL.defaultDeliveryOption”off” | “instant” | “hourly” | “daily” | “weekly” | “monthly”(required)
options.EMAIL.offobject
options.EMAIL.off.enabledboolean(required)
options.EMAIL.instantobject
options.EMAIL.instant.enabledboolean(required)
options.EMAIL.hourlyobject
options.EMAIL.hourly.enabledboolean(required)
options.EMAIL.dailyobject
options.EMAIL.daily.enabledboolean(required)
options.EMAIL.daily.hourstring
options.EMAIL.weeklyobject
options.EMAIL.weekly.enabledboolean(required)
options.EMAIL.weekly.hourstring
options.EMAIL.weekly.daystring
options.EMAIL.monthlyobject
options.EMAIL.monthly.enabledboolean(required)
options.EMAIL.monthly.hourstring
options.EMAIL.monthly.date”first” | “last”
options.INAPP_WEBobject
options.INAPP_WEB.defaultDeliveryOption”off” | “instant”(required)
options.INAPP_WEB.offobject
options.INAPP_WEB.off.enabledboolean(required)
options.INAPP_WEB.instantobject
options.INAPP_WEB.instant.enabledboolean(required)
options.INAPP_WEB.instant.batchingboolean
options.INAPP_WEB.instant.batchingKeystring
options.INAPP_WEB.instant.batchingWindownumber
options.SMSobject
options.SMS.defaultDeliveryOption”off” | “instant” | “hourly” | “daily” | “weekly” | “monthly”(required)
options.SMS.offobject
options.SMS.off.enabledboolean(required)
options.SMS.instantobject
options.SMS.instant.enabledboolean(required)
options.SMS.hourlyobject
options.SMS.hourly.enabledboolean(required)
options.SMS.dailyobject
options.SMS.daily.enabledboolean(required)
options.SMS.daily.hourstring
options.SMS.weeklyobject
options.SMS.weekly.enabledboolean(required)
options.SMS.weekly.hourstring
options.SMS.weekly.daystring
options.SMS.monthlyobject
options.SMS.monthly.enabledboolean(required)
options.SMS.monthly.hourstring
options.SMS.monthly.date”first” | “last”
options.CALLobject
options.CALL.defaultDeliveryOption”off” | “instant” | “hourly” | “daily” | “weekly” | “monthly”(required)
options.CALL.offobject
options.CALL.off.enabledboolean(required)
options.CALL.instantobject
options.CALL.instant.enabledboolean(required)
options.CALL.hourlyobject
options.CALL.hourly.enabledboolean(required)
options.CALL.dailyobject
options.CALL.daily.enabledboolean(required)
options.CALL.daily.hourstring
options.CALL.weeklyobject
options.CALL.weekly.enabledboolean(required)
options.CALL.weekly.hourstring
options.CALL.weekly.daystring
options.CALL.monthlyobject
options.CALL.monthly.enabledboolean(required)
options.CALL.monthly.hourstring
options.CALL.monthly.date”first” | “last”
options.PUSHobject
options.PUSH.defaultDeliveryOption”off” | “instant” | “hourly” | “daily” | “weekly” | “monthly”(required)
options.PUSH.offobject
options.PUSH.off.enabledboolean(required)
options.PUSH.instantobject
options.PUSH.instant.enabledboolean(required)
options.PUSH.hourlyobject
options.PUSH.hourly.enabledboolean(required)
options.PUSH.dailyobject
options.PUSH.daily.enabledboolean(required)
options.PUSH.daily.hourstring
options.PUSH.weeklyobject
options.PUSH.weekly.enabledboolean(required)
options.PUSH.weekly.hourstring
options.PUSH.weekly.daystring
options.PUSH.monthlyobject
options.PUSH.monthly.enabledboolean(required)
options.PUSH.monthly.hourstring
options.PUSH.monthly.date”first” | “last”
options.WEB_PUSHobject
options.WEB_PUSH.defaultDeliveryOption”off” | “instant” | “hourly” | “daily” | “weekly” | “monthly”(required)
options.WEB_PUSH.offobject
options.WEB_PUSH.off.enabledboolean(required)
options.WEB_PUSH.instantobject
options.WEB_PUSH.instant.enabledboolean(required)
options.WEB_PUSH.hourlyobject
options.WEB_PUSH.hourly.enabledboolean(required)
options.WEB_PUSH.dailyobject
options.WEB_PUSH.daily.enabledboolean(required)
options.WEB_PUSH.daily.hourstring
options.WEB_PUSH.weeklyobject
options.WEB_PUSH.weekly.enabledboolean(required)
options.WEB_PUSH.weekly.hourstring
options.WEB_PUSH.weekly.daystring
options.WEB_PUSH.monthlyobject
options.WEB_PUSH.monthly.enabledboolean(required)
options.WEB_PUSH.monthly.hourstring
options.WEB_PUSH.monthly.date”first” | “last”
options.SLACKobject
options.SLACK.defaultDeliveryOption”off” | “instant” | “hourly” | “daily” | “weekly” | “monthly”(required)
options.SLACK.offobject
options.SLACK.off.enabledboolean(required)
options.SLACK.instantobject
options.SLACK.instant.enabledboolean(required)
options.SLACK.hourlyobject
options.SLACK.hourly.enabledboolean(required)
options.SLACK.dailyobject
options.SLACK.daily.enabledboolean(required)
options.SLACK.daily.hourstring
options.SLACK.weeklyobject
options.SLACK.weekly.enabledboolean(required)
options.SLACK.weekly.hourstring
options.SLACK.weekly.daystring
options.SLACK.monthlyobject
options.SLACK.monthly.enabledboolean(required)
options.SLACK.monthly.hourstring
options.SLACK.monthly.date”first” | “last”

Return Type

PingramModelNotification

User

userGetAccountMetadata()

Get account-level metadata including logo, VAPID key, and web push status

<?php
require_once(__DIR__ . '/vendor/autoload.php');

use Pingram\Client;

$client = new Client('YOUR_API_KEY');

try {
    $result = $client->getUserApi()->userGetAccountMetadata();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling userGetAccountMetadata: ', $e->getMessage(), PHP_EOL;
}

Parameters

This endpoint does not need any parameter.

Return Type

PingramModelGetAccountMetadataResponse

userGetAvailableSlackChannels()

Get list of Slack channels and users for the authenticated user

<?php
require_once(__DIR__ . '/vendor/autoload.php');

use Pingram\Client;

$client = new Client('YOUR_API_KEY');

try {
    $result = $client->getUserApi()->userGetAvailableSlackChannels();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling userGetAvailableSlackChannels: ', $e->getMessage(), PHP_EOL;
}

Parameters

NameTypeDescriptionNotes
user_idstringUser ID

Return Type

void (empty response body)

userGetInAppNotifications()

Get in-app notifications for a user

<?php
require_once(__DIR__ . '/vendor/autoload.php');

use Pingram\Client;

$client = new Client('YOUR_API_KEY');

try {
    $result = $client->getUserApi()->userGetInAppNotifications();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling userGetInAppNotifications: ', $e->getMessage(), PHP_EOL;
}

Parameters

NameTypeDescriptionNotes
beforestringTimestamp or ISO date to fetch notifications before[optional]
countfloatNumber of notifications to return (default 10)[optional]

Return Type

PingramModelGetInappNotificationsResponse

userGetInAppUnreadCount()

Get the count of unread in-app notifications for a user

<?php
require_once(__DIR__ . '/vendor/autoload.php');

use Pingram\Client;

$client = new Client('YOUR_API_KEY');

try {
    $result = $client->getUserApi()->userGetInAppUnreadCount();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling userGetInAppUnreadCount: ', $e->getMessage(), PHP_EOL;
}

Parameters

This endpoint does not need any parameter.

Return Type

PingramModelInappUnreadCountResponse

userGetUser()

Get a user by ID. All users exist implicitly, returns basic user object if not found in DB.

<?php
require_once(__DIR__ . '/vendor/autoload.php');

use Pingram\Client;

$client = new Client('YOUR_API_KEY');

try {
    $result = $client->getUserApi()->userGetUser();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling userGetUser: ', $e->getMessage(), PHP_EOL;
}

Parameters

NameTypeDescriptionNotes
user_idstringUser ID

Return Type

PingramModelUser

userIdentify()

Create or update a user with the given ID. Updates lastSeenTime automatically.

<?php
require_once(__DIR__ . '/vendor/autoload.php');

use Pingram\Client;

$client = new Client('YOUR_API_KEY');
$body = new \Pingram\Model\PostUserRequest(); // configure as needed

try {
    $result = $client->getUserApi()->userIdentify($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling userIdentify: ', $e->getMessage(), PHP_EOL;
}

Parameters

NameTypeDescriptionNotes
user_idstringUser ID
post_user_request\Pingram\Model\PostUserRequestSee Request Body Properties below

Request Body Properties

NameTypeDescription
idstring
emailstring
numberstring
pushTokensobject[]
pushTokens[].type”FCM” | “APN”(required)
pushTokens[].tokenstring(required)
pushTokens[].deviceobject(required)
pushTokens[].device.app_idstring
pushTokens[].device.ad_idstring
pushTokens[].device.device_idstring(required)
pushTokens[].device.platformstring
pushTokens[].device.manufacturerstring
pushTokens[].device.modelstring
pushTokens[].environmentstringused by APN to differentiate between sandbox and production builds (sandbox/undefined or production)
webPushTokensobject[]
webPushTokens[].subobject(required) Configuration for a Push Subscription. This can be obtained on the frontend by calling serviceWorkerRegistration.pushManager.subscribe(). The expected format is the same output as JSON.stringify’ing a PushSubscription in the browser.
webPushTokens[].sub.endpointstring(required)
webPushTokens[].sub.keysobject(required)
webPushTokens[].sub.keys.p256dhstring(required)
webPushTokens[].sub.keys.authstring(required)
timezonestring
slackChannelstringThe destination channel of slack notifications sent to this user. Can be either of the following: - Channel name, e.g. “test” - Channel name with # prefix, e.g. “#test” - Channel ID, e.g. “C1234567890” - User ID for DM, e.g. “U1234567890” - Username with @ prefix, e.g. “@test”
slackTokenobject
slackToken.access_tokenstring
slackToken.app_idstring
slackToken.authed_userobject
slackToken.authed_user.access_tokenstring
slackToken.authed_user.expires_innumber
slackToken.authed_user.idstring
slackToken.authed_user.refresh_tokenstring
slackToken.authed_user.scopestring
slackToken.authed_user.token_typestring
slackToken.bot_user_idstring
slackToken.enterpriseobject
slackToken.enterprise.idstring
slackToken.enterprise.namestring
slackToken.errorstring
slackToken.expires_innumber
slackToken.incoming_webhookobject
slackToken.incoming_webhook.channelstring
slackToken.incoming_webhook.channel_idstring
slackToken.incoming_webhook.configuration_urlstring
slackToken.incoming_webhook.urlstring
slackToken.is_enterprise_installboolean
slackToken.neededstring
slackToken.okboolean(required)
slackToken.providedstring
slackToken.refresh_tokenstring
slackToken.scopestring
slackToken.teamobject
slackToken.team.idstring
slackToken.team.namestring
slackToken.token_typestring
slackToken.warningstring
slackToken.response_metadataobject
slackToken.response_metadata.warningsstring[]
slackToken.response_metadata.next_cursorstring
slackToken.response_metadata.scopesstring[]
slackToken.response_metadata.acceptedScopesstring[]
slackToken.response_metadata.retryAfternumber
slackToken.response_metadata.messagesstring[]

Return Type

PingramModelUser

userMarkInAppNotificationsAsSeen()

Mark in-app web notifications as seen/read for a user

<?php
require_once(__DIR__ . '/vendor/autoload.php');

use Pingram\Client;

$client = new Client('YOUR_API_KEY');
$body = new \Pingram\Model\InAppNotificationUnreadClearRequest(); // configure as needed

try {
    $result = $client->getUserApi()->userMarkInAppNotificationsAsSeen($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling userMarkInAppNotificationsAsSeen: ', $e->getMessage(), PHP_EOL;
}

Parameters

NameTypeDescriptionNotes
in_app_notification_unread_clear_request\Pingram\Model\InAppNotificationUnreadClearRequestSee Request Body Properties below

Request Body Properties

NameTypeDescription
notificationIdstring
trackingIdstring

Return Type

PingramModelSuccessResponse

userUpdateInAppNotificationStatus()

Update in-app web notification status (opened, archived, clicked, etc.)

<?php
require_once(__DIR__ . '/vendor/autoload.php');

use Pingram\Client;

$client = new Client('YOUR_API_KEY');
$body = new \Pingram\Model\InAppNotificationPatchRequest(); // configure as needed

try {
    $result = $client->getUserApi()->userUpdateInAppNotificationStatus($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling userUpdateInAppNotificationStatus: ', $e->getMessage(), PHP_EOL;
}

Parameters

NameTypeDescriptionNotes
in_app_notification_patch_request\Pingram\Model\InAppNotificationPatchRequestSee Request Body Properties below

Request Body Properties

NameTypeDescription
trackingIdsstring[](required)
openedstring
clickedstring
archivedstring
actioned1string
actioned2string
replyobject
reply.datestring(required)
reply.messagestring(required)
repliesobject[]
replies[].datestring(required)
replies[].messagestring(required)

Return Type

PingramModelSuccessResponse

Users

usersDeleteUser()

Delete a user and all associated data (in-app notifications, preferences, and user record)

<?php
require_once(__DIR__ . '/vendor/autoload.php');

use Pingram\Client;

$client = new Client('YOUR_API_KEY');

try {
    $result = $client->getUsersApi()->usersDeleteUser();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling usersDeleteUser: ', $e->getMessage(), PHP_EOL;
}

Parameters

NameTypeDescriptionNotes
user_idstringUser ID
env_idstringEnvironment ID (required when using JWT auth)[optional]

Return Type

PingramModelDeleteUserResponse

usersListUsers()

Get all users for an environment with pagination support

<?php
require_once(__DIR__ . '/vendor/autoload.php');

use Pingram\Client;

$client = new Client('YOUR_API_KEY');

try {
    $result = $client->getUsersApi()->usersListUsers();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling usersListUsers: ', $e->getMessage(), PHP_EOL;
}

Parameters

NameTypeDescriptionNotes
limitfloatMaximum number of users to return (default
next_tokenstringPagination token for next page
env_idstringEnvironment ID (required when using JWT auth)[optional]

Return Type

PingramModelGetUsersResponse

usersRemoveUserFromSuppression()

Remove user suppression status for a specific channel

<?php
require_once(__DIR__ . '/vendor/autoload.php');

use Pingram\Client;

$client = new Client('YOUR_API_KEY');

try {
    $result = $client->getUsersApi()->usersRemoveUserFromSuppression();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling usersRemoveUserFromSuppression: ', $e->getMessage(), PHP_EOL;
}

Parameters

NameTypeDescriptionNotes
user_idstringUser ID
channelstringChannel type (EMAIL)
env_idstringEnvironment ID (required when using JWT auth)[optional]

Return Type

PingramModelUserSuppressionDeleteResponse