Skip to content
View as Markdown

POST Create Pattern Category

POST
/email-patterns/categories

Create a pattern category, or return the existing one when the slug already exists — the call is idempotent, so a repeat request is safe and returns the original record rather than an error.

The slug is derived from name via sanitize_title(). The response is a bare WordPress-term-shaped object with no message envelope.

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
{
"name": "string"
}

Responses

The created — or already existing — category.

application/json
JSON
{
"id": 0,
"count": 0,
"name": "string",
"slug": "string",
"parent": 0
}

Playground

Authorization
Body

Samples

Powered by VitePress OpenAPI