API ReferenceView as MarkdownOpenAPI

Emails

View as Markdown

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.

Retrieve the email

Returns the email.

Admin token

Needs a site admin token.

Returns

Returns the Email object.

Status codes

200 401 500

GET/email
curl -X GET 'http://www.a-plus-solutions.eu/email?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>'
Response
{
  "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"
}

List all emails

Returns the site's emails, newest first unless a sort is given.

Admin token

Needs a site admin token.

Path parameters
typestringRequired

The email's type.

Returns

Returns a list of Email objects.

Status codes

200 401 404 500

GET/email/:type
curl -X GET 'http://www.a-plus-solutions.eu/email/{type}?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>'
Response
[
  {
    "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"
  }
]

Retrieve the email template

Returns the email template.

Admin token

Needs a site admin token.

Returns

Returns the EmailTemplate object.

Status codes

200 401 500

GET/email-template
curl -X GET 'http://www.a-plus-solutions.eu/email-template?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>'
Response
{
  "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"
}

Create an email template

Creates an email template from the fields sent.

Admin token

Needs a site admin token.

Parameters
owner_idobjectid

The email template's owner id.

Returns

Returns the EmailTemplate object.

Status codes

201 400 401 500

POST/email-template
curl -X POST 'http://www.a-plus-solutions.eu/email-template?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>' \
  -H 'Content-Type: application/json' \
  -d '{ "owner_id": "..." }'
Response
{
  "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"
}

Retrieve an email template

Returns one email template, found by its ID.

Admin token

Needs a site admin token.

Path parameters
idstringRequired

The ID of the email template.

Returns

Returns the EmailTemplate object.

Status codes

200 401 404 500

GET/email-template/:id
curl -X GET 'http://www.a-plus-solutions.eu/email-template/{id}?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>'
Response
{
  "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"
}

Update an email template

Changes the fields sent; the others stay as they are.

Admin token

Needs a site admin token.

Path parameters
idstringRequired

The ID of the email template.

Returns

Returns the EmailTemplate object.

Status codes

200 400 401 404 500

PATCH/email-template/:id
curl -X PATCH 'http://www.a-plus-solutions.eu/email-template/{id}?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>'
Response
{
  "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"
}

Delete an email template

Deletes the email template. This cannot be undone.

Admin token

Needs a site admin token.

Path parameters
idstringRequired

The ID of the email template.

Returns

Returns an empty answer on success.

Status codes

200 401 404 500

DELETE/email-templates/:id
curl -X DELETE 'http://www.a-plus-solutions.eu/email-templates/{id}?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>'

Modify an email setting with AI

Use it to change what your automated emails say.

User token

Needs the token of a signed-in user.

Parameters
promptstring

What the AI should do with the email setting, in plain words - any language.

chatIdstring

The AI chat this request belongs to; its history and language carry over. Leave it out to start a new chat.

Status codes

200 401 500

POST/modify-email-settings
curl -X POST 'http://www.a-plus-solutions.eu/modify-email-settings?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>' \
  -H 'Content-Type: application/json' \
  -d '{ "prompt": "...", "chatId": "..." }'

Modify an email template with AI

Use it to design or create the visual look of your emails.

User token

Needs the token of a signed-in user.

Parameters
promptstring

What the AI should do with the email template, in plain words - any language.

chatIdstring

The AI chat this request belongs to; its history and language carry over. Leave it out to start a new chat.

Status codes

200 401 500

POST/modify-email-template
curl -X POST 'http://www.a-plus-solutions.eu/modify-email-template?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>' \
  -H 'Content-Type: application/json' \
  -d '{ "prompt": "...", "chatId": "..." }'

Modify a store email text with AI

Use it to write or customize the body message that appears inside order or subscription emails.

User token

Needs the token of a signed-in user.

Parameters
promptstring

What the AI should do with the store email text, in plain words - any language.

chatIdstring

The AI chat this request belongs to; its history and language carry over. Leave it out to start a new chat.

Status codes

200 401 500

POST/modify-store-email-text
curl -X POST 'http://www.a-plus-solutions.eu/modify-store-email-text?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>' \
  -H 'Content-Type: application/json' \
  -d '{ "prompt": "...", "chatId": "..." }'

Update an email setting with AI

Update an email setting from a prompt, written by the AI builder.

User token

Needs the token of a signed-in user.

Parameters
promptstring

What the AI should do with the email setting, in plain words - any language.

chatIdstring

The AI chat this request belongs to; its history and language carry over. Leave it out to start a new chat.

aiVersionstring

Which version of the AI builder to use; leave it out for the current one.

email_typestring

The email setting's email type.

Status codes

200 401 500

POST/update-email-settings-ai
curl -X POST 'http://www.a-plus-solutions.eu/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 with AI

Update an email template from a prompt, written by the AI builder.

User token

Needs the token of a signed-in user.

Parameters
promptstring

What the AI should do with the email template, in plain words - any language.

chatIdstring

The AI chat this request belongs to; its history and language carry over. Leave it out to start a new chat.

aiVersionstring

Which version of the AI builder to use; leave it out for the current one.

item_idstring

The ID of the email template to change.

Status codes

200 401 500

POST/update-email-template-ai
curl -X POST 'http://www.a-plus-solutions.eu/update-email-template-ai?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>' \
  -H 'Content-Type: application/json' \
  -d '{ "prompt": "...", "chatId": "...", "aiVersion": "...", "item_id": "..." }'
Response
{
  "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 with AI

Update a store email text from a prompt, written by the AI builder.

User token

Needs the token of a signed-in user.

Parameters
promptstring

What the AI should do with the store email text, in plain words - any language.

chatIdstring

The AI chat this request belongs to; its history and language carry over. Leave it out to start a new chat.

aiVersionstring

Which version of the AI builder to use; leave it out for the current one.

item_idstring

The ID of the store email text to change.

Status codes

200 401 500

POST/update-store-email-text-ai
curl -X POST 'http://www.a-plus-solutions.eu/update-store-email-text-ai?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>' \
  -H 'Content-Type: application/json' \
  -d '{ "prompt": "...", "chatId": "...", "aiVersion": "...", "item_id": "..." }'
Response
{
  "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"
  }
}
↑↓ Navigate↵ GoEsc Close