light-mode-image
Learn
MATTR VII PlatformMessaging

Sign a message

Accepts a message payload and signs it with a JWS (JSON Web Signature) using the a specific key from the DID (Decentralized Identifier) provided in the request.

Analytics Events

MESSAGING_SIGN_STARTMESSAGING_SIGN_SUCCESSMESSAGING_SIGN_FAIL

Roles

adminissuer
POST/v1/messaging/sign
AuthorizationBearer <token>

In: header

Sign message request

didUrlstring

The did key that will be used to sign the message, which must supports signing. You can obtain it from the DID document DID.localMetadata.initialDidDocument.authentication[0] path.

payloadJSONObjectMessage

A JSON Object plaintext message

Empty Object

Response Body

curl -X POST "https://example.vii.au01.mattr.global/v1/messaging/sign" \  -H "Content-Type: application/json" \  -d '{    "didUrl": "did:web:organization.com#2vcj3MjR4d",    "payload": {      "msg": "this is a message"    }  }'
"eyJhbGciOiJFZERTQSIsImtpZCI6ImRpZDprZXk6ejZNa21mazNtMldIQlVxVm94SlZ3R1NQejVrYmFKNnpBMXRwN1JRWUJiUUdtczNoI3o2TWttZmszbTJXSEJVcVZveEpWd0dTUHo1a2JhSjZ6QTF0cDdSUVlCYlFHbXMzaCJ9.eyJtc2ciOiJUaGlzIGlzIGEgcGF5bG9hZCJ9.5E9qEmmSOMHLABAr4A9VzuNKFaO4EDo2GSCMoxQm9zsE7eCmEEuaAxtNhOUdd-Wvj64vqBBVl84XB1Yg7X9wBg"
{
  "code": "string",
  "message": "string",
  "details": [
    {
      "value": "string",
      "msg": "Invalid value",
      "param": "id",
      "location": "body"
    }
  ]
}

How would you rate this page?