# Client API: Account activity

> The account's activity log: what its owner changed and each request its team members sent for it, newest first.

Source: https://www.coritan.com/docs/api/reference/client/account-activity/

The account's activity log: what its owner changed and each request its team members sent for it, newest first. It comes with the Business and Enterprise plans.

Base URL: `https://api.coritan.com/api/v1`. Paths below are complete.

To try these requests in the browser, open the [interactive Client API reference](https://api.coritan.com/docs).

## Operations

| Method | Path | Summary |
| --- | --- | --- |
| GET | [`/api/v1/account/audit-log`](#op-get-api-v1-account-audit-log) | The account's activity log: what its owner and its team members changed, newest first |

### The account's activity log: what its owner and its team members changed, newest first {#op-get-api-v1-account-audit-log}

`GET /api/v1/account/audit-log`

The account's activity log: what its owner and its team members
changed, newest first.

It lists two kinds of entry:

* the owner's own changes (`actor.kind` is `owner`), each written by the
  route that made it;
* every request other than a read that a team member sent for the
  account (`actor.kind` is `member`, with the member's `role`). We write
  it as the request arrives, before it runs, so a request that then
  failed is listed too.

It leaves out what our staff, the platform and API keys did, every
other account's entries, and what a member did in their own account.

`page` starts at 1, and `per_page` takes 1 to 100 (50 when left out);
any other value answers 422. `member_user_id` keeps only that member's
requests. The answer is `{items, total, page, per_page, members}`, where
`total` counts every entry the filter matches. Each item is `{id,
action, label, description, actor: {kind, user_id, name, email, role},
resource: {type, id}, ip_address, created_at}`. `label` says what
happened in a short sentence, or is null when we have none for that
action; `description` is what the entry recorded, and a member's request
reads `"<METHOD> <path>"`. `members` lists every team member with an
entry in the log, `{user_id, name, email}` each and ordered by name,
whatever `member_user_id` and `page` say. It includes people who have
since left the team, so a client can offer each of them as a filter.

The owner reads the log, and so does a member with the Admin role who
sends `X-Coritan-Account`. Every other role gets 403 `role_refused`. The
log comes with the Business and Enterprise plans (the `audit_log`
entitlement). While plans apply to the account, any other plan answers
402 `entitlement_exceeded`, and its `message` and `upgrade.plan` name the
plan that has the log.

The log is for platform accounts only. A brand's customer portal has no
such route, and each brand keeps its own organization audit log.

Authentication: an access token, sent as `Authorization: Bearer <token>`.

#### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `page` | query | integer | no | The page to read, from 1. Default: `1`. |
| `per_page` | query | integer | no | Entries per page, from 1 to 100. Default: `50`. |
| `member_user_id` | query | integer or null | no | Only the requests this team member sent for the account: their user ID, as `members` in the answer or `GET /api/v1/account/members` lists it. |

#### Responses

| Status | Meaning |
| --- | --- |
| `200` | Success. |
| `422` | The request is not valid. `detail` lists each problem. |
