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

# /eth/v1/beacon/states/{state_id}/pending_deposits

> Get State Pending Deposits

```bash title="Mainnet" theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
curl -X GET \
    "https://mainnet.ethereum.validationcloud.io/v1/<YOUR_API_KEY_HERE>/eth/v1/beacon/states/head/pending_deposits" \
    -H "Content-Type: application/json"
```

```bash title="Testnet" theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
curl -X GET \
    "https://sepolia.ethereum.validationcloud.io/v1/<YOUR_API_KEY_HERE>/eth/v1/beacon/states/head/pending_deposits" \
    -H "Content-Type: application/json"
```


## OpenAPI

````yaml nodeapi/openapi/beacon-node-oapi-v4.json GET /eth/v1/beacon/states/{state_id}/pending_deposits
openapi: 3.1.0
info:
  title: Eth Beacon Node API
  version: v4.0.0 - Ethereum Proof-of-Stake Consensus Specification v1.5.0
  description: >-
    Subset of the Ethereum Beacon Node API v4.0.0 for routes added after the
    v2.3.0 spec used by the other beacon pages.
servers:
  - url: https://mainnet.ethereum.validationcloud.io/v1/<YOUR_API_KEY_HERE>/
    description: Mainnet Beacon API
  - url: https://sepolia.ethereum.validationcloud.io/v1/<YOUR_API_KEY_HERE>/
    description: Sepolia Beacon API
security: []
tags:
  - name: Beacon
    description: Set of endpoints to query beacon chain.
  - name: Config
    description: Endpoints to query chain configuration, specification, and fork schedules.
  - name: Debug
    description: Set of endpoints to debug chain and shouldn't be exposed publicly.
  - name: Node
    description: Endpoints to query node related information.
  - name: Validator
    description: Endpoints intended for validator clients.
  - name: ValidatorRequiredApi
    description: >
      Minimal set of endpoints to enable a working validator implementation.


      [Checkout validator flow](./validator-flow.md) to learn how to use this
      api.
  - name: Rewards
    description: Endpoints to query rewards and penalties for validators.
paths:
  /eth/v1/beacon/states/{state_id}/pending_deposits:
    get:
      tags:
        - Beacon
      summary: Get State Pending Deposits
      description: >
        Returns pending deposits for state with given 'stateId'. Should return
        400 if the state retrieved is prior to Electra.
      operationId: getPendingDeposits
      parameters:
        - name: state_id
          in: path
          required: true
          example: head
          schema:
            type: string
          description: >
            State identifier.

            Can be one of: "head" (canonical head in node's view), "genesis",
            "finalized", "justified", \<slot\>, \<hex encoded stateRoot with 0x
            prefix\>.
      responses:
        '200':
          description: Success
          headers:
            Eth-Consensus-Version:
              description: >-
                The active consensus version to which the pending deposits
                belong.
              required: true
              schema:
                type: string
                enum:
                  - phase0
                  - altair
                  - bellatrix
                  - capella
                  - deneb
                  - electra
                  - fulu
                example: electra
          content:
            application/json:
              schema:
                title: GetPendingDepositsResponse
                type: object
                required:
                  - version
                  - execution_optimistic
                  - finalized
                  - data
                properties:
                  version:
                    type: string
                    enum:
                      - phase0
                      - altair
                      - bellatrix
                      - capella
                      - deneb
                      - electra
                      - fulu
                    example: electra
                  execution_optimistic:
                    type: boolean
                    example: false
                    description: >-
                      True if the response references an unverified execution
                      payload. Optimistic information may be invalidated at a
                      later time. If the field is not present, assume the False
                      value.
                  finalized:
                    type: boolean
                    example: false
                    description: >-
                      True if the response references the finalized history of
                      the chain, as determined by fork choice. If the field is
                      not present, additional calls are necessary to compare the
                      epoch of the requested information with the finalized
                      checkpoint.
                  data:
                    type: array
                    items:
                      type: object
                      description: >-
                        The
                        [`PendingDeposit`](https://github.com/ethereum/consensus-specs/blob/v1.5.0/specs/electra/beacon-chain.md#pendingdeposit)
                        object from the CL Electra spec.
                      required:
                        - pubkey
                        - withdrawal_credentials
                        - amount
                        - signature
                        - slot
                      properties:
                        pubkey:
                          type: string
                          format: hex
                          pattern: ^0x[a-fA-F0-9]{96}$
                          description: >-
                            The validator's BLS public key, uniquely identifying
                            them. _48-bytes, hex encoded with 0x prefix, case
                            insensitive._
                          example: >-
                            0x93247f2209abcacf57b75a51dafae777f9dd38bc7053d1af526f220a7489a6d3a2753e5f3e8b1cfe39b56f43611df74a
                        withdrawal_credentials:
                          type: string
                          format: hex
                          example: >-
                            0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2
                          pattern: ^0x[a-fA-F0-9]{64}$
                          description: The withdrawal credentials.
                        amount:
                          description: The value to be deposited (gwei).
                          type: string
                          example: '1'
                        signature:
                          type: string
                          format: hex
                          pattern: ^0x[a-fA-F0-9]{192}$
                          example: >-
                            0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505
                        slot:
                          type: string
                          example: '1'
                          description: The slot at which the deposit request was processed.
                    maxItems: 134217728
            application/octet-stream:
              schema:
                description: >-
                  SSZ serialized `List[PendingDeposit, PENDING_DEPOSITS_LIMIT]`
                  bytes. Use Accept header to choose this response type
        '400':
          description: Invalid request syntax.
          content:
            application/json:
              schema:
                type: object
                required:
                  - code
                  - message
                properties:
                  code:
                    description: >-
                      Either specific error code in case of invalid request or
                      http status code
                    type: number
                    example: 400
                  message:
                    description: Message describing error
                    type: string
                  stacktraces:
                    description: Optional stacktraces, sent when node is in debug mode
                    type: array
                    items:
                      type: string
        '404':
          description: Not found
          content:
            application/json:
              schema:
                type: object
                required:
                  - code
                  - message
                properties:
                  code:
                    description: >-
                      Either specific error code in case of invalid request or
                      http status code
                    type: number
                    example: 404
                  message:
                    description: Message describing error
                    type: string
                  stacktraces:
                    description: Optional stacktraces, sent when node is in debug mode
                    type: array
                    items:
                      type: string
              example:
                code: 404
                message: Requested item not found
        '406':
          description: Accepted media type is not supported.
          content:
            application/json:
              schema:
                type: object
                required:
                  - code
                  - message
                properties:
                  code:
                    description: >-
                      The media type in "Accept" header is unsupported, and the
                      request has been rejected. This occurs when the server
                      cannot produce a response in the format accepted by the
                      client.
                    type: number
                    example: 406
                  message:
                    description: Message describing error
                    type: string
                  stacktraces:
                    description: Optional stacktraces, sent when node is in debug mode
                    type: array
                    items:
                      type: string
              example:
                code: 406
                message: Accepted media type not supported
        '500':
          description: Beacon node internal error.
          content:
            application/json:
              schema:
                type: object
                required:
                  - code
                  - message
                properties:
                  code:
                    description: >-
                      Either specific error code in case of invalid request or
                      http status code
                    type: number
                    example: 404
                  message:
                    description: Message describing error
                    type: string
                  stacktraces:
                    description: Optional stacktraces, sent when node is in debug mode
                    type: array
                    items:
                      type: string
              example:
                code: 500
                message: Internal server error

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.