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

# User's HTTP API

> Step-by-step tutorial for creating and settling intents using the Bron API

This guide walks you through creating, polling, and settling a new **Intent** in the Bron platform. Intents are the core mechanism for executing asset swaps through the auction-based solver network.

<Note>
  Intents are **idempotent**. Always generate and persist your own `intentId`. If you retry a request with the same `intentId`, the API will safely return the same intent.
</Note>

## Prerequisites

1. **Workspace ID** (e.g. `v5xez43nnluqmyhhw67x`), you can get it from the Workspace -> Settings page
2. **Account ID** with a valid deposit address for the `fromAssetId` (Account settings)
3. **API Key** with "Manage Transfers" permissions
4. At least one of `fromAmount` or `toAmount` defined (do not set both unless your integration explicitly supports it)

## Step 1: Create an Intent request

```bash theme={"system"}
POST https://api.bron.org/workspaces/{workspaceId}/intents

Request Example

{
  "accountId": "c2joaorrushyrbe2ppvp3gog",
  "fromAmount": "1",
  "fromAssetId": "5",
  "intentId": "x50nqjmvdrbjpk3mw5x4n7w6",
  "toAssetId": "22628"
}

Response Example

{
  "intentId": "x50nqjmvdrbjpk3mw5x4n7w6",
  "status": "user-initiated",
  "fromNetworkId": "CC",
  "fromAssetId": "5",
  "userAddress": "0xc629e6341337AEc9a773A2170FF38bd00299a3F0",
  "toNetworkId": "ETH",
  "toAssetId": "22628",
  "fromAmount": "1",
  "maxPrice": "2.408",
  "expiresAt": "1758185826000",
  "auctionDuration": "15",
  "userSettlementDeadline": "1758189426000",
  "updatedAt": "1758185811000",
  "createdAt": "1758185811000"
}
```

**Field Highlights**

* intentId: Client-generated unique ID, used as idempotency key
* status: Current lifecycle state (user-initiated, auction-in-progress, completed, etc.)
* maxPrice: Upper price limit enforced by protocol
* expiresAt: Quote expiration (epoch ms)
* userSettlementDeadline: Hard deadline for user settlement

### Step 2: Poll Intent Status and price

```bash theme={"system"}
GET https://api.bron.org/workspaces/{workspaceId}/intents/{intentId}

Typical mid-auction response:

{
  "status": "auction-in-progress",
  "price": "2.15",
  "toAmount": "2.150000000000000000",
  "solverAddress": "bron::122082f70795...",
  "expiresAt": "1758185826000",
  "userSettlementDeadline": "1758189426000"
}
```

<Note>
  Wait until you see a `price` with status `auction-in-progress` before proceeding to settlement.
</Note>

### Step 3: Create Transaction for Settlement

Once you are ready to settle, create a transaction referencing the intentId.

```bash theme={"system"}
POST https://api.bron.org/workspaces/{workspaceId}/transactions

Request Example

{
  "accountId": "c2joaorrushyrbe2ppvp3gog",
  "externalId": "kdx5kev1gj1exehcs1izdxm1",
  "transactionType": "intents",
  "params": {
    "intentId": "x50nqjmvdrbjpk3mw5x4n7w6"
  }
}

Response Example

{
  "transactionId": "x50nqjmvdrbjpk3mw5x4n7w6",
  "status": "signing-required",
  "transactionType": "intents",
  "accountId": "c2joaorrushyrbe2ppvp3gog",
  "workspaceId": "v5xez43nnluqmyhhw67x"
}
```

At this point the transaction is created and must be signed before it can be broadcast on-chain.

### Step 4: Signing Transactions

Transactions created for intents require a signature step. You can sign them in two ways:

1. Manually via the Bron desktop application (user flow)
2. Automatically with the [MPC Hot Signer](/hot-signer/about)

<Note>
  [The MPC Hot Signer](/hot-signer/about) enables automated transaction signing inside your infrastructure.
  This is recommended for enterprise integrations that require non-interactive settlement.
</Note>

### Step 5: Monitor Until Completion (optional)

Use the Transactions API to track status until a terminal state (completed):

```bash theme={"system"}
GET https://api.bron.org/workspaces/{workspaceId}/transactions/{transactionId}
```

**Time & Lifecycle Constraints**

* Settle before the userSettlementDeadline expired
* Missed deadlines lead to automatic cancellation
* Re-using an existing intentId will return the same intent if it was already created
