---
title: "Send notifications"
method: POST
path: "/v1/{appId}/conversations/{conversationId}/notifications"
tags: ["Notifications"]
---

# Send notifications

`POST /v1/{appId}/conversations/{conversationId}/notifications`

## Request

- Base URL: `https://api.talkjs.com`
- URL: `https://api.talkjs.com/v1/{appId}/conversations/{conversationId}/notifications`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer
- TypeScript: <https://skmtc.dev/talkjs/apis/talkjs-api/docs/v1/:appId/conversations/:conversationId/notifications/post.ts> (a function with typed inputs; its response is checked against the schema)

Sends additional notifications to a user for unanswered messages in a specific conversation.

If a user has [notifications](https://talkjs.com/docs/Features/Notifications/) enabled, TalkJS already automatically sends that user notifications as soon as the [conditions for notifying a user](https://talkjs.com/docs/Features/Notifications/#when-are-notifications-sent) are met. You can use this endpoint to send additional notifications for any unanswered messages in a conversation.

An _unanswered message_ is any message that another user sends to a conversation, after the user's own latest message. 

For example, in the following conversation between a buyer and a seller, the seller hasn't answered the buyer's final message:

> **Buyer:** Hey, I'd like to order this chair  
> **Seller:** Sure, it's still available!  
> [Seller goes offline]  
> **Buyer:** Could you tell me how wide it is?

When you trigger a notification, all participants in a conversation, apart from the one who sent the latest message, get notified if they have notifications enabled.

If a user has multiple unanswered messages, they receive only one notification that bundles information about all the unanswered messages.

### Notification types

You can send an [email notification](https://talkjs.com/docs/Features/Notifications/Email_Notifications/), an [SMS notification](https://talkjs.com/docs/Features/Notifications/SMS_Notifications/), or notifications of both types at the same time. 

### Webhooks

To receive information about the status of the notifications, you can use webhooks to listen for `notification.triggered` and `notification.sent` events.

Read more on [webhooks](https://talkjs.com/docs/Reference/Webhooks/).

### Use notifications carefully

Beware of sending notifications too frequently, as your users may get overloaded. 

Sending notifications doesn't distinguish between the situation where a conversation has ended (for example, when the last message is "Ok, bye!") and one that still needs an answer (for example, when the last message is "Can you help?"). 

If you only want to send additional notifications when certain conditions are met, you can implement your own filter before programmatically triggering notifications.

## Path parameters

- `appId` string, required
- `conversationId` string, required

## Request body

- Notifications: Details of the notification to send.
  - `channels` string[]: The channels in which to trigger notifications. Provide at least one channel in which to trigger notifications.
  - `recipients` string[]: An array with user ID of the participants who should receive the notifications. Omit this field to trigger notifications for all participants who have unanswered messages.
  - `smsSettings` object: Settings for SMS-notifications
    - `smsTemplate` string: Template for an SMS-notification
  - `emailSettings` object: Settings for email notifications
    - `footer` string: Footer message in an email notification
    - `header` string: Header of an email notification
    - `subject` string: Subject of an email notification
    - `inboxUrl` string: URL to an inbox where the participant can find your chat
    - `senderName` string: Name of the sender of the message that the user receives a notification about
    - `inboxLinkText` string: Text to include in the link back to the chat
    - `replySeparator` string: Line that separates the notification received from the space in which the user can reply to the email.
    - `unsubscribeText` string: Text for a link that allows users to unsubscribe from all email notifications.

## Response `200`

Empty response

- object: Empty response

## Other responses

- `400`: Bad request
- `401`: Authorization information is missing or invalid.
- `404`: Resource not found
- `415`: Unsupported media type
- `429`: Too many requests
- `500`: Internal server error

---

[API](https://skmtc.dev/talkjs/apis/talkjs-api.md) - [All operations](https://skmtc.dev/talkjs/apis/talkjs-api/llms.txt) - [OpenAPI document](https://skmtc.dev/talkjs/apis/talkjs-api/revisions/9d4acc9cfa43?raw)
