> ## Documentation Index
> Fetch the complete documentation index at: https://docs.neuro-tech.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Public Key

> Allows the client to get the current server public key, or the public key of one of its own cryptographic keys.

## Overview

Allows the client to get the current server public key, or the public key of one of its own cryptographic keys. The client can use this key to validate signatures server  in relation to legal identities, smart contracts, tokens, etc.

Note: If a Key ID is provided, information about one of the keys of the client account is returned. If not Key ID is provided, information about the the public server key is returned.

Note 2: If no Key ID is provided, resource requires no authentication. If a Key ID is provided, a Bearer token identifying the client account must be provided.

## Authentication

Requires a valid JWT bearer token.

## Notes

This endpoint uses the request schema notation described in [Pattern matching](/guides/pattern-matching).


## OpenAPI

````yaml /test-api/openapi.yaml post /Agent/Crypto/GetPublicKey
openapi: 3.1.0
info:
  title: Neuron Agent API
  version: 1.0.0
  description: |-
    The Agent API exposes core Neuron functionality over HTTP so services can
    operate without a persistent XMPP connection. Endpoints are grouped by
    capability, starting with Accounts and XMPP messaging.
servers:
  - url: https://{host}
    variables:
      host:
        default: neuron.example.com
        description: Neuron domain issued to you.
security:
  - bearerAuth: []
tags:
  - name: Accounts
  - name: Crypto
  - name: Open intelligence
  - name: Legal and contracts
  - name: State machines
  - name: Storage
  - name: Tokens
  - name: Wallet
  - name: XMPP messaging
paths:
  /Agent/Crypto/GetPublicKey:
    post:
      tags:
        - Crypto
      summary: Get Public Key
      description: >-
        Allows the client to get the current server public key, or the public
        key of one of its own cryptographic keys.
      operationId: post_Agent_Crypto_GetPublicKey
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                keyId:
                  type: string
              additionalProperties: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  key:
                    type: string
                  Algorithm:
                    type: object
                    properties:
                      localName:
                        type: string
                      namespace:
                        type: string
                      securityStrength:
                        type: integer
                      safe:
                        type: boolean
                      slow:
                        type: boolean
                      pqc:
                        type: boolean
                      score:
                        type: integer
                    additionalProperties: true
                    required:
                      - localName
                      - namespace
                      - securityStrength
                      - safe
                      - slow
                      - pqc
                      - score
                additionalProperties: true
                required:
                  - key
                  - Algorithm
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````