# Get Public Key

> Returns current `public_key` to be used to sign `/token` requests. There is no need for authorization or authentication with this endpoint, nor headers.

Source: https://help.boltapp.com/api-reference/tokenizer/tokenizer/tokenizerpublickey

`GET /public_key`

## OpenAPI definition

This endpoint as it appears in the OpenAPI document, with every schema it references included.

```json
{
  "openapi": "3.2.0",
  "info": {
    "title": "Tokenizer Endpoint",
    "version": "1.0.0",
    "description": "## About\nThe Tokenizer API provides an alternative to our [public npm package](https://www.npmjs.com/package/@boltpay/tokenizer). If you would prefer to use that, you can follow our [Tokenizer documentation](/developers/references/bolt-tokenizer). \n\n## How It Works\nThis API uses two endpoints to implement custom back-office integrations such as direct payment processing.\n\nThe `/public_key` endpoint returns a key used in the `/token` endpoint, used to encrypt and decrypt the payload containing credit card information.\n"
  },
  "servers": [
    {
      "url": "https://staging.bolttk.com",
      "description": "The Staging URL (Staged Data)."
    },
    {
      "url": "https://sandbox.bolttk.com",
      "description": "The Sandbox URL (Test Data)."
    },
    {
      "url": "https://production.bolttk.com",
      "description": "The Production URL (Production Data)."
    }
  ],
  "paths": {
    "/public_key": {
      "get": {
        "description": "Returns current `public_key` to be used to sign `/token` requests. There is no need for authorization or authentication with this endpoint, nor headers.\n",
        "operationId": "tokenizerPublicKey",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/public_key_response"
                }
              }
            },
            "description": "SUCCESS."
          },
          "500": {
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string",
                  "examples": [
                    "Internal server error"
                  ]
                }
              }
            },
            "description": "Internal service error"
          }
        },
        "summary": "Get Public Key",
        "tags": [
          "Tokenizer"
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "public_key_response": {
        "description": "A client public key, generated locally.\n",
        "type": "string",
        "examples": [
          "/v7FsRGXEErA7f9y1uyMW0ApMUnC32RenDPpueLcYV8="
        ],
        "contentEncoding": "base64"
      }
    }
  }
}
```
