Skip to main content

Encrypt Data

This API encrypts plaintext using an existing encryption configuration. The encryption configuration is identified by its unique ID, and the API returns the encrypted ciphertext.


Endpoint Details

URL /v1/crypto/encrypt
Method POST
Authorization Bearer Token

Request Headers

HeaderTypeDescription
Content-TypeStringMust be application/json

Request Body

Use the following format to make a request:

JSON Request
{
"function_id": "74b1d868-4210-41c0-ab20-3cabb574ebca",
"plaintext": "testing"
}

Parameters

ParameterTypeDescription
function_idStringUnique identifier of the encryption configuration used to perform encryption
plaintextStringPlaintext data to be encrypted

Response

Here is an example response after the request has been successfully processed:

Response
{
"ciphertext": "v1:OOeoBdaePUGTTWwwl7C/Am3yx/zugui9S5AqdNwxN4qgDAhrAXegJXtqRBpA+36fRdcFgs8ogWl256T6aZ1eqKNMvRlh8kkgwzUd0AZPsjGKAjMHHF6mHkCas8pueViKAauFwwUBKD6kDllFSu6rs20OZtF0WnqOwxj1B3t8ZaI="
}

Field Descriptions

FieldTypeDescription
ciphertextStringEncrypted output generated from the provided plaintext using the specified encryption configuration

info
  • A valid Bearer Token is required to access this endpoint.
  • The function_id must refer to an existing encryption configuration.
  • The returned ciphertext should be preserved exactly as received because it is required for the corresponding decryption operation.