> ## Documentation Index
> Fetch the complete documentation index at: https://docs.rewards.so/llms.txt
> Use this file to discover all available pages before exploring further.

# Activity

> GET /activity — Point event history for a point system.

Returns the history of point events for a point system — either globally or filtered to a specific wallet.

***

## GET /activity

### Request

```bash theme={null}
GET https://api.rewards.so/activity?pointSystemId=your-uuid[&address=0xabc123...][&page=1][&limit=50]
Authorization: Bearer rw_your_api_key
```

### Query parameters

| Parameter       | Type     | Required | Default | Description                 |
| --------------- | -------- | -------- | ------- | --------------------------- |
| `pointSystemId` | `string` | Yes      | —       | UUID of the point system    |
| `address`       | `string` | No       | —       | Filter to a specific wallet |
| `page`          | `number` | No       | `1`     | Page number (1-indexed)     |
| `limit`         | `number` | No       | `50`    | Events per page (max `200`) |

### Response `200`

```json theme={null}
{
  "activity": [
    {
      "id": "f69bfa1a-e87b-4a25-b122-bbe92c62e7cd",
      "address": "0x4a3d7344cdb69a96ab5b92d293e451ce15f9a678",
      "points": 10,
      "event": "craft_artifact",
      "date": "2026-04-09T10:34:05.288Z"
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 50,
    "total": 4,
    "totalPages": 1
  }
}
```

### Response fields

| Field     | Type             | Description                                       |
| --------- | ---------------- | ------------------------------------------------- |
| `id`      | `string`         | Event UUID                                        |
| `address` | `string`         | Wallet that received the points                   |
| `points`  | `number`         | Points amount (always positive)                   |
| `event`   | `string \| null` | Trigger key or event type, null for manual grants |
| `date`    | `string`         | ISO 8601 timestamp                                |

***

## Use cases

| Scenario                          | Parameters                  |
| --------------------------------- | --------------------------- |
| Global feed for your point system | `pointSystemId` only        |
| Activity tab for a connected user | `pointSystemId` + `address` |
| Recent events widget (last 5)     | `pointSystemId` + `limit=5` |
| Paginated history                 | `page` + `limit`            |

***

## Code examples

<CodeGroup>
  ```ts Global activity feed theme={null}
  const res = await fetch(
    `https://api.rewards.so/activity?pointSystemId=${POINT_SYSTEM_ID}&limit=20`,
    { headers: { Authorization: `Bearer ${API_KEY}` } }
  );
  const { activity } = await res.json();
  ```

  ```tsx Per-wallet activity (React) theme={null}
  import { useEffect, useState } from "react";

  type ActivityEvent = {
    id: string;
    address: string;
    points: number;
    event: string | null;
    date: string;
  };

  function WalletActivity({ address }: { address: string }) {
    const [events, setEvents] = useState<ActivityEvent[]>([]);

    useEffect(() => {
      fetch(
        `/api/proxy/activity?address=${address}`, // proxy through your backend
      )
        .then((r) => r.json())
        .then((data) => setEvents(data.activity));
    }, [address]);

    return (
      <ul>
        {events.map((e) => (
          <li key={e.id}>
            +{e.points} pts — {e.event ?? "manual"} — {new Date(e.date).toLocaleDateString()}
          </li>
        ))}
      </ul>
    );
  }
  ```

  ```ts TypeScript helper theme={null}
  type ActivityResponse = {
    activity: ActivityEvent[];
    pagination: { page: number; limit: number; total: number; totalPages: number };
  };

  async function getActivity(
    pointSystemId: string,
    options?: { address?: string; page?: number; limit?: number }
  ): Promise<ActivityResponse> {
    const url = new URL("https://api.rewards.so/activity");
    url.searchParams.set("pointSystemId", pointSystemId);
    if (options?.address) url.searchParams.set("address", options.address);
    if (options?.page) url.searchParams.set("page", String(options.page));
    if (options?.limit) url.searchParams.set("limit", String(options.limit));

    const res = await fetch(url.toString(), {
      headers: { Authorization: `Bearer ${process.env.REWARDS_API_KEY}` },
    });

    if (!res.ok) throw new Error(`HTTP ${res.status}`);
    return res.json();
  }
  ```
</CodeGroup>

<Warning>
  Never expose your API key in client-side code. Proxy requests through your backend or a Next.js route handler.
</Warning>
