The emails the site sends: their settings, templates, the texts added to order emails and bulk email campaigns.
Endpoints that need a token: the site owner creates it in their admin (Developers > API reference). AI assistants: how to ask the user for one.
13 endpoints in 3 parts: Email, Email Template, AI builder.
The site's email texts, one per email type. Answers an array of every record.
Needs a site admin token.
Returns the Email object.
curl -X GET 'http://smartman.max-media.io/email?ionic=true' \ -H 'Authorization: Bearer <TOKEN>'
{
"title": "Example",
"text1": "Text shown on the site.",
"text2": "Text shown on the site.",
"text3": "Text shown on the site.",
"text4": "Text shown on the site.",
"text5": "Text shown on the site.",
"text6": "Text shown on the site.",
"text7": "Text shown on the site.",
"text8": "Text shown on the site.",
"text9": "Text shown on the site.",
"text10": "Text shown on the site.",
"type": "example",
"google_calendar": "Add to Google Calendar",
"outlook_calendar": "Add to Outlook Calendar",
"apple_calendar": "Add to Apple Calendar",
"product_text": "Text shown on the site.",
"program_text": "Text shown on the site.",
"priceplan_text": "Text shown on the site.",
"template_id": "6543210fedcba98765432100",
"show_phone": false,
"product_text_fulfilled": "Text shown on the site.",
"booking_text": "Text shown on the site.",
"_id": "6543210fedcba98765432100",
"updatedAt": "2026-11-04T12:00:00.000Z"
}The texts of one email (welcome, confirmation...). 404 when the site has no texts for that email yet: the built-in wording is used.
Needs a site admin token.
Which email this is (welcome, confirmation, resetPassword, newsletter...).
Returns a list of Email objects.
curl -X GET 'http://smartman.max-media.io/email/{type}?ionic=true' \
-H 'Authorization: Bearer <TOKEN>'[
{
"title": "Example",
"text1": "Text shown on the site.",
"text2": "Text shown on the site.",
"text3": "Text shown on the site.",
"text4": "Text shown on the site.",
"text5": "Text shown on the site.",
"text6": "Text shown on the site.",
"text7": "Text shown on the site.",
"text8": "Text shown on the site.",
"text9": "Text shown on the site.",
"text10": "Text shown on the site.",
"type": "example",
"google_calendar": "Add to Google Calendar",
"outlook_calendar": "Add to Outlook Calendar",
"apple_calendar": "Add to Apple Calendar",
"product_text": "Text shown on the site.",
"program_text": "Text shown on the site.",
"priceplan_text": "Text shown on the site.",
"template_id": "6543210fedcba98765432100",
"show_phone": false,
"product_text_fulfilled": "Text shown on the site.",
"booking_text": "Text shown on the site.",
"_id": "6543210fedcba98765432100",
"updatedAt": "2026-11-04T12:00:00.000Z"
}
]The email templates. Answers an array of every record.
Needs a site admin token.
Returns the EmailTemplate object.
curl -X GET 'http://smartman.max-media.io/email-template?ionic=true' \ -H 'Authorization: Bearer <TOKEN>'
{
"name": "Example",
"rows": [
{
"columns": [],
"_id": "6543210fedcba98765432100"
}
],
"previewHTML": "example",
"compiledHTML": "example",
"fallbackValues": {},
"owner_id": "6543210fedcba98765432100",
"_id": "6543210fedcba98765432100",
"updatedAt": "2026-11-04T12:00:00.000Z",
"createdAt": "2026-11-04T12:00:00.000Z"
}Creates an email template. Answers 201 with no body.
Needs a site admin token.
User.id of who made it.
Returns the EmailTemplate object.
curl -X POST 'http://smartman.max-media.io/email-template?ionic=true' \
-H 'Authorization: Bearer <TOKEN>' \
-H 'Content-Type: application/json' \
-d '{ "owner_id": "..." }'{
"name": "Example",
"rows": [
{
"columns": [],
"_id": "6543210fedcba98765432100"
}
],
"previewHTML": "example",
"compiledHTML": "example",
"fallbackValues": {},
"owner_id": "6543210fedcba98765432100",
"_id": "6543210fedcba98765432100",
"updatedAt": "2026-11-04T12:00:00.000Z",
"createdAt": "2026-11-04T12:00:00.000Z"
}One email template. 404 when there is no such record.
Needs a site admin token.
The ID of the email template.
Returns the EmailTemplate object.
curl -X GET 'http://smartman.max-media.io/email-template/{id}?ionic=true' \
-H 'Authorization: Bearer <TOKEN>'{
"name": "Example",
"rows": [
{
"columns": [],
"_id": "6543210fedcba98765432100"
}
],
"previewHTML": "example",
"compiledHTML": "example",
"fallbackValues": {},
"owner_id": "6543210fedcba98765432100",
"_id": "6543210fedcba98765432100",
"updatedAt": "2026-11-04T12:00:00.000Z",
"createdAt": "2026-11-04T12:00:00.000Z"
}Updates an email template. Fields outside the allowed list are silently ignored. Answers the updated record, or 404.
Needs a site admin token.
The ID of the email template.
Returns the EmailTemplate object.
curl -X PATCH 'http://smartman.max-media.io/email-template/{id}?ionic=true' \
-H 'Authorization: Bearer <TOKEN>'{
"name": "Example",
"rows": [
{
"columns": [],
"_id": "6543210fedcba98765432100"
}
],
"previewHTML": "example",
"compiledHTML": "example",
"fallbackValues": {},
"owner_id": "6543210fedcba98765432100",
"_id": "6543210fedcba98765432100",
"updatedAt": "2026-11-04T12:00:00.000Z",
"createdAt": "2026-11-04T12:00:00.000Z"
}Deletes an email template. Answers the deleted record, or 404. Records that point to it are not changed.
Needs a site admin token.
The ID of the email template.
Returns an empty answer on success.
curl -X DELETE 'http://smartman.max-media.io/email-templates/{id}?ionic=true' \
-H 'Authorization: Bearer <TOKEN>'AI: works out which emails the owner wants changed and routes to update-email-settings-ai. Does no AI work itself: answers { action: 'REDIRECT', target_url, response } and the chat client calls target_url next with response as the prompt.
Needs a site admin token.
What the AI should do with the email setting, in plain words - any language.
The AI chat this request belongs to; its history and language carry over. Leave it out to start a new chat.
curl -X POST 'http://smartman.max-media.io/modify-email-settings?ionic=true' \
-H 'Authorization: Bearer <TOKEN>' \
-H 'Content-Type: application/json' \
-d '{ "prompt": "...", "chatId": "..." }'Use it to design or create the visual look of your emails.
Needs a site admin token.
What the AI should do with the email template, in plain words - any language.
The AI chat this request belongs to; its history and language carry over. Leave it out to start a new chat.
curl -X POST 'http://smartman.max-media.io/modify-email-template?ionic=true' \
-H 'Authorization: Bearer <TOKEN>' \
-H 'Content-Type: application/json' \
-d '{ "prompt": "...", "chatId": "..." }'Use it to write or customize the body message that appears inside order or subscription emails.
Needs a site admin token.
What the AI should do with the store email text, in plain words - any language.
The AI chat this request belongs to; its history and language carry over. Leave it out to start a new chat.
curl -X POST 'http://smartman.max-media.io/modify-store-email-text?ionic=true' \
-H 'Authorization: Bearer <TOKEN>' \
-H 'Content-Type: application/json' \
-d '{ "prompt": "...", "chatId": "..." }'AI: rewrites the site's emails as the owner asked. Answers { action: 'JOB', async_job } at once; the admin polls GET /async-jobs/:id, and the result arrives in the chat as a message when the job ends. The AI work is charged to the account's credits.
Needs a site admin token.
What the AI should do with the email setting, in plain words - any language.
The AI chat this request belongs to; its history and language carry over. Leave it out to start a new chat.
Which version of the AI builder to use; leave it out for the current one.
The email setting's email type.
curl -X POST 'http://smartman.max-media.io/update-email-settings-ai?ionic=true' \
-H 'Authorization: Bearer <TOKEN>' \
-H 'Content-Type: application/json' \
-d '{ "prompt": "...", "chatId": "...", "aiVersion": "...", "email_type": "..." }'Update an email template from a prompt, written by the AI builder.
Needs a site admin token.
What the AI should do with the email template, in plain words - any language.
The AI chat this request belongs to; its history and language carry over. Leave it out to start a new chat.
Which version of the AI builder to use; leave it out for the current one.
The ID of the email template to change.
curl -X POST 'http://smartman.max-media.io/update-email-template-ai?ionic=true' \
-H 'Authorization: Bearer <TOKEN>' \
-H 'Content-Type: application/json' \
-d '{ "prompt": "...", "chatId": "...", "aiVersion": "...", "item_id": "..." }'{
"chat_id": "6543210fedcba98765432100",
"role": "user",
"text": "Text shown on the site.",
"target_url": "example-item",
"action": "RESPONSE",
"options": [
"example"
],
"medias": [
{
"media": "6543210fedcba98765432100",
"gcs_url": "example-item",
"gemini_uri": "example",
"gemini_interaction_id": "example",
"_id": "6543210fedcba98765432100"
}
],
"products": [
"6543210fedcba98765432101"
],
"services": [
"6543210fedcba98765432101"
],
"blogposts": [
"6543210fedcba98765432101"
],
"programs": [
"6543210fedcba98765432101"
],
"suggestions": [
{
"text": "Text shown on the site.",
"route": "example",
"item_id": "6543210fedcba98765432100",
"medias": [],
"picture": "6543210fedcba98765432100",
"_id": "6543210fedcba98765432100"
}
],
"is_system": false,
"_id": "6543210fedcba98765432100",
"updatedAt": "2026-11-04T12:00:00.000Z",
"createdAt": "2026-11-04T12:00:00.000Z",
"data": {
"object": "example",
"object_type": "example",
"edit_summary": "example",
"edit_diff": "example",
"undo_record": "example",
"hero_animation_offer": "example",
"preview_state": "example",
"pending_credit_cost": 0,
"target_restore": "example",
"media_request": "example",
"item_request": "example",
"reference_request": "example"
}
}Update a store email text from a prompt, written by the AI builder.
Needs a site admin token.
What the AI should do with the store email text, in plain words - any language.
The AI chat this request belongs to; its history and language carry over. Leave it out to start a new chat.
Which version of the AI builder to use; leave it out for the current one.
The ID of the store email text to change.
curl -X POST 'http://smartman.max-media.io/update-store-email-text-ai?ionic=true' \
-H 'Authorization: Bearer <TOKEN>' \
-H 'Content-Type: application/json' \
-d '{ "prompt": "...", "chatId": "...", "aiVersion": "...", "item_id": "..." }'{
"chat_id": "6543210fedcba98765432100",
"role": "user",
"text": "Text shown on the site.",
"target_url": "example-item",
"action": "RESPONSE",
"options": [
"example"
],
"medias": [
{
"media": "6543210fedcba98765432100",
"gcs_url": "example-item",
"gemini_uri": "example",
"gemini_interaction_id": "example",
"_id": "6543210fedcba98765432100"
}
],
"products": [
"6543210fedcba98765432101"
],
"services": [
"6543210fedcba98765432101"
],
"blogposts": [
"6543210fedcba98765432101"
],
"programs": [
"6543210fedcba98765432101"
],
"suggestions": [
{
"text": "Text shown on the site.",
"route": "example",
"item_id": "6543210fedcba98765432100",
"medias": [],
"picture": "6543210fedcba98765432100",
"_id": "6543210fedcba98765432100"
}
],
"is_system": false,
"_id": "6543210fedcba98765432100",
"updatedAt": "2026-11-04T12:00:00.000Z",
"createdAt": "2026-11-04T12:00:00.000Z",
"data": {
"object": "example",
"object_type": "example",
"edit_summary": "example",
"edit_diff": "example",
"undo_record": "example",
"hero_animation_offer": "example",
"preview_state": "example",
"pending_credit_cost": 0,
"target_restore": "example",
"media_request": "example",
"item_request": "example",
"reference_request": "example"
}
}