PUT Update Email Pattern​
PUT
/email-patterns/{id}
Update a pattern. Fields behave differently from one another, so read this before sending a partial payload:
titleandcontentare only applied when present, and each accepts either a plain string or{ "raw": "…" }(the shape the block editor sends).categoryis applied unconditionally. Omitting it clears the category rather than leaving it alone. Send the current value to preserve it.descriptionis applied only when the key is present.sync_statuscan be set directly, or throughmeta.wp_pattern_sync_status, which wins when both are sent.wp_pattern_category(array of category ids) overridescategory, resolving to the first matching category's name.
Changing the title also regenerates the slug as fluentcrm/<sanitised-title>-<id>.
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)
Parameters​
Path Parameters
id*
Pattern id.
Type
Requiredinteger
Request Body​
application/json
JSON
{
"title": "string",
"content": "string",
"category": "string",
"description": "string",
"sync_status": "string",
"meta": {
"wp_pattern_sync_status": "string"
},
"wp_pattern_category": [
0
]
}
Responses​
Pattern updated.
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"
}
}