Skip to content

Update an action

Updates an existing action. Constraints by action type:

  • Custom actions: any defined field can be updated. Send the action's type and only the fields you want to change.
  • Payment actions: only status can be updated. amount, currency, and paymentid are immutable on existing payments — sending them returns 400.

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 full current state.

json
{
  "type": "PAYMENT",
  "status": "COMPLETED",
  "currency": "INR",
  "amount": "5000"
}

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, or paymentid 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."
  }
}