Skip to content

Update an action ​

Updates an existing action. Constraints by action type:

  • Custom actions: any defined field except FILE fields can be updated. Send the action's type and only the fields you want to change. Set FILE fields with POST .../action/{actionId}/file.
  • Payment actions: only status can be updated. amount, currency, paymentid and employeeid are immutable on existing payments — sending a changed value for any of them returns 400.
  • Attachment actions: cannot be updated — a request for one returns 400. Create a new attachment and delete the old file instead.

Request ​

FieldValue
MethodPOST
URLhttps://next.telecrm.in/autoupdate/v2/enterprise/{enterpriseId}/lead/{leadId}/action/{actionId}
AuthBearer token (Sync-typed). See Authentication.
HeadersContent-Type: application/json

Path parameters ​

NameTypeRequiredDescription
enterpriseIdstringyesThe enterprise (workspace) ID.
leadIdstringyesThe lead's ID.
actionIdstringyesThe action's ID.

Body ​

The body is the action object to update. The type field must match the action's existing type.

Custom action:

FieldTypeRequiredDescription
typestringyesThe custom action's numeric code (e.g. "1001").
fieldsobjectnoFields to update on the action.

Payment action:

FieldTypeRequiredDescription
typestringyesMust be "PAYMENT".
statusstringnoNew status. Only this field can change on existing payments.

Example requests ​

Update a custom action's note:

bash
curl -X POST "https://next.telecrm.in/autoupdate/v2/enterprise/{enterpriseId}/lead/603d2b2f9b1e8a001c8e4f5c/action/603d2b2f9b1e8a001c8e4f5d" \
  -H "Authorization: Bearer YOUR_SYNC_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "1001",
    "fields": {
      "note": "Follow-up completed"
    }
  }'

Mark a payment as completed:

bash
curl -X POST "https://next.telecrm.in/autoupdate/v2/enterprise/{enterpriseId}/lead/603d2b2f9b1e8a001c8e4f5c/action/603d2b2f9b1e8a001c8e4f5e" \
  -H "Authorization: Bearer YOUR_SYNC_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "PAYMENT",
    "status": "COMPLETED"
  }'

Responses ​

200 OK ​

Returns the action's current state wrapped in an action key, alongside the lead's ID and any field-level remarks.

Custom action:

json
{
  "leadid": "603d2b2f9b1e8a001c8e4f5c",
  "action": {
    "type": "ACTION_1001",
    "fields": { "note": "Follow-up completed" }
  },
  "remarks": []
}

Payment action:

json
{
  "leadid": "603d2b2f9b1e8a001c8e4f5c",
  "action": {
    "type": "PAYMENT",
    "status": "COMPLETED",
    "currency": "INR",
    "amount": 5000
  }
}

Individual fields that could not be applied — hidden on the action's display schema, or locked by lockAfterCreate — are listed in remarks while the rest of the update still succeeds. remarks is omitted when everything applied cleanly.

400 Bad Request ​

The update is not permitted — either the action type cannot be written through the API, or the request attempts to modify immutable payment fields.

json
{
  "error": {
    "code": "BAD_REQUEST",
    "message": "Cannot update amount, currency, paymentid or employeeid fields for existing payment action"
  }
}

401 Unauthorized ​

See the universal 401 in the overview.

404 Not Found ​

json
{
  "error": {
    "code": "ACTION_NOT_FOUND",
    "message": "Action with ID 62ab16e was not found in the lead."
  }
}