Truvera Documentation portal
WebsiteTruvera Workspace
  • Truvera overview
    • Decentralized identity explained
    • Roadmap
    • Subscription plans & billing
  • Solutions
    • Biometric-Bound Credentials
  • Truvera Workspace
    • Create an organization profile (DID)
    • Issue verifiable credentials
      • Filtering, downloading and deleting credentials
    • Verify credentials
    • Create a schema
    • Create a design
    • Team management
      • Inviting a team member
      • Removing a team member
      • Changing team member roles
      • Data retention policies
      • Sub-accounts
    • Revoking credentials
    • Ecosystem Tools
      • Ecosystem set up
      • Ecosystem example
    • Monetizing credentials
      • Setting up monetizable credentials
    • Creating API keys and webhook endpoints
    • Transaction history
    • Custom branded distribution emails
    • Truvera Workspace release notes
      • 2025 Release notes
        • Release notes Q1 2025
      • 2024 Release notes
        • Release Notes February 2024
        • Release Notes March 2024
        • Release Notes April 2024
        • Release Notes May 2024
        • Release Notes June 2024
        • Release Notes July 2024
        • Release Notes August 2024
        • Release Notes September 2024
        • Release Notes October 2024
        • Release notes November 2024
        • Release notes December 2024
  • Truvera API
    • Getting started
    • Webhooks
      • Webhooks API endpoints
    • Sample Postman collections
      • Issue-Store-Verify sample flow
      • Create ecosystems
      • Issue monetizable credentials
      • Create sub-accounts
      • Issue OpenID credentials
    • Truvera Swagger UI
    • DIDs
    • Profiles
    • Credentials
    • Presentations
      • Proof templates
      • Proof requests
      • Other proof endpoints
    • Registries
    • Revocation Status
    • Credential Schemas
    • Jobs
    • Templates
    • Sub-accounts
    • Teams
    • Messaging
    • OpenID
      • OpenID Issuance and Verification Integration Guide
    • iden3comm
    • Ecosystem Tools
      • Trust Registry Integration Guide
      • Creating a Trust Registry
      • Inviting participants
      • Verifiers and Public info
      • Trust Registry Schemas
      • Trust Registry Proof Templates
      • Reports
      • Updating and Deleting Trust Registry
    • Issuing paid credentials (KVAC algorithm integration)
    • Data
    • Verify
    • Keys
    • Schemas
  • System architecture
    • Proposed architecture with Truvera
    • Revocation
    • System scalability
    • Security policies
    • How data is processed and stored
  • Supported standards
    • Interoperability with OpenID
  • Credential wallet
    • Create and manage DIDs in the Truvera Wallet
    • White label wallet
      • Configuration
        • Enabling and Disabling Features
        • Customizing the Styling
        • Configuring for Android Builds
        • Configuring iOS Builds
      • Publishing in App Stores
        • Android Build Testing and Publishing
        • iOS Build Testing and Publishing
    • Wallet SDK
      • Getting started
        • Example Credential
        • Presentation definition
        • Verify credentials
      • Cloud wallet
      • Biometric plugin
      • Ecosystem Tools
    • Download Truvera Wallet
    • Truvera Wallet release notes
      • Release Notes 2025Q1
      • Release Notes 2024Q4
      • Release Notes 2024Q3
        • Release Notes September 2024
        • Release Notes August 2024
        • Release Notes July 2024
      • Release Notes June 2024
      • Release Notes May 2024
      • Release Notes April 2024
  • Open source community
    • Code of Conduct
    • Truvera Credential SDK
    • Blockchain archives
      • DOCK token
        • Migration terms and conditions
  • Support
    • System Status
    • Discord
    • Support services
    • Security policy
Powered by GitBook
On this page

Was this helpful?

Edit on GitHub
  1. Truvera API

Messaging

PreviousTeamsNextOpenID

Last updated 5 months ago

Was this helpful?

Operations about DIDComm messaging. DIDComm messages are addressed by DID using Dock's relay service.

The current most common use case for the messaging service is to send credentials and presentation requests to the Truvera Wallet, but other clients can use it too.

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

Decrypt Message

Parameters

Name
In
Type
Required
Description

body

body

object

true

The JWM

» jwe

body

object

true

none

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

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

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

  • Encrypt Message
  • Parameters
  • Enumerated Values
  • POST/messaging/encrypt
  • Decrypt Message
  • Parameters
  • POST/messaging/decrypt
  • Signing Messages
  • Parameters
  • POST/messaging/sign
  • Verifying a Message
  • Parameters
  • POST/messaging/verify
  • Send Message
  • Parameters
  • POST/messaging/send
post

Messaging encrypt

Authorizations
Body
typestringOptional
payloadobjectRequired
senderDidstringRequired
algorithmstring · enumOptionalDefault: ECDH-1PU+A256KWPossible values:
Responses
200
Message has been encrypted, returning an encrypted DIDComm Message
application/json
400
Message failed to encrypt
application/json
402
Transaction limit reached or upgrade required to proceed
application/json
404
DID was not found
application/json
post
POST /messaging/encrypt HTTP/1.1
Host: api-testnet.truvera.io
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 102

{
  "type": "text",
  "payload": {},
  "senderDid": "text",
  "algorithm": "ECDH-1PU+A256KW",
  "recipientDids": [
    "text"
  ]
}
{
  "code": 1
}
post

Decrypts a JSON Web Message

Authorizations
Body
jweobjectRequired
Responses
200
Message has been decrypted, returning a DIDComm message
application/json
400
Message failed to decrypt
application/json
402
Transaction limit reached or upgrade required to proceed
application/json
404
DID was not found
application/json
post
POST /messaging/decrypt HTTP/1.1
Host: api-testnet.truvera.io
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 10

{
  "jwe": {}
}
{
  "code": 1
}
post

Signs a DIDComm message as a base64 encoded JWT

Authorizations
Body
payloadobjectRequired
senderDidstringRequired
typestringOptional
Responses
200
Message has been sent
application/json
400
Message failed to send
application/json
402
Transaction limit reached or upgrade required to proceed
application/json
404
DID was not found
application/json
post
POST /messaging/sign HTTP/1.1
Host: api-testnet.truvera.io
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 47

{
  "payload": {},
  "senderDid": "text",
  "type": "text"
}
{
  "code": 1
}
post

Verifies a JWS in its compacted form

Authorizations
Body
jwsstringRequired
Responses
200
Message is verified
application/json
400
Message failed to verify
application/json
402
Transaction limit reached or upgrade required to proceed
application/json
404
DID was not found
application/json
post
POST /messaging/verify HTTP/1.1
Host: api-testnet.truvera.io
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 14

{
  "jws": "text"
}
{
  "code": 1
}
post

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
Body
tostringRequired
messageobjectRequired
Responses
200
Message has been sent
application/json
400
Message failed to send
application/json
402
Transaction limit reached or upgrade required to proceed
application/json
404
DID was not found
application/json
post
POST /messaging/send HTTP/1.1
Host: api-testnet.truvera.io
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 26

{
  "to": "text",
  "message": {}
}
{
  "code": 1
}