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. See our Privacy Policy and
Terms.
openapi: 3.2.0
info:
version: 3.0.0
title: Splitwise Notifications 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: Notifications
x-displayName: Notifications
paths:
/get_notifications:
get:
tags:
- Notifications
summary: Get notifications
description: 'Return a list of recent activity on the users account with the most recent items first.
`content` will be suitable for display in HTML and uses only the ``, ``, ``,
`
` and `` tags.
The `type` value indicates what the notification is about. Notification types may be added in the future
without warning. Below is an incomplete list of notification types.
| Type | Meaning |
| ---- | ------- |
| 0 | Expense added |
| 1 | Expense updated |
| 2 | Expense deleted |
| 3 | Comment added |
| 4 | Added to group |
| 5 | Removed from group |
| 6 | Group deleted |
| 7 | Group settings changed |
| 8 | Added as friend |
| 9 | Removed as friend |
| 10 | News (a URL should be included) |
| 11 | Debt simplification |
| 12 | Group undeleted |
| 13 | Expense undeleted |
| 14 | Group currency conversion |
| 15 | Friend currency conversion |
**Note**: While all parameters are optional, the server sets arbitrary (but large) limits
on the number of notifications returned if you set a very old `updated_after` value or `limit` of `0` for a
user with many notifications.'
parameters:
- in: query
name: updated_after
schema:
type: string
format: date-time
example: '2020-07-28T20:46:00Z'
description: If provided, returns only notifications after this time.
- in: query
name: limit
schema:
type: integer
default: 0
description: Omit (or provide `0`) to get the maximum number of notifications.
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
properties:
notifications:
type: array
items:
$ref: '#/components/schemas/notification'
'401':
$ref: '#/components/responses/unauthorized'
operationId: getGetNotifications
x-operation-id-source: derived
components:
schemas:
unauthorized:
type: object
properties:
error:
type: string
example: 'Invalid API request: you are not logged in'
notification:
type: object
properties:
id:
type: integer
example: 32514315
type:
type: integer
created_at:
type: string
format: date-time
created_by:
type: integer
example: 2
source:
type:
- object
- 'null'
properties:
type:
type: string
example: Expense
id:
type: integer
example: 865077
url:
type:
- string
- 'null'
image_url:
type: string
example: https://s3.amazonaws.com/splitwise/uploads/notifications/v2/0-venmo.png
image_shape:
type: string
enum:
- square
- circle
content:
type: string
example: <strong>You</strong> paid <strong>Jon H.</strong>.<br><font color=\"#5bc5a7\">You paid $23.45</font>
responses:
unauthorized:
description: Invalid API key or OAuth access token
content:
application/json:
schema:
$ref: '#/components/schemas/unauthorized'
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