Skip to content

Update, retire, or reinstate a public key

PATCH
/v1/public_keys/{id}
curl --request PATCH \
--url http://api.disclosebot.localdev:3000/v1/public_keys/example \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "data": { "type": "public_key", "attributes": { "name": "example", "short_description": "example", "retired": true } } }'

Renames the key or changes its description; retired: true retires it and retired: false reinstates it. Retiring is refused while a brief uses the key for Cloak Mode or an enabled channel encrypts with it. The key material cannot be changed over the API.

id
required
string
Media type application/json
object
data
required
object
type
required
string
Allowed values: public_key
attributes
required
object
name
string
short_description
string
retired

True retires the key, false reinstates it. The key material cannot be changed over the API.

boolean

Reinstated and renamed; key material in the request is ignored

Media type application/json
object
data
required
object
id
required
string format: uuid
type
required
string
Allowed values: public_key
attributes
required
object
name
required
string
short_description
string
nullable
public_key
required

The key material. An X25519 key (base64 of the 32 raw bytes) can be used for encryption and cloaking; a PGP key is stored for reference.

string
retired
required

A retired key is not offered for new encryption or cloaking; what was encrypted to it keeps its link

boolean
retired_at
string format: date-time
nullable
created_at
required
string format: date-time
updated_at
required
string format: date-time
relationships
object
Example
{
"data": {
"type": "public_key"
}
}

The key is in use by an enabled channel