<!-- source: https://secondlayer.tools/docs/api-reference#get-epoch2-header -->

## Epoch 2.x block header by id

`GET /v1/proofs/epoch2-header/{index_block_hash}`

A pre-Nakamoto block's header from the Stacks node (`/v2/headers/1?tip={id}`), as the node's one-element array: `header` (consensus-serialized StacksBlockHeader, hex), `consensus_hash` and `parent_block_id`. The id is sha512/256(sha512/256(header) || consensus_hash): recompute it, then check state against the header's `state_index_root`. Nakamoto blocks are a 404 here; use the block route. Free and keyless: never metered, no account needed. Hosted limits: 10 requests per second per IP (1 for witnesses), or 20 (2) per account with a key. Bytes are passed through unchanged; verify them, do not trust them.

### Path parameters

| Name | Type | Description |
| --- | --- | --- |
| `index_block_hash` | string, required | The block's `index_block_hash`: 64 hex characters, `0x` optional. |

### Responses

- `200` The block's header and consensus hash
- `400` A path or query parameter is malformed (`VALIDATION_ERROR`): hashes must be exact-length hex, heights non-negative integers
- `401` This bind requires the instance token, and it was missing or wrong
- `404` The node has no epoch 2.x block with that `index_block_hash`
- `429` Rate limited; retry after `Retry-After` seconds
- `502` The node or proof sidecar could not be reached, or answered with an unexpected status (`PROOF_SOURCE_ERROR`)

### Example

```bash
curl https://api.secondlayer.tools/v1/proofs/epoch2-header/990152a894e12288960c8b68e5790ad7994f9d261e9ad8adc13c72e76f914339 \
  -H "Authorization: Bearer $SECONDLAYER_API_KEY"
```

```json
[
  {
    "consensus_hash": "0898651bac6711e8c7679d76bdf5ffb11e9d6f7c",
    "header": "070000004b4c5f4fb400000000000249f0…",
    "parent_block_id": "d281730546550e66a5b734c49cba0867c3e379c6d39f7e819be44c64a9c03b9f"
  }
]
```
