Sending messages to the Telegram channel
Last updated: 9 November 2026
Use the /api/v1/out-messages/telegram method to send messages to the Telegram channel.
Calling the method
To send a message to the Telegram channel using the /api/v1/out-messages/telegram method, send a POST request to the URL:
https://app.edna.io/api/v1/out-messages/telegram
Request examples
Message with text sent by phone number
{
"outMessageId": "c1e34af5-da98-6e0a-945d-18db30fde070",
"from": "Telegram_test_sender",
"to": {
"value": "+35700000000",
"type":"PHONE"
},
"content": {
"type": "TEXT",
"text": "Good afternoon! We're happy to introduce our new communication channel — Telegram"
}
}
Message with text sent by TELEGRAM_ID
{
"outMessageId": "c699c7bd-af08-43f3-ae4c-b54765f38f8f",
"from": "Telegram_test_sender",
"to": {
"value": "1234567890",
"type":"TELEGRAM_ID"
},
"content": {
"type": "TEXT",
"text": "Good afternoon! Sending a message by TELEGRAM_ID — Telegram"
}
}
Message with delayed sending
{
"outMessageId": "c1e34af5-da98-6e0a-945d-18db30fde070",
"from": "Telegram_test_sender",
"to": {
"value": "+35700000000",
"type": "PHONE"
},
"content": {
"type": "TEXT",
"text": "Good afternoon! This is a delayed message — 2 minutes"
},
"options": {
"sendDelay": "PT2M",
"priority": "NORMAL",
"comment": "Delayed message - 2026-10-22T08:01:15.851Z sendDelay PT2M"
}
}
Message with an image
{
"outMessageId": "c1e34af5-da98-6e0a-945d-18db30fde070",
"from": "Telegram_test_sender",
"to": {
"value": "+35700000000",
"type":"PHONE"
},
"content": {
"type": "IMAGE",
"name": "Image",
"url": "https://avatarko.ru/img/kartinka/33/multfilm_lyagushka_32117.jpg"
}
}
Message with a document
{
"outMessageId": "c1e34af5-da98-6e0a-945d-18db30fde070",
"from": "Telegram_test_sender",
"to": {
"value": "+35700000000",
"type":"PHONE"
},
"content": {
"type": "DOCUMENT",
"name": "Document",
"url": "https://pdfobject.com/pdf/sample.pdf"
}
}
Message with a video
{
"outMessageId": "c1e34af5-da98-6e0a-945d-18db30fde070",
"from": "Telegram_test_sender",
"to": {
"value": "+35700000000",
"type":"PHONE"
},
"content": {
"type": "VIDEO",
"name": "Video 5 MB",
"url": "https://samplelib.com/mp4/sample-10s-720p.mp4"
}
}
Message with audio
{
"outMessageId": "c1e34af5-da98-6e0a-945d-18db30fde070",
"from": "Telegram_test_sender",
"to": {
"value": "+35700000000",
"type":"PHONE"
},
"content": {
"type": "AUDIO",
"name":"Audio recording",
"url": "https://samplelib.com/mp4/sample-10s-2160p.mp4"
}
}
Message with a location
{
"outMessageId": "c1e34af5-da98-6e0a-945d-18db30fde070",
"from": "Telegram_test_sender",
"to": {
"value": "+35700000000",
"type":"PHONE"
},
"content": {
"type": "LOCATION",
"latitude": "97.421999",
"longitude": "-122.084067"
}
}
Request parameters
| Parameter | Data type | Requirement | Description |
|---|---|---|---|
outMessageId | string | Optional | Internal identifier of an outgoing message. |
from | string | Required | Channel name.
To find out the channel name, use the API method to get the channel list — the subject parameter.
Receiving list of channels |
to | object | Required | Object with recipient address information. |
to.value | string | Required | Recipient address — phone number or user ID in Telegram. The phone number must be in the E.164 standard format.
Standard pattern: ^+[1-9]\d{1,14}$. To find out the recipient address, use the API method to request recipient data — the addresses.address parameter.
Requesting client data |
to.type | string | Required | Recipient identifier type.
Possible values: - PHONE — recipient's phone number;
- TELEGRAM_ID — user ID in Telegram. |
content | object | Required | Object with message content information. |
content.type | string | Required | Message content type.
Possible values: - TEXT — text message;
- IMAGE — image;
- DOCUMENT — document;
- VIDEO — video;
- AUDIO — audio;
- LOCATION — location. |
content.url | string | Required if content.type = IMAGE, VIDEO, AUDIO, or DOCUMENT | Publicly available attachment URL — an image, video, audio, or document.
The maximum length is 1,000 characters. Only the HTTPS protocol is supported. |
content.name | string | Optional | File name — an image, video, audio, or document. It isn't displayed on the recipient's device.
The maximum length is 25 characters. |
content.latitude | string | Required if content.type = LOCATION | Coordinates (latitude). The value range is from -90.000000 to 90.000000.
Up to 6 decimal places are supported. |
content.longitude | string | Required if content.type = LOCATION | Coordinates (longitude). The value range is from -180.000000 to 180.000000.
Up to 6 decimal places are supported. |
options | object | Optional | Object with additional message settings. |
options.sendDelay | string | Optional | Date and time in the ISO 8601 Duration format (for example, 2024-07-01T00:00:00Z) before which the message won't be sent.
Used for delayed sending. The allowed value is no more than 2 weeks. |
options.comment | string | Optional | Any comment to the message. The maximum length is 256 characters.
It isn't displayed on the recipient's device. It's displayed in the message report in your edna Pulse account and in the response of the API method to get the message history — the comment parameter. Receiving message history |
options.priority | string | Optional | Message priority.
Possible values: - LOW — low priority;
- NORMAL — medium priority;
- HIGH — high priority;
- REALTIME — real-time delivery. |
Response example
Response when sending a message by phone number
{
"outMessageId": "c1e34af5-da98-6e0a-945d-18db30fde070",
"phone": "+35700000000"
}
Response when sending a message by TELEGRAM_ID
{
"outMessageId": "c699c7bd-af08-43f3-ae4c-b54765f38f8f",
"telegramId": "1234567890"
}
Response parameters
| Parameter | Data type | Description |
|---|---|---|
outMessageId | string | Internal identifier of an outgoing message. |
phone | string | Recipient address — phone number in the E.164 standard format.
Standard pattern: ^+[1-9]\d{1,14}$. The response returns the recipient identifier specified as the address when sending the message. |
telegramId | string | Recipient address — user ID in Telegram.
The response returns the recipient identifier specified as the address when sending the message. |