> 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/introduction/readme.md).

# Welcome

This is the documentation for the **Trustless Work Core API** — a ground-up rewrite of the backend that powers Trustless Work escrows.

{% hint style="warning" %}
**This is a different backend from the one documented in Version 1.**

The escrow concepts carry over — roles, milestones, approvals, disputes, single- and multi-release. But **authentication and reading escrow data work completely differently**. Code written against the Version 1 docs will not work here without changes.

If you are not migrating yet, switch to **Version 1** in the version picker. It documents the previous backend and remains published and supported.
{% endhint %}

## Base URL

```
https://beta.api.trustlesswork.com
```

This environment runs on **Stellar Testnet**. Use testnet assets and testnet wallets.

Version 1's backend remains at `api.trustlesswork.com` (mainnet) and `dev.api.trustlesswork.com` (testnet). The two are not interchangeable — credentials, read endpoints and error shapes all differ.

## What changed, in one paragraph

The previous API required you to report your own transactions: after signing and submitting an XDR yourself, you had to POST its `txHash` to `indexer/update-from-txHash` or the escrow would never appear in any read. **That endpoint no longer exists.** Escrow state is now recorded automatically from the chain — you submit your transaction and it becomes queryable on its own, usually within seconds. Authentication also moved to SEP-10 wallet signatures.

See **Migrating from Version 1** for the full list.

## What stayed the same

The core promise is unchanged, and it shapes every endpoint:

**Trustless Work never holds your keys and never signs your transactions.** Every endpoint that changes on-chain state returns an *unsigned* transaction (XDR). Your wallet signs it. You submit it. The server is a transaction builder, not a custodian.

## Where to go next

| If you want to…                        | Go to                            |
| -------------------------------------- | -------------------------------- |
| Get something working end to end       | **Quickstart**                   |
| Understand credentials and roles       | **Authentication**               |
| Query escrows, milestones, balances    | **Escrows** — the read endpoints |
| Handle failures correctly              | **Errors**                       |
| Port an existing Version 1 integration | **Migrating from Version 1**     |
| Browse every endpoint                  | The **API REST** section         |

## Status

The API surface is stable enough to build against, but it runs on testnet and is still moving. If something in these pages disagrees with the interactive API reference, **the API reference wins** — it is generated directly from the running service.


---

# 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/introduction/readme.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.
