Skip to main content
GET
/
machines
/
{machine_id}
GET /machines/{machine_id}
curl --request GET \
  --url https://mcr.peaq.xyz/machines/{machine_id}

Documentation Index

Fetch the complete documentation index at: https://docs.peaq.xyz/llms.txt

Use this file to discover all available pages before exploring further.

Endpoint

GET /machines/{machine_id}
Returns a peaqOS Machine Card for a registered machine. The Machine Card follows the ERC-8004 agent registration file pattern, restyled with peaqOS terminology, and includes identity, services, operator, bond status, and registry references.

Path parameters

machine_id
integer
default:"1"
required
On-chain machine ID (not an NFT token ID and not a DID)

Response

200 OK
FieldTypeDescription
typestringpeaqOS registration type: "peaqos:registration:v1"
namestring"Machine #<machine_id>"
descriptionstringFixed string: "peaqOS machine"
didstringMachine DID derived from the machine wallet address (did:peaq:<wallet_address>)
activebooleanAlways true for registered machines
servicesarrayList of service endpoints. Contains one "web" entry if a data_api attribute is configured on the DID document; otherwise empty.
services[].namestring"web"
services[].endpointstringValue of the data_api DID attribute
data_visibilitystring"private", "onchain", or "public". Defaults to "private" if the DID document has no data_visibility attribute.
documentation_urlstringDocumentation URL from the DID document. Empty string if not set.
operatorstring or nullOperator DID from the DID document
bond_statusstring"bonded" or "unbonded"
event_countintegerTotal on-chain event count
registrationsarrayList of registry references (always one entry)
registrations[].typestring"peaqos:registration:v1"
registrations[].machineIdintegerThe machine’s on-chain ID
registrations[].machineRegistrystringCAIP-compatible registry identifier: eip155:<chainId>:<registryAddress>
The chainId in machineRegistry is read from the connected RPC node at server startup (default 3338 for peaq mainnet). The registryAddress is the IdentityRegistry contract address.

Error responses

StatusdetailCondition
404"Machine not found"Machine ID does not exist in the IdentityRegistry contract
404"Machine wallet not found"The machine’s wallet address is the zero address (0x0000...0000)
422(FastAPI validation error)machine_id is less than 1 or not an integer
503"Service not initialised"Server started without contract addresses
503"Chain unavailable"Any chain or DID call failed

Example

curl "${PEAQOS_MCR_API_URL}/machines/42"
Response
{
  "type": "peaqos:registration:v1",
  "name": "Machine #42",
  "description": "peaqOS machine",
  "did": "did:peaq:0xabc1230000000000000000000000000000000001",
  "active": true,
  "services": [
    {
      "name": "web",
      "endpoint": "https://machine.example.com/api/data"
    }
  ],
  "data_visibility": "private",
  "documentation_url": "https://example.com/docs",
  "operator": "did:peaq:0xoperator0000000000000000000000000000001",
  "bond_status": "bonded",
  "event_count": 150,
  "registrations": [
    {
      "type": "peaqos:registration:v1",
      "machineId": 42,
      "machineRegistry": "eip155:3338:0xIdentityRegistryAddress0000000000000001"
    }
  ]
}
  • GET /machine/ returns the full machine profile with MCR score and data visibility-dependent fields.
  • GET /mcr/ returns the detailed MCR score, revenue trend, and revenue summary.
  • GET /metadata/ returns NFT metadata for a MachineNFT token.