

This guide provides documentation for Wickr Enterprise. If you're using AWS Wickr, see [AWS Wickr Administration Guide](https://docs.aws.amazon.com/wickr/latest/adminguide/what-is-wickr.html).

# Appendix B: Compliance output examples
<a name="compliance-output-examples"></a>

The following are compliance output examples for different types of messages.

## Text message
<a name="text-message"></a>

The following is a text message in a one-to-one (DM) conversation.

```
{
  "message": "test message",
  "message_id": "a526085032fa11ee9a74053bb1017859",
  "msg_ts": "1691176258.901277",
  "msgtype": 1000,
  "receiver": "dr001@ent-beta.secmv.net",
  "sender": "dr002@ent-beta.secmv.net",
  "sender_type": "normal",
  "time": "8/4/23 7:10 PM",
  "time_iso": "2023-08-04 19:10:58.901",
  "ttl": "9/3/23 7:10 PM",
  "vgroupid": "7ad65d17b945d7672190ecab6902fdd06eff162b91adfcda23df3b2ff95875e8"
}
```

The following shows a text message for a secure room conversation.

**Note**  
The **vgroupid** for a secure room conversation starts with the **S** letter and begins with the **G** letter for group conversations.

```
{
  "bor": "8/10/23 7:19 PM",
  "message": "test message in a secure room",
  "message_id": "e2c5115032fb11ee9a74053bb1017859",
  "msg_ts": "1691176791.781279",
  "msgtype": 1000,
  "sender": "dr002@ent-beta.secmv.net",
  "sender_type": "normal",
  "time": "8/4/23 7:19 PM",
  "time_iso": "2023-08-04 19:19:51.781",
  "ttl": "9/3/23 7:19 PM",
  "vgroupid": "S19a8782d9a0441d5e13f15b6789f00bc2f9b8231aa364a2eb3a8269dce2ac21"
}
```

## Text messages with links
<a name="text-message-links"></a>

If you send a text message that contains links, and the security group settings have the "Send Link Preview" option enabled, the text message will contain a list of the URLs for those links:

```
{
  "links": [
    {
      "url": "https://weather.com/weather/today"
    }
  ],
  "message": "Test message with a link: https://weather.com/weather/today",
  "msg_ts": "1691176397.971030",
  "msgtype": 1000,
  "receiver": "dr001@ent-beta.secmv.net",
  "sender": "dr002@ent-beta.secmv.net",
  "sender_type": "normal",
  "time": "8/4/23 7:13 PM",
  "time_iso": "2023-08-04 19:13:17.971",
  "ttl": "9/3/23 7:13 PM",
  "vgroupid": "7ad65d17b945d7672190ecab6902fdd06eff162b91adfcda23df3b2ff95875e8"
}
```

## File transfer messages
<a name="file-transfer-messages"></a>

The **file** JSON object contains the details of the file being transferred, described in the following table:


| Field | Description | 
| --- | --- | 
|  filename  |  The display name of the file being transferred.  | 
|  guid  |  A unique identifier for the transferred file.  | 
|  isscreenshot  |  Boolean field that identifies if the file is a screen shot image.  | 
|  localfilename  |  The full path name of the file on the Wickr IO Gateway system.  | 
|  uploadedbyuser  |  The display name of the user, if known.  | 
|  uploadedtimestamp  |  The time when the file was uploaded by the user.  | 

The following shows the format of a file transfer message. The msgtype for file transfer messages is 6000. Files received by the Wickr IO client will be decrypted and remain on the Wickr IO client until removed by your software.

```
{
  "file": {
    "filename": "claymation.gif",
    "guid": "b3078e72-c983-44c4-9097-8b884782b328",
    "localfilename": "/opt/WickrIO/clients/compliance_bot/integration/
        wickrio-compliance-bot/attachments/
        attachment_20230804191544790_claymation.gif",
    "uploadedbyuser": "Test User",
    "uploadedtimestamp": "8/4/23 7:15 PM"
  },
  "message_id": "4f8d3b6032fb11ee9a74053bb1017859",
  "msg_ts": "1691176544.790581",
  "msgtype": 6000,
  "receiver": "dr001@ent-beta.secmv.net",
  "sender": "dr002@ent-beta.secmv.net",
  "sender_type": "normal",
  "time": "8/4/23 7:15 PM",
  "time_iso": "2023-08-04 19:15:44.790",
  "ttl": "9/3/23 7:15 PM",
  "vgroupid": "7ad65d17b945d7672190ecab6902fdd06eff162b91adfcda23df3b2ff95875e8"
}
```

## Verification messages
<a name="verification-messages"></a>

Verification messages are displayed when a client verifies another client whose account may have become unverified.

```
{
  "keyverify": {
    "msgtype": 3,
    "verifiedkey": "00040115f7ba8af2b6f2e2e7f8e61cf61d750f25aff2df4866ccd03d02675233706c802d8e979facb7293dc0077ebe174f7353018c299d68d42ca2499fb0b412d0daf766006c6874c03e5cd3f89bfd674103d3aad2274bd970c055bfb6c10546068313396371e2c7e3ba88218b92ebe6d5f0e464d3f013f70ccf7848cd32a300a7c6a1ac2d9b"
  },
  "message_id": "6054031032fc11ee9a74053bb1017859",
  "msg_ts": "1691177002.433400",
  "msgtype": 3000,
  "receiver": "cn0623_01@amazon.com",
  "sender": "dr002@ent-beta.secmv.net",
  "sender_type": "normal",
  "time": "8/4/23 7:23 PM",
  "time_iso": "2023-08-04 19:23:22.433",
  "ttl": "9/3/23 7:23 PM",
  "vgroupid": "31767dd6dc31cd5d87579e2694b041116d31ae1750cbcec8e957d237c7fe0591"
}
```

Verification messages have an additional nested msgtype:


| Verification Message Type | msgtype value | 
| --- | --- | 
|  Verification request  |  1  | 
|  Verification response and request  |  2  | 
|  Verification acceptance  |  3  | 
|  Verification rejection  |  4  | 
|  "Not Now" response  |  5  | 

## Control messages
<a name="control-messages"></a>

Control messages are used to set up and configure secure rooms and group conversations. The messages are also required to reconstruct the list of users involved in specific secure rooms and group conversations.

Like Verification, these messages contain additional meta data to describe their actions. The control object may include:
+ A **bor** field. This is the Burn on Read time in seconds.
+ A **ttl** field. This is the Expiration time in seconds.
+ Description field. The conversation’s description.
+ Title field. The title of the conversation.
+ A **changemask** field is a number value created from adding the following flag values: 


| Message Type | msgtype value | 
| --- | --- | 
|  Masters field (Moderators)  |  1  | 
|  TTL (Expiration)  |  2  | 
|  Title field (Room name)  |  4  | 
|  Description  |  8  | 
|  Meeting ID Key  |  16  | 
|  Burn on Read  |  32  | 

In the example below you’ll see a **changemask** value of 47. This is equal to the sum of Masters (1), TTL (2), Title (4), Description (8), and Burn on Read (32). 

```
{
  "control":{
    "bor":0,
    "changemask":47,
    "description":"",
    "masters":["user001", "user002"], 
    "members":["user001", "user002", "user003"],
    "msgtype":4001,
    "title":"Creating a room",
    "ttl":2592000 
  },
  "id":"be452b00f89711e883588d1e7a946847",
  "msg_ts":"1544019125.75323",
  "msgtype":4001,
  "sender":"user002",
  "time": "5/10/20 6:17 PM",
  "vgroupid":"S58a15186365d2125a9b417e71b99bcb29e3770078e157e953cfbe28443eb750" 
}
```

## Modify room members message
<a name="modify-room-members-message"></a>

The **addeduser** and **deletedusers** array will show who was added and removed.

```
{
  "control":{
    "addedusers":[],
    "deletedusers":["testuser"],
    "msgtype":4002
  }, 
  "id":"d34058a0f89711e88760d7c8037ea946", 
  "msg_ts":"1544019160.275884",
  "msgtype":4002,
  "sender":"user002", 
  "time": "5/09/20 3:22 PM",
  "vgroupid":"S58a15186365d2125a9b417e71b99bcb29e3770078e157e953cfbe28443eb750" 
}
```

## Modify room parameters message
<a name="modify-room-parameters-message"></a>

```
{
  "control":{
    "bor":0,
    "changemask":47,
    "description":"change description",
    "masters":["user001"],
    "members":["user001","user002"],
    "msgtype":4004,
    "title":"Creating a room", 
    "ttl":2592000 
  },
  "id":"db805750f89711e8a01ab328ac0b2f04",
  "msg_ts":"1544019174.117057",
  "msgtype":4004,
  "sender":"user002",
  "time":"5/11/20 4:53 PM",
  "vgroupid":"S58a15186365d2125a9b417e71b99bcb29e3770078e157e953cfbe28443eb750" 
}
```

## Modify saved item in room
<a name="modify-saved-items-room"></a>

```
{
  "control":{
    "bor":0,
    "changemask":64,
    "description":"",
    "filevaultinfo":{
      "filehash":"4eab763c5f3211ca93966a...d3e461c27f5432c1",
      "guid":"D094F147-0490-4A14-9A65-6F23C896A8B4",
      "key":"00f8058d88e6b7520849bbfd8e6b5cc12d35a70c856dde44d64e2e331fc50ce700" 
    },
    "masters":["user002","user001"],
    "members":["user002","user001"],
    "msgtype":4004,
    "title":"Test",
    "ttl":2592000
  },
  "message_id":"c3cb62e08dff11eab641a549111a64cb",
  "msg_ts":"1588594022.928361",
  "msgtype":4004,
  "sender":"user001",
  "time":"5/4/20 5:07 AM",
  "vgroupid":"S243f2ec645d3961bdd531f51f3244205d292b8d0fbd41802827746271d31d41" 
}
```

## Delete room message
<a name="delete-room-message"></a>

```
{
  "id":"06364710f89811e899418b6723464a0c",
  "msg_ts":"1544019245.773676",
  "msgtype":4005,
  "sender":"user002",
  "time":"5/7/20 4:33 PM",
  "vgroupid":"S7879eb406958d83b991a5f2acb29e5ad8565a4faa41e1c5cbd7004c5586ddd5"
}
```

## Delete or recall message
<a name="delete-recall-message"></a>

The **isrecall** field will show if the message was deleted or recalled.

```
{
  "control":{
    "isrecall":false,
    "msgid":"4ab537d0f85d11e88c2225680208f9ff",
    "msgtype":4011 
  },
  "id":"bea7ad10f89811e8822887c76561d99d",
  "msg_ts":"1544019555.217633",
  "msgtype":4011,
  "sender":"user002",
  "time":"5/10/20 5:11 PM",
  "vgroupid":"3f13df0d8f267812d7e743a518fcfb6dacf6fd0824e16a83a4d2a06d32cf8d9c" 
}
```

## Message attribute change
<a name="message-attribute-change"></a>

These control messages show when a message **isstarred** or **unstarred**.

```
{
  "control":{
    "attributes":[
      {
        "isstarred":true,
        "msgid":"93cf81608bbd11ea9a16b7554e31eed2"
      }
    ],
    "msgtype":4012
  },
  "message_id":"b0d284d08be311eaaf7f51713016a94c",
  "msg_ts":"1588362062.864376",
  "msgtype":4012,
  "receiver":"user123", 
  "sender":"user100",
  "time":"5/1/20 12:41 PM",
  "vgroupid":"4ebf561eb2214c4e6f924d09e37bf80b6f9b85cb96b72badb03753d9ed26f7f4"
}
```

## Modify private property
<a name="modify-private-property"></a>

This message identifies when a conversation is pinned or un-pinned. The **pinned** value will be true when the conversation is pinned, and **false** when it is being un-pinned.

```
{
    "control":
    {
        "pinned":true,
        "msgtype":4014
    },
    "message_id":"c5bce5e0ca2f11e78946112c51861afa",
    "msg_ts":"1510769218.785332",
    "msgtype":4014,
    "sender":"user003",
    "sender_type": "normal",
    "time": "7/11/23 6:07 PM",
    "time_iso": "2023-07-11 18:07:21.981",
    "ttl": "7/10/24 6:07 PM",
    "vgroupid":"Sb0e9297f2208dc86b63b288df8c226882e1052b65022edb9edb9ecf6e77db08"
}
```

## Calling messages
<a name="calling-messages"></a>

Calls can have four status values:


| Call Status | Status Value | 
| --- | --- | 
|  Call Starting  |  0  | 
|  Call Completed  |  1  | 
|  Call Missed  |  2  | 
|  Call Cancelled  |  3  | 

## Call start
<a name="call-start"></a>

The following is a call start example.

```
{
  "call":{  
    "calluri":"3.86.149.242:16398", "calluriipv6":"[2600:1f18:2741:9e01:e0cb:6847:bb1d:415d]:16398", "meetingid":0,
    "participants":[
      "8995950dad747c24fd7c9e2da68edeb6c2c0ac6cb96d405c0c4c58e09ff46969",
      "ae182b20ce36a94c613af5a2964bbd616de662d3f8487dc39fa9400e739a3049"
    ],
    "status":0,
    "version":2,
    "versioncheck":true
  },
  "message_id":"4d421aa08be811eaaf7a493af2765a5b",
  "msg_ts":"1588364043.307106",
  "msgtype":7000,
  "receiver":"user5",
  "sender":"user100",
  "time":"5/1/20 1:14 PM",
  "vgroupid":"4ebf561eb2214c4e6f924d09e37bf80b6f9b85cb96b72badb03753d9ed26f7f4" 
}
```

**Note**  
The **participants** array will have the **username\$1hash** of the users that were on the call. You can get the plaintext usernames from the mysql database with the following query.

```
select username from user_enterprise where username_hash = 
 'b64e2aa1c3c9edb74f31079c579b5feb22300e6966ac6c1721fd9e4dcfca4dd8'\G;
```

## Invite to call
<a name="invite-call"></a>

When a user is invited to an active call it will appear as a new call started. You can use the **invitemsgid** field to match invites to the original call. 

```
{
  "call":{  
    "calluri":"18.234.76.29:16504", "calluriipv6":"[2600:1f18:2741:9e00:3fba:154:6431:df8e]:16504", "invitemsgid":"87b5e4a095ef11ea99b03bd5dd4eaa9d", "meetingid":0,
    "participants":[
      "ae182b20ce36a94c613af5a2964bbd616de662d3f8487dc39fa9400e739a3049"
    ],
    "startmsgid":"87b5e4a095ef11ea99b03bd5dd4eaa9d",
    "status":0,
    "version":2,
    "versioncheck":true 
  },
  "message_id":"ce22f14095ef11eaa1cbdf2a74e88e51", "msg_ts":"1589466777.633896",
  "msgtype":7000,
  "receiver":"comptst100",
  "sender":"comptst101",
  "time":"5/14/20 2:32 PM",
  "vgroupid":"7f1a06a35243584436f6df7170e0fc8a784022a66b5e5d168b419b14cecdcdad" 
}
```

## Call end
<a name="call-end"></a>

```
{
  "call":{
    "duration":38,
    "meetingid":1,
    "startmsgid":"72c9a3b08bea11eab9078f7ca8a1b909", 
    "status":1,
    "version":2,
    "versioncheck":true
  },
  "message_id":"8b9d94408bea11ea89aea91887dfff41",
  "msg_ts":"1588365006.918849",
  "msgtype":7000,
  "receiver":"user005",
  "sender":"user100",
  "time":"5/1/20 1:30 PM",
  "vgroupid":"4ebf561eb2214c4e6f924d09e37bf80b6f9b85cb96b72badb03753d9ed26f7f4"
}
```

## Location messages
<a name="location-messages"></a>

There are two types of location messages. The first example is for a static share. 

**Static Location Share**

```
{
  "location":{
    "latitude":40.75017899435506, 
    "longitude":-74.99449803034105
  },
  "message_id":"1f88fdc08bec11ea81b689d23fa72c7b",
  "msg_ts":"1588365684.583407",
  "msgtype":8000,
  "receiver":"user003",
  "sender":"user100",
  "time":"5/1/20 8:41 PM",
  "vgroupid":"4ebf561eb2214c4e6f924d09e37bf80b6f9b85cb96b72badb03753d9ed26f7f4"
}
```

**Share Location Continuously **

The second example is when a user shares their location for a period of time. The edit section will show what changed.

```
{
  "edit":{
    "type":"location",
    "shareexpiriation":"";
    "latitude":40.75017899435506,
    "longitude":-74.99449803034105
  },
  "message_id":"1f88fdc08bec11ea81b689d23fa72c7b",
  "msg_ts":"1588365684.583407",
  "msgtype":9000,
  "receiver":"user003",
  "sender":"user100",
  "time":"5/1/20 8:41 PM",
  "vgroupid":"4ebf561eb2214c4e6f924d09e37bf80b6f9b85cb96b72badb03753d9ed26f7f4"
}
```

## Link previews
<a name="link-previews"></a>

When a user shares a link and has "Link Previews" enabled, it will show that here:

```
{
  "edit":{  
    "originalmessageid":"11457fa08da211ea881baffab0b42745",
    "text":"https://howdoyoudo.com",
    "type":"text"
  },
  "message_id":"1163e5b08da211eab775a5032a0322ca",
  "msg_ts":"1588553780.419871",
  "msgtype":9000,
  "sender":"user001",
  "time":"5/3/20 5:56 PM",
  "vgroupid":"S243f2ec645d3961bdd531f51f3244205d292b8d0fbd41802827746271d31d41"
}
```