<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 13.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "HealthKit",
  "identifier" : "/documentation/HealthKit/HKObject/uuid",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "HealthKit"
    ],
    "preciseIdentifier" : "c:objc(cs)HKObject(py)UUID"
  },
  "title" : "uuid"
}
-->

# uuid

The universally unique identifier (UUID) for this HealthKit object.

```
var uuid: UUID { get }
```

## Discussion

HealthKit assigns a UUID to the object when you create it. If you want to add your own unique ID, add it to the object’s metadata using the [`HKMetadataKeyExternalUUID`](/documentation/HealthKit/HKMetadataKeyExternalUUID) key.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)