ZITADEL Docs
APIsCore ResourcesV2Action

List Public Keys

Lists all public keys of a target. The response includes which key is active and the key's expiration dates. This allows you to manage key rotations and ensure that your target always has an active key for payload encryption.

Required permission:

  • action.target.read
POST
/v2/actions/targets/{target_id}/publickeys/search

Path Parameters

target_id*string

TargetID is the unique identifier of the target to list the public keys for.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://loading/v2/actions/targets/string/publickeys/search" \  -H "Content-Type: application/json" \  -d '{}'
{
  "pagination": {
    "totalResult": 0,
    "appliedLimit": 0
  },
  "publicKeys": [
    {
      "keyId": "string",
      "active": true,
      "publicKey": "string",
      "fingerprint": "string",
      "expirationDate": "2023-01-15T01:30:15.01Z",
      "creationDate": "2023-01-15T01:30:15.01Z",
      "changeDate": "2023-01-15T01:30:15.01Z"
    }
  ]
}

Was this page helpful?