CRM v1 current
crm. contact_ added
Adds a person (name, and optionally email, phone and role) to a client's record, naming the client. Does not make them the primary contact and does not create the client. If someone with that email or phone already existed, the reply says so but does not block it.
Last updated
POST /api/v1/actions/crm.contact_added- Key scope
crm.contact_added@1- Workspace permission
api.crm.contact_addedoff 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
| field | type | rules | |
|---|---|---|---|
client | string | required | min 1 · max 200 |
name | string | required | min 1 · max 200 |
email | string (email) | optional | max 320 |
phone | string | optional | min 5 · max 40 |
role | string | optional | min 1 · max 120 |
Response — output when status is done
| field | type | rules | |
|---|---|---|---|
clientId | string | required | |
clientName | string | required | |
contactId | string | required | |
possibleDuplicate | boolean | required |
Example
# One request, one idempotency key: retrying with the same key never runs twice.
curl -X POST https://niiko.org/api/v1/actions/crm.contact_added \
-H "Authorization: Bearer nk_…" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"client": "…",
"name": "…"
}'
# 200 → done · 202 → pending_approval (a person signs later) · 4xx → refused, with a named reasonWhy 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-sdk | niiko.addedContact() |
| niiko (Python) | niiko.added_contact() |
| niiko-cli | niiko run crm.contact_added |
| n8n-nodes-niiko | crmContactAdded |
| niiko-mcp-server | crm_contact_added |