---
title: "GET /contracts/{pubkey}/code"
method: GET
path: "/contracts/{pubkey}/code"
tags: ["external", "contract"]
---

# GET /contracts/{pubkey}/code

`GET /contracts/{pubkey}/code`

Get contract code by pubkey

## Path parameters

- `pubkey` string, required

## Response `200`

Contract code

- ByteCode
  - `bytecode` string, required — Base64Check encoded tagged byte array

## Other responses

- `400` — Invalid pubkey
- `404` — Contract not found
- `503` — The node is temporarily unable to handle the request: either its request queues are saturated (overload protection) or it has not yet reached a stable mode. Overload protection is applied to every endpoint, so this response can be returned by any operation. The Retry-After header tells the client how long to back off before retrying.

---

[API](https://skmtc.net/aeternity/apis/aeternity-node.md) · [All operations](https://skmtc.net/aeternity/apis/aeternity-node/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aeternity/aeternity-node/versions/597a254980b2/schema)
