---
title: "Update a tenant"
method: POST
path: "/tenant"
tags: ["Tenant"]
---

# Update a tenant

`POST /tenant`

Set tenant object that already exists.

## Request body

- object
  - `name` string — The name of the tenant.
  - `domain` string — The SIP domain of tenant. It is usually a fully qualified domain name (FQDN). If there is no FQDN, you can also use the IP address of the PBX server as the SIP domain. The SIP domain name is only used for SIP message authentication and does not require analysis.
  - `website` string — The official website of tenant.
  - `timezone` string — The IANA Time Zone names, such as "Asia/Shanghai".
  - `currency` string — The Currency code (ISO 4217).
  - `region` string — A valid country code based on iso3166-1 alpha-3 standard. see: https://www.iso.org/iso-3166-country-codes.html
  - `enable_video_recording` boolean — Allow extension video recording.
  - `enable_audio_recording` boolean — Allow extension audio recording.
  - `enable_dual_track_recording` boolean — Allow dual track recording for calls.
  - `custom_options` string — Some custom configuration options serialized as json string
  - `recording_retention` integer — The retention period in days of recordings.
  - `call_report_retention` integer — The retention period in days of call report files.
  - `log_retention` integer — The retention period in days of audit logs and event logs.
  - `temp_file_retention` integer — The retention period in days of temporary files.
  - `extension_im_disk_quota` string — The maximum size of disk space that the extension user is allowed to have for IM service. Specify a positive number and specify the unit at the same time, KB, MB, GB, PB are all allowed. For example: 100MB, 1000GB. Leave it empty, means unlimited.
  - `office_hours` object
    - `monday` object
      - `enabled` boolean — When enabled, all day is working time, when disabled, all day is vacation time.
      - `ranges` object[] — Multiple start and end time periods make up the working time.
        - `from` string — The start time for office hour with format `HH:MM` in 24 hour clock, such as "09:00". Must be earlier than `to`.
        - `to` string — The start time for office hour with format `HH:MM` in 24 hour clock, such as "17:00". Must be later than `from`.
    - `tuesday` object
      - `enabled` boolean — When enabled, all day is working time, when disabled, all day is vacation time.
      - `ranges` object[] — Multiple start and end time periods make up the working time.
        - `from` string — The start time for office hour with format `HH:MM` in 24 hour clock, such as "09:00". Must be earlier than `to`.
        - `to` string — The start time for office hour with format `HH:MM` in 24 hour clock, such as "17:00". Must be later than `from`.
    - `wednesday` object
      - `enabled` boolean — When enabled, all day is working time, when disabled, all day is vacation time.
      - `ranges` object[] — Multiple start and end time periods make up the working time.
        - `from` string — The start time for office hour with format `HH:MM` in 24 hour clock, such as "09:00". Must be earlier than `to`.
        - `to` string — The start time for office hour with format `HH:MM` in 24 hour clock, such as "17:00". Must be later than `from`.
    - `thursday` object
      - `enabled` boolean — When enabled, all day is working time, when disabled, all day is vacation time.
      - `ranges` object[] — Multiple start and end time periods make up the working time.
        - `from` string — The start time for office hour with format `HH:MM` in 24 hour clock, such as "09:00". Must be earlier than `to`.
        - `to` string — The start time for office hour with format `HH:MM` in 24 hour clock, such as "17:00". Must be later than `from`.
    - `friday` object
      - `enabled` boolean — When enabled, all day is working time, when disabled, all day is vacation time.
      - `ranges` object[] — Multiple start and end time periods make up the working time.
        - `from` string — The start time for office hour with format `HH:MM` in 24 hour clock, such as "09:00". Must be earlier than `to`.
        - `to` string — The start time for office hour with format `HH:MM` in 24 hour clock, such as "17:00". Must be later than `from`.
    - `saturday` object
      - `enabled` boolean — When enabled, all day is working time, when disabled, all day is vacation time.
      - `ranges` object[] — Multiple start and end time periods make up the working time.
        - `from` string — The start time for office hour with format `HH:MM` in 24 hour clock, such as "09:00". Must be earlier than `to`.
        - `to` string — The start time for office hour with format `HH:MM` in 24 hour clock, such as "17:00". Must be later than `from`.
    - `sunday` object
      - `enabled` boolean — When enabled, all day is working time, when disabled, all day is vacation time.
      - `ranges` object[] — Multiple start and end time periods make up the working time.
        - `from` string — The start time for office hour with format `HH:MM` in 24 hour clock, such as "09:00". Must be earlier than `to`.
        - `to` string — The start time for office hour with format `HH:MM` in 24 hour clock, such as "17:00". Must be later than `from`.
  - `outbound_caller_ids` object[] — A collection of outbound caller IDs.
    - `provider_id` string — The unique ID of the resource.
    - `caller_id` string — Outbound caller id.
    - `description` string — The descriptive information about this outbound caller id.
  - `e164` object
    - `enabled` boolean — Enable number processing or not.
    - `international_code` string — The International code.
    - `country` string — Country code.
    - `area_code` string — Area code.
    - `national_code` string — National code.
    - `prefix` string — Add prefix.
    - `remove_special_chars` boolean — Remove special characters in the numbers(the "(" and ")" and spaces).
    - `remove_duplicate_countries` boolean — Remove duplicate countries.
    - `remove_duplicate_area_codes` boolean — Remove duplicate area code.
  - `cdr_event` object
    - `enabled` boolean — Enabled this event or not.
    - `auth` 'DISABLE' | 'BASIC' | 'DIGEST' | 'BEARER' — The authentication method of event URL: Can be either: - `DISABLE`: Disable authentication. - `BASIC`: Use basic authentication. - `DIGEST`: Use digest authentication. - `BEARER`: Use bearer authentication.
    - `username` string — The username for authentication, when auth is `BASIC` or `DIGEST`.
    - `password` string — The password for authentication, when auth is `BASIC` or `DIGEST`.
    - `token` string — The token for authentication, when auth is `BEARER`.
    - `url` string — The event url.
  - `extension_event` object
    - `enabled` boolean — Enabled this event or not.
    - `auth` 'DISABLE' | 'BASIC' | 'DIGEST' | 'BEARER' — The authentication method of event URL: Can be either: - `DISABLE`: Disable authentication. - `BASIC`: Use basic authentication. - `DIGEST`: Use digest authentication. - `BEARER`: Use bearer authentication.
    - `username` string — The username for authentication, when auth is `BASIC` or `DIGEST`.
    - `password` string — The password for authentication, when auth is `BASIC` or `DIGEST`.
    - `token` string — The token for authentication, when auth is `BEARER`.
    - `url` string — The event url.
  - `contact_match_type` 'DISABLE' | 'MATCH_EXACTLY' | 'MATCH_LENGTH' — The match method of contact: Can be either: - `DISABLE`: Disable match. - `MATCH_EXACTLY`: Match exactly. - `MATCH_LENGTH`: Match at least specified number of characters.
  - `contact_match_length` integer — The matched length of characters when contact_match_type is `MATCH_LENGTH`.
  - `contact_append_type` 'DISABLE' | 'APPEND' | 'PREPEND' — Method for adding Group, Queue or DID/DDI Names to Caller ID: Can be either: - `DISABLE`: Do not add. - `APPEND`: Append names. - `PREPEND`: Prepend names.
  - `contact_update_interval` integer — The interval for synchronizing contacts from the server, in minutes.
  - `avatar_file_id` string — The unique ID of the resource.
  - `stir_shaken_cert` string — Content of this certificate file for STIR/SHAKEN support.
  - `stir_shaken_key` string — Content of this private certificate file for STIR/SHAKEN support.

## Response `200`

OK

## Other responses

- `4XX` — Error

---

[API](https://skmtc.net/portsip/apis/portsip-pbx-rest-api.md) · [All operations](https://skmtc.net/portsip/apis/portsip-pbx-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/portsip/portsip-pbx-rest-api/revisions/577415d4a3d5/schema)
