PUT
/
sandbox
/
connections
/
accounts
import Finch from '@tryfinch/finch-api';

const client = new Finch({
  accessToken: 'My Access Token',
});

async function main() {
  const account = await client.sandbox.connections.accounts.update({ connection_status: 'reauth' });

  console.log(account.account_id);
}

main();
{
  "connection_id": "a237a1c3-1a5e-44ae-a8fd-81f76fd715c2",
  "company_id": "b2e6a1c3-1a5e-44ae-a8fd-81f76fd715cf",
  "account_id": "449e7a5c-69d3-4b8a-aaaf-5c9b713ebc65",
  "provider_id": "gusto",
  "authentication_type": "credential",
  "products": [
    "company"
  ]
}

Authorizations

Authorization
string
header
required

Please use your Access Token

Body

application/json
connection_status
enum<string>
Available options:
pending,
processing,
connected,
error_no_account_setup,
error_permissions,
reauth

Response

200 - application/json
OK
account_id
string
requireddeprecated

[DEPRECATED] Use connection_id to associate a connection with an access token

authentication_type
enum<string>
required
Available options:
credential,
api_token,
oauth,
assisted
company_id
string
requireddeprecated

[DEPRECATED] Use connection_id to associate a connection with an access token

provider_id
string
required

The ID of the provider associated with the access_token

products
string[]
required
connection_id
string

The ID of the new connection