---
title: "Create connection"
method: POST
path: "/connections"
---

# Create connection

`POST /connections`

## Request

- Base URL: `https://api.open-finance.ai/v2`
- URL: `https://api.open-finance.ai/v2/connections`
- Auth: OAuth 2
  - Client credentials
  - Token URL: `https://api.open-finance.ai/oauth/token` scopes: `create:connections`

## Request body

- object
  - `customerId` string: The ID of the customer (business ID / national ID) created through an extended journey (like loans)
  - `startDate` string, date: The date which from transactions would be collected
  - `expiryDate` string, date-time: The date at which the connection should expire
  - `paymentId` string: If this connection is created for a payment process you can define it here with a unique payment identifier
  - `journeyId` string: The journey id the connection was created in
  - `language` 'he' | 'en': The language of the connection (he / en)
  - `externalId` string: An optional external id that can be given to a connection
  - `agentEmail` string: The email of the agent
  - `providerIds` string[]
  - `callbackInformation` CallbackInformation: Webhook and callback configuration stored on the connection (mirrors organization callback shape where applicable)
    - `webhooks` object, nullable
      - `enabled` boolean, nullable: If true, enable webhooks
      - `successUrl` string, nullable: The url endpoint for success events
      - `failUrl` string, nullable: The url endpoint for fail events
      - `abortUrl` string, nullable: The url endpoint for abort events
      - `oauth` object, nullable
        - `enabled` boolean, nullable: Whether OAuth is used to authenticate webhook calls
        - `clientId` string, nullable
        - `clientSecret` string, nullable
        - `audience` string, nullable
        - `scope` string, nullable
        - `tokenUrl` string, nullable
      - `basic` object, nullable: Optional basic-auth configuration for webhooks
        - `enabled` boolean, nullable
        - `username` string, nullable
        - `password` string, nullable
        - `tokenUrl` string, nullable
      - `customHeaders` object, nullable: Extra HTTP headers sent with webhook requests
      - `products` string[], nullable: Which products emit webhooks for this configuration
  - `includeFakeProviders` boolean: If true, this connection can be used for testing purposes vs. a fake bank provider
  - `refreshData` boolean: If true, this connection will automatically get new transactions data
  - `iframe` boolean: If true, this connection send post messages for status notifications in an iframe
  - `psuId` string: incase you want to define ahead of time the user national id of passport and block him from changing it
  - `psuCorporateId` string: incase you want to define ahead of time the user corporate id and block him from changing it
  - `redirectUrl` string: An optional url to be redirected after a successful connection
  - `connectionMode` string
  - `allowBusiness` boolean: If true this connection will allow business accounts
  - `access` object: The access object is used to define the permissions you want to give to the connection
    - `accounts` object[]
      - `iban` string: The account iban number
      - `bban` string: The account bban number
    - `balances` object[]
      - `iban` string: The account iban number
      - `bban` string: The account bban number
    - `transactions` object[]
      - `iban` string: The account iban number
      - `bban` string: The account bban number
  - `restrictedTo` string[]: The restrictedTo object is used to define the permissions you want to give to the connection
  - `psuIdType` string: The type of the PSU ID, validated based on the provider ID.
  - `isPlaidSandbox` boolean: If true, this connection will be treated as a sandbox connection for Plaid.
  - `redirectWithoutButtonClick` boolean: If true, this connection will be redirected automatically without the user needing to click a button.
  - `allowInsurance` boolean: If true, this connection will allow insurance-related data to be accessed.

## Response `201`

Response

- object
  - `id` string: A unique identifier for the connection
  - `connectUrl` string: A link forwarding the end-user to the consent journey

## Other responses

- `400`: production access is not enabled for this organization, you must include fake providers or contact us
- `401`: Unauthorized access - Invalid access token
- `403`: Forbidden - Access token missing the required permissions to preform this action
- `404`: Organization not found in auth0 token
- `500`: Internal server error

---

[API](https://skmtc.dev/open-finance/apis/data.md) - [All operations](https://skmtc.dev/open-finance/apis/data/llms.txt) - [OpenAPI document](https://skmtc.dev/open-finance/apis/data/revisions/c18eafb2a770?raw)
