Skip to content
Whats91

Retrieve one standard template by UID, template id, Meta template id, or name.

Get Template

Summary

Retrieve one standard template by UID, template id, Meta template id, or name.

Prerequisites

  • Authorization: Bearer w91_live_xxx
  • Content-Type: application/json for JSON requests

Retrieves a single standard template. The identifier resolves by local UID, local template id, Meta template id, or template name, depending on what the sender has stored.

GET/api/v2/templates/{identifier}

Retrieve one standard template.

ParameterTypeRequiredDescription
identifierstringRequiredLocal UID, local template id, Meta template id, or template name.
senderIdstringOptionalWhatsApp sender that owns the template.
cURL
curl "https://graph.whats91.com/api/v2/templates/payment_reminder?senderId=919999999999" \
  -H "Authorization: Bearer w91_live_xxx"
200 OK
{
  "success": true,
  "message": "Template retrieved",
  "data": {
    "senderId": "919999999999",
    "template": {
      "uid": "tpl_abc123",
      "name": "payment_reminder",
      "language": "en",
      "category": "UTILITY",
      "status": "APPROVED",
      "metaTemplateId": "1234567890",
      "components": []
    }
  },
  "metadata": {
    "apiVersion": "v2",
    "requestId": "request-uuid"
  }
}

SDK Examples

Use these examples as starting points for server-side implementations.

cURL
curl -X GET "https://graph.whats91.com/api/v2/templates/{identifier}" \
  -H "Authorization: Bearer w91_live_xxx"
Node.js
const response = await fetch("https://graph.whats91.com/api/v2/templates/{identifier}", {
  method: "GET",
  headers: {
    "Authorization": "Bearer w91_live_xxx"
  }
});

const data = await response.json();
console.log(data);
PHP
$ch = curl_init("https://graph.whats91.com/api/v2/templates/{identifier}");
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer w91_live_xxx"
  ]
]);

$response = curl_exec($ch);
curl_close($ch);
echo $response;
Python
import requests

response = requests.request(
    "GET",
    "https://graph.whats91.com/api/v2/templates/{identifier}",
    headers={
        "Authorization": "Bearer w91_live_xxx",
    }
)

print(response.json())
C#
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", "Bearer w91_live_xxx");

var request = new HttpRequestMessage(HttpMethod.Get, "https://graph.whats91.com/api/v2/templates/{identifier}");

var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());

Related APIs