---
title: "Create a call action"
method: POST
path: "/call-actions"
tags: ["Call Actions"]
---

# Create a call action

`POST /call-actions`

Creates a new call action for an agent. Call actions define automated behaviors that fire at specific points in a call lifecycle.

- **`trigger`** actions fire to initiate an outbound call and require `config.phoneNumberFieldName`.
- **`post-call`** actions fire after a call ends (e.g. to update a CRM record).

## Request body

- object
  - `agentId` string, required — Agent this action belongs to (ObjectId)
  - `category` 'trigger' | 'post-call', required — When the action fires
  - `provider` string, required — Integration provider (e.g. `hubspot`, `salesforce`)
  - `action_type` 'create' | 'update' — The operation to perform on the provider object
  - `object` string — Provider object type to act on (e.g. `contact`, `deal`)
  - `config` object, required
    - `phoneNumberFieldName` string — Provider field name that contains the phone number. Required when `category` is `trigger`.
    - `conditions` CallActionCondition[] — Filter conditions — action only fires when all conditions match
      - `field` string, required — Provider record field name
      - `operator` 'eq' | 'neq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'nin' | 'contains' | 'notContains' | 'startsWith' | 'endsWith', required — Comparison operator
      - `value` string, required — Value to compare against
    - `body` string — Request body template or payload for the provider action

## Response `201`

Call action created

- object
  - `success` boolean
  - `data` CallAction — A call action that fires automatically at a specific point in the call lifecycle
    - `_id` string — MongoDB ObjectId
    - `organization` string — Organization ObjectId
    - `agentId` string — Agent ObjectId this action belongs to
    - `category` 'trigger' | 'post-call' — When the action fires
    - `provider` string — Integration provider (e.g. `hubspot`, `salesforce`)
    - `action_type` 'create' | 'update' — The operation performed on the provider object
    - `object` string — Provider object type (e.g. `contact`, `deal`)
    - `config` object
      - `phoneNumberFieldName` string — Provider field that contains the phone number (required for `trigger` actions)
      - `conditions` CallActionCondition[]
        - `field` string, required — Provider record field name
        - `operator` 'eq' | 'neq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'nin' | 'contains' | 'notContains' | 'startsWith' | 'endsWith', required — Comparison operator
        - `value` string, required — Value to compare against
      - `body` string — Request body template or payload for the provider action
    - `createdAt` string, date-time
    - `updatedAt` string, date-time

## Other responses

- `400` — Invalid input
- `401` — Unauthorized access
- `500` — Internal server error

---

[API](https://skmtc.net/smallest-inc/apis/agent-management-api.md) · [All operations](https://skmtc.net/smallest-inc/apis/agent-management-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/smallest-inc/agent-management-api/revisions/c2d0eb64b01a/schema)
