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
| Header | Type | Description |
|---|---|---|
| Content-Type | String | Must 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
| Parameter | Type | Description |
|---|---|---|
| name | String | Name of the encryption configuration |
| algorithm | String | Encryption algorithm to be used |
| group_id | UUID | Identifier of the group associated with the encryption configuration |
| description | String | Optional description of the encryption configuration |
| assigned_user_ids | Array | List of user IDs authorized to use the encryption configuration |
| auto_rotate | Boolean | Indicates whether automatic key rotation is enabled |
| rotation_interval | String | Interval used for automatic key rotation |
| exportable | Boolean | Indicates 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
| Field | Type | Description |
|---|---|---|
| id | UUID | Unique identifier of the encryption configuration |
| tenant_id | UUID | Identifier of the tenant that owns the encryption configuration |
| name | String | Name of the encryption configuration |
| algorithm | String | Encryption algorithm used by the configuration |
| lock_ring_id | String | Internal identifier associated with the encryption configuration |
| current_version | Integer | Current version of the encryption configuration |
| group_id | UUID | Identifier of the associated group |
| created_by | UUID | Identifier of the user who created the configuration |
| updated_by | UUID | Identifier of the user who last updated the configuration |
| created_at | Integer | Creation timestamp in Unix format |
| updated_at | Integer | Last update timestamp in Unix format |
| assigned_user_ids | Array | List of user IDs assigned to the encryption configuration |
| auto_rotate | Boolean | Indicates whether automatic key rotation is enabled |
| rotation_interval | String | Configured rotation interval |
| exportable | Boolean | Indicates 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.