When to use this endpoint

Use Skill_createData for the CRM2 Skills screen’s shared create workflow. Use Skill_new when administrator enforcement, trimmed input, and duplicate-name detection are required.

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
nameStringNoStored name. When supplied it is limited to 100 Unicode characters; blank and duplicate names are accepted.
descriptionStringNoStored description with no endpoint length limit; blank is accepted.
cdateDatetime stringNoMapped as a datetime: blank becomes SQL null, but nonblank text is not date-validated. The tenant column is actually an integer timestamp, so integrations should omit this field and let the database default apply.
lastEditedInteger stringNoInteger-converted last_edited. Omission does not generate current time because this legacy map declares the field as int; the database default is used.
idAnyNoIgnored during creation even though it is present in the shared map.

Example request

$created = FM_api('Skill_createData', [
	'name' => 'Electrical testing',
	'description' => 'Qualified to complete electrical tests',
]);

Example response

{
  "ok": 1,
  "id": 42
}

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 parameters."}No writable mapped field or default is present.
{"error":"name is too long."}name exceeds 100 Unicode characters.

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

Behaviour and edge cases

  • At least one of name, description, cdate, or lastEdited must be supplied. Unknown keys are ignored.
  • No filtering or pagination applies; exactly one row is attempted.
  • The shared map/schema mismatch means a nonblank cdate string is handed to an integer database column. The endpoint does not normalize it to Unix time.

Side effects

  • Inserts one tenant skill, advances the skills cache marker, and writes generic field-level audit entries for accepted fields.
  • No user is assigned the new skill and no existing job or form constraint is changed.

See it in Fieldmotion

CRM1

A production-source search found no direct CRM1 caller. CRM1 creates skills through Skill_new.

CRM2

Open Users → Skills and create a row. The shared display widget derives Skill_createData from the singular API prefix and exposes the action according to the page’s client-side permissions.

Related endpoints