Skip to main content

Create Encryption

This API creates a new encryption configuration using the specified algorithm and settings. The encryption configuration can be assigned to users, configured for automatic key rotation, and managed within a group.


Endpoint Details

URL /v1/crypto/items
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
{
"name": "dummy",
"algorithm": "RSA1024",
"group_id": "81ad4d05-d11a-4809-b1f2-cc000c086730",
"description": "",
"assigned_user_ids": [
"0a937c60-0ed4-4d06-870a-2e284b54287d"
],
"auto_rotate": true,
"rotation_interval": "1d",
"exportable": true
}

Parameters

ParameterTypeDescription
nameStringName of the encryption configuration
algorithmStringEncryption algorithm to be used
group_idUUIDIdentifier of the group associated with the encryption configuration
descriptionStringOptional description of the encryption configuration
assigned_user_idsArrayList of user IDs authorized to use the encryption configuration
auto_rotateBooleanIndicates whether automatic key rotation is enabled
rotation_intervalStringInterval used for automatic key rotation
exportableBooleanIndicates whether the encryption key can be exported

Response

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

Response
{
"item": {
"id": "8471d88d-feda-4d0f-bb39-7f45d8976b94",
"tenant_id": "5ebde17c-01a1-4394-977b-9e611250cf5d",
"name": "Dummy",
"algorithm": "RSA1024",
"lock_ring_id": "crypto/8471d88d-feda-4d0f-bb39-7f45d8976b94",
"current_version": 1,
"group_id": "81ad4d05-d11a-4809-b1f2-cc000c086730",
"created_by": "0a937c60-0ed4-4d06-870a-2e284b54287d",
"updated_by": "0a937c60-0ed4-4d06-870a-2e284b54287d",
"created_at": 1782274352,
"updated_at": 1782274352,
"assigned_user_ids": [
"0a937c60-0ed4-4d06-870a-2e284b54287d"
],
"auto_rotate": true,
"rotation_interval": "1d",
"exportable": true
}
}

Field Descriptions

FieldTypeDescription
idUUIDUnique identifier of the encryption configuration
tenant_idUUIDIdentifier of the tenant that owns the encryption configuration
nameStringName of the encryption configuration
algorithmStringEncryption algorithm used by the configuration
lock_ring_idStringInternal identifier associated with the encryption configuration
current_versionIntegerCurrent version of the encryption configuration
group_idUUIDIdentifier of the associated group
created_byUUIDIdentifier of the user who created the configuration
updated_byUUIDIdentifier of the user who last updated the configuration
created_atIntegerCreation timestamp in Unix format
updated_atIntegerLast update timestamp in Unix format
assigned_user_idsArrayList of user IDs assigned to the encryption configuration
auto_rotateBooleanIndicates whether automatic key rotation is enabled
rotation_intervalStringConfigured rotation interval
exportableBooleanIndicates whether the encryption key can be exported

info
  • A valid Bearer Token is required to access this endpoint.
  • Supported encryption algorithms include:
    • AES (Advanced Encryption Standard): AES128 and AES256.
    • RSA (Rivest-Shamir-Adleman): RSA1024, RSA2048, and RSA4096.
  • When auto_rotate is set to true, the rotation_interval value determines how often the encryption key is automatically rotated.
  • Supported rotation interval units are:
    • m = Minute.
    • h = Hour.
    • d = Day.
    • w = Week.
    • M = Month.
    • y = Year.
  • When exportable is set to true, the encryption key can be exported according to the system's access control policies.