# Public Key

Some of our responses will be signed using our own private key, such as the messages we send by webhook. In order to verify that it was really us that generated the message, you can get our public key and verify the provided signature and content.

### The Public Key object

**Attributes**

| Name | Type | Description |
| --- | --- | --- |
| `content` | STRING | PEM-encoded public key content. |
| `created` | STRING | Creation datetime. Example: "2020-04-23T23:00:00.000000+00:00". |

### List Public Keys

`GET /v2/public-key`

Get a list of the Stark Bank public keys ordered by creation date from newest to oldest. The most recent public key is the one currently in use by the API. The older keys can be used to verify older messages.

**Request**

```python
import starkbank

public_keys = starkbank.key.get()

for public_key in public_keys:
    print(public_key)
```

**Response**

```python
PublicKey(
    content=-----BEGIN PUBLIC KEY-----\nMFYwEAYHKoZIzj0CAQYFK4EEAAoDQgAEt/jVM/DGqfJ9GxctQMqrtjmIFoODoaHR\ncX0c/pIWCgBv1o5Zqk+ni027I/fRWl2XKvrZeFpjFufq6B1hInXowQ==\n-----END PUBLIC KEY-----,
    created=2020-03-27 03:31:00.000000
)
```

## Available Languages

Code samples on this page are in Python. The same content is available with samples in:

- [Python](https://docs.starkbank.com/api/v2/public-key-python.md)
- [Node.js](https://docs.starkbank.com/api/v2/public-key-node.md)
- [PHP](https://docs.starkbank.com/api/v2/public-key-php.md)
- [Java](https://docs.starkbank.com/api/v2/public-key-java.md)
- [Ruby](https://docs.starkbank.com/api/v2/public-key-ruby.md)
- [Elixir](https://docs.starkbank.com/api/v2/public-key-elixir.md)
- [.NET](https://docs.starkbank.com/api/v2/public-key-dotnet.md)
- [Go](https://docs.starkbank.com/api/v2/public-key-go.md)
- [Clojure](https://docs.starkbank.com/api/v2/public-key-clojure.md)
- [cURL](https://docs.starkbank.com/api/v2/public-key-curl.md)
