Skip to content
Get Started

Send a typing indicator

client.typingIndicators.send(TypingIndicatorSendParams { from_number, number } body, RequestOptionsoptions?): TypingIndicatorSendResponse { error_message, number, status }
POST/api/send-typing-indicator

Send an indication that you are typing to a user. This shows up as the animated three dots on the recipient's device. Not supported in group chats.

ParametersExpand Collapse
body: TypingIndicatorSendParams { from_number, number }
from_number: string

The Sendblue phone number you want to send the typing indicator from (E.164 format). This should be the number you use to send messages.

number: string

The number you want to send a typing indicator to (E.164 format)

ReturnsExpand Collapse
TypingIndicatorSendResponse { error_message, number, status }
error_message?: string | null

The error message if the status is ERROR

number?: string

The number you evaluated in E.164 format

status?: "SENT" | "ERROR"

The status of the typing indicator you tried to send

Accepts one of the following:
"SENT"
"ERROR"

Send a typing indicator

import SendblueAPI from 'sendblue';

const client = new SendblueAPI({
  apiKey: process.env['SENDBLUE_API_API_KEY'], // This is the default and can be omitted
  apiSecret: process.env['SENDBLUE_API_API_SECRET'], // This is the default and can be omitted
});

const response = await client.typingIndicators.send({
  from_number: '+16292925296',
  number: '+19998887777',
});

console.log(response.error_message);
{
  "error_message": null,
  "number": "+19998887777",
  "status": "SENT"
}
Returns Examples
{
  "error_message": null,
  "number": "+19998887777",
  "status": "SENT"
}