# List Activity

**GET** `/users/{user_id}/accounts/{account_id}/activity`

Base URL: `https://live.savewithsail.com/api/v1`

Paginated account activity: contributions, distributions, interest, and fees. Requires the `benefit_account` key scope and product. Contribution rows carry a `source`. Other types do not.

## Authorization

- PartnerKey (http, bearer)

## Path parameters

- `user_id` (string, required)
  The Sail user id.
- `account_id` (string, required)
  The Sail account id.

## Query parameters

- `type` (string)
  Filter to one activity type.
- `tax_year` (integer)
  Filter to a specific tax year.
- `limit` (integer)
  Max results per page.
- `offset` (integer)
  Pagination offset.

## Responses

### 200

Contribution history.

- `data` (object[])
  - `id` (string)
    The Sail activity id.
  - `account_id` (string)
    The account this activity occurred on.
  - `type` ("contribution" | "distribution" | "interest" | "fee")
    The kind of activity.
  - `date` (string<date>)
    When the activity occurred.
  - `amount` (number<float>)
    Positive for money in (contributions, interest), negative for money out (distributions, fees).
  - `tax_year` (integer)
    The tax year this activity is attributed to.
  - `source` ("payroll" | "employer" | "individual" | "rollover" | "unknown" | null)
    Present on `contribution` rows only.
  - `description` (string)
    Human-readable description of the activity.
- `pagination` (object)
  Pagination metadata for this page.
  - `total` (integer)
    Total number of matching records, across all pages.
  - `limit` (integer)
    The `limit` used for this page.
  - `offset` (integer)
    The `offset` used for this page.
  - `has_more` (boolean)
    Whether additional pages remain after this one.

Example:

```json
{
  "data": [
    {
      "id": "string",
      "account_id": "string",
      "type": "contribution",
      "date": "2024-01-01",
      "amount": 0,
      "tax_year": 0,
      "source": "payroll",
      "description": "string"
    }
  ],
  "pagination": {
    "total": 0,
    "limit": 0,
    "offset": 0,
    "has_more": true
  }
}
```

### default

Standard error envelope covering 400, 401, 403, 404, 429, and 500.

- `error` (object)
  The error detail.
  - `code` (string)
    Machine-readable code, e.g. `not_found`, `token_scope_mismatch`, `product_not_enabled`, `insufficient_key_scope`, `insufficient_token_scope`, `user_token_required`, `user_token_expired`, `invalid_user_token`, `invalid_key_configuration`, `connection_not_reconnectable`, `rate_limited`.
  - `message` (string)
    Human-readable error message. May change, so match on `error.code` instead.
  - `param` (string)
    The request field that caused the error, when applicable. Null otherwise.

Example:

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "param": "string"
  }
}
```