Get all templates for authenticated customer with enhanced metadata and filtering
Retrieves all message templates available for the authenticated customer with comprehensive template definitions including headers, body, footer, and interactive buttons. Supports advanced filtering by search term, status, and category, plus pagination. The customer ID is extracted from the authentication token.
Query Parameters
The page number (zero-indexed). Default is 0.
int32The number of items per page (1-1000). Default is 100.
int32Optional search term to filter templates by name or content
Optional filter by template status (e.g., APPROVED, PENDING, REJECTED, DRAFT)
Optional filter by template category (e.g., MARKETING, UTILITY, AUTHENTICATION)
Header Parameters
guidResponse Body
application/json
curl -X GET "https://api.sent.dm/v2/templates?page=0&pageSize=0" \ -H "x-sender-id: string" \ -H "x-api-key: string"{
"items": [
{
"id": "7ba7b820-9dad-11d1-80b4-00c04fd430c8",
"displayName": "Welcome Message Template",
"category": "MARKETING",
"language": "en_US",
"definition": {
"header": {
"type": "text",
"template": "Welcome to {{0:variable}}!",
"variables": [
{
"id": 1,
"name": "companyName",
"type": "variable",
"props": {
"variableType": "text",
"sample": "SentDM",
"url": null,
"shortUrl": null,
"alt": null,
"mediaType": null
}
}
]
},
"body": {
"multiChannel": {
"type": null,
"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",
"url": null,
"shortUrl": null,
"alt": null,
"mediaType": null
}
}
]
},
"sms": null,
"whatsapp": null
},
"footer": {
"type": "text",
"template": "Best regards, The SentDM Team",
"variables": null
},
"buttons": null,
"definitionVersion": "1.0"
},
"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"
}
],
"totalCount": 1,
"page": 0,
"pageSize": 50,
"totalPages": 1
}Get contact by phone number GET
Retrieves a contact by their phone number for the authenticated customer. Phone number should be in international format (e.g., +1234567890). The customer ID is extracted from the authentication token.
Get template by ID GET
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.