Elencare i profili
GET /profiles/ restituisce i profili e i template con i loro identificatori e i dati di esempio.
In questa pagina
GET /profiles/ restituisce tutti i profili con i loro template. Usalo per mostrare un elenco di template nella tua app, o per scoprire quali dati si aspetta un template.
Il token ha bisogno di Allow read list of profiles. Leggi Token API.
Richiesta
curl -H "x-token: YOUR_TOKEN" https://mail.example.com/profiles/Risposta
[{"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}}]}]| Campo | Significato |
|---|---|
id | L'ID interno del profilo. |
name, icon, color | Come compaiono nell'interfaccia di amministrazione. |
reference | L'identificatore del profilo. |
templates[].id | L'ID interno del template. |
templates[].name | Il nome del template. |
templates[].reference | L'identificatore completo del template. Invialo come id a Inviare un'email. |
templates[].model | I dati di esempio del template, dal suo blocco script type="text/json". {} se non ne ha. |
Senza il permesso
Un token senza Allow read list of profiles riceve 401:
[{"name":"401","error":"401: Unauthorized"}]