---
title: "Update connection"
method: PUT
path: "/connections/{connection_id}"
tags: ["Connections"]
---

# Update connection

`PUT /connections/{connection_id}`

## Request

- Base URL: `https://www.saltedge.com/api/v5`
- URL: `https://www.saltedge.com/api/v5/connections/{connection_id}`
- Auth: API key in header `App-id` and API key in header `Secret`
- TypeScript: <https://skmtc.dev/saltedge/apis/salt-edge-account-information-api/docs/connections/:connection_id/put.ts> (a function with typed inputs; its response is checked against the schema)

Update `status`, `store_credentials`, `daily_refresh` or `categorization` of a connection.

## Path parameters

- `connection_id` string, required: `id` of the connection

## Request body

- UpdateConnectionRequestBody
  - `data` object, required
    - `status` 'inactive'
    - `daily_refresh` boolean: whether the connection will be refreshed daily
    - `store_credentials` boolean: allows to not store credentials on Salt Edge side. <strong>Note:</strong> The usage of this flag is not available for `file` providers. In order to update the connection, reconnect is required. It will not be possible to use refresh option if `store_credentials` is set to `false`
    - `categorization` string: The type of categorization applied. Possible values: `none`, `personal`, `business`. If nothing is sent, the categorization is kept as it was.

## Response `200`

OK

- ConnectionResponse
  - `data` Connection: A connection represents a set of credentials required to access the [accounts](#accounts) and [transactions](#transactions) through a specific [provider](#providers).
    - `id` string, required: the `id` of the connection
    - `secret` string, required: the secret key associated with a specific `connection`. It allows to read the information related to a connection using API keys of type `app`.
    - `provider_id` string, required: the `id` of the provider the connection belongs to
    - `provider_code` string, required: the code of the provider the connection belongs to
    - `provider_name` string, required: the name of the provider the connection belongs to
    - `daily_refresh` boolean, required: whether the connection will be refreshed daily
    - `customer_id` string, required: customer's `id`
    - `created_at` string, date-time, required: time and date when the connection was added
    - `updated_at` string, date-time, required: the last time when the connection's balance was changed, new accounts were imported or new transactions added/removed
    - `last_success_at` string, date-time, required: time when the connection was successfully fetched
    - `status` 'active' | 'inactive' | 'disabled', required
    - `country_code` string, required: code of the country the provider belongs to
    - `next_refresh_possible_at` string, date-time: when the next refresh will be available. May contain `null` value if connection has `automatic_fetch` set as `false`, or is already processing
    - `store_credentials` boolean, required: whether the credentials were stored on our side
    - `last_attempt` SimplifiedAttempt, required
      - `api_mode` 'app' | 'service': the API mode of the customer that queried the API.
      - `api_version` string: the API version in which the attempt was created
      - `automatic_fetch` boolean: whether the connection related to the attempt can be automatically fetched
      - `daily_refresh` boolean: latest assigned value for `daily_refresh` in connection
      - `categorize` boolean: whether attempt is categorized
      - `created_at` string, date-time: when the attempt was made
      - `custom_fields` object: the custom fields that had been sent when creating connection/connect\_session/oauth\_provider
      - `device_type` 'desktop' | 'tablet' | 'mobile': the type of the device that created the attempt.
      - `remote_ip` string: the IP of the device that created the attempt
      - `exclude_accounts` string[]: the `ids` of accounts that do not need to be refreshed
      - `user_present` boolean: whether the request was initiated by the end-user of your application
      - `customer_last_logged_at` string, date-time: the datetime when user was last active in your application
      - `fail_at` string, date-time: when the attempt failed to finish
      - `fail_error_class` string: class of error that triggered the fail for attempt
      - `fail_message` string: message that describes the error class
      - `fetch_scopes` string[]: fetching mode.
      - `finished` boolean: whether the connection had finished fetching
      - `finished_recent` boolean: whether the connection had finished data for recent range
      - `from_date` string, date: date from which the data had been fetched
      - `id` string: `id` of the attempt
      - `interactive` boolean: whether the connection related to the attempt is interactive
      - `locale` string: the language of the Connect widget and of the returned error message(s) in the <a href='http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes' target="_blank">ISO 639-1</a> format. Possible values are: `bg`, `cz`, `de`, `en`, `es-MX`, `es`, `fi`, `fr`, `he`, `hr`, `hu`, `it`, `nl`, `pl`, `pt-BR`, `pt`, `ro`, `ru`, `si`, `sk`, `sv`, `tr`, `uk`, `zh-HK`(Traditional), `zh`(Simplified). Defaults to `en`.
      - `partial` boolean: whether the connection was partially fetched
      - `store_credentials` boolean: whether the credentials were stored on our side
      - `success_at` string, date-time: when the attempt succeeded and finished
      - `to_date` string, date-time: date until which the data has been fetched
      - `updated_at` string, date-time: when last attempt update occurred
      - `show_consent_confirmation` boolean: whether any consent was given for this connection
      - `include_natures` string[]: the natures of the accounts that need to be fetched
      - `last_stage` Stage
        - `created_at` string, date-time, required: when the stage was created
        - `id` string, required: the `id` of the stage
        - `interactive_fields_names` string[], nullable: the interactive fields that are currently required by the provider. Appears only for the interactive connections
        - `interactive_html` string, nullable: HTML code that shows the current interactive state of the connection. Appears only for the interactive connections
        - `name` 'start' | 'connect' | 'interactive' | 'fetch_holder_info' | 'fetch_accounts' | 'fetch_recent' | 'fetch_full' | 'disconnect' | 'finish', required: the name of the stage.
        - `updated_at` string, date-time, required: when the stage was last updated
    - `show_consent_confirmation` boolean, required: whether any consent was given for this connection on Salt Edge side
    - `last_consent_id` string, required: the `id` of the last [consent](#consents)

## Other responses

- `400`: The JSON request is incorrectly formed
- `404`: We could not find a connection with the requested `connection_id`

## Changes

> 17 revisions in range; 1 not diffed.

- **2023-11-29** `63d394173758`: 1 warning, 2 info
  - removed the optional property `data/last_attempt/categorization` from the response with the `200` status
  - added the new optional request property `data/categorization`
  - added the optional property `data/last_attempt/categorize` to the response with the `200` status
- **2021-07-29** `9eda9646ec8c`: 6 breaking, 8 info
  - the `request` response's property type changed from `string` to `object` for status `400`
  - the `request` response's property type changed from `string` to `object` for status `404`
  - removed the required property `error_class` from the response with the `400` status
  - removed the required property `error_class` from the response with the `404` status
  - …10 more
- **2021-01-23** `cc848bf92055`: 1 breaking
  - the response property `data/next_refresh_possible_at` became optional for the status `200`

[Operation history](https://skmtc.dev/saltedge/apis/salt-edge-account-information-api/changes/connections/:connection_id/put.md)

---

[API](https://skmtc.dev/saltedge/apis/salt-edge-account-information-api.md) - [All operations](https://skmtc.dev/saltedge/apis/salt-edge-account-information-api/llms.txt) - [OpenAPI document](https://skmtc.dev/saltedge/apis/salt-edge-account-information-api/revisions/acda2850de69?raw)
