Get a template
Retrieve one template with its active version and variables.
Returns the template, its active version number, and the declared variables.
GET /v3/templates/{id}
Responses
| Status | Description |
|---|---|
200 | OK. The template object. |
401 | Missing or invalid API key. |
404 | No template with this id on your account. |
Code examples
cURL
curl https://api.wemail.io/v3/templates/{id} \
-H "Authorization: Bearer afn_live_…"Node.js
const res = await fetch("https://api.wemail.io/v3/templates/{id}", {
headers: {
Authorization: `Bearer ${process.env.WEMAIL_API_KEY}`,
},
});
const data = await res.json();Python
import os, requests
r = requests.get(
"https://api.wemail.io/v3/templates/{id}",
headers={"Authorization": f"Bearer {os.environ['WEMAIL_API_KEY']}"},
)
data = r.json()