Messaging API calls

Encrypt Message

In most cases you'll want to ensure the privacy of the message by encrypting it before sending.

Parameters

Name
In
Type
Required
Description

body

body

object

true

The recipients, sender and message

» type

body

string

false

none

» payload

body

object

true

none

» senderDid

body

string

true

none

» algorithm

body

string

false

none

» recipientDids

body

[oneOf]

true

none

Enumerated Values

Parameter
Value

» algorithm

ECDH-1PU+A256KW

» algorithm

ECDH-ES+A256KW

post
/messaging/encrypt

Messaging encrypt

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
typestringOptional
payloadobjectRequired
senderDidstringRequired
algorithmstring · enumOptionalDefault: ECDH-1PU+A256KWPossible values:
Responses
chevron-right
200

Message has been encrypted, returning an encrypted DIDComm Message

application/json
post
/messaging/encrypt

Decrypt Message

Parameters

Name
In
Type
Required
Description

body

body

object

true

The JWM

» jwe

body

object

true

none

post
/messaging/decrypt

Decrypts a JSON Web Message

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
jweobjectRequired
Responses
chevron-right
200

Message has been decrypted, returning a DIDComm message

application/json
post
/messaging/decrypt

Signing Messages

Signing a message helps to prove to the recipient that the message is valid and unaltered. The message will be signed as a Base64 encoded JWT.

Parameters

Name
In
Type
Required
Description

body

body

object

true

The message payload

» payload

body

object

true

none

» senderDid

body

string

true

none

» type

body

string

false

none

post
/messaging/sign

Signs a DIDComm message as a base64 encoded JWT

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
payloadobjectRequired
senderDidstringRequired
typestringOptional
Responses
chevron-right
200

Message has been sent

application/json
post
/messaging/sign

Verifying a Message

Verify that the message is valid.

Parameters

Name
In
Type
Required
Description

body

body

object

true

The message payload

» jws

body

string

true

none

post
/messaging/verify

Verifies a JWS in its compacted form

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
jwsstringRequired
Responses
chevron-right
200

Message is verified

application/json
post
/messaging/verify

Send Message

Sends a DIDComm message using our relay service and DID service endpoints, it also returns a URL for QR code scanning. Supports encrypted, plaintext and signed DIDComm messages. You can generate an encrypted DIDComm message by calling the /messaging/encrypt route.

The typ attribute must be a DIDComm type (i.e. starts with "application/didcomm").

Parameters

Name
In
Type
Required
Description

body

body

object

true

The message payload

» to

body

string

true

none

» message

body

Message

true

none

post
/messaging/send

Sends a DIDComm message using our relay service and DID service endpoints, it also returns a URL for QR code scanning. Supports encrypted, plaintext and signed DIDComm messages. You can generate an encrypted DIDComm message by calling the /messaging/encrypt route

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
tostringRequired
messageobjectRequired
Responses
chevron-right
200

Message has been sent

application/json
post
/messaging/send

Last updated

Was this helpful?