When to use this endpoint

Use after an administrator has selected an existing inactive user. This changes active status; it does not create a user or restore a deleted profile.

Pair with User_deactivate for temporary access suspension, keeping the user’s profile and relationships.

Authentication and permissions

Authenticate with signed API-key fields or a logged-in CRM session. Session requests use the dispatcher’s CSRF protection when configured; signed requests follow the API-key authentication flow.

Client administrator access is required (the legacy permissions admin bit). No additional feature bit is required.

The dispatcher applies configured TeamAccess user-record scope before the handler. An explicit target outside that scope returns an error; omitted targets use the current user for the scope check. Active/deleted filtering and additional target checks are described below.

Parameters

ParameterTypeRequiredDescription
idInteger stringYesTarget user ID in the authenticated tenant. Parsed with intval; this is a single-record operation, with no pagination or sort controls.

Example request

$result = FM_api('User_activate', [
	'id'=>'1042',
]);

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": "only admins can do this"}Caller is not a client administrator.
{"error": "missing or invalid parameter: id"}id is omitted, null, or converts to an integer below 1.
{"error": "you cannot activate yourself"}Target is the current user.
{"error": "unknown error occurred. please try again"}The quota or used count could not be obtained.
{"error":"user does not exist"}Owned tenant or global user is absent.
{"error":"You have reached your quota of non-login users. Please contact us to increase your quota. (10 allowed, 10 active)","r":10}Example of a full non-login quota; normal quota wording omits non-login, numbers vary and r is the active count.

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

Behaviour and edge cases

  • Requires an owned tenant user and matching global identity. The caller cannot activate self. If both rows are already active, returns ok without consuming another seat or enforcing capacity for that no-op.
  • Serializes activation on the tenant owner/user and global account. The quota category is the target global identity’s non_login value: normal and non-login allowances/counts are independent. Active identities with a present is_tmp key are excluded consistently with the existing quota inclusion rule.
  • Checks capacity only when the inactive, non-temporary identity needs a seat. Global identity active state, tenant edit markers and activation history are checked; a quota rejection changes neither row.
  • After success, recomputes the cached tenant normal/non-login counts and clears employer/user caches. Activation creates no user and performs no deletion or relationship reassignment.
  • Tenant and global storage can be on separate hosts. Errors never imply distributed rollback or automatic retry after uncertain persistence.

Side effects

  • Updates the global identity row and the tenant user row, with last_edited and an operation-specific edited_uuid; invalidates the employees cache. Both updates are limited by user ID and the authenticated parent account.
  • Writes an entry in tenant user activity logs. It does not send an email, notification or password-reset message.
  • Recalculates active normal and non-login counts separately from tenant users, excluding records with a present meta.is_tmp key; resets cached employer information. No sessions are explicitly revoked or issued.

See it in Fieldmotion

CRM1

Open Users → a user’s Main page and click Activate. Filter for User_activate; CRM1 submits only id and reloads the page on success.

CRM2

No direct caller was found. CRM2’s Activate/Deactivate widget submits active through the generic User updateData flow, rather than this route.

Related endpoints