> For the complete documentation index, see [llms.txt](https://mimic-api.gitbook.io/mimic-api-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mimic-api.gitbook.io/mimic-api-docs/guides/getting-started/your-first-action.md).

# Your first action

Send tokens from a wallet, end to end.

A transfer is the smallest complete example of the [signed-intent flow](/mimic-api-docs/guides/getting-started/signed-intents.md): one prepare, one signature, one submission.

{% stepper %}
{% step %}

## Prepare

```http
POST /transfers/prepare
X-Api-Key: <your-api-key>
Content-Type: application/json

{
  "chain": "ethereum",
  "token": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
  "amount": "25.0",
  "wallet": "0x1234567890abcdef1234567890abcdef12345678",
  "recipient": "0xabcdef1234567890abcdef1234567890abcdef12"
}
```

All five fields are required.

{% hint style="info" %}
Use `0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE` as `token` to transfer the chain's native asset.
{% endhint %}

**Response:**

```json
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "signBefore": 1700003600000,
  "signaturePayload": {
    "domain": { "name": "Mimic Protocol - Registry", "version": "1" },
    "primaryType": "Trigger",
    "types": { "...": "..." },
    "values": { "...": "..." }
  },
  "executionCost": {
    "estimatedUsdPerExecution": "0.42",
    "maxUsdPerExecution": "0.6"
  },
  "requiredApprovals": [],
  "policies": []
}
```

Keep the `id` — every later call uses it. You do not choose the fee ceiling: `maxUsdPerExecution` is derived from the estimate, and the transfer is skipped rather than executed if the actual fee would exceed it.

Both arrays are empty here, meaning the settler already has the allowance it needs and the wallet is already safeguarded. When they are not, see the next step.
{% endstep %}

{% step %}

## Sign

```javascript
const { domain, types, values } = res.signaturePayload;
const sig = await signer.signTypedData(domain, types, values);
```

If `requiredApprovals` or `policies` came back non-empty, each entry needs signing too — approvals as raw transactions, policies as typed data. See [Signed intents](/mimic-api-docs/guides/getting-started/signed-intents.md#signing) for both.
{% endstep %}

{% step %}

## Execute

```http
POST /transfers/550e8400-e29b-41d4-a716-446655440000/execute
X-Api-Key: <your-api-key>
Content-Type: application/json

{
  "signature": {
    "typedData": { "types": { "...": "..." }, "values": { "...": "..." } },
    "sig": "0x...",
    "signer": "0x1234567890abcdef1234567890abcdef12345678"
  },
  "signedApprovals": [],
  "signedPolicies": []
}
```

Returns `204 No Content`. Submit before the `signBefore` deadline, or the payload is refused.

Poll `GET /transfers/{id}` for the outcome — it reports `status` and, once settled, `txHash`.
{% endstep %}
{% endstepper %}

## Next

That is the whole model, and it does not change. Swaps, bridges and contract calls differ only in their prepare body; even creating a Safe wallet follows the same three steps.

For recurring behavior, continue to [DCA](/mimic-api-docs/guides/integrations/dca.md), which adds a strategy lifecycle on top of this same flow.


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://mimic-api.gitbook.io/mimic-api-docs/guides/getting-started/your-first-action.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
