---
title: "Update sources"
method: PATCH
path: "/api/v4/sources"
---

# Update sources

`PATCH /api/v4/sources`

The method allows you to edit sources in batches.

## Headers

- `Content-Type` string

## Request body

- object
  - `RAW_BODY` object[]
    - `id` integer, required — Id of the source you want to edit
    - `name` string — Source name
    - `pipeline_id` integer — Pipeline id. The pipeline might be archived. If not provided, the source will be added to the main pipeline.
    - `default` boolean — A boolean indicates whether this source is the default source.
    - `origin_code` string — Code of the main chat channel of the source. This chat channel will be used when initializing the chat. When specified, it shouldn’t be null, just numbers, double quotations, or more than 20 characters.
    - `services` object — An array of services that are associated with the source. The data from this array is used to display in the website chat button (buttons on the site).
      - `type` string — Service type, currently only one type is supported: whatsapp
      - `pages` object[] — Contains a list of elements that can be selected when setting up the website chat button (buttons to the site)
        - `name` string — The name of the item displayed to the user in the drop-down list when setting up a button on the site
        - `id` string — Identifier of the item in the dropdown list (not displayed to the client and user)
        - `link` string — The id of the user that will be indicated in the messenger button and to which the client will write on the site page. For example, for Whatsapp, the link will be generated as follows: https://wa.me/{Specified phone number}
      - `params` object — An object with source settings.
        - `waba` boolean — Whether the source is official WhatsApp. Should be added to enable Salesbot to work with approved WhatsApp templates in the new Send Message step. This field is optional.
        - `is_supports_list_message` boolean — Shows if the source supports the "List Message" step in Salesbot. It should be added to display a new List Message step in Salesbot.

## Response `200`

200

- object
  - `_total_items` integer
  - `_embedded` object
    - `sources` object[]
      - `id` integer
      - `name` string
      - `pipeline_id` integer
      - `external_id` string
      - `services` unknown[]
        - unknown
      - `default` boolean
      - `origin_code` string
      - `_links` object
        - `self` object
          - `href` string

## Other responses

- `400` — 400
- `401` — 401
- `404` — 404

---

[API](https://skmtc.net/kommo/apis/kommo-api-references.md) · [All operations](https://skmtc.net/kommo/apis/kommo-api-references/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/kommo/kommo-api-references/revisions/f17af4d23c7c/schema)
