---
title: "PATCH /v2/contacts/{contact_id}/publickeys/{pubkey_id}"
method: PATCH
path: "/v2/contacts/{contact_id}/publickeys/{pubkey_id}"
tags: ["keys", "pgp"]
---

# PATCH /v2/contacts/{contact_id}/publickeys/{pubkey_id}

`PATCH /v2/contacts/{contact_id}/publickeys/{pubkey_id}`

update a public key

## Path parameters

- `contact_id` string, required
- `pubkey_id` string, required

## Request body

- object
  - `label` string, required
  - `current_state` object, required
    - `label` string

## Response `204`

Update successful. No body is returned.

## Other responses

- `400` — json payload malformed
- `401` — Unauthorized access
- `403` — Forbidden patch. Server is refusing to apply the given patch's properties to this ressource
- `404` — public key not found
- `409` — json is valid but patch conflicts with db's current state
- `422` — json is valid but patch was semantically malformed or unprocessable

---

[API](https://skmtc.net/caliopen/apis/caliopen-http-rest-api.md) · [All operations](https://skmtc.net/caliopen/apis/caliopen-http-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/caliopen/caliopen-http-rest-api/revisions/f32b5d08284d/schema)
