PHP SDK
Setup & Initialization
- Install Package:
composer require pingram/php- Import:
use Pingram\Client;- Initialize:
$client = new Pingram\Client('YOUR_API_KEY');| Name | Type | Description |
|---|---|---|
api_key* |
string | Your Pingram API key. You can get it from your dashboard under Environments. |
base_url |
string | Optional. 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 (email, SMS, etc.) to one user
<?phprequire_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
| Name | Type | Description | Notes |
|---|---|---|---|
| sender_post_body | \Pingram\Model\SenderPostBody | See Request Body Properties below |
Request Body Properties
| Name | Type | Description |
|---|---|---|
type |
string | ID of the notification type (e.g. “welcome_email”). Creates a new notification if it does not exist. |
to |
object | Recipient user. Provide id, email, or number to identify the user. |
to.id |
string | Unique user identifier. Required. |
to.email |
string | User’s email address for email notifications. |
to.number |
string | User’s phone number for SMS/call notifications. |
to.pushTokens |
object[] | Mobile push tokens (FCM, APN) for push notifications. |
to.pushTokens[].type |
“FCM” | “APN” | (required) |
to.pushTokens[].token |
string | (required) |
to.pushTokens[].device |
object | (required) |
to.pushTokens[].device.app_id |
string | |
to.pushTokens[].device.ad_id |
string | |
to.pushTokens[].device.device_id |
string | (required) |
to.pushTokens[].device.platform |
string | |
to.pushTokens[].device.manufacturer |
string | |
to.pushTokens[].device.model |
string | |
to.pushTokens[].environment |
string | used by APN to differentiate between sandbox and production builds (sandbox/undefined or production) |
to.webPushTokens |
object[] | Web push subscription config from the browser. |
to.webPushTokens[].sub |
object | (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.endpoint |
string | (required) |
to.webPushTokens[].sub.keys |
object | (required) |
to.webPushTokens[].sub.keys.p256dh |
string | (required) |
to.webPushTokens[].sub.keys.auth |
string | (required) |
to.timezone |
string | User’s timezone (e.g. “America/New_York”) for scheduling. |
to.slackChannel |
string | The 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.slackToken |
object | |
to.slackToken.access_token |
string | |
to.slackToken.app_id |
string | |
to.slackToken.authed_user |
object | |
to.slackToken.authed_user.access_token |
string | |
to.slackToken.authed_user.expires_in |
number | |
to.slackToken.authed_user.id |
string | |
to.slackToken.authed_user.refresh_token |
string | |
to.slackToken.authed_user.scope |
string | |
to.slackToken.authed_user.token_type |
string | |
to.slackToken.bot_user_id |
string | |
to.slackToken.enterprise |
object | |
to.slackToken.enterprise.id |
string | |
to.slackToken.enterprise.name |
string | |
to.slackToken.error |
string | |
to.slackToken.expires_in |
number | |
to.slackToken.incoming_webhook |
object | |
to.slackToken.incoming_webhook.channel |
string | |
to.slackToken.incoming_webhook.channel_id |
string | |
to.slackToken.incoming_webhook.configuration_url |
string | |
to.slackToken.incoming_webhook.url |
string | |
to.slackToken.is_enterprise_install |
boolean | |
to.slackToken.needed |
string | |
to.slackToken.ok |
boolean | (required) |
to.slackToken.provided |
string | |
to.slackToken.refresh_token |
string | |
to.slackToken.scope |
string | |
to.slackToken.team |
object | |
to.slackToken.team.id |
string | |
to.slackToken.team.name |
string | |
to.slackToken.token_type |
string | |
to.slackToken.warning |
string | |
to.slackToken.response_metadata |
object | |
to.slackToken.response_metadata.warnings |
string[] | |
to.slackToken.response_metadata.next_cursor |
string | |
to.slackToken.response_metadata.scopes |
string[] | |
to.slackToken.response_metadata.acceptedScopes |
string[] | |
to.slackToken.response_metadata.retryAfter |
number | |
to.slackToken.response_metadata.messages |
string[] | |
to.properties |
Record<string, string | number | boolean> | Custom key-value properties synced by the developer, used for audience segmentation (e.g. broadcast filters on user.properties.plan). Incremental identify calls shallow-merge keys (unset keys are preserved). Limits: max 25 keys, key length <= 64, string values <= 256 chars, serialized size <= 1KB. |
to.lastSeenTime |
string | Last activity timestamp. Updated automatically. Read-only. |
to.updatedAt |
string | Last update timestamp. Read-only. |
to.createdAt |
string | Creation timestamp. Read-only. |
to.emailSuppressionStatus |
object | Bounce or complaint status if email was suppressed. Read-only. |
to.emailSuppressionStatus.reason |
“Bounce” | “Complaint” | (required) |
to.emailSuppressionStatus.details |
object | (required) |
forceChannels |
(“EMAIL” | “INAPP_WEB” | “SMS” | “CALL” | “VOICE” | “PUSH” | “WEB_PUSH” | “SLACK”)[] | Override which channels to send to (e.g. [“EMAIL”, “SMS”]). Bypasses notification channel config. |
parameters |
Record<string, any> | Key-value pairs for template merge tags. Replaces placeholders like {{firstName}} in templates. |
templateId |
string | Specific template ID to use. If omitted, uses the default template for each channel. |
subNotificationId |
string | Sub-notification identifier (e.g. for grouping related notifications). |
options |
object | Per-channel overrides for send options (email, APN, FCM). |
options.email |
object | Email-specific overrides. |
options.email.replyToAddresses |
string[] | Reply-to addresses for the email. |
options.email.ccAddresses |
string[] | CC recipients. |
options.email.bccAddresses |
string[] | BCC recipients. |
options.email.fromAddress |
string | Override sender email address. |
options.email.fromName |
string | Override sender display name. |
options.email.openTracking |
boolean | When false, this send does not record opens and no open pixel is added. Delivery, bounce, and complaint events are unchanged. Defaults to true. |
options.email.clickTracking |
boolean | When false, links are left as written and clicks are not recorded. Delivery, bounce, and complaint events are unchanged. Defaults to true. |
options.email.attachments |
(object | object)[] | File attachments (by URL or inline base64 content). Inline content: ~4 MB raw per file (413 if exceeded). URL url: up to 20 MB per file. |
options.apn |
object | Apple Push Notification (APN) overrides. |
options.apn.expiry |
number | Seconds until the notification expires. |
options.apn.priority |
number | Delivery priority (10 = immediate, 5 = power-saving). |
options.apn.collapseId |
string | Group notifications with the same ID (replaces previous). |
options.apn.threadId |
string | Thread identifier for grouping notifications. |
options.apn.badge |
number | Badge count on app icon. |
options.apn.sound |
string | Sound file name. |
options.apn.contentAvailable |
boolean | Silent background notification (no alert). |
options.fcm |
object | Firebase Cloud Messaging (FCM) overrides. |
options.fcm.android |
object | Android-specific FCM options. |
options.fcm.android.collapseKey |
string | Collapse key for grouping messages. |
options.fcm.android.priority |
“high” | “normal” | Delivery priority. |
options.fcm.android.ttl |
number | Time to live in seconds. |
options.fcm.android.restrictedPackageName |
string | Restrict delivery to a specific package. |
options.push |
object | Cross-platform mobile push options (applied to both APN and FCM). |
options.push.customData |
Record<string, string> | Up to 3 custom string key-value pairs for deep linking. Included in both APN and FCM payloads. |
schedule |
string | |
email |
object | Inline email content (subject, html). Use when not using templates. |
email.subject |
string | (required) Email subject line. |
email.html |
string | (required) HTML body content. |
email.previewText |
string | Preview/snippet text shown in inbox. |
email.senderName |
string | Display name of sender. |
email.senderEmail |
string | Sender email address. |
inapp |
object | Inline in-app content (title, url, image). |
inapp.title |
string | (required) Notification title. |
inapp.url |
string | URL to open when clicked. |
inapp.image |
string | Image URL. |
sms |
object | Inline SMS content (message, from, mediaUrls). |
sms.message |
string | SMS/MMS body text. |
sms.mediaUrls |
string[] | Public HTTPS URLs of media to attach (MMS). Carriers fetch these via GET. Total size limits apply per provider. |
sms.from |
string | Override the sender phone number. Must be a verified number on your account. |
call |
object | Inline call content (message). |
call.message |
string | (required) Text to speak (TTS). |
web_push |
object | Inline web push content (title, message, icon, url). |
web_push.title |
string | (required) Notification title. |
web_push.message |
string | (required) Body text. |
web_push.icon |
string | Icon URL. |
web_push.url |
string | URL to open when clicked. |
mobile_push |
object | Inline mobile push content (title, message). |
mobile_push.title |
string | (required) Notification title. |
mobile_push.message |
string | (required) Body text. |
slack |
object | Inline Slack content (text, blocks, etc.). |
slack.text |
string | (required) Fallback plain text (required when using blocks). |
slack.blocks |
Record<string, any>[] | Slack Block Kit blocks. |
slack.username |
string | Override bot username. |
slack.icon |
string | Icon: emoji (e.g. “:smile:”) or URL. Default: bot’s icon. |
slack.thread_ts |
string | Parent message ts to post in a thread. |
slack.reply_broadcast |
boolean | When true with thread_ts, broadcasts reply to channel. Default: false. |
slack.parse |
“full” | “none” | URL parsing: “full” (clickable links) or “none”. Default: “none”. |
slack.link_names |
boolean | Convert channel and username refs to Slack links. Default: false. |
slack.mrkdwn |
boolean | Enable Slack markup (bold, italic, code). Default: true. |
slack.unfurl_links |
boolean | Unfurl link previews. Default: true. |
slack.unfurl_media |
boolean | Unfurl media previews. Default: true. |
slack.metadata |
object | Slack message metadata with optional work object entities. Combines standard Slack message metadata fields with an array of entity objects. |
slack.metadata.entities |
object[] | An array of work object entities. |
slack.metadata.entities[].entity_type |
string | (required) Entity type (e.g., ‘slack#/entities/task’, ‘slack#/entities/file’). |
slack.metadata.entities[].entity_payload |
Record<string, any> | (required) Schema for the given entity type. |
slack.metadata.entities[].external_ref |
object | (required) Reference used to identify an entity within the developer’s system. |
slack.metadata.entities[].external_ref.id |
string | (required) |
slack.metadata.entities[].external_ref.type |
string | |
slack.metadata.entities[].url |
string | (required) URL used to identify an entity within the developer’s system. |
slack.metadata.entities[].app_unfurl_url |
string | The exact URL posted in the source message. Required in metadata passed to chat.unfurl. |
slack.metadata.event_type |
string | A human readable alphanumeric string representing your application’s metadata event. |
slack.metadata.event_payload |
Record<string, any> | A free-form object containing whatever data your application wishes to attach to messages. |
Return Type
PingramModelSenderPostResponse
Webhooks
webhooksCreateWebhook()
Create a webhook endpoint on a server outside Pingram
<?phprequire_once(__DIR__ . '/vendor/autoload.php');
use Pingram\Client;
$client = new Client('YOUR_API_KEY');$body = new \Pingram\Model\WebhookEndpointUpsertRequest(); // configure as needed
try { $result = $client->getWebhooks()->webhooksCreateWebhook($body); print_r($result);} catch (Exception $e) { echo 'Exception when calling webhooksCreateWebhook: ', $e->getMessage(), PHP_EOL;}Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| webhook_endpoint_upsert_request | \Pingram\Model\WebhookEndpointUpsertRequest | See Request Body Properties below |
Request Body Properties
| Name | Type | Description |
|---|---|---|
webhook |
string | (required) Public HTTPS URL that accepts POST with a JSON event body. Return 2xx to acknowledge. Private, loopback, and link-local addresses are rejected. Requests include X-Pingram-Id, X-Pingram-Signature (v1 HMAC-SHA256), and X-Pingram-Timestamp. A username and password in this URL are stored separately and removed from the saved URL. |
events |
(“EMAIL_OPEN” | “EMAIL_CLICK” | “EMAIL_FAILED” | “EMAIL_DELIVERED” | “EMAIL_UNSUBSCRIBE” | “EMAIL_INBOUND” | “INAPP_WEB_FAILED” | “INAPP_WEB_UNSUBSCRIBE” | “SMS_DELIVERED” | “SMS_FAILED” | “SMS_UNSUBSCRIBE” | “SMS_SUBSCRIBE” | “SMS_INBOUND” | “VOICE_INBOUND” | “VOICE_CONNECTED” | “VOICE_ENDED” | “PUSH_FAILED” | “PUSH_UNSUBSCRIBE” | “CALL_FAILED” | “CALL_UNSUBSCRIBE” | “WEB_PUSH_FAILED” | “WEB_PUSH_UNSUBSCRIBE” | “SLACK_FAILED” | “SLACK_UNSUBSCRIBE” | “ACCOUNT_USAGE”)[] | (required) Full set of event types to deliver to this URL. Omitting an event on update unsubscribes it. Inbound SMS to the free shared number only works when that person has already received a text from this number. Inbound SMS to a dedicated number works normally. |
basicAuth |
object | HTTP Basic credentials. Omit to leave stored credentials unchanged. null removes them. Do not also put credentials in the webhook URL. The password is write-only. |
basicAuth.username |
string | (required) Username for the Authorization header. |
basicAuth.password |
string | Password for the Authorization header. Required when setting basic auth. Omit on update to keep the stored password. |
Return Type
PingramModelWebhookEndpoint
webhooksDeleteWebhook()
Delete one webhook endpoint by id from list or create
<?phprequire_once(__DIR__ . '/vendor/autoload.php');
use Pingram\Client;
$client = new Client('YOUR_API_KEY');
try { $result = $client->getWebhooks()->webhooksDeleteWebhook(); print_r($result);} catch (Exception $e) { echo 'Exception when calling webhooksDeleteWebhook: ', $e->getMessage(), PHP_EOL;}Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| endpoint_id | string | Id of the webhook endpoint, from list or create. |
Return Type
void (empty response body)
webhooksListWebhooks()
List webhook endpoints
<?phprequire_once(__DIR__ . '/vendor/autoload.php');
use Pingram\Client;
$client = new Client('YOUR_API_KEY');
try { $result = $client->getWebhooks()->webhooksListWebhooks(); print_r($result);} catch (Exception $e) { echo 'Exception when calling webhooksListWebhooks: ', $e->getMessage(), PHP_EOL;}Parameters
This endpoint does not need any parameter.
Return Type
PingramModelWebhookEndpointsResponse
webhooksUpdateWebhook()
Replace a webhook endpoint
<?phprequire_once(__DIR__ . '/vendor/autoload.php');
use Pingram\Client;
$client = new Client('YOUR_API_KEY');$body = new \Pingram\Model\WebhookEndpointUpsertRequest(); // configure as needed
try { $result = $client->getWebhooks()->webhooksUpdateWebhook($body); print_r($result);} catch (Exception $e) { echo 'Exception when calling webhooksUpdateWebhook: ', $e->getMessage(), PHP_EOL;}Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| endpoint_id | string | Id of the webhook endpoint, from list or create. | |
| webhook_endpoint_upsert_request | \Pingram\Model\WebhookEndpointUpsertRequest | See Request Body Properties below |
Request Body Properties
| Name | Type | Description |
|---|---|---|
webhook |
string | (required) Public HTTPS URL that accepts POST with a JSON event body. Return 2xx to acknowledge. Private, loopback, and link-local addresses are rejected. Requests include X-Pingram-Id, X-Pingram-Signature (v1 HMAC-SHA256), and X-Pingram-Timestamp. A username and password in this URL are stored separately and removed from the saved URL. |
events |
(“EMAIL_OPEN” | “EMAIL_CLICK” | “EMAIL_FAILED” | “EMAIL_DELIVERED” | “EMAIL_UNSUBSCRIBE” | “EMAIL_INBOUND” | “INAPP_WEB_FAILED” | “INAPP_WEB_UNSUBSCRIBE” | “SMS_DELIVERED” | “SMS_FAILED” | “SMS_UNSUBSCRIBE” | “SMS_SUBSCRIBE” | “SMS_INBOUND” | “VOICE_INBOUND” | “VOICE_CONNECTED” | “VOICE_ENDED” | “PUSH_FAILED” | “PUSH_UNSUBSCRIBE” | “CALL_FAILED” | “CALL_UNSUBSCRIBE” | “WEB_PUSH_FAILED” | “WEB_PUSH_UNSUBSCRIBE” | “SLACK_FAILED” | “SLACK_UNSUBSCRIBE” | “ACCOUNT_USAGE”)[] | (required) Full set of event types to deliver to this URL. Omitting an event on update unsubscribes it. Inbound SMS to the free shared number only works when that person has already received a text from this number. Inbound SMS to a dedicated number works normally. |
basicAuth |
object | HTTP Basic credentials. Omit to leave stored credentials unchanged. null removes them. Do not also put credentials in the webhook URL. The password is write-only. |
basicAuth.username |
string | (required) Username for the Authorization header. |
basicAuth.password |
string | Password for the Authorization header. Required when setting basic auth. Omit on update to keep the stored password. |
Return Type
PingramModelWebhookEndpoint
Accounts
accountsCreateAccount()
Create another Pingram account
<?phprequire_once(__DIR__ . '/vendor/autoload.php');
use Pingram\Client;
$client = new Client('YOUR_API_KEY');$body = new \Pingram\Model\CreateAccountRequest(); // configure as needed
try { $result = $client->getAccounts()->accountsCreateAccount($body); print_r($result);} catch (Exception $e) { echo 'Exception when calling accountsCreateAccount: ', $e->getMessage(), PHP_EOL;}Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| create_account_request | \Pingram\Model\CreateAccountRequest | See Request Body Properties below |
Request Body Properties
| Name | Type | Description |
|---|---|---|
name |
string | (required) |
plan |
object | Billing to copy onto a new additional account. |
plan.tier |
“budget_20” | “budget_50” | “budget_100” | “budget_250” | “budget_500” | “budget_1000” | (required) |
plan.sourceBillingAccountId |
string | (required) Account whose saved payment method is copied onto the new account. The caller must be an owner of this account. |
memberEmails |
string[] | Emails to add or invite to the new account. Existing members of any account the caller belongs to are added directly; everyone else is invited. |
Return Type
PingramModelCreateAccountResponse
accountsListAccounts()
List accounts the authenticated user can access
<?phprequire_once(__DIR__ . '/vendor/autoload.php');
use Pingram\Client;
$client = new Client('YOUR_API_KEY');
try { $result = $client->getAccounts()->accountsListAccounts(); print_r($result);} catch (Exception $e) { echo 'Exception when calling accountsListAccounts: ', $e->getMessage(), PHP_EOL;}Parameters
This endpoint does not need any parameter.
Return Type
PingramModelListAccountsResponse
accountsUpdateAccount()
Change the display name of an account
<?phprequire_once(__DIR__ . '/vendor/autoload.php');
use Pingram\Client;
$client = new Client('YOUR_API_KEY');$body = new \Pingram\Model\UpdateAccountRequest(); // configure as needed
try { $result = $client->getAccounts()->accountsUpdateAccount($body); print_r($result);} catch (Exception $e) { echo 'Exception when calling accountsUpdateAccount: ', $e->getMessage(), PHP_EOL;}Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| account_id | string | Account to rename | |
| update_account_request | \Pingram\Model\UpdateAccountRequest | See Request Body Properties below |
Request Body Properties
| Name | Type | Description |
|---|---|---|
name |
string | (required) Display name for this account. |
Return Type
PingramModelAccountSummary
Broadcasts
broadcastsArchive()
Archive an email broadcast
<?phprequire_once(__DIR__ . '/vendor/autoload.php');
use Pingram\Client;
$client = new Client('YOUR_API_KEY');
try { $result = $client->getBroadcasts()->broadcastsArchive(); print_r($result);} catch (Exception $e) { echo 'Exception when calling broadcastsArchive: ', $e->getMessage(), PHP_EOL;}Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| broadcast_id | string | Broadcast ID |
Return Type
PingramModelBroadcastResponse
broadcastsCancel()
Cancel an email broadcast
<?phprequire_once(__DIR__ . '/vendor/autoload.php');
use Pingram\Client;
$client = new Client('YOUR_API_KEY');
try { $result = $client->getBroadcasts()->broadcastsCancel(); print_r($result);} catch (Exception $e) { echo 'Exception when calling broadcastsCancel: ', $e->getMessage(), PHP_EOL;}Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| broadcast_id | string | Broadcast ID |
Return Type
PingramModelBroadcastResponse
broadcastsCreate()
Create a draft email broadcast
<?phprequire_once(__DIR__ . '/vendor/autoload.php');
use Pingram\Client;
$client = new Client('YOUR_API_KEY');$body = new \Pingram\Model\CreateBroadcastRequest(); // configure as needed
try { $result = $client->getBroadcasts()->broadcastsCreate($body); print_r($result);} catch (Exception $e) { echo 'Exception when calling broadcastsCreate: ', $e->getMessage(), PHP_EOL;}Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| create_broadcast_request | \Pingram\Model\CreateBroadcastRequest | See Request Body Properties below |
Request Body Properties
| Name | Type | Description |
|---|---|---|
name |
string | (required) |
type |
string | Notification type id. Optional on create; required before send/schedule. Created on the fly when missing. |
channel |
“email” | |
audience |
object | (required) Broadcast audience: exactly one of filter (Mongo-style query evaluated against synced user objects) or emails (raw list, max 10,000 addresses; for larger audiences use filter after syncing users via the Users API). |
audience.filter |
Record<string, any> | |
audience.emails |
string[] | |
fromName |
string | (required) |
fromAddress |
string | (required) From address. Use an address on a domain verified for this account to email other people. The shared address noreply@pingram.io can send a test broadcast only to your own account email as the sole recipient. Verify a domain to send to a wider audience. |
replyToAddress |
string | |
subject |
string | (required) |
html |
string | (required) |
internalTemplate |
string | Optional visual-editor source. Pair with html. A later update can add it to a draft by sending it with html. |
Return Type
PingramModelBroadcastResponse
broadcastsDelete()
Delete an email broadcast
<?phprequire_once(__DIR__ . '/vendor/autoload.php');
use Pingram\Client;
$client = new Client('YOUR_API_KEY');
try { $result = $client->getBroadcasts()->broadcastsDelete(); print_r($result);} catch (Exception $e) { echo 'Exception when calling broadcastsDelete: ', $e->getMessage(), PHP_EOL;}Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| broadcast_id | string | Broadcast ID |
Return Type
PingramModelMessageResponse
broadcastsGet()
Get one email broadcast by ID
<?phprequire_once(__DIR__ . '/vendor/autoload.php');
use Pingram\Client;
$client = new Client('YOUR_API_KEY');
try { $result = $client->getBroadcasts()->broadcastsGet(); print_r($result);} catch (Exception $e) { echo 'Exception when calling broadcastsGet: ', $e->getMessage(), PHP_EOL;}Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| broadcast_id | string | Broadcast ID |
Return Type
PingramModelBroadcastResponse
broadcastsGetMetrics()
Get live broadcast metrics
<?phprequire_once(__DIR__ . '/vendor/autoload.php');
use Pingram\Client;
$client = new Client('YOUR_API_KEY');
try { $result = $client->getBroadcasts()->broadcastsGetMetrics(); print_r($result);} catch (Exception $e) { echo 'Exception when calling broadcastsGetMetrics: ', $e->getMessage(), PHP_EOL;}Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| broadcast_id | string | Broadcast ID |
Return Type
PingramModelBroadcastMetricsResponse
broadcastsList()
List email broadcasts for the account, newest first
<?phprequire_once(__DIR__ . '/vendor/autoload.php');
use Pingram\Client;
$client = new Client('YOUR_API_KEY');
try { $result = $client->getBroadcasts()->broadcastsList(); print_r($result);} catch (Exception $e) { echo 'Exception when calling broadcastsList: ', $e->getMessage(), PHP_EOL;}Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| limit | float | Max broadcasts to return (default 50) | [optional] |
| next_token | string | Pagination token | [optional] |
Return Type
PingramModelListBroadcastsResponse
broadcastsListRecipients()
List email broadcast recipients
<?phprequire_once(__DIR__ . '/vendor/autoload.php');
use Pingram\Client;
$client = new Client('YOUR_API_KEY');
try { $result = $client->getBroadcasts()->broadcastsListRecipients(); print_r($result);} catch (Exception $e) { echo 'Exception when calling broadcastsListRecipients: ', $e->getMessage(), PHP_EOL;}Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| broadcast_id | string | Broadcast ID | |
| status | string | Filter | [optional] |
| limit | float | Max recipients to return (default 50) | [optional] |
| next_token | string | Pagination token | [optional] |
Return Type
PingramModelListBroadcastRecipientsResponse
broadcastsPause()
Pause an actively sending email broadcast
<?phprequire_once(__DIR__ . '/vendor/autoload.php');
use Pingram\Client;
$client = new Client('YOUR_API_KEY');
try { $result = $client->getBroadcasts()->broadcastsPause(); print_r($result);} catch (Exception $e) { echo 'Exception when calling broadcastsPause: ', $e->getMessage(), PHP_EOL;}Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| broadcast_id | string | Broadcast ID |
Return Type
PingramModelBroadcastResponse
broadcastsResume()
Resume a paused email broadcast
<?phprequire_once(__DIR__ . '/vendor/autoload.php');
use Pingram\Client;
$client = new Client('YOUR_API_KEY');
try { $result = $client->getBroadcasts()->broadcastsResume(); print_r($result);} catch (Exception $e) { echo 'Exception when calling broadcastsResume: ', $e->getMessage(), PHP_EOL;}Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| broadcast_id | string | Broadcast ID |
Return Type
PingramModelBroadcastResponse
broadcastsSchedule()
Schedule a draft email broadcast for a future ISO datetime
<?phprequire_once(__DIR__ . '/vendor/autoload.php');
use Pingram\Client;
$client = new Client('YOUR_API_KEY');$body = new \Pingram\Model\ScheduleBroadcastRequest(); // configure as needed
try { $result = $client->getBroadcasts()->broadcastsSchedule($body); print_r($result);} catch (Exception $e) { echo 'Exception when calling broadcastsSchedule: ', $e->getMessage(), PHP_EOL;}Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| broadcast_id | string | Broadcast ID | |
| schedule_broadcast_request | \Pingram\Model\ScheduleBroadcastRequest | See Request Body Properties below |
Request Body Properties
| Name | Type | Description |
|---|---|---|
sendAt |
string | (required) ISO datetime in the future. |
Return Type
PingramModelBroadcastResponse
broadcastsSend()
Send a draft email broadcast immediately
<?phprequire_once(__DIR__ . '/vendor/autoload.php');
use Pingram\Client;
$client = new Client('YOUR_API_KEY');
try { $result = $client->getBroadcasts()->broadcastsSend(); print_r($result);} catch (Exception $e) { echo 'Exception when calling broadcastsSend: ', $e->getMessage(), PHP_EOL;}Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| broadcast_id | string | Broadcast ID |
Return Type
PingramModelBroadcastResponse
broadcastsUnarchive()
Restore an archived email broadcast
<?phprequire_once(__DIR__ . '/vendor/autoload.php');
use Pingram\Client;
$client = new Client('YOUR_API_KEY');
try { $result = $client->getBroadcasts()->broadcastsUnarchive(); print_r($result);} catch (Exception $e) { echo 'Exception when calling broadcastsUnarchive: ', $e->getMessage(), PHP_EOL;}Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| broadcast_id | string | Broadcast ID |
Return Type
PingramModelBroadcastResponse
broadcastsUpdate()
Update a draft email broadcast
<?phprequire_once(__DIR__ . '/vendor/autoload.php');
use Pingram\Client;
$client = new Client('YOUR_API_KEY');$body = new \Pingram\Model\UpdateBroadcastRequest(); // configure as needed
try { $result = $client->getBroadcasts()->broadcastsUpdate($body); print_r($result);} catch (Exception $e) { echo 'Exception when calling broadcastsUpdate: ', $e->getMessage(), PHP_EOL;}Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| broadcast_id | string | Broadcast ID | |
| update_broadcast_request | \Pingram\Model\UpdateBroadcastRequest | See Request Body Properties below |
Request Body Properties
| Name | Type | Description |
|---|---|---|
name |
string | |
type |
string | |
channel |
“email” | |
audience |
object | Broadcast audience: exactly one of filter (Mongo-style query evaluated against synced user objects) or emails (raw list, max 10,000 addresses; for larger audiences use filter after syncing users via the Users API). |
audience.filter |
Record<string, any> | |
audience.emails |
string[] | |
fromName |
string | |
fromAddress |
string | From address. Use an address on a domain verified for this account to email other people. The shared address noreply@pingram.io can send a test broadcast only to your own account email as the sole recipient. Verify a domain to send to a wider audience. |
replyToAddress |
string | Omit to leave unchanged. Empty string clears Reply-To. |
subject |
string | |
html |
string | |
internalTemplate |
string | Visual-editor source. Send with html to add it to an html-only draft or to update it. Cannot be removed. |
Return Type
PingramModelBroadcastResponse
Domains
domainsAddDomain()
Start verification for a domain you already own
<?phprequire_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->getDomains()->domainsAddDomain($body); print_r($result);} catch (Exception $e) { echo 'Exception when calling domainsAddDomain: ', $e->getMessage(), PHP_EOL;}Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| post_senders_request_body | \Pingram\Model\PostSendersRequestBody | See Request Body Properties below |
Request Body Properties
| Name | Type | Description |
|---|---|---|
sender |
string | (required) |
Return Type
[PingramModelGetSendersResponseInner[]](../Model/GetSendersResponseInner.md)
domainsDeleteDomain()
Remove a sender domain from the account
<?phprequire_once(__DIR__ . '/vendor/autoload.php');
use Pingram\Client;
$client = new Client('YOUR_API_KEY');
try { $result = $client->getDomains()->domainsDeleteDomain(); print_r($result);} catch (Exception $e) { echo 'Exception when calling domainsDeleteDomain: ', $e->getMessage(), PHP_EOL;}Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| sender | string | Sender domain (URL encoded) |
Return Type
PingramModelSuccessResponse
domainsListDomains()
List domains already added to this Pingram account for email
<?phprequire_once(__DIR__ . '/vendor/autoload.php');
use Pingram\Client;
$client = new Client('YOUR_API_KEY');
try { $result = $client->getDomains()->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)
domainsStartDomainVerification()
Start domain verification
<?phprequire_once(__DIR__ . '/vendor/autoload.php');
use Pingram\Client;
$client = new Client('YOUR_API_KEY');
try { $result = $client->getDomains()->domainsStartDomainVerification(); print_r($result);} catch (Exception $e) { echo 'Exception when calling domainsStartDomainVerification: ', $e->getMessage(), PHP_EOL;}Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| sender | string | Sender domain (URL encoded) |
Return Type
[PingramModelGetSendersResponseInner[]](../Model/GetSendersResponseInner.md)
emailDeleteSuppressions()
Remove email suppressions
<?phprequire_once(__DIR__ . '/vendor/autoload.php');
use Pingram\Client;
$client = new Client('YOUR_API_KEY');
try { $result = $client->getEmail()->emailDeleteSuppressions(); print_r($result);} catch (Exception $e) { echo 'Exception when calling emailDeleteSuppressions: ', $e->getMessage(), PHP_EOL;}Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| reason | string | Suppression reason to clear (retryable | bounces) |
Return Type
PingramModelMessageResponse
emailSend()
Send an email
<?phprequire_once(__DIR__ . '/vendor/autoload.php');
use Pingram\Client;
$client = new Client('YOUR_API_KEY');$body = new \Pingram\Model\SendEmailRequest(); // configure as needed
try { $result = $client->getEmail()->emailSend($body); print_r($result);} catch (Exception $e) { echo 'Exception when calling emailSend: ', $e->getMessage(), PHP_EOL;}Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| send_email_request | \Pingram\Model\SendEmailRequest | See Request Body Properties below |
Request Body Properties
| Name | Type | Description |
|---|---|---|
type |
string | (required) The notification type to send. |
to |
string | (required) The email address of the recipient. |
subject |
string | (required) The subject of the email. |
html |
string | (required) The HTML body of the email. |
fromName |
string | The display name of the sender. |
fromAddress |
string | The email address of the sender. |
previewText |
string | The preview text of the email. |
replyToAddresses |
string[] | The reply-to addresses of the email. |
ccAddresses |
string[] | The CC addresses of the email. |
bccAddresses |
string[] | The BCC addresses of the email. |
openTracking |
boolean | When false, this send does not record opens and no open pixel is added. Delivery, bounce, and complaint events are unchanged. Defaults to true. |
clickTracking |
boolean | When false, links are left as written and clicks are not recorded. Delivery, bounce, and complaint events are unchanged. Defaults to true. |
attachments |
object[] | URL-based file attachments. Up to 20 MB per file. |
attachments[].filename |
string | (required) |
attachments[].url |
string | (required) |
schedule |
string | The ISO 8601 datetime to schedule the email. |
Return Type
PingramModelSendEmailApiResponse
Environments
environmentsListEnvironments()
Get all environments for the authenticated account
<?phprequire_once(__DIR__ . '/vendor/autoload.php');
use Pingram\Client;
$client = new Client('YOUR_API_KEY');
try { $result = $client->getEnvironments()->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
<?phprequire_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->getEnvironments()->environmentsUpdateEnvironment($body); print_r($result);} catch (Exception $e) { echo 'Exception when calling environmentsUpdateEnvironment: ', $e->getMessage(), PHP_EOL;}Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| client_id | string | Environment client ID | |
| environment_patch_request | \Pingram\Model\EnvironmentPatchRequest | See Request Body Properties below |
Request Body Properties
| Name | Type | Description |
|---|---|---|
resetSecret |
boolean | |
disableSending |
(“EMAIL” | “INAPP_WEB” | “SMS” | “CALL” | “VOICE” | “PUSH” | “WEB_PUSH” | “SLACK”)[] | |
title |
string | |
secureMode |
boolean |
Return Type
PingramModelEnvironment
Library
libraryCreate()
Create an upload slot in the account library
<?phprequire_once(__DIR__ . '/vendor/autoload.php');
use Pingram\Client;
$client = new Client('YOUR_API_KEY');$body = new \Pingram\Model\CreateLibraryRequest(); // configure as needed
try { $result = $client->getLibrary()->libraryCreate($body); print_r($result);} catch (Exception $e) { echo 'Exception when calling libraryCreate: ', $e->getMessage(), PHP_EOL;}Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| use_case | string | Library use-case | |
| create_library_request | \Pingram\Model\CreateLibraryRequest | See Request Body Properties below |
Request Body Properties
| Name | Type | Description |
|---|---|---|
filename |
string | (required) Original filename, including extension (e.g. hero.png). |
contentType |
string | (required) Image MIME type. One of image/png, image/jpeg, image/gif, or image/webp. |
Return Type
PingramModelCreateLibraryResponse
libraryList()
List files in the account library
<?phprequire_once(__DIR__ . '/vendor/autoload.php');
use Pingram\Client;
$client = new Client('YOUR_API_KEY');
try { $result = $client->getLibrary()->libraryList(); print_r($result);} catch (Exception $e) { echo 'Exception when calling libraryList: ', $e->getMessage(), PHP_EOL;}Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| use_case | string | Library use-case | |
| limit | float | Max items to return (default 50) | [optional] |
| next_token | string | Pagination token | [optional] |
Return Type
PingramModelListLibraryResponse
Logs
logsGetDeliveryStatus()
Look up email and SMS delivery status
<?phprequire_once(__DIR__ . '/vendor/autoload.php');
use Pingram\Client;
$client = new Client('YOUR_API_KEY');
try { $result = $client->getLogs()->logsGetDeliveryStatus(); print_r($result);} catch (Exception $e) { echo 'Exception when calling logsGetDeliveryStatus: ', $e->getMessage(), PHP_EOL;}Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| tracking_ids | string | Comma-separated tracking IDs (URL encoded, max 25) |
Return Type
PingramModelLogsDeliveryStatusResponse
logsGetLogRetention()
Get log retention period in days for the account
<?phprequire_once(__DIR__ . '/vendor/autoload.php');
use Pingram\Client;
$client = new Client('YOUR_API_KEY');
try { $result = $client->getLogs()->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 recent notification logs
<?phprequire_once(__DIR__ . '/vendor/autoload.php');
use Pingram\Client;
$client = new Client('YOUR_API_KEY');
try { $result = $client->getLogs()->logsGetLogs(); print_r($result);} catch (Exception $e) { echo 'Exception when calling logsGetLogs: ', $e->getMessage(), PHP_EOL;}Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| limit | float | Maximum number of logs to return (default | [optional] |
| cursor | string | Pagination cursor for next page | [optional] |
Return Type
PingramModelGetLogsResponse
logsGetLogsByTrackingIds()
Get logs by tracking IDs (comma-separated, max 25 IDs)
<?phprequire_once(__DIR__ . '/vendor/autoload.php');
use Pingram\Client;
$client = new Client('YOUR_API_KEY');
try { $result = $client->getLogs()->logsGetLogsByTrackingIds(); print_r($result);} catch (Exception $e) { echo 'Exception when calling logsGetLogsByTrackingIds: ', $e->getMessage(), PHP_EOL;}Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| tracking_ids | string | Comma-separated tracking IDs (URL encoded) |
Return Type
PingramModelLogsGetResponse
logsGetLogsQueryResult()
Get results from a log query started with Start Log Query
<?phprequire_once(__DIR__ . '/vendor/autoload.php');
use Pingram\Client;
$client = new Client('YOUR_API_KEY');
try { $result = $client->getLogs()->logsGetLogsQueryResult(); print_r($result);} catch (Exception $e) { echo 'Exception when calling logsGetLogsQueryResult: ', $e->getMessage(), PHP_EOL;}Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| query_id | string | Query ID returned by Start Log Query |
Return Type
PingramModelLogsQueryResultResponse
logsRetryInbound()
Resend the EMAIL_INBOUND webhook for one inbound email
<?phprequire_once(__DIR__ . '/vendor/autoload.php');
use Pingram\Client;
$client = new Client('YOUR_API_KEY');
try { $result = $client->getLogs()->logsRetryInbound(); print_r($result);} catch (Exception $e) { echo 'Exception when calling logsRetryInbound: ', $e->getMessage(), PHP_EOL;}Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| tracking_id | string | Tracking ID of the inbound email |
Return Type
PingramModelMessageResponse
logsStartLogsQuery()
Start an asynchronous log search over a date range
<?phprequire_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->getLogs()->logsStartLogsQuery($body); print_r($result);} catch (Exception $e) { echo 'Exception when calling logsStartLogsQuery: ', $e->getMessage(), PHP_EOL;}Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| log_query_post_body | \Pingram\Model\LogQueryPostBody | See Request Body Properties below |
Request Body Properties
| Name | Type | Description |
|---|---|---|
dateRangeFilter |
number[] | A tuple of [startTime, endTime] for the date range filter, each representing a unix timestamp. |
userFilter |
string | |
envIdFilter |
string[] | |
statusFilter |
string | |
channelFilter |
(“email” | “inapp” | “sms” | “call” | “voice” | “web_push” | “mobile_push” | “slack”)[] | |
notificationFilter |
string[] |
Return Type
PingramModelLogsQueryResponse
logsTailLogs()
Get last 100 logs from the stream
<?phprequire_once(__DIR__ . '/vendor/autoload.php');
use Pingram\Client;
$client = new Client('YOUR_API_KEY');
try { $result = $client->getLogs()->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
Numbers
numbersList()
List phone numbers
<?phprequire_once(__DIR__ . '/vendor/autoload.php');
use Pingram\Client;
$client = new Client('YOUR_API_KEY');
try { $result = $client->getNumbers()->numbersList(); print_r($result);} catch (Exception $e) { echo 'Exception when calling numbersList: ', $e->getMessage(), PHP_EOL;}Parameters
This endpoint does not need any parameter.
Return Type
PingramModelListPhoneNumbersResponse
numbersListReleased()
List released phone numbers
<?phprequire_once(__DIR__ . '/vendor/autoload.php');
use Pingram\Client;
$client = new Client('YOUR_API_KEY');
try { $result = $client->getNumbers()->numbersListReleased(); print_r($result);} catch (Exception $e) { echo 'Exception when calling numbersListReleased: ', $e->getMessage(), PHP_EOL;}Parameters
This endpoint does not need any parameter.
Return Type
PingramModelListReleasedPhoneNumbersResponse
numbersOrderNumber()
Purchase a phone number
<?phprequire_once(__DIR__ . '/vendor/autoload.php');
use Pingram\Client;
$client = new Client('YOUR_API_KEY');$body = new \Pingram\Model\OrderPhoneNumberRequest(); // configure as needed
try { $result = $client->getNumbers()->numbersOrderNumber($body); print_r($result);} catch (Exception $e) { echo 'Exception when calling numbersOrderNumber: ', $e->getMessage(), PHP_EOL;}Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| order_phone_number_request | \Pingram\Model\OrderPhoneNumberRequest | See Request Body Properties below |
Request Body Properties
| Name | Type | Description |
|---|---|---|
phoneNumber |
string | (required) E.164 from search results |
Return Type
PingramModelOrderPhoneNumberResponse
numbersReleaseNumber()
Release a phone number from the account
<?phprequire_once(__DIR__ . '/vendor/autoload.php');
use Pingram\Client;
$client = new Client('YOUR_API_KEY');
try { $result = $client->getNumbers()->numbersReleaseNumber(); print_r($result);} catch (Exception $e) { echo 'Exception when calling numbersReleaseNumber: ', $e->getMessage(), PHP_EOL;}Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| phone_number | string | E.164 phone number to release |
Return Type
PingramModelReleasePhoneNumberResponse
numbersSearchAvailable()
Search for available phone numbers to purchase
<?phprequire_once(__DIR__ . '/vendor/autoload.php');
use Pingram\Client;
$client = new Client('YOUR_API_KEY');
try { $result = $client->getNumbers()->numbersSearchAvailable(); print_r($result);} catch (Exception $e) { echo 'Exception when calling numbersSearchAvailable: ', $e->getMessage(), PHP_EOL;}Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| country_code | string | ISO 3166-1 alpha-2 country code (e.g., US, CA) | |
| features | string | Comma-separated | [optional] |
| area_code | string | National destination / area code filter | [optional] |
| limit | float | Max results (default 10, max 50) | [optional] |
| starts_with | string | Digits the number starts with, 1 to 7 digits. Do not include the country code. When `areaCode` is set, omit those digits here. | [optional] |
| ends_with | string | Digits the number must end with, 1 to 7 digits. Use this to find a number close to one you already have. | [optional] |
| contains | string | Digits to find in the number, in that order, 1 to 7 digits. | [optional] |
| city | string | City to search in, such as San Francisco. | [optional] |
Return Type
PingramModelSearchAvailablePhoneNumbersResponse
Profile
profileAcceptInvite()
Accept a team invitation using a token
<?phprequire_once(__DIR__ . '/vendor/autoload.php');
use Pingram\Client;
$client = new Client('YOUR_API_KEY');$body = new \Pingram\Model\AcceptInviteRequest(); // configure as needed
try { $result = $client->getProfile()->profileAcceptInvite($body); print_r($result);} catch (Exception $e) { echo 'Exception when calling profileAcceptInvite: ', $e->getMessage(), PHP_EOL;}Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| accept_invite_request | \Pingram\Model\AcceptInviteRequest | See Request Body Properties below |
Request Body Properties
| Name | Type | Description |
|---|---|---|
token |
string | (required) |
Return Type
PingramModelAcceptInviteResponse
profileDeleteAccount()
Permanently delete the authenticated user’s account
<?phprequire_once(__DIR__ . '/vendor/autoload.php');
use Pingram\Client;
$client = new Client('YOUR_API_KEY');$body = new \Pingram\Model\DeleteAccountRequest(); // configure as needed
try { $result = $client->getProfile()->profileDeleteAccount($body); print_r($result);} catch (Exception $e) { echo 'Exception when calling profileDeleteAccount: ', $e->getMessage(), PHP_EOL;}Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| delete_account_request | \Pingram\Model\DeleteAccountRequest | See Request Body Properties below |
Request Body Properties
| Name | Type | Description |
|---|---|---|
reason |
string |
Return Type
PingramModelSuccessResponse
profileDisableMfa()
Disable MFA for the authenticated user
<?phprequire_once(__DIR__ . '/vendor/autoload.php');
use Pingram\Client;
$client = new Client('YOUR_API_KEY');
try { $result = $client->getProfile()->profileDisableMfa(); print_r($result);} catch (Exception $e) { echo 'Exception when calling profileDisableMfa: ', $e->getMessage(), PHP_EOL;}Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| type | string | MFA type (e.g. SOFTWARE_TOKEN_MFA) |
Return Type
PingramModelSuccessResponse
profileGetMfaStatus()
Get MFA status for the authenticated user
<?phprequire_once(__DIR__ . '/vendor/autoload.php');
use Pingram\Client;
$client = new Client('YOUR_API_KEY');
try { $result = $client->getProfile()->profileGetMfaStatus(); print_r($result);} catch (Exception $e) { echo 'Exception when calling profileGetMfaStatus: ', $e->getMessage(), PHP_EOL;}Parameters
This endpoint does not need any parameter.
Return Type
PingramModelMFAStatusResponse
profileSetupMfa()
Start TOTP MFA setup and return QR code data
<?phprequire_once(__DIR__ . '/vendor/autoload.php');
use Pingram\Client;
$client = new Client('YOUR_API_KEY');$body = new \Pingram\Model\MFASetupRequest(); // configure as needed
try { $result = $client->getProfile()->profileSetupMfa($body); print_r($result);} catch (Exception $e) { echo 'Exception when calling profileSetupMfa: ', $e->getMessage(), PHP_EOL;}Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| mfa_setup_request | \Pingram\Model\MFASetupRequest | See Request Body Properties below |
Request Body Properties
| Name | Type | Description |
|---|---|---|
type |
“SOFTWARE_TOKEN_MFA” | (required) MFA methods supported by the profile MFA API. |
Return Type
PingramModelMFASetupResponse
profileVerifyMfa()
Verify TOTP code and enable MFA
<?phprequire_once(__DIR__ . '/vendor/autoload.php');
use Pingram\Client;
$client = new Client('YOUR_API_KEY');$body = new \Pingram\Model\MFAVerifyRequest(); // configure as needed
try { $result = $client->getProfile()->profileVerifyMfa($body); print_r($result);} catch (Exception $e) { echo 'Exception when calling profileVerifyMfa: ', $e->getMessage(), PHP_EOL;}Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| mfa_verify_request | \Pingram\Model\MFAVerifyRequest | See Request Body Properties below |
Request Body Properties
| Name | Type | Description |
|---|---|---|
type |
“SOFTWARE_TOKEN_MFA” | (required) MFA methods supported by the profile MFA API. |
code |
string | (required) |
session |
string | (required) |
Return Type
PingramModelSuccessResponse
Registrations
registrationsCreateUs10dlcBrand()
Create a new 10DLC brand registration
<?phprequire_once(__DIR__ . '/vendor/autoload.php');
use Pingram\Client;
$client = new Client('YOUR_API_KEY');$body = new \Pingram\Model\TenDlcBrandCreateRequest(); // configure as needed
try { $result = $client->getRegistrations()->registrationsCreateUs10dlcBrand($body); print_r($result);} catch (Exception $e) { echo 'Exception when calling registrationsCreateUs10dlcBrand: ', $e->getMessage(), PHP_EOL;}Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| ten_dlc_brand_create_request | \Pingram\Model\TenDlcBrandCreateRequest | See Request Body Properties below |
Request Body Properties
| Name | Type | Description |
|---|---|---|
scenarioId |
“own_brand” | “client_brand” | (required) Who the 10DLC brand is registered for. - own_brand: personal or company project - client_brand: agency or contractor |
businessType |
“PRIVATE_PROFIT” | “SOLE_PROPRIETOR” | “PUBLIC_PROFIT” | “NON_PROFIT” | “GOVERNMENT” | (required) Legal entity type for a 10DLC brand. - PRIVATE_PROFIT: private for-profit (LLC, corp, etc.) - SOLE_PROPRIETOR: sole proprietorship - PUBLIC_PROFIT: publicly traded for-profit - NON_PROFIT: non-profit - GOVERNMENT: government |
legalName |
string | Official registered legal business name. For SOLE_PROPRIETOR, optional DBA or trade name (defaults to firstName and lastName). |
displayName |
string | (required) Public brand name shown to recipients and carriers. Use the name customers recognize (your DBA or trade name). For companies with no DBA, use the same value as legalName. For SOLE_PROPRIETOR, this is the brand you send as — not the individual’s legal name (set firstName and lastName for that). If the sole proprietor has no DBA, use first and last name. |
firstName |
string | Legal first name of the sole proprietor. Required when businessType is SOLE_PROPRIETOR. |
lastName |
string | Legal last name of the sole proprietor. Required when businessType is SOLE_PROPRIETOR. |
taxId |
string | For US companies (country US): 9-digit EIN (Employer Identification Number). For Canada (country CA): 9-digit BN (Business Number). For other countries: national business tax identifier. Required except when businessType is SOLE_PROPRIETOR. |
website |
string | (required) Public website for the brand. Include a scheme (https://) or a domain; https:// is prepended when omitted. Carriers expect a working site with privacy policy and terms. |
country |
string | (required) ISO 3166-1 alpha-2 country of incorporation (for example US or CA). |
street |
string | (required) Street address that matches official tax registration. |
city |
string | (required) City that matches official tax registration. |
state |
string | (required) State (US) or province (CA) that matches official tax registration. |
postalCode |
string | (required) ZIP code (US) or postal code (CA) that matches official tax registration. |
complianceContactEmail |
string | (required) Email for the 10DLC compliance contact. Used for carrier and registration follow-up. |
complianceContactPhone |
string | (required) Phone number for the 10DLC compliance contact. E.164 preferred; national numbers are normalized using country. |
Return Type
PingramModelTenDlcBrandRegistration
registrationsGetUs10dlcBrand()
Get the 10DLC brand registration
<?phprequire_once(__DIR__ . '/vendor/autoload.php');
use Pingram\Client;
$client = new Client('YOUR_API_KEY');
try { $result = $client->getRegistrations()->registrationsGetUs10dlcBrand(); print_r($result);} catch (Exception $e) { echo 'Exception when calling registrationsGetUs10dlcBrand: ', $e->getMessage(), PHP_EOL;}Parameters
This endpoint does not need any parameter.
Return Type
PingramModelTenDlcBrandRegistration
registrationsGetUs10dlcCampaign()
Get the 10DLC campaign registration
<?phprequire_once(__DIR__ . '/vendor/autoload.php');
use Pingram\Client;
$client = new Client('YOUR_API_KEY');
try { $result = $client->getRegistrations()->registrationsGetUs10dlcCampaign(); print_r($result);} catch (Exception $e) { echo 'Exception when calling registrationsGetUs10dlcCampaign: ', $e->getMessage(), PHP_EOL;}Parameters
This endpoint does not need any parameter.
Return Type
PingramModelTenDlcCampaignRegistration
registrationsUpdateUs10dlcBrand()
Update the 10DLC brand
<?phprequire_once(__DIR__ . '/vendor/autoload.php');
use Pingram\Client;
$client = new Client('YOUR_API_KEY');$body = new \Pingram\Model\TenDlcBrandUpdateRequest(); // configure as needed
try { $result = $client->getRegistrations()->registrationsUpdateUs10dlcBrand($body); print_r($result);} catch (Exception $e) { echo 'Exception when calling registrationsUpdateUs10dlcBrand: ', $e->getMessage(), PHP_EOL;}Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| ten_dlc_brand_update_request | \Pingram\Model\TenDlcBrandUpdateRequest | See Request Body Properties below |
Request Body Properties
| Name | Type | Description |
|---|---|---|
scenarioId |
“own_brand” | “client_brand” | Who the 10DLC brand is registered for. - own_brand: personal or company project - client_brand: agency or contractor |
businessType |
“PRIVATE_PROFIT” | “SOLE_PROPRIETOR” | “PUBLIC_PROFIT” | “NON_PROFIT” | “GOVERNMENT” | Legal entity type for a 10DLC brand. - PRIVATE_PROFIT: private for-profit (LLC, corp, etc.) - SOLE_PROPRIETOR: sole proprietorship - PUBLIC_PROFIT: publicly traded for-profit - NON_PROFIT: non-profit - GOVERNMENT: government |
legalName |
string | Official registered legal business name. For SOLE_PROPRIETOR, optional DBA or trade name (defaults to firstName and lastName). |
displayName |
string | Public brand name shown to recipients and carriers. Use the name customers recognize (your DBA or trade name). For SOLE_PROPRIETOR, this is the brand you send as — not the individual’s legal name. Omit to keep the existing value. If you change legalName and omit displayName, displayName is reset to the new legalName. |
firstName |
string | Legal first name of the sole proprietor. Required when businessType is SOLE_PROPRIETOR. |
lastName |
string | Legal last name of the sole proprietor. Required when businessType is SOLE_PROPRIETOR. |
taxId |
string | For US companies (country US): 9-digit EIN (Employer Identification Number). For Canada (country CA): 9-digit BN (Business Number). For other countries: national business tax identifier. Required except when businessType is SOLE_PROPRIETOR. |
website |
string | Public website for the brand. Include a scheme (https://) or a domain; https:// is prepended when omitted. Carriers expect a working site with privacy policy and terms. |
country |
string | ISO 3166-1 alpha-2 country of incorporation (for example US or CA). |
street |
string | Street address that matches official tax registration. |
city |
string | City that matches official tax registration. |
state |
string | State (US) or province (CA) that matches official tax registration. |
postalCode |
string | ZIP code (US) or postal code (CA) that matches official tax registration. |
complianceContactEmail |
string | Email for the 10DLC compliance contact. Used for carrier and registration follow-up. |
complianceContactPhone |
string | Phone number for the 10DLC compliance contact. E.164 preferred; national numbers are normalized using country. |
Return Type
PingramModelTenDlcBrandRegistration
registrationsUpdateUs10dlcCampaign()
Update the 10DLC campaign
<?phprequire_once(__DIR__ . '/vendor/autoload.php');
use Pingram\Client;
$client = new Client('YOUR_API_KEY');$body = new \Pingram\Model\TenDlcCampaignUpdateRequest(); // configure as needed
try { $result = $client->getRegistrations()->registrationsUpdateUs10dlcCampaign($body); print_r($result);} catch (Exception $e) { echo 'Exception when calling registrationsUpdateUs10dlcCampaign: ', $e->getMessage(), PHP_EOL;}Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| ten_dlc_campaign_update_request | \Pingram\Model\TenDlcCampaignUpdateRequest | See Request Body Properties below |
Request Body Properties
| Name | Type | Description |
|---|---|---|
campaignDescription |
string | Summary of what this campaign sends and why, including audience and typical message content. Required before carrier submission. |
campaignSample1 |
string | Example SMS that represents actual campaign traffic. Required before carrier submission. Should match the use case and typically identify the brand and include STOP/HELP language. |
campaignSample2 |
string | Second example SMS. Required before carrier submission. Required for MARKETING and MIXED use cases. |
campaignSample3 |
string | Optional third example SMS. |
campaignSample4 |
string | Optional fourth example SMS. |
campaignMessageFlow |
string | How recipients opt in (for example website form, checkout, or keyword). Describe the call-to-action and where consent is collected. Required before carrier submission. |
campaignOptinKeywords |
string | Extra opt-in keywords as a comma-separated list. START is always included. |
campaignOptinMessage |
string | Auto-reply sent when a recipient opts in. Required before carrier submission. Should confirm the subscription, mention message frequency, and include STOP and HELP instructions. |
campaignOptoutKeywords |
string | Extra opt-out keywords as a comma-separated list. STOP is always included. |
campaignOptoutMessage |
string | Auto-reply sent when a recipient opts out. Required before carrier submission. Should confirm they will receive no further messages. |
campaignHelpKeywords |
string | Extra help keywords as a comma-separated list. HELP is always included. |
campaignHelpMessage |
string | Auto-reply sent when a recipient texts a help keyword. Required before carrier submission. Should include a support contact (email and/or phone). |
campaignEmbeddedLink |
boolean | Whether campaign messages include URLs. |
campaignEmbeddedLinkUrl |
string | Sample URL that appears in messages. Provide when campaignEmbeddedLink is true. |
campaignEmbeddedPhone |
boolean | Whether campaign messages include phone numbers. |
campaignAgeGated |
boolean | Whether campaign content is age-restricted (18+). |
campaignDirectLending |
boolean | Whether the campaign relates to direct lending or loan products. |
campaignPrivacyPolicyLink |
string | Public URL of the privacy policy that covers this SMS program. |
campaignTermsAndConditionsLink |
string | Public URL of the terms and conditions that cover this SMS program. |
campaignUsecase |
string | 10DLC campaign use case submitted to carriers. Required before carrier submission. One of 2FA, ACCOUNT_NOTIFICATION, CUSTOMER_CARE, DELIVERY_NOTIFICATION, FRAUD_ALERT, MARKETING, MIXED, POLLING_VOTING, PUBLIC_SERVICE_ANNOUNCEMENT, or SECURITY_ALERT. For MIXED, append comma-separated sub-use cases after MIXED (sub-use cases cannot include MIXED), for example MIXED,2FA,ACCOUNT_NOTIFICATION. |
Return Type
PingramModelTenDlcCampaignRegistration
Sender
senderDeleteSchedule()
Delete (unschedule) an already scheduled notification
<?phprequire_once(__DIR__ . '/vendor/autoload.php');
use Pingram\Client;
$client = new Client('YOUR_API_KEY');
try { $result = $client->getSender()->senderDeleteSchedule(); print_r($result);} catch (Exception $e) { echo 'Exception when calling senderDeleteSchedule: ', $e->getMessage(), PHP_EOL;}Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| tracking_id | string | The tracking ID of the scheduled notification |
Return Type
PingramModelMessageResponse
senderTestEmail()
Test the emailer with a sample email
<?phprequire_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->getSender()->senderTestEmail($body); print_r($result);} catch (Exception $e) { echo 'Exception when calling senderTestEmail: ', $e->getMessage(), PHP_EOL;}Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| post_email_test_request | \Pingram\Model\PostEmailTestRequest | See Request Body Properties below |
Request Body Properties
| Name | Type | Description |
|---|---|---|
notificationId |
string | (required) |
to |
string | (required) |
subject |
string | (required) |
html |
string | (required) |
fromAddress |
string | (required) |
fromName |
string | (required) |
previewText |
string |
Return Type
PingramModelPostEmailTestResponse
senderUpdateSchedule()
Update a scheduled notification
<?phprequire_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->getSender()->senderUpdateSchedule($body); print_r($result);} catch (Exception $e) { echo 'Exception when calling senderUpdateSchedule: ', $e->getMessage(), PHP_EOL;}Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| tracking_id | string | The tracking ID of the scheduled notification | |
| sender_post_body | \Pingram\Model\SenderPostBody | See Request Body Properties below |
Request Body Properties
| Name | Type | Description |
|---|---|---|
type |
string | ID of the notification type (e.g. “welcome_email”). Creates a new notification if it does not exist. |
to |
object | Recipient user. Provide id, email, or number to identify the user. |
to.id |
string | Unique user identifier. Required. |
to.email |
string | User’s email address for email notifications. |
to.number |
string | User’s phone number for SMS/call notifications. |
to.pushTokens |
object[] | Mobile push tokens (FCM, APN) for push notifications. |
to.pushTokens[].type |
“FCM” | “APN” | (required) |
to.pushTokens[].token |
string | (required) |
to.pushTokens[].device |
object | (required) |
to.pushTokens[].device.app_id |
string | |
to.pushTokens[].device.ad_id |
string | |
to.pushTokens[].device.device_id |
string | (required) |
to.pushTokens[].device.platform |
string | |
to.pushTokens[].device.manufacturer |
string | |
to.pushTokens[].device.model |
string | |
to.pushTokens[].environment |
string | used by APN to differentiate between sandbox and production builds (sandbox/undefined or production) |
to.webPushTokens |
object[] | Web push subscription config from the browser. |
to.webPushTokens[].sub |
object | (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.endpoint |
string | (required) |
to.webPushTokens[].sub.keys |
object | (required) |
to.webPushTokens[].sub.keys.p256dh |
string | (required) |
to.webPushTokens[].sub.keys.auth |
string | (required) |
to.timezone |
string | User’s timezone (e.g. “America/New_York”) for scheduling. |
to.slackChannel |
string | The 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.slackToken |
object | |
to.slackToken.access_token |
string | |
to.slackToken.app_id |
string | |
to.slackToken.authed_user |
object | |
to.slackToken.authed_user.access_token |
string | |
to.slackToken.authed_user.expires_in |
number | |
to.slackToken.authed_user.id |
string | |
to.slackToken.authed_user.refresh_token |
string | |
to.slackToken.authed_user.scope |
string | |
to.slackToken.authed_user.token_type |
string | |
to.slackToken.bot_user_id |
string | |
to.slackToken.enterprise |
object | |
to.slackToken.enterprise.id |
string | |
to.slackToken.enterprise.name |
string | |
to.slackToken.error |
string | |
to.slackToken.expires_in |
number | |
to.slackToken.incoming_webhook |
object | |
to.slackToken.incoming_webhook.channel |
string | |
to.slackToken.incoming_webhook.channel_id |
string | |
to.slackToken.incoming_webhook.configuration_url |
string | |
to.slackToken.incoming_webhook.url |
string | |
to.slackToken.is_enterprise_install |
boolean | |
to.slackToken.needed |
string | |
to.slackToken.ok |
boolean | (required) |
to.slackToken.provided |
string | |
to.slackToken.refresh_token |
string | |
to.slackToken.scope |
string | |
to.slackToken.team |
object | |
to.slackToken.team.id |
string | |
to.slackToken.team.name |
string | |
to.slackToken.token_type |
string | |
to.slackToken.warning |
string | |
to.slackToken.response_metadata |
object | |
to.slackToken.response_metadata.warnings |
string[] | |
to.slackToken.response_metadata.next_cursor |
string | |
to.slackToken.response_metadata.scopes |
string[] | |
to.slackToken.response_metadata.acceptedScopes |
string[] | |
to.slackToken.response_metadata.retryAfter |
number | |
to.slackToken.response_metadata.messages |
string[] | |
to.properties |
Record<string, string | number | boolean> | Custom key-value properties synced by the developer, used for audience segmentation (e.g. broadcast filters on user.properties.plan). Incremental identify calls shallow-merge keys (unset keys are preserved). Limits: max 25 keys, key length <= 64, string values <= 256 chars, serialized size <= 1KB. |
to.lastSeenTime |
string | Last activity timestamp. Updated automatically. Read-only. |
to.updatedAt |
string | Last update timestamp. Read-only. |
to.createdAt |
string | Creation timestamp. Read-only. |
to.emailSuppressionStatus |
object | Bounce or complaint status if email was suppressed. Read-only. |
to.emailSuppressionStatus.reason |
“Bounce” | “Complaint” | (required) |
to.emailSuppressionStatus.details |
object | (required) |
forceChannels |
(“EMAIL” | “INAPP_WEB” | “SMS” | “CALL” | “VOICE” | “PUSH” | “WEB_PUSH” | “SLACK”)[] | Override which channels to send to (e.g. [“EMAIL”, “SMS”]). Bypasses notification channel config. |
parameters |
Record<string, any> | Key-value pairs for template merge tags. Replaces placeholders like {{firstName}} in templates. |
templateId |
string | Specific template ID to use. If omitted, uses the default template for each channel. |
subNotificationId |
string | Sub-notification identifier (e.g. for grouping related notifications). |
options |
object | Per-channel overrides for send options (email, APN, FCM). |
options.email |
object | Email-specific overrides. |
options.email.replyToAddresses |
string[] | Reply-to addresses for the email. |
options.email.ccAddresses |
string[] | CC recipients. |
options.email.bccAddresses |
string[] | BCC recipients. |
options.email.fromAddress |
string | Override sender email address. |
options.email.fromName |
string | Override sender display name. |
options.email.openTracking |
boolean | When false, this send does not record opens and no open pixel is added. Delivery, bounce, and complaint events are unchanged. Defaults to true. |
options.email.clickTracking |
boolean | When false, links are left as written and clicks are not recorded. Delivery, bounce, and complaint events are unchanged. Defaults to true. |
options.email.attachments |
(object | object)[] | File attachments (by URL or inline base64 content). Inline content: ~4 MB raw per file (413 if exceeded). URL url: up to 20 MB per file. |
options.apn |
object | Apple Push Notification (APN) overrides. |
options.apn.expiry |
number | Seconds until the notification expires. |
options.apn.priority |
number | Delivery priority (10 = immediate, 5 = power-saving). |
options.apn.collapseId |
string | Group notifications with the same ID (replaces previous). |
options.apn.threadId |
string | Thread identifier for grouping notifications. |
options.apn.badge |
number | Badge count on app icon. |
options.apn.sound |
string | Sound file name. |
options.apn.contentAvailable |
boolean | Silent background notification (no alert). |
options.fcm |
object | Firebase Cloud Messaging (FCM) overrides. |
options.fcm.android |
object | Android-specific FCM options. |
options.fcm.android.collapseKey |
string | Collapse key for grouping messages. |
options.fcm.android.priority |
“high” | “normal” | Delivery priority. |
options.fcm.android.ttl |
number | Time to live in seconds. |
options.fcm.android.restrictedPackageName |
string | Restrict delivery to a specific package. |
options.push |
object | Cross-platform mobile push options (applied to both APN and FCM). |
options.push.customData |
Record<string, string> | Up to 3 custom string key-value pairs for deep linking. Included in both APN and FCM payloads. |
schedule |
string | |
email |
object | Inline email content (subject, html). Use when not using templates. |
email.subject |
string | (required) Email subject line. |
email.html |
string | (required) HTML body content. |
email.previewText |
string | Preview/snippet text shown in inbox. |
email.senderName |
string | Display name of sender. |
email.senderEmail |
string | Sender email address. |
inapp |
object | Inline in-app content (title, url, image). |
inapp.title |
string | (required) Notification title. |
inapp.url |
string | URL to open when clicked. |
inapp.image |
string | Image URL. |
sms |
object | Inline SMS content (message, from, mediaUrls). |
sms.message |
string | SMS/MMS body text. |
sms.mediaUrls |
string[] | Public HTTPS URLs of media to attach (MMS). Carriers fetch these via GET. Total size limits apply per provider. |
sms.from |
string | Override the sender phone number. Must be a verified number on your account. |
call |
object | Inline call content (message). |
call.message |
string | (required) Text to speak (TTS). |
web_push |
object | Inline web push content (title, message, icon, url). |
web_push.title |
string | (required) Notification title. |
web_push.message |
string | (required) Body text. |
web_push.icon |
string | Icon URL. |
web_push.url |
string | URL to open when clicked. |
mobile_push |
object | Inline mobile push content (title, message). |
mobile_push.title |
string | (required) Notification title. |
mobile_push.message |
string | (required) Body text. |
slack |
object | Inline Slack content (text, blocks, etc.). |
slack.text |
string | (required) Fallback plain text (required when using blocks). |
slack.blocks |
Record<string, any>[] | Slack Block Kit blocks. |
slack.username |
string | Override bot username. |
slack.icon |
string | Icon: emoji (e.g. “:smile:”) or URL. Default: bot’s icon. |
slack.thread_ts |
string | Parent message ts to post in a thread. |
slack.reply_broadcast |
boolean | When true with thread_ts, broadcasts reply to channel. Default: false. |
slack.parse |
“full” | “none” | URL parsing: “full” (clickable links) or “none”. Default: “none”. |
slack.link_names |
boolean | Convert channel and username refs to Slack links. Default: false. |
slack.mrkdwn |
boolean | Enable Slack markup (bold, italic, code). Default: true. |
slack.unfurl_links |
boolean | Unfurl link previews. Default: true. |
slack.unfurl_media |
boolean | Unfurl media previews. Default: true. |
slack.metadata |
object | Slack message metadata with optional work object entities. Combines standard Slack message metadata fields with an array of entity objects. |
slack.metadata.entities |
object[] | An array of work object entities. |
slack.metadata.entities[].entity_type |
string | (required) Entity type (e.g., ‘slack#/entities/task’, ‘slack#/entities/file’). |
slack.metadata.entities[].entity_payload |
Record<string, any> | (required) Schema for the given entity type. |
slack.metadata.entities[].external_ref |
object | (required) Reference used to identify an entity within the developer’s system. |
slack.metadata.entities[].external_ref.id |
string | (required) |
slack.metadata.entities[].external_ref.type |
string | |
slack.metadata.entities[].url |
string | (required) URL used to identify an entity within the developer’s system. |
slack.metadata.entities[].app_unfurl_url |
string | The exact URL posted in the source message. Required in metadata passed to chat.unfurl. |
slack.metadata.event_type |
string | A human readable alphanumeric string representing your application’s metadata event. |
slack.metadata.event_payload |
Record<string, any> | A free-form object containing whatever data your application wishes to attach to messages. |
Return Type
PingramModelMessageResponse
Sms
smsSend()
Send an SMS or MMS directly without a template
<?phprequire_once(__DIR__ . '/vendor/autoload.php');
use Pingram\Client;
$client = new Client('YOUR_API_KEY');$body = new \Pingram\Model\SendSmsRequest(); // configure as needed
try { $result = $client->getSms()->smsSend($body); print_r($result);} catch (Exception $e) { echo 'Exception when calling smsSend: ', $e->getMessage(), PHP_EOL;}Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| send_sms_request | \Pingram\Model\SendSmsRequest | See Request Body Properties below |
Request Body Properties
| Name | Type | Description |
|---|---|---|
type |
string | (required) The notification type to send. |
to |
string | (required) The phone number of the recipient. |
message |
string | The message of the SMS or MMS notification. Optional when mediaUrls is provided. |
mediaUrls |
string[] | Public HTTPS URLs of media to attach (MMS). |
schedule |
string | The ISO 8601 datetime to schedule the SMS notification. |
from |
string | Override the sender phone number. Must be a dedicated number on your Pingram account. |
Return Type
PingramModelSendSmsResponse
SubNotifications
subNotificationsDeleteSubNotification()
This endpoint is no longer maintained and should not be used
<?phprequire_once(__DIR__ . '/vendor/autoload.php');
use Pingram\Client;
$client = new Client('YOUR_API_KEY');
try { $result = $client->getSubNotifications()->subNotificationsDeleteSubNotification(); print_r($result);} catch (Exception $e) { echo 'Exception when calling subNotificationsDeleteSubNotification: ', $e->getMessage(), PHP_EOL;}Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| notification_id | string | The notification ID | |
| sub_notification_id | string | The sub-notification ID |
Return Type
void (empty response body)
subNotificationsPutSubNotification()
This endpoint is no longer maintained and should not be used
<?phprequire_once(__DIR__ . '/vendor/autoload.php');
use Pingram\Client;
$client = new Client('YOUR_API_KEY');$body = new \Pingram\Model\SubNotificationPUTRequest(); // configure as needed
try { $result = $client->getSubNotifications()->subNotificationsPutSubNotification($body); print_r($result);} catch (Exception $e) { echo 'Exception when calling subNotificationsPutSubNotification: ', $e->getMessage(), PHP_EOL;}Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| notification_id | string | The notification ID | |
| sub_notification_id | string | The sub-notification ID | |
| sub_notification_put_request | \Pingram\Model\SubNotificationPUTRequest | See Request Body Properties below |
Request Body Properties
| Name | Type | Description |
|---|---|---|
title |
string | (required) |
Return Type
PingramModelSubNotification
Templates
templatesCreateTemplate()
Create a new template for a notification
<?phprequire_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->getTemplates()->templatesCreateTemplate($body); print_r($result);} catch (Exception $e) { echo 'Exception when calling templatesCreateTemplate: ', $e->getMessage(), PHP_EOL;}Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| notification_id | string | Notification ID | |
| channel | string | Channel type | |
| template_post_request | \Pingram\Model\TemplatePostRequest | See Request Body Properties below |
Request Body Properties
| Name | Type | Description |
|---|---|---|
templateId |
string | (required) Unique ID for this template within the notification and channel. Required. |
html |
string | HTML body of the email. |
previewText |
string | Preview text (e.g. for inbox). |
internal |
string | Internal 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. |
subject |
string | Email subject line. |
senderName |
string | Sender display name. |
senderEmail |
string | Sender email address. |
title |
string | Notification title (in-app). |
redirectURL |
string | URL to open when the user taps the notification. |
imageURL |
string | Image URL shown in the in-app notification. |
instant |
object | Copy for instant (real-time) delivery. |
instant.title |
string | |
instant.redirectURL |
string | |
instant.imageURL |
string | (required) |
batch |
object | Copy for batch delivery. |
batch.title |
string | (required) |
batch.redirectURL |
string | (required) |
batch.imageURL |
string | (required) |
text |
string | Message text (SMS or call). |
message |
string | Push notification body text. (title is shared with INAPP_WEB above.) |
icon |
string | Web push: icon URL. Slack: bot icon (emoji or URL). |
url |
string | Web push: URL to open when the notification is clicked. |
blocks |
Record<string, any>[] | Slack message blocks (optional). |
username |
string | Slack bot username. |
Return Type
PingramModelTemplate
templatesDeleteTemplate()
Delete a template
<?phprequire_once(__DIR__ . '/vendor/autoload.php');
use Pingram\Client;
$client = new Client('YOUR_API_KEY');
try { $result = $client->getTemplates()->templatesDeleteTemplate(); print_r($result);} catch (Exception $e) { echo 'Exception when calling templatesDeleteTemplate: ', $e->getMessage(), PHP_EOL;}Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| notification_id | string | Notification ID | |
| channel | string | Channel type | |
| template_id | string | Template ID |
Return Type
void (empty response body)
templatesGetTemplate()
Get a single template by ID
<?phprequire_once(__DIR__ . '/vendor/autoload.php');
use Pingram\Client;
$client = new Client('YOUR_API_KEY');
try { $result = $client->getTemplates()->templatesGetTemplate(); print_r($result);} catch (Exception $e) { echo 'Exception when calling templatesGetTemplate: ', $e->getMessage(), PHP_EOL;}Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| notification_id | string | Notification ID | |
| channel | string | Channel type | |
| template_id | string | Template ID |
Return Type
PingramModelGetTemplatesResponse
templatesListTemplates()
List all templates for a notification and channel
<?phprequire_once(__DIR__ . '/vendor/autoload.php');
use Pingram\Client;
$client = new Client('YOUR_API_KEY');
try { $result = $client->getTemplates()->templatesListTemplates(); print_r($result);} catch (Exception $e) { echo 'Exception when calling templatesListTemplates: ', $e->getMessage(), PHP_EOL;}Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| notification_id | string | Notification ID | |
| channel | string | Channel type |
Return Type
[PingramModelGetTemplatesListResponseInner[]](../Model/GetTemplatesListResponseInner.md)
templatesSetDefaultTemplate()
Set a template as default for specific delivery modes
<?phprequire_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->getTemplates()->templatesSetDefaultTemplate($body); print_r($result);} catch (Exception $e) { echo 'Exception when calling templatesSetDefaultTemplate: ', $e->getMessage(), PHP_EOL;}Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| notification_id | string | Notification ID | |
| channel | string | Channel type | |
| set_default_template_request | \Pingram\Model\SetDefaultTemplateRequest | See Request Body Properties below |
Request Body Properties
| Name | Type | Description |
|---|---|---|
templateId |
string | (required) |
modes |
(“instant” | “hourly” | “daily” | “weekly” | “monthly”)[] | (required) |
Return Type
PingramModelTemplate
templatesUpdateTemplate()
Update a template’s properties
<?phprequire_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->getTemplates()->templatesUpdateTemplate($body); print_r($result);} catch (Exception $e) { echo 'Exception when calling templatesUpdateTemplate: ', $e->getMessage(), PHP_EOL;}Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| notification_id | string | Notification ID | |
| channel | string | Channel type | |
| template_id | string | Template ID | |
| template_patch_request | \Pingram\Model\TemplatePatchRequest | See Request Body Properties below |
Request Body Properties
| Name | Type | Description |
|---|---|---|
html |
string | HTML body of the email. |
previewText |
string | Preview text (e.g. for inbox). |
internal |
string | Internal 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. |
subject |
string | Email subject line. |
senderName |
string | Sender display name. |
senderEmail |
string | Sender email address. |
title |
string | Notification title (in-app). |
redirectURL |
string | URL to open when the user taps the notification. |
imageURL |
string | Image URL shown in the in-app notification. |
instant |
object | Copy for instant (real-time) delivery. |
instant.title |
string | |
instant.redirectURL |
string | |
instant.imageURL |
string | (required) |
batch |
object | Copy for batch delivery. |
batch.title |
string | (required) |
batch.redirectURL |
string | (required) |
batch.imageURL |
string | (required) |
text |
string | Message text (SMS or call). |
message |
string | Push notification body text. (title is shared with INAPP_WEB above.) |
icon |
string | Web push: icon URL. Slack: bot icon (emoji or URL). |
url |
string | Web push: URL to open when the notification is clicked. |
blocks |
Record<string, any>[] | Slack message blocks (optional). |
username |
string | Slack bot username. |
Return Type
PingramModelTemplate
Types
typesCreateNotificationType()
Create a new notification
<?phprequire_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->getTypes()->typesCreateNotificationType($body); print_r($result);} catch (Exception $e) { echo 'Exception when calling typesCreateNotificationType: ', $e->getMessage(), PHP_EOL;}Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| notification_create_request | \Pingram\Model\NotificationCreateRequest | See Request Body Properties below |
Request Body Properties
| Name | Type | Description |
|---|---|---|
notificationId |
string | (required) |
title |
string | (required) |
channels |
string[] | (required) |
options |
object | |
options.EMAIL |
object | |
options.EMAIL.defaultDeliveryOption |
“off” | “instant” | “hourly” | “daily” | “weekly” | “monthly” | (required) |
options.EMAIL.off |
object | |
options.EMAIL.off.enabled |
boolean | (required) |
options.EMAIL.instant |
object | |
options.EMAIL.instant.enabled |
boolean | (required) |
options.EMAIL.hourly |
object | |
options.EMAIL.hourly.enabled |
boolean | (required) |
options.EMAIL.daily |
object | |
options.EMAIL.daily.enabled |
boolean | (required) |
options.EMAIL.daily.hour |
string | |
options.EMAIL.weekly |
object | |
options.EMAIL.weekly.enabled |
boolean | (required) |
options.EMAIL.weekly.hour |
string | |
options.EMAIL.weekly.day |
string | |
options.EMAIL.monthly |
object | |
options.EMAIL.monthly.enabled |
boolean | (required) |
options.EMAIL.monthly.hour |
string | |
options.EMAIL.monthly.date |
“first” | “last” | |
options.INAPP_WEB |
object | |
options.INAPP_WEB.defaultDeliveryOption |
“off” | “instant” | (required) |
options.INAPP_WEB.off |
object | |
options.INAPP_WEB.off.enabled |
boolean | (required) |
options.INAPP_WEB.instant |
object | |
options.INAPP_WEB.instant.enabled |
boolean | (required) |
options.INAPP_WEB.instant.batching |
boolean | |
options.INAPP_WEB.instant.batchingKey |
string | |
options.INAPP_WEB.instant.batchingWindow |
number | |
options.SMS |
object | |
options.SMS.defaultDeliveryOption |
“off” | “instant” | “hourly” | “daily” | “weekly” | “monthly” | (required) |
options.SMS.off |
object | |
options.SMS.off.enabled |
boolean | (required) |
options.SMS.instant |
object | |
options.SMS.instant.enabled |
boolean | (required) |
options.SMS.hourly |
object | |
options.SMS.hourly.enabled |
boolean | (required) |
options.SMS.daily |
object | |
options.SMS.daily.enabled |
boolean | (required) |
options.SMS.daily.hour |
string | |
options.SMS.weekly |
object | |
options.SMS.weekly.enabled |
boolean | (required) |
options.SMS.weekly.hour |
string | |
options.SMS.weekly.day |
string | |
options.SMS.monthly |
object | |
options.SMS.monthly.enabled |
boolean | (required) |
options.SMS.monthly.hour |
string | |
options.SMS.monthly.date |
“first” | “last” | |
options.CALL |
object | |
options.CALL.defaultDeliveryOption |
“off” | “instant” | “hourly” | “daily” | “weekly” | “monthly” | (required) |
options.CALL.off |
object | |
options.CALL.off.enabled |
boolean | (required) |
options.CALL.instant |
object | |
options.CALL.instant.enabled |
boolean | (required) |
options.CALL.hourly |
object | |
options.CALL.hourly.enabled |
boolean | (required) |
options.CALL.daily |
object | |
options.CALL.daily.enabled |
boolean | (required) |
options.CALL.daily.hour |
string | |
options.CALL.weekly |
object | |
options.CALL.weekly.enabled |
boolean | (required) |
options.CALL.weekly.hour |
string | |
options.CALL.weekly.day |
string | |
options.CALL.monthly |
object | |
options.CALL.monthly.enabled |
boolean | (required) |
options.CALL.monthly.hour |
string | |
options.CALL.monthly.date |
“first” | “last” | |
options.VOICE |
object | |
options.VOICE.defaultDeliveryOption |
“off” | “instant” | “hourly” | “daily” | “weekly” | “monthly” | (required) |
options.VOICE.off |
object | |
options.VOICE.off.enabled |
boolean | (required) |
options.VOICE.instant |
object | |
options.VOICE.instant.enabled |
boolean | (required) |
options.VOICE.hourly |
object | |
options.VOICE.hourly.enabled |
boolean | (required) |
options.VOICE.daily |
object | |
options.VOICE.daily.enabled |
boolean | (required) |
options.VOICE.daily.hour |
string | |
options.VOICE.weekly |
object | |
options.VOICE.weekly.enabled |
boolean | (required) |
options.VOICE.weekly.hour |
string | |
options.VOICE.weekly.day |
string | |
options.VOICE.monthly |
object | |
options.VOICE.monthly.enabled |
boolean | (required) |
options.VOICE.monthly.hour |
string | |
options.VOICE.monthly.date |
“first” | “last” | |
options.PUSH |
object | |
options.PUSH.defaultDeliveryOption |
“off” | “instant” | “hourly” | “daily” | “weekly” | “monthly” | (required) |
options.PUSH.off |
object | |
options.PUSH.off.enabled |
boolean | (required) |
options.PUSH.instant |
object | |
options.PUSH.instant.enabled |
boolean | (required) |
options.PUSH.hourly |
object | |
options.PUSH.hourly.enabled |
boolean | (required) |
options.PUSH.daily |
object | |
options.PUSH.daily.enabled |
boolean | (required) |
options.PUSH.daily.hour |
string | |
options.PUSH.weekly |
object | |
options.PUSH.weekly.enabled |
boolean | (required) |
options.PUSH.weekly.hour |
string | |
options.PUSH.weekly.day |
string | |
options.PUSH.monthly |
object | |
options.PUSH.monthly.enabled |
boolean | (required) |
options.PUSH.monthly.hour |
string | |
options.PUSH.monthly.date |
“first” | “last” | |
options.WEB_PUSH |
object | |
options.WEB_PUSH.defaultDeliveryOption |
“off” | “instant” | “hourly” | “daily” | “weekly” | “monthly” | (required) |
options.WEB_PUSH.off |
object | |
options.WEB_PUSH.off.enabled |
boolean | (required) |
options.WEB_PUSH.instant |
object | |
options.WEB_PUSH.instant.enabled |
boolean | (required) |
options.WEB_PUSH.hourly |
object | |
options.WEB_PUSH.hourly.enabled |
boolean | (required) |
options.WEB_PUSH.daily |
object | |
options.WEB_PUSH.daily.enabled |
boolean | (required) |
options.WEB_PUSH.daily.hour |
string | |
options.WEB_PUSH.weekly |
object | |
options.WEB_PUSH.weekly.enabled |
boolean | (required) |
options.WEB_PUSH.weekly.hour |
string | |
options.WEB_PUSH.weekly.day |
string | |
options.WEB_PUSH.monthly |
object | |
options.WEB_PUSH.monthly.enabled |
boolean | (required) |
options.WEB_PUSH.monthly.hour |
string | |
options.WEB_PUSH.monthly.date |
“first” | “last” | |
options.SLACK |
object | |
options.SLACK.defaultDeliveryOption |
“off” | “instant” | “hourly” | “daily” | “weekly” | “monthly” | (required) |
options.SLACK.off |
object | |
options.SLACK.off.enabled |
boolean | (required) |
options.SLACK.instant |
object | |
options.SLACK.instant.enabled |
boolean | (required) |
options.SLACK.hourly |
object | |
options.SLACK.hourly.enabled |
boolean | (required) |
options.SLACK.daily |
object | |
options.SLACK.daily.enabled |
boolean | (required) |
options.SLACK.daily.hour |
string | |
options.SLACK.weekly |
object | |
options.SLACK.weekly.enabled |
boolean | (required) |
options.SLACK.weekly.hour |
string | |
options.SLACK.weekly.day |
string | |
options.SLACK.monthly |
object | |
options.SLACK.monthly.enabled |
boolean | (required) |
options.SLACK.monthly.hour |
string | |
options.SLACK.monthly.date |
“first” | “last” |
Return Type
PingramModelNotification
typesDeleteNotificationType()
Delete a notification
<?phprequire_once(__DIR__ . '/vendor/autoload.php');
use Pingram\Client;
$client = new Client('YOUR_API_KEY');
try { $result = $client->getTypes()->typesDeleteNotificationType(); print_r($result);} catch (Exception $e) { echo 'Exception when calling typesDeleteNotificationType: ', $e->getMessage(), PHP_EOL;}Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| notification_id | string | The notification ID |
Return Type
void (empty response body)
typesGetNotificationType()
Get a specific notification by ID
<?phprequire_once(__DIR__ . '/vendor/autoload.php');
use Pingram\Client;
$client = new Client('YOUR_API_KEY');
try { $result = $client->getTypes()->typesGetNotificationType(); print_r($result);} catch (Exception $e) { echo 'Exception when calling typesGetNotificationType: ', $e->getMessage(), PHP_EOL;}Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| notification_id | string | The notification ID |
Return Type
[PingramModelGetNotificationsResponseInner[]](../Model/GetNotificationsResponseInner.md)
typesListNotificationTypes()
Get all notifications for an account with their templates
<?phprequire_once(__DIR__ . '/vendor/autoload.php');
use Pingram\Client;
$client = new Client('YOUR_API_KEY');
try { $result = $client->getTypes()->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
<?phprequire_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->getTypes()->typesUpdateNotificationType($body); print_r($result);} catch (Exception $e) { echo 'Exception when calling typesUpdateNotificationType: ', $e->getMessage(), PHP_EOL;}Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| notification_id | string | The notification ID | |
| notification_patch_request | \Pingram\Model\NotificationPatchRequest | See Request Body Properties below |
Request Body Properties
| Name | Type | Description |
|---|---|---|
title |
string | |
channels |
(“EMAIL” | “INAPP_WEB” | “SMS” | “CALL” | “VOICE” | “PUSH” | “WEB_PUSH” | “SLACK”)[] | |
enabled |
boolean | |
deduplication |
object | |
deduplication.duration |
number | (required) |
throttling |
object | |
throttling.max |
number | (required) |
throttling.period |
number | (required) |
throttling.unit |
“seconds” | “minutes” | “hours” | “days” | “months” | “years” | (required) |
throttling.forever |
boolean | (required) |
throttling.scope |
(“userId” | “notificationId”)[] | (required) |
retention |
number | null |
options |
object | |
options.EMAIL |
object | |
options.EMAIL.defaultDeliveryOption |
“off” | “instant” | “hourly” | “daily” | “weekly” | “monthly” | (required) |
options.EMAIL.off |
object | |
options.EMAIL.off.enabled |
boolean | (required) |
options.EMAIL.instant |
object | |
options.EMAIL.instant.enabled |
boolean | (required) |
options.EMAIL.hourly |
object | |
options.EMAIL.hourly.enabled |
boolean | (required) |
options.EMAIL.daily |
object | |
options.EMAIL.daily.enabled |
boolean | (required) |
options.EMAIL.daily.hour |
string | |
options.EMAIL.weekly |
object | |
options.EMAIL.weekly.enabled |
boolean | (required) |
options.EMAIL.weekly.hour |
string | |
options.EMAIL.weekly.day |
string | |
options.EMAIL.monthly |
object | |
options.EMAIL.monthly.enabled |
boolean | (required) |
options.EMAIL.monthly.hour |
string | |
options.EMAIL.monthly.date |
“first” | “last” | |
options.INAPP_WEB |
object | |
options.INAPP_WEB.defaultDeliveryOption |
“off” | “instant” | (required) |
options.INAPP_WEB.off |
object | |
options.INAPP_WEB.off.enabled |
boolean | (required) |
options.INAPP_WEB.instant |
object | |
options.INAPP_WEB.instant.enabled |
boolean | (required) |
options.INAPP_WEB.instant.batching |
boolean | |
options.INAPP_WEB.instant.batchingKey |
string | |
options.INAPP_WEB.instant.batchingWindow |
number | |
options.SMS |
object | |
options.SMS.defaultDeliveryOption |
“off” | “instant” | “hourly” | “daily” | “weekly” | “monthly” | (required) |
options.SMS.off |
object | |
options.SMS.off.enabled |
boolean | (required) |
options.SMS.instant |
object | |
options.SMS.instant.enabled |
boolean | (required) |
options.SMS.hourly |
object | |
options.SMS.hourly.enabled |
boolean | (required) |
options.SMS.daily |
object | |
options.SMS.daily.enabled |
boolean | (required) |
options.SMS.daily.hour |
string | |
options.SMS.weekly |
object | |
options.SMS.weekly.enabled |
boolean | (required) |
options.SMS.weekly.hour |
string | |
options.SMS.weekly.day |
string | |
options.SMS.monthly |
object | |
options.SMS.monthly.enabled |
boolean | (required) |
options.SMS.monthly.hour |
string | |
options.SMS.monthly.date |
“first” | “last” | |
options.CALL |
object | |
options.CALL.defaultDeliveryOption |
“off” | “instant” | “hourly” | “daily” | “weekly” | “monthly” | (required) |
options.CALL.off |
object | |
options.CALL.off.enabled |
boolean | (required) |
options.CALL.instant |
object | |
options.CALL.instant.enabled |
boolean | (required) |
options.CALL.hourly |
object | |
options.CALL.hourly.enabled |
boolean | (required) |
options.CALL.daily |
object | |
options.CALL.daily.enabled |
boolean | (required) |
options.CALL.daily.hour |
string | |
options.CALL.weekly |
object | |
options.CALL.weekly.enabled |
boolean | (required) |
options.CALL.weekly.hour |
string | |
options.CALL.weekly.day |
string | |
options.CALL.monthly |
object | |
options.CALL.monthly.enabled |
boolean | (required) |
options.CALL.monthly.hour |
string | |
options.CALL.monthly.date |
“first” | “last” | |
options.VOICE |
object | |
options.VOICE.defaultDeliveryOption |
“off” | “instant” | “hourly” | “daily” | “weekly” | “monthly” | (required) |
options.VOICE.off |
object | |
options.VOICE.off.enabled |
boolean | (required) |
options.VOICE.instant |
object | |
options.VOICE.instant.enabled |
boolean | (required) |
options.VOICE.hourly |
object | |
options.VOICE.hourly.enabled |
boolean | (required) |
options.VOICE.daily |
object | |
options.VOICE.daily.enabled |
boolean | (required) |
options.VOICE.daily.hour |
string | |
options.VOICE.weekly |
object | |
options.VOICE.weekly.enabled |
boolean | (required) |
options.VOICE.weekly.hour |
string | |
options.VOICE.weekly.day |
string | |
options.VOICE.monthly |
object | |
options.VOICE.monthly.enabled |
boolean | (required) |
options.VOICE.monthly.hour |
string | |
options.VOICE.monthly.date |
“first” | “last” | |
options.PUSH |
object | |
options.PUSH.defaultDeliveryOption |
“off” | “instant” | “hourly” | “daily” | “weekly” | “monthly” | (required) |
options.PUSH.off |
object | |
options.PUSH.off.enabled |
boolean | (required) |
options.PUSH.instant |
object | |
options.PUSH.instant.enabled |
boolean | (required) |
options.PUSH.hourly |
object | |
options.PUSH.hourly.enabled |
boolean | (required) |
options.PUSH.daily |
object | |
options.PUSH.daily.enabled |
boolean | (required) |
options.PUSH.daily.hour |
string | |
options.PUSH.weekly |
object | |
options.PUSH.weekly.enabled |
boolean | (required) |
options.PUSH.weekly.hour |
string | |
options.PUSH.weekly.day |
string | |
options.PUSH.monthly |
object | |
options.PUSH.monthly.enabled |
boolean | (required) |
options.PUSH.monthly.hour |
string | |
options.PUSH.monthly.date |
“first” | “last” | |
options.WEB_PUSH |
object | |
options.WEB_PUSH.defaultDeliveryOption |
“off” | “instant” | “hourly” | “daily” | “weekly” | “monthly” | (required) |
options.WEB_PUSH.off |
object | |
options.WEB_PUSH.off.enabled |
boolean | (required) |
options.WEB_PUSH.instant |
object | |
options.WEB_PUSH.instant.enabled |
boolean | (required) |
options.WEB_PUSH.hourly |
object | |
options.WEB_PUSH.hourly.enabled |
boolean | (required) |
options.WEB_PUSH.daily |
object | |
options.WEB_PUSH.daily.enabled |
boolean | (required) |
options.WEB_PUSH.daily.hour |
string | |
options.WEB_PUSH.weekly |
object | |
options.WEB_PUSH.weekly.enabled |
boolean | (required) |
options.WEB_PUSH.weekly.hour |
string | |
options.WEB_PUSH.weekly.day |
string | |
options.WEB_PUSH.monthly |
object | |
options.WEB_PUSH.monthly.enabled |
boolean | (required) |
options.WEB_PUSH.monthly.hour |
string | |
options.WEB_PUSH.monthly.date |
“first” | “last” | |
options.SLACK |
object | |
options.SLACK.defaultDeliveryOption |
“off” | “instant” | “hourly” | “daily” | “weekly” | “monthly” | (required) |
options.SLACK.off |
object | |
options.SLACK.off.enabled |
boolean | (required) |
options.SLACK.instant |
object | |
options.SLACK.instant.enabled |
boolean | (required) |
options.SLACK.hourly |
object | |
options.SLACK.hourly.enabled |
boolean | (required) |
options.SLACK.daily |
object | |
options.SLACK.daily.enabled |
boolean | (required) |
options.SLACK.daily.hour |
string | |
options.SLACK.weekly |
object | |
options.SLACK.weekly.enabled |
boolean | (required) |
options.SLACK.weekly.hour |
string | |
options.SLACK.weekly.day |
string | |
options.SLACK.monthly |
object | |
options.SLACK.monthly.enabled |
boolean | (required) |
options.SLACK.monthly.hour |
string | |
options.SLACK.monthly.date |
“first” | “last” |
Return Type
PingramModelNotification
Usage
accountGetUsage()
Get usage for the authenticated account
<?phprequire_once(__DIR__ . '/vendor/autoload.php');
use Pingram\Client;
$client = new Client('YOUR_API_KEY');
try { $result = $client->getAccount()->accountGetUsage(); print_r($result);} catch (Exception $e) { echo 'Exception when calling accountGetUsage: ', $e->getMessage(), PHP_EOL;}Parameters
This endpoint does not need any parameter.
Return Type
PingramModelGetUsageResponse
accountGetUsageHistory()
Get usage history
<?phprequire_once(__DIR__ . '/vendor/autoload.php');
use Pingram\Client;
$client = new Client('YOUR_API_KEY');
try { $result = $client->getAccount()->accountGetUsageHistory(); print_r($result);} catch (Exception $e) { echo 'Exception when calling accountGetUsageHistory: ', $e->getMessage(), PHP_EOL;}Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| start_date | string | Start date (YYYY-MM-DD) for the range | |
| end_date | string | End date (YYYY-MM-DD) for the range | |
| group_by | string | calendar (UTC months, default) or billing (account billing cycles) | [optional] |
Return Type
PingramModelGetUsageHistoryResponse
User
userGetAccountMetadata()
Get account metadata
<?phprequire_once(__DIR__ . '/vendor/autoload.php');
use Pingram\Client;
$client = new Client('YOUR_API_KEY');
try { $result = $client->getUser()->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
userGetUser()
Get a user by ID
<?phprequire_once(__DIR__ . '/vendor/autoload.php');
use Pingram\Client;
$client = new Client('YOUR_API_KEY');
try { $result = $client->getUser()->userGetUser(); print_r($result);} catch (Exception $e) { echo 'Exception when calling userGetUser: ', $e->getMessage(), PHP_EOL;}Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| user_id | string | User ID |
Return Type
PingramModelUser
userIdentify()
Create or update a user with the given ID
<?phprequire_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->getUser()->userIdentify($body); print_r($result);} catch (Exception $e) { echo 'Exception when calling userIdentify: ', $e->getMessage(), PHP_EOL;}Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| user_id | string | User ID | |
| post_user_request | \Pingram\Model\PostUserRequest | See Request Body Properties below |
Request Body Properties
| Name | Type | Description |
|---|---|---|
id |
string | Unique user identifier. Required. |
email |
string | User’s email address for email notifications. |
number |
string | User’s phone number for SMS/call notifications. |
pushTokens |
object[] | Mobile push tokens (FCM, APN) for push notifications. |
pushTokens[].type |
“FCM” | “APN” | (required) |
pushTokens[].token |
string | (required) |
pushTokens[].device |
object | (required) |
pushTokens[].device.app_id |
string | |
pushTokens[].device.ad_id |
string | |
pushTokens[].device.device_id |
string | (required) |
pushTokens[].device.platform |
string | |
pushTokens[].device.manufacturer |
string | |
pushTokens[].device.model |
string | |
pushTokens[].environment |
string | used by APN to differentiate between sandbox and production builds (sandbox/undefined or production) |
webPushTokens |
object[] | Web push subscription config from the browser. |
webPushTokens[].sub |
object | (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.endpoint |
string | (required) |
webPushTokens[].sub.keys |
object | (required) |
webPushTokens[].sub.keys.p256dh |
string | (required) |
webPushTokens[].sub.keys.auth |
string | (required) |
timezone |
string | User’s timezone (e.g. “America/New_York”) for scheduling. |
slackChannel |
string | The 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” |
slackToken |
object | |
slackToken.access_token |
string | |
slackToken.app_id |
string | |
slackToken.authed_user |
object | |
slackToken.authed_user.access_token |
string | |
slackToken.authed_user.expires_in |
number | |
slackToken.authed_user.id |
string | |
slackToken.authed_user.refresh_token |
string | |
slackToken.authed_user.scope |
string | |
slackToken.authed_user.token_type |
string | |
slackToken.bot_user_id |
string | |
slackToken.enterprise |
object | |
slackToken.enterprise.id |
string | |
slackToken.enterprise.name |
string | |
slackToken.error |
string | |
slackToken.expires_in |
number | |
slackToken.incoming_webhook |
object | |
slackToken.incoming_webhook.channel |
string | |
slackToken.incoming_webhook.channel_id |
string | |
slackToken.incoming_webhook.configuration_url |
string | |
slackToken.incoming_webhook.url |
string | |
slackToken.is_enterprise_install |
boolean | |
slackToken.needed |
string | |
slackToken.ok |
boolean | (required) |
slackToken.provided |
string | |
slackToken.refresh_token |
string | |
slackToken.scope |
string | |
slackToken.team |
object | |
slackToken.team.id |
string | |
slackToken.team.name |
string | |
slackToken.token_type |
string | |
slackToken.warning |
string | |
slackToken.response_metadata |
object | |
slackToken.response_metadata.warnings |
string[] | |
slackToken.response_metadata.next_cursor |
string | |
slackToken.response_metadata.scopes |
string[] | |
slackToken.response_metadata.acceptedScopes |
string[] | |
slackToken.response_metadata.retryAfter |
number | |
slackToken.response_metadata.messages |
string[] | |
properties |
Record<string, string | number | boolean> | Custom key-value properties synced by the developer, used for audience segmentation (e.g. broadcast filters on user.properties.plan). Incremental identify calls shallow-merge keys (unset keys are preserved). Limits: max 25 keys, key length <= 64, string values <= 256 chars, serialized size <= 1KB. |
Return Type
PingramModelUser
Users
usersDeleteUser()
Delete a user
<?phprequire_once(__DIR__ . '/vendor/autoload.php');
use Pingram\Client;
$client = new Client('YOUR_API_KEY');
try { $result = $client->getUsers()->usersDeleteUser(); print_r($result);} catch (Exception $e) { echo 'Exception when calling usersDeleteUser: ', $e->getMessage(), PHP_EOL;}Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| user_id | string | User ID | |
| env_id | string | Environment ID (required when using JWT auth) | [optional] |
Return Type
PingramModelDeleteUserResponse
usersListUsers()
Get all users for an environment with pagination support
<?phprequire_once(__DIR__ . '/vendor/autoload.php');
use Pingram\Client;
$client = new Client('YOUR_API_KEY');
try { $result = $client->getUsers()->usersListUsers(); print_r($result);} catch (Exception $e) { echo 'Exception when calling usersListUsers: ', $e->getMessage(), PHP_EOL;}Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| limit | float | Maximum number of users to return (default | |
| next_token | string | Pagination token for next page | |
| env_id | string | Environment ID (required when using JWT auth) | [optional] |
Return Type
PingramModelGetUsersResponse
usersRemoveUserFromSuppression()
Remove user suppression status for a specific channel
<?phprequire_once(__DIR__ . '/vendor/autoload.php');
use Pingram\Client;
$client = new Client('YOUR_API_KEY');
try { $result = $client->getUsers()->usersRemoveUserFromSuppression(); print_r($result);} catch (Exception $e) { echo 'Exception when calling usersRemoveUserFromSuppression: ', $e->getMessage(), PHP_EOL;}Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| user_id | string | User ID | |
| channel | string | Channel type (EMAIL) | |
| env_id | string | Environment ID (required when using JWT auth) | [optional] |
Return Type
PingramModelUserSuppressionDeleteResponse
Voice
voiceArmInboundClaim()
Arm the shared test number
<?phprequire_once(__DIR__ . '/vendor/autoload.php');
use Pingram\Client;
$client = new Client('YOUR_API_KEY');$body = new \Pingram\Model\ArmVoiceInboundClaimRequest(); // configure as needed
try { $result = $client->getVoice()->voiceArmInboundClaim($body); print_r($result);} catch (Exception $e) { echo 'Exception when calling voiceArmInboundClaim: ', $e->getMessage(), PHP_EOL;}Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| arm_voice_inbound_claim_request | \Pingram\Model\ArmVoiceInboundClaimRequest | See Request Body Properties below |
Request Body Properties
| Name | Type | Description |
|---|---|---|
inbound |
object | object | object | object | object | object | (required) |
inbound.type |
“script” | (required) |
inbound.steps |
object[] | (required) |
inbound.steps[].verb |
“Say” | (required) |
inbound.steps[].text |
string | (required) |
inbound.stream |
object | What the call socket carries. Omitted means the socket is open and carries neither. |
inbound.stream.audio |
boolean | Live call audio. Omitted means off. |
inbound.stream.transcript |
“single” | “multichannel” | single mixes every channel into one stream. multichannel transcribes each channel. Omitted means off. |
inbound.privacy |
object | Omitted record and transcript mean both are off. |
inbound.privacy.record |
boolean | |
inbound.privacy.transcript |
“single” | “multichannel” | single mixes every channel into one stream. multichannel transcribes each channel. Omitted means off. |
Return Type
PingramModelArmVoiceInboundClaimResponse
voiceCall()
Place an outbound call. The config is not saved
<?phprequire_once(__DIR__ . '/vendor/autoload.php');
use Pingram\Client;
$client = new Client('YOUR_API_KEY');$body = new \Pingram\Model\VoiceCallRequest(); // configure as needed
try { $result = $client->getVoice()->voiceCall($body); print_r($result);} catch (Exception $e) { echo 'Exception when calling voiceCall: ', $e->getMessage(), PHP_EOL;}Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| voice_call_request | \Pingram\Model\VoiceCallRequest | See Request Body Properties below |
Request Body Properties
| Name | Type | Description |
|---|---|---|
to |
string | (required) E.164 number to dial. |
config |
object | object | object | object | (required) |
config.type |
“script” | (required) |
config.steps |
object[] | (required) |
config.steps[].verb |
“Say” | (required) |
config.steps[].text |
string | (required) |
config.voicemailAction |
“hangup” | “message” | “continue” | What to do when an answering machine picks up. hangup ends the call, message plays voicemailMessage, continue keeps talking. Default: continue. |
config.voicemailMessage |
string | |
config.stream |
object | What the call socket carries. Omitted means the socket is open and carries neither. |
config.stream.audio |
boolean | Live call audio. Omitted means off. |
config.stream.transcript |
“single” | “multichannel” | single mixes every channel into one stream. multichannel transcribes each channel. Omitted means off. |
config.privacy |
object | Omitted record and transcript mean both are off. |
config.privacy.record |
boolean | |
config.privacy.transcript |
“single” | “multichannel” | single mixes every channel into one stream. multichannel transcribes each channel. Omitted means off. |
variables |
Record<string, string> | Optional per-call {{variable}} overrides. |
Return Type
PingramModelVoiceCallResponse
voiceClearNumberInbound()
Remove inbound call behavior from a number this account owns
<?phprequire_once(__DIR__ . '/vendor/autoload.php');
use Pingram\Client;
$client = new Client('YOUR_API_KEY');
try { $result = $client->getVoice()->voiceClearNumberInbound(); print_r($result);} catch (Exception $e) { echo 'Exception when calling voiceClearNumberInbound: ', $e->getMessage(), PHP_EOL;}Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| phone_number | string | E.164 phone number |
Return Type
PingramModelMessageResponse
voiceCreateBrowserCall()
Place a browser playground call
<?phprequire_once(__DIR__ . '/vendor/autoload.php');
use Pingram\Client;
$client = new Client('YOUR_API_KEY');$body = new \Pingram\Model\VoiceBrowserCallRequest(); // configure as needed
try { $result = $client->getVoice()->voiceCreateBrowserCall($body); print_r($result);} catch (Exception $e) { echo 'Exception when calling voiceCreateBrowserCall: ', $e->getMessage(), PHP_EOL;}Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| voice_browser_call_request | \Pingram\Model\VoiceBrowserCallRequest | See Request Body Properties below |
Request Body Properties
| Name | Type | Description |
|---|---|---|
config |
object | object | object | object | object | object | object | object | object | object | (required) Agent behavior for this browser call. Script calls use POST /voice/call. |
variables |
Record<string, string> | Optional per-call {{variable}} overrides for browser playground. |
direction |
“inbound” | “outbound” | inbound speaks the greeting. outbound speaks the opener. Omitted means outbound. |
Return Type
PingramModelVoiceBrowserCallResponse
voiceGetCall()
Get a call recording and transcript
<?phprequire_once(__DIR__ . '/vendor/autoload.php');
use Pingram\Client;
$client = new Client('YOUR_API_KEY');
try { $result = $client->getVoice()->voiceGetCall(); print_r($result);} catch (Exception $e) { echo 'Exception when calling voiceGetCall: ', $e->getMessage(), PHP_EOL;}Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| tracking_id | string | Call tracking id |
Return Type
PingramModelGetVoiceCallResponse
voiceListCalls()
List recent calls newest-first (30-day retention)
<?phprequire_once(__DIR__ . '/vendor/autoload.php');
use Pingram\Client;
$client = new Client('YOUR_API_KEY');
try { $result = $client->getVoice()->voiceListCalls(); print_r($result);} catch (Exception $e) { echo 'Exception when calling voiceListCalls: ', $e->getMessage(), PHP_EOL;}Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| limit | float | Page size (default 25, max 100) | [optional] |
| cursor | string | Pagination cursor from a previous response | [optional] |
Return Type
PingramModelListVoiceCallsResponse
voicePutNumberInbound()
Store inbound call behavior on a number this account owns
<?phprequire_once(__DIR__ . '/vendor/autoload.php');
use Pingram\Client;
$client = new Client('YOUR_API_KEY');$body = new \Pingram\Model\InboundConfig(); // configure as needed
try { $result = $client->getVoice()->voicePutNumberInbound($body); print_r($result);} catch (Exception $e) { echo 'Exception when calling voicePutNumberInbound: ', $e->getMessage(), PHP_EOL;}Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| phone_number | string | E.164 phone number | |
| inbound_config | \Pingram\Model\InboundConfig | See Request Body Properties below |
Return Type
PingramModelMessageResponse
voiceTransfer()
Move a live phone call to another number
<?phprequire_once(__DIR__ . '/vendor/autoload.php');
use Pingram\Client;
$client = new Client('YOUR_API_KEY');$body = new \Pingram\Model\TransferCallRequest(); // configure as needed
try { $result = $client->getVoice()->voiceTransfer($body); print_r($result);} catch (Exception $e) { echo 'Exception when calling voiceTransfer: ', $e->getMessage(), PHP_EOL;}Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| tracking_id | string | Call tracking id | |
| transfer_call_request | \Pingram\Model\TransferCallRequest | See Request Body Properties below |
Request Body Properties
| Name | Type | Description |
|---|---|---|
to |
string | (required) E.164 number to move the caller to. |
holdSay |
string | Spoken once to the caller while they wait. If holdAudio is also set, this sentence plays first and then the audio. |
holdAudio |
string | builtin:soft-piano, builtin:calm, builtin:bright, or an HTTPS MP3 or WAV. Loops until the call connects. Omit it and the caller hears ringing. |
receiverSay |
string | Spoken to the person who answers, before the caller is connected. |
Return Type
PingramModelMessageResponse