Get Email Templates
GET
/v1/templates
const url = 'https://api.contacta.mx/v1/templates';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.contacta.mx/v1/templates \ --header 'Authorization: Bearer <token>'Retrieves the list of email templates available in your account.
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”Email templates retrieved successfully
Media typeapplication/json
Array<object>
object
template_id
The unique identifier of the template
string
name
The name of the template
string
subject
The subject line of the template
string
from_name
The sender display name
string
from_email
The sender email address
string format: email
status
Whether the template is active
boolean
Example
[ { "template_id": "template123", "name": "Welcome Email", "subject": "Welcome to Our Service", "from_name": "John Doe", "from_email": "john@doe.com", "status": true }]Unauthorized — invalid or missing API token
Media typeapplication/json
object
status
boolean
message
string
data
object
message
string
code
integer
Example
{ "status": false, "message": "An http error occurred. If error persists, contact soporte@contacta.mx", "data": { "message": "Your key auth is not valid, please check with your administrator", "code": 401 }}
