When to use this endpoint

The job date setter calls this after a saved time change. Supply the old/new display values only to describe an already-performed change; calling this endpoint does not reschedule a job.

Authentication and permissions

Signed API-key authentication or a logged-in CRM session is required. The handler uses the authenticated tenant and has no additional role/page check.

The dispatcher also applies user/account and IP restrictions. CRM sessions carrying a CSRF token must supply X-FMCSRF or _csrf; missing or incorrect tokens can be rejected before the handler runs.

Parameters

ParameterTypeRequiredDescription
idInteger stringYesPositive active job ID.
oldDateStringNoDefaults to empty. An all-digit string is treated as Unix seconds and formatted as Y-m-d H:i:s in the PHP timezone; other strings are copied unchanged.
newDateStringNoSame conversion as oldDate; not validated or compared with stored time.

Example request

$result = FM_api('Job_emailChangeDate', [
	'id' => '1042',
	'oldDate' => '2026-10-12 09:00:00',
	'newDate' => '2026-10-12 11:00:00',
]);

Example response

{"ok":1}

Disabled or type-filtered notifications also return ok. With no configured recipient entries, returns {"ok":1,"warnings":["no valid email for notificiation"]}; preserve the wire spelling and plural warnings array.

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"}Missing/nonpositive id.
{"error":"Job not found!"}Job is missing or deleted.
{"error":"Job email queue response was not confirmed. Check mail history before retrying."}Mail failed or returned an ambiguous acknowledgement. Earlier recipients may already be queued; do not repeat automatically.

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

Behaviour and edge cases

  • Only notification_types.job_on_change_date with enabled=1 sends. A nonempty job_type list restricts delivery to a positive job type found in that list.
  • Recipients are assembled from email_customer, email_user, email_creator and email_other. Asset customer mail uses its owner. Addresses are not deduplicated or validated here; blank database addresses can still count as recipient entries. email_other is passed as one entry, unlike the comma-splitting notes helper.
  • Template selection uses the configured default unless the first positive numerically matching form_id override supplies a template_id. Rules for other forms and later duplicates do not override that selection.
  • The body is a from/to sentence followed by the configured text. It contains a literal backslash-n separator in the source rather than a normal newline.
  • No job assignment, completion, edit permission, recipient maximum or pagination check is performed.

Side effects

  • Attempts one type-2 mail call per assembled recipient with job_on_change_date metadata. No job date, edit timestamp or history is changed by this helper.

See it in Fieldmotion

CRM1

Change the scheduled job time. Job_setMeetingTime invokes this server-side with the saved old/new values; filter Job_setMeetingTime in Network.

CRM2

No direct route caller was found. Inspect the scheduling setter request; do not expect a separate browser notification call.

Related endpoints