When to use this endpoint

Use EmailTemplate_unarchive to reverse EmailTemplate_archive before editing or selecting the template again.

Authentication and permissions

The request must authenticate with signed API-key fields or a logged-in CRM session. The handler requires login and performs no additional page or role-permission check.

The read or write is limited to the authenticated tenant. Notice endpoints that say “current user” use the authenticated session user ID within that tenant.

Parameters

ParameterTypeRequiredDescription
idInteger-compatibleYesTemplate ID. Values are integer-converted and must be at least 1.

Example request

$result = FM_api('EmailTemplate_unarchive', [
	'id' => '152004',
]);

Example response

{"ok":1}

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.
{"error":"missing or invalid parameter: id"}id is absent, zero, blank, or converts below 1.

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

Behaviour and edge cases

  • The endpoint sets archived=0. It does not inspect or otherwise change the template.
  • An unknown ID, or a template that is already active, still returns success because affected-row count is not checked.

Side effects

  • Updates only the template row. This legacy route does not write field history and does not explicitly invalidate the email-template cache.

See it in Fieldmotion

CRM1

Open Settings → Email Templates in CRM1 and filter browser developer tools for the endpoint name. Enable archived rows and choose unarchive to produce this request.

CRM2

No direct production CRM2 caller was found.

Related endpoints