# encrypt

> For the complete documentation index, see [llms.txt](https://bsvblockchain.com/docs/llms.txt).

**POST** `/encrypt`

Base URL: `http://localhost:3321`

Encrypts data

## Body

Content type: `application/json`

- `seekPermission` (boolean)
- `plaintext` (integer[])
- `protocolID` (any[])
- `keyID` (string)
- `privilegedReason` (string)
- `counterparty` (string)
- `privileged` (boolean)

Example:

```json
{
  "seekPermission": true,
  "plaintext": [
    0
  ],
  "protocolID": [
    null
  ],
  "keyID": "string",
  "privilegedReason": "string",
  "counterparty": "string",
  "privileged": false
}
```

## Responses

### 200

The encrypted data

- `ciphertext` (integer[])

Example:

```json
{
  "ciphertext": [
    0
  ]
}
```

### 400

Invalid input

### 500

Internal server error