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

const client = new Finch({
  clientId: process.env['FINCH_CLIENT_ID'], // This is the default and can be omitted
  clientSecret: process.env['FINCH_CLIENT_SECRET'], // This is the default and can be omitted
});

async function main() {
  const account = await client.sandbox.connections.accounts.create({
    company_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
    provider_id: 'provider_id',
  });

  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"
  ],
  "access_token": "7eb55bcf-6593-4040-afac-252ee1f78e20"
}

Authorizations

Authorization
string
header
required

Please use base64 encoded client_id:client_secret

Body

application/json

Response

200 - application/json

OK

The response is of type object.