> Source: https://www.pingram.io/docs/api-reference/operations/send/

# Send a notification (email, SMS, etc.) to one user

POST

/send

Select code sampleFetchcURL

```js
const url = 'https://api.pingram.io/send';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"notificationId":"example","user":{"id":"example","email":"example","number":"example","pushTokens":[{"type":"FCM","token":"example","device":{"app_id":"example","ad_id":"example","device_id":"example","platform":"example","manufacturer":"example","model":"example"},"environment":"undefined"}],"webPushTokens":[{"sub":{"endpoint":"example","keys":{"p256dh":"example","auth":"example"}}}],"timezone":"example","slackChannel":"example","slackToken":{"access_token":"example","app_id":"example","authed_user":{"access_token":"example","expires_in":1,"id":"example","refresh_token":"example","scope":"example","token_type":"example"},"bot_user_id":"example","enterprise":{"id":"example","name":"example"},"error":"example","expires_in":1,"incoming_webhook":{"channel":"example","channel_id":"example","configuration_url":"example","url":"example"},"is_enterprise_install":true,"needed":"example","ok":true,"provided":"example","refresh_token":"example","scope":"example","team":{"id":"example","name":"example"},"token_type":"example","warning":"example","response_metadata":{"warnings":["example"],"next_cursor":"example","scopes":["example"],"acceptedScopes":["example"],"retryAfter":1,"messages":["example"]}},"properties":{"additionalProperty":"example"},"lastSeenTime":"example","updatedAt":"example","createdAt":"example","emailSuppressionStatus":{"reason":"Bounce","details":{}}},"mergeTags":{},"type":"example","to":{"id":"example","email":"example","number":"example","pushTokens":[{"type":"FCM","token":"example","device":{"app_id":"example","ad_id":"example","device_id":"example","platform":"example","manufacturer":"example","model":"example"},"environment":"undefined"}],"webPushTokens":[{"sub":{"endpoint":"example","keys":{"p256dh":"example","auth":"example"}}}],"timezone":"example","slackChannel":"example","slackToken":{"access_token":"example","app_id":"example","authed_user":{"access_token":"example","expires_in":1,"id":"example","refresh_token":"example","scope":"example","token_type":"example"},"bot_user_id":"example","enterprise":{"id":"example","name":"example"},"error":"example","expires_in":1,"incoming_webhook":{"channel":"example","channel_id":"example","configuration_url":"example","url":"example"},"is_enterprise_install":true,"needed":"example","ok":true,"provided":"example","refresh_token":"example","scope":"example","team":{"id":"example","name":"example"},"token_type":"example","warning":"example","response_metadata":{"warnings":["example"],"next_cursor":"example","scopes":["example"],"acceptedScopes":["example"],"retryAfter":1,"messages":["example"]}},"properties":{"additionalProperty":"example"},"lastSeenTime":"example","updatedAt":"example","createdAt":"example","emailSuppressionStatus":{"reason":"Bounce","details":{}}},"forceChannels":["EMAIL"],"parameters":{"additionalProperty":"example"},"templateId":"example","subNotificationId":"example","options":{"email":{"replyToAddresses":["example"],"ccAddresses":["example"],"bccAddresses":["example"],"fromAddress":"example","fromName":"example","openTracking":true,"clickTracking":true,"attachments":[{"filename":"example","url":"example"}]},"apn":{"expiry":1,"priority":1,"collapseId":"example","threadId":"example","badge":1,"sound":"example","contentAvailable":true},"fcm":{"android":{"collapseKey":"example","priority":"high","ttl":1,"restrictedPackageName":"example"}},"push":{"customData":{"additionalProperty":"example"}}},"schedule":"example","email":{"subject":"example","html":"example","previewText":"example","senderName":"example","senderEmail":"example"},"inapp":{"title":"example","url":"example","image":"example"},"sms":{"message":"example","mediaUrls":["example"],"autoReply":{"message":"example"},"from":"example"},"call":{"message":"example"},"web_push":{"title":"example","message":"example","icon":"example","url":"example"},"mobile_push":{"title":"example","message":"example"},"slack":{"text":"example","blocks":[{"additionalProperty":"example"}],"username":"example","icon":"example","thread_ts":"example","reply_broadcast":true,"parse":"full","link_names":true,"mrkdwn":true,"unfurl_links":true,"unfurl_media":true,"metadata":{"entities":[{"entity_type":"example","entity_payload":{"additionalProperty":"example"},"external_ref":{"id":"example","type":"example"},"url":"example","app_unfurl_url":"example"}],"event_type":"example","event_payload":{"additionalProperty":"example"}}}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```sh
curl --request POST \
  --url https://api.pingram.io/send \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{ "notificationId": "example", "user": { "id": "example", "email": "example", "number": "example", "pushTokens": [ { "type": "FCM", "token": "example", "device": { "app_id": "example", "ad_id": "example", "device_id": "example", "platform": "example", "manufacturer": "example", "model": "example" }, "environment": "undefined" } ], "webPushTokens": [ { "sub": { "endpoint": "example", "keys": { "p256dh": "example", "auth": "example" } } } ], "timezone": "example", "slackChannel": "example", "slackToken": { "access_token": "example", "app_id": "example", "authed_user": { "access_token": "example", "expires_in": 1, "id": "example", "refresh_token": "example", "scope": "example", "token_type": "example" }, "bot_user_id": "example", "enterprise": { "id": "example", "name": "example" }, "error": "example", "expires_in": 1, "incoming_webhook": { "channel": "example", "channel_id": "example", "configuration_url": "example", "url": "example" }, "is_enterprise_install": true, "needed": "example", "ok": true, "provided": "example", "refresh_token": "example", "scope": "example", "team": { "id": "example", "name": "example" }, "token_type": "example", "warning": "example", "response_metadata": { "warnings": [ "example" ], "next_cursor": "example", "scopes": [ "example" ], "acceptedScopes": [ "example" ], "retryAfter": 1, "messages": [ "example" ] } }, "properties": { "additionalProperty": "example" }, "lastSeenTime": "example", "updatedAt": "example", "createdAt": "example", "emailSuppressionStatus": { "reason": "Bounce", "details": {} } }, "mergeTags": {}, "type": "example", "to": { "id": "example", "email": "example", "number": "example", "pushTokens": [ { "type": "FCM", "token": "example", "device": { "app_id": "example", "ad_id": "example", "device_id": "example", "platform": "example", "manufacturer": "example", "model": "example" }, "environment": "undefined" } ], "webPushTokens": [ { "sub": { "endpoint": "example", "keys": { "p256dh": "example", "auth": "example" } } } ], "timezone": "example", "slackChannel": "example", "slackToken": { "access_token": "example", "app_id": "example", "authed_user": { "access_token": "example", "expires_in": 1, "id": "example", "refresh_token": "example", "scope": "example", "token_type": "example" }, "bot_user_id": "example", "enterprise": { "id": "example", "name": "example" }, "error": "example", "expires_in": 1, "incoming_webhook": { "channel": "example", "channel_id": "example", "configuration_url": "example", "url": "example" }, "is_enterprise_install": true, "needed": "example", "ok": true, "provided": "example", "refresh_token": "example", "scope": "example", "team": { "id": "example", "name": "example" }, "token_type": "example", "warning": "example", "response_metadata": { "warnings": [ "example" ], "next_cursor": "example", "scopes": [ "example" ], "acceptedScopes": [ "example" ], "retryAfter": 1, "messages": [ "example" ] } }, "properties": { "additionalProperty": "example" }, "lastSeenTime": "example", "updatedAt": "example", "createdAt": "example", "emailSuppressionStatus": { "reason": "Bounce", "details": {} } }, "forceChannels": [ "EMAIL" ], "parameters": { "additionalProperty": "example" }, "templateId": "example", "subNotificationId": "example", "options": { "email": { "replyToAddresses": [ "example" ], "ccAddresses": [ "example" ], "bccAddresses": [ "example" ], "fromAddress": "example", "fromName": "example", "openTracking": true, "clickTracking": true, "attachments": [ { "filename": "example", "url": "example" } ] }, "apn": { "expiry": 1, "priority": 1, "collapseId": "example", "threadId": "example", "badge": 1, "sound": "example", "contentAvailable": true }, "fcm": { "android": { "collapseKey": "example", "priority": "high", "ttl": 1, "restrictedPackageName": "example" } }, "push": { "customData": { "additionalProperty": "example" } } }, "schedule": "example", "email": { "subject": "example", "html": "example", "previewText": "example", "senderName": "example", "senderEmail": "example" }, "inapp": { "title": "example", "url": "example", "image": "example" }, "sms": { "message": "example", "mediaUrls": [ "example" ], "autoReply": { "message": "example" }, "from": "example" }, "call": { "message": "example" }, "web_push": { "title": "example", "message": "example", "icon": "example", "url": "example" }, "mobile_push": { "title": "example", "message": "example" }, "slack": { "text": "example", "blocks": [ { "additionalProperty": "example" } ], "username": "example", "icon": "example", "thread_ts": "example", "reply_broadcast": true, "parse": "full", "link_names": true, "mrkdwn": true, "unfurl_links": true, "unfurl_media": true, "metadata": { "entities": [ { "entity_type": "example", "entity_payload": { "additionalProperty": "example" }, "external_ref": { "id": "example", "type": "example" }, "url": "example", "app_unfurl_url": "example" } ], "event_type": "example", "event_payload": { "additionalProperty": "example" } } } }'
```

-   Production

Send a notification (email, SMS, etc.) to one user. Requires a notification `type` which categorizes this messages for future reporting, and channel-specific payloads such as `email` or `sms`. Recipient is specified with the `to` parameter. Returns a `trackingId` for error or delivery lookup through our Logs.

## Authorizations

-   **[apiKey](/docs/api-reference/#apikey)**
-   **[clientCredentials](/docs/api-reference/#clientcredentials)**
-   **[endUser](/docs/api-reference/#enduser)**
-   **[endUserHashed](/docs/api-reference/#enduserhashed)**

## Request Bodyrequired

Media type application/json

object

**notificationId**

@deprecated Use type instead

string

**user**

object

**id**

required

Unique user identifier. Required.

string

**email**

User’s email address for email notifications.

string

**number**

User’s phone number for SMS/call notifications.

string

**pushTokens**

Mobile push tokens (FCM, APN) for push notifications.

Array<object>

object

**type**

required

string

Allowed values: FCM APN

**token**

required

string

**device**

required

object

**app\_id**

string

**ad\_id**

string

**device\_id**

required

string

**platform**

string

**manufacturer**

string

**model**

string

**environment**

Used by APN to differentiate between sandbox and production builds (sandbox/undefined or production)

string

default: undefined

**webPushTokens**

Web push subscription config from the browser.

Array<object>

object

**sub**

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.

object

**endpoint**

required

string

**keys**

required

object

**p256dh**

required

string

**auth**

required

string

**timezone**

User’s timezone (e.g. “America/New\_York”) for scheduling.

string

**slackChannel**

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”

string

**slackToken**

object

**access\_token**

string

**app\_id**

string

**authed\_user**

object

**access\_token**

string

**expires\_in**

number

**id**

string

**refresh\_token**

string

**scope**

string

**token\_type**

string

**bot\_user\_id**

string

**enterprise**

object

**id**

string

**name**

string

**error**

string

**expires\_in**

number

**incoming\_webhook**

object

**channel**

string

**channel\_id**

string

**configuration\_url**

string

**url**

string

**is\_enterprise\_install**

boolean

**needed**

string

**ok**

required

boolean

**provided**

string

**refresh\_token**

string

**scope**

string

**team**

object

**id**

string

**name**

string

**token\_type**

string

**warning**

string

**response\_metadata**

object

**warnings**

Array<string>

**next\_cursor**

string

**scopes**

Array<string>

**acceptedScopes**

Array<string>

**retryAfter**

number

**messages**

Array<string>

**properties**

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.

object

***key***

additional properties

Any of:

-   [string](#tab-panel-188)
-   [number](#tab-panel-189)
-   [boolean](#tab-panel-190)

string

number

boolean

**lastSeenTime**

Last activity timestamp. Updated automatically. Read-only.

string

**updatedAt**

Last update timestamp. Read-only.

string

**createdAt**

Creation timestamp. Read-only.

string

**emailSuppressionStatus**

Bounce or complaint status if email was suppressed. Read-only.

object

**reason**

required

string

Allowed values: Bounce Complaint

**details**

required

object

**mergeTags**

object

**type**

ID of the notification type (e.g. “welcome\_email”). Creates a new notification if it does not exist.

string

**to**

Recipient user. Provide `id`, `email`, or `number` to identify the user.

object

**id**

Unique user identifier. Required.

string

**email**

User’s email address for email notifications.

string

**number**

User’s phone number for SMS/call notifications.

string

**pushTokens**

Mobile push tokens (FCM, APN) for push notifications.

Array<object>

object

**type**

required

string

Allowed values: FCM APN

**token**

required

string

**device**

required

object

**app\_id**

string

**ad\_id**

string

**device\_id**

required

string

**platform**

string

**manufacturer**

string

**model**

string

**environment**

Used by APN to differentiate between sandbox and production builds (sandbox/undefined or production)

string

default: undefined

**webPushTokens**

Web push subscription config from the browser.

Array<object>

object

**sub**

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.

object

**endpoint**

required

string

**keys**

required

object

**p256dh**

required

string

**auth**

required

string

**timezone**

User’s timezone (e.g. “America/New\_York”) for scheduling.

string

**slackChannel**

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”

string

**slackToken**

object

**access\_token**

string

**app\_id**

string

**authed\_user**

object

**access\_token**

string

**expires\_in**

number

**id**

string

**refresh\_token**

string

**scope**

string

**token\_type**

string

**bot\_user\_id**

string

**enterprise**

object

**id**

string

**name**

string

**error**

string

**expires\_in**

number

**incoming\_webhook**

object

**channel**

string

**channel\_id**

string

**configuration\_url**

string

**url**

string

**is\_enterprise\_install**

boolean

**needed**

string

**ok**

required

boolean

**provided**

string

**refresh\_token**

string

**scope**

string

**team**

object

**id**

string

**name**

string

**token\_type**

string

**warning**

string

**response\_metadata**

object

**warnings**

Array<string>

**next\_cursor**

string

**scopes**

Array<string>

**acceptedScopes**

Array<string>

**retryAfter**

number

**messages**

Array<string>

**properties**

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.

object

***key***

additional properties

Any of:

-   [string](#tab-panel-191)
-   [number](#tab-panel-192)
-   [boolean](#tab-panel-193)

string

number

boolean

**lastSeenTime**

Last activity timestamp. Updated automatically. Read-only.

string

**updatedAt**

Last update timestamp. Read-only.

string

**createdAt**

Creation timestamp. Read-only.

string

**emailSuppressionStatus**

Bounce or complaint status if email was suppressed. Read-only.

object

**reason**

required

string

Allowed values: Bounce Complaint

**details**

required

object

**forceChannels**

Override which channels to send to (e.g. \[“EMAIL”, “SMS”\]). Bypasses notification channel config.

Array<string>

Allowed values: EMAIL INAPP\_WEB SMS CALL VOICE PUSH WEB\_PUSH SLACK

**parameters**

Key-value pairs for template merge tags. Replaces placeholders like {{firstName}} in templates.

object

***key***

additional properties

**templateId**

Specific template ID to use. If omitted, uses the default template for each channel.

string

**subNotificationId**

Sub-notification identifier (e.g. for grouping related notifications).

string

**options**

Per-channel overrides for send options (email, APN, FCM).

object

**email**

Email-specific overrides.

object

**replyToAddresses**

Reply-to addresses for the email.

Array<string>

**ccAddresses**

CC recipients.

Array<string>

**bccAddresses**

BCC recipients.

Array<string>

**fromAddress**

Override sender email address.

string

**fromName**

Override sender display name.

string

**openTracking**

When false, this send does not record opens and no open pixel is added. Delivery, bounce, and complaint events are unchanged. Defaults to true.

boolean

**clickTracking**

When false, links are left as written and clicks are not recorded. Delivery, bounce, and complaint events are unchanged. Defaults to true.

boolean

**attachments**

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.

Array

Any of:

-   [object](#tab-panel-194)
-   [object](#tab-panel-195)

object

**filename**

required

string

**url**

required

string

object

**filename**

required

string

**content**

required

string

**contentType**

string

**apn**

Apple Push Notification (APN) overrides.

object

**expiry**

Seconds until the notification expires.

number

**priority**

Delivery priority (10 = immediate, 5 = power-saving).

number

**collapseId**

Group notifications with the same ID (replaces previous).

string

**threadId**

Thread identifier for grouping notifications.

string

**badge**

Badge count on app icon.

number

**sound**

Sound file name.

string

**contentAvailable**

Silent background notification (no alert).

boolean

**fcm**

Firebase Cloud Messaging (FCM) overrides.

object

**android**

Android-specific FCM options.

object

**collapseKey**

Collapse key for grouping messages.

string

**priority**

Delivery priority.

string

Allowed values: high normal

**ttl**

Time to live in seconds.

number

**restrictedPackageName**

Restrict delivery to a specific package.

string

**push**

Cross-platform mobile push options (applied to both APN and FCM).

object

**customData**

Up to 3 custom string key-value pairs for deep linking. Included in both APN and FCM payloads.

object

***key***

additional properties

string

**schedule**

string

**email**

Inline email content (subject, html). Use when not using templates.

object

**subject**

required

Email subject line.

string

**html**

required

HTML body content.

string

**previewText**

Preview/snippet text shown in inbox.

string

**senderName**

Display name of sender.

string

**senderEmail**

Sender email address.

string

**inapp**

Inline in-app content (title, url, image).

object

**title**

required

Notification title.

string

**url**

URL to open when clicked.

string

**image**

Image URL.

string

**sms**

Inline SMS content (message, from, mediaUrls).

object

**message**

SMS/MMS body text.

string

**mediaUrls**

Public HTTPS URLs of media to attach (MMS). Carriers fetch these via GET. Total size limits apply per provider.

Array<string>

**autoReply**

@deprecated Ignored. SMS auto-reply is no longer available. Replacing with SMS\_INBOUND: handle that webhook and send your own reply.

object

**message**

required

@deprecated Ignored. SMS auto-reply is no longer available. Replacing with SMS\_INBOUND: handle that webhook and send your own reply.

string

**from**

Override the sender phone number. Must be a verified number on your account.

string

**call**

Inline call content (message).

object

**message**

required

Text to speak (TTS).

string

**web\_push**

Inline web push content (title, message, icon, url).

object

**title**

required

Notification title.

string

**message**

required

Body text.

string

**icon**

Icon URL.

string

**url**

URL to open when clicked.

string

**mobile\_push**

Inline mobile push content (title, message).

object

**title**

required

Notification title.

string

**message**

required

Body text.

string

**slack**

Inline Slack content (text, blocks, etc.).

object

**text**

required

Fallback plain text (required when using blocks).

string

**blocks**

Slack Block Kit blocks.

Array<object>

object

***key***

additional properties

**username**

Override bot username.

string

**icon**

Icon: emoji (e.g. “:smile:”) or URL. Default: bot’s icon.

string

**thread\_ts**

Parent message `ts` to post in a thread.

string

**reply\_broadcast**

When true with thread\_ts, broadcasts reply to channel. Default: false.

boolean

**parse**

URL parsing: “full” (clickable links) or “none”. Default: “none”.

string

Allowed values: full none

**link\_names**

Convert channel and username refs to Slack links. Default: false.

boolean

**mrkdwn**

Enable Slack markup ( *bold*, *italic*, `code`). Default: true.

boolean

**unfurl\_links**

Unfurl link previews. Default: true.

boolean

**unfurl\_media**

Unfurl media previews. Default: true.

boolean

**metadata**

Slack message metadata with optional work object entities. Combines standard Slack message metadata fields with an array of entity objects.

object

**entities**

An array of work object entities.

Array<object>

object

**entity\_type**

required

Entity type (e.g., ‘slack#/entities/task’, ‘slack#/entities/file’).

string

**entity\_payload**

required

Schema for the given entity type.

object

***key***

additional properties

**external\_ref**

required

Reference used to identify an entity within the developer’s system.

object

**id**

required

string

**type**

string

**url**

required

URL used to identify an entity within the developer’s system.

string

**app\_unfurl\_url**

The exact URL posted in the source message. Required in metadata passed to `chat.unfurl`.

string

**event\_type**

A human readable alphanumeric string representing your application’s metadata event.

string

**event\_payload**

A free-form object containing whatever data your application wishes to attach to messages.

object

***key***

additional properties

## Responses

### 200

Successful response

Media type application/json

object

**trackingId**

required

string

**messages**

required

Array<string>

##### Examplegenerated

```json
{
  "trackingId": "example",
  "messages": [
    "example"
  ]
}
```

### 400

Bad Request - validation errors, invalid input

Media type application/json

Standard error response for API errors.

object

**trackingId**

required

Unique tracking ID for the request.

string

**error**

required

Structured error details for API error responses.

object

**code**

required

Machine-readable error code.

string

**message**

required

Human-readable error message.

string

**fix**

Actionable hint for fixing the error.

string

##### Examplegenerated

```json
{
  "trackingId": "example",
  "error": {
    "code": "example",
    "message": "example",
    "fix": "example"
  }
}
```

### 401

Unauthorized

### 402

Payment Required - usage limits exceeded

Media type application/json

Standard error response for API errors.

object

**trackingId**

required

Unique tracking ID for the request.

string

**error**

required

Structured error details for API error responses.

object

**code**

required

Machine-readable error code.

string

**message**

required

Human-readable error message.

string

**fix**

Actionable hint for fixing the error.

string

##### Examplegenerated

```json
{
  "trackingId": "example",
  "error": {
    "code": "example",
    "message": "example",
    "fix": "example"
  }
}
```

### 500

Internal Server Error

### 502

Bad Gateway - provider error

Media type application/json

Standard error response for API errors.

object

**trackingId**

required

Unique tracking ID for the request.

string

**error**

required

Structured error details for API error responses.

object

**code**

required

Machine-readable error code.

string

**message**

required

Human-readable error message.

string

**fix**

Actionable hint for fixing the error.

string

##### Examplegenerated

```json
{
  "trackingId": "example",
  "error": {
    "code": "example",
    "message": "example",
    "fix": "example"
  }
}
```

[Previous  
webhooks\_deleteWebhook](/docs/api-reference/operations/webhooks_deletewebhook/)
