> ## Documentation Index
> Fetch the complete documentation index at: https://docs.famulor.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Mid-call Action

> Modify an existing Mid-call Action in Famulor via API. Update name, endpoint, parameters or description so AI voice agents call the right action.

This endpoint allows you to update an existing Mid-call Action. All fields are optional — only provide the fields you want to update.

### Path Parameters

<ParamField path="id" type="integer" required>
  The unique identifier of the Mid-call Action to update
</ParamField>

### Body Parameters

For Mid-call Actions linked to an Automation Platform flow, the `endpoint`, `method`, and `body_format` fields are ignored to protect the flow connection.

<ParamField body="name" type="string" optional>
  Mid-call Action name — letters, numbers and underscores, starting with a letter or underscore (max 64 characters)
</ParamField>

<ParamField body="description" type="string" optional>
  Detailed explanation of when and how the AI should use this Mid-call Action (max 255 characters)
</ParamField>

<ParamField body="endpoint" type="string" optional>
  Valid URL of the API endpoint to call (max 2048 characters)
</ParamField>

<ParamField body="method" type="string" optional>
  HTTP method: `GET`, `POST`, `PUT`, `PATCH`, or `DELETE`
</ParamField>

<ParamField body="body_format" type="string" optional>
  Request body encoding for write methods: `json` (default) or `form`
</ParamField>

<ParamField body="timeout" type="integer" optional>
  Request timeout in seconds (1-30)
</ParamField>

<ParamField body="headers" type="array" optional>
  HTTP headers to send with the request (replaces existing headers)

  <Expandable title="headers properties">
    <ParamField body="name" type="string" required>
      Header name
    </ParamField>

    <ParamField body="value" type="string" required>
      Header value (supports `{{variable}}` substitution)
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="static_fields" type="array" optional>
  Fixed key/value pairs always sent with the request (replaces existing static fields)

  <Expandable title="static_fields properties">
    <ParamField body="key" type="string" required>
      Field key (max 64 chars)
    </ParamField>

    <ParamField body="value" type="string" optional>
      Field value (max 2048 chars; supports `{{variable}}` substitution)
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="schema" type="array" optional>
  Parameters schema (replaces existing schema)

  <Expandable title="schema properties">
    <ParamField body="name" type="string" required>
      Parameter name (1-64 chars, starts with a letter or underscore)
    </ParamField>

    <ParamField body="type" type="string" required>
      Parameter type: `string`, `number`, `float`, or `boolean`
    </ParamField>

    <ParamField body="description" type="string" required>
      Parameter description (3-255 chars)
    </ParamField>

    <ParamField body="required" type="boolean" optional>
      Whether the AI must collect this parameter (default `false`)
    </ParamField>
  </Expandable>
</ParamField>

### Response Fields

<ResponseField name="message" type="string">
  Success message
</ResponseField>

<ResponseField name="data" type="object">
  The updated Mid-call Action object with all current values
</ResponseField>

<ResponseExample>
  ```json 200 OK theme={null}
  {
    "message": "Tool updated successfully",
    "data": {
      "id": 1,
      "name": "send_notification",
      "description": "Use this tool to send a notification to the customer. Call this when customer requests updates.",
      "type": "http",
      "endpoint": "https://api.yourcompany.com/notifications/send",
      "method": "POST",
      "body_format": "json",
      "timeout": 15,
      "headers": [
        {
          "name": "Content-Type",
          "value": "application/json"
        }
      ],
      "static_fields": [
        {
          "key": "caller",
          "value": "{{customer_phone}}"
        }
      ],
      "schema": [
        {
          "name": "message",
          "type": "string",
          "description": "The notification message to send",
          "required": true
        },
        {
          "name": "send_sms",
          "type": "boolean",
          "description": "Whether to also send SMS notification",
          "required": false
        }
      ],
      "created_at": "2025-10-10T12:00:00.000000Z",
      "updated_at": "2025-10-10T14:30:00.000000Z"
    }
  }
  ```

  ```json 404 Not Found theme={null}
  {
    "message": "Tool not found"
  }
  ```

  ```json 422 Validation Error theme={null}
  {
    "message": "Validation failed",
    "errors": {
      "name": ["Tool name must contain only letters, numbers and underscores, and start with a letter or underscore."]
    }
  }
  ```
</ResponseExample>

### Managing Mid-call Action Assignments

To attach or detach this Mid-call Action from assistants, use the Assistant API:

* **[Create Assistant](/en/api-reference/assistants/create)** — Use the `tool_ids` parameter to attach Mid-call Actions when creating an assistant
* **[Update Assistant](/en/api-reference/assistants/update)** — Use the `tool_ids` parameter to manage which Mid-call Actions are assigned to an assistant

<Tip>
  Need a whole toolset instead of building HTTP actions one by one? Connect an external **MCP server** — tools are discovered automatically. See [MCP Servers](/en/platform/mcp-servers).
</Tip>
