Update an action
Updates an existing action. Constraints by action type:
- Custom actions: any defined field can be updated. Send the action's
typeand only the fields you want to change. - Payment actions: only
statuscan be updated.amount,currency, andpaymentidare immutable on existing payments — sending them returns400.
Request
| Field | Value |
|---|---|
| Method | POST |
| URL | https://next.telecrm.in/autoupdate/v2/enterprise/{enterpriseId}/lead/{leadId}/action/{actionId} |
| Auth | Bearer token (Sync-typed). See Authentication. |
| Headers | Content-Type: application/json |
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
enterpriseId | string | yes | The enterprise (workspace) ID. |
leadId | string | yes | The lead's ID. |
actionId | string | yes | The action's ID. |
Body
The body is the action object to update. The type field must match the action's existing type.
Custom action:
| Field | Type | Required | Description |
|---|---|---|---|
type | string | yes | The custom action's numeric code (e.g. "1001"). |
fields | object | no | Fields to update on the action. |
Payment action:
| Field | Type | Required | Description |
|---|---|---|---|
type | string | yes | Must be "PAYMENT". |
status | string | no | New 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."
}
}