When to use this endpoint

Use Skill_delete only after confirming the skill is no longer required. The Skills screens use it for individual or bulk deletion, one ID per request.

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 stringYesSkill ID after integer conversion; it must be greater than zero.

Example request

$result = FM_api('Skill_delete', [
	'id' => '42',
]);

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 1.
{"ok":1}The positive ID does not exist; absence is not reported as an error.

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 handler does not verify the skill before deleting and performs no administrator or page-permission check beyond tenant authentication.
  • The two deletes are sequential and not transactional. A failure after the first query can leave partial cleanup.
  • There is no soft-delete state, restore path, filtering, or pagination.

Side effects

  • Hard-deletes the tenant skill row, then hard-deletes every user_skills row with that skill ID.
  • Does not write the tenant deletion log or generic audit history and does not explicitly invalidate a cache.

See it in Fieldmotion

CRM1

Open Users → Skills, choose the delete action, type the confirmation phrase, and inspect the Skill_delete request.

CRM2

Open Users → Skills and use the bulk Delete action. CRM2 calls Skill_delete sequentially for each selected ID after client-side permission and confirmation checks.

Related endpoints