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

# Last Activity

> When the customer last earned or spent tokens

<span style={{display:"none"}}>For the complete documentation index, see [llms.txt](/llms.txt).</span>

Returns the timestamp of the customer's most recent token activity. Used to determine whether the customer has crossed your configured inactivity expiry window.

### Query Parameters

<ParamField query="customer_ref" type="string" required>
  Your unique identifier for this customer
</ParamField>

### Response

<ResponseField name="last_activity" type="string">
  Unix timestamp (seconds) of last earn or spend, or `"0"` if the customer has never been active
</ResponseField>

<ResponseField name="last_activity_iso" type="string | null">
  Same timestamp formatted as ISO 8601, or `null` if there is no activity yet
</ResponseField>

```javascript theme={null}
const res = await fetch(
  "https://tokens.shakesco.com/last-activity?customer_ref=customer-123",
  { headers: { Authorization: `Bearer ${API_KEY}` } }
);
const { last_activity, last_activity_iso } = await res.json();
```

<ResponseExample>
  ```json 200 OK theme={null}
  {
    "last_activity": "1715000000",
    "last_activity_iso": "2026-05-06T10:00:00.000Z"
  }
  ```

  ```json 200 OK (no activity) theme={null}
  {
    "last_activity": "0",
    "last_activity_iso": null
  }
  ```
</ResponseExample>
