# Activity

2 endpoints.

## List a workspace's activity feed

```http
GET https://orbitwrite.com/api/v1/activity
```

Newest-first collaboration and posting activity — publishes, schedules, approvals, comments, campaigns and team changes. Rows from one composer session collapse into a single entry whose `data.accounts` lists every channel. Cursor-paged rather than offset-paged: the feed grows at the head, so an offset would re-show rows as new activity lands mid-paging.

**Authentication:** bearer token or session cookie.

### Query parameters

- `organizationId` (string, optional) — Session callers only — an API key already determines the workspace.
- `limit` (integer, optional)
- `cursor` (string, optional) — Opaque cursor from a previous response's `nextCursor`. Omit for the first page.
- `type` (string | string[], optional) — Filter by event type. Repeat for OR (e.g. `?type=post.published&type=approval.approved`).

### Responses

#### 200

A page of activity

- `entries` (ActivityEntry[], required)
  - `id` (string, required)
  - `type` (string, required, one of `post.created`, `post.edited`, `post.title_changed`, `post.tags_changed`, `post.campaign_changed`, `post.ungrouped`, `post.planned`, `post.replanned`, `post.unplanned`, `post.scheduled`, `post.rescheduled`, `post.unscheduled`, `post.published`, `post.failed`, `post.returned_to_draft`, `post.deleted`, `approval.requested`, `approval.reviewers_changed`, `approval.approved`, `approval.rejected`, `approval.reset`, `approval.removed`, `comment.added`, `campaign.created`, `campaign.completed`, `member.invited`, `member.joined`, `streak.reached`)
  - `actor` (ActivityActor | null, required) — Null for system-generated events (a campaign reaching its end date, a streak milestone).
    - `id` (string, required)
    - `name` (string, required)
    - `image` (string | null, required)
  - `targetType` (string | null, required)
  - `targetId` (string | null, required)
  - `data` (object, required) — Display payload; shape varies per `type` (see ActivityDataMap in @orbitwrite/core/activity). Every field is a copy taken at write time, so a deleted post's activity line still renders.
  - `createdAt` (string, required) — ISO 8601.
- `nextCursor` (string | null, required) — Pass back as `cursor` for the next page; null on the last page.

#### 400

Invalid request

- `error` (string, required)
- `issues` (any[], optional)

#### 401

Not signed in

- `error` (string, required)
- `issues` (any[], optional)

#### 403

Not a member of the organization

- `error` (string, required)
- `issues` (any[], optional)

## List one post's activity

```http
GET https://orbitwrite.com/api/v1/posts/{groupId}/activity
```

Newest-first history of one post: who created it, content edits (one entry per editing session, naming the channels that changed), title / tag / campaign changes, schedules and reschedules, approval requests and decisions, comments, publishes, failures and deletions. Unpaged — it backs the composer's Info panel, not a history browser.

**Authentication:** bearer token or session cookie.

### Path parameters

- `groupId` (string, required) — The post's composer group id.

### Query parameters

- `limit` (integer, optional)

### Responses

#### 200

The post's activity, newest first

- `entries` (ActivityEntry[], required)
  - `id` (string, required)
  - `type` (string, required, one of `post.created`, `post.edited`, `post.title_changed`, `post.tags_changed`, `post.campaign_changed`, `post.ungrouped`, `post.planned`, `post.replanned`, `post.unplanned`, `post.scheduled`, `post.rescheduled`, `post.unscheduled`, `post.published`, `post.failed`, `post.returned_to_draft`, `post.deleted`, `approval.requested`, `approval.reviewers_changed`, `approval.approved`, `approval.rejected`, `approval.reset`, `approval.removed`, `comment.added`, `campaign.created`, `campaign.completed`, `member.invited`, `member.joined`, `streak.reached`)
  - `actor` (ActivityActor | null, required) — Null for system-generated events (a campaign reaching its end date, a streak milestone).
    - `id` (string, required)
    - `name` (string, required)
    - `image` (string | null, required)
  - `targetType` (string | null, required)
  - `targetId` (string | null, required)
  - `data` (object, required) — Display payload; shape varies per `type` (see ActivityDataMap in @orbitwrite/core/activity). Every field is a copy taken at write time, so a deleted post's activity line still renders.
  - `createdAt` (string, required) — ISO 8601.

#### 400

Invalid request

- `error` (string, required)
- `issues` (any[], optional)

#### 401

Not signed in

- `error` (string, required)
- `issues` (any[], optional)

#### 403

Not a member of the organization

- `error` (string, required)
- `issues` (any[], optional)

#### 404

The resource does not exist

- `error` (string, required)
- `issues` (any[], optional)
