---
title: "Update a Dynamic Caller ID rule"
method: PUT
path: "/dynamic_caller_ids/{id}"
tags: ["Dynamic-Caller-IDs"]
---

# Update a Dynamic Caller ID rule

`PUT /dynamic_caller_ids/{id}`

## Request

- Base URL: `https://api.commpeak.com/portal`
- URL: `https://api.commpeak.com/portal/dynamic_caller_ids/{id}`
- Auth: API key in header `Authorization`

Updates a Dynamic Caller ID rule by its `id`. Only the fields sent are changed. SIP accounts using the rule are updated with the change. The same restrictions as on create apply.

## Path parameters

- `id` integer, required: Dynamic Caller ID rule identifier.

## Request body

- DynamicCallerIdRequest: Body of `POST /portal/dynamic_caller_ids` and `PUT /portal/dynamic_caller_ids/{id}`.
  - `dynamic_caller_id` DynamicCallerIdInput, required: Rule settings. `condition` and `action` are required on create; on update only the fields sent are changed.
    - `name` string, nullable: Rule name.
    - `condition` string, nullable: Destinations the rule applies to: `any`, `country` or `prefix` (required on create).
    - `prefix` string, nullable: Country dialing code (`country`) or destination prefix (`prefix`); required for those conditions.
    - `action` string, nullable: `from` passes the caller's Caller ID, `blocked` makes it anonymous, `fixed` replaces it (required on create).
    - `caller_id_number` string, nullable: Caller ID number for `fixed` (required for it).
    - `caller_id_name` string, nullable: Caller ID name for `fixed`.

## Response `200`

Successful Response

- DynamicCallerIdResponse: Envelope returned by the single-rule methods.
  - `dynamic_caller_id` DynamicCallerIdItem, required: A Dynamic Caller ID rule: which Caller ID is presented for calls of a SIP account.
    - `id` integer, required: Rule identifier.
    - `name` string, nullable: Rule name.
    - `condition` string, nullable: Destinations the rule applies to: `any`, `country` or `prefix`.
    - `prefix` string, nullable: Country dialing code or destination prefix (empty for `any`).
    - `action` string, nullable: `from`, `blocked` or `fixed`.
    - `caller_id_number` string, nullable: Caller ID number for `fixed`.
    - `caller_id_name` string, nullable: Caller ID name for `fixed`.
    - `verified` boolean, nullable: False when the `fixed` Caller ID is not verified; such rules can't be assigned to SIP accounts.
    - `sip_accounts` string[], nullable: Display tokens of the SIP accounts using the rule.

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/commpeak/apis/commpeak-portal-api.md) - [All operations](https://skmtc.dev/commpeak/apis/commpeak-portal-api/llms.txt) - [OpenAPI document](https://skmtc.dev/commpeak/apis/commpeak-portal-api/revisions/df57b0c16367?raw)
