Documentation
MCPTool reference

Email Templates tools

Arguments, results, errors, and access, confirmation, and retry policy for each Email Templates tool in FloPay MCP, from the reviewed API contract.

Email Templates tools

Generated from the FloPay MCP contract version 1, revision ebaa9d32d80f46bd8ebf1745c98a59606b57a81fca72005cb4508fcbad9f2d00.

EmailTemplate_get

Get an email template

The client's template for one message type: its draft, the published version that is sent, when it was last reset and Flo's current default. A type the client never edited has no draft, no published version and the default source; reading it stores nothing.

PolicyValue
OperationGET /v1/email-templates/{type}
Classread-only
Risklow
Confirmationnot-required
Retrysafe
Rate-limit tierread
Rolesowner, admin, member
Scopesmcp:read

Arguments

ArgumentInTypeRequiredDescription
typepathstringYesThe message type, as GET /email-templates lists it.

Result

Returns 200 with a JSON body.

FieldTypeRequiredDescription
defaultBodyobjectYesFlo's current default for the type: what is sent when the client has nothing published.
defaultBody.contentobjectYesThe slots: subject, heading and paragraphs (required), and optionally preheader, brandedSubject, highlight, button, buttons, closing and variableDefaults. A text slot is one wording or a list of { text, requires? } wordings. Each text is at most 100 KB.
defaultBody.modestringYesAllowed values: structured.
draftobject or objectYesThe unpublished draft, or null when there is none.
lastResetobject or nullYes
lastReset.atstring (date-time)Yes
lastReset.bystringYesWho reset the template.
publishedobject or nullYesThe version that is sent.
published.basedOnDefaultstringYesFingerprint of Flo's default the template was started from.
published.bodyobject or objectYesThe content of the version.
published.modestringYesAllowed values: structured, html.
published.publishedAtstring (date-time)Yes
published.publishedBystringYesWho published it: the user for OAuth calls, the API credential for Basic.
published.versionnumberYes
publishedVersionnumber or nullYesThe version that is sent, or null for the default.
sourcestringYesWhat is sent: the client's published version, or Flo's default. Allowed values: default, published.
typestringYesThe message type.

Errors

StatusDescription
401Client Basic or OAuth2 bearer authentication is required.
404No client email template exists for this message type.

EmailTemplate_getVersion

Get an email template version

One published version with its content.

PolicyValue
OperationGET /v1/email-templates/{type}/versions/{version}
Classread-only
Risklow
Confirmationnot-required
Retrysafe
Rate-limit tierread
Rolesowner, admin, member
Scopesmcp:read

Arguments

ArgumentInTypeRequiredDescription
typepathstringYesThe message type, as GET /email-templates lists it.
versionpathnumberYesThe version number.

Result

Returns 200 with a JSON body.

FieldTypeRequiredDescription
basedOnDefaultstringYesFingerprint of Flo's default the template was started from.
bodyobject or objectYesThe content of the version.
modestringYesAllowed values: structured, html.
publishedAtstring (date-time)Yes
publishedBystringYesWho published it: the user for OAuth calls, the API credential for Basic.
versionnumberYes

Errors

StatusDescription
400The version is not a number.
401Client Basic or OAuth2 bearer authentication is required.
404The client has no such version of this template.

EmailTemplate_list

List email templates

Every email the client can have its own template for, with whether it is sent (enabled, the switch of its emailType in /emails/settings), what is sent (source: default or published, with the publishedVersion and when it was published, publishedAt) and whether there is an unpublished draft.

PolicyValue
OperationGET /v1/email-templates
Classread-only
Risklow
Confirmationnot-required
Retrysafe
Rate-limit tierread
Rolesowner, admin, member
Scopesmcp:read

Arguments

ArgumentInTypeRequiredDescription
pagequeryintegerNo1-based page number for paginated list endpoints. Default: 1. Minimum: 1.
limitqueryintegerNoMaximum number of records to return per page. Default: 20. Minimum: 1. Maximum: 100.
sortquerystringNoSort by one allowed field. Use exactly one of sort[asc] or sort[desc]. Allowed fields: type. Default: type ASC. Allowed values: type.
relationquerystringNoThis endpoint does not support relation aliases. Supplying relation returns 400.
emailTypequerystringNoThe email type of /emails/settings that switches the message on or off. A message no switch controls has none, so it matches no emailType. Equality filter. Pass without operator for exact match or pass any of the following operators: [in]. [in] accepts comma-separated values; blank entries return 400. Allowed values: order_confirmation, payment_receipt, subscription_activation, dunning_first_failure, dunning_retry_failed, dunning_final, payment_declined, refund_confirmation, cancellation_confirmation.
enabledquerystringNoWhether the client sends the email. Equality filter. Pass without operator for exact match. Allowed values: true, false.
sourcequerystringNoWhat is sent: Flo's default, or the client's published version. Equality filter. Pass without operator for exact match. Allowed values: default, published.

Result

Returns 200 with a JSON body.

FieldTypeRequiredDescription
dataarray of objectYes
data[].emailTypestring or nullYesThe email type of /emails/settings that switches this message on or off, or null when none does.
data[].enabledbooleanYesWhether the client sends this email. A message no switch controls is always sent, so it is on.
data[].hasDraftbooleanYes
data[].publishedAtstring (date-time) or nullYesWhen the version that is sent was published: the same value as published.publishedAt of GET /email-templates/{type}. Null exactly when publishedVersion is null, while the default of Flo is sent.
data[].publishedVersionnumber or nullYes
data[].sourcestringYesAllowed values: default, published.
data[].typestringYesThe message type.
limitnumberYes
pagenumberYes
pagesnumberYes
totalnumberYes

Errors

StatusDescription
400A query parameter the list does not support, or a page, limit, sort or filter value it cannot use.
401Client Basic or OAuth2 bearer authentication is required.

EmailTemplate_listVersions

List email template versions

One page of the client's published versions of the template, without their content: newest first unless sort asks for another order.

PolicyValue
OperationGET /v1/email-templates/{type}/versions
Classread-only
Risklow
Confirmationnot-required
Retrysafe
Rate-limit tierread
Rolesowner, admin, member
Scopesmcp:read

Arguments

ArgumentInTypeRequiredDescription
typepathstringYesThe message type, as GET /email-templates lists it.
pagequeryintegerNo1-based page number for paginated list endpoints. Default: 1. Minimum: 1.
limitqueryintegerNoMaximum number of records to return per page. Default: 20. Minimum: 1. Maximum: 100.
sortquerystringNoSort by one allowed field. Use exactly one of sort[asc] or sort[desc]. Allowed fields: publishedAt, version. Default: version DESC. Allowed values: publishedAt, version.
relationquerystringNoThis endpoint does not support relation aliases. Supplying relation returns 400.
publishedByquerystringNoWho published the version: the user for OAuth calls, the API credential for Basic. Equality filter. Pass without operator for exact match or pass any of the following operators: [in]. [in] accepts comma-separated values; blank entries return 400.

Result

Returns 200 with a JSON body.

FieldTypeRequiredDescription
dataarray of objectYesNewest first, unless sort asks for another order.
data[].basedOnDefaultstringYesFingerprint of Flo's default the template was started from.
data[].modestringYesAllowed values: structured, html.
data[].publishedAtstring (date-time)Yes
data[].publishedBystringYesWho published it: the user for OAuth calls, the API credential for Basic.
data[].versionnumberYes
limitnumberYes
pagenumberYes
pagesnumberYes
totalnumberYes

Errors

StatusDescription
400A query parameter the list does not support, or a page, limit, sort or filter value it cannot use.
401Client Basic or OAuth2 bearer authentication is required.
404No client email template exists for this message type.

EmailTemplate_preview

Preview an email template

Renders the draft, or the content currently sent when there is no draft, through the send pipeline with the type's sample data and the client's brand. Problems come back in the body (status: invalid), never as an error. Previewing with a recent email (source: recent) is not available yet: it answers 200 with status: recent_unavailable and a message. A preview changes nothing.

PolicyValue
OperationPOST /v1/email-templates/{type}/preview
Classread-only
Riskmedium
Confirmationnot-required
Retrysafe
Rate-limit tierrestricted
Rolesowner, admin, member
Scopesmcp:read

Arguments

ArgumentInTypeRequiredDescription
typepathstringYesThe message type, as GET /email-templates lists it.
sourcebodystringNoThe data to render with: the type's sample. recent, the client's most recent real email, is not available yet: a preview answers recent_unavailable and a test send 422 not_renderable. Allowed values: sample, recent. Default: sample.

Result

Returns 200 with a JSON body.

FieldTypeRequiredDescription
htmlstringYes
messagestringNoA readable reason, given with recent_unavailable, to show as it is.
problemsarray of objectYesWhat publishing the same content would refuse.
problems[].codestringYesWhy: liquid_parse_error, unknown_variable, missing_required_link, render_error (preview only) or invalid_template.
problems[].columnnumberNo
problems[].linenumberNo
problems[].messagestringYesA readable reason.
problems[].pathstringNoThe variable or slot the reason is about.
statusstringYesrecent_unavailable: previewing with a recent email is not available yet; message says so and nothing is rendered. Preview with source: sample instead. Allowed values: rendered, invalid, no_recent_record, recent_unavailable.
subjectstringYes
textstringYes

Errors

StatusDescription
400The source is not sample or recent.
401Client Basic or OAuth2 bearer authentication is required.
404No client email template exists for this message type.

EmailTemplate_publish

Publish an email template

Validates the draft and publishes it as the next version: from then on it is what customers receive. A draft that fails validation is refused with every reason, and no version is created.

PolicyValue
OperationPOST /v1/email-templates/{type}/publish
Classmutating
Riskmedium
Confirmationrequired
Retrysame-idempotency-key
Rate-limit tiermutation
Rolesowner, admin
Scopesmcp:write

Arguments

ArgumentInTypeRequiredDescription
typepathstringYesThe message type, as GET /email-templates lists it.

Result

Returns 200 with a JSON body.

FieldTypeRequiredDescription
basedOnDefaultstringYesFingerprint of Flo's default the template was started from.
bodyobject or objectYesThe content of the version.
modestringYesAllowed values: structured, html.
publishedAtstring (date-time)Yes
publishedBystringYesWho published it: the user for OAuth calls, the API credential for Basic.
versionnumberYes

Errors

StatusDescription
401Client Basic or OAuth2 bearer authentication is required.
404No client email template exists for this message type.
409There is no draft to publish.
422The draft fails validation; reasons lists every problem.

EmailTemplate_reset

Reset an email template to the default

Discards the draft and unpins the published version, so customers receive Flo's default again. Every published version is kept, and who reset it is recorded.

PolicyValue
OperationPOST /v1/email-templates/{type}/reset
Classmutating
Riskmedium
Confirmationrequired
Retrysame-idempotency-key
Rate-limit tiermutation
Rolesowner, admin
Scopesmcp:write

Arguments

ArgumentInTypeRequiredDescription
typepathstringYesThe message type, as GET /email-templates lists it.

Result

Returns 200 with a JSON body.

FieldTypeRequiredDescription
defaultBodyobjectYesFlo's current default for the type: what is sent when the client has nothing published.
defaultBody.contentobjectYesThe slots: subject, heading and paragraphs (required), and optionally preheader, brandedSubject, highlight, button, buttons, closing and variableDefaults. A text slot is one wording or a list of { text, requires? } wordings. Each text is at most 100 KB.
defaultBody.modestringYesAllowed values: structured.
draftobject or objectYesThe unpublished draft, or null when there is none.
lastResetobject or nullYes
lastReset.atstring (date-time)Yes
lastReset.bystringYesWho reset the template.
publishedobject or nullYesThe version that is sent.
published.basedOnDefaultstringYesFingerprint of Flo's default the template was started from.
published.bodyobject or objectYesThe content of the version.
published.modestringYesAllowed values: structured, html.
published.publishedAtstring (date-time)Yes
published.publishedBystringYesWho published it: the user for OAuth calls, the API credential for Basic.
published.versionnumberYes
publishedVersionnumber or nullYesThe version that is sent, or null for the default.
sourcestringYesWhat is sent: the client's published version, or Flo's default. Allowed values: default, published.
typestringYesThe message type.

Errors

StatusDescription
401Client Basic or OAuth2 bearer authentication is required.
404No client email template exists for this message type.

EmailTemplate_saveDraft

Save an email template draft

Saves the draft: structured slots (mode: structured) or custom HTML (mode: html). Nothing that is sent changes until the draft is published. Each template text is at most 100 KB.

PolicyValue
OperationPUT /v1/email-templates/{type}/draft
Classmutating
Risklow
Confirmationrequired
Retrysame-idempotency-key
Rate-limit tiermutation
Rolesowner, admin
Scopesmcp:write

Arguments

ArgumentInTypeRequiredDescription
typepathstringYesThe message type, as GET /email-templates lists it.

Result

Returns 200 with a JSON body.

FieldTypeRequiredDescription
defaultBodyobjectYesFlo's current default for the type: what is sent when the client has nothing published.
defaultBody.contentobjectYesThe slots: subject, heading and paragraphs (required), and optionally preheader, brandedSubject, highlight, button, buttons, closing and variableDefaults. A text slot is one wording or a list of { text, requires? } wordings. Each text is at most 100 KB.
defaultBody.modestringYesAllowed values: structured.
draftobject or objectYesThe unpublished draft, or null when there is none.
lastResetobject or nullYes
lastReset.atstring (date-time)Yes
lastReset.bystringYesWho reset the template.
publishedobject or nullYesThe version that is sent.
published.basedOnDefaultstringYesFingerprint of Flo's default the template was started from.
published.bodyobject or objectYesThe content of the version.
published.modestringYesAllowed values: structured, html.
published.publishedAtstring (date-time)Yes
published.publishedBystringYesWho published it: the user for OAuth calls, the API credential for Basic.
published.versionnumberYes
publishedVersionnumber or nullYesThe version that is sent, or null for the default.
sourcestringYesWhat is sent: the client's published version, or Flo's default. Allowed values: default, published.
typestringYesThe message type.

Errors

StatusDescription
400The body is not a template: an unknown mode, no subject, or over 100 KB.
401Client Basic or OAuth2 bearer authentication is required.
404No client email template exists for this message type.

EmailTemplate_testSend

Send a test email

Sends the draft, or the content currently sent when there is no draft, to one address as a test. The template, its versions and the switches do not change. Test sends are limited per client. Sending a test with a recent email (source: recent) is not available yet: it answers 422 with status: not_renderable.

PolicyValue
OperationPOST /v1/email-templates/{type}/test-send
Classmutating
Riskmedium
Confirmationrequired
Retrysame-idempotency-key
Rate-limit tiermutation
Rolesowner, admin
Scopesmcp:write

Arguments

ArgumentInTypeRequiredDescription
typepathstringYesThe message type, as GET /email-templates lists it.
sourcebodystringNoThe data to render with: the type's sample. recent, the client's most recent real email, is not available yet: a preview answers recent_unavailable and a test send 422 not_renderable. Allowed values: sample, recent. Default: sample.
tobodystringYesThe one address the test email goes to.

Result

Returns 202 with a JSON body.

FieldTypeRequiredDescription
reasonstring or nullYesWhy the send was refused.
retryAfterSecondsnumber or nullYesSeconds until the client may test-send again.
statusstringYesAllowed values: sent, invalid_address, suppressed, rate_limited, not_renderable.

Errors

StatusDescription
400The address is missing or is not exactly one valid address.
401Client Basic or OAuth2 bearer authentication is required.
404No client email template exists for this message type.
422The content cannot be rendered (not_renderable, also for source: recent, which is not available yet), or the address is on the client's suppression list (suppressed).
429The test-send limit is reached; Retry-After and retryAfterSeconds say when to try again.
503Email delivery is not enabled for the API, so no test email can be sent. Nothing is sent.

EmailTemplateSchema_get

Get the variable schema of one email type

Returns the variables a template of this email type may use, with their types, descriptions, nullability and sample values, the links it must contain, and a preview sample.

PolicyValue
OperationGET /v1/email-templates/schemas/{type}
Classread-only
Risklow
Confirmationnot-required
Retrysafe
Rate-limit tierread
Rolesowner, admin, member
Scopesmcp:read

Arguments

ArgumentInTypeRequiredDescription
typepathstringYesThe email type. Allowed values: customer.order_confirmation, customer.payment_receipt, customer.subscription_activated, customer.subscription_dunning, customer.payment_declined, customer.refund_confirmation, customer.subscription_cancelled, customer.abandoned_cart, customer.subscription_renewal_reminder, customer.trial_ending, customer.dunning_first_failure, customer.dunning_retry_failed, customer.dunning_final.

Result

Returns 200 with a JSON body.

FieldTypeRequiredDescription
sampleobjectYesA preview sample for the whole email: each group's sample, keyed by group.
typestringYesThe email type. Allowed values: customer.order_confirmation, customer.payment_receipt, customer.subscription_activated, customer.subscription_dunning, customer.payment_declined, customer.refund_confirmation, customer.subscription_cancelled, customer.abandoned_cart, customer.subscription_renewal_reminder, customer.trial_ending, customer.dunning_first_failure, customer.dunning_retry_failed, customer.dunning_final.
variablesobjectYesThe variables a template of this type may use, by group (client, customer, items, payment, subscription, checkout_session, links). items is a list; every other group is an object.
versionintegerYesThe schema version. Adding a variable keeps it; removing a deprecated variable raises it by one. Minimum: 1.

Errors

StatusDescription
401Client Basic or OAuth2 bearer authentication is required.
404No email type with this name has a variable schema.

EmailTemplateSchema_list

List email variable schemas

Returns the variable schema of every email type: the variables a template may use, with their types, descriptions, nullability and sample values, the links a template must contain, and a preview sample.

PolicyValue
OperationGET /v1/email-templates/schemas
Classread-only
Risklow
Confirmationnot-required
Retrysafe
Rate-limit tierread
Rolesowner, admin, member
Scopesmcp:read

Arguments

This tool takes no arguments.

Result

Returns 200 with a JSON body.

FieldTypeRequiredDescription
dataarray of objectYesThe variable schema of every email type.
data[].sampleobjectYesA preview sample for the whole email: each group's sample, keyed by group.
data[].typestringYesThe email type. Allowed values: customer.order_confirmation, customer.payment_receipt, customer.subscription_activated, customer.subscription_dunning, customer.payment_declined, customer.refund_confirmation, customer.subscription_cancelled, customer.abandoned_cart, customer.subscription_renewal_reminder, customer.trial_ending, customer.dunning_first_failure, customer.dunning_retry_failed, customer.dunning_final.
data[].variablesobjectYesThe variables a template of this type may use, by group (client, customer, items, payment, subscription, checkout_session, links). items is a list; every other group is an object.
data[].versionintegerYesThe schema version. Adding a variable keeps it; removing a deprecated variable raises it by one. Minimum: 1.

Errors

StatusDescription
401Client Basic or OAuth2 bearer authentication is required.

On this page