When to use this endpoint

Use Opportunity_deleteCallback for CRM2’s Delete action in the opportunity callback dialog.

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 stringYesOpportunity ID; it must integer-convert above zero.

Example request

$result = FM_api('Opportunity_deleteCallback', [
	'id' => '481',
]);

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"}The ID is absent or integer-converts below one. This validation runs before login is required.

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

Behaviour and edge cases

  • Removes exactly $.callback and $.callback_notes with JSON_REMOVE; other metadata is preserved.
  • The query does not exclude soft-deleted rows and does not verify that a row or either key exists. Those cases still return success.

Side effects

  • Invalidates the opportunities cache and writes a generic “callback deleted” opportunity audit entry even when no row/key changed.
  • Does not update last_edited or send opportunity notifications.

See it in Fieldmotion

CRM1

No direct production CRM1 caller was found.

CRM2

Open an opportunity callback’s detail dialog and use Delete. The UI exposes the button only with its delete permission, but the server does not repeat that permission check.

Related endpoints