Skip to content

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

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

Path parameters

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

Body

FieldTypeRequiredDescription
actionsarray of objectyesOne 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 type is the bare numeric code ("1001") — no ACTION_ prefix. See Actions for the full custom-action format and how to find codes.
  • Payment actions require type, status, currency, and amount together — amount must be greater than 0.
  • Actions are appended in the order provided.
  • See Pitfalls for action-type restrictions and per-action partial-success handling.