Skip to content
View as Markdown

POST Create Email Pattern​

POST
/email-patterns

Create a pattern. title and content are both required and validated before anything is written.

The slug is generated server-side as fluentcrm/<sanitised-title>-<uniqid> and cannot be supplied. content is filtered through wp_kses_post(), so disallowed markup is stripped rather than rejected.

Required capability: fcrm_manage_emails

Enforced by EmailPatternPolicy::verifyRequest(), the policy default for this route group.

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
{
"title": "string",
"content": "string",
"category": "string",
"description": "string",
"sync_status": "unsynced"
}

Responses​

Pattern created.

application/json
JSON
{
"message": "string",
"pattern": {
"id": 0,
"slug": "string",
"title": "string",
"content": "string",
"category": "string",
"description": "string",
"sync_status": "string",
"created_at": "string",
"updated_at": "string"
}
}

Playground​

Authorization
Body

Samples​

Powered by VitePress OpenAPI