---
title: "Change an API key's role"
method: PATCH
path: "/api/v1/api-keys/{api_key_param}/role"
tags: ["API Keys"]
---

# Change an API key's role

`PATCH /api/v1/api-keys/{api_key_param}/role`

## Request

- Base URL: `https://dashboard.sealgate.ai`
- URL: `https://dashboard.sealgate.ai/api/v1/api-keys/{api_key_param}/role`
- Auth: HTTP bearer

Change an API key's role (admin, user, owner). Requires the admin role.

## Request body

- UpdateApiKeyRoleRequest
  - `role` string, required: New role for the API key (admin, user, owner)

## Response `200`

Updated role (API key returned masked)

- UpdateApiKeyRoleResponse
  - `status` string, required
  - `api_key` string, required: Masked API key
  - `role` string, required: New role

## Other responses

- `400`: The request was invalid
- `401`: Missing or invalid API key
- `403`: The caller's role is not permitted to perform this action
- `404`: The requested resource was not found
- `422`: Request validation failed

---

[API](https://skmtc.dev/sealgate/apis/sealgate-management-api.md) · [All operations](https://skmtc.dev/sealgate/apis/sealgate-management-api/llms.txt) · [OpenAPI document](https://skmtc.dev/sealgate/apis/sealgate-management-api/revisions/c9ca2e599065?raw)
