## Description Adds Swagger API documentation for branded email layouts, including the account-level layout endpoint, Email inbox update field, and generated API schemas. This stacked PR keeps the implementation review in #14936 focused on the product change. Related: [CW-7514](https://linear.app/chatwoot/issue/CW-7514/branded-html-email-templates-per-inboxbrand) Depends on #14936 ## Type of change - [x] This change requires a documentation update ## How to test 1. Run `bundle exec rake swagger:build`. 2. Start Chatwoot locally and open `http://localhost:3000/swagger`. 3. Verify the branded email layout account endpoint and Email inbox `branded_email_layout` field appear in the API reference. ## Checklist - [x] I have performed a self-review of my changes - [x] I have made corresponding changes to the documentation - [x] My changes generate no new warnings
59 lines
1.6 KiB
YAML
59 lines
1.6 KiB
YAML
get:
|
|
tags:
|
|
- Inboxes
|
|
operationId: getAccountBrandedEmailLayout
|
|
summary: Get account branded email layout
|
|
security:
|
|
- userApiKey: []
|
|
description: Get the account-scoped Liquid HTML layout used as the fallback for branded email replies.
|
|
parameters:
|
|
- $ref: '#/components/parameters/account_id'
|
|
responses:
|
|
'200':
|
|
description: Success
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/branded_email_layout'
|
|
'401':
|
|
description: Unauthorized
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/bad_request_error'
|
|
patch:
|
|
tags:
|
|
- Inboxes
|
|
operationId: updateAccountBrandedEmailLayout
|
|
summary: Update account branded email layout
|
|
security:
|
|
- userApiKey: []
|
|
description: Update or clear the account-scoped Liquid HTML layout used as the fallback for branded email replies.
|
|
parameters:
|
|
- $ref: '#/components/parameters/account_id'
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/account_branded_email_layout_payload'
|
|
responses:
|
|
'200':
|
|
description: Success
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/branded_email_layout'
|
|
'401':
|
|
description: Unauthorized
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/bad_request_error'
|
|
'422':
|
|
description: Validation failed
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/bad_request_error'
|