Aptos · Example Payload

Get_Account_Modules

Retrieves all account modules' bytecode for a given account at a specific ledger version. If the ledger version is not specified in the request, the latest ledger version is used. The Aptos nodes prune account state history, via a configurable time window. If the requested ledger version has been pruned, the server responds with a 410.

Accounts

Get_Account_Modules is an example object payload from Aptos, with 9 top-level fields. It illustrates the shape of data this provider's APIs accept or return.

Top-level fields

methodpathoperationIdsummarydescriptiontagsparametersrequestBodyresponses

Example Payload

Raw ↑
{
  "method": "GET",
  "path": "/accounts/{address}/modules",
  "operationId": "get_account_modules",
  "summary": "Get account modules",
  "description": "Retrieves all account modules' bytecode for a given account at a specific ledger version.\nIf the ledger version is not specified in the request, the latest ledger version is used.\n\nThe Aptos nodes prune account state history, via a configurable time window.\nIf the requested ledger version has been pruned, the server responds with a 410.",
  "tags": [
    "Accounts"
  ],
  "parameters": [
    {
      "name": "address",
      "in": "path",
      "required": true,
      "description": "Address of account with or without a `0x` prefix",
      "schema": {
        "$ref": "#/components/schemas/Address"
      }
    },
    {
      "name": "ledger_version",
      "in": "query",
      "required": false,
      "description": "Ledger version to get state of account\n\nIf not provided, it will be the latest version",
      "schema": {
        "$ref": "#/components/schemas/U64"
      }
    },
    {
      "name": "start",
      "in": "query",
      "required": false,
      "description": "Cursor specifying where to start for pagination\n\nThis cursor cannot be derived manually client-side. Instead, you must\ncall this endpoint once without this query parameter specified, and\nthen use the cursor returned in the X-Aptos-Cursor header in the\nresponse.",
      "schema": {
        "$ref": "#/components/schemas/StateKeyWrapper"
      }
    },
    {
      "name": "limit",
      "in": "query",
      "required": false,
      "description": "Max number of account modules to retrieve\n\nIf not provided, defaults to default page size.",
      "schema": {
        "type": "integer",
        "format": "uint16"
      }
    }
  ],
  "requestBody": null,
  "responses": {
    "200": {
      "contentType": "application/json",
      "schema": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/MoveModuleBytecode"
        }
      },
      "example": {}
    },
    "400": {
      "contentType": "application/json",
      "schema": {
        "$ref": "#/components/schemas/AptosError"
      },
      "example": {}
    },
    "403": {
      "contentType": "application/json",
      "schema": {
        "$ref": "#/components/schemas/AptosError"
      },
      "example": {}
    },
    "404": {
      "contentType": "application/json",
      "schema": {
        "$ref": "#/components/schemas/AptosError"
      },
      "example": {}
    },
    "410": {
      "contentType": "application/json",
      "schema": {
        "$ref": "#/components/schemas/AptosError"
      },
      "example": {}
    },
    "500": {
      "contentType": "application/json",
      "schema": {
        "$ref": "#/components/schemas/AptosError"
      },
      "example": {}
    },
    "503": {
      "contentType": "application/json",
      "schema": {
        "$ref": "#/components/schemas/AptosError"
      },
      "example": {}
    }
  }
}

Work with this as data

Every example here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for examples

4 MCP tools reach this
  • find_examplesBrowse and filter every example in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This example
curl "https://apis.io/api/v1/examples/get_account_modules"
All examples
curl "https://apis.io/api/v1/examples?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.