# Get an intent

> Get an intent by id.

`GET /v1/agent-api/intents/{id}`

## Path parameters

| Field | Type   | Required | Description |
| ----- | ------ | -------- | ----------- |
| `id`  | string | Yes      |             |

## Responses

| Status | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `200`  | Intent state. A completed payment intent's `data` carries `paymentCredential` (the credential to present to the seller) and `transaction` (the same shape send/transfer serve); `data.x402` is a deprecated protocol-named copy of both. A payment carried by a movement plan carries `movement`: its `nextStep` reads `wait` while a person decides it, an admin signs it, or its signature is in flight, then `done` or `blocked`. A payment a person approved is signed by an admin, not the agent; an agent that restarted before signing a payment nobody had to approve sends its original request again on the same Idempotency-Key. `status` cannot carry this on its own, because a payment an admin is signing and one whose signature is in flight both read `processing`. |
| `404`  | Intent missing or not owned by the authenticated agent (`intent_not_found`)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |

## Response fields

| Field               | Type                                                                                                                                  | Required | Description                                                                                                                                                                                  |
| ------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `id`                | string                                                                                                                                | Yes      |                                                                                                                                                                                              |
| `accountId`         | string                                                                                                                                |          | Resolved source account, pinned when the intent was created. Omitted for actions without an account.                                                                                         |
| `type`              | `"send"` \| `"transfer"` \| `"create_counterparty"` \| `"request_counterparty_details"` \| `"x402"` \| `"mpp"` \| `"policy_override"` | Yes      |                                                                                                                                                                                              |
| `status`            | `"pending"` \| `"processing"` \| `"completed"` \| `"blocked"` \| `"failed"`                                                           | Yes      |                                                                                                                                                                                              |
| `resolution`        | `"completed"` \| `"blocked"` \| `"denied"` \| `"expired"` \| `"failed"` \| `"cancelled"` or string or null                            | Yes      | Exact terminal outcome, or null while the intent is nonterminal. Known values are completed, blocked, denied, expired, failed, and cancelled; clients must preserve future nonblank strings. |
| `reasons`           | array of string                                                                                                                       | Yes      |                                                                                                                                                                                              |
| `expiresAt`         | string or null                                                                                                                        | Yes      |                                                                                                                                                                                              |
| `movement`          | object                                                                                                                                |          |                                                                                                                                                                                              |
| `movement.planId`   | string                                                                                                                                | Yes      |                                                                                                                                                                                              |
| `movement.nextStep` | `"wait"` \| `"done"` \| `"blocked"`                                                                                                   | Yes      |                                                                                                                                                                                              |
| `data`              | object or null                                                                                                                        | Yes      |                                                                                                                                                                                              |
| `metadata`          | object                                                                                                                                | Yes      |                                                                                                                                                                                              |
| `metadata.dataUrl`  | string or null                                                                                                                        | Yes      |                                                                                                                                                                                              |

## Example

### SDK

```ts
import { createCatenaClient } from "@catena/sdk"

// Reads CATENA_SECRET_KEY
const client = createCatenaClient()

const intent = await client.getIntent("int_01JC3B2K7W9D4F6H8J1M3P5R7T")
```

### CLI

```sh
catena intents get int_01JC3B2K7W9D4F6H8J1M3P5R7T
```

### Response `200`

```json
{
  "id": "int_01JC3B2K7W9D4F6H8J1M3P5R7T",
  "accountId": "acct_01JC2Y6ZQ8R4M7N9P3S5T6V8WX",
  "type": "send",
  "status": "completed",
  "resolution": "completed",
  "reasons": [],
  "expiresAt": null,
  "data": null,
  "metadata": {
    "dataUrl": null
  }
}
```
