Email Templates API
Manage the email templates used for system notifications (Welcome, Password Reset, etc.).
Supported template names are reset_password, registration_confirmation, welcome,
email_verification, and workspace_invitation.
Create Template
Create a new email template.
Request
curl -X POST https://api.syauth.com/e/v1/developer/templates/ \
-H "X-Developer-Token: syat_..." \
-H "Content-Type: application/json" \
-d '{
"name": "registration_confirmation",
"subject": "Welcome to Our Service!",
"html_content": "<h1>Welcome</h1><p>Thanks for joining.</p>",
"workspace": "78047707-5f8f-472b-a065-3d3dc48ba80a"
}'
Response
{
"id": "e131df86-725f-49b8-98cd-ed3c62536e1c",
"name": "registration_confirmation",
"subject": "Welcome to Our Service!",
"body": "<h1>Welcome</h1><p>Thanks for joining.</p>",
"html_content": "<h1>Welcome</h1><p>Thanks for joining.</p>",
"workspace": "78047707-5f8f-472b-a065-3d3dc48ba80a",
"created_at": "2026-01-07T10:20:00Z",
"updated_at": "2026-01-07T10:20:00Z"
}
List Templates
Request
curl -X GET https://api.syauth.com/e/v1/developer/templates/ \
-H "X-Developer-Token: syat_..."
Response
[
{
"id": "e131df86-725f-49b8-98cd-ed3c62536e1c",
"name": "registration_confirmation",
"subject": "Welcome to SyAuth!",
"body": "<h1>Welcome</h1><p>Thanks for joining.</p>",
"html_content": "<h1>Welcome</h1><p>Thanks for joining.</p>",
"workspace": "78047707-5f8f-472b-a065-3d3dc48ba80a",
"updated_at": "2026-01-01T22:35:00Z"
}
]
Get Template Details
Request
curl -X GET https://api.syauth.com/e/v1/developer/templates/e131df86-725f-49b8-98cd-ed3c62536e1c/ \
-H "X-Developer-Token: syat_..."
Response
{
"id": "e131df86-725f-49b8-98cd-ed3c62536e1c",
"name": "registration_confirmation",
"subject": "Welcome to Our Service!",
"body": "<h1>Welcome</h1><p>Thanks for joining.</p>",
"html_content": "<h1>Welcome</h1><p>Thanks for joining.</p>",
"workspace": "78047707-5f8f-472b-a065-3d3dc48ba80a",
"created_at": "2026-01-07T10:20:00Z",
"updated_at": "2026-01-07T10:20:00Z"
}
Update Template
Update an email template.
Request
curl -X PATCH https://api.syauth.com/e/v1/developer/templates/e131df86-725f-49b8-98cd-ed3c62536e1c/ \
-H "X-Developer-Token: syat_..." \
-H "Content-Type: application/json" \
-d '{"subject": "Welcome Invited User!", "html_content": "<h1>Welcome</h1><p>Your account is ready.</p>"}'
Response
{
"id": "e131df86-725f-49b8-98cd-ed3c62536e1c",
"name": "registration_confirmation",
"subject": "Welcome Invited User!",
"body": "<h1>Welcome</h1><p>Your account is ready.</p>",
"html_content": "<h1>Welcome</h1><p>Your account is ready.</p>",
"created_at": "2026-01-07T10:20:00Z",
"updated_at": "2026-01-07T10:25:00Z"
}
Delete Template
Permanently delete an email template.
Request
curl -X DELETE https://api.syauth.com/e/v1/developer/templates/e131df86-725f-49b8-98cd-ed3c62536e1c/ \
-H "X-Developer-Token: syat_..."
Response
204 No Content