Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. By signing up you are subscribing to the APIs.io and API Evangelist
newsletters — you can unsubscribe from any issue. See our
Privacy Policy and Terms.
openapi: 3.2.0
info:
version: 3.0.0
title: Splitwise Users API
x-logo:
url: https://www.splitwise.com/assets/press/logos/sw.svg
altText: Splitwise logo and name
description: '# Introduction
Hey there!'
servers:
- url: https://secure.splitwise.com/api/v3.0
variables: {}
security:
- OAuth: []
- ApiKeyAuth: []
tags:
- name: Users
x-displayName: Users
description: Resources to access and modify user information.
paths:
/get_current_user:
get:
tags:
- Users
summary: Get information about the current user
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
properties:
user:
$ref: '#/components/schemas/current_user'
'401':
$ref: '#/components/responses/unauthorized'
operationId: getGetCurrentUser
x-operation-id-source: derived
/get_user/{id}:
parameters:
- in: path
name: id
schema:
type: integer
required: true
get:
tags:
- Users
summary: Get information about another user
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
properties:
user:
$ref: '#/components/schemas/user'
'401':
$ref: '#/components/responses/unauthorized'
'403':
$ref: '#/components/responses/forbidden'
'404':
$ref: '#/components/responses/not_found'
operationId: getGetUserById
x-operation-id-source: derived
/update_user/{id}:
parameters:
- in: path
name: id
schema:
type: integer
required: true
post:
tags:
- Users
summary: Update a user
requestBody:
required: true
content:
application/json:
schema:
properties:
first_name:
type: string
last_name:
type: string
email:
type: string
password:
type: string
locale:
type: string
default_currency:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/user'
'401':
$ref: '#/components/responses/unauthorized'
'403':
$ref: '#/components/responses/forbidden'
operationId: postUpdateUserById
x-operation-id-source: derived
components:
responses:
unauthorized:
description: Invalid API key or OAuth access token
content:
application/json:
schema:
$ref: '#/components/schemas/unauthorized'
forbidden:
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/forbidden'
not_found:
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/not_found'
schemas:
forbidden:
type: object
properties:
errors:
type: object
properties:
base:
type: array
items:
type: string
example: 'Invalid API request: you do not have permission to perform that action'
user:
type: object
properties:
id:
type: integer
first_name:
type: string
example: Ada
last_name:
type:
- string
- 'null'
example: Lovelace
email:
type: string
example: ada@example.com
registration_status:
type: string
enum:
- confirmed
- dummy
- invited
picture:
type: object
properties:
small:
type: string
medium:
type: string
large:
type: string
custom_picture:
type: boolean
example: false
unauthorized:
type: object
properties:
error:
type: string
example: 'Invalid API request: you are not logged in'
current_user:
allOf:
- $ref: '#/components/schemas/user'
- type: object
properties:
notifications_read:
type: string
example: '2017-06-02T20:21:57Z'
description: ISO 8601 date/time indicating the last time notifications were read
notifications_count:
type: integer
example: 12
description: Number of unread notifications since notifiations_read
notifications:
$ref: '#/components/schemas/notification_settings'
default_currency:
type: string
example: USD
locale:
type: string
example: en
description: ISO_639-1 2-letter locale code
notification_settings:
type: object
description: User's notification preferences
additionalProperties:
type: boolean
example:
added_as_friend: true
not_found:
type: object
properties:
errors:
type: object
properties:
base:
type: array
items:
type: string
example: 'Invalid API Request: record not found'
securitySchemes:
OAuth:
type: oauth2
description: 'Splitwise uses OAuth 2 with the authorization code flow. To connect via OAuth 2, you''ll need to [register your app](https://secure.splitwise.com/apps). When you register, you''ll be given a key and secret.
**Note**: OAuth can be a very confusing protocol to implement correctly, and we **strongly** recommend
that you use an existing OAuth library to connect to Splitwise. You can find a list of OAuth client libraries at the
[OAuth community site](https://oauth.net/code/#client-libraries).
For more information on using OAuth, check out the following resources:
- The OAuth community [getting started guide](https://oauth.net/getting-started/)
- The oauth.com [OAuth 2.0 playground](https://www.oauth.com/playground/) (great for debugging authorization issues)
- This [old Splitwise blog post](https://blog.splitwise.com/2013/07/15/setting-up-oauth-for-the-splitwise-api/) about OAuth
'
flows:
authorizationCode:
authorizationUrl: /oauth/authorize
tokenUrl: /oauth/token
scopes: {}
ApiKeyAuth:
type: http
description: 'For speed and ease of prototyping, you can generate a personal API key on your app''s details page. You should present this key to the server via the Authorization header as a Bearer token. The API key is an access token for your personal account, so keep it as safe as you would a password.
If your key becomes compromised or you want to invalidate your existing key for any other reason, you can do so on the app details page by generating a new key.'
scheme: bearer
bearerFormat: API key