---
title: "Bulk partially update phone call legs"
method: PATCH
path: "/public-api/v1/phone_call_legs/bulk_update"
tags: ["phone_call_legs"]
---

# Bulk partially update phone call legs

`PATCH /public-api/v1/phone_call_legs/bulk_update`

## Request

- Base URL: `/` (relative, and the document’s source URL is not known)
- URL: `/public-api/v1/phone_call_legs/bulk_update`
- Auth: HTTP bearer and API key in header `x-tenant-code`

Partially update multiple call-detail records, returning ``{"call_details": [...]}``.

All-or-nothing: an unknown id fails the whole request with ``404``.

## Request body

- CallDetailBulkUpdateRequest: Request body for ``PATCH /phone_call_legs/bulk_update`` (1 to 100 records).
  - `call_details` CallDetailUpdateItem[], required
    - `id` string, uuid, required
    - `exclude_from_aggregation` boolean, nullable
    - `usergroups` CallDetailUpdateUsergroup[], nullable
      - `id` string, uuid, required

## Response `200`

The phone call legs after the partial update.

- CallDetailBulkUpdateResponse: ``{"call_details": [...]}`` — the full updated records.
  - `call_details` AppSchemasCallDetailsCallDetail[], required
    - `id` string, uuid, required
    - `event_type` string, nullable
    - `answered` boolean
    - `circuit_number` string, nullable
    - `circuit_name` string, nullable
    - `from_number` string, nullable
    - `to_number` string, nullable
    - `dial_starts_at` string, date-time, nullable
    - `dial_answered_at` string, date-time, nullable
    - `queueing_starts_at` string, date-time, nullable
    - `queueing_answered_at` string, date-time, nullable
    - `queueing_ends_at` string, date-time, nullable
    - `dial_ends_at` string, date-time, nullable
    - `acw_ends_at` string, date-time, nullable
    - `monitoring_type` string, nullable
    - `group_name` string, nullable
    - `dtmf` string, nullable
    - `keywords` AppSchemasCallDetailsKeyword[]
      - `participant_id` string, uuid, required
      - `starts_at` number, required
      - `value` string, required
    - `participants` AppSchemasCallDetailsParticipant[]
      - `id` string, uuid, required
      - `from_to` string, nullable
      - `type` string, nullable
      - `name` string, nullable
      - `company_name` string, nullable
    - `tags` AppSchemasCallDetailsTag[]
      - `value` string, nullable
      - `creator_type` string, nullable
    - `duration_wait` number, nullable
    - `duration_talk` number, nullable
    - `call_type` 'EXTENSION_ANSWERED' | 'EXTENSION_UNANSWERED' | 'OUTGOING_ANSWERED' | 'OUTGOING_UNANSWERED' | 'INCOMING_ANSWERED' | 'INCOMING_UNANSWERED' | 'AUTOMATIC_RECORD' | 'TRANSFER_ANSWERED' | 'TRANSFER_UNANSWERED': ``call_type`` enum (response field and filter).
    - `customers` ParticipantForItem[]
      - `id` string, uuid, required
      - `from_to` string, nullable
      - `type` string, nullable
      - `name` string, nullable
      - `company_name` string, nullable
      - `analysis` AppSchemasCallDetailsParticipantAnalysis: Per-participant audio analysis (only present on customers/operators).
        - `f0` number, nullable
        - `speechrate` number, nullable
        - `variance` number, nullable
        - `filler_count` integer, nullable
    - `operators` ParticipantForItem[]
      - `id` string, uuid, required
      - `from_to` string, nullable
      - `type` string, nullable
      - `name` string, nullable
      - `company_name` string, nullable
      - `analysis` AppSchemasCallDetailsParticipantAnalysis: Per-participant audio analysis (only present on customers/operators).
        - `f0` number, nullable
        - `speechrate` number, nullable
        - `variance` number, nullable
        - `filler_count` integer, nullable

## Other responses

- `400`: The tenant could not be resolved from the request.
- `401`: Error envelope (`public_api.unauthorized`).
- `403`: The request is not allowed for the current tenant or access configuration.
- `404`: Error envelope (`public_api.not_found`).
- `409`: Error envelope (`public_api.conflict`).
- `413`: The request body exceeds the maximum allowed size.
- `422`: Validation Error
- `429`: Rate limit exceeded. Wait for ``Retry-After`` seconds before retrying.
- `502`: Error envelope (`public_api.internal_error`).
- `503`: The request could not be served right now. Please retry.
- `504`: Error envelope (`public_api.request_timeout`).

---

[API](https://skmtc.dev/miitel/apis/miitel-public-api.md) - [All operations](https://skmtc.dev/miitel/apis/miitel-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/miitel/apis/miitel-public-api/revisions/961732756fa3?raw)
