Via the signature page, it is possible for a participant and a member of the workspace to exchange messages.
Send an instant message to a participant
If a participant has sent a message to the transaction creator via the signature page instant messaging feature, it is possible for the transaction creator to reply. To send an instant message to a participant, send a request to POST/v1/transactions/{transaction_id}/participants/messages
and pass the participant email
and the message
argument:
curl
https://api.universign.com/v1/transactions/tx_aA5g6yzYVYW8/participants/messages \
-d email=bob@company.com \
-d message=Sorry for the inconvenience. The typo has been corrected.
The API returns the message sent by the workspace member who replied to the participant.
{
"object": "message",
"id": "msg_MJAobD5aG297e",
"sent_at": "2022-01-19T18:45:44Z",
"message": "Sorry for the inconvenience. The typo has been corrected.",
"from_participant": false,
"was_read": false
}
Mark a message as read
Once you reply to the participant message, you can mark his/her message as read. To do so, send a request to POST/v1/transactions/{transaction_id}/participants/messages/{message_id}
and pass the participant email
argument:
curl
https://api.universign.com/v1/transactions/tx_AWo949MOq0JE/participants/messages/msg_1aZMnyLZB477e
-d email=john@company.com
The API returns the message sent by the participant.
{
"object": "message",
"id": "msg_1aZMnyLZB477e",
"sent_at": "2022-01-19T18:45:44Z",
"message": "Thank you for your reply.",
"from_participant": true,
"was_read": true
}
Retrieve a conversation
To retrieve the content of the conversation, send a a request to GET/v1/transactions/{transaction_id}/participants/messages
and pass the participant email
argument:
curl
https://api.universign.com/v1/transactions/tx_AWo949MOq0JE/participants/messages
-d email=john@company.com
The API response returns the existing messages between the participant and the workspace.
[
{
"object": "message",
"id": "msg_V9KaBgPreADy",
"sent_at": "2022-10-19T15:02:28Z",
"message": "This is a Sample message !",
"from_participant": true,
"was_read": true
},
{
"object": "message",
"id": "msg_zwEVwYaB1ZX6r",
"sent_at": "2022-10-19T15:13:23Z",
"message": "Thank you for your message",
"from_participant": false,
"was_read": false
}
]