Legacy API Notice: This documentation covers the Legacy Sent API (v2). While this API remains fully supported, we recommend new integrations use the latest Sent API v3 for enhanced features, improved performance, and long-term support.

Get template by ID with enhanced metadata

Retrieves a specific message template by its unique identifier for the authenticated customer with comprehensive template definitions including headers, body, footer, and interactive buttons. The customer ID is extracted from the authentication token.

GET
/v2/templates/{id}

Path Parameters

id*string
Formatuuid

Response Body

Template found and returned successfully with enhanced metadata

application/json
  1. response

Represents a message template with comprehensive metadata including definition structure

id?string

The unique identifier of the template

Formatuuid
displayName?string

The display name of the template (auto-generated if not provided)

category?string

The template category (e.g., MARKETING, UTILITY, AUTHENTICATION)

language?string

The template language code (e.g., en_US, es_ES)

definition?

The complete template definition including header, body, footer, and buttons

status?string

The approval status of the template (e.g., APPROVED, PENDING, REJECTED, DRAFT)

isPublished?boolean

Indicates whether the template is published and available for use

whatsappTemplateId?string

The WhatsApp Business API template ID from Meta

whatsappTemplateName?string

The WhatsApp template name as registered with Meta

createdAt?string

The date and time when the template was created

Formatdate-time
updatedAt?|

The date and time when the template was last updated

Formatdate-time
Example Request
curl -X GET 'https://api.sent.dm/v2/templates/7ba7b820-9dad-11d1-80b4-00c04fd430c8'
Example Response
{  "id": "7ba7b820-9dad-11d1-80b4-00c04fd430c8",  "displayName": "Welcome Message Template",  "category": "UTILITY",  "language": "en_US",  "definition": {    "header": {      "type": "text",      "template": "Welcome to {{1:variable}}!",      "variables": [        {          "id": 1,          "name": "companyName",          "type": "variable",          "props": {            "variableType": "text",            "sample": "SentDM",            "regex": null,            "url": null,            "shortUrl": null,            "alt": null,            "mediaType": null          }        }      ],      "example_url": null,      "static_resource": false,      "location": null    },    "body": {      "multiChannel": {        "type": "text",        "template": "Hello {{1:variable}}, thank you for joining our service. We're excited to help you with your messaging needs!",        "variables": [          {            "id": 1,            "name": "customerName",            "type": "variable",            "props": {              "variableType": "text",              "sample": "John Doe",              "regex": null,              "url": null,              "shortUrl": null,              "alt": null,              "mediaType": null            }          }        ]      },      "sms": null,      "whatsapp": null,      "rcs": null,      "mms": null    },    "footer": {      "type": "text",      "template": "Best regards, The SentDM Team",      "variables": null    },    "buttons": null,    "definitionVersion": "1.0",    "authenticationConfig": null  },  "status": "APPROVED",  "isPublished": true,  "whatsappTemplateId": "123456789",  "whatsappTemplateName": "welcome_message_v1",  "createdAt": "2024-01-15T10:30:00+00:00",  "updatedAt": "2024-01-16T14:22:00+00:00"}