---
title: "Create Connect session to refresh"
method: POST
path: "/connect_sessions/refresh"
tags: ["Connect Sessions"]
---

# Create Connect session to refresh

`POST /connect_sessions/refresh`

Allows you to create a connect session, which will be used to access Salt Edge Connect to refresh a connection.

## Request body

- RefreshSessionRequestBody
  - `data` object, required
    - `connection_id` string, required — the `id` of the connection you wish to reconnect
    - `attempt` AttemptRequestBody
      - `fetch_scopes` string[] — fetching mode. Defaults to [consent](#consents-object) scopes. The allowed values for this parameter must comply to the [consent](#consents-object) `scopes` restriction.
      - `from_date` string, date — date from which you want to fetch data for your connection. Defaults to [consent](#consents-object) `from_date`. The allowed values for this parameter must be within exactly 365 days ago and it should comply to the fetching period restrictions in the [consent](#consents-object).
      - `to_date` string, date — date until which you want to fetch data for your connection. Defaults to `null` (today). The allowed values for this parameter must be equal or more than `from_date` and less or equal than tomorrow. Also it should comply to the fetching period restrictions in the [consent](#consents-object).
      - `fetched_accounts_notify` boolean — whether Salt Edge should send a success callback after fetching accounts.
      - `custom_fields` object — a JSON object, which will be sent back on any of your callbacks.
      - `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`.
      - `include_natures` string[], nullable — the natures of the accounts that need to be fetched. Check [accounts attributes](#accounts-attributes) for possible values. If `null`, all accounts will be fetched.
      - `customer_last_logged_at` string, date-time — the datetime when user was last active in your application
      - `exclude_accounts` string[] — array of [account `ids`](#accounts-list) which will not be fetched. Applied to `reconnect` and `refresh` atempts.
      - `store_credentials` boolean, required — whether the credentials should be stored on Salt Edge side
      - `unduplication_strategy` string — This parameter mandates how duplicated transactions are managed. Possible values include: `mark_as_pending`, `mark_as_duplicate`, `delete_transactions`. The default is set to `mark_as_pending`. The provided value remains unchanged until other value is sent on [connect_session/reconnect](/account_information/v5/#connections-reconnect) or [connect_session/refresh](/account_information/v5/#connections-refresh). - `mark_as_pending` - leaves identified duplicated transactions in `Pending` status for clients that establish connections with providers having a non-null `custom_pendings_period` - `mark_as_duplicate` - identifies transactions as duplicated and sets the `duplicated` flag to `true` - `delete_trasactions` - removes identified duplicated transactions
      - `user_present` boolean — whether the request was initiated by the end-user of your application. It is taken into account only for PSD2-compliant providers and used for `reconnect` and `refresh`.
      - `return_to` string — the URL the user will be redirected to, defaults to client's home URL. If the provider has `api` mode and interactive `true` then this field is `mandatory`.
    - `daily_refresh` boolean — whether the connection should be automatically refreshed by Salt Edge.
    - `return_connection_id` boolean — shows whether to append `connection_id` to `return_to` URL.
    - `provider_modes` string[] — restrict the list of the providers to only the ones that have the mode included in the array.
    - `javascript_callback_type` 'iframe' | 'external_saltbridge' | 'external_notify' | 'post_message', nullable — allows you to specify what kind of callback type you are expecting. If `null`, it means that you will not receive any callbacks.
    - `categorization` 'none' | 'personal' | 'business' — the type of categorization applied.
    - `lost_connection_notify` boolean — being sent as `true`, enables you to receive a javascript callback whenever the internet connection is lost during the fetching process. The type of the callback depends on the `javascript_callback_type` you specified. It has the following payload: `{data: {error_class: 'ConnectionLost', error_message: 'Internet connection was lost'}}`.
    - `include_fake_providers` boolean — if sent as `true`, the customers of [live](/general/v5/#live) clients will be able to connect [fake providers](#providers-fake).
    - `return_error_class` boolean — whether to append `error_class` to `return_to` URL.
    - `theme` 'default' | 'dark' — theme of Salt Edge Connect template. If not passed or available for the current template, will use `default`.
    - `connect_template` string — defaults to `Salt Edge Connect` template unless a different template is passed and available for the current client
    - `show_connect_overview` boolean — shows an overview of fetched accounts and balances after fetching was finished.

## Response `200`

OK

- ConnectSessionResponse
  - `data` object
    - `expires_at` string, date-time
    - `connect_url` string

## Other responses

- `400` — The passed `from_date` - `to_date` interval is out of consent `from_date` - `to_date` range
- `404` — We could not find a connection with the requested `connection_id`
- `406` — The accessed provider has the `disabled` status. Hence, is no longer supported

---

[API](https://skmtc.net/saltedge/apis/salt-edge-account-information-api.md) · [All operations](https://skmtc.net/saltedge/apis/salt-edge-account-information-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/saltedge/salt-edge-account-information-api/versions/f18f4f36d0b3/schema)
