Spanish Total.js
English
Documentation For AI agents
Contents

List profiles

GET /profiles/ returns the profiles and templates with their identifiers and sample data.

.md GitHub
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}}]}]
FieldMeaning
idThe internal ID of the profile.
name, icon, colorAs shown in the admin interface.
referenceThe profile identifier.
templates[].idThe internal ID of the template.
templates[].nameThe template name.
templates[].referenceThe full template identifier. Send it as id to Send an email.
templates[].modelThe 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"}]
Made in Europe