niiko/developers

CRM v1 current

crm.task_created

Creates a reminder (a task with date and time) on a client named by name. Does not log a call: that is crm.call_logged. Does not create the client if it does not exist.

Last updated

POST /api/v1/actions/crm.task_created
Key scope
crm.task_created@1
Workspace permission
api.crm.task_created off by default
Two permissions, not one

Both are needed: a key with that scope, and the workspace owner having switched the permission on. Holding the key is not enough — they are two decisions made by different people.

Request

fieldtyperules
clientstringrequiredmin 1 · max 200
whatstringrequiredmin 1 · max 500
dueAtstring (date-time)required

Response — output when status is done

fieldtyperules
clientIdstringrequired
clientNamestringrequired
taskIdstringrequired
dueAtstringrequired

Example

# One request, one idempotency key: retrying with the same key never runs twice.
curl -X POST https://niiko.org/api/v1/actions/crm.task_created \
  -H "Authorization: Bearer nk_…" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "client": "…",
    "what": "…",
    "dueAt": "2026-09-08T12:00:00.000Z"
  }'
# 200 → done · 202 → pending_approval (a person signs later) · 4xx → refused, with a named reason

Why it may refuse

Each reason names who can fix it and how. With reason stale, detail.message says what to do.

cliente_no_encontradocliente_ambiguodemasiados_clientessin_permiso

In the clients

@vorluno/niiko-sdkniiko.createdTask()
niiko (Python)niiko.created_task()
niiko-cliniiko run crm.task_created
n8n-nodes-niikocrmTaskCreated
niiko-mcp-servercrm_task_created

History