Verify a GPG key
POST
/user/gpg_key_verify
const url = 'https://gitea.example.com/api/v1/user/gpg_key_verify';const options = {method: 'POST', headers: {Authorization: 'Basic <credentials>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://gitea.example.com/api/v1/user/gpg_key_verify \ --header 'Authorization: Basic <credentials>'Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”GPGKey
Media typeapplication/json
GPGKey a user GPG key to sign commit and tag in repository
object
can_certify
Whether the key can be used for certification
boolean
can_encrypt_comms
Whether the key can be used for encrypting communications
boolean
can_encrypt_storage
Whether the key can be used for encrypting storage
boolean
can_sign
Whether the key can be used for signing
boolean
created_at
string format: date-time
emails
List of email addresses associated with this GPG key
Array<object>
GPGKeyEmail an email attached to a GPGKey
object
email
The email address associated with the GPG key
string
verified
Whether the email address has been verified
boolean
expires_at
string format: date-time
id
The unique identifier of the GPG key
integer format: int64
key_id
The key ID of the GPG key
string
primary_key_id
The primary key ID of the GPG key
string
public_key
The public key content in armored format
string
subkeys
Array<object> recursive
verified
Whether the GPG key has been verified
boolean
Examplegenerated
{ "can_certify": true, "can_encrypt_comms": true, "can_encrypt_storage": true, "can_sign": true, "created_at": "2026-04-15T12:00:00Z", "emails": [ { "email": "example", "verified": true } ], "expires_at": "2026-04-15T12:00:00Z", "id": 1, "key_id": "example", "primary_key_id": "example", "public_key": "example", "subkeys": [], "verified": true}APINotFound is a not found empty response
Media typeapplication/json
APIValidationError is error format response related to input validation
Media typeapplication/json
Headers
Section titled “Headers”message
string
url
string