---
title: "Get a GPG key"
method: GET
path: "/user/gpg_keys/{id}"
tags: ["user"]
---

# Get a GPG key

`GET /user/gpg_keys/{id}`

## Path parameters

- `id` integer, required

## Response `200`

GPGKey

- GPGKey — GPGKey a user GPG key to sign commit and tag in repository
  - `can_certify` boolean — Whether the key can be used for certification
  - `can_encrypt_comms` boolean — Whether the key can be used for encrypting communications
  - `can_encrypt_storage` boolean — Whether the key can be used for encrypting storage
  - `can_sign` boolean — Whether the key can be used for signing
  - `created_at` string, date-time — The date and time when the GPG key was created
  - `emails` GPGKeyEmail[] — List of email addresses associated with this GPG key
    - `email` string — The email address associated with the GPG key
    - `verified` boolean — Whether the email address has been verified
  - `expires_at` string, date-time — The date and time when the GPG key expires
  - `id` integer — The unique identifier of the GPG key
  - `key_id` string — The key ID of the GPG key
  - `primary_key_id` string — The primary key ID of the GPG key
  - `public_key` string — The public key content in armored format
  - `subkeys` GPGKey[] — List of subkeys of this GPG key
  - `verified` boolean — Whether the GPG key has been verified

## Other responses

- `404` — APINotFound is a not found empty response

---

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