Telegram Templates REST API

Telegram Templates REST API for SMSGatewayCenter APIs

Telegram Templates REST API

Use the Templates REST API to list active Telegram message templates and fetch a single template's full compose payload over HTTP. Combine it with the Send Telegram Message API so apps can pick a saved template and prefill body, media, and buttons. This endpoint accepts GET requests and returns JSON.

 

API Endpoint

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

Legacy alias without v1 in the path is also supported: /rest/tg/templates

 

Authentication

Send your account userid and password as parameters, or send your account API key in the apikey request header. Telegram Chat API access must be enabled on your account.

 

Actions

actionMethodDescription
listGETReturn all active templates for the account (id, name, message type, media URL). Default when action is omitted.
getGETReturn one template's full compose payload (body, media, buttons, and related fields) by templateId.

 

ParameterRequiredDescriptionExample/Value
Authentication
userid / passwordYes*Account credentials. Not required when using apikey header authentication.YourUsername / **********
outputYesResponse format. Must be json.json
Template Parameters
actionOptionalDefaults to list. Use get with templateId for a single template.get
templateIdFor getNumeric template id owned by your account. Required when action=get.12

 

Sample Request - List Active Templates (cURL)
curl --location 'https://unify.smsgateway.center/rest/tg/v1/templates?userid=YourUsername&password=xxxxx&output=json&action=list'

 

Sample Request - Get One Template (cURL)
curl --location 'https://unify.smsgateway.center/rest/tg/v1/templates?userid=YourUsername&password=xxxxx&output=json&action=get&templateId=12'

 

Sample Success Response (list)
{
    "status": "success",
    "templatesList": [
        {
            "templateId": 12,
            "templateName": "Order Confirmation",
            "msgType": "text",
            "mediaUrl": ""
        }
    ],
    "totalRecords": 1,
    "page": 1,
    "limit": 1,
    "statusCode": "200",
    "reason": "success"
}

 

Sample Success Response (get)
{
    "status": "success",
    "template": {
        "templateId": 12,
        "templateName": "Order Confirmation",
        "msgType": "text",
        "body": "Hi {name}, your order #{orderId} has shipped!",
        "mediaUrl": "",
        "mediaPayloadJson": "",
        "buttonsJson": "",
        "useReplyMarkup": 0
    },
    "statusCode": "200",
    "reason": "success"
}

Depending on message type, get may also include media-specific fields such as location, contact, or poll details when they were saved on the template.

 

Sample Error Response
{
    "status": "error",
    "templatesList": [],
    "statusCode": "403",
    "reason": "Telegram API access is not enabled for this account."
}

For action=get validation or not-found errors, the error payload uses an empty template array instead of templatesList, with status codes such as 400 or 404.

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