---
title: "Set the managed key access level"
method: PUT
path: "/_api/user/{user}/database/{geofabric}/managedkey/{managed-key-name}"
tags: ["Users"]
---

# Set the managed key access level

`PUT /_api/user/{user}/database/{geofabric}/managedkey/{managed-key-name}`

## Request

- The document declares no server URL.
- Auth: one of:
  - API key in header `Authorization`
  - HTTP bearer
- TypeScript: <https://skmtc.dev/macrometa/apis/macrometa-api-reference/docs/_api/user/:user/database/:geofabric/managedkey/:managed-key-name/put.ts> (a function with typed inputs; its response is checked against the schema)

Set the access level for the *managed key* in the GeoFabric *geofabric* for user *user*.

If the access level for the managed key is not set, then the default("&#42;") access level is used. If the default("&#42;") access level is also not set, then the GeoFabric access level is used.

**Note**: Requires *administrator* permissions.

## Path parameters

- `user` string, string, required
- `geofabric` string, string, required
- `managed-key-name` string, string, required

## Request body

- UserGrantManagedkey
  - `grant` string, required: - Use "rw" to set the managed key level access to *Read/Write*. - Use "ro" to set the managed key level access to *Read Only*. - Use "none" to set the managed key level access to *No access*.

## Response `200`

Successfully changed access permissions.

- unknown

## Other responses

- `400`: Failed due to missing or malformed data. Verify that all parameters are complete.
- `401`: Failed to validate because you do not have access to the GeoFabric.
- `403`: Failed to validate because you do not have access to the server.
- `404`: Failed to find specified GeoFabric, user, or managed key.

---

[API](https://skmtc.dev/macrometa/apis/macrometa-api-reference.md) - [All operations](https://skmtc.dev/macrometa/apis/macrometa-api-reference/llms.txt) - [OpenAPI document](https://skmtc.dev/macrometa/apis/macrometa-api-reference/revisions/2006b6d7f31d?raw)
