skills/konecty-update/SKILL.md
Updates records in any Konecty module via PUT /rest/data/:document. Enforces the mandatory pre-update fetch workflow: always fetch the current record first to obtain its _updatedAt (optimistic locking guard), then PUT with ids=[{_id, _updatedAt}] and data={changed fields}. Use when the user wants to update, edit, change, or modify any record in Konecty. Requires an active konecty-session. Use konecty-modules to discover field names and types before updating.
npx skillsauth add konecty/skills konecty-updateInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Update records in any Konecty module. Always fetch first to obtain _updatedAt.
~/.konecty/.env or ~/.konecty/credentials).The Konecty API requires _updatedAt in every update call as an optimistic locking guard. Sending a stale or invented value is rejected with:
[Module] Each id must contain an string field named _id an date field named _updatedAt
Never invent or hardcode _updatedAt — always fetch the current record first.
PUT /rest/data/:document
Body: { "ids": [{ "_id": "...", "_updatedAt": "ISO string or {$date:...}" }],
"data": { ...only the fields you want to change... } }
Response: { "success": true, "data": [{ full updated record }] }
ids: array — supports batch updates (multiple records in one call)data: partial — only changed fields; unmentioned fields are untouchednull in data clears a field ($unset)patch (fetch + update in one step)python3 skills/konecty-update/scripts/update.py patch <Document> <code or _id> \
--data '<changed fields JSON>'
The script fetches the record automatically, prints the _id and _updatedAt found, then performs the update.
fetch then update (full control)# Step 1: fetch to obtain _id and _updatedAt
python3 skills/konecty-update/scripts/update.py fetch <Document> <code or _id>
# Step 2: update with the values from Step 1
python3 skills/konecty-update/scripts/update.py update <Document> \
--ids '[{"_id":"...","_updatedAt":"..."}]' \
--data '<changed fields JSON>'
Use Option B when you want to review current values before updating, or for batch updates.
python3 skills/konecty-update/scripts/update.py patch Contact 16503 \
--data '{"status": "Inativo"}'
# First, fetch to confirm the record and get _updatedAt
python3 skills/konecty-update/scripts/update.py fetch Job 60074
# Then update
python3 skills/konecty-update/scripts/update.py update Job \
--ids '[{"_id":"<id from fetch>","_updatedAt":"<_updatedAt from fetch>"}]' \
--data '{"name": "PROFESSOR TUTOR | Novo Título"}'
python3 skills/konecty-update/scripts/update.py patch Message wyLtwR3aRntZ4a2q8 \
--data '{"status": "Enviada"}'
python3 skills/konecty-update/scripts/update.py patch Contact 16503 \
--data '{"notes": null}'
# Fetch both records first, then update in one call
python3 skills/konecty-update/scripts/update.py update Contact \
--ids '[{"_id":"id1","_updatedAt":"2026-03-16T10:00:00Z"},{"_id":"id2","_updatedAt":"2026-03-16T11:00:00Z"}]' \
--data '{"status": "Inativo"}'
| Type | Send as |
|------|---------|
| text / richText | "string" |
| number / boolean / date / dateTime | native JSON type |
| picklist (single) | "option_key" |
| picklist (multi) | ["key1", "key2"] |
| lookup | { "_id": "record-id" } |
| Clear a field | null |
For the full type reference, see konecty-create/references/field-types.md.
| Error | Cause | Fix |
|-------|-------|-----|
| Each id must contain an string field named _id an date field named _updatedAt | _updatedAt missing or wrong type | Run fetch first; never hardcode |
| Payload must contain an array of ids with at least one item | ids is empty or not an array | Pass at least one {_id, _updatedAt} entry |
| Data must have at least one field | data is empty | Add at least one field to update |
| You don't have permission to update field <name> | Field not updatable by current user | Omit that field |
| Record not found for field <name> | Lookup _id doesn't exist | Verify with konecty-create lookup |
| Value <x> for field <name> is invalid | Picklist value not in options | Check valid options with konecty-modules fields |
See scripts/update.py. Stdlib only.
update.py fetch <Document> <term> # get _id and _updatedAt
update.py update <Document> --ids '<JSON>' --data '<JSON>' # explicit PUT
update.py patch <Document> <term> --data '<JSON>' # fetch + update shortcut
All subcommands accept --host and --token to override credentials.
data-ai
Replace with description of the skill and when the agent should use it.
tools
Upload, list, and delete files in Konecty document fields via the file API. Use this skill whenever the user wants to attach a file to a Konecty record, upload a photo/image to a contact or product, add a PDF or document to an opportunity, send a curriculum to a candidate, manage gallery images for a development or promotion, or attach any binary file to any Konecty module field. Also triggers when the user says 'upload', 'anexar', 'enviar arquivo', 'adicionar imagem', 'attach file', or refers to file-type fields in any document. Automatically reads field constraints (accepted extensions, max size, max file count) from metadata before uploading to catch errors early. Requires an active konecty-session (KONECTY_URL and KONECTY_TOKEN in ~/.konecty/.env or ~/.konecty/credentials).
development
Opens a Konecty session via OTP login (request OTP, then verify OTP) and persists the access token in .env or ~/.konecty/credentials for use by other skills. Use when the user wants to log in to Konecty with OTP, store credentials, set up KONECTY_TOKEN, or establish a session so other Konecty skills can call the API. Only works when the namespace has OTP enabled (email or WhatsApp).
tools
Lists Konecty modules the current session has read access to, and retrieves fields and types for a specific module. Use when the user asks what modules or documents are available in Konecty, wants to know the fields/types of a module, needs to find the internal name of a module (e.g. "contatos", "clientes", "Oportunidade"), or wants to understand what data is accessible. Requires an active session from the konecty-session skill (KONECTY_URL and KONECTY_TOKEN in ~/.konecty/.env).