---
title: uuid.version7
summary: null
url: >-
  https://www.fastly.com/documentation/reference/vcl/functions/uuid/uuid-version7
---

```
STRING uuid.version7()
```

**Available in:** all subroutines

Derives a version 7 UUID, compliant with the [RFC 9562](https://datatracker.ietf.org/doc/rfc9562/). The first 48 bits represent a timestamp since the [Unix Epoch](https://en.wikipedia.org/wiki/Unix_time) in milliseconds, and the remaining bits (with the exception of the version and variant bits) are random.

Multiple version 7 UUIDs generated within the same subroutine will have the same value for the timestamp bits, but the 74 random bits will be regenerated on each invocation.

## Example

```vcl
set req.http.X-Unique-Id = uuid.version7();
```
