When to use this endpoint

Use Task_get when a task editor needs the standard legacy field set for one active task. Use Task_getRequestedDetails when selecting mapped fields or fetching several tasks.

Authentication and permissions

The request must establish an authenticated tenant context with signed API credentials or a logged-in CRM session. The handler checks for the tenant database prefix rather than calling the normal login guard.

It performs no additional task, page, role, ownership, or privacy-permission check. A caller that knows an active task ID in its tenant can address it regardless of the CRM screens’ visibility rules.

Parameters

ParameterTypeRequiredDescription
idInteger-compatibleYesActive task ID in the authenticated tenant.

Example request

$task = FM_api('Task_get', [
	'id' => '318',
]);

Example response

{
  "privacy": "1",
  "subject": "Confirm access details",
  "due_date": "2026-10-02 09:30:00",
  "id": 318,
  "assigned_to": "17",
  "customer_id": "1042",
  "details": "Confirm the site access details with the customer.",
  "status": "1",
  "resolution": "",
  "time_spent": "0",
  "type": "3",
  "jobIds": [771, 772]
}

Database-backed scalars are normally JSON strings; the explicit id and each jobIds value are integers.

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 below 1.
{"error":"requested task does not exist"}The task is missing or soft-deleted.

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 response shape is fixed; a supplied fields parameter is ignored. There is no pagination.
  • jobIds comes from task/job link rows. The query does not order, deduplicate, or filter linked jobs for deletion, so stale links can remain visible.
  • Privacy, creator, and assignee do not restrict the lookup at handler level.

See it in Fieldmotion

CRM1

Open a task from the Tasks list/calendar or Task Main page. CRM1 calls Task_get before filling the legacy editor and focused field setters.

CRM2

CRM2’s task calendar calls Task_get before opening its edit layout. Most other CRM2 detail widgets use mapped detail routes.

Related endpoints