Send a message to an existing chat
Send a message to an existing chat. Use this endpoint when you already have a chat ID and want to send additional messages to it.
Message Effects
You can add iMessage effects to make your messages more expressive. Effects are optional and can be either screen effects (full-screen animations) or bubble effects (message bubble animations).
Screen Effects: confetti, fireworks, lasers, sparkles, celebration,
hearts, love, balloons, happy_birthday, echo, spotlight
Bubble Effects: slam, loud, gentle, invisible
Only one effect type can be applied per message.
Inline Text Decorations (iMessage only)
Use the text_decorations array on a text part to apply styling and animations to character ranges.
Each decoration specifies a range: [start, end) and exactly one of style or animation.
Styles: bold, italic, strikethrough, underline
Animations: big, small, shake, nod, explode, ripple, bloom, jitter
{
"type": "text",
"value": "Hello world",
"text_decorations": [
{ "range": [0, 5], "style": "bold" },
{ "range": [6, 11], "animation": "shake" }
]
}
Note: Style ranges (bold, italic, etc.) may overlap, but animation ranges must not overlap with other animations or styles. Decorations render per recipient, not per message: in a group with both iMessage and SMS/RCS participants, iMessage recipients see the decorations and SMS/RCS recipients receive the same message as plain text.
Inline Stickers (iMessage only)
Use the inline_stickers array on a text part to place stickers inside the text. Each sticker
replaces the characters in its range: [start, end) and takes its image from exactly one of
url or attachment_id — an image uploaded with POST /v3/attachments.
{
"type": "text",
"value": "Happy birthday 🎂! 🎉🎉",
"inline_stickers": [
{ "range": [15, 17], "attachment_id": "550e8400-e29b-41d4-a716-446655440000" },
{ "range": [19, 21], "attachment_id": "7c9e6679-7425-40de-944b-e07fc1f90ae7" },
{ "range": [21, 23], "attachment_id": "7c9e6679-7425-40de-944b-e07fc1f90ae7" }
]
}
Note: A sticker takes the place of the characters it covers, so they are hidden on
iMessage: "Sip cup" with a sticker on cup reads “Sip [sticker]”. Those characters are what
SMS and RCS recipients receive (the stickers are dropped and value is sent as written) and
what VoiceOver reads. To keep a word visible, give the sticker its own placeholder:
"Sip cup 🥤" with the range on 🥤. Up to 100 stickers and 10 different images per part;
copies of one image count as one.
Send a message to an existing chat
import LinqAPIV3 from '@linqapp/sdk';
const client = new LinqAPIV3({
apiKey: process.env['LINQ_API_V3_API_KEY'], // This is the default and can be omitted
});
const response = await client.chats.messages.send('550e8400-e29b-41d4-a716-446655440000', {
message: { parts: [{ type: 'text', value: 'Hello, world!' }] },
});
console.log(response.chat_id);{
"chat_id": "550e8400-e29b-41d4-a716-446655440000",
"message": {
"id": "69a37c7d-af4f-4b5e-af42-e28e98ce873a",
"created_at": "2025-10-23T13:07:55.019-05:00",
"delivery_status": "pending",
"is_read": false,
"parts": [
{
"reactions": [
{
"handle": {
"id": "69a37c7d-af4f-4b5e-af42-e28e98ce873a",
"handle": "+15551234567",
"joined_at": "2025-05-21T15:30:00.000-05:00",
"service": "iMessage",
"is_me": false,
"left_at": "2019-12-27T18:11:19.117Z",
"line_type": "iMessage",
"status": "active"
},
"is_me": false,
"type": "love",
"id": "9f8b1c2d-3e4f-5061-7283-94a5b6c7d8e9",
"custom_emoji": null,
"sticker": {
"file_name": "sticker.png",
"height": 420,
"mime_type": "image/png",
"url": "https://cdn.linqapp.com/attachments/a1b2c3d4/sticker.png?signature=...",
"width": 420
}
}
],
"type": "text",
"value": "Hello!",
"inline_stickers": [
{
"range": [
15,
17
],
"id": "550e8400-e29b-41d4-a716-446655440000",
"file_name": "sticker.png",
"mime_type": "image/png",
"url": "https://cdn.linqapp.com/attachments/partners/acme/550e8400-e29b-41d4-a716-446655440000/sticker.png"
}
],
"mention": "+14155551234",
"mention_range": [
4,
9
],
"mentions": [
{
"handle": "+14155550123",
"is_me": true,
"range": [
4,
9
]
}
],
"text_decorations": [
{
"range": [
0,
5
],
"animation": "shake",
"style": "bold"
}
]
}
],
"sent_at": null,
"delivered_at": null,
"effect": {
"name": "confetti",
"type": "screen"
},
"from_handle": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"handle": "+15551234567",
"joined_at": "2025-05-21T15:30:00.000-05:00",
"service": "iMessage",
"is_me": false,
"left_at": "2019-12-27T18:11:19.117Z",
"line_type": "iMessage",
"status": "active"
},
"preferred_service": "iMessage",
"reply_to": {
"message_id": "550e8400-e29b-41d4-a716-446655440000",
"part_index": 0
},
"service": "iMessage"
}
}{
"error": {
"status": 400,
"code": 1002,
"message": "Phone number must be in E.164 format",
"doc_url": "https://docs.linqapp.com/channel/imessage/error/codes/1xxx/1002/"
},
"success": false
}{
"error": {
"status": 401,
"code": 2004,
"message": "Unauthorized - missing or invalid authentication token",
"doc_url": "https://docs.linqapp.com/channel/imessage/error/codes/2xxx/2004/"
},
"success": false
}{
"error": {
"status": 403,
"code": 2005,
"message": "Access denied - insufficient permissions for this resource",
"doc_url": "https://docs.linqapp.com/channel/imessage/error/codes/2xxx/2005/"
},
"success": false
}{
"error": {
"status": 404,
"code": 2001,
"message": "Resource not found",
"doc_url": "https://docs.linqapp.com/channel/imessage/error/codes/2xxx/2001/"
},
"success": false
}{
"error": {
"status": 409,
"code": 2023,
"message": "mentions are only supported in group chats",
"doc_url": "https://docs.linqapp.com/channel/imessage/error/codes/2xxx/2023/"
},
"success": false
}{
"error": {
"status": 409,
"code": 2015,
"message": "mention target +14155551234 is no longer a participant of this chat",
"doc_url": "https://docs.linqapp.com/channel/imessage/error/codes/2xxx/2015/"
},
"success": false
}{
"error": {
"status": 409,
"code": 2013,
"message": "cannot interact with a chat you have left",
"doc_url": "https://docs.linqapp.com/channel/imessage/error/codes/2xxx/2013/"
},
"success": false
}{
"error": {
"status": 500,
"code": 3006,
"message": "Internal server error",
"doc_url": "https://docs.linqapp.com/channel/imessage/error/codes/3xxx/3006/"
},
"success": false
}Returns Examples
{
"chat_id": "550e8400-e29b-41d4-a716-446655440000",
"message": {
"id": "69a37c7d-af4f-4b5e-af42-e28e98ce873a",
"created_at": "2025-10-23T13:07:55.019-05:00",
"delivery_status": "pending",
"is_read": false,
"parts": [
{
"reactions": [
{
"handle": {
"id": "69a37c7d-af4f-4b5e-af42-e28e98ce873a",
"handle": "+15551234567",
"joined_at": "2025-05-21T15:30:00.000-05:00",
"service": "iMessage",
"is_me": false,
"left_at": "2019-12-27T18:11:19.117Z",
"line_type": "iMessage",
"status": "active"
},
"is_me": false,
"type": "love",
"id": "9f8b1c2d-3e4f-5061-7283-94a5b6c7d8e9",
"custom_emoji": null,
"sticker": {
"file_name": "sticker.png",
"height": 420,
"mime_type": "image/png",
"url": "https://cdn.linqapp.com/attachments/a1b2c3d4/sticker.png?signature=...",
"width": 420
}
}
],
"type": "text",
"value": "Hello!",
"inline_stickers": [
{
"range": [
15,
17
],
"id": "550e8400-e29b-41d4-a716-446655440000",
"file_name": "sticker.png",
"mime_type": "image/png",
"url": "https://cdn.linqapp.com/attachments/partners/acme/550e8400-e29b-41d4-a716-446655440000/sticker.png"
}
],
"mention": "+14155551234",
"mention_range": [
4,
9
],
"mentions": [
{
"handle": "+14155550123",
"is_me": true,
"range": [
4,
9
]
}
],
"text_decorations": [
{
"range": [
0,
5
],
"animation": "shake",
"style": "bold"
}
]
}
],
"sent_at": null,
"delivered_at": null,
"effect": {
"name": "confetti",
"type": "screen"
},
"from_handle": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"handle": "+15551234567",
"joined_at": "2025-05-21T15:30:00.000-05:00",
"service": "iMessage",
"is_me": false,
"left_at": "2019-12-27T18:11:19.117Z",
"line_type": "iMessage",
"status": "active"
},
"preferred_service": "iMessage",
"reply_to": {
"message_id": "550e8400-e29b-41d4-a716-446655440000",
"part_index": 0
},
"service": "iMessage"
}
}{
"error": {
"status": 400,
"code": 1002,
"message": "Phone number must be in E.164 format",
"doc_url": "https://docs.linqapp.com/channel/imessage/error/codes/1xxx/1002/"
},
"success": false
}{
"error": {
"status": 401,
"code": 2004,
"message": "Unauthorized - missing or invalid authentication token",
"doc_url": "https://docs.linqapp.com/channel/imessage/error/codes/2xxx/2004/"
},
"success": false
}{
"error": {
"status": 403,
"code": 2005,
"message": "Access denied - insufficient permissions for this resource",
"doc_url": "https://docs.linqapp.com/channel/imessage/error/codes/2xxx/2005/"
},
"success": false
}{
"error": {
"status": 404,
"code": 2001,
"message": "Resource not found",
"doc_url": "https://docs.linqapp.com/channel/imessage/error/codes/2xxx/2001/"
},
"success": false
}{
"error": {
"status": 409,
"code": 2023,
"message": "mentions are only supported in group chats",
"doc_url": "https://docs.linqapp.com/channel/imessage/error/codes/2xxx/2023/"
},
"success": false
}{
"error": {
"status": 409,
"code": 2015,
"message": "mention target +14155551234 is no longer a participant of this chat",
"doc_url": "https://docs.linqapp.com/channel/imessage/error/codes/2xxx/2015/"
},
"success": false
}{
"error": {
"status": 409,
"code": 2013,
"message": "cannot interact with a chat you have left",
"doc_url": "https://docs.linqapp.com/channel/imessage/error/codes/2xxx/2013/"
},
"success": false
}{
"error": {
"status": 500,
"code": 3006,
"message": "Internal server error",
"doc_url": "https://docs.linqapp.com/channel/imessage/error/codes/3xxx/3006/"
},
"success": false
}