> ## 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.

# Create key

## Overview

Allows the client to create a cryptographic key on the server, and protect it with a password. The key will be stored encrypted on the server, protected with the key password. The creation of a key will require the user to provide the account password again.

## HTTP request

`POST /Agent/Crypto/CreateKey`

## Authentication

Requires a valid JWT bearer token.

## Request (JSON)

```json theme={null}
{
	"localName": Required(Str(PLocalName)),
	"namespace": Required(Str(PNamespace)),
	"id": Required(Str(PId)),
	"nonce": Required(Str(PNonce)),
	"keySignature": Required(Str(PKeySignature)),
	"requestSignature": Required(Str(PRequestSignature))
}
```

## Input parameters

| Parameter         | Description                                                                                                                                                                                                    |
| ----------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| PLocalName        | Local Name of the algorithm to use for the new key.                                                                                                                                                            |
| PNamespace        | Namespace, defining the algorithm.                                                                                                                                                                             |
| PId               | ID of the key. The ID must be unique, for the current account. Different accounts can have keys with the same ID.                                                                                              |
| PNonce            | A unique random string, at least 32 characters long, with sufficient entropy to not be reused again. If reused, an error will be returned.                                                                     |
| PKeySignature     | Cryptographic signature of the key ID, using the key password. (Password is not stored with the key, instead this signature will be the base for the cryptographic key used to encrypt the key on the server.) |
| PRequestSignature | Cryptographic signature of the request, using the account password.                                                                                                                                            |

## Response (JSON)

```json theme={null}
{
	"created": Required(DateTime(PCreated)),
	"updated": Required(DateTime(PUpdated))
}
```

## Response parameters

| Parameter | Description                                    |
| --------- | ---------------------------------------------- |
| PCreated  | When the information record was first created. |
| PUpdated  | When the information record was last updated.  |

## Notes

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