Endpoint
Authentication
Requires a Personal API Access Token.Header
Request
Headers
| Header | Value | Required |
|---|---|---|
| Authorization | Bearer {token} | Yes |
| Content-Type | application/json | Yes |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| projectName | string | Yes | Project name |
Request Body
The request body should contain a KeystoreCreateDTO object with the following structure:Request Body Fields
| Field | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | Keystore name (unique identifier) |
| description | string | No | Keystore description |
| keyStoreEnvironmentList | array[object] | Yes | List of keystore environments |
Keystore Environment Object
| Field | Type | Required | Description |
|---|---|---|---|
| environmentName | string | Yes | Environment name where keystore will be deployed |
| file | string (base64) | Yes | Base64-encoded keystore file content |
| password | string | Yes | Keystore password |
| alias | string | No | Default alias for the keystore |
| keyStoreType | string | Yes | Keystore type: JKS or PKCS12 |
Notes
- Request Format: This API uses
application/jsoncontent type. Unlike the Certificate API, files are not uploaded viamultipart/form-data. Instead, keystore file content must be base64-encoded and included in the JSON body. namemust be unique within the project- Keystore is automatically deployed to all specified environments after creation
- Keystore file must be provided as base64-encoded content in the
filefield environmentNameis used to identify the environment (notenvironmentId)keyStoreTypemust match the actual keystore file format- To encode a keystore file to base64, you can use command-line tools like
base64(Linux/Mac) orcertutil -encode(Windows), or any base64 encoding library in your programming language
Response
Success Response (200 OK)
Error Response (400 Bad Request)
cURL Example
Example 2: Create Keystore with Multiple Environments
Notes and Warnings
-
Keystore Name:
- Must be unique within the project
- Cannot be changed after creation
-
Keystore Type:
JKS: Java KeyStore formatPKCS12: PKCS#12 format (also known as .p12 or .pfx)
-
Environment Name:
- Use
environmentName(notenvironmentId) to specify the environment - Environment name must exist and be accessible
- Use
-
Keystore File:
- Must be base64-encoded and included in the JSON body (not uploaded as a file)
- Example: Read your keystore file and encode it to base64:
base64 -i keystore.jks(Linux/Mac) orcertutil -encode keystore.jks temp.txt && type temp.txt(Windows) - File content is encrypted before storage
keyStoreTypemust match the actual file format- Note: This API uses JSON body format. If you need to upload a file directly, consider using the Certificate API which supports
multipart/form-data
-
Password:
- Keystore password is required for each environment
- Password is encrypted before storage
- Different environments can have different passwords
-
Automatic Deployment:
- Keystore is automatically deployed to all specified environments after creation
- Deployment results are returned in the response
Permissions
User must haveSECRETS + MANAGE permission in the project. For deployment operations (when deploying keystores to environments), user must also have SECRETS + DEPLOY_UNDEPLOY permission.
Related Documentation
- List Keystores - List all keystores
- Update Keystore - Update a keystore

