Scaleway logo
Key Manager API

Keys are logical containers you create in Key Manager to store cryptographic keys. They support encryption, decryption, and the generation of data encryption keys.


List all available algorithms

GET
https://api.scaleway.com
/key-manager/v1alpha1/regions/{region}/algorithms

Lists all cryptographic algorithms supported by the Key Manager service.

List all available algorithms › path Parameters

region
​string · enum · required

The region you want to target

Enum values:
fr-par
nl-ams
pl-waw

List all available algorithms › query Parameters

Filter by key usage.

Enum values:
unknown_usage
symmetric_encryption
asymmetric_encryption
asymmetric_signing
key_encapsulation

List all available algorithms › Responses


List keys

GET
https://api.scaleway.com
/key-manager/v1alpha1/regions/{region}/keys

Retrieve a list of keys across all Projects in an Organization or within a specific Project. If the user has permissions for all current and future projects: Either organization_id or project_id is required. If the user has permissions for all current projects or only specific projects: The project_id is required. The region parameter in path is needed in both case.

List keys › path Parameters

region
​string · enum · required

The region you want to target

Enum values:
fr-par
nl-ams
pl-waw

List keys › query Parameters

scheduled_for_deletion
​boolean · required

Filter keys based on their deletion status. By default, only keys not scheduled for deletion are returned in the output.

organization_id
​string

(Optional) Filter by Organization ID. (UUID format)

project_id
​string

(Optional) Filter by Project ID. (UUID format)

Enum values:
name_asc
name_desc
created_at_asc
created_at_desc
updated_at_asc
updated_at_desc
Default: name_asc
page
​google.protobuf.Int32Value · int32
page_size
​integer · uint32
tags
​string[]

(Optional) List of tags to filter on.

name
​string

(Optional) Filter by key name.

(Optional) Filter keys by usage. Select from symmetric encryption, asymmetric encryption, asymmetric signing or key_encapsulation.

Enum values:
unknown_usage
symmetric_encryption
asymmetric_encryption
asymmetric_signing
key_encapsulation
Default: unknown_usage

(Optional) Filter keys by protection level. Select from software or hsm.

Enum values:
unknown_protection_level
software
hsm
Default: unknown_protection_level

List keys › Responses

200

Single page of keys matching the requested criteria.

total_count
​integer · uint64

Total count of keys matching the requested criteria.


Create a key

POST
https://api.scaleway.com
/key-manager/v1alpha1/regions/{region}/keys

Create a key in a given region specified by the region parameter. You can use keys to encrypt or decrypt arbitrary payloads, to sign and verify messages or to generate data encryption keys. Data encryption keys are not stored in Key Manager.

Create a key › path Parameters

region
​string · enum · required

The region you want to target

Enum values:
fr-par
nl-ams
pl-waw

Create a key › Request Body

project_id
​string

ID of the Project containing the key. (UUID format)

name
​string | null

(Optional) Name of the key.

Key usage. See the Key.Usage enum for a description of possible values.

description
​string | null

(Optional) Description of the key.

tags
​string[]

(Optional) List of the key's tags.

(Optional) Rotation policy of the key. If not specified, no rotation policy will be applied to the key.

unprotected
​boolean

(Optional) Defines whether key protection is applied to a key. Protected keys can be used but not deleted. Default value is false.

Key origin. Refer to the Key.Origin enum for a description of values.

Enum values:
unknown_origin
scaleway_kms
external
Default: unknown_origin

Key Protection level. Refer to the Key.Protection enum for a description of values.

Enum values:
unknown_protection_level
software
hsm
Default: unknown_protection_level

Create a key › Responses

200
id
​string

ID of the key. (UUID format)

srn
​string · pattern: ^srn://key-manager\.…

The SRN of the key.

project_id
​string

ID of the Project containing the key. (UUID format)

name
​string

Name of the key.

Key usage. See the Key.Usage enum for a description of possible values.

Key state. See the Key.State enum for a description of possible values.

Enum values:
unknown_state
enabled
disabled
pending_key_material
scheduled_for_deletion
Default: unknown_state
rotation_count
​integer · uint32

Number of key rotations. The rotation count tracks the number of times the key has been rotated.

created_at
​string | null · date-time

Key creation date. (RFC 3339 format)

updated_at
​string | null · date-time

Key last modification date. (RFC 3339 format)

protected
​boolean

Returns true if key protection is applied to the key.

locked
​boolean

Returns true if the key is locked.

description
​string | null

Description of the key.

tags
​string[]

List of the key's tags.

rotated_at
​string | null · date-time

Key last rotation date. (RFC 3339 format)

Key rotation policy.

Key origin. Refer to the Key.Origin enum for a description of values.

Enum values:
unknown_origin
scaleway_kms
external
Default: unknown_origin
deletion_requested_at
​string | null · date-time

Returns the time at which deletion was requested. (RFC 3339 format)

Key protection level. Refer to the Key.ProtectionLevel enum for a description of values.

Enum values:
unknown_protection_level
software
hsm
Default: unknown_protection_level
region
​string

Region where the key is stored.


Get key metadata

GET
https://api.scaleway.com
/key-manager/v1alpha1/regions/{region}/keys/{key_id}

Retrieve metadata for a specified key using the region and key_id parameters.

Get key metadata › path Parameters

region
​string · enum · required

The region you want to target

Enum values:
fr-par
nl-ams
pl-waw
key_id
​string · required

ID of the key to target. (UUID format)

Get key metadata › Responses

200
id
​string

ID of the key. (UUID format)

srn
​string · pattern: ^srn://key-manager\.…

The SRN of the key.

project_id
​string

ID of the Project containing the key. (UUID format)

name
​string

Name of the key.

Key usage. See the Key.Usage enum for a description of possible values.

Key state. See the Key.State enum for a description of possible values.

Enum values:
unknown_state
enabled
disabled
pending_key_material
scheduled_for_deletion
Default: unknown_state
rotation_count
​integer · uint32

Number of key rotations. The rotation count tracks the number of times the key has been rotated.

created_at
​string | null · date-time

Key creation date. (RFC 3339 format)

updated_at
​string | null · date-time

Key last modification date. (RFC 3339 format)

protected
​boolean

Returns true if key protection is applied to the key.

locked
​boolean

Returns true if the key is locked.

description
​string | null

Description of the key.

tags
​string[]

List of the key's tags.

rotated_at
​string | null · date-time

Key last rotation date. (RFC 3339 format)

Key rotation policy.

Key origin. Refer to the Key.Origin enum for a description of values.

Enum values:
unknown_origin
scaleway_kms
external
Default: unknown_origin
deletion_requested_at
​string | null · date-time

Returns the time at which deletion was requested. (RFC 3339 format)

Key protection level. Refer to the Key.ProtectionLevel enum for a description of values.

Enum values:
unknown_protection_level
software
hsm
Default: unknown_protection_level
region
​string

Region where the key is stored.


Update a key

PATCH
https://api.scaleway.com
/key-manager/v1alpha1/regions/{region}/keys/{key_id}

Modify a key's metadata including name, description and tags, specified by the key_id and region parameters.

Update a key › path Parameters

region
​string · enum · required

The region you want to target

Enum values:
fr-par
nl-ams
pl-waw
key_id
​string · required

ID of the key to update. (UUID format)

Update a key › Request Body

name
​string | null

(Optional) Updated name of the key.

description
​string | null

(Optional) Updated description of the key.

tags
​array | null

(Optional) Updated list of the key's tags.

(Optional) Updated rotation policy of the key. If not specified, the key's existing rotation policy applies.

Update a key › Responses

200
id
​string

ID of the key. (UUID format)

srn
​string · pattern: ^srn://key-manager\.…

The SRN of the key.

project_id
​string

ID of the Project containing the key. (UUID format)

name
​string

Name of the key.

Key usage. See the Key.Usage enum for a description of possible values.

Key state. See the Key.State enum for a description of possible values.

Enum values:
unknown_state
enabled
disabled
pending_key_material
scheduled_for_deletion
Default: unknown_state
rotation_count
​integer · uint32

Number of key rotations. The rotation count tracks the number of times the key has been rotated.

created_at
​string | null · date-time

Key creation date. (RFC 3339 format)

updated_at
​string | null · date-time

Key last modification date. (RFC 3339 format)

protected
​boolean

Returns true if key protection is applied to the key.

locked
​boolean

Returns true if the key is locked.

description
​string | null

Description of the key.

tags
​string[]

List of the key's tags.

rotated_at
​string | null · date-time

Key last rotation date. (RFC 3339 format)

Key rotation policy.

Key origin. Refer to the Key.Origin enum for a description of values.

Enum values:
unknown_origin
scaleway_kms
external
Default: unknown_origin
deletion_requested_at
​string | null · date-time

Returns the time at which deletion was requested. (RFC 3339 format)

Key protection level. Refer to the Key.ProtectionLevel enum for a description of values.

Enum values:
unknown_protection_level
software
hsm
Default: unknown_protection_level
region
​string

Region where the key is stored.


Delete a key

DELETE
https://api.scaleway.com
/key-manager/v1alpha1/regions/{region}/keys/{key_id}

Permanently delete a key specified by the region and key_id parameters. This action is irreversible. Any data encrypted with this key, including data encryption keys, will no longer be decipherable.

Delete a key › path Parameters

region
​string · enum · required

The region you want to target

Enum values:
fr-par
nl-ams
pl-waw
key_id
​string · required

ID of the key to delete. (UUID format)

Delete a key › Responses

No data returned

Decrypt an encrypted payload

POST
https://api.scaleway.com
/key-manager/v1alpha1/regions/{region}/keys/{key_id}/decrypt

Decrypt an encrypted payload using an existing key, specified by the key_id parameter. The maximum payload size that can be decrypted is equivalent to the encrypted output of 64 KB of data (around 131 KB).

Decrypt an encrypted payload › path Parameters

region
​string · enum · required

The region you want to target

Enum values:
fr-par
nl-ams
pl-waw
key_id
​string · required

ID of the key to decrypt with. The key must have an usage set to symmetric_encryption or asymmetric_encryption. (UUID format)

Decrypt an encrypted payload › Request Body

ciphertext
​string

Ciphertext data to decrypt. Data size must be between 1 and 131071 bytes.

​google.protobuf.BytesValue

(Optional) Additional authenticated data. The additional data must match the value passed in the encryption request. Only supported by keys with a usage set to symmetric_encryption.

Decrypt an encrypted payload › Responses

200
key_id
​string

ID of the key used for decryption. (UUID format)

plaintext
​string

Key's decrypted data.

(Optional) Data encrypted with the latest key rotation. If the data was already encrypted with the latest key rotation, no output will be returned in the response object.


Delete key material

POST
https://api.scaleway.com
/key-manager/v1alpha1/regions/{region}/keys/{key_id}/delete-key-material

Delete previously imported key material. This renders the associated cryptographic key unusable for any operation. The key's origin must be external.

Delete key material › path Parameters

region
​string · enum · required

The region you want to target

Enum values:
fr-par
nl-ams
pl-waw
key_id
​string · required

ID of the key of which to delete the key material. (UUID format)

Delete key material › Request Body

key_rotation_index
​integer | null · uint32

(Optional) Rotation index of which to delete the key material. Default to latest rotation if not set.

Delete key material › Responses

No data returned

Disable key

POST
https://api.scaleway.com
/key-manager/v1alpha1/regions/{region}/keys/{key_id}/disable

Disable a given key, preventing it to be used for cryptographic operations. Disabling a key renders it unusable. You must specify the region and key_id parameters.

Disable key › path Parameters

region
​string · enum · required

The region you want to target

Enum values:
fr-par
nl-ams
pl-waw
key_id
​string · required

ID of the key to disable. (UUID format)

Disable key › Request Body

Disable key › Responses

200
id
​string

ID of the key. (UUID format)

srn
​string · pattern: ^srn://key-manager\.…

The SRN of the key.

project_id
​string

ID of the Project containing the key. (UUID format)

name
​string

Name of the key.

Key usage. See the Key.Usage enum for a description of possible values.

Key state. See the Key.State enum for a description of possible values.

Enum values:
unknown_state
enabled
disabled
pending_key_material
scheduled_for_deletion
Default: unknown_state
rotation_count
​integer · uint32

Number of key rotations. The rotation count tracks the number of times the key has been rotated.

created_at
​string | null · date-time

Key creation date. (RFC 3339 format)

updated_at
​string | null · date-time

Key last modification date. (RFC 3339 format)

protected
​boolean

Returns true if key protection is applied to the key.

locked
​boolean

Returns true if the key is locked.

description
​string | null

Description of the key.

tags
​string[]

List of the key's tags.

rotated_at
​string | null · date-time

Key last rotation date. (RFC 3339 format)

Key rotation policy.

Key origin. Refer to the Key.Origin enum for a description of values.

Enum values:
unknown_origin
scaleway_kms
external
Default: unknown_origin
deletion_requested_at
​string | null · date-time

Returns the time at which deletion was requested. (RFC 3339 format)

Key protection level. Refer to the Key.ProtectionLevel enum for a description of values.

Enum values:
unknown_protection_level
software
hsm
Default: unknown_protection_level
region
​string

Region where the key is stored.


Enable key

POST
https://api.scaleway.com
/key-manager/v1alpha1/regions/{region}/keys/{key_id}/enable

Enable a given key to be used for cryptographic operations. Enabling a key allows you to make a disabled key usable again. You must specify the region and key_id parameters.

Enable key › path Parameters

region
​string · enum · required

The region you want to target

Enum values:
fr-par
nl-ams
pl-waw
key_id
​string · required

ID of the key to enable. (UUID format)

Enable key › Request Body

Enable key › Responses

200
id
​string

ID of the key. (UUID format)

srn
​string · pattern: ^srn://key-manager\.…

The SRN of the key.

project_id
​string

ID of the Project containing the key. (UUID format)

name
​string

Name of the key.

Key usage. See the Key.Usage enum for a description of possible values.

Key state. See the Key.State enum for a description of possible values.

Enum values:
unknown_state
enabled
disabled
pending_key_material
scheduled_for_deletion
Default: unknown_state
rotation_count
​integer · uint32

Number of key rotations. The rotation count tracks the number of times the key has been rotated.

created_at
​string | null · date-time

Key creation date. (RFC 3339 format)

updated_at
​string | null · date-time

Key last modification date. (RFC 3339 format)

protected
​boolean

Returns true if key protection is applied to the key.

locked
​boolean

Returns true if the key is locked.

description
​string | null

Description of the key.

tags
​string[]

List of the key's tags.

rotated_at
​string | null · date-time

Key last rotation date. (RFC 3339 format)

Key rotation policy.

Key origin. Refer to the Key.Origin enum for a description of values.

Enum values:
unknown_origin
scaleway_kms
external
Default: unknown_origin
deletion_requested_at
​string | null · date-time

Returns the time at which deletion was requested. (RFC 3339 format)

Key protection level. Refer to the Key.ProtectionLevel enum for a description of values.

Enum values:
unknown_protection_level
software
hsm
Default: unknown_protection_level
region
​string

Region where the key is stored.


Encrypt a payload

POST
https://api.scaleway.com
/key-manager/v1alpha1/regions/{region}/keys/{key_id}/encrypt

Encrypt a payload using an existing key, specified by the key_id parameter. The maximum payload size that can be encrypted is 64 KB of plaintext.

Encrypt a payload › path Parameters

region
​string · enum · required

The region you want to target

Enum values:
fr-par
nl-ams
pl-waw
key_id
​string · required

ID of the key to use for encryption. The key must have an usage set to symmetric_encryption or asymmetric_encryption. (UUID format)

Encrypt a payload › Request Body

plaintext
​string

Plaintext data to encrypt. Data size must be between 1 and 65535 bytes.

​google.protobuf.BytesValue

(Optional) Additional authenticated data. Additional data which will not be encrypted, but authenticated and appended to the encrypted payload. Only supported by keys with a usage set to symmetric_encryption.

Encrypt a payload › Responses

200
key_id
​string

ID of the key used for encryption. (UUID format)

ciphertext
​string

Key's encrypted data.


Create a data encryption key

POST
https://api.scaleway.com
/key-manager/v1alpha1/regions/{region}/keys/{key_id}/generate-data-key

Create a new data encryption key for cryptographic operations outside of Key Manager. The data encryption key is encrypted and must be decrypted using the key you have created in Key Manager.

The data encryption key is returned in plaintext and ciphertext but it should only be stored in its encrypted form (ciphertext). Key Manager does not store your data encryption key. To retrieve your key's plaintext, use the Decrypt method with your key's ID and ciphertext.

Create a data encryption key › path Parameters

region
​string · enum · required

The region you want to target

Enum values:
fr-par
nl-ams
pl-waw
key_id
​string · required

ID of the key. (UUID format)

Create a data encryption key › Request Body

Algorithm with which the data encryption key will be used to encrypt and decrypt arbitrary payloads. See the DataKey.Algorithm.SymmetricEncryption enum for a description of values.

Enum values:
unknown_symmetric_encryption
aes_256_gcm
Default: unknown_symmetric_encryption
without_plaintext
​boolean

(Optional) Defines whether to return the data encryption key's plaintext in the response object. Default value is false, meaning that the plaintext is returned. Set it to true if you do not wish the plaintext to be returned in the response object.

Create a data encryption key › Responses

200
key_id
​string

ID of the data encryption key. (UUID format)

Symmetric encryption algorithm of the data encryption key (AES-256-GCM).

Enum values:
unknown_symmetric_encryption
aes_256_gcm
Default: unknown_symmetric_encryption
ciphertext
​string

Data encryption key ciphertext. Your data encryption key's ciphertext can be stored safely. It can only be decrypted through the keys you create in Key Manager, using the relevant key ID.

Data encryption key plaintext. (Optional) Your data encryption key's plaintext allows you to use the key immediately upon creation. It must neither be stored or shared.

created_at
​string | null · date-time

Data encryption key creation date. (RFC 3339 format)


Import key material

POST
https://api.scaleway.com
/key-manager/v1alpha1/regions/{region}/keys/{key_id}/import-key-material

Import externally generated key material into Key Manager to derive a new cryptographic key. The key's origin must be external.

Import key material › path Parameters

region
​string · enum · required

The region you want to target

Enum values:
fr-par
nl-ams
pl-waw
key_id
​string · required

ID of the key in which to import key material. The key's origin must be external. (UUID format)

Import key material › Request Body

(Optional) Salt value to pass the key derivation function. A salt is random data added to key material to ensure unique derived keys, even if the input is similar. It helps strengthen security when the key material has low randomness (low entropy).

​

The encrypted key material to import. This material must be encrypted using the public key and the exact wrapping algorithm returned by the GetKeyMaterialImportParameters method. Precisely one of key_material, encrypted_key_material can be set.

Import key material › Responses

200
id
​string

ID of the key. (UUID format)

srn
​string · pattern: ^srn://key-manager\.…

The SRN of the key.

project_id
​string

ID of the Project containing the key. (UUID format)

name
​string

Name of the key.

Key usage. See the Key.Usage enum for a description of possible values.

Key state. See the Key.State enum for a description of possible values.

Enum values:
unknown_state
enabled
disabled
pending_key_material
scheduled_for_deletion
Default: unknown_state
rotation_count
​integer · uint32

Number of key rotations. The rotation count tracks the number of times the key has been rotated.

created_at
​string | null · date-time

Key creation date. (RFC 3339 format)

updated_at
​string | null · date-time

Key last modification date. (RFC 3339 format)

protected
​boolean

Returns true if key protection is applied to the key.

locked
​boolean

Returns true if the key is locked.

description
​string | null

Description of the key.

tags
​string[]

List of the key's tags.

rotated_at
​string | null · date-time

Key last rotation date. (RFC 3339 format)

Key rotation policy.

Key origin. Refer to the Key.Origin enum for a description of values.

Enum values:
unknown_origin
scaleway_kms
external
Default: unknown_origin
deletion_requested_at
​string | null · date-time

Returns the time at which deletion was requested. (RFC 3339 format)

Key protection level. Refer to the Key.ProtectionLevel enum for a description of values.

Enum values:
unknown_protection_level
software
hsm
Default: unknown_protection_level
region
​string

Region where the key is stored.


Generate key material import parameters

POST
https://api.scaleway.com
/key-manager/v1alpha1/regions/{region}/keys/{key_id}/import-parameters

Retrieve the cryptographic parameters (public key and import token) required to securely import key material into an existing key. The key's origin must be external.

Generate key material import parameters › path Parameters

region
​string · enum · required

The region you want to target

Enum values:
fr-par
nl-ams
pl-waw
key_id
​string · required

ID of the key into which to import the key material. (UUID format)

Generate key material import parameters › Request Body

The wrapping algorithm the client will use to encrypt the key material. Supported values are: rsa_oaep_2048_sha256, rsa_oaep_3072_sha256, rsa_oaep_4096_sha256.

Enum values:
unknown_wrapping_algorithm
rsa_oaep_2048_sha256
rsa_oaep_3072_sha256
rsa_oaep_4096_sha256
Default: unknown_wrapping_algorithm

Generate key material import parameters › Responses

200
key_id
​string

ID of the target key. (UUID format)

public_key
​string

The public key to wrap the key material.

import_token
​string

The token generated to authorize the import operation.


Apply key protection

POST
https://api.scaleway.com
/key-manager/v1alpha1/regions/{region}/keys/{key_id}/protect

Apply protection to a given key specified by the key_id parameter. Applying key protection means that your key can be used and modified, but it cannot be deleted.

Apply key protection › path Parameters

region
​string · enum · required

The region you want to target

Enum values:
fr-par
nl-ams
pl-waw
key_id
​string · required

ID of the key to apply key protection to. (UUID format)

Apply key protection › Request Body

Apply key protection › Responses

200
id
​string

ID of the key. (UUID format)

srn
​string · pattern: ^srn://key-manager\.…

The SRN of the key.

project_id
​string

ID of the Project containing the key. (UUID format)

name
​string

Name of the key.

Key usage. See the Key.Usage enum for a description of possible values.

Key state. See the Key.State enum for a description of possible values.

Enum values:
unknown_state
enabled
disabled
pending_key_material
scheduled_for_deletion
Default: unknown_state
rotation_count
​integer · uint32

Number of key rotations. The rotation count tracks the number of times the key has been rotated.

created_at
​string | null · date-time

Key creation date. (RFC 3339 format)

updated_at
​string | null · date-time

Key last modification date. (RFC 3339 format)

protected
​boolean

Returns true if key protection is applied to the key.

locked
​boolean

Returns true if the key is locked.

description
​string | null

Description of the key.

tags
​string[]

List of the key's tags.

rotated_at
​string | null · date-time

Key last rotation date. (RFC 3339 format)

Key rotation policy.

Key origin. Refer to the Key.Origin enum for a description of values.

Enum values:
unknown_origin
scaleway_kms
external
Default: unknown_origin
deletion_requested_at
​string | null · date-time

Returns the time at which deletion was requested. (RFC 3339 format)

Key protection level. Refer to the Key.ProtectionLevel enum for a description of values.

Enum values:
unknown_protection_level
software
hsm
Default: unknown_protection_level
region
​string

Region where the key is stored.


Get the public key in PEM format.

GET
https://api.scaleway.com
/key-manager/v1alpha1/regions/{region}/keys/{key_id}/public-key

Retrieves the public portion of an asymmetric cryptographic key in PEM format.

Get the public key in PEM format. › path Parameters

region
​string · enum · required

The region you want to target

Enum values:
fr-par
nl-ams
pl-waw
key_id
​string · required

ID of the key. (UUID format)

Get the public key in PEM format. › Responses


Restore a key

POST
https://api.scaleway.com
/key-manager/v1alpha1/regions/{region}/keys/{key_id}/restore

Restore a key and all its rotations scheduled for deletion specified by the region and key_id parameters.

Restore a key › path Parameters

region
​string · enum · required

The region you want to target

Enum values:
fr-par
nl-ams
pl-waw
key_id
​string · required

Restore a key › Request Body

Restore a key › Responses

200
id
​string

ID of the key. (UUID format)

srn
​string · pattern: ^srn://key-manager\.…

The SRN of the key.

project_id
​string

ID of the Project containing the key. (UUID format)

name
​string

Name of the key.

Key usage. See the Key.Usage enum for a description of possible values.

Key state. See the Key.State enum for a description of possible values.

Enum values:
unknown_state
enabled
disabled
pending_key_material
scheduled_for_deletion
Default: unknown_state
rotation_count
​integer · uint32

Number of key rotations. The rotation count tracks the number of times the key has been rotated.

created_at
​string | null · date-time

Key creation date. (RFC 3339 format)

updated_at
​string | null · date-time

Key last modification date. (RFC 3339 format)

protected
​boolean

Returns true if key protection is applied to the key.

locked
​boolean

Returns true if the key is locked.

description
​string | null

Description of the key.

tags
​string[]

List of the key's tags.

rotated_at
​string | null · date-time

Key last rotation date. (RFC 3339 format)

Key rotation policy.

Key origin. Refer to the Key.Origin enum for a description of values.

Enum values:
unknown_origin
scaleway_kms
external
Default: unknown_origin
deletion_requested_at
​string | null · date-time

Returns the time at which deletion was requested. (RFC 3339 format)

Key protection level. Refer to the Key.ProtectionLevel enum for a description of values.

Enum values:
unknown_protection_level
software
hsm
Default: unknown_protection_level
region
​string

Region where the key is stored.


Rotate a key

POST
https://api.scaleway.com
/key-manager/v1alpha1/regions/{region}/keys/{key_id}/rotate

Generate a new version of an existing key with new key material. Previous key versions remain usable to decrypt previously encrypted data, but the key's new version will be used for subsequent encryption operations and data key generation.

Rotate a key › path Parameters

region
​string · enum · required

The region you want to target

Enum values:
fr-par
nl-ams
pl-waw
key_id
​string · required

ID of the key to rotate. (UUID format)

Rotate a key › Request Body

Rotate a key › Responses

200
id
​string

ID of the key. (UUID format)

srn
​string · pattern: ^srn://key-manager\.…

The SRN of the key.

project_id
​string

ID of the Project containing the key. (UUID format)

name
​string

Name of the key.

Key usage. See the Key.Usage enum for a description of possible values.

Key state. See the Key.State enum for a description of possible values.

Enum values:
unknown_state
enabled
disabled
pending_key_material
scheduled_for_deletion
Default: unknown_state
rotation_count
​integer · uint32

Number of key rotations. The rotation count tracks the number of times the key has been rotated.

created_at
​string | null · date-time

Key creation date. (RFC 3339 format)

updated_at
​string | null · date-time

Key last modification date. (RFC 3339 format)

protected
​boolean

Returns true if key protection is applied to the key.

locked
​boolean

Returns true if the key is locked.

description
​string | null

Description of the key.

tags
​string[]

List of the key's tags.

rotated_at
​string | null · date-time

Key last rotation date. (RFC 3339 format)

Key rotation policy.

Key origin. Refer to the Key.Origin enum for a description of values.

Enum values:
unknown_origin
scaleway_kms
external
Default: unknown_origin
deletion_requested_at
​string | null · date-time

Returns the time at which deletion was requested. (RFC 3339 format)

Key protection level. Refer to the Key.ProtectionLevel enum for a description of values.

Enum values:
unknown_protection_level
software
hsm
Default: unknown_protection_level
region
​string

Region where the key is stored.


List key rotations

GET
https://api.scaleway.com
/key-manager/v1alpha1/regions/{region}/keys/{key_id}/rotations

Retrieve a list of all rotations associated with a specific key. The key_id and region parameters in the path are required.

List key rotations › path Parameters

region
​string · enum · required

The region you want to target

Enum values:
fr-par
nl-ams
pl-waw
key_id
​string · required

ID of the key to list rotations for. (UUID format)

List key rotations › query Parameters

Enum values:
created_at_asc
created_at_desc
Default: created_at_asc
page
​integer · int32
page_size
​integer · uint32

(Optional) Filter key rotations by their status. See the KeyRotation.Status enum for a description of possible values.

Enum values:
unknown_status
enabled
deleted

List key rotations › Responses

200

Single page of key rotations matching the requested criteria.

total_count
​integer · uint64

Total count of key rotations matching the requested criteria.


Sign a message digest

POST
https://api.scaleway.com
/key-manager/v1alpha1/regions/{region}/keys/{key_id}/sign

Use a given key to sign a message digest. The key must have its usage set to asymmetric_signing. The digest must be created using the same digest algorithm that is defined in the key's algorithm configuration.

Sign a message digest › path Parameters

region
​string · enum · required

The region you want to target

Enum values:
fr-par
nl-ams
pl-waw
key_id
​string · required

ID of the key to use for signing. (UUID format)

Sign a message digest › Request Body

digest
​string | null

Pre-hashed digest of the message to sign. For ECDSA and RSA keys, the digest generated using the key's hashing algorithm: 32 bytes (SHA-256) or 48 bytes (SHA-384). The 64-byte bound only exists for the ML-DSA backward-compatibility case below. Also accepted for ML-DSA for backward compatibility only; signatures may not conform to the ML-DSA spec, not recommended for new usage. Prefer message or external_mu for ML-DSA. One of digest, msg, external_mu is required.

msg
​string | null

Full message to sign as-is. Only supported for ML-DSA keys (raw signing): the server computes the μ message representative internally before signing. Between 1 and 4096 bytes. One of digest, msg, external_mu is required.

external_mu
​string | null

ML-DSA pre-hashed μ message representative, exactly 64 bytes. Must equal SHAKE256(tr ‖ 0x00 ‖ 0x00 ‖ message), where tr is the SHAKE256 of the key's public key. Signatures produced from other pre-hash computations (e.g. HashML-DSA) cannot be verified through this API. One of digest, msg, external_mu is required.

oneOf
Exactly one variant must match.

Decision Table

VariantMatching Criteria
type = object · requires: digest
type = object · requires: msg
type = object · requires: external_mu
Properties for Variant 1:
digest
​string | null · required

Pre-hashed digest of the message to sign. For ECDSA and RSA keys, the digest generated using the key's hashing algorithm: 32 bytes (SHA-256) or 48 bytes (SHA-384). The 64-byte bound only exists for the ML-DSA backward-compatibility case below. Also accepted for ML-DSA for backward compatibility only; signatures may not conform to the ML-DSA spec, not recommended for new usage. Prefer message or external_mu for ML-DSA. One of digest, msg, external_mu is required.

msg
​string | null

Full message to sign as-is. Only supported for ML-DSA keys (raw signing): the server computes the μ message representative internally before signing. Between 1 and 4096 bytes. One of digest, msg, external_mu is required.

external_mu
​string | null

ML-DSA pre-hashed μ message representative, exactly 64 bytes. Must equal SHAKE256(tr ‖ 0x00 ‖ 0x00 ‖ message), where tr is the SHAKE256 of the key's public key. Signatures produced from other pre-hash computations (e.g. HashML-DSA) cannot be verified through this API. One of digest, msg, external_mu is required.

Sign a message digest › Responses

200
key_id
​string

ID of the key used to generate the signature. (UUID format)

signature
​string

The message signature.


Remove key protection

POST
https://api.scaleway.com
/key-manager/v1alpha1/regions/{region}/keys/{key_id}/unprotect

Remove key protection from a given key specified by the key_id parameter. Removing key protection means that your key can be deleted anytime.

Remove key protection › path Parameters

region
​string · enum · required

The region you want to target

Enum values:
fr-par
nl-ams
pl-waw
key_id
​string · required

ID of the key to remove key protection from. (UUID format)

Remove key protection › Request Body

Remove key protection › Responses

200
id
​string

ID of the key. (UUID format)

srn
​string · pattern: ^srn://key-manager\.…

The SRN of the key.

project_id
​string

ID of the Project containing the key. (UUID format)

name
​string

Name of the key.

Key usage. See the Key.Usage enum for a description of possible values.

Key state. See the Key.State enum for a description of possible values.

Enum values:
unknown_state
enabled
disabled
pending_key_material
scheduled_for_deletion
Default: unknown_state
rotation_count
​integer · uint32

Number of key rotations. The rotation count tracks the number of times the key has been rotated.

created_at
​string | null · date-time

Key creation date. (RFC 3339 format)

updated_at
​string | null · date-time

Key last modification date. (RFC 3339 format)

protected
​boolean

Returns true if key protection is applied to the key.

locked
​boolean

Returns true if the key is locked.

description
​string | null

Description of the key.

tags
​string[]

List of the key's tags.

rotated_at
​string | null · date-time

Key last rotation date. (RFC 3339 format)

Key rotation policy.

Key origin. Refer to the Key.Origin enum for a description of values.

Enum values:
unknown_origin
scaleway_kms
external
Default: unknown_origin
deletion_requested_at
​string | null · date-time

Returns the time at which deletion was requested. (RFC 3339 format)

Key protection level. Refer to the Key.ProtectionLevel enum for a description of values.

Enum values:
unknown_protection_level
software
hsm
Default: unknown_protection_level
region
​string

Region where the key is stored.


Unwrap a key

POST
https://api.scaleway.com
/key-manager/v1alpha1/regions/{region}/keys/{key_id}/unwrap

Unwrap (decrypt) a wrapped key using an existing key, specified by the key_id parameter. The key must use ML-KEM algorithm. The maximum key size that can be unwrapped is 4 KB of ciphertext.

Unwrap a key › path Parameters

region
​string · enum · required

The region you want to target

Enum values:
fr-par
nl-ams
pl-waw
key_id
​string · required

Unwrap a key › Request Body

ciphertext
​string
​google.protobuf.BytesValue

Unwrap a key › Responses

200
key_id
​string

(UUID format)

plaintext
​string

Verify a message signature

POST
https://api.scaleway.com
/key-manager/v1alpha1/regions/{region}/keys/{key_id}/verify

Use a given key to verify a message signature against a message digest. The key must have its usage set to asymmetric_signing. The message digest must be generated using the same digest algorithm that is defined in the key's algorithm configuration.

Verify a message signature › path Parameters

region
​string · enum · required

The region you want to target

Enum values:
fr-par
nl-ams
pl-waw
key_id
​string · required

ID of the key to use for signature verification. (UUID format)

Verify a message signature › Request Body

digest
​string | null

Digest that was signed. For ECDSA and RSA keys, the digest of the original message, generated using the key's hashing algorithm. One of digest, msg is required.

msg
​string | null

Message that was signed. For ML-DSA keys, the full original message. This also verifies signatures made with raw or external_mu: send the message whose μ was signed, not the μ itself (a μ payload always fails). Messages over 4096 bytes cannot be verified through this endpoint. One of digest, msg is required.

signature
​string

The message signature to verify.

oneOf
Exactly one variant must match.

Decision Table

VariantMatching Criteria
type = object · requires: digest
type = object · requires: msg
Properties for Variant 1:
digest
​string | null · required

Digest that was signed. For ECDSA and RSA keys, the digest of the original message, generated using the key's hashing algorithm. One of digest, msg is required.

msg
​string | null

Message that was signed. For ML-DSA keys, the full original message. This also verifies signatures made with raw or external_mu: send the message whose μ was signed, not the μ itself (a μ payload always fails). Messages over 4096 bytes cannot be verified through this endpoint. One of digest, msg is required.

signature
​string

The message signature to verify.

Verify a message signature › Responses

200
key_id
​string

ID of the key used for verification. (UUID format)

valid
​boolean

Defines whether the signature is valid. Returns true if the signature is valid for the digest and key, and false otherwise.


Wrap a key

POST
https://api.scaleway.com
/key-manager/v1alpha1/regions/{region}/keys/{key_id}/wrap

Wrap (encrypt) a key using an existing key, specified by the key_id parameter. The key must use ML-KEM algorithm. The maximum key size that can be wrapped is 2 KB of plaintext.

Wrap a key › path Parameters

region
​string · enum · required

The region you want to target

Enum values:
fr-par
nl-ams
pl-waw
key_id
​string · required

Wrap a key › Request Body

plaintext
​string
​google.protobuf.BytesValue

Wrap a key › Responses

200
key_id
​string

(UUID format)

ciphertext
​string