Decrypt a message
Roles
Analytics Events
/v1/messaging/decryptDecrypts a provided message where the tenant manages the keys for the defined recipientDidUrl.
Analytic events
- MESSAGING_DECRYPT_START
- MESSAGING_DECRYPT_SUCCESS
- MESSAGING_DECRYPT_FAIL
Authorization
bearerAuth In: header
Request Body
application/json
Decryption parameters
The jwe object to be decrypted. It can be extracted from the jwe attribute of the response body you get when encrypting a message.
Alternatively, you can use a jwe string using Base64 encoding method and following the JWE open-standard:
BASE64URL(UTF8(JWE Protected Header)) || '.' || BASE64URL(JWE Encrypted Key) || '.' || BASE64URL(JWE Initialization Vector) || '.' || BASE64URL(JWE Ciphertext) || '.' || ASE64URL(JWE Authentication Tag)
Response Body
application/json
application/json
curl -X POST "https://example.vii.au01.mattr.global/v1/messaging/decrypt" \ -H "Content-Type: application/json" \ -d '{ "jwe": "eyJhbGciOiJFZERTQSIsImtpZCI6ImRpZDp3ZWI6bWF0dHIuZ2xvYmFsI0V5MkN2V2N5MzQifQ.eyJtZXNzYWdlIjoidGVzdCJ9.dMvOGkfbRrjUJL7XYYAp1UxoHlt8J0N5_vRRLpTEHtQ4s8lwnMd0lhg7HiZVfvEyzk54f6J0CgTV5oHzVscdAA" }'{
"payload": "string",
"senderDidUrl": "did:web:organization.com#2vcj3MjR4d",
"senderPublicJwk": {},
"recipientDidUrl": "did:key:z6MkgmEkNM32vyFeMXcQA7AfQDznu47qHCZpy2AYH2Dtdu1d"
}{
"code": "string",
"message": "string",
"details": [
{
"value": "string",
"msg": "Invalid value",
"param": "id",
"location": "body"
}
]
}How would you rate this page?
Encrypt a message POST
Encrypts the provided payload using into a JWM (JSON Web Message) format. ### **Analytic events** * MESSAGING_ENCRYPT_START * MESSAGING_ENCRYPT_SUCCESS * MESSAGING_ENCRYPT_FAIL
Send a message POST
Sends an encrypted JWM (JSON Web Messaging) format message to a service endpoint defined in a public DID document. ### **Analytic events** * MESSAGING_SEND_START * MESSAGING_SEND_SUCCESS * MESSAGING_SEND_FAIL