> **Building with AI coding agents?** Install the authstack plugin with one command. This equips your agent with accurate Scalekit implementation patterns.
>
> **Recommended** (the `-y` flags skip prompts, so the command runs without an interactive terminal):
> ```bash
> npx -y @scalekit-inc/cli setup -y
> ```
>
> Global:
> ```bash
> npm install -g @scalekit-inc/cli
> scalekit setup -y
> ```
>
> Supports Claude Code, Cursor, GitHub Copilot, Codex + skills for other Agent Skills-compatible agents in `~/.agents/skills`.
> Skills: integrate-agentkit, implement-saaskit, add-mcp-oauth, implement-sso, implement-scim.
> [Full setup guide](https://docs.scalekit.com/dev-kit/build-with-ai/)

---

# Connect AI agents to Splitwise

The Splitwise connector lets your AI agent act in each user's Splitwise account. Each user signs in to Splitwise once, and Scalekit stores and refreshes their tokens, so your agent never handles credentials. It comes with 27 tools.

**Authentication:** OAuth 2.0
**Categories:** Accounting & Finance
**Tools:** 27: 12 read, 10 write, 5 destructive
**Users sign in with:** OAuth
**OAuth app:** Your own Splitwise app
**Built by:** Scalekit connector
**Try it:** [Playground in the Scalekit dashboard](https://app.scalekit.com/ws/signup?sk_intent=playground&provider=SPLITWISE)

## Setup

1. ### Install the SDK

   **Node.js**

   ```bash
   npm install @scalekit-sdk/node dotenv
   ```

   **Python**

   ```bash
   pip install scalekit-sdk-python python-dotenv
   ```

2. ### Set your credentials

   Add your Scalekit credentials to your `.env` file. Find values in **[app.scalekit.com](https://app.scalekit.com)** > **Developers** > **API Credentials**.

   ```sh title=".env"
   SCALEKIT_ENVIRONMENT_URL=<your-environment-url>
   SCALEKIT_CLIENT_ID=<your-client-id>
   SCALEKIT_CLIENT_SECRET=<your-client-secret>
   ```

3. ### Create the Splitwise connection

   In **AgentKit > Connections**, create a Splitwise connection and copy its redirect URI. The name you give it is the `connection_name` your code passes. See [Configure connections](/agentkit/connections/).

4. ### Register an OAuth app

   Splitwise connections use your own OAuth app. Register one with Splitwise and add the redirect URI you copied.

   Then enter the app's Client ID and Client Secret on the Splitwise connection.

5. ### Authorize a user and make your first call

   **Node.js** (`quickstart.mts`)

   ```typescript
   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 = 'splitwise'
   const identifier = 'user_123'

   // Generate an authorization link for the user
   const { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })
   console.log('Authorize Splitwise:', 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: 'splitwise_get_current_user',
     toolInput: {},
   })
   console.log(result)
   ```

   ```bash
   npx tsx quickstart.mts
   ```

   **Python** (`quickstart.py`)

   ```python
   import os
   from scalekit import ScalekitClient
   from dotenv import load_dotenv
   load_dotenv()

   scalekit_client = ScalekitClient(
       env_url=os.getenv("SCALEKIT_ENVIRONMENT_URL"),
       client_id=os.getenv("SCALEKIT_CLIENT_ID"),
       client_secret=os.getenv("SCALEKIT_CLIENT_SECRET"),
   )
   actions = scalekit_client.actions

   connection_name = "splitwise"
   identifier = "user_123"

   # Generate an authorization link for the user
   link_response = actions.get_authorization_link(
       connection_name=connection_name,
       identifier=identifier,
   )
   print("Authorize Splitwise:", link_response.link)
   input("Press Enter after authorizing...")

   # Make your first call
   result = actions.execute_tool(
       tool_input={},
       tool_name="splitwise_get_current_user",
       connection_name=connection_name,
       identifier=identifier,
   )
   print(result)
   ```

   ```bash
   python quickstart.py
   ```

   Each user signs in once. See [Authorize a user](/agentkit/tools/authorize/) for the full flow and statuses.

## Tools

Pass the exact name to `execute_tool`, with an input like each tool's example. To ask for a tool that's missing, use the [request form](https://scalekitsupport.portal.usepylon.com/forms/request-a-connector-tool).

**Node.js**

```typescript
const result = await actions.executeTool({
  toolName: 'splitwise_get_categories',
  toolInput: {},
  connector: 'splitwise',
  identifier: 'user_123',
})
```

**Python**

```python
result = actions.execute_tool(
    tool_name="splitwise_get_categories",
    tool_input={},
    connection_name="splitwise",
    identifier="user_123",
)
```

`result.data` is the app's response as JSON, and `result.execution_id` (`executionId` in Node.js) is the ID of the call.

### `splitwise_get_categories`

List Categories · Read-only

List the expense categories Splitwise supports.
Returns parent categories, each with its subcategories and their IDs.
Use before create_expense to pick a subcategory ID for category_id; parent categories cannot be used directly.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs: none.

Example input: `{}`

### `splitwise_get_comments`

List Expense Comments · Read-only

List the comments on a Splitwise expense.
Returns each comment's id, content, type, author, and created and deleted timestamps.
Use create_comment to add one.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `expense_id` (`integer`, required): Numeric Splitwise ID of the expense.

Example input: `{"expense_id":1}`

### `splitwise_get_currencies`

List Currencies · Read-only

List the currency codes Splitwise accepts.
Returns each currency's code and unit symbol.
Use before create_expense or update_user to pick a valid currency_code.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs: none.

Example input: `{}`

### `splitwise_get_current_user`

Get Current User · Read-only

Get the profile of the authenticated Splitwise user.
Returns id, name, email, registration status, picture, default currency, locale and notification settings.
Use get_user to look up another user by ID. Call this first to learn the user's own ID.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs: none.

Example input: `{}`

### `splitwise_get_expense`

Get Expense · Read-only

Get one Splitwise expense by ID.
Returns the expense with description, cost, currency, date, category, repayments, and each user's paid and owed share.
Use get_expenses to find expense IDs.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `id` (`integer`, required): Numeric Splitwise ID of the expense.

Example input: `{"id":1}`

### `splitwise_get_expenses`

List Expenses · Read-only

List expenses visible to the authenticated user, optionally filtered by group, friend or date.
Returns each expense's id, description, cost, currency, date, category, and per-user paid and owed shares.
Use get_expense for one expense by ID. group_id takes precedence over friend_id.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `dated_after` (`string`, optional): Only return expenses dated after this ISO 8601 date-time.
- `dated_before` (`string`, optional): Only return expenses dated before this ISO 8601 date-time.
- `friend_id` (`integer`, optional): Only return expenses between the authenticated user and this other user.
- `group_id` (`integer`, optional): Only return expenses in this group. When set, friend_id is ignored.
- `limit` (`integer`, optional): Maximum number of expenses to return. Splitwise defaults to 20. Default: `20`.
- `offset` (`integer`, optional): Number of expenses to skip, for paging. Splitwise defaults to 0. Default: `0`.
- `updated_after` (`string`, optional): Only return expenses updated after this ISO 8601 date-time.
- `updated_before` (`string`, optional): Only return expenses updated before this ISO 8601 date-time.

Example input: `{}`

### `splitwise_get_friend`

Get Friend · Read-only

Get one Splitwise friend by user ID.
Returns the friend's profile, balances per currency, and per-group balances.
Use get_friends to find friend IDs.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `id` (`integer`, required): Numeric Splitwise ID of the friend.

Example input: `{"id":1}`

### `splitwise_get_friends`

List Friends · Read-only

List the authenticated user's Splitwise friends.
Returns each friend's id, name, email, balances per currency, and the groups shared with that friend.
Use get_friend for one friend by ID.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs: none.

Example input: `{}`

### `splitwise_get_group`

Get Group · Read-only

Get one Splitwise group by ID.
Returns the group's name, type, members with balances, original and simplified debts, and invite link.
Use get_groups to find group IDs.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `id` (`integer`, required): Numeric Splitwise ID of the group.

Example input: `{"id":1}`

### `splitwise_get_groups`

List Groups · Read-only

List the groups the authenticated user belongs to.
Returns each group's id, name, type, members, and original and simplified debts. Expenses outside any group appear in a group with ID 0.
Use get_group for a single group by ID.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs: none.

Example input: `{}`

### `splitwise_get_notifications`

List Notifications · Read-only

List recent activity on the authenticated user's Splitwise account, newest first.
Returns each notification's id, numeric type (expense added, comment added, group changes and so on), timestamp, creator, and HTML content.
Use updated_after to fetch only newer items.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `limit` (`integer`, optional): Maximum number of notifications to return. Omit or use 0 for the server maximum.
- `updated_after` (`string`, optional): Only return notifications after this ISO 8601 date-time.

Example input: `{}`

### `splitwise_get_user`

Get User · Read-only

Get basic profile information about another Splitwise user by ID.
Returns id, first and last name, email, registration status and picture.
Use get_current_user for the authenticated user. Use get_friend for balances with a friend.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `id` (`integer`, required): Numeric Splitwise ID of the user.

Example input: `{"id":1}`

### `splitwise_add_user_to_group`

Add User to Group · Write

Add a person to a Splitwise group, by user ID or by name and email.
Returns success, the added user, and any errors. A 200 response alone does not mean success; check the success value.
Use create_group to start a new group. Pass either user_id, or first_name, last_name and email together.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `group_id` (`integer`, required): ID of the group to add the person to.
- `email` (`string`, optional): Email of the person to add. Required with first_name and last_name when user_id is not given.
- `first_name` (`string`, optional): First name of the person to add. Required with last_name and email when user_id is not given.
- `last_name` (`string`, optional): Last name of the person to add. Required with first_name and email when user_id is not given.
- `user_id` (`integer`, optional): ID of an existing Splitwise user to add. Use this or the name and email fields.

Example input: `{"group_id":1}`

### `splitwise_create_comment`

Create Expense Comment · Write

Add a comment to a Splitwise expense.
Returns the created comment with its id, content, author and timestamp.
Use get_comments to read existing comments.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `content` (`string`, required): Text of the comment.
- `expense_id` (`integer`, required): Numeric Splitwise ID of the expense.

Example input: `{"content":"<content>","expense_id":1}`

### `splitwise_create_expense`

Create Expense · Write

Create a Splitwise expense, split equally within a group or by explicit per-person shares.
Returns the created expenses and an errors object. A 200 response alone does not mean success; the expense exists only when errors is empty.
Set split_equally with a group_id for an even split with the authenticated user as payer. Otherwise pass users with paid and owed shares. Use update_expense to change an existing expense.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `cost` (`string`, required): Total cost as a decimal string with at most two decimal places.
- `description` (`string`, required): Short description of the expense.
- `group_id` (`integer`, required): ID of the group for the expense, or 0 for an expense outside any group (only with users shares).
- `category_id` (`integer`, optional): Category ID, which must be a subcategory from get_categories.
- `currency_code` (`string`, optional): Currency code for the cost. Must be a code returned by get_currencies.
- `date` (`string`, optional): When the expense took place, as an ISO 8601 date-time.
- `details` (`string`, optional): Free-text notes for the expense.
- `repeat_interval` (`string`, optional): How often the expense recurs. One of: `never`, `weekly`, `fortnightly`, `monthly`, `yearly`.
- `split_equally` (`boolean`, optional): Set true to split equally among the group's members with the authenticated user as payer. Requires a non-zero group_id. Leave empty when passing users.
- `users` (`array`, optional): Per-person shares. Each item needs paid_share and owed_share as decimal strings with two places, and a user_id or an email (with first_name and last_name for people not yet on Splitwise). Shares must add up to the cost. Example: [{"user_id": 12345, "paid_share": "25.00", "owed_share": "13.55"}, {"email": "neu@example.com", "first_name": "Neu", "last_name": "Yewzer", "paid_share": "0.00", "owed_share": "11.45"}].

Example input: `{"cost":"<cost>","description":"<description>","group_id":1}`

### `splitwise_create_friend`

Add Friend · Write

Add a person as a Splitwise friend by email.
Returns the created friend. If the person is not on Splitwise yet, the first name is required.
Use create_friends to add several people at once.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `user_email` (`string`, required): Email address of the person to add.
- `user_first_name` (`string`, optional): First name of the person. Required when they do not yet have a Splitwise account; ignored otherwise.
- `user_last_name` (`string`, optional): Last name of the person. Ignored when they already have a Splitwise account.

Example input: `{"user_email":"<user_email>"}`

### `splitwise_create_friends`

Add Friends · Write

Add several people as Splitwise friends in one call.
Returns the created users and any errors keyed by problem.
Use create_friend for a single person. Each person needs an email, plus a first name if they are not yet on Splitwise.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `users` (`array`, required): People to add. Each item has an email, and a first_name (plus optional last_name) when the person is not yet on Splitwise. Example: [{"email": "ada@example.com", "first_name": "Ada"}].

Example input: `{"users":[{"email":"ada@example.com","first_name":"Ada"}]}`

### `splitwise_create_group`

Create Group · Write

Create a new Splitwise group. The authenticated user is added automatically.
Returns the created group with its id, members and debts.
Use add_user_to_group to add people later. Members passed here must each have a user_id or an email.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `name` (`string`, required): Name of the new group.
- `group_type` (`string`, optional): What the group is used for. Use home instead of apartment or house. One of: `home`, `trip`, `couple`, `other`, `apartment`, `house`.
- `simplify_by_default` (`boolean`, optional): Whether to turn on simplify debts for the group.
- `users` (`array`, optional): Other members to add. Each item needs a user_id, or an email (with first_name and last_name for people who are not yet on Splitwise). Example: [{"email": "neu@example.com", "first_name": "Neu", "last_name": "Yewzer"}].

Example input: `{"name":"<name>"}`

### `splitwise_undelete_expense`

Restore Expense · Write

Restore a Splitwise expense that was deleted.
Returns success true or false. A 200 response alone does not mean success; check the success value.
Use after delete_expense when the deletion was a mistake.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `id` (`integer`, required): Numeric Splitwise ID of the expense.

Example input: `{"id":1}`

### `splitwise_undelete_group`

Restore Group · Write

Restore a Splitwise group that was deleted.
Returns success true or false, with errors if it failed. A 200 response alone does not mean success; check the success value.
Use after delete_group when the deletion was a mistake.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `id` (`integer`, required): Numeric Splitwise ID of the group.

Example input: `{"id":1}`

### `splitwise_update_expense`

Update Expense · Write

Update an existing Splitwise expense. Only the fields you pass change.
Returns the updated expenses and an errors object. A 200 response alone does not mean success; check that errors is empty.
Passing users replaces all shares on the expense. Use get_expense first to see current values.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `id` (`integer`, required): Numeric Splitwise ID of the expense.
- `category_id` (`integer`, optional): Category ID, which must be a subcategory from get_categories.
- `cost` (`string`, optional): New total cost as a decimal string with at most two decimal places.
- `currency_code` (`string`, optional): Currency code for the cost. Must be a code returned by get_currencies.
- `date` (`string`, optional): When the expense took place, as an ISO 8601 date-time.
- `description` (`string`, optional): New short description.
- `details` (`string`, optional): Free-text notes for the expense.
- `group_id` (`integer`, optional): Group to move the expense to, or 0 for no group.
- `repeat_interval` (`string`, optional): How often the expense recurs. One of: `never`, `weekly`, `fortnightly`, `monthly`, `yearly`.
- `users` (`array`, optional): Per-person shares. Each item needs paid_share and owed_share as decimal strings with two places, and a user_id or an email (with first_name and last_name for people not yet on Splitwise). Shares must add up to the cost. Example: [{"user_id": 12345, "paid_share": "25.00", "owed_share": "13.55"}, {"email": "neu@example.com", "first_name": "Neu", "last_name": "Yewzer", "paid_share": "0.00", "owed_share": "11.45"}].

Example input: `{"id":1}`

### `splitwise_update_user`

Update User · Write

Update profile fields of a Splitwise user, normally the authenticated user.
Returns the updated user: id, name, email, registration status and picture.
Use get_current_user first to see current values. Only the fields you pass are changed.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `id` (`integer`, required): Numeric Splitwise ID of the user.
- `default_currency` (`string`, optional): Default currency code for new expenses. Must be a code returned by get_currencies.
- `email` (`string`, optional): New email address for the user.
- `first_name` (`string`, optional): New first name for the user.
- `last_name` (`string`, optional): New last name for the user.
- `locale` (`string`, optional): Locale code for the user interface, such as en or es.

Example input: `{"id":1}`

### `splitwise_delete_comment`

Delete Expense Comment · Destructive

Delete a comment from a Splitwise expense.
Returns the deleted comment.
Use get_comments to find comment IDs.

Read only: no. Destructive: yes. Idempotent (safe to retry): no.

Inputs:

- `id` (`integer`, required): Numeric Splitwise ID of the comment.

Example input: `{"id":1}`

### `splitwise_delete_expense`

Delete Expense · Destructive

Delete a Splitwise expense.
Returns success true or false, with errors if it failed. A 200 response alone does not mean success; check the success value.
Use undelete_expense to restore it.

Read only: no. Destructive: yes. Idempotent (safe to retry): no.

Inputs:

- `id` (`integer`, required): Numeric Splitwise ID of the expense.

Example input: `{"id":1}`

### `splitwise_delete_friend`

Delete Friend · Destructive

End the friendship between the authenticated user and another Splitwise user.
Returns success true or false, with errors if it failed. A 200 response alone does not mean success; check the success value.
Use get_friends to find friend IDs.

Read only: no. Destructive: yes. Idempotent (safe to retry): no.

Inputs:

- `id` (`integer`, required): Numeric Splitwise ID of the friend.

Example input: `{"id":1}`

### `splitwise_delete_group`

Delete Group · Destructive

Delete a Splitwise group and all of its expenses.
Returns success true or false, with errors if it failed.
Use undelete_group to restore it. Confirm with the user first because every expense in the group is removed.

Read only: no. Destructive: yes. Idempotent (safe to retry): no.

Inputs:

- `id` (`integer`, required): Numeric Splitwise ID of the group.

Example input: `{"id":1}`

### `splitwise_remove_user_from_group`

Remove User from Group · Destructive

Remove a person from a Splitwise group.
Returns success true or false, with errors if it failed. It fails when the person has a non-zero balance in the group.
Use get_group first to check balances.

Read only: no. Destructive: yes. Idempotent (safe to retry): no.

Inputs:

- `group_id` (`integer`, required): ID of the group to remove the person from.
- `user_id` (`integer`, required): ID of the user to remove.

Example input: `{"group_id":1,"user_id":1}`

## Related

Other Accounting & Finance connectors ([all 37](/agentkit/connectors/?category=accounting-finance)):

- [QuickBooks](/agentkit/connectors/quickbooks/): Scalekit connector, OAuth, 117 tools
- [Xero](/agentkit/connectors/xero/): Scalekit connector, OAuth, 94 tools
- [Stripe](/agentkit/connectors/stripe/): Scalekit connector, Access token, 178 tools


---

## More Scalekit documentation

| Resource | What it contains | When to use it |
|----------|-----------------|----------------|
| [/llms.txt](/llms.txt) | Structured index with routing hints per product area | Start here — find which documentation set covers your topic before loading full content |
| [/llms-full.txt](/llms-full.txt) | Complete documentation for all Scalekit products in one file | Use when you need exhaustive context across multiple products or when the topic spans several areas |
| [sitemap-0.xml](https://docs.scalekit.com/sitemap-0.xml) | Full URL list of every documentation page | Use to discover specific page URLs you can fetch for targeted, page-level answers |
