> For the complete documentation index, see [llms.txt](https://docs.trustlesswork.com/trustless-work/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.trustlesswork.com/trustless-work/v2-en/api-rest/escrows/get-escrow-events.md).

# Get Escrow Events

### **Headers**

<table><thead><tr><th width="366">Name</th><th>Value</th></tr></thead><tbody><tr><td>Content-Type</td><td><code>application/json</code></td></tr><tr><td>x-api-key</td><td><code>&#x3C;token></code></td></tr></tbody></table>

### Open API

## GET /escrows/{contractId}/events

Pages an escrow's event timeline — every on-chain action recorded against it, in order.

| Name       | Type            | In    | Description                                            |
| ---------- | --------------- | ----- | ------------------------------------------------------ |
| contractId | string          | path  | On-chain escrow address (`C…`)                         |
| limit      | number          | query | 1–200, default 50                                      |
| cursor     | string          | query | From the previous page's `nextCursor`                  |
| order      | `asc` \| `desc` | query | Default `asc` (chronological); `desc` for newest-first |

### **What this Endpoint returns?**

The same paginated envelope as the listing: `{ data, hasMore, nextCursor }`.

Use it to build an activity feed, or to reconstruct what happened to an escrow and when. `GET /escrows/{contractId}` already includes the first 200 events, so you only need this endpoint when `eventsHasMore` is true or when you want newest-first.

### Use Example:

```typescript
import axios from "axios";

const http = axios.create({
  baseURL: "https://beta.api.trustlesswork.com",
  timeout: 10000,
  headers: {
    "Content-Type": "application/json",
    "x-api-key": your_api_key,
  },
});

export const useExample = async (contractId: string) => {
  const params = new URLSearchParams({ limit: "50", order: "desc" });

  const { data } = await http.get(
    `/escrows/${contractId}/events?${params.toString()}`,
  );

  return data;
}
```

{% hint style="info" %}
These reads come from the read-model, which is eventually consistent. Right after submitting a transaction a `404` usually means "not projected yet", not "does not exist" — poll briefly instead of treating it as an error.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.trustlesswork.com/trustless-work/v2-en/api-rest/escrows/get-escrow-events.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
