Skip to content
View as Markdown

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:

  • title and content are only applied when present, and each accepts either a plain string or { "raw": "…" } (the shape the block editor sends).
  • category is applied unconditionally. Omitting it clears the category rather than leaving it alone. Send the current value to preserve it.
  • description is applied only when the key is present.
  • sync_status can be set directly, or through meta.wp_pattern_sync_status, which wins when both are sent.
  • wp_pattern_category (array of category ids) overrides category, 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
integer
Required

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"
}
}

Playground​

Authorization
Variables
Key
Value
Body

Samples​

Powered by VitePress OpenAPI