Skip to main content

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​

ParameterData typeRequirementDescription
outMessageIdstringOptionalInternal identifier of an outgoing message.
fromstringRequiredChannel name.
To find out the channel name, use the API method to get the channel list — the subject parameter. File IconReceiving list of channels
toobjectRequiredObject with recipient address information.
to.valuestringRequiredRecipient 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}$. Wikipedia
To find out the recipient address, use the API method to request recipient data — the addresses.address parameter. File IconRequesting client data
to.typestringRequiredRecipient identifier type.
Possible values:
- PHONE — recipient's phone number;
- TELEGRAM_ID — user ID in Telegram.
contentobjectRequiredObject with message content information.
content.typestringRequiredMessage content type.
Possible values:
- TEXT — text message;
- IMAGE — image;
- DOCUMENT — document;
- VIDEO — video;
- AUDIO — audio;
- LOCATION — location.
content.urlstringRequired if content.type = IMAGE, VIDEO, AUDIO, or DOCUMENTPublicly available attachment URL — an image, video, audio, or document.
The maximum length is 1,000 characters.
Only the HTTPS protocol is supported.
content.namestringOptionalFile name — an image, video, audio, or document. It isn't displayed on the recipient's device.
The maximum length is 25 characters.
content.latitudestringRequired if content.type = LOCATIONCoordinates (latitude). The value range is from -90.000000 to 90.000000.
Up to 6 decimal places are supported.
content.longitudestringRequired if content.type = LOCATIONCoordinates (longitude). The value range is from -180.000000 to 180.000000.
Up to 6 decimal places are supported.
optionsobjectOptionalObject with additional message settings.
options.sendDelaystringOptionalDate 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. en.wikipedia.org
The allowed value is no more than 2 weeks.
options.commentstringOptionalAny 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. File IconReceiving message history
options.prioritystringOptionalMessage 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​

ParameterData typeDescription
outMessageIdstringInternal identifier of an outgoing message.
phonestringRecipient address — phone number in the E.164 standard format.
Standard pattern: ^+[1-9]\d{1,14}$. Wikipedia
The response returns the recipient identifier specified as the address when sending the message.
telegramIdstringRecipient address — user ID in Telegram.
The response returns the recipient identifier specified as the address when sending the message.