> ## Documentation Index
> Fetch the complete documentation index at: https://docs.derive.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# public/decode_action

> 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.



## OpenAPI

````yaml /openapi.json post /public/decode_action
openapi: 3.1.0
info:
  title: Derive v3 API
  version: 0.2.0
  description: JSON-RPC 2.0 methods, served over WebSocket and HTTP POST.
servers:
  - url: https://api.derive.xyz/v3
    description: Production (HTTP POST base)
  - url: https://testnet.api.derive.xyz/v3
    description: Testnet (HTTP POST base)
security: []
tags:
  - name: Subaccounts
    description: >-
      List, inspect, and label subaccounts, portfolios, positions, and
      collateral.
  - name: Session Keys
    description: Register, edit, and list delegated signing keys.
  - name: Account
    description: Wallet-level account information and settings.
  - name: Orderbook
    description: Place, replace, cancel, and query orders, trigger orders, and algos.
  - name: RFQ
    description: 'Request-for-quote: send RFQs, quote, and execute block trades.'
  - name: Vault Shareholders
    description: >-
      Deposit into and withdraw from vaults, and track shares, requests, and
      performance.
  - name: Vault Curators
    description: >-
      Create and operate curated vaults: settle deposit and withdrawal requests,
      and manage vault metadata.
  - name: History
    description: >-
      Per-account historical records: orders, trades, transfers, and
      settlements.
  - name: Market Maker Protection
    description: Configure, read, and reset market-maker protection.
  - name: Transfers & Withdrawals
    description: Move collateral between subaccounts, to other wallets, and on-chain.
  - name: Onchain Actions
    description: >-
      L1 onchain actions submitted via OnchainActionManager: register deposit
      addresses, list pending deposits, and inspect onchain action history.
  - name: System
    description: Rate limits and transaction lookups.
  - name: Market Data
    description: Instruments, currencies, tickers, and market-wide feeds.
  - name: Referrals
    description: Referral codes and program performance.
  - name: Other
    description: Uncategorized.
paths:
  /public/decode_action:
    post:
      tags:
        - System
      summary: public/decode_action
      description: >-
        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.
      operationId: public_decode_action
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DecodeActionRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DecodeActionResponse'
        default:
          description: JSON-RPC error (see Error Codes)
components:
  schemas:
    DecodeActionRequest:
      type: object
      required:
        - action_type
        - encoded_data
      properties:
        action_type:
          $ref: '#/components/schemas/DecodableActionType'
          description: Which action layout the bytes are meant to be.
        encoded_data:
          description: >-
            ABI-encoded action data (the `Action.data` bytes), 0x-prefixed hex.
            Same value the `*_debug` routes return as `encoded_data`.
          type: string
    DecodeActionResponse:
      type: object
      required:
        - action_type
        - decoded
      properties:
        action_type:
          $ref: '#/components/schemas/DecodableActionType'
          description: Echoed back so a batch of probes stays attributable.
        decoded:
          description: >-
            The decoded fields. Decimal values are at the protocol's 1e12 scale
            — the wire carries 1e18, and the codec rejects anything that does
            not convert exactly.
    DecodableActionType:
      description: >-
        Which action codec to run the bytes through. A module address is not
        enough on its own: the RFQ module signs two different layouts, and the
        vault module signs seven.
      type: string
      enum:
        - 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

````

## Related topics

- [Migration skill for your coding agent](/migrating/breaking-changes.md)
- [Action Signing](/authentication/action-signing.md)
- [Error Codes](/error-codes.md)
