> 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-milestones.md).

# Get Escrow Milestones

### **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}/milestones

Reads one escrow's milestones only — a lighter call than fetching the whole escrow.

| Name       | Type   | In   | Description                    |
| ---------- | ------ | ---- | ------------------------------ |
| contractId | string | path | On-chain escrow address (`C…`) |

## GET /escrows/milestones

The batch version: milestones for several escrows at once.

| Name        | Type      | In    | Description                      |
| ----------- | --------- | ----- | -------------------------------- |
| contractIds | string\[] | query | 1–50 addresses. Repeat the param |

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

The milestone list of each escrow, including `status` and the `approvals { target, approvalCount, approvedBy }` progress used to render approval state.

The batch endpoint is **not paginated** — the request itself is bounded at 50 ids. Unknown ids are silently absent rather than an error, so check what came back.

### 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) => {
  // One escrow
  const one = await http.get(`/escrows/${contractId}/milestones`);

  // Several at once
  const params = new URLSearchParams();
  ["CXYZ...", "CABC..."].forEach(id => params.append("contractIds", id));
  const many = await http.get(`/escrows/milestones?${params.toString()}`);

  return { one: one.data, many: many.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-milestones.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.
