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

# Prepare Partial Withdrawal Transaction

> Construct a serialized transaction to initiate the partial or full withdrawal process for active validators, using `0x02` type of withdrawal credentials.



## OpenAPI

````yaml POST /api/v1/eth/staking/direct/tx/withdrawal/partial
openapi: 3.0.0
info:
  title: Staking API
  description: API used for staking
  version: 1.0.0
  contact: {}
servers:
  - url: https://api.p2p.org/api
security:
  - bearer: []
tags:
  - name: Aptos
    description: Aptos staking operations (stake, unstake, withdraw, claim).
  - name: Celestia
    description: Celestia staking operations (stake, unstake, redelegate, claim).
  - name: Cosmos
    description: Cosmos Hub staking operations (stake, unstake, redelegate, claim).
  - name: EigenLayer
    description: EigenLayer restaking operations.
  - name: Ethereum
    description: Ethereum staking operations (direct, SSV, pooled).
  - name: Hyperliquid
    description: Hyperliquid staking operations.
  - name: Monad
    description: Monad staking operations (delegate, undelegate, withdraw).
  - name: P2P SSV
    description: P2P-managed SSV validator operations (deposit, claim, withdraw).
  - name: Polkadot
    description: Polkadot staking and nomination pool operations.
  - name: Polygon
    description: Polygon staking operations.
  - name: Pooled Staking
    description: Pooled staking vault operations (deposit, unstake, withdraw).
  - name: Sei
    description: Sei staking operations (stake, unstake, redelegate, claim).
  - name: Solana
    description: Solana staking operations (stake, split, merge, deactivate, withdraw).
  - name: SSV
    description: SSV network validator operations.
  - name: Story
    description: Story network staking operations.
  - name: Sui
    description: Sui staking operations.
  - name: TON
    description: TON staking operations (single nominator, whales pool).
  - name: TRON
    description: TRON staking operations (freeze, delegate, vote, withdraw).
  - name: Unified
    description: Unified multi-chain staking interface.
paths:
  /api/v1/eth/staking/direct/tx/withdrawal/partial:
    post:
      tags:
        - Ethereum
      summary: Prepare Partial Withdrawal Transaction
      description: >-
        Construct a serialized transaction to initiate the partial or full
        withdrawal process for active validators, using `0x02` type of
        withdrawal credentials.
      operationId: eth-staking-withdrawal-partial
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EthereumPartialWithdrawalEthereumRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/SuccessResponse'
                  - type: object
                    properties:
                      result:
                        $ref: >-
                          #/components/schemas/EthereumUnsignedTransactionListResponse
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ExceptionResponse'
                  - type: object
                    properties:
                      error:
                        oneOf:
                          - $ref: '#/components/schemas/CommonValidationException'
                          - $ref: >-
                              #/components/schemas/EthereumInvalidDepositDataSignException
                          - $ref: >-
                              #/components/schemas/EthereumPubKeysDoNotExistException
                          - $ref: >-
                              #/components/schemas/EthereumValidatorNotActiveException
                          - $ref: >-
                              #/components/schemas/EthereumValidatorNotConsolidatedException
                          - $ref: >-
                              #/components/schemas/EthereumWrongAmountLengthException
                          - $ref: >-
                              #/components/schemas/EthereumValidatorNotOldEnoughException
                          - $ref: >-
                              #/components/schemas/EthereumDuplicatedPubkeysException
                          - $ref: >-
                              #/components/schemas/EthereumPartialWithdrawalWrongAmountException
              examples:
                ValidationException:
                  value:
                    error:
                      code: 100101
                      message: >-
                        The data provided is not valid. Please check the request
                        parameters and try again.
                      name: ValidationException
                      type: client
                    result: null
                InvalidDepositDataSignException:
                  value:
                    error:
                      code: 103121
                      message: >-
                        The withdrawal transaction could not be created because
                        the signature of the deposit data is invalid. Please
                        re-sign the serialized transaction by following
                        https://docs.p2p.org/docs/signing-transaction-eth.
                      name: InvalidDepositDataSignException
                      type: client
                    result: null
                PubKeysDoNotExistException:
                  value:
                    error:
                      code: 103105
                      message: >-
                        The transaction could not be created because the
                        validator public keys provided are invalid or do not
                        exist.
                      name: PubKeysDoNotExistException
                      type: client
                    result: null
                ValidatorNotActiveException:
                  value:
                    error:
                      code: 103106
                      message: >-
                        The transaction could not be created because one or more
                        validators are not participating currently in the
                        validator activities.
                      name: ValidatorNotActiveException
                      type: client
                    result: null
                ValidatorNotConsolidatedException:
                  value:
                    error:
                      code: 103164
                      message: >-
                        The transaction could not be created because the
                        validator is not consolidated.
                      name: ValidatorNotConsolidatedException
                      type: client
                    result: null
                WrongAmountLengthException:
                  value:
                    error:
                      code: 103165
                      message: >-
                        The transaction could not be created because the amount
                        of Gwei provided is invalid.
                      name: WrongAmountLengthException
                      type: client
                    result: null
                ValidatorNotOldEnoughException:
                  value:
                    error:
                      code: 103167
                      message: >-
                        The transaction could not be created because the
                        validator is not old enough.
                      name: ValidatorNotOldEnoughException
                      type: client
                    result: null
                DuplicatedPubkeysException:
                  value:
                    error:
                      code: 103169
                      message: Error while pubkeys has duplicates
                      name: DuplicatedPubkeysException
                      type: client
                    result: null
                PartialWithdrawalWrongAmountException:
                  value:
                    error:
                      code: 103170
                      message: The transaction could not be created due to wrong amount
                      name: PartialWithdrawalWrongAmountException
                      type: client
                    result: null
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ExceptionResponse'
                  - type: object
                    properties:
                      error:
                        oneOf:
                          - $ref: '#/components/schemas/AuthNoTokenException'
                          - $ref: '#/components/schemas/AuthWrongTokenException'
              examples:
                NoTokenException:
                  value:
                    error:
                      code: 101111
                      message: >-
                        No Bearer token has been provided. To obtain an
                        authentication token, follow the instructions at
                        https://docs.p2p.org/docs/authentication.
                      name: NoTokenException
                      type: authentication
                    result: null
                WrongTokenException:
                  value:
                    error:
                      code: 101109
                      message: >-
                        An invalid Bearer token has been provided. Please
                        specify the correct authentication token.
                      name: WrongTokenException
                      type: authentication
                    result: null
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ExceptionResponse'
                  - type: object
                    properties:
                      error:
                        oneOf:
                          - $ref: >-
                              #/components/schemas/EthereumWeb3CreateTransactionException
                          - $ref: '#/components/schemas/AuthTokenGuardException'
              examples:
                Web3CreateTransactionException:
                  value:
                    error:
                      code: 103104
                      message: >-
                        The Web3 transaction could not be created because the
                        internal server error occurred.
                      name: Web3CreateTransactionException
                      type: server
                    result: null
                TokenGuardException:
                  value:
                    error:
                      code: 101110
                      message: >-
                        The request could not be performed because the server
                        authorization error occurred.
                      name: TokenGuardException
                      type: server
                    result: null
      security:
        - bearer: []
components:
  schemas:
    EthereumPartialWithdrawalEthereumRequest:
      type: object
      properties:
        pubkeys:
          description: Validator public keys.
          example:
            - >-
              0xffC08FcD7cFeF5c70fB2b0e1f2A8EaA690AaE2bDFfa5dBEc4dEef31DcC0B19eB1f9Cebe3E2fe9eefBD9a1BDF6FD89b39
          items:
            type: string
            pattern: ^0x[a-fA-F0-9]{96}$
          type: array
        amount:
          type: string
          description: >-
            Amount of tokens in ETH to withdraw. For a partial withdrawal,
            specify a single number or an array of numbers. For a full
            withdrawal, specify 0.
          example: '1'
          nullable: true
      required:
        - pubkeys
    SuccessResponse:
      type: object
      properties:
        error:
          type: object
          nullable: true
          default: null
          description: Error object. Always null on successful responses.
        result:
          type: object
          description: Response payload containing the requested data.
      description: Standard API success response envelope wrapping the result payload.
      required:
        - error
        - result
    EthereumUnsignedTransactionListResponse:
      type: object
      properties:
        list:
          description: List of unsigned Ethereum transactions to be signed and broadcast.
          type: array
          items:
            $ref: '#/components/schemas/EthereumUnsignedTransactionResponse'
      required:
        - list
    ExceptionResponse:
      type: object
      properties:
        error:
          type: object
          description: Error object containing exception details. Null on success.
        result:
          type: object
          nullable: true
          default: null
          description: Result payload. Always null on error responses.
        requestId:
          type: string
          description: >-
            Identifier of the request (the `x-request-id` header). Quote this
            value to correlate the response with server logs.
          example: 90c16e9e-6e99-4651-a033-60290356df2f
        timestamp:
          type: string
          format: date-time
          description: ISO 8601 timestamp of when the error response was generated.
          example: '2026-05-20T22:29:03.126Z'
      description: Standard API error response envelope wrapping the exception details.
      required:
        - error
        - result
        - timestamp
    CommonValidationException:
      type: object
      properties:
        type:
          type: string
          default: client
          example: client
          description: Exception category.
        code:
          type: integer
          format: int32
          default: 100101
          example: 100101
          description: Numeric error code identifying the exception type.
        message:
          type: string
          default: >-
            The data provided is not valid. Please check the request parameters
            and try again.
          example: >-
            The data provided is not valid. Please check the request parameters
            and try again.
          description: Human-readable error message describing what went wrong.
        errors:
          description: Validation error details when applicable.
          type: array
          items:
            $ref: '#/components/schemas/ValidationErrorResponse'
        name:
          type: string
          default: ValidationException
          example: ValidationException
          description: Exception class name for runtime error identification.
      required:
        - type
        - code
        - message
        - errors
        - name
    EthereumInvalidDepositDataSignException:
      type: object
      properties:
        type:
          type: string
          default: client
          example: client
          description: Exception category.
        code:
          type: integer
          format: int32
          default: 103121
          example: 103121
          description: Numeric error code identifying the exception type.
        message:
          type: string
          default: >-
            The withdrawal transaction could not be created because the
            signature of the deposit data is invalid. Please re-sign the
            serialized transaction by following
            https://docs.p2p.org/docs/signing-transaction-eth.
          example: >-
            The withdrawal transaction could not be created because the
            signature of the deposit data is invalid. Please re-sign the
            serialized transaction by following
            https://docs.p2p.org/docs/signing-transaction-eth.
          description: Human-readable error message describing what went wrong.
        name:
          type: string
          default: InvalidDepositDataSignException
          example: InvalidDepositDataSignException
          description: Exception class name for runtime error identification.
      required:
        - type
        - code
        - message
        - name
    EthereumPubKeysDoNotExistException:
      type: object
      properties:
        type:
          type: string
          default: client
          example: client
          description: Exception category.
        code:
          type: integer
          format: int32
          default: 103105
          example: 103105
          description: Numeric error code identifying the exception type.
        message:
          type: string
          default: >-
            The transaction could not be created because the validator public
            keys provided are invalid or do not exist.
          example: >-
            The transaction could not be created because the validator public
            keys provided are invalid or do not exist.
          description: Human-readable error message describing what went wrong.
        name:
          type: string
          default: PubKeysDoNotExistException
          example: PubKeysDoNotExistException
          description: Exception class name for runtime error identification.
      required:
        - type
        - code
        - message
        - name
    EthereumValidatorNotActiveException:
      type: object
      properties:
        type:
          type: string
          default: client
          example: client
          description: Exception category.
        code:
          type: integer
          format: int32
          default: 103106
          example: 103106
          description: Numeric error code identifying the exception type.
        message:
          type: string
          default: >-
            The transaction could not be created because one or more validators
            are not participating currently in the validator activities.
          example: >-
            The transaction could not be created because one or more validators
            are not participating currently in the validator activities.
          description: Human-readable error message describing what went wrong.
        name:
          type: string
          default: ValidatorNotActiveException
          example: ValidatorNotActiveException
          description: Exception class name for runtime error identification.
      required:
        - type
        - code
        - message
        - name
    EthereumValidatorNotConsolidatedException:
      type: object
      properties:
        type:
          type: string
          default: client
          example: client
          description: Exception category.
        code:
          type: integer
          format: int32
          default: 103164
          example: 103164
          description: Numeric error code identifying the exception type.
        message:
          type: string
          default: >-
            The transaction could not be created because the validator is not
            consolidated.
          example: >-
            The transaction could not be created because the validator is not
            consolidated.
          description: Human-readable error message describing what went wrong.
        name:
          type: string
          default: ValidatorNotConsolidatedException
          example: ValidatorNotConsolidatedException
          description: Exception class name for runtime error identification.
      required:
        - type
        - code
        - message
        - name
    EthereumWrongAmountLengthException:
      type: object
      properties:
        type:
          type: string
          default: client
          example: client
          description: Exception category.
        code:
          type: integer
          format: int32
          default: 103165
          example: 103165
          description: Numeric error code identifying the exception type.
        message:
          type: string
          default: >-
            The transaction could not be created because the amount of Gwei
            provided is invalid.
          example: >-
            The transaction could not be created because the amount of Gwei
            provided is invalid.
          description: Human-readable error message describing what went wrong.
        name:
          type: string
          default: WrongAmountLengthException
          example: WrongAmountLengthException
          description: Exception class name for runtime error identification.
      required:
        - type
        - code
        - message
        - name
    EthereumValidatorNotOldEnoughException:
      type: object
      properties:
        type:
          type: string
          default: client
          example: client
          description: Exception category.
        code:
          type: integer
          format: int32
          default: 103167
          example: 103167
          description: Numeric error code identifying the exception type.
        message:
          type: string
          default: >-
            The transaction could not be created because the validator is not
            old enough.
          example: >-
            The transaction could not be created because the validator is not
            old enough.
          description: Human-readable error message describing what went wrong.
        name:
          type: string
          default: ValidatorNotOldEnoughException
          example: ValidatorNotOldEnoughException
          description: Exception class name for runtime error identification.
      required:
        - type
        - code
        - message
        - name
    EthereumDuplicatedPubkeysException:
      type: object
      properties:
        type:
          type: string
          default: client
          example: client
          description: Exception category.
        code:
          type: integer
          format: int32
          default: 103169
          example: 103169
          description: Numeric error code identifying the exception type.
        message:
          type: string
          default: Error while pubkeys has duplicates
          example: Error while pubkeys has duplicates
          description: Human-readable error message describing what went wrong.
        name:
          type: string
          default: DuplicatedPubkeysException
          example: DuplicatedPubkeysException
          description: Exception class name for runtime error identification.
      required:
        - type
        - code
        - message
        - name
    EthereumPartialWithdrawalWrongAmountException:
      type: object
      properties:
        type:
          type: string
          default: client
          example: client
          description: Exception category.
        code:
          type: integer
          format: int32
          default: 103170
          example: 103170
          description: Numeric error code identifying the exception type.
        message:
          type: string
          default: The transaction could not be created due to wrong amount
          example: The transaction could not be created due to wrong amount
          description: Human-readable error message describing what went wrong.
        name:
          type: string
          default: PartialWithdrawalWrongAmountException
          example: PartialWithdrawalWrongAmountException
          description: Exception class name for runtime error identification.
      required:
        - type
        - code
        - message
        - name
    AuthNoTokenException:
      type: object
      properties:
        type:
          type: string
          default: authentication
          example: authentication
          description: Exception category.
        code:
          type: integer
          format: int32
          default: 101111
          example: 101111
          description: Numeric error code identifying the exception type.
        message:
          type: string
          default: >-
            No Bearer token has been provided. To obtain an authentication
            token, follow the instructions at
            https://docs.p2p.org/docs/authentication.
          example: >-
            No Bearer token has been provided. To obtain an authentication
            token, follow the instructions at
            https://docs.p2p.org/docs/authentication.
          description: Human-readable error message describing what went wrong.
        name:
          type: string
          default: NoTokenException
          example: NoTokenException
          description: Exception class name for runtime error identification.
      required:
        - type
        - code
        - message
        - name
    AuthWrongTokenException:
      type: object
      properties:
        type:
          type: string
          default: authentication
          example: authentication
          description: Exception category.
        code:
          type: integer
          format: int32
          default: 101109
          example: 101109
          description: Numeric error code identifying the exception type.
        message:
          type: string
          default: >-
            An invalid Bearer token has been provided. Please specify the
            correct authentication token.
          example: >-
            An invalid Bearer token has been provided. Please specify the
            correct authentication token.
          description: Human-readable error message describing what went wrong.
        name:
          type: string
          default: WrongTokenException
          example: WrongTokenException
          description: Exception class name for runtime error identification.
      required:
        - type
        - code
        - message
        - name
    EthereumWeb3CreateTransactionException:
      type: object
      properties:
        type:
          type: string
          default: server
          example: server
          description: Exception category.
        code:
          type: integer
          format: int32
          default: 103104
          example: 103104
          description: Numeric error code identifying the exception type.
        message:
          type: string
          default: >-
            The Web3 transaction could not be created because the internal
            server error occurred.
          example: >-
            The Web3 transaction could not be created because the internal
            server error occurred.
          description: Human-readable error message describing what went wrong.
        name:
          type: string
          default: Web3CreateTransactionException
          example: Web3CreateTransactionException
          description: Exception class name for runtime error identification.
      required:
        - type
        - code
        - message
        - name
    AuthTokenGuardException:
      type: object
      properties:
        type:
          type: string
          default: server
          example: server
          description: Exception category.
        code:
          type: integer
          format: int32
          default: 101110
          example: 101110
          description: Numeric error code identifying the exception type.
        message:
          type: string
          default: >-
            The request could not be performed because the server authorization
            error occurred.
          example: >-
            The request could not be performed because the server authorization
            error occurred.
          description: Human-readable error message describing what went wrong.
        name:
          type: string
          default: TokenGuardException
          example: TokenGuardException
          description: Exception class name for runtime error identification.
      required:
        - type
        - code
        - message
        - name
    EthereumUnsignedTransactionResponse:
      type: object
      properties:
        serializeTx:
          type: string
          description: Serialized unsigned transaction.
          example: 0x02f902d70580830167...
          pattern: ^0x([A-Fa-f0-9])+$
          nullable: false
        to:
          type: string
          description: Recipient address for this transaction.
          example: '0x338EF19fA2eC0fc4d1277B1307a613fA1FBbc0cb'
          pattern: ^0x[a-fA-F0-9]{40}$
        gasLimit:
          type: string
          example: '0'
          description: Maximum gas limit for this block.
        data:
          type: string
          example: ''
          description: Transaction data.
        value:
          type: string
          example: '0'
          description: Amount of tokens to send in Wei.
        chainId:
          type: string
          example: '0'
          description: Chain ID this transaction is authorized on, as specified by EIP-155.
        type:
          type: string
          example: '0'
          description: EIP-2718 type of this transaction envelope.
        maxFeePerGas:
          type: string
          example: '0'
          description: >-
            Maximum price per unit of gas this transaction will pay for the
            combined EIP-1559 block's base fee and this transaction's priority
            fee in Wei.
        maxPriorityFeePerGas:
          type: string
          example: '0'
          description: >-
            Price per unit of gas in Wei, which is added to the EIP-1559 block's
            base fee. This added fee is used to incentivize miners to prioritize
            this transaction.
      required:
        - serializeTx
        - to
        - gasLimit
        - data
        - value
        - chainId
        - type
        - maxFeePerGas
        - maxPriorityFeePerGas
    ValidationErrorResponse:
      type: object
      properties:
        property:
          type: string
          description: Name of the property that failed validation.
        constraints:
          type: object
          additionalProperties:
            type: string
          description: Validation constraint details describing what was expected.
      required:
        - property
        - constraints
  responses:
    TooManyRequests:
      description: >-
        Too Many Requests — the client exceeded its rate limit. The response
        advertises when to retry and the active quota via headers.
      headers:
        Retry-After:
          description: Number of seconds to wait before retrying the request.
          schema:
            type: integer
            example: 60
        RateLimit-Limit:
          description: >-
            The request quota (maximum number of requests) for the most
            restrictive applicable window.
          schema:
            type: integer
            example: 120
        RateLimit-Reset:
          description: >-
            Number of seconds until the rate-limit window resets and requests
            are accepted again.
          schema:
            type: integer
            example: 60
        RateLimit-Policy:
          description: >-
            The active rate-limit policy as `<limit>;w=<window-seconds>`,
            comma-separated when multiple windows apply.
          schema:
            type: string
            example: 120;w=60
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: object
                properties:
                  code:
                    type: integer
                  name:
                    type: string
                    example: ThrottlerException
                  message:
                    type: string
                    example: ThrottlerException
                  errors:
                    type: array
                    nullable: true
                    items:
                      type: object
              result:
                type: object
                nullable: true
                example: null
              requestId:
                type: string
                description: >-
                  Identifier of the request (the `x-request-id` header). Quote
                  this value to correlate the response with server logs.
                example: 90c16e9e-6e99-4651-a033-60290356df2f
              timestamp:
                type: string
                format: date-time
                description: ISO 8601 timestamp of when the error response was generated.
                example: '2026-05-20T22:29:03.126Z'
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: JWT
      type: http

````

## Related topics

- [Prepare Withdrawal Transaction](/reference/eth-eigen-withdrawal.md)
- [Withdrawal](/docs/morpho-withdrawal.md)
