Send Telegram Message API

Send Telegram Message API for SMSGatewayCenter APIs

Send Telegram Message API

Use the Send Telegram API to deliver Telegram messages programmatically through SMSGatewayCenter. Send text, media (photo, audio, document, video, animation, voice, video_note), location, contact, and poll messages to a single chat, multiple chat IDs, or by phone number. This endpoint accepts POST requests with application/x-www-form-urlencoded and returns JSON.

Ideal for server-to-server delivery, transactional alerts, appointment reminders, and broadcasts triggered from your application.

 

API Endpoint

https://unify.smsgateway.center/rest/tg/v1/send

 

Authentication

Identify your account with one of the following methods: send userid + password in the POST body, or send userid in the body with your account API key in the apikey request header.

 

ParameterRequiredDescriptionExample/Value
Authentication
useridYesYour SMSGatewayCenter account username. The message is sent using the Telegram bot linked to this account.YourUsername
passwordConditionalYour account password. Required when the apikey header is not sent.**********
Message Parameters
msgTypeYesMessage type: text, photo, audio, document, video, animation, voice, video_note, location, contact, or poll.text
chatIdConditionalTelegram chat ID. Required when phoneNumber is not sent. For multiple recipients, pass comma-separated IDs. Do not combine with phoneNumber.123456789,987654321
phoneNumberConditionalRecipient mobile number with country code, digits only. Use instead of chatId when sending by phone.919999999999
textConditionalMessage body for text messages, or caption for media types. Max 4096 characters for text; max 1024 for captions.Hello from API
mediaPayloadConditionalJSON string with extra fields for non-text message types (see media payload fields below).{"mediaUrl":"https://.../image.jpg"}
replyMarkupOptionalJSON string for inline buttons, reply keyboard, force reply, or remove keyboard. Must follow the Telegram Bot API reply_markup format.{"inline_keyboard":[[{"text":"Open","url":"https://..."}]]}
outputOptionalResponse format. Use json for structured output.json

 

mediaPayload JSON Fields

FieldUsed forDescription
mediaUrlphoto, audio, document, video, animation, voice, video_notePublic https:// URL to the media file.
latitude, longitudelocationDecimal coordinates. Latitude -90 to 90, longitude -180 to 180.
phoneNumber, firstName, lastNamecontactContact card details. Phone may include a leading +.
pollQuestion, pollOptions, isAnonymouspollQuestion max 300 characters. Provide 2-10 options as a JSON array. isAnonymous: 0 or 1.

 

Sample Request - Text Message (cURL)
curl --location 'https://unify.smsgateway.center/rest/tg/v1/send' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'userid=YourUsername' \
--data-urlencode 'password=xxxxx' \
--data-urlencode 'msgType=text' \
--data-urlencode 'chatId=123456789' \
--data-urlencode 'text=Hello from API' \
--data-urlencode 'output=json'

 

Sample Request - API Key Header (cURL)
curl --location 'https://unify.smsgateway.center/rest/tg/v1/send' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'apikey: YourApiKey' \
--data-urlencode 'userid=YourUsername' \
--data-urlencode 'msgType=text' \
--data-urlencode 'chatId=123456789' \
--data-urlencode 'text=Hello from API' \
--data-urlencode 'output=json'

 

Sample Request - Photo with Caption (cURL)
curl --location 'https://unify.smsgateway.center/rest/tg/v1/send' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'userid=YourUsername' \
--data-urlencode 'password=xxxxx' \
--data-urlencode 'msgType=photo' \
--data-urlencode 'chatId=123456789' \
--data-urlencode 'text=Product image' \
--data-urlencode 'mediaPayload={"mediaUrl":"https://example.com/image.jpg"}'

 

Sample Request - Send by Phone Number (cURL)
curl --location 'https://unify.smsgateway.center/rest/tg/v1/send' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'userid=YourUsername' \
--data-urlencode 'password=xxxxx' \
--data-urlencode 'msgType=text' \
--data-urlencode 'phoneNumber=917770907999' \
--data-urlencode 'text=Hello'

 

Sample Request - Multiple Chat IDs (cURL)
curl --location 'https://unify.smsgateway.center/rest/tg/v1/send' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'userid=YourUsername' \
--data-urlencode 'password=xxxxx' \
--data-urlencode 'msgType=text' \
--data-urlencode 'chatId=536510855,496786735' \
--data-urlencode 'text=Broadcast message with multiple chat ids'

 

Sample Success Response
{
    "status": "success",
    "message": "Message sent successfully.",
    "uniqueId": 17123456789012,
    "uuId": "17123456789012",
    "transactionId": "17123456789012",
    "msgId": "42"
}

 

Sample Error Response
{
    "status": "error",
    "message": "Telegram API sending is disabled for this account."
}

 

Validation Rules

  • Use either chatId or phoneNumber, never both in the same request. At least one recipient identifier is required.
  • Media messages require a valid public HTTPS mediaUrl unless the type is location, contact, or poll.
  • Multiple recipients and phone-based sending require the Telegram API service to be enabled on your account.
  • Track delivery using uniqueId, uuId, or transactionId with the Telegram Delivery Report REST API.

Testimonials

Why do Great Businesses Trust SMS Gateway Center?

K

Kurlon IT

2022-08-04

We have tied up with other SMS providers also, but SMS GatewayCenter is quite good. Good Service from the team. We are very happy with the service be it accounts related or technical issue. We always get good response.

I

INOX Air Products

2018-02-09

We have an excellent experience with SMS Gateway Center. The services and support has been of very high standard.

S

Shalabh Arora

2025-04-11

I’ve been using SMSGatewayCenter’s bulk SMS and WhatsApp services since early 2022 for my small business, and the experience has been fantastic. The platform is intuitive, and the message delivery is incredibly reliable, reaching my customers without fail. The 24/7 support team is quick to assist, and the cost-effectiveness is a big plus. It’s transformed how I connect with my audience, and I highly recommend it to other entrepreneurs! (Google Revirews)

R

Reflex

2025-04-11

We’ve been using your bulk SMS services for a few months, and the results have been phenomenal. The open rates and customer engagement have gone through the roof. Highly recommend for any business looking to scale fast! (Google Revirews)

V

Vedanth Gowda

2025-04-18

I’m Vedanth Gowda, leading a finance business, and I’ve been leveraging SMSGatewayCenter’s bulk SMS and WhatsApp tools —absolutely transformative! The platform’s speed and precision in delivering financial alerts to my clients are unmatched, giving me a competitive edge. Samrat’s expertise in tailoring notification workflows for market updates was a standout, and the robust security features instilled trust. The affordable pricing and proactive support team make it a no-brainer. Perfect for finance pros aiming to elevate client trust and efficiency! (Google Revirews)

N

Naval Bhatnagar

2025-04-12

From day one, the team at SMS GATEWAY CENTER guided us through setup, testing, and launching campaigns. Their support is A+. Whether you’re new to SMS marketing or experienced, they make it smooth. Thank you Aakash. (Google Revirews)


CTA for Unlock Real-Time Messaging – Integrate Today!

Unlock Real-Time Messaging – Integrate Today!

Try Our API in a Sandbox Environment Before Going Live!

Join Thousands of Developers – Try Our API Now!

Get in touchSign up