API

Guides

Messages

Voice

WhatsApp Business

Groups

Contacts

Outbox

Account

Sender IDs

Teammate/Subaccount

Conversations

Workflows

Message Templates

Birthday Message

Opt-out

Other

Webhooks (v2)

Get all message templates

Base URL:

GET: https://api.smsgatewayapi.com/v1/messagetemplates
ParameterInputDescription
client_idAPI client IDDeveloper › API & Webhooks › API credentials
Required
client_secretAPI client secretA cs_ credential, shown once when you create it under Developer › API & Webhooks › API credentials
Required
<?php
	//PHP - cURL
	$ch = curl_init();
	$url = "https://api.smsgatewayapi.com/v1/messagetemplates";
	$client_id = "XXX"; // Your API client ID (required)
	$client_secret = "YYY"; // Your API client secret (required)
	
curl_setopt($ch, CURLOPT_URL, "$url"); curl_setopt($ch, CURLOPT_POST, false); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET'); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_VERBOSE, true); curl_setopt($ch, CURLOPT_HTTPHEADER, [ "X-Client-Id: $client_id", "X-Client-Secret: $client_secret", "Content-Type: application/json", ]); $response = curl_exec($ch); ?>

Example success response:

[
	{
		"ID": "{ID}",
		"public_ID": "tpl_c6dab1d038504ac910f1254f20383622",
		"title": "test title",
		"message": "Hapy birthday [FIRSTNAME]!",
		"order": "1",
		"attachment": null,
		"attachment_file": null,
		"attachment_type": null,
		"whatsapp_only": false
	},
	{
		"ID": "{ID}",
		"public_ID": "tpl_7ecad8b1a486b73732b897fde12f080c",
		"title": "test title",
		"message": "Your subscription expires in one week.",
		"order": "2",
		"attachment": "https://img.smstools.be/file/12345::brochure.pdf",
		"attachment_file": "brochure.pdf",
		"attachment_type": "file",
		"whatsapp_only": true
	},
	...
]

A template can carry an attachment (image, video, audio or file) that is set in the panel. Such a template has whatsapp_only true; attachment is the file URL, attachment_file the file name and attachment_type one of image, video, audio or file. It can only be sent through the WhatsApp endpoints (Send text or Send file with the template parameter); Send message and Send voice refuse it with error 169. Attachments cannot be set through the API.

SMS API

Smstools
API SMS passerelle. Intégration facile. Grâce à notre API SMS, vous pouvez étendre les fonctionnalités de votre logiciel avec une intégration SMS. SMS API
5 sur 5 basé sur 3305 avis d'utilisateurs.
SMSGATEWAYAPI API1

INSCRIVEZ-VOUS

Découvrez notre plateforme SMS aujourd'hui !

Essai gratuit