---
title: "[Internal] Update api key"
method: PATCH
path: "/api/api-keys/{api_key_id}"
tags: ["Api keys"]
---

# \[Internal\] Update api key

`PATCH /api/api-keys/{api_key_id}`

## Request

- Base URL: `https://api.typless.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.typless.com/api/api-keys/{api_key_id}`
- Auth: none declared

## Path parameters

- `api_key_id` string, uuid, required

## Request body

- UpdateApiKeyRequest
  - `role` union, required
    - 'BU_READ_ONLY_USER' | 'BU_USER' | 'BU_ADMIN' | 'TENANT_ADMIN' | 'ADMIN'
    - 'UNSPECIFIED'
  - `role_ids` union, required
    - string[]
    - 'UNSPECIFIED'
  - `authorized_business_unit_ids` union, required
    - union[]
      - union
        - string, uuid
        - '*'
    - 'UNSPECIFIED'
  - `name` union, required
    - string
    - 'UNSPECIFIED'
  - `business_unit_id` union, required
    - string, uuid
    - 'UNSPECIFIED'

## Response `200`

Successful Response

- ApiKeyDTO
  - `aggregate_id` string, uuid, required
  - `tenant_id` string, uuid, required
  - `processing_business_unit_id` string, uuid, nullable, required
  - `name` string, required
  - `value` string, required
  - `role` 'BU_READ_ONLY_USER' | 'BU_USER' | 'BU_ADMIN' | 'TENANT_ADMIN' | 'ADMIN', required
  - `active` boolean, required
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, required
  - `role_ids` string[], required
  - `authorized_business_unit_ids` union[], required
    - union
      - string, uuid
      - '*'
  - `permissions` string[], required

## Other responses

- `422`: Validation Error

---

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