Skip to content

docs: Add Themes API endpoint documentation (#471)#482

Open
khawarlatifkhan wants to merge 17 commits into
mautic:7.0from
Promptless:promptless/issue-471-themes-api-page
Open

docs: Add Themes API endpoint documentation (#471)#482
khawarlatifkhan wants to merge 17 commits into
mautic:7.0from
Promptless:promptless/issue-471-themes-api-page

Conversation

@khawarlatifkhan
Copy link
Copy Markdown
Contributor

@khawarlatifkhan khawarlatifkhan commented May 3, 2026

Migrates the Themes REST API documentation from legacy markdown to RST format. Content verified against Mautic 7.0 source code. Documents all endpoints (get, list, create, delete) with detailed response properties.

Closes #471

promptless Bot and others added 2 commits May 3, 2026 23:14
Migrate Themes REST API documentation from legacy markdown to RST format.
Content verified against Mautic 7.0 source code (ThemeApiController.php
and ThemeHelper.php). Documents all endpoints: get, list, create, delete.
Adds detailed response properties including theme config fields.
Co-authored-by: promptless[bot] <promptless[bot]@users.noreply.github.com>
@promptless-for-oss promptless-for-oss force-pushed the promptless/issue-471-themes-api-page branch from 614b540 to 749cc08 Compare May 3, 2026 23:30
@khawarlatifkhan khawarlatifkhan requested review from a team, adiati98 and favour-chibueze May 3, 2026 23:30
Comment thread docs/rest_api/themes.rst
@@ -1,14 +1,284 @@
Themes
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ported endpoint documentation structure, PHP code examples, and JSON response examples from the legacy _api_endpoint_themes.md file.

Source: https://github.com/mautic/developer-documentation/blob/main/source/includes/_api_endpoint_themes.md

Comment thread docs/rest_api/themes.rst
}

**Response Properties**

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified API endpoints and behavior against ThemeApiController.php in Mautic 7.0 source. Confirmed newAction, getAction, listAction, and deleteAction methods match documented endpoints.

Source: https://github.com/mautic/mautic/blob/7.x/app/bundles/CoreBundle/Controller/Api/ThemeApiController.php

Comment thread docs/rest_api/themes.rst

* - Name
- Type
- Description
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added response properties (name, key, config, builder) and documented default theme deletion behavior based on ThemeHelper.php. The getInstalledThemes() method returns theme details with config; default themes are hidden rather than deleted.

Source: https://github.com/mautic/mautic/blob/7.x/app/bundles/CoreBundle/Helper/ThemeHelper.php

@adiati98
Copy link
Copy Markdown
Contributor

@mautic/core-team can you please review the content here? TIA! ✨

@adiati98 adiati98 requested a review from a team May 11, 2026 08:39
escopecz
escopecz previously approved these changes May 11, 2026
Copy link
Copy Markdown
Member

@escopecz escopecz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine 👍

Copy link
Copy Markdown
Contributor

@adiati98 adiati98 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@promptless-for-oss please address the suggestions

Comment thread docs/rest_api/themes.rst Outdated
Comment thread docs/rest_api/themes.rst Outdated
Comment thread docs/rest_api/themes.rst Outdated
Comment thread docs/rest_api/themes.rst Outdated
Comment thread docs/rest_api/themes.rst
Comment thread docs/rest_api/themes.rst Outdated
Comment thread docs/rest_api/themes.rst Outdated
Comment thread docs/rest_api/themes.rst Outdated
Comment thread docs/rest_api/themes.rst Outdated
Comment thread docs/rest_api/themes.rst Outdated
Address PR review suggestions from @adiati98:
- Improve intro paragraph and section headers for consistency
- Use "HTTP request" and "Response" as proper RST section headers
- Add "Returns 200 OK" pattern to all Response sections
- Change property headers to proper RST formatting
- Improve wording for theme descriptions and error responses
- Add vale off/on around "Config object properties" header
- Use bullet list format for error conditions
- Update note about default Theme deletion prevention
@promptless-for-oss
Copy link
Copy Markdown

I've addressed all the review suggestions from @adiati98.

Changes applied:

  • Improved intro paragraph and made "Using the Mautic API library" a proper section header with vale off/on
  • Standardized all "HTTP request" and "Response" sections as proper RST headers with = underlines
  • Added "Returns 200 OK" pattern to all Response sections
  • Changed property headers to proper RST subsections with - underlines
  • Added vale off/on around "Config object properties" header
  • Improved wording throughout (e.g., "retrieves the path" instead of "returns the path")
  • Converted error list to bullet point format
  • Updated the note about default Theme deletion prevention

Ready for re-review.

Copy link
Copy Markdown
Contributor

@adiati98 adiati98 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's address the Vale warnings.

@promptless-for-oss please address the suggestions

Comment thread docs/rest_api/themes.rst
Comment thread docs/rest_api/themes.rst
Comment thread docs/rest_api/themes.rst
Comment thread docs/rest_api/themes.rst
Comment thread docs/rest_api/themes.rst Outdated
- Add vale off/on directives around all 4 HTTP request section headers
- Shorten 'application' to 'app' in delete default Themes note
@promptless-for-oss
Copy link
Copy Markdown

Thanks @adiati98 for the review feedback!

I've addressed all your suggestions:

  • Added .. vale off / .. vale on directives around all 4 "HTTP request" section headers to suppress Vale linting warnings
  • Updated the delete default Themes note with the improved wording

The changes have been pushed to this PR branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[DOCS]: Add "Themes" page to branch 7.0

4 participants