Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to bexio

Scalekit connector
Open markdown

The bexio connector lets your AI agent act in each user's bexio account. Each user connects their own bexio access token once, and Scalekit sends it with every call, so your agent never handles credentials. It comes with 60 tools.

Tools
60
What they doRead · write · destructive
33 · 23 · 433 read23 write4 destructive
Users sign in with

Setup

  1. Install the SDK

    Terminal window
    npm install @scalekit-sdk/node dotenv
  2. Set your credentials

    Add your Scalekit credentials to your .env file. Find values in app.scalekit.com > Developers > API Credentials.

    .env
    SCALEKIT_ENVIRONMENT_URL=<your-environment-url>
    SCALEKIT_CLIENT_ID=<your-client-id>
    SCALEKIT_CLIENT_SECRET=<your-client-secret>
  3. Create the bexio connection

    In AgentKit > Connections, create a bexio connection. The name you give it is the connection_name your code passes. See Configure connections.

  4. Authorize a user and make your first call

    quickstart.mts
    import { ScalekitClient } from '@scalekit-sdk/node'
    import 'dotenv/config'
    import { createInterface } from 'node:readline/promises'
    const scalekit = new ScalekitClient(
    process.env.SCALEKIT_ENVIRONMENT_URL,
    process.env.SCALEKIT_CLIENT_ID,
    process.env.SCALEKIT_CLIENT_SECRET,
    )
    const actions = scalekit.actions
    const connector = 'bexio'
    const identifier = 'user_123'
    // Generate an authorization link for the user
    const { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })
    console.log('Authorize bexio:', link)
    const rl = createInterface({ input: process.stdin, output: process.stdout })
    await rl.question('Press Enter after authorizing...')
    rl.close()
    // Make your first call
    const result = await actions.executeTool({
    connector,
    identifier,
    toolName: 'bexio_accounts_list',
    toolInput: {},
    })
    console.log(result)
    Terminal window
    npx tsx quickstart.mts

    Each user opens the link once and enters their bexio credentials there. See Authorize a user for the full flow and statuses.

Tools

Pass the exact name to execute_tool
Try in PlaygroundRequest a tool
  • bexio_accounts_listList the chart of accounts.Read-only

    List Accounts

    List the chart of accounts. Returns an array of objects with id, uuid, account_no, name, account_type, tax_id, fibu_account_group_id, is_active. Use bexio_accounts_list to find an account ID.

    Inputs

    limitinteger
    Maximum number of results (up to 2000, default 500). Example: 100
    offsetinteger
    Number of results to skip. Example: 0
  • bexio_bill_getGet one supplier bill.Read-only

    Get Supplier Bill

    Get one supplier bill. Returns an object with id, document_no, title, status, firstname_suffix, lastname_company, created_at, supplier_id, vendor_ref, pending_amount, and more. Use bexio_bill_get for one bill.

    Inputs

    bill_idstringrequired
    Bill ID (UUID). Example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
  • bexio_bills_listList supplier bills (purchase invoices), filtered by status or date.Read-only

    List Supplier Bills

    List supplier bills (purchase invoices), filtered by status or date. Returns data[] (each with id, document_no, title, status, firstname_suffix, lastname_company, vendor, created_at) plus paging. Use bexio_bills_list to review payables. Use bexio_bill_get for one bill.

    Inputs

    average_exchange_rate_enabledboolean
    Indicates whether 'average_exchange_rate_enabled' is enabled, or not. Example: False
    bill_date_endstring
    Filter for Bill 'bill_date', the latest accepted date. Example: 2019-04-27
    bill_date_startstring
    Filter for Bill 'bill_date', the earliest accepted date. Example: 2019-04-19
    currency_codestring
    Filter for Bill 'currency_code', text containing in field. Example: CHF
    document_nostring
    Filter for Bill 'document_no', text containing in field. Example: DC-123
    due_date_endstring
    Filter for Bill 'due_date', the latest accepted date. Example: 2019-05-27
    due_date_startstring
    Filter for Bill 'due_date', the earliest accepted date. Example: 2019-05-19
    gross_maxnumber
    Filter for Bill 'gross', the greatest accepted value. Example: 465.75
    gross_minnumber
    Filter for Bill 'gross', the lowest accepted value. Example: 438.32
    limitinteger
    Maximum number of results (up to 500). Example: 100
    net_maxnumber
    Filter for Bill 'net', the greatest accepted value. Example: 465.75
    net_minnumber
    Filter for Bill 'net', the lowest accepted value. Example: 438.32
    orderstring
    Sorting order. Example: ['asc', 'desc']
    pageinteger
    Page number. Example: 1
    pending_amount_maxnumber
    Filter for Bill 'pending_amount', the greatest accepted value. Example: 465.75
    pending_amount_minnumber
    Filter for Bill 'pending_amount', the lowest accepted value. Example: 438.32
    search_termstring
    Term for which application will look for (minimum 3 signs, maximum 255 signs) Example: term
    sortstring
    Field to sort by. Example: document_no
    statusstring
    Filter for Bill 'status' (DRAFTS: [DRAFT], TODO: [BOOKED, PARTIALLY_CREATED, CREATED, PARTIALLY_SENT, SENT, PARTIALLY_DOWNLOADED, DOWNLOADED, PARTIALLY_PAID, PARTIALLY_FAILED, FAILED], PAID: [PAID], OVERDUE: [BOOKED, PARTIALLY_CREATED, CREATED, PARTIALLY_SENT, SENT, PARTIALLY_DOWNLOADED, DOWNLOADED, PARTIALLY_PAID, PARTIALLY_FAILED, FAILED]) and for 'onlyOverdue' (DRAFTS: [FALSE], TODOS: [FALSE], PAID: [FALSE], OVERD... One of: DRAFTS, TODO, PAID, OVERDUE. Example: TODOone of DRAFTSTODOPAIDOVERDUE
    supplier_idinteger
    Filter for Bill 'supplier_id'. Example: 1234
    titlestring
    Filter for Bill 'title', text containing in field. Example: Some Title
    vendorstring
    Filter for Bill 'vendor', text containing in fields lastname_company and firstname_suffix. Example: bexio ag
    vendor_refstring
    Filter for Bill 'vendor_ref', text containing in field. Example: reference
  • bexio_company_profile_listGet the company profile (name, address, VAT number, bank details).Read-only

    Get Company Profile

    Get the company profile (name, address, VAT number, bank details). Returns an array of objects with id, name, address, address_nr, postcode, city, country_id, legal_form. Use bexio_company_profile_list for the company details of the account.

    Inputs

    This tool takes no inputs.

  • bexio_contact_getGet one contact with address, email, phone and groups.Read-only

    Get Contact

    Get one contact with address, email, phone and groups. Returns an object with id, nr, contact_type_id, name_1, name_2, salutation_id, salutation_form, title_id, titel_id, birthday, and more. Use bexio_contact_get for one contact.

    Inputs

    contact_idintegerrequired
    Contact ID, from bexio_contacts_list or bexio_contacts_search. Example: 4
    show_archivedboolean
    Show archived elements only. Example: True
  • bexio_contact_groups_listList contact groups.Read-only

    List Contact Groups

    List contact groups. Returns an array of objects with id, name. Use bexio_contact_groups_list to find contact_group_ids.

    Inputs

    limitinteger
    Maximum number of results (up to 2000, default 500). Example: 100
    offsetinteger
    Number of results to skip. Example: 0
    order_bystring
    Sort field, optionally with _asc or _desc; combine several with commas. One of: id, name. Example: id_descone of idname
  • bexio_contact_relations_listList relations between contacts (for example a person working at a company).Read-only

    List Contact Relations

    List relations between contacts (for example a person working at a company). Returns an array of objects with id, contact_id, contact_sub_id, description, updated_at. Use bexio_contact_relations_list to see who belongs to which company.

    Inputs

    limitinteger
    Maximum number of results (up to 2000, default 500). Example: 100
    offsetinteger
    Number of results to skip. Example: 0
    order_bystring
    Sort field, optionally with _asc or _desc; combine several with commas. One of: id, contact_id, contact_sub_id, updated_at. Example: id_descone of idcontact_idcontact_sub_idupdated_at
  • bexio_contacts_listList contacts (companies and people).Read-only

    List Contacts

    List contacts (companies and people). Returns an array of objects with id, nr, contact_type_id, name_1, name_2, salutation_id, salutation_form, title_id. Use bexio_contacts_list to browse. Use bexio_contacts_search to find contacts by name, email or other fields.

    Inputs

    limitinteger
    Maximum number of results (up to 2000, default 500). Example: 100
    offsetinteger
    Number of results to skip. Example: 0
    order_bystring
    Sort field, optionally with _asc or _desc; combine several with commas. One of: id, nr, name_1, updated_at. Example: id_descone of idnrname_1updated_at
    show_archivedboolean
    If true, list archived contacts only. Example: false