---
title: "Swap created"
method: POST
path: "wallet_action.swap.created"
---

# Swap created

`POST wallet_action.swap.created` (webhook)

Fired when a wallet action is created and execution has begun. The action is now pending.

## Payload

- WalletActionSwapCreatedWebhookPayload — Payload for the wallet_action.swap.created webhook event.
  - `action_type` 'swap' | 'transfer' | 'earn_deposit' | 'earn_withdraw' | 'earn_incentive_claim' | 'earn_fee_collect', required — Type of wallet action
  - `caip2` string, required — Chain identifier.
  - `created_at` string, required — ISO 8601 timestamp of when the wallet action was created.
  - `input_amount` string, nullable, required — Amount of input token in base units. Populated after onchain confirmation.
  - `input_token` string, required — Token address being sold.
  - `output_token` string, required — Token address being bought.
  - `status` 'pending', required — The status of the wallet action.
  - `type` 'wallet_action.swap.created', required — The type of webhook event.
  - `wallet_action_id` string, required — The ID of the wallet action.
  - `wallet_id` string, required — The ID of the wallet involved in the action.

## Acknowledgement `200`

Return a 200 status to indicate that the webhook was received successfully.

---

[API](https://skmtc.net/privy-io/apis/privy-api.md) · [All operations](https://skmtc.net/privy-io/apis/privy-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/privy-io/privy-api/revisions/bb2eb34156cc/schema)
