> **Can't find what you're looking for?** Use `search_docs` on the docs MCP server at `https://docs.navalabs.ai/api/mcp` to find what you need.

# Advanced REST: submit an action \[Developer Preview]

:::warning[Use the supported integration first]
Most builders should use the [Nava MCP server](/sdk/mcp) or
[TypeScript SDK](/sdk/typescript). Implement this REST
transport only when neither supported client fits the host environment.
:::

Submit the exact action your agent intends to execute. The request is structured;
the `prompt` describes the action for people and records, while `proposedTx` is
the canonical action Nava Guardian evaluates.

## Request

:::code-group
```bash [curl]
curl --request POST "$NAVA_BASE_URL/transactions" \
  --header "content-type: application/json" \
  --header "x-api-key: $NAVA_AGENT_API_KEY" \
  --data '{
    "escrowAddress": "0x1111111111111111111111111111111111111111",
    "prompt": "Swap WETH for USDC on Uniswap on Sepolia.",
    "proposedTx": {
      "protocol": "uniswap",
      "chainId": 11155111,
      "to": "0x2222222222222222222222222222222222222222",
      "data": "0x",
      "value": "0x0"
    },
    "arbiter": "policy"
  }'
```

```js [Node.js]
// [!include ../../../../examples/guardian-node/index.mjs:guardian-submit]
```
:::

All addresses and action values above are placeholders. Replace them with the
registered agent wallet and the exact venue-native action before use.
For Universal Router and Permit2 calldata, first review the
[supported action boundary](/guardian/developers/supported-actions); unsupported
commands and incompletely resolved multi-leg actions fail closed.

| Field | Type | Required | Contract |
| --- | --- | --- | --- |
| `escrowAddress` | string | Yes | The agent's registered wallet for the proposed chain. |
| `prompt` | string | Yes | Short description for people and audit records. It is not a policy input. Keep it consistent with `proposedTx` and do not include secrets or personal data. |
| `proposedTx` | object | Yes | Canonical action object. It must include `protocol` and `chainId`; EVM actions use fields such as `to`, `data`, `value`, and optional `nonce`, while typed-data venues carry their native structured fields here. |
| `metadata` | object | No | Non-action context such as environment or trace identifiers. Do not put secrets here. |
| `contextLogs` | object | No | Additional debugging context. Keep it non-sensitive. |
| `executionSignature` | string | No | Agent execution signature when the selected execution flow requires one. |
| `arbiter` | `policy` | No | Selects Nava Guardian policy evaluation. Set it explicitly to `policy`. |

Agent keys cannot submit the pre-encrypted transaction DTO; routing and any
required encryption happen server-side.

## Response

A successful submission returns `201 Created` with the created transaction.
Capture its non-empty `requestHash` and use it as the status resource identifier:

```json
{
  "id": "11111111-2222-3333-4444-555555555555",
  "requestHash": "0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "description": "Swap WETH for USDC on Uniswap on Sepolia.",
  "status": "PENDING"
}
```

The response can contain additional transaction fields. Do not infer the
Guardian result from transaction `status`; poll the verdict and treat
`verdict.outcome` as authoritative.

## Safe submission behavior

* Do not automatically retry `POST /transactions`. The Developer Preview DTO exposes no
  idempotency key, and a repeated POST can create another request.
* On `400`, correct the request. On `401`, replace or re-authenticate the key. On
  `403`, fix the scope, agent, or registered-wallet mismatch.
* On `429` or a service/network failure, first determine whether Nava Service
  created the request. If that cannot be established, stop and reconcile rather
  than issuing a blind duplicate.
* Never log the `x-api-key` value. Log only non-sensitive identifiers such as the
  returned `requestHash`.

Next, [handle the verdict](/guardian/developers/handle-verdicts).

:::details[Model the outcome before wiring the response]
```ts twoslash
type GuardianOutcome = 'pending' | 'approved' | 'rejected'

function canSubmitToVenue(outcome: GuardianOutcome) {
  return outcome === 'approved'
}

const mayExecute = canSubmitToVenue('approved')
//    ^?
```
:::
