POST
/
link-session
curl --request POST \
  --url http://localhost:8080/link-session \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "settings": {
    "providers": [
      "moneykit"
    ],
    "link_permissions": {
      "requested": [
        {
          "scope": "accounts",
          "reason": "display your account balances",
          "required": true
        }
      ]
    },
    "products": {
      "account_numbers": {
        "required": false,
        "prefetch": false,
        "product": "accounts"
      },
      "identity": {
        "required": false,
        "prefetch": false,
        "product": "accounts"
      },
      "transactions": {
        "required": false,
        "prefetch": false,
        "product": "accounts",
        "extend_history": false
      },
      "investments": {
        "required": false,
        "prefetch": false,
        "product": "accounts"
      }
    },
    "countries": [
      "US"
    ]
  },
  "customer_user": {
    "id": "<string>",
    "email": {
      "address": "<string>",
      "customer_verified_at": "2023-02-16T00:00:00"
    },
    "phone": {
      "number": "+16175551212",
      "country": "US",
      "customer_verified_at": "2023-02-16T00:00:00"
    }
  },
  "existing_link_id": "mk_eqkWN34UEoa2NxyALG8pcV",
  "institution_id": "c7318ff7-257c-490e-8242-03a815b223b7",
  "redirect_uri": "https://yourdomain.com/oauth.html",
  "webhook": "https://yourdomain.com/moneykit_webhook",
  "link_tags": [
    "smoke_test",
    "user_type:admin"
  ],
  "connect_features": {
    "issue_reporter": false,
    "enable_money_id": false
  }
}'
{
  "link_session_token": "c7318ff7-257c-490e-8242-03a815b223b7"
}
curl -i -X POST \
  http://localhost:8080/link-session \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -H 'moneykit-version: 2023-02-18' \
  -d '{
    "settings": {
      "providers": [
        "moneykit"
      ],
      "link_permissions": {
        "requested": [
          {
            "scope": "accounts",
            "reason": "display your account balances",
            "required": true
          }
        ]
      },
      "products": {
        "account_numbers": {
          "required": false,
          "prefetch": false
        },
        "identity": {
          "required": false,
          "prefetch": false
        },
        "transactions": {
          "required": false,
          "prefetch": false,
          "extend_history": false
        }
      },
      "countries": [
        "US"
      ]
    },
    "customer_user": {
      "id": "string",
      "email": {
        "address": "string",
        "customer_verified_at": "2023-02-16T00:00:00"
      },
      "phone": {
        "number": "+16175551212",
        "country": "US",
        "customer_verified_at": "2023-02-16T00:00:00"
      }
    },
    "existing_link_id": "mk_eqkWN34UEoa2NxyALG8pcV",
    "institution_id": "c7318ff7-257c-490e-8242-03a815b223b7",
    "redirect_uri": "https://yourdomain.com/oauth.html",
    "webhook": "https://yourdomain.com/moneykit_webhook",
    "link_tags": [
      "smoke_test",
      "user_type:admin"
    ],
    "moneylink_features": {}
  }'
{
  "link_session_token": "c7318ff7-257c-490e-8242-03a815b223b7"
}
{
  "webhook_event": "link.state_changed",
  "webhook_major_version": 1,
  "webhook_minor_version": 0,
  "webhook_idempotency_key": "string",
  "webhook_timestamp": "2019-08-24T14:15:22Z",
  "link_id": "string",
  "link_tags": [
    "string"
  ],
  "state": "connecting",
  "error": "system_error",
  "error_message": "string"
}

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Headers

moneykit-version
string
default:2023-02-18

Body

application/json

Response

201
application/json

Successful Response

The response is of type object.