Send chat in a meeting session
Send chat as the bot in an active meeting. Returns 202 with data.accepted=true. Google Meet and Teams confirm sending before success; 502 chat_not_sent means not sent, while chat_delivery_unknown means delivery may have occurred. Inspect chat and chat.sent events before retrying an uncertain send. Each request is a new message and is not idempotent. Google Meet and Teams allow at most 1000 chat requests per session, including an entrance message; exceeding this returns 409 invalid_state.
POST
/
meeting_sessions
/
{id}
/
actions
/
send_chat
JavaScript
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const response = await client.meetingSessions.actions.sendChat('id', {
text: 'text',
});
console.log(response.data);import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
response = client.meeting_sessions.actions.send_chat(
id="id",
text="text",
)
print(response.data)
package main
import (
"context"
"fmt"
"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)
func main() {
client := telnyx.NewClient(
option.WithAPIKey("My API Key"),
)
response, err := client.MeetingSessions.Actions.SendChat(
context.TODO(),
"id",
telnyx.MeetingSessionActionSendChatParams{
Text: "text",
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.Data)
}
package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.meetingSessions.actions.ActionSendChatParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
ActionSendChatParams params = ActionSendChatParams.builder()
.text("text")
.build();
var response = client.meetingSessions().actions().sendChat("id", params);
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
response = telnyx.meeting_sessions.actions.send_chat("id", text: "text")
puts(response)<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Telnyx\Client;
use Telnyx\Core\Exceptions\APIException;
$client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API Key');
try {
$response = $client->meetingSessions->actions->sendChat(
'id',
text: 'text',
);
var_dump($response);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx meeting-sessions:actions send-chat \
--api-key 'My API Key' \
--id id \
--text textcurl --request POST \
--url https://api.telnyx.com/v2/meeting_sessions/{id}/actions/send_chat \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"text": "I will send the summary after this call."
}
'{
"data": {
"accepted": true
}
}Authorizations
Path Parameters
Body
application/json
Message text, 1–4000 characters. On Google Meet and Teams, also at most 4096 UTF-8 bytes and nonblank; control characters other than tab and line breaks are rejected. CRLF is normalized to LF.
Required string length:
1 - 4000Was this page helpful?
JavaScript
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const response = await client.meetingSessions.actions.sendChat('id', {
text: 'text',
});
console.log(response.data);import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
response = client.meeting_sessions.actions.send_chat(
id="id",
text="text",
)
print(response.data)
package main
import (
"context"
"fmt"
"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)
func main() {
client := telnyx.NewClient(
option.WithAPIKey("My API Key"),
)
response, err := client.MeetingSessions.Actions.SendChat(
context.TODO(),
"id",
telnyx.MeetingSessionActionSendChatParams{
Text: "text",
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.Data)
}
package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.meetingSessions.actions.ActionSendChatParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
ActionSendChatParams params = ActionSendChatParams.builder()
.text("text")
.build();
var response = client.meetingSessions().actions().sendChat("id", params);
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
response = telnyx.meeting_sessions.actions.send_chat("id", text: "text")
puts(response)<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Telnyx\Client;
use Telnyx\Core\Exceptions\APIException;
$client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API Key');
try {
$response = $client->meetingSessions->actions->sendChat(
'id',
text: 'text',
);
var_dump($response);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx meeting-sessions:actions send-chat \
--api-key 'My API Key' \
--id id \
--text textcurl --request POST \
--url https://api.telnyx.com/v2/meeting_sessions/{id}/actions/send_chat \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"text": "I will send the summary after this call."
}
'{
"data": {
"accepted": true
}
}