---
title: "Update a SIP account"
method: PUT
path: "/sip_accounts/{id}"
tags: ["SIP-Accounts"]
---

# Update a SIP account

`PUT /sip_accounts/{id}`

## Request

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

Updates a SIP account by its `id` (display token). Only the fields sent are changed; omitted fields keep their current values, including the authentication method, IPs and the assigned Dynamic Caller ID rules. When `dynamic_caller_ids` is sent it replaces the assigned rules (same format as on create). Sending `password` (and optionally `username`) changes the SIP credentials; sending `jwt_signature_secret` replaces the JWT signature secret. Accounts provisioned by CommPeak (`editable` false) only allow changing the name, channel limit, tech prefix, features and Caller ID rules. Returns 422 with `errors` when the update is rejected.

## Path parameters

- `id` string, required: SIP account display token.

## Request body

- SipAccountRequest: Body of `POST /portal/sip_accounts` and `PUT /portal/sip_accounts/{id}`.
  - `sip_account` SipAccountInput, required: SIP account settings. On update only the fields sent are changed.
    - `name` string, nullable: Name.
    - `channel_limit` integer, nullable: Concurrent channel limit (0 = unlimited up to the account limit).
    - `default_tech_prefix` string, nullable: Default tech prefix, one of the account's tech prefixes; defaults to the first one.
    - `out_of_balance_message` boolean, nullable: Play a message to the callee when the account is out of balance.
    - `caller_id_fixing` boolean, nullable: Automatically correct the Caller ID format.
    - `auto_nat_fix` boolean, nullable: Automatic NAT traversal fix.
    - `auth_type` string, nullable: Authentication method: `password` (default on create) or `ip`.
    - `username` string, nullable: SIP username (`password` auth); lowercase letters and digits, 8-40 characters.
    - `password` string, nullable: SIP password (`password` auth); letters and digits, 8-40 characters.
    - `ip_acl` string[], nullable: IPs allowed to use the credentials (`password` auth); empty allows any IP.
    - `auth_ips` string[], nullable: Authorized IPs (`ip` auth), single IPs.
    - `jwt_signature_enabled` boolean, nullable: Enable JWT signature authentication (`password` auth).
    - `jwt_signature_secret` string, nullable: JWT signature secret, 32 letters and digits; write-only.
    - `dynamic_caller_ids` SipAccountCallerIdRule[], nullable: Dynamic Caller ID rules of the SIP account. At least one rule for all destinations (`condition` `any`) is required, and only rules with a verified Caller ID can be used. On update the list replaces the assigned rules.
      - `id` integer, nullable: Existing rule id. When set, the other fields are ignored.
      - `name` string, nullable: Rule name (for a new rule).
      - `condition` string, nullable: Destinations the rule applies to: `any`, `country` or `prefix`.
      - `prefix` string, nullable: Country dialing code (`country`) or destination prefix (`prefix`).
      - `action` string, nullable: `from` passes the caller's Caller ID, `blocked` makes it anonymous, `fixed` replaces it.
      - `caller_id_number` string, nullable: Caller ID number for `fixed`; must be a verified Caller ID.
      - `caller_id_name` string, nullable: Caller ID name for `fixed`.

## Response `200`

Successful Response

- SipAccountResponse: Envelope returned by the single-SIP-account methods.
  - `sip_account` SipAccountItem, required: A single SIP account of the customer.
    - `id` string, required: SIP account display token (opaque identifier; not the SIP username).
    - `name` string, required: Human-readable name (empty string when unset).
    - `auth_method` string, required: Authentication method: `password` or `ip`.
    - `username` string, nullable: SIP username (only when `auth_method` is `password`).
    - `ip_acl` string[], nullable: IPs allowed to use the credentials (only when `auth_method` is `password`).
    - `jwt_enabled` boolean, nullable: Whether JWT signature authentication is enabled (only when `auth_method` is `password`).
    - `auth_ips` string[], nullable: Authenticated IPs (only when `auth_method` is `ip`).
    - `channel_limit` integer, required: Maximum concurrent channels (0 = unlimited up to the account limit).
    - `default_tech_prefix` string, nullable: Default tech prefix of the SIP account.
    - `out_of_balance_message` boolean, nullable: Whether a message is played to the callee when the account is out of balance.
    - `caller_id_fixing` boolean, nullable: Whether the Caller ID format is corrected automatically.
    - `auto_nat_fix` boolean, nullable: Whether the automatic NAT traversal fix is enabled.
    - `dynamic_caller_ids` integer[], nullable: Ids of the assigned Dynamic Caller ID rules (see `GET /portal/dynamic_caller_ids`).
    - `editable` boolean, nullable: False for accounts provisioned by CommPeak, whose authentication can't be changed.
    - `active` boolean, required: Whether the SIP account is provisioned and ready for use.

## 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)
