Get template by ID

Retrieves a specific template by its ID. Returns template details including name, category, language, status, and definition.

GET
/v3/templates/{id}

Path Parameters

id*string

Template ID from route parameter

Formatuuid

Header Parameters

x-profile-id?string

Profile UUID to scope the request to a child profile. Only organization API keys can use this header. The profile must belong to the calling organization.

Formatuuid

Response Body

application/json

application/json

application/json

application/json

curl -X GET "https://api-dev.sent.dm/v3/templates/7ba7b820-9dad-11d1-80b4-00c04fd430c8"
{
  "success": true,
  "data": {
    "id": "7ba7b820-9dad-11d1-80b4-00c04fd430c8",
    "name": "Welcome Message",
    "category": "MARKETING",
    "language": "en_US",
    "status": "APPROVED",
    "channels": [
      "sms",
      "whatsapp"
    ],
    "variables": [
      "name",
      "company"
    ],
    "created_at": "2026-02-23T10:43:34.2862779+00:00",
    "updated_at": "2026-03-10T10:43:34.2862803+00:00",
    "is_published": true
  },
  "error": null,
  "meta": {
    "request_id": "req_7X9zKp2jDw",
    "timestamp": "2026-03-25T10:43:34.2862816+00:00",
    "version": "v3"
  }
}
{
  "success": false,
  "data": null,
  "error": {
    "code": "VALIDATION_001",
    "message": "Invalid template ID format.",
    "details": null,
    "doc_url": "https://docs.sent.dm/docs/reference/api/error-catalog"
  },
  "meta": {
    "request_id": "req_7X9zKp2jDw",
    "timestamp": "2026-03-25T10:43:34.2862863+00:00",
    "version": "v3"
  }
}
Empty
Empty
{
  "success": false,
  "data": null,
  "error": {
    "code": "RESOURCE_002",
    "message": "Template not found",
    "details": null,
    "doc_url": "https://docs.sent.dm/docs/reference/api/error-catalog"
  },
  "meta": {
    "request_id": "req_7X9zKp2jDw",
    "timestamp": "2026-03-25T10:43:34.2862871+00:00",
    "version": "v3"
  }
}
{
  "success": false,
  "data": null,
  "error": {
    "code": "INTERNAL_001",
    "message": "An unexpected error occurred while retrieving the template",
    "details": null,
    "doc_url": "https://docs.sent.dm/docs/reference/api/error-catalog"
  },
  "meta": {
    "request_id": "req_7X9zKp2jDw",
    "timestamp": "2026-03-25T10:43:34.2862877+00:00",
    "version": "v3"
  }
}