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.
- Tools
- 27
- What they doRead · write · destructive
- 12 · 10 · 512 read10 write5 destructive
- Users sign in with
- OAuth
- OAuth app
- Your own Splitwise app
Setup
Install the SDK
Terminal window npm install @scalekit-sdk/node dotenvTerminal window pip install scalekit-sdk-python python-dotenvSet your credentials
Add your Scalekit credentials to your
.envfile. 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>Create the Splitwise connection
In AgentKit > Connections, create a Splitwise connection and copy its redirect URI. The name you give it is the
connection_nameyour code passes. See Configure connections.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.
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.actionsconst connector = 'splitwise'const identifier = 'user_123'// Generate an authorization link for the userconst { 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 callconst result = await actions.executeTool({connector,identifier,toolName: 'splitwise_get_current_user',toolInput: {},})console.log(result)Terminal window npx tsx quickstart.mtsquickstart.py import osfrom scalekit import ScalekitClientfrom dotenv import load_dotenvload_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.actionsconnection_name = "splitwise"identifier = "user_123"# Generate an authorization link for the userlink_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 callresult = actions.execute_tool(tool_input={},tool_name="splitwise_get_current_user",connection_name=connection_name,identifier=identifier,)print(result)Terminal window python quickstart.pyEach user signs in once. See Authorize a user for the full flow and statuses.
Tools
Pass the exact name toexecute_toolsplitwise_get_categoriesList the expense categories Splitwise supports.Read-onlyList Categories
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.
Inputs
This tool takes no inputs.
splitwise_get_commentsList the comments on a Splitwise expense.Read-onlyList Expense Comments
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.
Inputs
expense_idintegerrequired- Numeric Splitwise ID of the expense.
splitwise_get_currenciesList the currency codes Splitwise accepts.Read-onlyList Currencies
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.
Inputs
This tool takes no inputs.
splitwise_get_current_userGet the profile of the authenticated Splitwise user.Read-onlyGet Current User
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.
Inputs
This tool takes no inputs.
splitwise_get_expenseGet one Splitwise expense by ID.Read-onlyGet Expense
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.
Inputs
idintegerrequired- Numeric Splitwise ID of the expense.
splitwise_get_expensesList expenses visible to the authenticated user, optionally filtered by group, friend or date.Read-onlyList Expenses
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.
Inputs
dated_afterstring- Only return expenses dated after this ISO 8601 date-time.
dated_beforestring- Only return expenses dated before this ISO 8601 date-time.
friend_idinteger- Only return expenses between the authenticated user and this other user.
group_idinteger- Only return expenses in this group. When set, friend_id is ignored.
limitinteger- Maximum number of expenses to return. Splitwise defaults to 20.default
20 offsetinteger- Number of expenses to skip, for paging. Splitwise defaults to 0.default
0 updated_afterstring- Only return expenses updated after this ISO 8601 date-time.
updated_beforestring- Only return expenses updated before this ISO 8601 date-time.
splitwise_get_friendGet one Splitwise friend by user ID.Read-onlyGet Friend
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.
Inputs
idintegerrequired- Numeric Splitwise ID of the friend.
splitwise_get_friendsList the authenticated user's Splitwise friends.Read-onlyList Friends
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.
Inputs
This tool takes no inputs.
splitwise_get_groupGet one Splitwise group by ID.Read-onlyGet Group
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.
Inputs
idintegerrequired- Numeric Splitwise ID of the group.
splitwise_get_groupsList the groups the authenticated user belongs to.Read-onlyList Groups
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.
Inputs
This tool takes no inputs.
splitwise_get_notificationsList recent activity on the authenticated user's Splitwise account, newest first.Read-onlyList Notifications
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.
Inputs
limitinteger- Maximum number of notifications to return. Omit or use 0 for the server maximum.
updated_afterstring- Only return notifications after this ISO 8601 date-time.
splitwise_get_userGet basic profile information about another Splitwise user by ID.Read-onlyGet User
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.
Inputs
idintegerrequired- Numeric Splitwise ID of the user.
splitwise_add_user_to_groupAdd a person to a Splitwise group, by user ID or by name and email.WriteAdd User to Group
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.
Inputs
group_idintegerrequired- ID of the group to add the person to.
emailstring- Email of the person to add. Required with first_name and last_name when user_id is not given.
first_namestring- First name of the person to add. Required with last_name and email when user_id is not given.
last_namestring- Last name of the person to add. Required with first_name and email when user_id is not given.
user_idinteger- ID of an existing Splitwise user to add. Use this or the name and email fields.
splitwise_create_commentAdd a comment to a Splitwise expense.WriteCreate Expense Comment
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.
Inputs
contentstringrequired- Text of the comment.
expense_idintegerrequired- Numeric Splitwise ID of the expense.
splitwise_create_expenseCreate a Splitwise expense, split equally within a group or by explicit per-person shares.WriteCreate Expense
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.
Inputs
coststringrequired- Total cost as a decimal string with at most two decimal places.
descriptionstringrequired- Short description of the expense.
group_idintegerrequired- ID of the group for the expense, or 0 for an expense outside any group (only with users shares).
category_idinteger- Category ID, which must be a subcategory from get_categories.
currency_codestring- Currency code for the cost. Must be a code returned by get_currencies.
datestring- When the expense took place, as an ISO 8601 date-time.
detailsstring- Free-text notes for the expense.
repeat_intervalstring- How often the expense recurs.one of
neverweeklyfortnightlymonthlyyearly split_equallyboolean- 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.
usersarray- 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"}].
splitwise_create_friendAdd a person as a Splitwise friend by email.WriteAdd Friend
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.
Inputs
user_emailstringrequired- Email address of the person to add.
user_first_namestring- First name of the person. Required when they do not yet have a Splitwise account; ignored otherwise.
user_last_namestring- Last name of the person. Ignored when they already have a Splitwise account.
splitwise_create_friendsAdd several people as Splitwise friends in one call.WriteAdd Friends
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.
Inputs
usersarrayrequired- 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"}].
splitwise_create_groupCreate a new Splitwise group.WriteCreate Group
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.
Inputs
namestringrequired- Name of the new group.
group_typestring- What the group is used for. Use home instead of apartment or house.one of
hometripcoupleotherapartmenthouse simplify_by_defaultboolean- Whether to turn on simplify debts for the group.
usersarray- 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"}].
splitwise_undelete_expenseRestore a Splitwise expense that was deleted.WriteRestore Expense
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.
Inputs
idintegerrequired- Numeric Splitwise ID of the expense.
splitwise_undelete_groupRestore a Splitwise group that was deleted.WriteRestore Group
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.
Inputs
idintegerrequired- Numeric Splitwise ID of the group.
splitwise_update_expenseUpdate an existing Splitwise expense.WriteUpdate Expense
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.
Inputs
idintegerrequired- Numeric Splitwise ID of the expense.
category_idinteger- Category ID, which must be a subcategory from get_categories.
coststring- New total cost as a decimal string with at most two decimal places.
currency_codestring- Currency code for the cost. Must be a code returned by get_currencies.
datestring- When the expense took place, as an ISO 8601 date-time.
descriptionstring- New short description.
detailsstring- Free-text notes for the expense.
group_idinteger- Group to move the expense to, or 0 for no group.
repeat_intervalstring- How often the expense recurs.one of
neverweeklyfortnightlymonthlyyearly usersarray- 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"}].
splitwise_update_userUpdate profile fields of a Splitwise user, normally the authenticated user.WriteUpdate User
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.
Inputs
idintegerrequired- Numeric Splitwise ID of the user.
default_currencystring- Default currency code for new expenses. Must be a code returned by get_currencies.
emailstring- New email address for the user.
first_namestring- New first name for the user.
last_namestring- New last name for the user.
localestring- Locale code for the user interface, such as en or es.
splitwise_delete_commentDelete a comment from a Splitwise expense.DestructiveDelete Expense Comment
Delete a comment from a Splitwise expense. Returns the deleted comment. Use get_comments to find comment IDs.
Inputs
idintegerrequired- Numeric Splitwise ID of the comment.
splitwise_delete_expenseDelete a Splitwise expense.DestructiveDelete Expense
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.
Inputs
idintegerrequired- Numeric Splitwise ID of the expense.
splitwise_delete_friendEnd the friendship between the authenticated user and another Splitwise user.DestructiveDelete Friend
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.
Inputs
idintegerrequired- Numeric Splitwise ID of the friend.
splitwise_delete_groupDelete a Splitwise group and all of its expenses.DestructiveDelete Group
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.
Inputs
idintegerrequired- Numeric Splitwise ID of the group.
splitwise_remove_user_from_groupRemove a person from a Splitwise group.DestructiveRemove User from Group
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.
Inputs
group_idintegerrequired- ID of the group to remove the person from.
user_idintegerrequired- ID of the user to remove.
No tools match.