Skip to main content
GET
/
api
/
templates
/
{templateId}
/
payload-skeleton
Fetch Payload Skeleton
curl --request GET \
  --url https://api.automatechats.com/api/templates/{templateId}/payload-skeleton \
  --header 'X-API-Key: <api-key>'
import requests

url = "https://api.automatechats.com/api/templates/{templateId}/payload-skeleton"

headers = {"X-API-Key": "<api-key>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};

fetch('https://api.automatechats.com/api/templates/{templateId}/payload-skeleton', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.automatechats.com/api/templates/{templateId}/payload-skeleton",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://api.automatechats.com/api/templates/{templateId}/payload-skeleton"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("X-API-Key", "<api-key>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.automatechats.com/api/templates/{templateId}/payload-skeleton")
.header("X-API-Key", "<api-key>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.automatechats.com/api/templates/{templateId}/payload-skeleton")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'

response = http.request(request)
puts response.read_body
{
  "status": "success",
  "code": 200,
  "message": "Payload schema skeleton generated successfully",
  "data": {
    "templateId": "b340b1b3-bf45-4a61-be71-853a31830dc5",
    "name": "travel_reminder",
    "language": "en",
    "samplePayload": {
      "templateId": "b340b1b3-bf45-4a61-be71-853a31830dc5",
      "recipientPhoneNumber": "PHONE_NUMBER_IN_E164",
      "countryCode": "COUNTRY_CODE_IF_V1",
      "variableMapping": {
        "body": {
          "1": "BODY_VARIABLE_1_VALUE",
          "2": "BODY_VARIABLE_2_VALUE",
          "3": "BODY_VARIABLE_3_VALUE",
          "4": "BODY_VARIABLE_4_VALUE",
          "5": "BODY_VARIABLE_5_VALUE",
          "6": "BODY_VARIABLE_6_VALUE"
        }
      }
    }
  },
  "timestamp": "2026-06-12T05:42:30.350Z"
}

Authorizations

X-API-Key
string
header
required

Path Parameters

templateId
string
required

Response

200 - application/json

Ready-to-use payload skeleton for the template

status
string
code
integer
message
string
data
object
timestamp
string<date-time>