When to use this endpoint

Use this in the form Report Document editor when presenting the Theme selector.

Authentication and permissions

The request must authenticate with signed API-key fields or a logged-in CRM session and is scoped to the authenticated tenant.

The handler performs no form, department, owner, or page-permission check unless the page below says otherwise. CRM navigation may impose additional UI-only access rules.

Parameters

ParameterTypeRequiredDescription
phpdocxInteger-compatibleNoA value above zero selects document-generator themes. Omitted, zero, and negative values enumerate installed CSS files.

Example request

$themes = FM_api('Forms_listThemes', [
	'phpdocx' => '1',
]);

Example response

{
  "themes": [["base", "Standard Theme"], ["fm", "FieldMotion"]]
}

Errors and unusual responses

ResponseCondition
{"error":"not logged in"}No authenticated tenant context is available. Invalid signed credentials can be rejected by the dispatcher before the handler runs.

Legacy application errors may be returned with HTTP 200. Check the decoded response for error, not only the HTTP status.

Behaviour and edge cases

  • Each theme is [storedValue, displayLabel].
  • CSS mode scans top-level .css files in report-styles/www/css, strips the extension, and uses the basename for both values. No explicit ordering is applied.
  • Document-generator mode always includes base and fm. Tenant IDs 5357 and 79696 receive additional hard-coded themes.

See it in Fieldmotion

CRM1

The Report Document editor sends the current form’s phpdocx_version state to this endpoint.

CRM2

The same Theme selector uses this endpoint.

Related endpoints