About this endpoint
What it does
Encrypts a text string using Fernet and returns the resulting ciphertext. If you do not provide a key, the service auto-generates one and includes it in the response.
Request Body
| Parameter | Type | Description |
|---|---|---|
| key | String | Base64-url Fernet key. Omit to auto-generate. |
| text | String | Text to encrypt. |
Response
Returns a JSON object with two string fields: key and ciphertext. The key field contains the Fernet key used for encryption, and ciphertext contains the encrypted output.
| Parameter | Type | Description |
|---|---|---|
| key | String | Fernet key used for encryption. Present when the service generates or returns a key. |
| ciphertext | String | Encrypted text output. |



