Add Public Key
Adds a public key to the target for payload encryption.
The public key is used to encrypt the payload sent to the target when the payload type is set to PAYLOAD_TYPE_JWE.
The public key must be in PEM format and be either an RSA or an EC key.
On a successful addition, a key ID is returned which can not only be used to manage the key (activate, remove),
but also will be used as the kid header in the JWE token sent to the target to indicate which key was used for encryption.
Note that newly added keys are inactive by default. You must activate the key to use it for payload encryption.
Providing an optional expiration date allows you to set a validity period for the key.
After the expiration date, the key will be automatically deactivated and no longer used for payload encryption.
Be sure to activate a new key before the current active key expires to avoid interruptions in your target executions.
You can have multiple inactive keys for rotation purposes, but only one active key at a time.
Required permission:
action.target.write
target_id*target_idThe unique identifier of the target to add the public key to.
application/json- body
publicKey*public_keyThe public key in PEM format. It must be either an RSA or an EC public key.
byteexpirationDate?|Optional expiration date of the public key. After the expiration date, the key will be automatically deactivated and no longer used for payload encryption. Be sure to activate a new key before the current active key expires to avoid interruptions. If not set, the key will not expire.
Success
application/json- response
keyId?key_idThe KeyID is the unique identifier of the newly added public key.
The ID is also used a kid in the JWT header for payload encryption.
This allows the target to identify the correct key to use for decryption.
creationDate?creation_dateCreationDate represents the timestamp of the public key addition.
date-timecurl -X POST 'https://example.com/v2/actions/targets/string/publickeys' \ -H 'Content-Type: application/json' \ -d '{ "publicKey": "string"}'{ "keyId": "string", "creationDate": "2023-01-15T01:30:15.01Z"}Was this page helpful?
Activate Public Key
Activate Public Key: Activates the public key for payload encryption. The public key is used to encrypt the payload sent to the target when the payload type is set to `PAYLOAD_TYPE_JWE`. Activating a new key will deact...
Create Target
Create Target: Create a new target to your endpoint, which can be used in executions. Required permission:
