Create actions
Appends one or more actions to a lead's timeline. Only custom actions and PAYMENT actions can be written through this endpoint — built-in types like INCOMING_CALL are recorded by telecrm itself.
Each action in the request is processed independently — failed entries don't block the rest. The response's actions array mirrors the request order; failed entries have action_id: null and status: IGNORED, with details in remarks.
Request
| Field | Value |
|---|---|
| Method | POST |
| URL | https://next.telecrm.in/autoupdate/v2/enterprise/{enterpriseId}/lead/{leadId}/action |
| 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. |
Body
| Field | Type | Required | Description |
|---|---|---|---|
actions | array of object | yes | One or more custom or PAYMENT actions. Custom action type is the bare numeric code. |
Example request
bash
curl -X POST "https://next.telecrm.in/autoupdate/v2/enterprise/{enterpriseId}/lead/603d2b2f9b1e8a001c8e4f5c/action" \
-H "Authorization: Bearer YOUR_SYNC_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"actions": [
{
"type": "1001",
"fields": { "note": "Demo scheduled" }
},
{
"type": "PAYMENT",
"status": "PENDING",
"currency": "INR",
"amount": "10000"
}
]
}'Responses
200 OK
Per-action status. The lead itself is unchanged on validation failures.
json
{
"lead_id": "603d2b2f9b1e8a001c8e4f5c",
"actions": [
{ "action_id": "603d2b2f9b1e8a001c8e4f5d", "status": "CREATED" },
{ "action_id": null, "status": "IGNORED" }
],
"remarks": [
{ "field": "actions[1].fields.email", "status": "IGNORED", "remark": "Email is invalid" }
]
}400 Bad Request
Request-level validation failed — for example, attempting to write an action type that is not a custom or payment action.
json
{
"error": {
"code": "BAD_REQUEST",
"message": "Only custom actions and payment actions can be created"
}
}401 Unauthorized
See the universal 401 in the overview.
404 Not Found
json
{
"error": {
"code": "LEAD_NOT_FOUND",
"message": "Lead with ID 62ab16e was not found."
}
}Notes
- Custom action
typeis the bare numeric code ("1001") — noACTION_prefix. See Actions for the full custom-action format and how to find codes. - Payment actions require
type,status,currency, andamounttogether —amountmust be greater than0. - Actions are appended in the order provided.
- See Pitfalls for action-type restrictions and per-action partial-success handling.