---
title: "public/decode_action"
method: POST
path: "/public/decode_action"
tags: ["System"]
---

# public/decode_action

`POST /public/decode_action`

## Request

- Base URL: `https://api.derive.xyz/v3`
- URL: `https://api.derive.xyz/v3/public/decode_action`
- Auth: none declared

Runs a hex-encoded Action.data payload through the exchange's own ABI decoder and returns either the decoded fields or the exact reason the bytes were rejected, naming the 32-byte word and the field that broke. Reach for this first when a request fails signature verification (14014): every other route encodes Action.data server-side, so a client whose encoder emits a bad word never sees a decode error - the hashes simply disagree. This is the only route a client's own bytes reach the decoder. Needs no auth and executes nothing.

## Request body

- DecodeActionRequest
  - `action_type` 'order' | 'rfq_maker' | 'rfq_taker' | 'transfer' | 'external_transfer' | 'withdrawal' | 'liquidation' | 'set_session_key' | 'update_whitelisted_recipients' | 'delete_subaccount' | 'vault_deposit' | 'vault_withdraw' | 'vault_cancel' | 'vault_create' | 'vault_mint_shares' | 'vault_burn_shares' | 'vault_force_burn', required: Which action layout the bytes are meant to be.
  - `encoded_data` string, required: ABI-encoded action data (the `Action.data` bytes), 0x-prefixed hex. Same value the `*_debug` routes return as `encoded_data`.

## Response `200`

Success

- DecodeActionResponse
  - `action_type` 'order' | 'rfq_maker' | 'rfq_taker' | 'transfer' | 'external_transfer' | 'withdrawal' | 'liquidation' | 'set_session_key' | 'update_whitelisted_recipients' | 'delete_subaccount' | 'vault_deposit' | 'vault_withdraw' | 'vault_cancel' | 'vault_create' | 'vault_mint_shares' | 'vault_burn_shares' | 'vault_force_burn', required: Echoed back so a batch of probes stays attributable.
  - `decoded` unknown, required

## Other responses

- `default`: JSON-RPC error (see Error Codes)

## Changes

- **2026-10-20** `0c500202be49`: 1 info
  - added the media type `application/json` for the response with the status `default`

[Operation history](https://skmtc.dev/lyra/apis/derive-v3-api/changes/public/decode_action/post.md)

---

[API](https://skmtc.dev/lyra/apis/derive-v3-api.md) - [All operations](https://skmtc.dev/lyra/apis/derive-v3-api/llms.txt) - [OpenAPI document](https://skmtc.dev/lyra/apis/derive-v3-api/revisions/415f8a73b10c?raw)
