List profiles
GET /profiles/ returns the profiles and templates with their identifiers and sample data.
On this page
GET /profiles/ returns all profiles with their templates. Use it to show a list of templates in your app, or to find out which data a template expects.
The token needs Allow read list of profiles. See API tokens.
Request
curl -H "x-token: YOUR_TOKEN" https://mail.example.com/profiles/Response
[{"id":"JapP3p1ci61f","name":"Demo project","icon":"ti ti-envelope","color":"#4285F4","reference":"demo","templates":[{"id":"JapP4K1di60f","name":"Welcome","reference":"demo/welcome","model":{"name":"Jane Doe","plan":"Pro"}},{"id":"JapPiU1c861f","name":"Password reset","reference":"demo/password-reset","model":{"name":"Jane Doe","url":"https://app.example.com/reset/"}},{"id":"JapPiU1d860f","name":"Invoice","reference":"demo/invoice","model":{"number":"2026-001","total":120}}]}]| Field | Meaning |
|---|---|
id | The internal ID of the profile. |
name, icon, color | As shown in the admin interface. |
reference | The profile identifier. |
templates[].id | The internal ID of the template. |
templates[].name | The template name. |
templates[].reference | The full template identifier. Send it as id to Send an email. |
templates[].model | The sample data of the template, from its script type="text/json" block. {} if it has none. |
Without the permission
A token without Allow read list of profiles gets 401:
[{"name":"401","error":"401: Unauthorized"}]