> ## 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/rewards/attestations/{epoch}

> Get attestations rewards

```bash title="Mainnet" theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
curl -X POST \
    "https://mainnet.ethereum.validationcloud.io/v1/<YOUR_API_KEY_HERE>/eth/v1/beacon/rewards/attestations/490000" \
    -H "Content-Type: application/json" \
    -d '["1", "2"]'
```

```bash title="Testnet" theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
curl -X POST \
    "https://sepolia.ethereum.validationcloud.io/v1/<YOUR_API_KEY_HERE>/eth/v1/beacon/rewards/attestations/362000" \
    -H "Content-Type: application/json" \
    -d '["1", "2"]'
```


## OpenAPI

````yaml nodeapi/openapi/beacon-node-oapi-v4.json POST /eth/v1/beacon/rewards/attestations/{epoch}
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/rewards/attestations/{epoch}:
    post:
      tags:
        - Beacon
        - Rewards
      summary: Get attestations rewards
      description: >-
        Retrieve attestation reward info for validators specified by array of
        public keys or validator index. If no array is provided, return reward
        info for every validator.
      operationId: getAttestationsRewards
      parameters:
        - name: epoch
          in: path
          required: true
          description: The epoch to get rewards info from
          schema:
            type: string
            example: '1'
      requestBody:
        description: >-
          An array of either hex encoded public key (any bytes48 with 0x prefix)
          or validator index
        required: false
        content:
          application/json:
            schema:
              type: array
              uniqueItems: true
              items:
                description: >-
                  Either hex encoded public key (any bytes48 with 0x prefix) or
                  validator index
                type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                title: GetAttestationsRewardsResponse
                type: object
                required:
                  - execution_optimistic
                  - finalized
                  - data
                properties:
                  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: object
                    description: Rewards info for attestations
                    required:
                      - ideal_rewards
                      - total_rewards
                    properties:
                      ideal_rewards:
                        type: array
                        items:
                          type: object
                          description: Ideal rewards info for a single attestation
                          required:
                            - effective_balance
                            - head
                            - target
                            - source
                            - inactivity
                          properties:
                            effective_balance:
                              type: string
                              example: '1'
                              description: validator's effective balance in gwei
                            head:
                              example: '2500'
                              description: Ideal attester's reward for head vote in gwei
                              type: string
                            target:
                              example: '5000'
                              description: Ideal attester's reward for target vote in gwei
                              type: string
                            source:
                              example: '5000'
                              description: Ideal attester's reward for source vote in gwei
                              type: string
                            inclusion_delay:
                              type: string
                              example: '1'
                              description: >-
                                Ideal attester's inclusion_delay reward in gwei
                                (phase0 only)
                            inactivity:
                              example: '5000'
                              description: Ideal attester's inactivity penalty in gwei
                              type: string
                      total_rewards:
                        type: array
                        items:
                          type: object
                          description: Rewards info for a single attestation
                          required:
                            - validator_index
                            - head
                            - target
                            - source
                            - inactivity
                          properties:
                            validator_index:
                              type: string
                              example: '1'
                              description: >-
                                one entry for every validator based on their
                                attestations in the epoch
                            head:
                              example: '2000'
                              description: attester's reward for head vote in gwei
                              type: string
                            target:
                              example: '2000'
                              description: attester's reward for target vote in gwei
                              type: string
                            source:
                              example: '4000'
                              description: attester's reward for source vote in gwei
                              type: string
                            inclusion_delay:
                              type: string
                              example: '1'
                              description: >-
                                attester's inclusion_delay reward in gwei
                                (phase0 only)
                            inactivity:
                              example: '2000'
                              description: attester's inactivity penalty in gwei
                              type: string
        '400':
          description: Invalid get attestations rewards request
          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
              examples:
                InvalidRequest:
                  value:
                    code: 400
                    message: Invalid request to retrieve attestations rewards info
        '404':
          description: Epoch not known or required data not available
          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
              examples:
                InvalidRequest:
                  value:
                    code: 404
                    message: Epoch not known or required data not available
        '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.