When to use this endpoint

Use from the Mappings list after checking whether an SFTP source still selects the map.

Authentication and permissions

Use signed API-key authentication or a logged-in CRM session. API keys act as their owner; session requests use dispatcher CSRF protection when configured.

Requires a valid tenant account and View on pageImportsMappings plus Delete. Reads and writes use this account’s tenant tables.

Parameters

ParameterTypeRequiredDescription
idPositive integer or decimal integer stringYesUse the source or tenant row ID returned by its list/table. Fractions, negative numbers, arrays and out-of-range integers are rejected. This is not the import run token.

Example request

$result = FM_api('ImportMappings_delete', ['id'=>'8']);

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": "permission denied"}The user lacks the required Imports page action.
{"error": "missing or invalid parameter: id"}A required row ID is missing or invalid.

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

Behaviour and edge cases

  • Checks whether an owned SFTP source references the map under the account configuration lock. Referenced maps cannot be removed; reassign/retire those sources first.
  • Deletes the existing unreferenced configuration row in a checked tenant transaction with an audit entry. A missing unreferenced map also returns ok; no imported business records, layouts, history or remote files are removed.

Side effects

  • Removes the unreferenced tenant mapping, records a tenant audit and invalidates mapping cache. Existing configuration deletion behavior is retained.

See it in Fieldmotion

CRM1

In CRM1 Settings > Imports > Mappings, click Delete and confirm; inspect ImportMappings_delete.

CRM2

In CRM2 Imports > Mappings, select Delete; bulk removal calls the scalar delete endpoint per ID.

Related endpoints