> ## 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.

# Create and Read

<Warning>
  This concept has been absorbed into peaqOS. See [peaqID](/peaqos/concepts/peaqid) for the current identity model.
</Warning>

Create an identity document and read it back from chain.

```python theme={"theme":{"light":"github-light-default","dark":"github-dark"}}
from peaq_robot import PeaqRobot

sdk = PeaqRobot()

# Minimal (defaults id/controller to your address)
try:
    tx = sdk.id.create_identity()
    print(tx)
except Exception:
    # Identity may already exist
    pass

# Optional: create with a custom name (idempotent)
try:
    _ = sdk.id.create_identity(name=f"did:peaq:{sdk.address}")
except Exception:
    pass

doc = sdk.id.read_identity()
print(doc["decoded_data"])  # parsed document if available
```

Response example:

```json theme={"theme":{"light":"github-light-default","dark":"github-dark"}}
{
  "exists": true,
  "read_status": "success",
  "did_account": "5EX69aaLFLyDxNcbxVd3Y4FVxjyHTCXtLDx9scg3uQSXF3r8",
  "name": "identity:5EX69aaLFLyDxNcbxVd3Y4FVxjyHTCXtLDx9scg3uQSXF3r8",
  "value": "0x0a3f...",
  "decoded_data": {
    "id": "did:peaq:5EX69aaLFLyDxNcbxVd3Y4FVxjyHTCXtLDx9scg3uQSXF3r8",
    "controller": "did:peaq:5EX69aaLFLyDxNcbxVd3Y4FVxjyHTCXtLDx9scg3uQSXF3r8",
    "verificationMethods": [
      {
        "id": "did:peaq:5EX69aaLFLyDxNcbxVd3Y4FVxjyHTCXtLDx9scg3uQSXF3r8#keys-1",
        "type": "Sr25519VerificationKey2020",
        "controller": "did:peaq:5EX69aaLFLyDxNcbxVd3Y4FVxjyHTCXtLDx9scg3uQSXF3r8",
        "publicKeyMultibase": "6c97e334e9199cd21944c6882f6222a1b8f5be2ff3b860021f4a074ad4d8d802"
      }
    ],
    "authentications": [
      "did:peaq:5EX69aaLFLyDxNcbxVd3Y4FVxjyHTCXtLDx9scg3uQSXF3r8#keys-1"
    ],
    "services": [],
    "signature": {
      "type": "Sr25519VerificationKey2020",
      "issuer": "5EX69aaLFLyDxNcbxVd3Y4FVxjyHTCXtLDx9scg3uQSXF3r8",
      "hash": "44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a"
    }
  }
}
```

Fields:

* `exists`, `read_status`
* `name`, `value` (encoded string or raw)
* `decoded_data` with `verificationMethods`, `authentications`, `services`, `signature`
