When to use this endpoint

Use Asset_unarchive from an archived-assets workflow to restore one row hidden by archived=1.

This endpoint does not restore a row soft-deleted with Asset_delete.

Authentication and permissions

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

The lookup and any write use the authenticated tenant; an ID from another tenant cannot be addressed through this call.

Parameters

ParameterTypeRequiredDescription
idInteger stringYesPositive server-side asset ID. The handler does not verify that the row exists, is archived, or is not soft-deleted.

Example request

$result = FM_api('Asset_unarchive', [
	'id' => '4821',
]);

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 or does not convert to a positive integer. This validation precedes login enforcement.

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 update sets archived=0, refreshes last_edited, and sets edited_uuid to Asset_unarchive. It does not clear deleted or ddate.
  • A nonexistent, already-live, or soft-deleted ID still returns success.
  • The asset and deletion-log cache keys are invalidated.
  • This is a single-record mutation with no filtering or pagination.

Side effects

  • Permanently deletes all matching asset deletion-log rows.
  • Writes an asset audit-log entry. The asset update, log deletion, and audit entry are not transactional.

See it in Fieldmotion

CRM1

Switch Assets or a customer’s Assets tab to its archived view, choose Restore, and filter Network requests for Asset_unarchive.

CRM2

No direct production CRM2 call to Asset_unarchive was found.

Related endpoints

  • Asset_archive marks the asset archived and creates a deletion marker.
  • Asset_delete soft-deletes an asset and cannot be reversed by this endpoint.
  • Asset_get confirms whether a non-deleted row remains addressable.