Skip to content
View as Markdown

POST Fetch A Built-In Template​

POST
/templates/built-in-template

Download one of the hosted starter templates and return its content without saving it as a local template. Use it to preview or insert a design; persist it afterwards with POST /templates if the user keeps it.

file is validated against an allowlist before any request is made: the URL must be HTTPS and its host must be fluentcrm.com, wpmanageninja.com (with or without www.), or the host named by the FC_TEMPLATE_API_DOMAIN constant. Anything else is rejected outright — this endpoint cannot be used to fetch arbitrary URLs.

The outbound request enforces TLS verification, a 20-second timeout, no redirects, and a 1 MB response cap. The payload must declare is_fc_template: "yes" and carry usable content, or the call fails.

Required capability: fcrm_manage_email_templates

Enforced by TemplatePolicy::getBuiltInTemplate().

Authorizations​

ApplicationPasswords

WordPress Application Passwords — use Basic auth with your WordPress username and an application password in the format: username:application_password

Type
API Key (header: Authorization)

Request Body​

application/json
JSON
{
"file": "string"
}

Responses​

The downloaded template, not yet saved.

application/json
JSON
{
"message": "string",
"template": {
"post_title": "string",
"post_content": "string",
"email_subject": "string",
"design_template": "string",
"_visual_builder_design": {
}
}
}

Playground​

Authorization
Body

Samples​

Powered by VitePress OpenAPI