> For the complete documentation index, see [llms.txt](https://docs.globalalerting.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.globalalerting.com/web-api/encryption-keys.md).

# Encryption Keys

## GET /V2/{tenantVarCode}/devices/{deviceId}/encryptionkeys

> Returns device encryption key

```json
{"openapi":"3.0.4","info":{"title":"GAP REST API Documentation V2","version":"v2"},"tags":[{"name":"Encryption Keys"}],"paths":{"/V2/{tenantVarCode}/devices/{deviceId}/encryptionkeys":{"get":{"tags":["Encryption Keys"],"summary":"Returns device encryption key","parameters":[{"name":"tenantVarCode","in":"path","description":"Tenant Var Code","required":true,"schema":{"type":"string"}},{"name":"deviceId","in":"path","description":"Device Id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"string"}},"application/json;IEEE754Compatible=false":{"schema":{"type":"string"}},"application/json;IEEE754Compatible=true":{"schema":{"type":"string"}},"application/xml":{"schema":{"type":"string"}},"text/plain":{"schema":{"type":"string"}},"application/octet-stream":{"schema":{"type":"string"}},"text/json":{"schema":{"type":"string"}},"text/xml":{"schema":{"type":"string"}},"text/csv":{"schema":{"type":"string"}}}}}}}}}
```

## POST /V2/{tenantVarCode}/devices/{deviceId}/encryptionkeys

> Regenerates device encryption key

```json
{"openapi":"3.0.4","info":{"title":"GAP REST API Documentation V2","version":"v2"},"tags":[{"name":"Encryption Keys"}],"paths":{"/V2/{tenantVarCode}/devices/{deviceId}/encryptionkeys":{"post":{"tags":["Encryption Keys"],"summary":"Regenerates device encryption key","parameters":[{"name":"tenantVarCode","in":"path","description":"Tenant Var Code","required":true,"schema":{"type":"string"}},{"name":"deviceId","in":"path","description":"Device Id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"string"}},"application/json;IEEE754Compatible=false":{"schema":{"type":"string"}},"application/json;IEEE754Compatible=true":{"schema":{"type":"string"}},"application/xml":{"schema":{"type":"string"}},"text/plain":{"schema":{"type":"string"}},"application/octet-stream":{"schema":{"type":"string"}},"text/json":{"schema":{"type":"string"}},"text/xml":{"schema":{"type":"string"}},"text/csv":{"schema":{"type":"string"}}}}}}}}}
```

## DELETE /V2/{tenantVarCode}/devices/{deviceId}/encryptionkeys

> Removes device encryption key

```json
{"openapi":"3.0.4","info":{"title":"GAP REST API Documentation V2","version":"v2"},"tags":[{"name":"Encryption Keys"}],"paths":{"/V2/{tenantVarCode}/devices/{deviceId}/encryptionkeys":{"delete":{"tags":["Encryption Keys"],"summary":"Removes device encryption key","parameters":[{"name":"tenantVarCode","in":"path","description":"Tenant Var Code","required":true,"schema":{"type":"string"}},{"name":"deviceId","in":"path","description":"Device Id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"}}}}}}
```
