BBM Data Service Core (BBMDS-Core) - bbmcore to application protocol

Contents

Introduction

Copyright 2019 BlackBerry. All rights reserved.

The entity connected to bbmcore as a client of the BBMDS protocol is known within this documentation as "your application".

"Incoming" messages refer to messages from bbmcore to your application. "Outgoing" messages refer to messages from your application to bbmcore. Lists are always managed by bbmcore, with potential changes sometimes requested by your application via general-purpose and/or case-specific messages, and actual changes reflected in "incoming" messages from bbmcore via List Management Messages.

There is no incoming flow control. bbmcore will send data to your application as fast as it can and will continue sending even if your application is not able to read it.

Your application must resynchronize all BBMDS-sourced data when the connection between itself and bbmcore is re-established, such as when bbmcore starts or restarts. Such re-establishment events will also be used by bbmcore to explicitly notify your application that its entire state may have changed, such as during a device switch or when the setup state changes.

When resynchronization is triggered, it indicates that an unknown number of messages from bbmcore may have been lost. Your application is required to re-request any cached mutable state that was obtained from bbmcore. The application is not required to re-request the entire state of bbmcore. It only needs to re-request information that is currently cached.

Elsewhere in this document, we will describe the responses from bbmcore as being unconditional, with statements like "When your application sends X, bbmcore will respond with Y". This document does not explicitly state the qualification "unless resynchronization occurs" since it always applies. Although these cases are supposed to be infrequent, it is possible that any incoming message may be dropped at any time, in which case a resynchronization will always be triggered afterward. Your application must be capable of dealing with these situations.

Strict validation of input against the schema is not recommended because bbmcore reserves the right to pass deprecated, removed, or otherwise undocumented fields in any messages to your application for its own purposes. Your application must not use or examine fields not documented here.

The "Req" field in each table indicates whether a field is required ("Req") or optional ("Opt"). Optional fields can have a default value, which is indicated in italics on a separate line in the same table cell.

Notation

In this document, the term "iff" is used as a shorthand for "if and only if".

BlackBerry Spark Communications Services Documentation

This documentation only covers the API constructs supported by BlackBerry Spark Communications Services.

Representing regId Values

Your users are represented within BlackBerry Spark Communications Services by an identity. These identities represent users within the BlackBerry Infrastructure only. Each identity's primary identifier is called a regId. Your application can associate your existing user accounts or social networks with these identities using the regId.

For historical reasons, some API messages represent regId values as JSON numbers instead of strings. Your application might need to convert between these two representations when using BBMDS. If necessary, you can presume that regId numeric values are always greater than zero and will fit in a 64-bit signed integer. Whenever possible, it is best to represent regId values as a string. When new regId fields are introduced, they will use strings.

Versions

Version information in the 'since' fields in various schema objects is a rough human-readable indicator of when that object was added to the protocol. The versioning is really informational only and isn't part of the protocol's semantics.

Protocol versions are expressed as strings of the form "Rn" where n is a positive integer. These release version codes correspond to the values in the BlackBerry Spark Communications Services Developer Guide release notes.

URIs

This section describes the URIs used in this protocol. All URIs used by Spark are case-sensitive and have a lower-case prefix identifying the entity type.

Format Description Generated By
bbmpim://user/id/value A locally identified "user" record, known to the device. These URIs are usable by BBMDS-Core wherever a "user" URI is specified. bbmcore

All Messages

authToken

NameauthToken
Since2016.03
DirectionOutgoing

Your application uses this message to provide bbmcore with an updated authToken value. See the 'authTokenState' global for more information on when to use this message.

This message also will trigger setup when it has not yet been started within bbmcore and bbmcore is waiting for the initial (or subsequent) authToken value. See the documentation for the 'setupState' 'NotRequested' enumeration for more information on how setup proceeds after being started by 'authToken'.

Attributes:
NameTypeReqSinceLogDescription
authTokenstringReq2016.03No

The token that can be used by the BlackBerry Infrastructure to authenticate and authorize use of the BlackBerry Infrastructure to the identified user. This value will be passed transparently through the BlackBerry Infrastructure.

userIdstringReq2016.03No

The user's id within the ecosystem. This value will be passed transparently through the BlackBerry Infrastructure. This value must not change after it has been passed to bbmcore. Passing a different value will cause bbmcore to forget all information associated with the current Spark Communications identity by deleting all data and stopping.

Examples:
[
    {
        "authToken": {
            "authToken": "WW91J3JlIHRob3JvdWdoIQ==",
            "userId": "BlackBerryUser"
        }
    },
    {
        "authToken": {
            "authToken": "    why?   ",
            "userId": "\u0000Very\nstrange\t user #id"
        }
    }
]

chatEvent

NamechatEvent
SinceR7
DirectionIncoming

This message is sent to your application by bbmcore when a chat event is received for a chat in which the local user is a current participant. See 'chatEventSend' for more information about chat events.

Attributes:
NameTypeReqSinceLogDescription
chatIdchat keyReqR7Yes

The id of the chat in which the chat event was received.

dataobjectOptR7Yes

This field contains opaque data managed by your application that was received with the chat event. Bbmcore does not examine or modify this JSON object.

This can contain a single JSON object, or it can not exist at all. It cannot contain any other JSON type.

flagsstringOpt
R7Yes

Compact read-only flags about the chat event. Each flag that is 'true' has its corresponding letter present in the string. Each flag that is 'false' has its corresponding letter omitted from the string. The letters will always be provided in alphabetical order.

Flag NameLetterSinceDescription
unverifiedU R7 The event's signature was not verified as being from the claimed sender. Despite this, the content of the event is made available to be processed or ignored as your application sees fit.
senderUriuser keyReqR7Yes

Holds the user URI of the sender of this chat event. See the URIs section for information on the URI format.

The local user can receive a chat event from one of its other other endpoints, so this can refer to the local user.

tagstringReqR7Yes

Your application-specified tag that indicates what kind of chat event has been received.

Examples:
[
    {
        "chatEvent": {
            "chatId": "2824",
            "flags": "",
            "senderUri": "bbmpim://user/id/12",
            "tag": "Heartbeat"
        }
    },
    {
        "chatEvent": {
            "chatId": "7",
            "data": {
                "Location": {
                    "lat": 0,
                    "long": 0,
                    "place": "Home"
                }
            },
            "flags": "U",
            "senderUri": "bbmpim://user/id/0",
            "tag": "Location"
        }
    }
]

chatEventSend

NamechatEventSend
SinceR7
DirectionOutgoing

With this request, your application asks bbmcore to send a chat event to all participants of an existing chat. The chat event will not be stored persistently in the chat mailbox for later delivery and will be sent only to the endpoints of chat participants that are currently connected to the BlackBerry Infrastructure. Chat events are either sent immediately or they fail immediately, and they do not interact with the flow or queue of other outgoing messages within a chat. Endpoints that are not connected when this message is sent will never receive a copy of this message. There is no mechanism to tell if a chat event is delivered to any or all chat participants.

These properties make chat events cheaper in terms of storage and network usage than messages sent with 'chatMessageSend'.

The local user's other connected endpoints can and will receive their own identity's chat events. This endpoint will never receive its own chat events.

This mechanism is useful in cases where applications want to send frequent, timely information to all participants that has no value other than in the moment. For example, an application might want to send live location information from one or more participants to all other participants.

Attributes:
NameTypeReqSinceLogDescription
chatIdchat keyReqR7Yes

The id of the chat in which the chat event is to be posted.

dataobjectOptR7Yes

This field contains opaque data managed by your application that is sent with the chat event. Bbmcore does not examine or modify this JSON object.

This can contain a single JSON object, or it can not exist at all. It cannot contain any other JSON type.

The total size of the 'data' object (encoded as JSON in UTF-8) must not exceed 71680 bytes (70 KB).

tagstringReqR7Yes

Your application-specified tag that indicates what kind of chat event is being sent.

Examples:
[
    {
        "chatEventSend": {
            "chatId": "2824",
            "tag": "Heartbeat"
        }
    },
    {
        "chatEventSend": {
            "chatId": "7",
            "data": {
                "Location": {
                    "lat": 0,
                    "long": 0,
                    "place": "Home"
                }
            },
            "tag": "Location"
        }
    }
]

chatHide

NamechatHide
SinceR4
DirectionOutgoing

Your application sends this message to bbmcore to mark a chat as hidden. bbmcore will automatically un-hide the chat the next time a message is added to its history.

For a chat that can never become unhidden (such as some chats in the 'Defunct' state), bbmcore will treat a 'chatHide' action as if it were 'chatLeave' to ensure the chat does not linger, forever invisible to the user.

Attributes:
NameTypeReqSinceLogDescription
chatIdsarrayReqR4Yes

An array of ids of the chats that are to be hidden.

The following table describes the type of each array element.

TypeReqSinceLogDescription
chat keyReqR4Yes

The id of a chat that is to be hidden.

Examples:
[
    {
        "chatHide": {
            "chatIds": [
                "6"
            ]
        }
    },
    {
        "chatHide": {
            "chatIds": [
                "2824",
                "12"
            ]
        }
    }
]

chatInvite

NamechatInvite
SinceR3
DirectionOutgoing

Send this message to bbmcore to invite one or more participants to an existing chat or resend existing chat invitations to invitees that have not yet joined.

Attributes:
NameTypeReqSinceLogDescription
chatIdstringReqR3Yes

The id of the existing chat to invite the invitees to.

inviteesarrayReqR3Yes

The list of invitees to invite to the chat. If any of the specified invitees are already in the process of being invited by this endpoint, invitations are reissued to them (and only them).

Specify an empty list to reissue all of this endpoint's unfulfilled invitations for the chat. When 'chatInvite' is sent for a 1:1 chat, the invitees list must be empty (since the only viable action for a 1:1 chat is to reissue an unfulfilled invitation).

The following table describes the type of each array element.

TypeReqSinceLogDescription
objectReqR3No

Each invitee may be identified by a user URI or regId. Entries without one of these identifiers will be ignored.

NameTypeReqSinceLogDescription
regIdnumber (int64)OptR3Yes

The regId of a Spark Communications user to invite to the chat. This will create a new user if the regId isn't already known to bbmcore.

Ignored iff 'userUri' is specified.

userUriuser keyOptR3Yes

The URI of an existing user to invite to the chat. When present, the 'regId' is ignored.

Examples:
[
    {
        "chatInvite": {
            "chatId": "7",
            "invitees": [
                {
                    "userUri": "bbmpim://user/id/4736"
                }
            ]
        }
    },
    {
        "chatInvite": {
            "chatId": "2347",
            "invitees": [
                {
                    "userUri": "bbmpim://user/id/4736"
                },
                {
                    "regId": 2783476
                }
            ]
        }
    },
    {
        "chatInvite": {
            "chatId": "887",
            "invitees": [
                {
                    "pin": "abcd1234",
                    "regId": 123456789
                },
                {
                    "displayName": "Sue Smith",
                    "pin": "11111111",
                    "regId": 5583673
                },
                {
                    "userUri": "bbmpim://user/id/4736"
                }
            ]
        }
    },
    {
        "chatInvite": {
            "chatId": "1",
            "invitees": []
        }
    }
]

chatJoined

NamechatJoined
SinceR11
DirectionIncoming

This message is sent to your application by bbmcore when this endpoint finishes joining a chat started by another identity.

The chat is already in the 'chat' list (so any 'listAdd' for the chat has already been sent), but when the chat was added to that list, it was not yet in 'state' 'Ready'. When 'chatJoined' is sent, the chat has moved to 'state' 'Ready' and your application will start to receive 'listAdd' events for 'chatMessage' elements as messages arrive in the chat. Note that no 'listAdd' event occurs for a 'chatMessage' restored or received while a chat is in 'state' 'Restore'.

No 'chatJoined' message is sent for chats that the local user created themselves on this or another endpoint or when a chat is discovered during reconciliation, including initial reconciliation after setting up a new endpoint.

As an example of how to react to this event, your application could raise a user notification for each recently received unread 'chatMessage' in a joined one-to-one chat. Or, your application could raise a user notification that advertises the existence of a newly joined chat in general.

Attributes:
NameTypeReqSinceLogDescription
chatIdchat keyReqR11Yes

The id of the chat that this endpoint has finished joining.

Examples:
[
    {
        "chatJoined": {
            "chatId": "2824"
        }
    }
]

chatKey

NamechatKey
SinceR3
DirectionIncoming

Sent by bbmcore in response to a 'chatKeyExport' request.

This message will not be sent by bbmcore if your application uses the BlackBerry Key Management Service.

Attributes:
NameTypeReqSinceLogDescription
cookiestringReqR3Yes

The cookie used to track this response to its 'chatKeyExport' request.

keystringReqR3No

The unpadded base64url-encoded chat key.

mailboxIdstringReqR3Yes

The mailboxId of the chat key for use in external storage.

Examples:
[
    {
        "chatKey": {
            "cookie": "823gudb3d2qwe",
            "key": "Y2hhdEtleTEyMw",
            "mailboxId": "123"
        }
    }
]

chatKeyExport

NamechatKeyExport
SinceR3
DirectionOutgoing

Request that bbmcore return the locally stored chat key for a chat. Iff the 'chatId' exists, this will trigger a 'chatKey' response.

To avoid event loops, your application must only react with 'chatKeyExport' to changes of the chat's 'keyState' to 'Export'. Your application must not react to updates from bbmcore that indicate the chat's 'keyState' is 'Export' when the chat's 'keyState' was already known to your application to be 'Export'. In other words, your application must not export keys unless the chat's 'keyState' is actually changing or being learned for the first time. By following this rule, failed exports will not result in tight event loops and will allow retries (at a minimum on application restart, but also whenever bbmcore decides to toggle the state).

The chat's 'keyState' is not updated in response to this message, and thus must be set to 'Synced' via a 'requestListChange' once the key is successfully stored externally.

This message will be ignored by bbmcore if your application uses the BlackBerry Key Management Service.

Attributes:
NameTypeReqSinceLogDescription
chatIdchat keyReqR3Yes

The id of the chat to get the key for.

cookiestringReqR3Yes

The cookie used to track this request to a 'chatKey' response.

Examples:
[
    {
        "chatKeyExport": {
            "chatId": "123",
            "cookie": "823gudb3d2qwe"
        }
    }
]

chatKeysImport

NamechatKeysImport
SinceR3
DirectionOutgoing

Request that bbmcore set one or more chat keys.

Your application should try to include keys for as many chats as possible in a single 'chatKeysImport' request (within BBMDS message size limits) for greater efficiency.

If no chat with a given 'mailboxId' exists, or the chat is not waiting for a key, the request is ignored.

If a chat's key is imported successfully, the chat's 'keyState' will be updated to 'Synced', and if the chat's 'state' was 'Waiting' (for the key) it will be updated to 'Ready'. If the import fails, the chat's 'keyState' and 'state' will remain unchanged.

To avoid event loops, your application must only react with 'chatKeysImport' to changes of a chat's 'keyState' to 'Import'. Your application must not react to updates from bbmcore that indicate the 'keyState' is 'Import' when the 'keyState' was already known to your application to be 'Import'. When your application first learns of a chat (such as after starting up) and its 'keyState' is 'Import', your application should consider that a change and can react to it with 'chatKeysImport'. In other words, your application must not import keys unless the 'keyState' is actually changing or being learned for the first time. By following this rule, failed imports will not result in tight event loops and will allow retries (at a minimum on application restart, but also whenever bbmcore decides to toggle the state).

This message will be ignored by bbmcore if your application uses the BlackBerry Key Management Service.

Attributes:
NameTypeReqSinceLogDescription
keysarrayReqR3Yes

The list of chat keys to set.

The following table describes the type of each array element.

TypeReqSinceLogDescription
objectReqR3Yes

The key for the chat.

NameTypeReqSinceLogDescription
keystringReqR3No

The unpadded base64url-encoded chat key.

mailboxIdstringReqR3Yes

The mailboxId of the chat key for use in external storage.

Examples:
[
    {
        "chatKeysImport": {
            "keys": [
                {
                    "key": "Y2hhdEtleW1ieDEyMw==",
                    "mailboxId": "mbx123"
                },
                {
                    "key": "Y2hhdEtleW1ieDMyMQ==",
                    "mailboxId": "mbx321"
                }
            ]
        }
    }
]

chatKeysImportFailure

NamechatKeysImportFailure
SinceR4
DirectionIncoming

Indicates that one or more chat keys received in 'chatKeysImport' failed to import.

This message will not be sent by bbmcore if your application uses the BlackBerry Key Management Service.

Attributes:
NameTypeReqSinceLogDescription
mailboxIdsarrayReqR4Yes

The list of mailboxIds that failed to import.

The following table describes the type of each array element.

TypeReqSinceLogDescription
stringReqR4Yes

The mailboxId that failed to import.

Examples:
[
    {
        "chatKeysImportFailure": {
            "mailboxIds": [
                "mbx1",
                "mbx3"
            ]
        }
    }
]

chatLeave

NamechatLeave
SinceR4
DirectionOutgoing

This will first hide the chat (see 'chatHide'), and then begin the process of leaving the chat, eventually resulting in bbmcore deleting all local data related to the chat, notifying the other participants of our departure, and removal of the chat from the 'chat' list. A chat that is being left will not gain any additional incoming or outgoing messages.

Attributes:
NameTypeReqSinceLogDescription
chatIdsarrayReqR4Yes

An array of ids of the chats that are to be left.

The following table describes the type of each array element.

TypeReqSinceLogDescription
chat keyReqR4Yes

The id of a chat that is to be left.

Examples:
[
    {
        "chatLeave": {
            "chatIds": [
                "6"
            ]
        }
    },
    {
        "chatLeave": {
            "chatIds": [
                "2824",
                "12"
            ]
        }
    }
]

chatMessageDelete

NamechatMessageDelete
SinceR4
DirectionOutgoing

Your application sends this message to bbmcore to request that a chat message be deleted for all the endpoints of the user's identity. Any content or foreign keys for the deleted message are removed. Both incoming and outgoing messages may be deleted. If a message that matches the given chatId and message id is found, bbmcore will respond with an update for the message.

Attributes:
NameTypeReqSinceLogDescription
chatIdchat keyReqR4Yes

The identifier of the chat containing the message to be deleted.

idstring (uint64)ReqR4Yes

The unique identifier for the message to be deleted within the provided chat.

Examples:
[
    {
        "chatMessageDelete": {
            "chatId": "64",
            "id": "256789"
        }
    }
]

chatMessageDestroy

NamechatMessageDestroy
SinceR6
DirectionOutgoing

Request that one or many 'chatMessage' entries previously sent by the local user's identity be recalled and destroyed from:

An outgoing message can be destroyed regardless of its delivery state, except that requests to destroy a 'chatMessage' in 'state' 'Failed' will be ignored.

The 'chatMessage' 'recall' state will be updated to reflect the state of the process on the sender endpoint and all recipients' endpoints. There is no guarantee that the recipients have not read the message prior to it being destroyed.

Attributes:
NameTypeReqSinceLogDescription
chatIdchat keyReqR6Yes

The id of the chat containing the message to be recalled and destroyed.

messageIdchatMessage keyOptR6Yes

When present, this is the id of an individual 'chatMessage' that is to be recalled and destroyed within the indicated chat. Only "content" messages can be identified with a 'messageId'. Thus, 'chatMessage' entries with 'tag' values such as 'Admin', 'Gap', 'Join', 'Leave', 'Remove', 'Shred', and 'Subject' cannot be destroyed by indiciating their individual 'messageId'.

When not present, all 'chatMessage' entries that have been previously sent by the local user's identity will be recalled and destroyed. Plus, all non-"content" messages (including control messages with the 'tag' values listed above) that have been sent by the local user's identity within the indicated chat will be destroyed from the BlackBerry Infrastructure. Thus, endpoints that have not yet received those control messages shall never receive them or make them available to your application.

Examples:
[
    {
        "chatMessageDestroy": {
            "chatId": "765",
            "messageId": "256789"
        }
    }
]

chatMessageDetach

NamechatMessageDetach
Since2017.02
DirectionOutgoing

Request that bbmcore remove the 'file' and/or 'thumb' attachments locally for a single 'chatMessage'. This message does not change the 'chatMessage' for any other endpoints or identities.

Attributes:
NameTypeReqSinceLogDescription
chatIdchat keyReq2017.02Yes

The identifier of the chat containing the 'chatMessage'.

detachFilebooleanOpt
False
2017.02Yes

Iff present and true, any 'file' attachment will be deleted from the 'chatMessage' iff the 'fileState' of that message is 'Done'. If the 'fileState' is anything else, no 'file' detachment is performed.

After detachment, the 'file' field will no longer be present on the 'chatMessage', and the 'fileState' will be set to 'Available'. Thus, in the case of a completed download or upload, the file attachment can be subsequently downloaded by issuing 'chatMessageFileDownload'.

The primary reason to detach an upload is to free storage space for old completed uploads that used a 'filePolicy' of 'Move'.

The 'chatMessage' 'tag' does not matter and will not change.

detachThumbbooleanOpt
False
2017.02Yes

Iff present and true, any 'thumb' attachment will be deleted from the 'chatMessage'. The 'thumb' field will no longer be present on the 'chatMessage'.

The 'chatMessage' 'tag' does not matter and will not change.

messageIdstring (uint64)Req2017.02Yes

The identifier of the 'chatMessage' within the chat identified by 'chatId'.

Examples:
[
    {
        "chatMessageDetach": {
            "chatId": "64",
            "detachFile": false,
            "detachThumb": true,
            "messageId": "6510"
        }
    },
    {
        "chatMessageDetach": {
            "chatId": "64",
            "detachFile": true,
            "detachThumb": false,
            "messageId": "1541"
        }
    },
    {
        "chatMessageDetach": {
            "chatId": "64",
            "detachFile": true,
            "detachThumb": true,
            "messageId": "6581"
        }
    }
]

chatMessageFileDownload

NamechatMessageFileDownload
Since2017.02
DirectionOutgoing

Request that bbmcore start downloading a file attachment for a single 'chatMessage'.

Attributes:
NameTypeReqSinceLogDescription
chatIdchat keyReq2017.02Yes

The identifier of the chat containing the 'chatMessage'.

messageIdstring (uint64)Req2017.02Yes

The identifier of the 'chatMessage' within the chat identified by 'chatId'.

This 'chatMessage' must have a 'fileState' of either 'Available' or 'FailedAvailable' or this request will be ignored by bbmcore.

The 'chatMessage' 'tag' does not matter.

Examples:
[
    {
        "chatMessageFileDownload": {
            "chatId": "64",
            "messageId": "6510"
        }
    }
]

chatMessageRead

NamechatMessageRead
SinceR4
DirectionOutgoing

Your application sends this message to bbmcore to notify it that incoming messages have been read by the local user. All unread incoming messages in the chat with a 'messageId' less than or equal to that of the specified 'messageId' will be marked as read.

Note that when a chat's 'numUnread' field is zero, then 'chatMessageRead' will have no effect on that chat because that means the chat has no unread incoming messages.

Attributes:
NameTypeReqSinceLogDescription
chatIdchat keyReqR4Yes

The id of the chat containing the message referred to by 'messageId'.

messageIdchatMessage keyReqR4Yes

The largest 'messageId' (within the chat referred to by 'chatId') of the messages that are to be marked as read by the local user.

Examples:
[
    {
        "chatMessageRead": {
            "chatId": "2824",
            "messageId": "786"
        }
    }
]

chatMessageRefRemove

NamechatMessageRefRemove
SinceR8
DirectionOutgoing

Request that bbmcore remove the 'ref' with the given 'tag' locally for a single 'chatMessage'. This message does not change the 'chatMessage' for any other endpoints or identities.

Attributes:
NameTypeReqSinceLogDescription
chatIdchat keyReqR8Yes

The identifier of the chat containing the 'chatMessage'.

messageIdstring (uint64)ReqR8Yes

The identifier of the 'chatMessage' within the chat identified by 'chatId'.

tagstringReqR8Yes

The 'ref' 'tag' to be removed. If there is a matching 'refBy' on another 'chatMessage', it will also be updated. List updates will result for affected messages, if any.

Examples:
[
    {
        "chatMessageRefRemove": {
            "chatId": "64",
            "messageId": "6510",
            "tag": "Edit"
        }
    }
]

chatMessageSend

NamechatMessageSend
Since2017.02
DirectionOutgoing

Send a new message within an existing chat. This will result in a 'listAdd' on the 'listChatMessage' list, and the message will be sent to the BlackBerry Infrastructure and forwarded to the other endpoints that are participating in the chat.

Sending a new message within a 1:1 chat before the invited party has joined can trigger the invitation to be reissued when other conditions are also met. This mechanism achieves a partially automatic user-speed retry of 1:1 chat invitations. There is no automatic mechanism for non-1:1 chats, but invitations for all types of chats can be reissued upon request via 'chatInvite'.

Attributes:
NameTypeReqSinceLogDescription
chatIdchat keyReq2017.02Yes

The identifier of the chat in which to send the message.

contentstringOpt2017.02No

Holds the text content of the message, when the 'tag' has such a concept; otherwise omitted.

The total size of the 'content' in UTF-8 is subject to a cumulative size limit when combined with the size of the 'data' object (encoded as JSON in UTF-8) and the size of the 'thumb' attachment. These three fields combined must not exceed 71680 bytes (70 KB).

dataobjectOpt2017.02Yes

This field contains opaque data managed by your application that is sent with the message. Unless specifically noted, bbmcore does not examine or modify this JSON object.

This can contain a single JSON object, or it can not exist at all. It cannot contain any other JSON type.

Many 'tag' values have a corresponding object defined as a child of the 'data' object with a key equal to the 'tag'. All 'tags' with such a corresponding child of 'data' require that child to be present. Other tags have no such requirement.

The 'data' object can also contain other key-value pairs independently from the 'tag'.

The total size of the 'data' object (encoded as JSON in UTF-8) is subject to a cumulative size limit when combined with the size of the 'thumb' attachment and the 'content' (also in UTF-8). These three fields combined must not exceed 71680 bytes (70 KB).

NameTypeReqSinceLogDescription
forwardedbooleanOptR11Yes

Iff present and true, then this message is considered a forwarded message. It can be present for any 'tag' and is independent from other fields in 'data'. A forwarded message is a message that was obtained from one chat and sent in another chat.

filestringOpt2017.02No

A path to a large file that is not carried in the message. This file is uploaded by bbmcore automatically.

A maximum file size limit of 128 MB is imposed by bbmcore. If your application attempts to attach a file that exceeds this limit, the 'message' will be added to the chat in the 'Failed' state. The size limit may change in future versions. Receiving clients that encounter files that are larger than their maximums will not download them.

Attachments from R5 or later endpoints preserve a locally-cleaned version of any suggested attachment filename that the sender provided by including it as the leaf filename of this path. Attachments that did not have a suggested filename will use an implementation-defined locally-assigned sequential or random filename.

filePolicystringOpt2017.02Yes

This enumeration tells bbmcore what to do with the file referenced by 'file'. For all other documentation, please see 'thumbPolicy'.

This field is an enumeration.

MemberDescription
CopySee 'thumbPolicy'.
DeleteSee 'thumbPolicy'.
MoveSee 'thumbPolicy'.
isControlbooleanOpt
False
R9Yes

Set the 'control' flag ('C') on the 'chatMessage'. See the 'chatMessage' 'flags' field for details.

neverCountUnreadbooleanOpt
False
R9Yes

Set the 'neverCountUnread' flag ('N') on the 'chatMessage'. See the 'chatMessage' 'flags' field for details.

refarrayOptR5Yes

A 'chatMessage' can reference other messages or be referenced by other messages.

All references are directional and known to both messages involved. If message A references message B, then A has an entry in its 'ref' array with the 'messageId' of B, and B has an entry in its 'refBy' array that counts the reference from A.

Each reference in the 'ref' array has an application-specified 'tag' that indicates what kind of reference it is. A single message can only have one 'ref' for each tag string. Your application uses 'tag' strings to allow multiple different kinds of references between messages. For example, a message could both 'Quote' one message and 'Edit' another.

Each reference in the 'refBy' array has the same application-specified tag. A single message can have multiple references to it with the same 'tag'. To find all messages that refer to a given message, use 'requestListMatching' with the 'tag' and the 'messageId' of the referred-to message. Because the number of incoming references to a message can be large, only the most recent referring message is identified by 'newestRef' in 'refBy', along with a count of the total number of referring messages.

When there are no references to any other messages, the 'ref' field is omitted.

The following table describes the type of each array element.

TypeReqSinceLogDescription
objectReqR5Yes

Each element of the 'ref' array represents a single reference to another 'chatMessage'.

NameTypeReqSinceLogDescription
messageIdchatMessage keyReqR5Yes

The messageId being referenced. If this contains the id of an element that does not currently exist in the 'chatMessage' list, then this 'ref' element will be ignored.

tagstringReqR5Yes

Your application-specified tag that indicates what kind of reference it is. A single 'chatMessage' can only have one 'ref' for each tag string. If a tag string appears more than once, subsequent instances are ignored.

This field is an enumeration.

MemberDescription
Edit

This message edits the referenced message.

If you allow edits from the original sender only, your application should not send a message with an 'Edit' ref to another sender's message and must also check received references as described in the documentation of the 'Edit' tag for 'chatMessage' 'ref' and 'refBy'.

An 'Edit' can not itself be edited. Instead, send a new message with an 'Edit' 'ref' to the original message that is to be edited.

QuoteThis message quotes the referenced message.
ThreadThis message belongs to a thread that has the referenced message as its parent.
tagstringReq2017.02Yes

Indicates the type of message. Your application may include any arbitrary value in the 'tag' field that is meaningful to it, with one exception: bbmcore will ignore any 'chatMessageSend' from your application that uses one of the reserved tags: 'Join', 'Leave', 'Subject', 'Gap', 'Shred', 'Clear', 'Admin', or 'Remove'.

This field is an enumeration.

MemberDescription
TextThe message contains plain text content. This tag requires 'content'
thumbstringOpt2017.02No

A path to a small file that is carried in the message.

The thumb file may contain no more than 56320 bytes (55 KB).

The total size of the thumb file is subject to a cumulative size limit when combined with the size of the 'data' object (encoded as JSON in UTF-8) and the size of the 'content' (in UTF-8). These three fields combined must not exceed 71680 bytes (70 KB).

Attachments from R5 or later endpoints preserve a locally-cleaned version of any suggested attachment filename that the sender provided by including it as the leaf filename of this path. Attachments that did not have a suggested filename will use an implementation-defined locally-assigned sequential or random filename.

thumbPolicystringOpt2017.02Yes

This enumeration tells bbmcore what to do with the file referenced by 'thumb'. If not provided a default of Copy is used. Note that in the case of Delete and Move, bbmcore _will_ _not_ delete the source file if the request was invalid to the point of being indecipherable, or if bbmcore lacks permissions to delete the file (including when the source file is open and the OS doesn't permit open files to be deleted).

This field is an enumeration.

MemberDescription
CopyLeave the source file unmodified (and don't delete it). Your application retains ownership of the file. The path in a resulting chatMessage record will refer to the original source file.
DeleteDelete the source file when bbmcore no longer requires it in order to complete the operation. The path in a resulting chatMessage record will point to the moved file (which is owned by bbmcore and will be deleted).
MoveMove the source file to an internal location and retain it for the life of the associated chatMessage entry. The path in a resulting chatMessage record will point to the moved file (which is owned by bbmcore).
Examples:
[
    {
        "chatMessageSend": {
            "chatId": "436",
            "content": "Hello, folks. This is a test.",
            "isControl": false,
            "neverCountUnread": false,
            "tag": "Text"
        }
    },
    {
        "chatMessageSend": {
            "chatId": "436",
            "content": "Cats are funny!",
            "data": {
                "File": {
                    "contentType": "suggestedFilename",
                    "suggestedFilename": "funny_cat.jpg"
                },
                "priority": "None"
            },
            "file": "/picture/funny_cat.jpg",
            "filePolicy": "Delete",
            "isControl": false,
            "neverCountUnread": false,
            "tag": "File",
            "thumb": "/picture/funny_cat_small.jpg",
            "thumbPolicy": "Delete"
        }
    },
    {
        "chatMessageSend": {
            "chatId": "3",
            "content": "Follow me on Glympse: www.glympse.com",
            "data": {
                "Glympse": {
                    "id": "123234232"
                },
                "priority": "None"
            },
            "isControl": false,
            "neverCountUnread": false,
            "tag": "Glympse"
        }
    },
    {
        "chatMessageSend": {
            "chatId": "4",
            "content": "Follow me on Glympse: www.glympse.com",
            "data": {
                "GlympseRequest": {
                    "duration": 300
                },
                "priority": "None"
            },
            "isControl": false,
            "neverCountUnread": false,
            "tag": "GlympseRequest"
        }
    },
    {
        "chatMessageSend": {
            "chatId": "5",
            "content": "The answer is 2.",
            "data": {
                "Quote": {
                    "source": "John Doe",
                    "text": "What is 1+1?",
                    "timestamp": 562737600
                },
                "priority": "None"
            },
            "isControl": false,
            "neverCountUnread": false,
            "tag": "Quote"
        }
    },
    {
        "chatMessageSend": {
            "chatId": "6",
            "content": "Me too!",
            "data": {
                "ReferencedUpdate": {
                    "type": "PersonalMessage",
                    "update": "Looking forward to this weekend."
                },
                "priority": "None"
            },
            "isControl": false,
            "neverCountUnread": false,
            "tag": "ReferencedUpdate"
        }
    },
    {
        "chatMessageSend": {
            "chatId": "7",
            "isControl": false,
            "neverCountUnread": false,
            "tag": "Screencap"
        }
    },
    {
        "chatMessageSend": {
            "chatId": "8",
            "content": "Important Message",
            "data": {
                "priority": "High"
            },
            "isControl": false,
            "neverCountUnread": false,
            "ref": [
                {
                    "messageId": "634",
                    "tag": "Quote"
                },
                {
                    "messageId": "6",
                    "tag": "Thread"
                }
            ],
            "tag": "Text"
        }
    },
    {
        "chatMessageSend": {
            "chatId": "9",
            "content": "My Location",
            "data": {
                "Location": {
                    "altitude": "3",
                    "city": "Halifax",
                    "country": "Canada",
                    "horizontalAccuracy": "90",
                    "latitude": "44.64692",
                    "longitude": "-63.57822",
                    "name": "Halifax, NS, Canada",
                    "postalCode": "",
                    "state": "NS",
                    "street": ""
                },
                "priority": "None"
            },
            "isControl": false,
            "neverCountUnread": false,
            "tag": "Location"
        }
    },
    {
        "chatMessageSend": {
            "chatId": "1000",
            "content": "Let's discuss this with the others.",
            "data": {
                "MediaConf": {
                    "requireAuth": true,
                    "url": "https://conf.bbm.bbmenterprise.com/join?appId=example"
                },
                "priority": "None"
            },
            "isControl": false,
            "neverCountUnread": false,
            "tag": "MediaConf"
        }
    },
    {
        "chatMessageSend": {
            "chatId": "10",
            "data": {
                "Call": {
                    "callType": "Video",
                    "duration": 326,
                    "eventType": "Ended"
                },
                "priority": "None"
            },
            "isControl": false,
            "neverCountUnread": false,
            "tag": "Call"
        }
    },
    {
        "chatMessageSend": {
            "chatId": "11",
            "content": "https://www.blackberry.com/us/en/products/blackberry-spark-platform",
            "data": {
                "Link": {
                    "descr": "BlackBerry Spark is the only Enterprise of Things (EoT) platform designed and built for ultra-secure hyperconnectivity from the kernel to the edge.",
                    "image": "https://rimblogs.files.wordpress.com/2017/06/business-man-secure.png",
                    "name": "BlackBerry Spark",
                    "title": "BlackBerry Spark: The EoT Platform for Ultra-secure Hyperconnectivity",
                    "url": "https://www.blackberry.com/us/en/products/blackberry-spark-platform"
                },
                "priority": "None"
            },
            "isControl": false,
            "neverCountUnread": false,
            "tag": "Link"
        }
    },
    {
        "chatMessageSend": {
            "chatId": "11",
            "content": "@John Doe, can you please respond to the request from @Jane Doe.",
            "data": {
                "mentions": {
                    "users": [
                        {
                            "len": 9,
                            "pos": 0,
                            "regId": "1602329767"
                        },
                        {
                            "len": 9,
                            "pos": 55,
                            "regId": "1404567733"
                        }
                    ]
                },
                "priority": "None"
            },
            "isControl": false,
            "neverCountUnread": false,
            "tag": "Text"
        }
    }
]

chatMessageState

NamechatMessageState
SinceR4
DirectionIncoming

bbmcore sends this message in response to a 'chatMessageStateGet' request.

Attributes:
NameTypeReqSinceLogDescription
cookiestringOptR4Yes

An opaque value that is echoed back to your application if it was specified in the request.

statesarrayReqR4Yes

The list of per-recipient message delivery states. This will be empty if the message does not exist or if no detailed delivery state is known for the message.

The following table describes the type of each array element.

TypeReqSinceLogDescription
objectOptR4No

The individual delivery state for the message for a single recipient.

NameTypeReqSinceLogDescription
statestringReqR4Yes

The delivery state of the message for the individual recipient.

This field is an enumeration.

MemberDescription
DeliveredThe message has been delivered.
ReadThe message has been read.
userUristringReqR4Yes

The URI of the recipient.

Examples:
[
    {
        "chatMessageState": {
            "cookie": "asdgjh2095hga984598hg",
            "states": []
        }
    },
    {
        "chatMessageState": {
            "cookie": "asdgjh2095hga984598hg",
            "states": [
                {
                    "state": "Read",
                    "userUri": "bbmpim://user/id/23576"
                }
            ]
        }
    },
    {
        "chatMessageState": {
            "states": [
                {
                    "state": "Delivered",
                    "userUri": "bbmpim://user/id/5"
                },
                {
                    "state": "Read",
                    "userUri": "bbmpim://user/id/6"
                }
            ]
        }
    }
]

chatMessageStateGet

NamechatMessageStateGet
SinceR4
DirectionOutgoing

Your application sends this request to ask for the per-recipient message delivery state details for a particular message in a chat. If bbmcore accepts the request, it will respond with a 'chatMessageState' response.

Attributes:
NameTypeReqSinceLogDescription
chatIdchat keyReqR4Yes

The id of the chat containing the message referred to by 'messageId'.

cookiestringOptR4Yes

An opaque value supplied by your application that will be echoed back in the response.

messageIdchatMessage keyReqR4Yes

The id of the message (within the chat referred to by 'chatId') for which information is to be returned.

Examples:
[
    {
        "chatMessageStateGet": {
            "chatId": "12",
            "messageId": "256789"
        }
    },
    {
        "chatMessageStateGet": {
            "chatId": "234754",
            "cookie": "slggjq3240987g0987",
            "messageId": "8"
        }
    }
]

chatParticipantTimes

NamechatParticipantTimes
SinceR5
DirectionIncoming

bbmcore sends this message in response to a 'chatParticipantTimesGet' request.

Attributes:
NameTypeReqSinceLogDescription
cookiestringOptR5Yes

An opaque value that is echoed back to your application if it was specified in the request.

timesarrayReqR5Yes

The list of per-participant message delivery times. This will be empty if the specified chat or participant does not exist.

The following table describes the type of each array element.

TypeReqSinceLogDescription
objectOptR5No

The individual delivery times for a single participant.

NameTypeReqSinceLogDescription
deliverednumber (uint64)OptR5Yes

The timestamp, in seconds since the POSIX epoch, of the most recent message delivery confirmation automatically sent by this participant in this chat. If omitted, no such timestamp is known for this participant.

readnumber (uint64)OptR5Yes

The timestamp, in seconds since the POSIX epoch, of the most recent message read confirmation that this participant has sent in this chat. If omitted, no such timestamp is known for this participant.

userUristringReqR5Yes

The URI of the participant.

Examples:
[
    {
        "chatParticipantTimes": {
            "cookie": "asdgjh2095hga984598hg",
            "times": []
        }
    },
    {
        "chatParticipantTimes": {
            "cookie": "asdgjh2095hga984598hg",
            "times": [
                {
                    "delivered": 12345,
                    "userUri": "bbmpim://user/id/23576"
                }
            ]
        }
    },
    {
        "chatParticipantTimes": {
            "times": [
                {
                    "delivered": 12345,
                    "read": 12346,
                    "userUri": "bbmpim://user/id/5"
                },
                {
                    "read": 7124,
                    "userUri": "bbmpim://user/id/6"
                },
                {
                    "userUri": "bbmpim://user/id/7"
                }
            ]
        }
    }
]

chatParticipantTimesGet

NamechatParticipantTimesGet
SinceR5
DirectionOutgoing

Your application sends this request to ask for the message delivery time details for a particular participant in a chat. If bbmcore accepts the request, it will respond with a 'chatParticipantTimes' response.

Attributes:
NameTypeReqSinceLogDescription
chatIdchat keyReqR5Yes

The id of the chat whose participants are being queried.

cookiestringOptR5Yes

An opaque value supplied by your application that will be echoed back in the response.

userUriuser keyOptR5Yes

Iff present, then only the information for the one participant with this 'user' URI will be returned. Otherwise, information about all of the chat's participants will be returned.

Examples:
[
    {
        "chatParticipantTimesGet": {
            "chatId": "12"
        }
    },
    {
        "chatParticipantTimesGet": {
            "chatId": "234754",
            "cookie": "slggjq3240987g0987",
            "userUri": "bbmpim://user/id/123"
        }
    }
]

chatStart

NamechatStart
Since2017.02
DirectionOutgoing

This message requests that a new chat be started. When successful, a 'listAdd' will be emitted for the new 'chat' element. Otherwise, bbmcore will respond with a 'chatStartFailed' message.

If 'isOneToOne' is true and a 1:1 chat already exists for the invitee, bbmcore will respond with a 'chatStartFailed' with a reason of 'AlreadyExists' and the 'chatId' of that existing chat.

Attributes:
NameTypeReqSinceLogDescription
cookiestringReq2017.02Yes

An opaque string generated by your application that will be included in the resulting 'listAdd' or 'chatStartFailed' message.

dataobjectOptR6No

This field contains opaque data managed by your application.

This data can be read or written by any participant. Concurrent writes are resolved in a way that all participants will eventually see the same steady-state outcome.

This field is suitable for shared chat metadata that changes infrequently such a chat avatar URL, the identifiers of external resources associated with the chat, or a per-chat setting shared by all participants. Data that changes frequently should be sent to all participants via the 'data' field of 'chatMessage' instead.

The the 'data', encoded as JSON in UTF-8, must not exceed 71680 bytes (70 KB).

invitePolicystringOpt
ParticipantsOnly
R4Yes

The policy that controls who may invite participants to the chat. This only applies when the 'isOneToOne' field is absent or false.

This field is an enumeration.

MemberDescription
AdminsOnlyOnly chat admins may invite participants to the chat.
ParticipantsOnlyOnly chat participants may invite participants to the chat.
inviteesarrayReq2017.02Yes

Holds the list of invitees to invite to the chat. When 'isOneToOne' is true, this list must contain exactly one entry. Otherwise, it may contain zero or more entries.

The following table describes the type of each array element.

TypeReqSinceLogDescription
objectReq2017.02No

Each invitee may be identified by a user URI or regId. Entries without one of these identifiers will be ignored.

NameTypeReqSinceLogDescription
regIdnumber (int64)Opt2017.02Yes

The regId of a Spark Communications user to invite to the chat. This will create a new user if the regId isn't already known to bbmcore.

Ignored iff 'userUri' is specified.

userUriuser keyOpt2017.02Yes

The URI of an existing user to invite to the chat. When present, the 'regId' is ignored.

isOneToOnebooleanOpt
False
R3Yes

When true, the chat is the singular 1:1 chat between the local user and the other party. bbmcore ensures that only one such non-Defunct chat per remote party will exist at a time. Otherwise, the chat is a multi-party chat, even if there are fewer than two remote parties.

localDataobjectOptR6No

This field contains opaque local-only data that is associated with this chat and managed by your application. This data is stored locally on this endpoint only.

privateDataobjectOptR7No

This field contains opaque data managed by your application.

This data can be read or written only by endpoints belonging to the local user's identity. Concurrent writes are resolved in a way that all endpoints will eventually see the same steady-state outcome.

This field is suitable for chat metadata that changes infrequently and is private to the local user's identity but needs to be known by all the local user's endpoints.

The 'privateData', encoded as JSON in UTF-8, must not exceed 71680 bytes (70 KB).

subjectstringOpt
2017.02No

The subject of the chat. This field has a maximum size of 128 code points. When omitted, this defaults to the empty string.

Examples:
[
    {
        "chatStart": {
            "cookie": "chocolate",
            "invitePolicy": "ParticipantsOnly",
            "invitees": [
                {
                    "userUri": "bbmpim://user/id/3646"
                }
            ],
            "isOneToOne": true,
            "subject": "New 1:1 chat"
        }
    },
    {
        "chatStart": {
            "cookie": "vanilla",
            "invitePolicy": "ParticipantsOnly",
            "invitees": [],
            "isOneToOne": false,
            "subject": ""
        }
    },
    {
        "chatStart": {
            "cookie": "wafer-thin",
            "data": {
                "appContextId": "miZPa8ef1Xj5Vl7YmSyYVxKdbJDBIMNK",
                "avatar": "https://avatar.server/8GWl2rOF"
            },
            "invitePolicy": "AdminsOnly",
            "invitees": [
                {
                    "userUri": "bbmpim://user/id/4573"
                },
                {
                    "chatKeyRolling": true,
                    "displayName": "Cookie Monster",
                    "regId": 10004723564
                }
            ],
            "isOneToOne": false,
            "localData": {
                "someData": "someValue"
            },
            "privateData": {
                "chatNickname": "Friends from Work",
                "notificationPriority": "High",
                "pinned": false
            },
            "subject": "New conference"
        }
    }
]

chatStartFailed

NamechatStartFailed
Since2017.02
DirectionIncoming

Sent by bbmcore when a 'chatStart' request has failed.

Attributes:
NameTypeReqSinceLogDescription
chatIdchat keyOptR6Yes

This is present iff the 'reason' is 'AlreadyExists'. This is the id of the existing 1:1 chat.

cookiestringReq2017.02Yes

The opaque value supplied by your application when issuing the 'chatStart' request that has failed.

reasonstringReq2017.02Yes

The reason that the 'chatStart' request failed.

This field is an enumeration.

MemberDescription
AlreadyExistsThe specified 1:1 chat already exists. The 'chatId' will be present and will contain the id of the existing chat.
NoneNo reason was specified.
Examples:
[
    {
        "chatStartFailed": {
            "cookie": "chocolate",
            "reason": "None"
        }
    },
    {
        "chatStartFailed": {
            "chatId": "12",
            "cookie": "vanilla",
            "reason": "AlreadyExists"
        }
    }
]

chatTyping

NamechatTyping
SinceR4
DirectionOutgoing

Your application sends this to bbmcore when it considers the user to have started typing in a chat. This event will be relayed in real-time to other participants of the chat.

Received typing events are reported to receivers via the 'typing' list. On the receiving endpoints, the typing state of a user automatically decays back to "not typing" after a short delay or when a message from them is added to the chat's history. There is no need for your application to inform bbmcore when a user stops typing.

In certain conditions, bbmcore may not actually transmit the typing notification to the other participants of the chat. These conditions include when there are no previous messages in the chat (on the local endpoint) or when the previous messages in the chat are older than five minutes. Filtering the events in this way helps optimize message transmission for cases where it is very unlikely that the other participants are expected to read a typing indicator on their endpoints.

It is recommended that your application wait a short delay after the commencement of typing before issuing this request. Short messages can often be typed in a few seconds, and it is often better to simply send the message itself instead of a typing notification followed by the message in very short succession.

Attributes:
NameTypeReqSinceLogDescription
chatIdchat keyReqR4Yes

The id of the chat in which the local user is typing.

messageIdchatMessage keyOptR6Yes

If supplied, this is the id of the 'chatMessage' the local user is taking the action against as indicated by the 'tag' field. This field is ignored when the 'tag' isn't present or when the messageId isn't known to bbmcore.

tagstringOptR6Yes

Your application-specified tag that indicates what kind of typing action the local user is performing. For example, this may be used to indicate that the local user is taking a picture to send, recording a voice note, or editing an existing message. When omitted, receivers will assume the local user is typing a message.

Examples:
[
    {
        "chatTyping": {
            "chatId": "2824"
        }
    },
    {
        "chatTyping": {
            "chatId": "7",
            "tag": "VoiceNote"
        }
    },
    {
        "chatTyping": {
            "chatId": "88",
            "messageId": "375",
            "tag": "Edit"
        }
    }
]

endpointDeregister

NameendpointDeregister
SinceR4
DirectionOutgoing

Requests that bbmcore de-register endpoint(s). This will forward the de-register request to the BlackBerry Infrastructure, and result in an 'endpointDeregisterResult' with the given cookie from bbmcore.

De-registering an endpoint will revoke its registration on the BlackBerry Infrastructure and remove it from the Spark Communications identity's list of registered endpoints. If currently connected to the BlackBerry Infrastructure, it will be disconnected as soon as possible and wiped.

Attributes:
NameTypeReqSinceLogDescription
cookiestringReqR4Yes

An opaque value to be included in the associated 'endpointDeregisterResult'.

endpointIdstringOptR4Yes

The identifier of the endpoint to de-register, or to keep if the 'keep' flag is true. When no endpointId is provided all endpoints will be de-registered, including the one issuing the de-register request. The current list of endpoints can be obtained using the 'endpointsGet' request.

keepbooleanOptR11Yes

Flag indicating if the endpointId provided should be kept, and all other endpoints de-registered.

Examples:
[
    {
        "endpointDeregister": {
            "cookie": "cookie1",
            "endpointId": "13124523943944079cdc729adeff25a2A4gD2diIgj5Jd3SG6HFfda"
        }
    },
    {
        "endpointDeregister": {
            "cookie": "cookie2",
            "endpointId": "13124523943944079cdc729adeff25a2A4gD2diIgj5Jd3SG6HFfda",
            "keep": true
        }
    },
    {
        "endpointDeregister": {
            "cookie": "cookie3"
        }
    }
]

endpointDeregisterResult

NameendpointDeregisterResult
SinceR4
DirectionIncoming

The result of an 'endpointDeregister' request.

Attributes:
NameTypeReqSinceLogDescription
cookiestringReqR4Yes

The opaque value supplied in the 'endpointDeregister' this result is associated to.

resultstringReqR4Yes

The result of the update.

This field is an enumeration.

MemberDescription
FailureThe de-registration could not be completed, and may be retried later.
SuccessThe de-registration has completed successfully.
Examples:
[
    {
        "endpointDeregisterResult": {
            "cookie": "chocolate",
            "result": "Success"
        }
    },
    {
        "endpointDeregisterResult": {
            "cookie": "chocolate",
            "result": "Failure"
        }
    }
]

endpointDeregistered

NameendpointDeregistered
SinceR6
DirectionIncoming

The local endpoint is no longer registered with the BlackBerry Infrastructure.

bbmcore will wipe and stop in order to forget all information associated with the endpoint, including its user identity. One notable exception is the 'endpointId', will normally will not change.

Your application must delete all information associated with the previous Spark Communications identity. To go through setup again, your application should collect fresh identity credentials from the user and use fresh tokens.

Attributes:
Examples:
[
    {
        "endpointDeregistered": {}
    }
]

endpointUpdate

NameendpointUpdate
SinceR4
DirectionOutgoing

Requests that bbmcore update the identified endpoint's registration details. This will result in an 'endpointUpdateResult' with the given cookie from bbmcore.

This message should be called for the local endpointId before registering (when the 'setupState' is 'NotRequested'i) to set the potentially new endpoint's description on the BlackBerry Infrastructure.

Attributes:
NameTypeReqSinceLogDescription
cookiestringReqR4Yes

An opaque value to be included in the associated 'endpointUpdateResult'.

descriptionstringReqR4No

The human-readable description of the device/OS the endpoint is installed on. This should never be empty. This will be truncated to at most 2000 Unicode Code Points.

endpointIdstringOptR4Yes

The identifier of the endpoint to update obtained from an 'endpoints' response. If omitted, the local endpointId is used.

nicknamestringReqR4No

The name assigned to the endpoint by the end-user; empty if none assigned. This will be truncated to at most 2000 Unicode Code Points.

Examples:
[
    {
        "endpointUpdate": {
            "cookie": "chocolate",
            "description": "Apple iPhone 8s (iOS v10.1)",
            "endpointId": "13124523943944079cdc729adeff25a2A4gD2diIgj5Jd3SG6HFfda",
            "isLegacyDelegate": true,
            "nickname": ""
        }
    },
    {
        "endpointUpdate": {
            "cookie": "chocolate",
            "description": "Gumshoe OS",
            "isLegacyDelegate": false,
            "nickname": "S.M.A.R.T. Watch"
        }
    }
]

endpointUpdateResult

NameendpointUpdateResult
SinceR4
DirectionIncoming

The result of an 'endpointUpdate' request.

Attributes:
NameTypeReqSinceLogDescription
cookiestringReqR4Yes

The opaque value supplied in the 'endpointUpdate' this result is associated to.

resultstringReqR4Yes

The result of the update.

This field is an enumeration.

MemberDescription
FailureThe update could not be applied, and may be retried later.
SuccessThe update has been applied successfully.
Examples:
[
    {
        "endpointUpdateResult": {
            "cookie": "chocolate",
            "result": "Success"
        }
    },
    {
        "endpointUpdateResult": {
            "cookie": "chocolate",
            "result": "Failure"
        }
    }
]

endpoints

Nameendpoints
SinceR4
DirectionIncoming

The response to the 'endpointsGet' message. All registered endpoints are included in the 'registeredEndpoints' array.

Attributes:
NameTypeReqSinceLogDescription
cookiestringReqR4Yes

The opaque value supplied in the 'endpointsGet' this result is associated to.

maxEndpointsnumber (uint64)OptR4Yes

The maximum number of persistent endpoints that can be registered for this identity. This field will always be present when the 'result' is 'Success'.

registeredEndpointsarrayOptR4Yes

The Spark Communications identity's registered endpoints. This field will always be present when the 'result' is 'Success'.

The following table describes the type of each array element.

TypeReqSinceLogDescription
objectReqR4Yes

A single endpoint.

NameTypeReqSinceLogDescription
descriptionstringReqR4No

The human-readable description of the device/OS the endpoint is installed on. This may be initially set by your application when the endpoint is registered during setup, and may be updated via the 'endpointUpdate' request.

endpointIdstringReqR4Yes

The endpoint's identifier for use in 'endpointUpdate' or 'endpointDeregister'. This must be treated as an opaque value by applications with no meaning outside these specific BBMDS messages.

isCurrentbooleanOpt
False
R4Yes

When present and true, this endpoint is the one that issued the 'endpointsGet' request that resulted in this 'endpoints' response.

isEphemeralbooleanOpt
False
R4Yes

When present and true, this endpoint is an ephemeral endpoint without local data storage. When omitted or false, this endpoint is a persistent endpoint with local data storage. Persistent and ephemeral endpoints have different registration requirements and have separate maximums enforced by the BlackBerry Infrastructure.

nicknamestringReqR4No

The name assigned to the endpoint by the end-user; empty if none assigned. This may be initially set by your application when the endpoint is registered during setup, and may be updated via the 'endpointUpdate' request.

resultstringReqR4Yes

The result of the request.

This field is an enumeration.

MemberDescription
FailureThe request could not be completed, and may be retried later.
SuccessThe Spark Communications identity's registered endpoints have been retrieved successfully and are present in the 'registeredEndpoints' array.
Examples:
[
    {
        "endpoints": {
            "cookie": "chocolate",
            "result": "Failure"
        }
    },
    {
        "endpoints": {
            "cookie": "chocolate",
            "maxEndpoints": 3,
            "registeredEndpoints": [
                {
                    "description": "BlackBerry KEYone",
                    "endpointId": "13124523943944079cdc729adeff25a2A4gD2diIgj5Jd3SG6HFfda",
                    "isCurrent": false,
                    "isEphemeral": false,
                    "isLegacyDelegate": false,
                    "nickname": "Work Phone"
                },
                {
                    "description": "Debian GNU/Linux 9.0",
                    "endpointId": "53484523943944079cdc729adeff25a2A4gD2diIgj5Jd3Sfsdlij3",
                    "isCurrent": false,
                    "isEphemeral": false,
                    "isLegacyDelegate": true,
                    "nickname": "Work PC"
                },
                {
                    "description": "NVIDIA Shield K1",
                    "endpointId": "fjdsrlgj458944079cdc729adeff25a2A4gD2diIgj5Jd3f35HF569",
                    "isCurrent": false,
                    "isEphemeral": false,
                    "isLegacyDelegate": false,
                    "nickname": "Personal Tablet"
                }
            ],
            "result": "Success"
        }
    }
]

endpointsGet

NameendpointsGet
SinceR4
DirectionOutgoing

Requests that bbmcore retrieve all of the Spark Communications identity's registered endpoints and reply with an 'endpoints' message.

Endpoints are individual application installations associated to the same Spark Communications identity. Such an identity can have zero or more endpoints, with a maximum enforced by the BlackBerry Infrastructure.

Attributes:
NameTypeReqSinceLogDescription
cookiestringReqR4Yes

An opaque value to be returned in the associated 'endpoints' response.

Examples:
[
    {
        "endpointsGet": {
            "cookie": "13124523-9439-4407-9cdc-729adeff25a2"
        }
    }
]

identities

Nameidentities
SinceR6
DirectionIncoming

The response to the 'identitiesGet' message.

Attributes:
NameTypeReqSinceLogDescription
cookiestringReqR6Yes

The opaque value supplied in the 'identitiesGet' message this result is associated to.

infoarrayOptR6Yes

The set of identity information found. Each identifier in the request that corresponds to a known identity will have an entry in this array. Each identifier in the request that does not correspond to a known identity will be omitted from this array.

The following table describes the type of each array element.

TypeReqSinceLogDescription
objectReqR6Yes

The information for a found identity.

NameTypeReqSinceLogDescription
appUserIdstringReqR6Yes

Your application user id for this identity, in the same form as the 'authToken' 'userId' field.

regIdstring (int64)ReqR6Yes

The Spark Communications regId for this identity.

resultstringReqR6Yes

The result of the request.

This field is an enumeration.

MemberDescription
FailureThe request could not be completed and may be retried later.
SuccessThe lookup was successful.
Examples:
[
    {
        "identities": {
            "cookie": "arrowroot",
            "result": "Failure"
        }
    },
    {
        "identities": {
            "cookie": "arrowroot",
            "identities": [
                {
                    "appUserId": "23jr95yrr03oe",
                    "regId": "4855746228"
                },
                {
                    "appUserId": "2kfjj5g45kfk4",
                    "regId": "1000002393"
                },
                {
                    "appUserId": "1",
                    "regId": "1"
                }
            ],
            "result": "Success"
        }
    }
]

identitiesGet

NameidentitiesGet
SinceR6
DirectionOutgoing

Requests that the given list of identities, either application user ids or Spark Communications regIds, be resolved to find the associated identity information, and returned via an 'identities' message.

Identities for which identity information cannot be found are omitted from the results.

Overlapping 'identitiesGet' requests are issued in parallel. Issuing too many parallel requests at once can exceed system limits and cause those requests to fail.

Attributes:
NameTypeReqSinceLogDescription
appUserIdsarrayOptR6Yes

A list of application user ids to lookup. Either this or 'regIds' must be specified.

The following table describes the type of each array element.

TypeReqSinceLogDescription
stringReqR6Yes

Your application user id for this identity, in the same form as the 'authToken' 'userId' field.

cookiestringReqR6Yes

An opaque value to be returned in the associated 'identities' response.

regIdsarrayOptR6Yes

A list of Spark Communications regIds to lookup. Either this or 'appUserIds' must be specified.

A maximum of 50 identities can be present in one request. If more identities are present, 'identities' will return a 'Failure'.

The following table describes the type of each array element.

TypeReqSinceLogDescription
string (int64)ReqR6Yes

A Spark Communications regId for this identity.

Examples:
[
    {
        "identitiesGet": {
            "appUserIds": [
                "21389hfdhf983",
                "rhabawe434g3"
            ],
            "cookie": "13124523-9439-4407-9cdc-729adeff25a2"
        }
    },
    {
        "identitiesGet": {
            "cookie": "13124523-9439-4407-9cdc-729adeff25a2",
            "regIds": [
                "1872374576594",
                "95303948244"
            ]
        }
    }
]

listAdd

NamelistAdd
Since2.0
DirectionIncoming

Bbmcore may send this message at any time to insert new elements into a list.

This message contains full element states. All attributes marked as required are also required by this message. Optional attributes are set to their default values if not present.

Either the list attribute must be specified or both the type/id attributes must be specified.

Attributes:
NameTypeReqSinceLogDescription
cookiestringOpt2.1Yes

Holds an optional cookie that was previously generated by your application and included in an outgoing request. This attribute should be omitted for add events that were not specifically requested by your application. Your application must gracefully handle unknown cookies and the case where a cookie it passed to bbmcore is never echoed back. Each outgoing message that includes a cookie will document the circumstances in which bbmcore will echo that cookie back to your application and in which lists.

elementsarrayOpt2.0Yes

Holds the list elements. Includes a full state of the element. Elements must include all attributes marked as required in the schema. Any optionl attributes will be set to default values. See the documentation for this list type for the element schema. If the 'elements' attribute is omitted, it is treated equivalent to the empty set and this message becomes a no-op.

The following table describes the type of each array element.

TypeReqSinceLogDescription
objectOpt2.0No

Holds the full state of the items to add to the list.

typestringOpt2.1Yes

Determines which list the elements belong to. This must be a list type defined elsewhere in the protocol.

Examples:
[
    {
        "listAdd": {
            "elements": [
                {
                    "chatId": "8475",
                    "content": "Hello world!",
                    "flags": "I",
                    "messageId": "793873",
                    "recall": "None",
                    "senderUri": "bbmpim://user/id/29",
                    "state": "Delivered",
                    "stateIsPartial": false,
                    "tag": "Text",
                    "timestamp": 30987309874
                },
                {
                    "chatId": "5",
                    "flags": "I",
                    "messageId": "93874",
                    "recall": "None",
                    "senderUri": "bbmpim://user/id/29",
                    "state": "Delivered",
                    "stateIsPartial": false,
                    "tag": "Join",
                    "timestamp": 30987309921
                }
            ],
            "type": "chatMessage"
        }
    }
]

listAll

NamelistAll
Since2.1
DirectionIncoming

Replaces the contents of a list. At its option, bbmcore may send this message at any time to replace the entire list contents or to clear the contents of the list. This is also sent in response to a 'requestListAll' message.

'listAll' does not directly contain the new element set. It is a marker indicating that it will be followed by a group of 'listChunk' messages. The last chunk in the group will contain the attribute 'last' set to true. Bbmcore may send any number of chunks and any of the chunks may be empty. This message never appears on its own. It is always followed by a sequence of 'listChunk' messages and it is always contiguous with those 'listChunk' messages.

Attributes:
NameTypeReqSinceLogDescription
typestringReq2.1Yes

Determines which list the elements belong to. This must be a list type defined elsewhere in the protocol.

Examples:
[
    {
        "listAll": {
            "type": "chat"
        }
    }
]

listChange

NamelistChange
Since2.1
DirectionIncoming

Changes attributes of one or more elements in the list. This does not insert or remove elements. At its option, bbmcore may send this message at any time to change existing elements of a list. The elements may appear in any order. The only required attributes are the primary keys of the elements. All other attributes that are normally required are optional. If omitted, the attributes retain their existing values. If specified, the attributes are modified.

Attributes:
NameTypeReqSinceLogDescription
cookiestringOpt2.1Yes

Holds an optional cookie that was previously generated by your application and included in an outgoing request. This attribute should be omitted for add events that were not specifically requested by your application. Your application must gracefully handle unknown cookies and the case where a cookie it passed to bbmcore is never echoed back. Each outgoing message that includes a cookie will document the circumstances in which bbmcore will echo that cookie back to your application and in which lists.

elementsarrayOpt2.0Yes

Holds the list elements. Includes the primary key of the element, along with any attributes that have changed. Elements may include any subset of attributes listed in the element schema that includes the primary key(s), regardless of whether those attributes are marked as required. Any omitted attributes will remain unchanged. See the documentation for this list type for the element schema. If the 'elements' attribute is omitted, it is treated equivalent to the empty set and this message becomes a no-op.

The following table describes the type of each array element.

TypeReqSinceLogDescription
objectOpt2.0No

Holds a subset of attributes for elements in the list.

typestringOpt2.1Yes

Determines which list the elements belong to. This must be a list type defined elsewhere in the protocol.

Examples:
[
    {
        "listChange": {
            "elements": [
                {
                    "chatId": "793873",
                    "state": "Ready"
                }
            ],
            "type": "chat"
        }
    }
]

listChunk

NamelistChunk
Since2.1
DirectionIncoming

Used to send a subset of list elements to your application. One or more 'listChunk' messages will follow a 'listAll' or 'listElements' message. The leading message and the set of 'listChunk' messages that follow it are considered a single logical message. 'listChunk' messages contain full states for the set of elements that go with the trigger message. That is, all attributes marked as required in the element schema must also be present in the 'listChunk' message. All attributes marked as optional but not present in the 'listChunk' element must be considered to be unset or have their default value, as documented in the list's definition.

When your application receives the leading message, it starts gathering elements from subsequent 'listChunk' messages until it receives a 'listChunk' with the 'last' attribute present and true. At that point, all the messages are processed together. A header message and its 'listChunk' messages must be contiguous.

Attributes:
NameTypeReqSinceLogDescription
elementsarrayReq2.1Yes

Holds the list elements. Includes a full state of the element. Elements must include all attributes marked as required in the schema. Any optional attributes will be set to default values. See the documentation for this list type for the element schema. If the elements set is empty, this clears the elements referred to in the trigger message.

The following table describes the type of each array element.

TypeReqSinceLogDescription
objectOpt2.1No

Holds the full state of the items in the list.

lastbooleanOpt
False
2.1Yes

Determines if this is the last chunk in the sequence. The sequence of 'listChunk' messages is not processed until your application recieves the last chunk.

typestringReq2.1Yes

Determines which list the elements belong to. This must be a list type defined elsewhere in the protocol.

Examples:
[
    {
        "listChunk": {
            "elements": [],
            "last": false,
            "type": "chat"
        }
    },
    {
        "listChunk": {
            "elements": [
                {
                    "chatId": "38267",
                    "flags": "O",
                    "keyState": "Export",
                    "lastActivity": 1098730987,
                    "lastMessage": 15,
                    "localData": {},
                    "mailboxId": "mbx123",
                    "numMessages": 10,
                    "restorePoint": 0,
                    "state": "Ready",
                    "subject": "All your base"
                },
                {
                    "chatId": "6",
                    "expiry": 3600,
                    "flags": "AP",
                    "invitePolicy": "AdminsOnly",
                    "keyState": "Synced",
                    "lastActivity": 10987300000,
                    "lastMessage": 10293873870,
                    "localData": {
                        "someData": "someValue"
                    },
                    "mailboxId": "",
                    "numMessages": 1000,
                    "restorePoint": 500,
                    "state": "Waiting",
                    "subject": "Are belong to us"
                }
            ],
            "last": true,
            "type": "chat"
        }
    }
]

listElements

NamelistElements
Since2.1
DirectionIncoming

Replaces individual elements in a list. At its option, bbmcore may send this message at any time to replace individual elements in the list. This is also sent in response to a 'requestListElements' message. This message differs from 'listChange' in that it contains full states for the elements being changed rather than a delta, and that the element data follows in a sequence of 'listChunk' messages rather than being embedded within the 'listElements' message

'listElements' does not directly contain the new element set. It is a marker indicating that it will be followed by a group of 'listChunk' messages. The last chunk in the group will contain the attribute 'last' set to true. Bbmcore may send any number of chunks and any of the chunks may be empty. This message never appears on its own. It is always followed by a sequence of 'listChunk' messages and it is always contiguous with those 'listChunk' messages.

The order of the elements may be defined by the outgoing message that triggered this response. In the absence of any ordering contract on the outgoing message, the order of the elements in the result is undefined.

Attributes:
NameTypeReqSinceLogDescription
cookiestringOpt2.1Yes

Holds an optional cookie that was previously generated by your application and included in a request. The presence of this field indicates that the elements in the response match exactly the elements included in the requestListElements. If an element is not present, it indicates that the key was unknown to daemon.

typestringReq2.1Yes

Determines the namespace for the ID attribute and the schema for the list elements. For the set of valid list types, see the doc/lists subdirectory.

Examples:
[
    {
        "listElements": {
            "cookie": "23SJFSDF3",
            "type": "chat"
        }
    }
]

listRemove

NamelistRemove
Since2.0
DirectionIncoming

Bbmcore may send this message at any time to remove elements from the list. The elements in 'listRemove' only contain the primary key. No other attributes may be present, even if they are documented as required in the element schema.

Attributes:
NameTypeReqSinceLogDescription
cookiestringOpt2.1Yes

Holds an optional cookie that was previously generated by your application and included in an outgoing request. This attribute should be omitted for remove events that were not specifically requested by your application. Your application must gracefully handle unknown cookies and the case where a cookie it passed to bbmcore is never echoed back. Each outgoing message that includes a cookie will document the circumstances in which bbmcore will echo that cookie back to your application and in which lists.

elementsarrayOpt2.0Yes

Holds the primary keys of the list elements. See the documentation for this list type for the element schema. If the 'elements' attribute is omitted, it is treated equivalent to the empty set and this message becomes a no-op.

The following table describes the type of each array element.

TypeReqSinceLogDescription
objectOpt2.0No

Holds the removed elements with only their primary key attribute(s) present.

typestringOpt2.1Yes

Determines which list the elements belong to. This must be a list type defined elsewhere in the protocol.

Examples:
[
    {
        "listRemove": {
            "cookie": "23SJFSDF3",
            "elements": [
                {
                    "chatId": "1"
                },
                {
                    "chatId": "2"
                }
            ],
            "type": "chat"
        }
    }
]

listResync

NamelistResync
Since2017.02
DirectionIncoming

Indicates that elements of the list that match the given criteria have potentially changed or been removed. bbmcore may send this message at any time it determines that it is more efficient for your application to query the state of elements of interest, rather than emitting events for all the changes in the list's content. listResync does not contain an element set.

Lists do not support this message by default, and those that support requestListAll never support listResync. If the list supports this message, its documentation will indicate which attributes may be used as part of the criteria block. If the list supports multiple criteria attributes then they may be present in any combination. If more than one attribute is present then all the listed attributes must match.

Attributes:
NameTypeReqSinceLogDescription
criteriaobjectReq2017.02Yes

Specifies a list of criteria key/value pairs. Each key is documented in the 'listResync' rules for the specific list in question. Empty criteria are allowed.

typestringReq2017.02Yes

Determines which list the elements belong to. This must be a list type defined elsewhere in the protocol.

Examples:
[
    {
        "listResync": {
            "criteria": {},
            "type": "chatMessage"
        }
    },
    {
        "listResync": {
            "criteria": {
                "chatId": "5"
            },
            "type": "chatMessage"
        }
    }
]

participantDemote

NameparticipantDemote
SinceR4
DirectionOutgoing

Demote the given participant to no longer be an admin of the specified chat. The change will be reflected locally immediately via a change to the participant, and a request will be initiated to the BlackBerry Infrastructure to effect the demotion. Once complete, a 'chatMessage' will be posted to the chat indicating that the local user has demoted the participant.

This request is ignored if:

Attributes:
NameTypeReqSinceLogDescription
chatIdchat keyReqR4Yes

The id of the chat the demotion will occur within.

userUriuser keyReqR4Yes

The user URI of the participant to be demoted.

Examples:
[
    {
        "participantDemote": {
            "chatId": "2347",
            "userUri": "bbmpim://user/id/5483"
        }
    }
]

participantPromote

NameparticipantPromote
SinceR4
DirectionOutgoing

Promote the given participant to be an admin of the specified chat. The change will be reflected locally immediately via a change to the participant, and a request will be initiated to the BlackBerry Infrastructure to effect the promotion. Once complete, a 'chatMessage' will be posted to the chat indicating that the local user has promoted the participant.

This request is ignored if:

Attributes:
NameTypeReqSinceLogDescription
chatIdchat keyReqR4Yes

The id of the chat the promotion will occur within.

userUriuser keyReqR4Yes

The user URI of the participant to be promoted.

Examples:
[
    {
        "participantPromote": {
            "chatId": "2347",
            "userUri": "bbmpim://user/id/5483"
        }
    }
]

participantRemove

NameparticipantRemove
SinceR4
DirectionOutgoing

Remove the given participant from the specified chat. The change will be reflected locally immediately via a change to the participant, and a request will be initiated to the BlackBerry Infrastructure to effect the removal. Once complete, a 'chatMessage' will be posted to the chat indicating that the local user has removed the participant.

This request is ignored if:

Removing a participant does not remove any messages they have posted in the chat.

Attributes:
NameTypeReqSinceLogDescription
chatIdchat keyReqR4Yes

The id of the chat the removal will occur within.

userUriuser keyReqR4Yes

The user URI of the participant to be removed.

Examples:
[
    {
        "participantRemove": {
            "chatId": "2347",
            "userUri": "bbmpim://user/id/5483"
        }
    }
]

pinResult

NamepinResult
Since2015.06
DirectionIncoming

Returns the result of a requestPin message.

Attributes:
NameTypeReqSinceLogDescription
cookiestringReq2015.06Yes

An opaque value that is echoed back to your application if it was specified in the request.

pinsarrayOpt2015.12No

The list of regId to PIN mappings. This should only be expected and examined when the 'result' is 'Success'.

The following table describes the type of each array element.

TypeReqSinceLogDescription
objectOpt2015.12No

An individual regId to PIN mapping.

NameTypeReqSinceLogDescription
pinstringReq2015.12No

The PIN associated to the regId.

regIdnumber (int64)Req2015.12No

The regId of the user.

resultstringReq2015.06Yes

The result of the request.

This field is an enumeration.

MemberDescription
FailureThe request failed.
SuccessThe request was successful, inspect the pin field for the result.
Examples:
[
    {
        "pinResult": {
            "cookie": "123456ABCDEF",
            "pins": [],
            "result": "Success"
        }
    },
    {
        "pinResult": {
            "cookie": "123456ABCDEF",
            "pins": [
                {
                    "pin": "12345678",
                    "regId": 1
                }
            ],
            "result": "Success"
        }
    },
    {
        "pinResult": {
            "cookie": "123456ABCDEF",
            "pins": [
                {
                    "pin": "12345678",
                    "regId": 1
                },
                {
                    "pin": "DEADBEEF",
                    "regId": 2
                },
                {
                    "pin": "5F735EE2",
                    "regId": 3
                }
            ],
            "result": "Success"
        }
    },
    {
        "pinResult": {
            "cookie": "123456ABCDEF",
            "pins": [],
            "result": "Failure"
        }
    },
    {
        "pinResult": {
            "cookie": "123456ABCDEF",
            "result": "Failure"
        }
    }
]

profileKeys

NameprofileKeys
SinceR3
DirectionIncoming

Sent by bbmcore in response to a 'profileKeysExport' request.

This message will not be sent by bbmcore if your application uses the BlackBerry Key Management Service.

Attributes:
NameTypeReqSinceLogDescription
privateKeysobjectReqR3Yes

The private signing and encryption keys.

NameTypeReqSinceLogDescription
encryptionstringReqR3No

The unpadded base64url-encoded private encryption key.

signingstringReqR3No

The unpadded base64url-encoded private signing key.

publicKeysobjectReqR3Yes

The public signing and encryption keys.

NameTypeReqSinceLogDescription
encryptionstringReqR3No

The unpadded base64url-encoded public encryption key.

signingstringReqR3No

The unpadded base64url-encoded public signing key.

Examples:
[
    {
        "profileKeys": {
            "privateKeys": {
                "encryption": "ZW5jcnlwdGlvblByaXZhdGVLZXk",
                "signing": "c2lnbmluZ1ByaXZhdGVLZXk"
            },
            "publicKeys": {
                "encryption": "ZW5jcnlwdGlvblB1YmxpY0tleQ",
                "signing": "c2lnbmluZ1B1YmxpY0tleQ"
            }
        }
    }
]

profileKeysExport

NameprofileKeysExport
SinceR3
DirectionOutgoing

Request that bbmcore return the identity keys that are being used by the local user. This will trigger a 'profileKeys' response.

To avoid event loops, your application must only react with 'profileKeysExport' (or 'profileKeysImport') to changes of the 'profileKeysState' to 'NotSynced'. Your application must not react to updates from bbmcore that indicate the 'profileKeysState' is 'NotSynced' when the 'profileKeysState' was already known to your application to be 'NotSynced'. In other words, your application must not export keys unless the 'profileKeysState' is actually changing or being learned for the first time. By following this rule, failed exports will not result in tight event loops and will allow retries (at a minimum on application restart, but also whenever bbmcore decides to toggle the state).

The 'profileKeysState' global is not updated in response to this message, and thus must be set to 'Synced' via a 'requestListChange' once the key is successfully stored externally.

This message will be ignored by bbmcore if your application uses the BlackBerry Key Management Service.

Attributes:
NameTypeReqSinceLogDescription
Examples:
[
    {
        "profileKeysExport": {}
    }
]

profileKeysImport

NameprofileKeysImport
SinceR3
DirectionOutgoing

Request that bbmcore set the profile keys.

If the profile's keys are imported successfully, the 'profileKeysState' global will be updated to 'Synced'. If the import fails, the 'profileKeyState' will remain unchanged.

To avoid event loops, your application must only react with 'profileKeysImport' (or 'profileKeysExport') to changes of the 'profileKeysState' to 'NotSynced'. Your application must not react to updates from bbmcore that indicate the 'profileKeysState' is 'NotSynced' when the 'profileKeysState' was already known to your application to be 'NotSynced'. In other words, your application must not import keys unless the 'profileKeysState' is actually changing or being learned for the first time. By following this rule, failed imports will not result in tight event loops and will allow retries (at a minimum on application restart, but also whenever bbmcore decides to toggle the state).

Regardless of the 'profileKeysState', if your application has external evidence that the user has for some reason newly available or updated keys, your application can use 'profileKeysImport' to provide those keys, subject the event reaction restrictions documented above.

This message will be ignored by bbmcore if your application uses the BlackBerry Key Management Service.

Attributes:
NameTypeReqSinceLogDescription
privateKeysobjectReqR3Yes

The private signing and encryption keys.

NameTypeReqSinceLogDescription
encryptionstringReqR3No

The unpadded base64url-encoded private encryption key.

signingstringReqR3No

The unpadded base64url-encoded private signing key.

publicKeysobjectReqR3Yes

The public signing and encryption keys.

NameTypeReqSinceLogDescription
encryptionstringReqR3No

The unpadded base64url-encoded public encryption key.

signingstringReqR3No

The unpadded base64url-encoded public signing key.

Examples:
[
    {
        "profileKeysImport": {
            "privateKeys": {
                "encryption": "ZW5jcnlwdGlvblByaXZhdGVLZXk",
                "signing": "c2lnbmluZ1ByaXZhdGVLZXk"
            },
            "publicKeys": {
                "encryption": "ZW5jcnlwdGlvblB1YmxpY0tleQ",
                "signing": "c2lnbmluZ1B1YmxpY0tleQ"
            }
        }
    }
]

profileKeysImportFailure

NameprofileKeysImportFailure
SinceR4
DirectionIncoming

Indicates that the profile keys received in 'profileKeysImport' failed to import.

This message will not be sent by bbmcore if your application uses the BlackBerry Key Management Service.

Attributes:
NameTypeReqSinceLogDescription
Examples:
[
    {
        "profileKeysImportFailure": {}
    }
]

pushReceived

NamepushReceived
SinceR10
DirectionOutgoing

Every time your application receives a mobile push (on Android or iOS), it should send a 'pushReceived' message to bbmcore.

Your application does not need to "rate limit" or otherwise filter 'pushReceived' messages.

When your application informs the SDK that it has received a mobile push, the SDK sends this message to bbmcore for you.

Attributes:
NameTypeReqSinceLogDescription
Examples:
[
    {
        "pushReceived": {}
    }
]

requestListAdd

NamerequestListAdd
Since2.0
DirectionOutgoing

Requests that bbmcore insert a new element in the list. Most lists do not support this message by default. Those that do contain a section in their documentation explaining what the message is used for and any restrictions on its use.

The documentation for the list indicates a subset of attributes that may be present in the 'requestListAdd' message. If the attributes in the subset are marked as required in the element schema, then they are also required by the 'requestListAdd' message. If they are optional, then they will be reset to their default value if not present.

Attributes:
NameTypeReqSinceLogDescription
elementsarrayReq2.0Yes

Holds the list elements. Each element must include the primary key. If the list type supports this message the documentation for the list type will describe which additional attributes

The following table describes the type of each array element.

TypeReqSinceLogDescription
objectOpt2.0No

Holds the full state of the items to add to the list.

typestringReq2.1Yes

Determines which list the elements belong to. This must be a list type defined elsewhere in the protocol.

Examples:
[
    {
        "requestListAdd": {
            "elements": [
                {
                    "calories": 400,
                    "eaten": false,
                    "type": "cheese"
                },
                {
                    "calories": 500,
                    "eaten": true,
                    "type": "roast"
                }
            ],
            "type": "sandwich"
        }
    }
]

requestListAll

NamerequestListAll
Since2.1
DirectionOutgoing

Requests that bbmcore returns the canonical version of the list by responding with a listAll message.

Attributes:
NameTypeReqSinceLogDescription
typestringReq2.1Yes

Determines which list the elements belong to. This must be a list type defined elsewhere in the protocol.

Examples:
[
    {
        "requestListAll": {
            "type": "chat"
        }
    }
]

requestListChange

NamerequestListChange
Since2.0
DirectionOutgoing

Requests that bbmcore change attributes of one or more elements in the list. Most lists do not support this message by default. Those that do contain a section in their documentation explaining what the message is used for and any restrictions on its use. This message contains partial element states. The primary key is always required. The documentation for the list will describe a subset of other attributes that may also be present. All non-primary key attributes are optional, even if they are marked as required in the element schema. Elements that are not present remain unchanged and are not reset to default values.

Attributes:
NameTypeReqSinceLogDescription
cookiestringOpt2.1Yes

Holds an optional cookie that was generated by your application and included in this request.

elementsarrayReq2.1Yes

Holds the list elements. Each element includes the primary key, along with a subset of attributes that should be changed. The set of permissible attributes will be described in the list documentation.

The following table describes the type of each array element.

TypeReqSinceLogDescription
objectOpt2.1No

Holds the primary key, along with a subset of other attributes that should be changed.

idstringOpt2.1No

Identifier for the list, unique for a given list type. The exact meaning and format for list ids is determined by the list type. See the documentation in the doc/lists subdirectory for type-specific rules.

typestringReq2.1Yes

Determines which list the elements belong to. This must be a list type defined elsewhere in the protocol.

Examples:
[
    {
        "requestListChange": {
            "cookie": "23SJFSDF3",
            "elements": [
                {
                    "id": "42",
                    "localData": {
                        "associatedResource": "RGF0YSBvZiB0aGUgYXBwJ3MgY2hvb3NpbmcuCg=="
                    }
                }
            ],
            "type": "appMessage"
        }
    }
]

requestListElements

NamerequestListElements
Since2.1
DirectionOutgoing

Requests that bbmcore send back full states of a given set of elements by responding with a listElements message. All lists support this message. The elements in this message only contain primary keys. No other attributes may be present, even if they are marked as required in the element schema.

Attributes:
NameTypeReqSinceLogDescription
cookiestringOpt2.1Yes

Holds an optional cookie that was generated by your application and included in this request. This allows your application to match up request/response. If present, the daemon will respond with a single listElements with a matching cookie whose elements match exactly those in this request, and the sender will be able to rely on the fact that a missing element is unknown to the daemon. If the cookie is omitted then the daemon may, at its option, merge multiple requestListElements into a single response or break a single requestListElements into multiple responses.

elementsarrayReq2.1Yes

Specifies the primary keys for the elements being requested.

The following table describes the type of each array element.

TypeReqSinceLogDescription
objectOpt2.1No

Holds the primary keys of the items to fetch.

typestringReq2.1Yes

Determines which list the elements belong to. This must be a list type defined elsewhere in the protocol.

Examples:
[
    {
        "requestListElements": {
            "cookie": "23SJFSDF3",
            "elements": [
                {
                    "id": 209
                },
                {
                    "id": 210
                }
            ],
            "type": "chat"
        }
    }
]

requestListMatching

NamerequestListMatching
Since3.0
DirectionOutgoing

Requests that bbmcore send back full states of all elements that match the given criteria in a single listElements message with a matching cookie.

Lists do not support this message by default. If the list supports this message, its documentation will indicate which attributes may be used as part of the criteria block. If the list supports multiple criteria attributes then they may be present in any combination. If more than one attribute is present then all the listed attributes must match. The resulting listElements message will contain all elements for which all criteria match.

Attributes:
NameTypeReqSinceLogDescription
cookiestringOpt3.0Yes

Holds a cookie that was generated by your application and included in this request. This allows your application to match up request/response. Bbmcore will respond with a single 'listElements' with a matching 'cookie' whose elements match exactly those in this request, and the sender will be able to rely on the fact that a missing element is unknown to bbmcore.

criteriaobjectReq3.0Yes

Specifies a list of criteria key/value pairs. Each key is documented in the 'requestListMatching' rules for the specific list in question. Iff the list supports 'requestListAll', empty criteria are allowed and will result in all elements of the list being returned (via 'listElements').

typestringReq3.0Yes

Determines which list the elements belong to. This must be a list type defined elsewhere in the protocol.

Examples:
[
    {
        "requestListMatching": {
            "cookie": "cxZVVuD9WM231Sw3",
            "criteria": {
                "regId": "10000"
            },
            "type": "user"
        }
    },
    {
        "requestListMatching": {
            "cookie": "GdVAwVeEjkHayFv611vL6Ovxh",
            "criteria": {
                "chatId": "12",
                "tag": "Remove"
            },
            "type": "chatMessage"
        }
    }
]

requestListRemove

NamerequestListRemove
Since2.0
DirectionOutgoing

Requests that bbmcore remove one or more elements from the list. By default, most lists do not support this message. Those that do contain documentation describing the message and any restrictions on its use. The elements in this message only contain primary keys. No other attributes may be present, even if they are marked as required in the element schema.

Attributes:
NameTypeReqSinceLogDescription
elementsarrayReq2.0Yes

Holds the list elements. Each element only includes the primary key.

The following table describes the type of each array element.

TypeReqSinceLogDescription
objectOpt2.0No

Holds the primary key of the elements to remove.

typestringReq2.1Yes

Determines which list the elements belong to. This must be a list type defined elsewhere in the protocol.

Examples:
[
    {
        "requestListRemove": {
            "elements": [
                {
                    "id": "7"
                },
                {
                    "id": "12"
                }
            ],
            "type": "appMessage"
        }
    }
]

requestPin

NamerequestPin
Since2015.06
DirectionOutgoing

Sent by your application to bbmcore to request the currently registered device PINs for the given regIds. This always triggers a BlackBerry Infrastructure request; bbmcore never considers its local list of users. Your application should first consult the user list to see if bbmcore already knows a PIN for a regId.

The result is returned via a pinResult message.

Attributes:
NameTypeReqSinceLogDescription
cookiestringReq2015.06Yes

An opaque value supplied by your application that will be echoed back in the response.

regIdsarrayReq2015.12No

The list of regIds whose PINs are to be looked up. If a regId is unknown or has no PINs associated with it, it may or may not appear in the results.

The following table describes the type of each array element.

TypeReqSinceLogDescription
number (int64)Req2015.12No

An individual regId.

Examples:
[
    {
        "requestPin": {
            "cookie": "123456ABCDEF",
            "regIds": [
                123456
            ]
        }
    },
    {
        "requestPin": {
            "cookie": "123456ABCDEF",
            "regIds": [
                1,
                2,
                3,
                4,
                5,
                6
            ]
        }
    }
]

retryServerRequests

NameretryServerRequests
Since2017.02
DirectionOutgoing

The purpose of this message is to provide bbmcore with a series of user-driven events to drive its internal retry logic, such as retrying failed BlackBerry Infrastructure requests. Your application must determine the best event(s) to use to drive this logic. In the optimum case, your application will use this message whenever your application goes from being 'not on the screen' to being 'on the screen'. This transition event is considered to be a good representation of the user becoming interested in interacting with Spark Communications Services again, and thus a good event to use as a user-driver retry trigger. However, your application may choose to report only when specific screens transition to be 'on the screen', or tie this trigger to an explicit user action such as a 'Refresh' button.

Your application does not need to "rate limit" or otherwise filter 'retryServerRequests' messages.

Attributes:
NameTypeReqSinceLogDescription
Examples:
[
    {
        "retryServerRequests": {}
    }
]

search

Namesearch
Since2015.06
DirectionOutgoing

Search bbmcore's local data for chat messages and chat subjects. This searches for the following types of results, in priority order. When the maximum number of results have been found, searching stops.

  1. Messages in chats whose 'content' matches the search text.
  2. Chats whose subject matches the search text.

Your application will receive a 'searchResult' in response.

When a 'search' request does not include the 'chatId' field, all chats (in all states) are examined and all result types are possible, but no more than one 'Message' type result will be returned for each matching chat. Each 'Message' result indicates the most recently received matching message in its chat.

When a 'search' request includes the 'chatId' field, only that single chat is examined and multiple 'Message' type results can be returned. Other result types will not be present. Each 'Message' result indicates one matching message in the specified chat, with more recently received messages listed first.

Attributes:
NameTypeReqSinceLogDescription
chatIdstringOptR8Yes

Search a single chat for 'Message' type matches only. See this request's description for details on how this alters the search operation and results.

cookiestringReq2015.06Yes

The cookie value that will be included in the 'searchResult' response.

suggestedMaxResultsnumber (uint64)Opt2015.06Yes

Iff present, then no more than this many results will be returned. The result size can be limited to an internal unspecified maximum that is at least 50.

textstringReq2015.06No

The text of the query for case-insensitive substring search. This string must contain at least one Unicode code point or an empty result set will be returned.

Examples:
[
    {
        "search": {
            "cookie": "search-1",
            "text": "foo"
        }
    },
    {
        "search": {
            "cookie": "search-2",
            "suggestedMaxResults": 50,
            "text": "foobar"
        }
    },
    {
        "search": {
            "chatId": "123",
            "cookie": "search-3",
            "text": "foo"
        }
    }
]

searchResult

NamesearchResult
Since2015.06
DirectionIncoming

This carries the results of a 'search' request.

Attributes:
NameTypeReqSinceLogDescription
cookiestringReq2015.06Yes

The cookie value that was provided in the 'search' request.

elementsarrayReq2015.06No

The results of the search.

The following table describes the type of each array element.

TypeReqSinceLogDescription
objectOpt2015.06No

The list of matches that resulted from the search, in order of the priority described for 'search'.

NameTypeReqSinceLogDescription
chatIdchat keyReqR4No

Holds the ID of the matching 'chat'.

messageIdchatMessage keyOpt2015.12Yes

When present, this holds the ID of the matching message. This is always an foreign key into 'chatMessage'.

typestringReq2015.06Yes

The type of search result. This is where the 'text' in the 'search' request was found.

This field is an enumeration.

MemberDescription
Message

The chat contains a message whose 'content' matched the search.

The 'chatId' field identifies the chat.

The 'messageId' field will be a foreign key into 'chatMessage' indicating the matching message.

Subject

The chat has a 'subject' that matched the search.

The 'chatId' field identifies the chat.

The 'messageId' field will not be present.

Examples:
[
    {
        "searchResult": {
            "cookie": "search-1",
            "elements": [
                {
                    "chatId": "17",
                    "type": "DisplayName",
                    "userUri": "bbmpim://user/id/3"
                },
                {
                    "chatId": "18",
                    "messageId": "7",
                    "type": "DisplayName",
                    "userUri": "bbmpim://user/id/3"
                },
                {
                    "chatId": "123",
                    "messageId": "456",
                    "type": "Message"
                },
                {
                    "chatId": "25894",
                    "type": "Subject"
                }
            ]
        }
    }
]

setupError

NamesetupError
Since2.1
DirectionIncoming

Sent by bbmcore when a setup attempt encounters an error. The error does not mean that bbmcore has stopped trying to complete setup. In all cases, the 'authTokenState' and the 'setupState' will be updated as necessary and your application must respect and react to those changes accordingly and at user speeds.

Attributes:
NameTypeReqSinceLogDescription
errorstringReq2.1Yes

The type of error encountered.

This field is an enumeration.

MemberDescription
CertificateErrorThere was a problem with one of the setup steps due to a certificate error.
ForbiddenThe BlackBerry Infrastructure forbids this user from registering for an undisclosed reason. The user id provided in 'authToken' might be unusable.
PermanentServerErrorThere was a serious problem with one of the setup steps.
TemporaryServerErrorThere was a problem with one of the setup steps but it is possible that a retry will succeed.
Examples:
[
    {
        "setupError": {
            "error": "PermanentServerError"
        }
    },
    {
        "setupError": {
            "error": "TemporaryServerError"
        }
    }
]

setupRetry

NamesetupRetry
SinceR4
DirectionOutgoing

Requests that bbmcore restart setup after a previous setup attempt was stopped.

If the current 'setupState' 'state' global is 'DeviceSwitchRequired', this will move the user's profile from the user's other device to this one.

If the current 'setupState' 'state' global is 'Full', this will register and add the current endpoint to any existing endpoints.

This message will be ignored for any other 'setupState' 'state'.

Attributes:
NameTypeReqSinceLogDescription
Examples:
[
    {
        "setupRetry": {}
    }
]

statsCommitted

NamestatsCommitted
Since2015.04
DirectionOutgoing

Your application sends this message to indicate two things:

  1. Your application has taken custodianship of the most recently fetched 'stat' list values. Your application did (or will) record them in its reporting system.
  2. Those previously reported 'stat' values must no longer be included in future fetches of the 'stat' list. In other words, it resets the counters, but does so without losing the stats collected since the last 'stat' list fetch.

See the 'stat' list for a detailed explanation how to use this message.

Note that 'statsCommitted' always applies to the most recently fetched 'stat' list values. If no 'stat' list values have ever been fetched, this has no effect.

There is no reply to this message.

Attributes:
NameTypeReqSinceLogDescription
Examples:
[
    {
        "statsCommitted": {}
    }
]

syncError

NamesyncError
SinceR4
DirectionIncoming

Sent by bbmcore when there is an endpoint sync error after receiving an 'syncStart' message on the initiating endpoint.

Attributes:
NameTypeReqSinceLogDescription
errorstringReqR4Yes

The type of endpoint sync error encountered.

This field is an enumeration.

MemberDescription
FailureThe endpoint sync failed.
IncorrectPasscode

The provided passcode was incorrect.

TimeoutThe endpoint sync timed out before it could be completed.
Examples:
[
    {
        "syncError": {
            "error": "IncorrectPasscode"
        }
    }
]

syncPasscodeChange

NamesyncPasscodeChange
SinceR6
DirectionOutgoing

Applications that use the BlackBerry Key Management Service (KMS) send this message to bbmcore on an endpoint that has completed setup in order to change the passcode that must be provided by 'syncStart' on new endpoints.

This message uses information already known to this endpoint to protect the existing sync data in KMS with the new 'passcode'. The old passcode is not required and will not be checked. Because of this, applications can let users change the sync passcode without knowing the current sync passcode. In all circumstances, applications should take steps to re-confirm the identity of the user with a relevant credentials challenge before issuing this request to bbmcore.

The result of this action is reported by 'syncPasscodeChangeResult'. Applications must not issue overlapping requests.

This action does not deregister existing endpoints (unlike 'syncStart' with 'action' 'New').

It is an error to send a 'syncPasscodeChange' request when your application isn't using the BlackBerry Key Management Service or when setup hasn't yet completed.

Attributes:
NameTypeReqSinceLogDescription
passcodestringReqR6No

The passcode to use when re-protecting the identity's existing sync data.

Examples:
[
    {
        "syncPasscodeChange": {
            "passcode": "newSecret"
        }
    }
]

syncPasscodeChangeResult

NamesyncPasscodeChangeResult
SinceR6
DirectionIncoming

This message reports the result of a previous 'syncPasscodeChange' request.

Attributes:
NameTypeReqSinceLogDescription
resultstringReqR6Yes

The result of attempting to set a new passcode.

This field is an enumeration.

MemberDescription
SuccessThe passcode has been changed.
TemporaryFailureA temporary error has occurred that prevented the passcode from being changed. The change will not automatically be retried.
Examples:
[
    {
        "syncPasscodeChangeResult": {
            "result": "Success"
        }
    },
    {
        "syncPasscodeChangeResult": {
            "result": "TemporaryFailure"
        }
    }
]

syncStart

NamesyncStart
SinceR4
DirectionOutgoing

This message is only used by applications that use the BlackBerry Key Management Service (KMS). When the 'setupState' is 'SyncRequired', your application must examine the 'syncPasscodeState' global.

Attributes:
NameTypeReqSinceLogDescription
actionstringOptR6Yes

This field is ignored by bbmcore unless your application uses the BlackBerry Key Management Service.

This controls whether the passcode is being used to try to unprotect existing keys or to protect new keys. See the message description for more information.

This field is an enumeration.

MemberDescription
ExistingValid only when 'syncPasscodeState' is 'Existing'. Try to use the 'passcode' to unprotect and import the existing sync data.
NewUse the 'passcode' to protect and export new sync data. Any existing sync data will be deleted and all other endpoints will be deregistered.
passcodestringReqR4No

This is the passcode used to protect sync data in the BlackBerry Key Management Service.

Examples:
[
    {
        "syncStart": {
            "passcode": "ABC123"
        }
    },
    {
        "syncStart": {
            "action": "New",
            "passcode": "NewSecret"
        }
    },
    {
        "syncStart": {
            "action": "Existing",
            "passcode": "OldSecret"
        }
    }
]

userKeysChanged

NameuserKeysChanged
SinceR6
DirectionIncoming

This message is sent by bbmcore only when your application uses the BlackBerry Key Management Service (KMS). It indicates that bbmcore has found new keys for a user.

This is not sent when the user gains their initial set of keys. It is sent only when the local endpoint has an existing set of keys for a given user and then later learns that the user has different keys for any reason.

This is not sent for the local user.

Attributes:
NameTypeReqSinceLogDescription
userUriuser keyReqR6Yes

The URI of the user whose keys have changed.

Examples:
[
    {
        "userKeysChanged": {
            "userUri": "bbmpim://user/id/123"
        }
    }
]

userKeysImport

NameuserKeysImport
SinceR3
DirectionOutgoing

Request that bbmcore set one or more users' keys.

Your application should try to include keys for as many users as possible in a single 'userKeysImport' request (within BBMDS message size limits) for greater efficiency.

If no user with a given 'regId' exists, a new user is created with a 'keyState' of 'Synced' and protection enabled. If the import fails, no user is created at all and no response is sent by bbmcore.

If the user with a given 'regId' exists, the user's 'keyState' will be changed to 'Synced' and protection will be enabled for the user. If the import fails, the user's 'keyState' will remain unchanged.

To avoid event loops, your application must only react with 'userKeysImport' to changes of a user's 'keyState' to 'Import'. Your application must not react to updates from bbmcore that indicate the 'keyState' is 'Import' when the 'keyState' was already known to your application to be 'Import'. When your application first learns of a user (such as after starting up) and their 'keyState' is 'Import', your application should consider that a change and can react to it with 'userKeysImport'. In other words, your application must not import keys unless the 'keyState' is actually changing or being learned for the first time. By following this rule, failed imports will not result in tight event loops and will allow retries (at a minimum on application restart, but also whenever bbmcore decides to toggle the state).

Regardless of a user's 'keyState', if your application has external evidence that the user has for some reason newly available or updated keys, your application can use 'userKeysImport' to provide those keys, subject the event reaction restrictions documented above.

This message will be ignored by bbmcore if your application uses the BlackBerry Key Management Service.

Attributes:
NameTypeReqSinceLogDescription
keysarrayReqR3Yes

The list of user keys to set.

The following table describes the type of each array element.

TypeReqSinceLogDescription
objectReqR3Yes

The keys for the user.

NameTypeReqSinceLogDescription
encryptionPublicKeystringReqR3No

The unpadded base64url-encoded encryption public key.

regIdstringReqR3Yes

The regId of the user the keys are for. If no user with the given regId exists, one will be created.

signingPublicKeystringReqR3No

The unpadded base64url-encoded signing public key.

Examples:
[
    {
        "userKeysImport": {
            "keys": [
                {
                    "encryptionPublicKey": "ZW5jcnlwdGlvblB1YmxpY0tleTEyMw",
                    "regId": "123",
                    "signingPublicKey": "c2lnbmluZ1B1YmxpY0tleTEyMw"
                },
                {
                    "encryptionPublicKey": "ZW5jcnlwdGlvblB1YmxpY0tleTMyMQ",
                    "regId": "321",
                    "signingPublicKey": "c2lnbmluZ1B1YmxpY0tleTMyMQ"
                }
            ]
        }
    }
]

userKeysImportFailure

NameuserKeysImportFailure
SinceR4
DirectionIncoming

Indicates that one or more user's keys received in 'userKeysImport' failed to import.

This message will not be sent by bbmcore if your application uses the BlackBerry Key Management Service.

Attributes:
NameTypeReqSinceLogDescription
regIdsarrayReqR4Yes

The list of regIds that failed to import.

The following table describes the type of each array element.

TypeReqSinceLogDescription
stringReqR4Yes

The regId that failed to import.

Examples:
[
    {
        "userKeysImportFailure": {
            "regIds": [
                "123",
                "321"
            ]
        }
    }
]

wipe

Namewipe
Since2016.06
DirectionOutgoing

Request that bbmcore forget all information associated with the current Spark Communications identity by deleting all data and stopping, thus triggering a required BBMDS resync by your application (as is necessary on all BBMDS reconnects).

Attributes:
NameTypeReqSinceLogDescription
Examples:
[
    {
        "wipe": {}
    }
]

All Lists

The list API is used to synchronize a list of elements between the application and bbmcore. Each list has a type, indicating the type of elements in the list and how the list is used by bbmcore.

Bbmcore owns the model and your application is stateless with respect to it. In other words, bbmcore sends a message to your application every time the list changes, even if the change was requested by your application. The application reacts to these events and occasionally makes requests from bbmcore. Bbmcore has the option to decide how it reacts to your application's requests. Some requests may be ignored or result in changes to multiple lists.

List messages sent from bbmcore start with the prefix list. These are documented with the other incoming messages. The contract for these messages is the same regardless of the list type and your application is responsible for reacting correctly to any list message sent from bbmcore sent at any time. Bbmcore is free to use these messages to change the list contents at any time. Bbmcore is also required to notify your application of every change to a list (if such changes are supported by the list's events), regardless of how that change occurred. For example, bbmcore cannot omit sending a change notification to your application just because the change was requested by your application.

The following table summarizes the messages in the list protocol:

Message Message Type Elements Description
listAdd Event Full Adds one or more elements to the list.
listAll Event None Sends the entire list contents to your application.
listChange Event Partial Changes specific attributes in one or more elements in the list.
listChunk Event Full This is a degenerate message that can only follow 'listAll' or 'listElements' to carry the actual elements. It is omitted from the documentation of supported event messages because it is implied when those leading messages are supported.
listElements Event None Updates the entire state of specific elements in the list.
listRemove Event Primary key Removes one or more elements to the list.
listResync Event None Indicates that elements of the list that match the given criteria have potentially changed or been removed.
requestListAdd Action Partial Requests that bbmcore add a new element to the list.
requestListAll Action None Requests full states for all elements.
requestListChange Action Partial Requests that bbmcore change an existing element in the list.
requestListElements Action Primary key Requests full states for one or more elements.
requestListRemove Action Primary key Requests that bbmcore remove an existing element from the list.
requestListMatching Action None Requests all elements whose attributes exactly match the criteria supplied.

Many list messages contain an "elements" attribute, which either contain full or partial element states, or only contain primary keys. The table above describes what sort of elements show up in each message. The following table describes the meaning of the various element types.

Element Type Description
Full The 'listAdd' and 'listChunk' messages contain full element states. Full states contain all required attributes, and if any optional attributes are not present, they are reset to their default values.
Partial

For the 'listChange' and 'requestListChange' events, the primary key is required and all other attributes are optional, even if they are marked as required in the element schema. Attributes that are not present are treated as unmodified. No attributes are reset to their defaults. In the case of 'requestListChange', only a subset of attributes (documented for each list) may be included in the message.

In the case of 'requestListAdd', only a subset of attributes may be included. If an attribute in the subset is marked as required, it is also required in the 'requestListAdd'. If an attribute in the subset is marked as optional, it is reset to its default if not present. Attributes outside the subset may not be included in a 'requestListAdd' even if they are marked as required. The primary key is only required by 'requestListAdd' if named in the subset.

Primary key The 'listRemove', 'requestListRemove', and 'requestListElements' messages only contain primary keys. No other attributes may be present, even if they are marked as required.
None The 'listAll', 'listElements', and 'requestListAll' messages do not directly contain an elements attribute, although in the first two cases the message will be followed by one or more 'listChunk' messages that do contain elements.

Not all lists support all messages. Each list defines which "action" and "event" messages it supports in its definition. Almost all lists (except those whose elements contain only one field) implicitly support 'listChange' and 'listElements'. There are no other implicitly supported messages.

The following table discusses some common key attributes of lists.

Attribute Description
type This is the unique identifier for the list type, included verbatim in the type attribute of every message in this list.
primaryKey Identifies the primary key for the list. If more than one attribute is named, the list uses a composite key. Certain list messages (such as 'listRemove') only require the primary key to be included for each element.
since The protocol version in which the list type was added. This is a rough guide for humans only because protocol version is not strong.

A typical message interaction for a list supporting 'requestListAll', 'requestListAdd', and 'requestListRemove' would look like this. In this example, the elements have two attributes: lineNum and text.

// Your application wakes up and requests the list of elements from bbmcore. Bbmcore decides to break the response into two chunks.
Outgoing: {"requestListAll":{"type":"test"}}
Incoming: {"listAll":{"type":"test"}}
Incoming: {"listChunk":{"type":"test", "elements":[{"lineNum":0, "text":"Hello"},{"lineNum":1, "text":"World"}]}}
Incoming: {"listChunk":{"type":"test", "elements":[{"lineNum":2, "text":"Testing"},{"lineNum":3, "text":"123"}], "last":true}}

// Your application requests that bbmcore add a new element to the list.
Outgoing: {"requestListAdd":{"type":"test", "elements":[{"lineNum":5, "text":"456"}]}}
Incoming: {"listAdd":{"type":"test", "elements":[{"lineNum":5, "text":"456"}]}}

// Bbmcore decides to add an additional element to the list for unrelated reasons.
Incoming: {"listAdd":{"type":"test", "elements":[{"lineNum":6, "text":"789"}]}}

// Your application requests that bbmcore remove one of the elements.
Outgoing: {"requestListRemove": {"type":"test", "elements":["lineNum":2]}}
Incoming: {"listRemove": {"type":"test", "elements":["lineNum":2]}}

appMessage

TypeappMessage
SinceR4
Primary keyid
ActionsrequestListAll, requestListChange, requestListElements, requestListRemove
EventslistAdd, listAll, listChange, listElements, listRemove

This list holds the set of application messages known to bbmcore. Application messages are application-specific messages with application-defined content sent to one or more identities for delivery to all their registered endpoints. Application messages are injected at the infrastructure level, not by typical endpoints. If you are interested in sending application messages to your application, please contact the Spark Communications Services sales team.

These messages are not processed by bbmcore but are stored for your application to consume as it sees fit. Only 1000 application messages will be stored by bbmcore at any one time. If more application messages arrive, older ones will be deleted to make room. No 'listRemove' notification will be sent for such removals.

Attributes:
NameTypeReqSinceLogDescription
dataobjectReqR4No

The data of your application message in the form of a JSON object. The meaning of the JSON object's contents are defined by your application.

externalIdstringReqR4Yes

The id of your application message, as specified by the system that injected it.

idstringReqR4Yes

The local id of your application message.

localDataobjectReqR4Yes

This field contains opaque local-only data managed by your application that is associated to your application message. A newly arrived application message always has an empty JSON object (i.e. {}) for its 'localData'.

postTimenumber (int64)ReqR4Yes

The time, in milliseconds since 1970 UTC, at which the message was posted for delivery.

Action Details:
MessagerequestListRemove
SinceR4

Use this to remove application messages.

MessagerequestListChange
SinceR4
AttributeslocalData

requestListChange is used by your application to change the 'localData' field of an application message.

Examples:
[
    {
        "listAdd": {
            "elements": [
                {
                    "data": {
                        "body": "Enjoy the secure messaging! Your messages are protected.",
                        "ref": 1234,
                        "title": "Welcome."
                    },
                    "externalId": "456783-ltr392-873jklo",
                    "id": "7",
                    "localData": {},
                    "postTime": 1499459819000
                }
            ],
            "type": "appMessage"
        }
    },
    {
        "listAll": {
            "type": "appMessage"
        }
    },
    {
        "listChunk": {
            "elements": [
                {
                    "data": {
                        "body": "Enjoy the secure messaging! Your messages are protected.",
                        "ref": 1234,
                        "title": "Welcome."
                    },
                    "externalId": "456783-ltr392-873jklo",
                    "id": "7",
                    "localData": {},
                    "postTime": 1499459819000
                }
            ],
            "last": true,
            "type": "appMessage"
        }
    },
    {
        "listRemove": {
            "elements": [
                {
                    "id": "7"
                }
            ],
            "type": "appMessage"
        }
    },
    {
        "listElements": {
            "type": "appMessage"
        }
    },
    {
        "listChunk": {
            "elements": [
                {
                    "data": {
                        "body": "Enjoy the secure messaging! Your messages are protected.",
                        "ref": 1234,
                        "title": "Welcome."
                    },
                    "externalId": "456783-ltr392-873jklo",
                    "id": "7",
                    "localData": {},
                    "postTime": 1499459819000
                }
            ],
            "last": true,
            "type": "appMessage"
        }
    },
    {
        "listChange": {
            "elements": [
                {
                    "id": "7",
                    "localData": {}
                }
            ],
            "type": "appMessage"
        }
    }
]

chat

Typechat
Since2017.02
Primary keychatId
ActionsrequestListAll, requestListChange, requestListElements, requestListMatching
EventslistAdd, listAll, listChange, listElements, listRemove

This list contains an entry for each chat the user is participating in. Chats are backed by the BlackBerry Infrastructure, and they will be restored when signing into an existing Spark Communications identity.

Chats must be started explicitly via the 'chatStart' message, and content may be added using the 'chatMessageSend' message.

When bbmcore issues a 'listRemove' for a chat, or when the 'numMessages' counter decreases, it is not necessary to also issue a separate 'listRemove' for the messages. Your application will cleanup their cache of the (now orphaned) messages when appropriate.

Attributes:
NameTypeReqSinceLogDescription
chatIdstringReq2017.02Yes

The unique identifier for this chat. This is used as the value portion of chat URIs. See the URIs section for information on the URI format.

dataobjectReqR6No

This field contains opaque data managed by your application.

This data can be read or written by any participant. Concurrent writes are resolved in a way that all participants will eventually see the same steady-state outcome.

This field is suitable for shared chat metadata that changes infrequently such as a chat avatar URL, the identifiers of external resources associated with the chat, or a per-chat setting shared by all participants. Data that changes frequently should be sent to all participants via the 'data' field of 'chatMessage' instead.

The the 'data', encoded as JSON in UTF-8, must not exceed 71680 bytes (70 KB).

flagsstringReq2017.02Yes

Compact read-only flags about the chat. Each flag that is 'true' has its corresponding letter present in the string. Each flag that is 'false' has its corresponding letter not present in the string. The letters will always be provided in alphabetical order.

Flag NameLetterSinceDescription
adminA R4 The local user is an admin for the chat, and may perform administrative actions such as promoting/demoting other participants to/from admin status, and removing other participants from the chat.
hiddenH 2017.02 The chat has been hidden (by 'stopConversation'). The chat will automatically stop being hidden when:
  • the next incoming or outgoing 'chatMessage' is added, or
  • (iff this is a 1:1 chat) when a 'chatStart' request identifying this chat is received.
missingChatKeyM R13 The chat has at least one message that chat keys are missing for.
oneToOneO R4 The chat is the singular 1:1 chat between the local user and the other party. bbmcore ensures that only one such non-Defunct chat per remote party will exist at a time. Otherwise, the chat is a multi-party chat, even if there are fewer than two remote parties.
invitePolicystringOptR4Yes

The policy that controls who may invite participants to the chat. This only applies to chats that do not have the 'oneToOne' flag, in which case the field will always be present. The field will never be present for chats with the 'oneToOne' flag.

This field is an enumeration.

MemberDescription
AdminsOnlyOnly chat admins may invite participants to the chat.
ParticipantsOnlyOnly chat participants may invite participants to the chat.
keyStatestringOpt
Synced
R3Yes

The current state of the chat's key. New chats that are created with a key start in the 'Export' state. New chats that are created without a key start in the 'Import' state.

This field is an enumeration.

MemberDescription
ExportThe chat's key needs to be exported from bbmcore and placed into external storage. When using Cloud Key Storage, your application must perform this export using 'chatKeyExport'. When using the BlackBerry Key Management Service (KMS), bbmcore will do this automatically.
ImportThe chat's key needs to be retrieved from external storage and imported into bbmcore. When using Cloud Key Storage, your application must perform this import using 'chatKeysImport'. When using the BlackBerry Key Management Service (KMS), bbmcore will do this automatically.
SyncedThe chat's key is synced.
lastActivitynumber (uint64)Req2017.02Yes

This holds the timestamp, in seconds since 1970, of the most recent notable activity in the chat. Notable activity includes:

  • When a 'chat' is created, 'lastActivity' is set to the timestamp associated with the event that created the chat.
  • When a new 'chatMessage' is added to this chat and that message does not have the 'neverCountUnread' flag set, 'lastActivity' is set to the 'timestamp' of that message.

Note that the 'lastActivity' does not always increase. Messages can arrive with lower timestamps than previous messages or the current 'lastActivity' and their timestamps will be applied to this field.

lastMessagenumber (uint64)Req2017.02Yes

The identifier of the most recent message added to the history. When combined with the chatId, this is a foreign key into 'listChatMessage'. bbmcore notifies your application of new messages by incrementing this value.

localDataobjectReq2017.02No

This field contains opaque local-only data that is associated with this chat and managed by your application. This data is stored locally on this endpoint only.

mailboxIdstringReqR3Yes

The identifier used externally to uniquely identify this chat. Empty when not known.

numMessagesnumber (uint64)Req2017.02Yes

The total number of messages in the chat. When this value decreases, messages have been removed from the 'old' end of the message list. When this value increases, messages have been added to the 'new' end of the message list. bbmcore will increment this attribute whenever a new message arrives.

numUnreadnumber (uint64)ReqR5Yes

The number of incoming messages in the chat that the local user has yet to mark as Read. This count does not include messages that have 'neverCountUnread' flag set.

privateDataobjectReqR7No

This field contains opaque data managed by your application.

This data can be read or written only by endpoints belonging to the local user's identity. Concurrent writes are resolved in a way that all endpoints will eventually see the same steady-state outcome.

This field is suitable for chat metadata that changes infrequently and is private to the local user's identity but needs to be known by all the local user's endpoints.

The 'privateData', encoded as JSON in UTF-8, must not exceed 71680 bytes (70 KB).

restorePointnumber (uint64)Req2017.02Yes

The identifier of the most recent message restored from the BlackBerry Infrastructure when the chat was joined or restored. Messages after this point are considered to have arrived while this endpoint was actively receiving content from the chat. This value is not updated when the message it identifies is no longer part of the chat. If no messages existed in the chat when it was created, joined, or restored, or if for some reason the restore point is unknown, then this will be zero.

statestringReq2017.02Yes

The state of the chat.

This field is an enumeration.

MemberDescription
DefunctThe BlackBerry Infrastructure has notified bbmcore that this chat is no longer available. This state exists so the user knows why their previously functional chat is no longer functional, and gives the user a chance to consume the content of the chat until they remove it. bbmcore will not send or receive any further messages for a chat in this state. bbmcore does not automatically remove defunct chats. Your application can remove it explicitly with 'chatLeave' (and in some cases, with 'chatHide').
ReadyThe chat is ready to send and receive messages. Any delays in sending or receiving messages in this state are due only to BlackBerry Infrastructure connectivity and availability.
RestoreThe chat is currently restoring its message history. Content added via 'chatMessageSend' will be queued to be sent and will still be added to the 'chatMessage' list and reported via 'listAdd'. Note that no 'listAdd' event occurs for a 'chatMessage' restored or received while a chat is in this state. When the chat 'state' becomes 'Ready', your application must ask bbmcore for any existing messages.
WaitingThe chat is not ready to send or receive messages because it is waiting on an unspecified "slow" activity. Content added via 'chatMessageSend' will be queued to be sent and will still be added to the 'chatMessage' list and reported via 'listAdd'. Note that no 'listAdd' event occurs for a 'chatMessage' restored or received while a chat is in this state because such activity cannot happen while the chat lacks keys.
subjectstringReq2017.02No

Holds the user-readable subject of the chat. This field has a maximum size of 128 code points.

Action Details:
MessagerequestListChange
SinceR2
Attributessubject, localData, privateData, data, keyState, invitePolicy

A 'requestListChange' message can be sent by your application to change certain fields of a chat.

The 'keyState' field can be set by your application to 'Synced' only, and only when your application is using Cloud Key Storage. See the 'chatKeyExport' message for details on when to do this.

The 'invitePolicy' field can be changed only if the local user is an admin of the chat

MessagerequestListMatching
Description

Use requestListMatching to lookup subsets of this list.

Criteria
NameTypeSinceDescription
mailboxIdstringR5Match the single chat with the specified mailboxId. When this criterion is specified, all other criteria are ignored.
keyStatestringR3Match all chats with the given 'keyState'. Returns an empty list if no match is found, or any errors occur.
Examples:
[
    {
        "listAdd": {
            "elements": [
                {
                    "avatar": "",
                    "chatId": "38267",
                    "data": {},
                    "flags": "O",
                    "keyState": "Export",
                    "lastActivity": 1098730987,
                    "lastMessage": 15,
                    "localData": {},
                    "mailboxId": "mbx123",
                    "numMessages": 10,
                    "numUnread": 0,
                    "orgId": "9029820000",
                    "privateData": {
                        "pinned": false
                    },
                    "restorePoint": 0,
                    "state": "Ready",
                    "subject": "All your base"
                },
                {
                    "avatar": "",
                    "chatId": "6",
                    "data": {
                        "appContextId": "miZPa8ef1Xj5Vl7YmSyYVxKdbJDBIMNK",
                        "avatar": "https://avatar.server/8GWl2rOF"
                    },
                    "expiry": 3600,
                    "flags": "AP",
                    "invitePolicy": "AdminsOnly",
                    "keyState": "Synced",
                    "lastActivity": 10987300000,
                    "lastMessage": 10293873870,
                    "localData": {
                        "someData": "someValue"
                    },
                    "mailboxId": "",
                    "numMessages": 1000,
                    "numUnread": 23,
                    "privateData": {
                        "chatNickname": "Friends from Work",
                        "notificationPriority": "High",
                        "pinned": false
                    },
                    "restorePoint": 500,
                    "state": "Waiting",
                    "subject": "Are belong to us"
                }
            ],
            "type": "chat"
        }
    },
    {
        "listAll": {
            "type": "chat"
        }
    },
    {
        "listChunk": {
            "elements": [
                {
                    "avatar": "",
                    "chatId": "38267",
                    "data": {},
                    "flags": "O",
                    "keyState": "Export",
                    "lastActivity": 1098730987,
                    "lastMessage": 15,
                    "localData": {},
                    "mailboxId": "mbx123",
                    "numMessages": 10,
                    "numUnread": 0,
                    "orgId": "9029820000",
                    "privateData": {
                        "pinned": false
                    },
                    "restorePoint": 0,
                    "state": "Ready",
                    "subject": "All your base"
                },
                {
                    "avatar": "",
                    "chatId": "6",
                    "data": {
                        "appContextId": "miZPa8ef1Xj5Vl7YmSyYVxKdbJDBIMNK",
                        "avatar": "https://avatar.server/8GWl2rOF"
                    },
                    "expiry": 3600,
                    "flags": "AP",
                    "invitePolicy": "AdminsOnly",
                    "keyState": "Synced",
                    "lastActivity": 10987300000,
                    "lastMessage": 10293873870,
                    "localData": {
                        "someData": "someValue"
                    },
                    "mailboxId": "",
                    "numMessages": 1000,
                    "numUnread": 23,
                    "privateData": {
                        "chatNickname": "Friends from Work",
                        "notificationPriority": "High",
                        "pinned": false
                    },
                    "restorePoint": 500,
                    "state": "Waiting",
                    "subject": "Are belong to us"
                }
            ],
            "last": true,
            "type": "chat"
        }
    },
    {
        "listRemove": {
            "elements": [
                {
                    "chatId": "38267"
                },
                {
                    "chatId": "6"
                }
            ],
            "type": "chat"
        }
    },
    {
        "listElements": {
            "type": "chat"
        }
    },
    {
        "listChunk": {
            "elements": [
                {
                    "avatar": "",
                    "chatId": "38267",
                    "data": {},
                    "flags": "O",
                    "keyState": "Export",
                    "lastActivity": 1098730987,
                    "lastMessage": 15,
                    "localData": {},
                    "mailboxId": "mbx123",
                    "numMessages": 10,
                    "numUnread": 0,
                    "orgId": "9029820000",
                    "privateData": {
                        "pinned": false
                    },
                    "restorePoint": 0,
                    "state": "Ready",
                    "subject": "All your base"
                },
                {
                    "avatar": "",
                    "chatId": "6",
                    "data": {
                        "appContextId": "miZPa8ef1Xj5Vl7YmSyYVxKdbJDBIMNK",
                        "avatar": "https://avatar.server/8GWl2rOF"
                    },
                    "expiry": 3600,
                    "flags": "AP",
                    "invitePolicy": "AdminsOnly",
                    "keyState": "Synced",
                    "lastActivity": 10987300000,
                    "lastMessage": 10293873870,
                    "localData": {
                        "someData": "someValue"
                    },
                    "mailboxId": "",
                    "numMessages": 1000,
                    "numUnread": 23,
                    "privateData": {
                        "chatNickname": "Friends from Work",
                        "notificationPriority": "High",
                        "pinned": false
                    },
                    "restorePoint": 500,
                    "state": "Waiting",
                    "subject": "Are belong to us"
                }
            ],
            "last": true,
            "type": "chat"
        }
    },
    {
        "listChange": {
            "elements": [
                {
                    "chatId": "38267",
                    "data": {},
                    "keyState": "Export",
                    "localData": {},
                    "subject": "All your base"
                },
                {
                    "chatId": "6",
                    "data": {
                        "appContextId": "miZPa8ef1Xj5Vl7YmSyYVxKdbJDBIMNK",
                        "avatar": "https://avatar.server/8GWl2rOF"
                    },
                    "invitePolicy": "AdminsOnly",
                    "keyState": "Synced",
                    "localData": {
                        "someData": "someValue"
                    },
                    "subject": "Are belong to us"
                }
            ],
            "type": "chat"
        }
    }
]

chatMessage

TypechatMessage
Since2017.02
Primary keychatId, messageId
ActionsrequestListChange, requestListElements, requestListMatching
EventslistAdd, listChange, listElements, listResync

Each element in this list is a message in a chat. The primary key for each element is the 'chatId' and 'messageId'.

The range of valid message ids for a given chat can be found in the chat list as ['lastMessage' - 'numMessages', 'lastMessage'].

When a new message is added to a chat, bbmcore will first 'listAdd' the message entry, and then will 'listChange' the chat to update the 'lastMessage' and 'numMessages' fields.

Note that 'listRemove' is not supported for this list. The message counters maintained in the chat list indicate when messages have been removed from this list.

Attributes:
NameTypeReqSinceLogDescription
chatIdchat keyReq2017.02Yes

The unique identifier of the chat to which this message belongs.

contentstringOpt2017.02No

Holds the text content of the message, when the 'tag' has such a concept; otherwise omitted.

dataobjectOpt2017.02Yes

This field contains opaque data managed by your application that is sent with the message. Unless specifically noted, bbmcore does not examine or modify this JSON object.

This can contain a single JSON object, or it can not exist at all. It cannot contain any other JSON type.

Many 'tag' values have a corresponding object defined as a child of the 'data' object with a key equal to the 'tag'. All 'tags' with such a corresponding child of 'data' require that child to be present. Other tags have no such requirement.

The 'data' object can also contain other key-value pairs independently from the 'tag'.

NameTypeReqSinceLogDescription
AdminobjectOptR4Yes

Information about an admin change. Sent by the user who made the change. bbmcore does read and write the 'data' object including this object when the 'tag' is 'Admin'.

NameTypeReqSinceLogDescription
promotionbooleanReqR4Yes

True if the user has been promoted to admin. False if they have been demoted.

userUriuser keyReqR4Yes

Identifies the participant that has been updated.

RemoveobjectOptR4Yes

Information about a participant removal. Sent by the user who made the removal.

NameTypeReqSinceLogDescription
userUriuser keyReqR4Yes

Identifies the participant that has been removed.

forwardedbooleanOpt
False
R11Yes

Iff present and true, then this message is considered a forwarded message. It can be present for any 'tag' and is independent from other fields in 'data'. A forwarded message is a message that was obtained from one chat and sent in another chat.

externalIdstringOptR13Yes

The identifier used externally to uniquely identify this chat message, base64-encoded with the RFC 4648 Section 4 (default) alphabet and padding.

This field is present iff this chat message has such an identifier when this BBMDS message was emitted. Bbmcore does not emit 'listChange' or 'listElement' messages when this identifier becomes known for a message that previously lacked one.

filestringOpt2017.02No

A path to a large file that is not carried in the message. This file is uploaded or download by bbmcore automatically. For downloads, this will only be set once 'fileState' progresses to 'Done'.

A maximum file size limit of 128 MB is imposed by bbmcore. The size limit may change in future versions. Clients that encounter files that are larger than their maximums will not download them.

fileSizenumber (uint64)OptR7No

The advertised size of the file, in bytes, as indicated by the sender. This field is only meaningful when this message has a file attachment. The actual file size can differ from this advertised size.

When the sender did not indicate a size, this field will not be present. Otherwise, this value is available in all 'fileState' states, even before any attempt is made to download a received attachment. Your application can use this value to decide whether or not to download the attachment.

In versions after this field was introduced, bbmcore automatically includes this size value when attaching a file to an outgoing message.

fileStatestringOpt2017.02Yes

Indicates the state of file upload or download.

Generally, whether the transfer is an upload or download is not exposed to your application. However, some states imply that the transfer is a download that can be started or restarted by the 'chatMessageFileDownload' message. The 'incoming' 'flag' on this 'chatMessage' does not indicate whether the transfer is an upload or download.

Bbmcore automatically handles temporary errors during uploads and downloads. Such errors and the retries that occur are not exposed to your application. Eventually, bbmcore will give up and place a transfer into either the 'Failed' or 'FailedAvailable' state.

This field is an enumeration.

MemberDescription
Available

Most downloads are automatically initiated and automatically retried by bbmcore. In some circumstances, such as joining a chat or restoring a chat's history, or when the 'chatMessageFileAutoDownload' global is false, bbmcore does not automatically download attachments.

This state indicates that the file is available to be downloaded but bbmcore isn't downloading it yet. Your application can send 'chatMessageFileDownload' to start the download.

Uploads are never in this state.

DoneThe upload or download has completed. For downloads, the 'file' path should now be set.
Failed

Bbmcore gave up trying to upload or download the file. Your application cannot ask bbmcore to try again.

Failed uploads always end up as 'Failed' (never 'FailedAvailable') and do not post a message entry to the network. Failed uploads can be retried by sending 'chatMessage' again.

FailedAvailableBbmcore gave up trying to download the file. Your application can ask bbmcore to try again by sending 'chatMessageFileDownload'.
TransferringThe file is being uploaded or downloaded.
flagsstringReq2017.02Yes

Compact read-only flags about the message. Each flag that is 'true' has its corresponding letter present in the string. Each flag that is 'false' has its corresponding letter not present in the string. The letters will always be provided in alphabetical order.

Flag NameLetterSinceDescription
controlC R9

This message was flagged by the sending application as being for control purposes versus for display purposes. This flag is useful for introducing new custom message types (typically with a new 'tag' value) that older endpoints do not understand.

Some applications, such as Instant Messaging applications, will want to inform the user that some message was received even when that type of message is unknown to the endpoint. For example, an Instant Messaging application might show "This item is not supported." when an unknown type of message is received in a chat. This lets users know they received something, but their client can't display it.

This flag is meant to allow a sender to prevent the display of such placeholders for messages that the receiver doesn't understand. When an endpoint receives a message that it does not understand and the message has this flag set, it should ignore the message and not even attempt to display a placeholder. The flag indicates that the receiving endpoint is safe to assume that the message was never meant to be displayed in any versions of the application. In this way, any older endpoint that knows about this flag and behaves accordingly can be told which messages are worth displaying placeholders for and which messages are "control" messages that it can completely ignore even when those messages (and their 'tag' values) were not yet invented when the older endpoint was made.

There is a subtle distinction between understanding and supporting a message. Receivers that do understand a received message should ignore this flag and decide how to handle it based on what they do and don't want to support. Changes should be designed so that receivers that partially understand a received message, and, for example, know its 'tag' and how to display its 'content' but which don't know all of the 'data' fields should be able to use what they can from the message and still behave properly. It is only receivers that do not even understand the message that should consider this flag.

When sending a newly introduced message type, consider whether receivers that are completely ignorant of the message should display a placeholder or not. If and only if they never should, then set this flag.

If your application has no concept of placeholders, this flag is irrelevant. Bbmcore does not set or act upon this flag.

deletedD 2017.02 The message has been deleted.
incomingI 2017.02 The 'senderUri' is not the local user, and the message may be considered to be incoming from the local user's perspective. This is a convenience alias for inspecting the 'senderUri' field. The absence of this flag reflects the fact that the 'senderUri' is the local user.
neverCountUnreadN R9

This message never contributes to the 'chat' 'numUnread' count and never sets the 'chat' 'lastActivity' timestamp.

Your application can set this on messages it sends that are not displayed by other endpoints. Doing so helps the 'chat' 'numUnread' count reflect the number of messages that the user has not read.

This flag has no effect on the 'state' of a chat message or the behaviour of 'chatMessageRead'. For example, messages with this flag will be 'Delivered' when received and can be marked as 'Read'.

unverifiedU 2017.02 The message's signature was not verified as being from the claimed sender. Despite this, the content of the message is made available to be processed or ignored as your application sees fit.
localDataobjectOptR5No

This field contains opaque local-only data managed by your application that is associated to the message. This field will be omitted until your application sets it via 'requestListChange'. When present, it will always be a valid JSON object.

messageIdstring (uint64)Req2017.02Yes

The unique identifier for this message. These are consecutive integers, ordered by arrival time. The range of valid integers for a given chat is stored in 'listChat's 'lastMessage' and 'numMessages' values.

recallstringOpt
None
2017.02Yes

This field indicates the recall state of the message.

This field is an enumeration.

MemberDescription
FailedFor an outgoing message only, the recall request could not be sent to the BlackBerry Infrastructure. The recall request may be retried.
NoneThe message is not recalled.
RecalledThe message has been recalled.
RecallingFor an outgoing message only, the recall request is in the process of being sent to the BlackBerry Infrastructure.
refarrayOptR5Yes

A 'chatMessage' can reference other messages or be referenced by other messages.

All references are directional and known to both messages involved. If message A references message B, then A has an entry in its 'ref' array with the 'messageId' of B, and B has an entry in its 'refBy' array that counts the reference from A.

Each reference in the 'ref' array has an application-specified 'tag' that indicates what kind of reference it is. A single message can only have one 'ref' for each tag string. Your application uses 'tag' strings to allow multiple different kinds of references between messages. For example, a message could both 'Quote' one message and 'Edit' another.

Each reference in the 'refBy' array has the same application-specified tag. A single message can have multiple references to it with the same 'tag'. To find all messages that refer to a given message, use 'requestListMatching' with the 'tag' and the 'messageId' of the referred-to message. Because the number of incoming references to a message can be large, only the most recent referring message is identified by 'newestRef' in 'refBy', along with a count of the total number of referring messages.

When there are no references to any other messages, the 'ref' field is omitted.

The following table describes the type of each array element.

TypeReqSinceLogDescription
objectReqR5Yes

Each element of the 'ref' array represents a single reference to another 'chatMessage'.

NameTypeReqSinceLogDescription
messageIdchatMessage keyReqR5Yes

The messageId being referenced. If this contains the id of an element that does not currently exist in the 'chatMessage' list, then this message references another message that has been removed. If this is the empty string, then this 'chatMessage' references another message that is not currently known. It could have been deleted or its delivery could have been delayed. If the message becomes known, this 'messageId' will be updated to refer to it.

tagstringReqR5Yes

Your application-specified tag that indicates what kind of reference it is. A single 'chatMessage' can only have one 'ref' for each tag string. If a tag string appears more than once, subsequent instances are ignored.

This field is an enumeration.

MemberDescription
Edit

This message edits the referenced message.

To allow edits from the original sender only, use the following behaviour. If the 'senderUri' matches that of the referenced message, this message's 'content' and/or other fields (depending on what makes sense in your application) should be displayed in place of the 'content' from the original message or any previously received messages with an 'Edit' ref. If the 'senderUri' does not match that of the referenced message, this 'ref' must be ignored (and possibly even removed with 'chatMessageRefRemove') and the message must be treated as if was not an edit.

If this message also has a 'refBy' with tag 'Edit', that referencing message must be ignored. An 'Edit' can not itself be edited. Instead, send a new message with an 'Edit' 'ref' to the original message that is to be edited.

QuoteThis message quotes the referenced message.
ThreadThis message belongs to a thread that has the referenced message as its parent.
refByarrayOptR5Yes

See 'ref' for an explanation of 'ref' and 'refBy'.

This field will be omitted entirely if there are no references from other messages.

The following table describes the type of each array element.

TypeReqSinceLogDescription
objectReqR5Yes

Each element of the 'refBy' array represents one or more references from another 'chatMessage'.

NameTypeReqSinceLogDescription
countnumber (uint64)ReqR5Yes

The number of messages referencing this message via the tag. To find all messages that refer to a given message, use 'requestListMatching' with this 'tag' and the 'messageId' of this referred-to 'chatMessage'.

newestRefchatMessage keyReqR5Yes

The newest messageId referencing this message via the tag. If this contains the id of an element that does not currently exist in the 'chatMessage' list, then this message references another message that has been removed. This will not be the empty string.

tagstringReqR5Yes

Your application-specified tag that indicates what kind of reference it is.

This field is an enumeration.

MemberDescription
Edit

This message has been edited by the referring message.

To allow edits from the original sender only, use the following behaviour. If the 'senderUri' matches that of the referring message, that message's 'content' and/or other fields (depending on what makes sense in your application) should be displayed in place of the 'content' from this original message or any previously received messages with an 'Edit' ref. If the 'senderUri' of the referencing message does not match, this 'refBy' must be ignored (and possibly even removed with 'chatMessageRefRemove') and it must be treated as if it were not an edit.

If this message also has a 'ref' with tag 'Edit', the referencing message indicated by this 'refBy' must be ignored. An 'Edit' can not itself be edited. Instead, send a new message with an 'Edit' 'ref' to the original message that is to be edited.

QuoteThis message has been quoted by the referring message.
ThreadThis message belongs to a thread that has the referring messages as its children.
senderUriuser keyReq2017.02Yes

Holds the user URI of the sender of this message. See the URIs section for information on the URI format.

statestringReq2017.02Yes

This field indicates the overall delivery state of the message.

This field is an enumeration.

MemberDescription
DeliveredThe message has been delivered to at least one recipient.
FailedThe message failed to be sent.
ReadThe message has been read by at least one recipient.
SendingThe message is in the process of being sent to the BlackBerry Infrastructure.
SentThe message has been accepted by the BlackBerry Infrastructure.
stateIsPartialbooleanReq2017.02Yes

This indicates whether or not the state applies to some (true) or all (false) recipients.

tagstringReq2017.02Yes

Indicates the type of content this message represents.

This field is an enumeration.

MemberDescription
AdminThe message contains an admin change. This tag contains no content. The 'data' must contain 'Admin'.
GapThe message history contains a gap at this position where messages have been permanently lost. The 'senderUri' will be that of the local user, the 'state' will be 'Sent', and the 'timestamp' will be the time the gap was detected. This tag has no 'content'
JoinThe sender has joined the chat. This tag has no 'content'.
LeaveThe sender has left the chat. This tag has no 'content'. The 'data', if present, must contain 'Leave'.
RemoveThis message indicates that the sending user has removed another user from the chat. This tag contains no content. The 'data' must contain 'Remove' and will indicate which user has been removed.
ShredThe sender has requested that all previously sent messages be recalled. This tag has no 'content''.
SubjectThe sender has changed the chat's 'subject'. The content contains the new subject.
TextThe message contains plain text content. This tag requires 'content'.
thumbstringOpt2017.02No

A path to a small file that is carried in the message.

timestampnumber (uint64)Req2017.02Yes

The time at which this message was posted to the BlackBerry Infrastructure, in seconds since 1970.

Action Details:
MessagerequestListChange
SinceR5
AttributeslocalData

requestListChange may be used to change certain fields of a message.

MessagerequestListMatching
Description

Use requestListMatching to lookup subsets of this list.

Criteria
NameTypeSinceDescription
chatIdstring2017.02Filters the requested list by the 'chatId' attribute. This field is required, and at least one of the 'tag' or 'ref' fields must also be present.
tagstring2017.02When present, the requested list is filtered by the 'tag' attribute. 'Text' is not a supported value for this criteria.
senderUristringR9When present, the requested list is filtered by the 'senderUri' attribute.
refobjectR5When present, this criterion filters the requested list to only those messages that reference another individual message. In the 'requestListMatching' request, this 'ref' field's value must be a single element with 'tag' and 'messageId' fields that will be used to match the 'chatMessage' element's 'ref' array. Any 'chatMessage' that has a 'ref' with the same 'tag' and 'messageId' will match.
Event Details:
MessagelistResync
Description

bbmcore will emit this event to indicate that elements of the list that match the given criteria have potentially changed or been removed.

Criteria
NameTypeSinceDescription
chatIdstring2017.02Elements of this list with a 'chatId' matching the 'chatId' of this message, have changed or been removed.
Examples:
[
    {
        "listAdd": {
            "elements": [
                {
                    "chatId": "8475",
                    "content": "Hello world!",
                    "flags": "I",
                    "localData": {
                        "field": "value"
                    },
                    "messageId": "793873",
                    "recall": "None",
                    "ref": [
                        {
                            "messageId": "236",
                            "tag": "Quote"
                        },
                        {
                            "messageId": "56",
                            "tag": "Edit"
                        },
                        {
                            "messageId": "8",
                            "tag": "Thread"
                        }
                    ],
                    "senderUri": "bbmpim://user/id/29",
                    "state": "Delivered",
                    "stateIsPartial": false,
                    "tag": "Text",
                    "timestamp": 30987309874
                },
                {
                    "chatId": "5",
                    "flags": "I",
                    "localData": {},
                    "messageId": "236",
                    "recall": "None",
                    "refBy": [
                        {
                            "count": 1,
                            "newestRef": "793873",
                            "tag": "Quote"
                        },
                        {
                            "count": 7,
                            "newestRef": "793873",
                            "tag": "Thread"
                        }
                    ],
                    "senderUri": "bbmpim://user/id/29",
                    "state": "Delivered",
                    "stateIsPartial": false,
                    "tag": "Join",
                    "timestamp": 30987309921
                },
                {
                    "chatId": "4347",
                    "content": "Goodbye cruel world!",
                    "flags": "",
                    "messageId": "799873",
                    "recall": "None",
                    "senderUri": "bbmpim://user/id/0",
                    "state": "Delivered",
                    "stateIsPartial": true,
                    "tag": "Text",
                    "timestamp": 309873099870
                },
                {
                    "chatId": "4347",
                    "data": {
                        "Admin": {
                            "promotion": true,
                            "userUri": "bbmpim://user/id/1"
                        },
                        "forwarded": false,
                        "priority": "None"
                    },
                    "file": "/files/report.doc",
                    "fileState": "Done",
                    "flags": "",
                    "messageId": "799874",
                    "recall": "None",
                    "senderUri": "bbmpim://user/id/0",
                    "state": "Delivered",
                    "stateIsPartial": true,
                    "tag": "Admin",
                    "timestamp": 309873099871
                },
                {
                    "chatId": "4347",
                    "content": "Here is my report",
                    "data": {
                        "File": {
                            "contentType": "application/msword",
                            "suggestedFilename": "report.doc"
                        },
                        "forwarded": false,
                        "priority": "None"
                    },
                    "file": "/files/report.doc",
                    "fileState": "Done",
                    "flags": "",
                    "messageId": "799874",
                    "recall": "None",
                    "senderUri": "bbmpim://user/id/0",
                    "state": "Delivered",
                    "stateIsPartial": true,
                    "tag": "File",
                    "timestamp": 309873099871
                },
                {
                    "chatId": "6",
                    "content": "Follow me on Glympse: www.glympse.com",
                    "data": {
                        "Glympse": {
                            "id": "123234232"
                        },
                        "forwarded": false,
                        "priority": "None"
                    },
                    "flags": "",
                    "messageId": "6",
                    "recall": "None",
                    "senderUri": "bbmpim://user/id/0",
                    "state": "Delivered",
                    "stateIsPartial": true,
                    "tag": "Glympse",
                    "timestamp": 309873099871
                },
                {
                    "chatId": "7",
                    "content": "Follow me on Glympse: www.glympse.com",
                    "data": {
                        "GlympseRequest": {
                            "duration": 300
                        },
                        "forwarded": false,
                        "priority": "None"
                    },
                    "flags": "",
                    "messageId": "7",
                    "recall": "None",
                    "senderUri": "bbmpim://user/id/0",
                    "state": "Delivered",
                    "stateIsPartial": true,
                    "tag": "GlympseRequest",
                    "timestamp": 309873099871
                },
                {
                    "chatId": "8",
                    "content": "Important Message",
                    "data": {
                        "forwarded": false,
                        "priority": "High"
                    },
                    "flags": "",
                    "messageId": "8",
                    "recall": "None",
                    "senderUri": "bbmpim://user/id/0",
                    "state": "Delivered",
                    "stateIsPartial": true,
                    "tag": "Text",
                    "timestamp": 309873099871
                },
                {
                    "chatId": "9",
                    "content": "The answer is 2.",
                    "data": {
                        "Quote": {
                            "source": "John Doe",
                            "text": "What is 1+1?",
                            "timestamp": 562737600
                        },
                        "forwarded": false,
                        "priority": "None"
                    },
                    "flags": "IU",
                    "messageId": "9",
                    "recall": "None",
                    "senderUri": "bbmpim://user/id/0",
                    "state": "Delivered",
                    "stateIsPartial": true,
                    "tag": "Quote",
                    "timestamp": 309873099871
                },
                {
                    "chatId": "10",
                    "content": "Me too!",
                    "data": {
                        "ReferencedUpdate": {
                            "type": "PersonalMessage",
                            "update": "Looking forward to this weekend."
                        },
                        "forwarded": false,
                        "priority": "None"
                    },
                    "flags": "",
                    "messageId": "10",
                    "recall": "None",
                    "senderUri": "bbmpim://user/id/0",
                    "state": "Delivered",
                    "stateIsPartial": true,
                    "tag": "ReferencedUpdate",
                    "timestamp": 309873099871
                },
                {
                    "chatId": "4347",
                    "data": {
                        "Remove": {
                            "userUri": "bbmpim://user/id/1"
                        },
                        "forwarded": false,
                        "priority": "None"
                    },
                    "flags": "",
                    "messageId": "799874",
                    "recall": "None",
                    "senderUri": "bbmpim://user/id/0",
                    "state": "Delivered",
                    "stateIsPartial": true,
                    "tag": "Remove",
                    "timestamp": 309873099871
                },
                {
                    "chatId": "11",
                    "flags": "",
                    "messageId": "11",
                    "recall": "None",
                    "senderUri": "bbmpim://user/id/0",
                    "state": "Delivered",
                    "stateIsPartial": true,
                    "tag": "Screencap",
                    "timestamp": 309873099871
                },
                {
                    "chatId": "12",
                    "data": {
                        "Call": {
                            "callType": "Video",
                            "duration": 326,
                            "eventType": "Ended",
                            "secure": false
                        },
                        "forwarded": false,
                        "priority": "None"
                    },
                    "flags": "",
                    "messageId": "12",
                    "recall": "None",
                    "senderUri": "bbmpim://user/id/12",
                    "state": "Delivered",
                    "stateIsPartial": true,
                    "tag": "Call",
                    "timestamp": 309873099861
                },
                {
                    "chatId": "12",
                    "data": {
                        "InviteStatus": {
                            "status": "InterOrgRestriction"
                        },
                        "forwarded": false,
                        "priority": "None"
                    },
                    "flags": "",
                    "messageId": "12",
                    "recall": "None",
                    "senderUri": "bbmpim://user/id/12",
                    "state": "Delivered",
                    "stateIsPartial": true,
                    "tag": "InviteStatus",
                    "timestamp": 309873099861
                },
                {
                    "chatId": "12",
                    "data": {
                        "Leave": {
                            "reason": "InterOrgRestriction"
                        },
                        "forwarded": false,
                        "priority": "None"
                    },
                    "flags": "",
                    "messageId": "12",
                    "recall": "None",
                    "senderUri": "bbmpim://user/id/12",
                    "state": "Delivered",
                    "stateIsPartial": true,
                    "tag": "Leave",
                    "timestamp": 309873099861
                },
                {
                    "chatId": "12",
                    "flags": "",
                    "messageId": "12",
                    "recall": "None",
                    "senderUri": "bbmpim://user/id/12",
                    "state": "Delivered",
                    "stateIsPartial": true,
                    "tag": "Leave",
                    "timestamp": 309873099861
                },
                {
                    "chatId": "13",
                    "data": {
                        "Location": {
                            "altitude": "3",
                            "city": "Halifax",
                            "country": "Canada",
                            "horizontalAccuracy": "90",
                            "latitude": "44.64692",
                            "longitude": "-63.57822",
                            "name": "Halifax, NS, Canada",
                            "postalCode": "",
                            "state": "NS",
                            "street": ""
                        },
                        "forwarded": false,
                        "priority": "None"
                    },
                    "flags": "",
                    "messageId": "13",
                    "recall": "None",
                    "senderUri": "bbmpim://user/id/13",
                    "state": "Delivered",
                    "stateIsPartial": true,
                    "tag": "Location",
                    "timestamp": 309873090861
                },
                {
                    "chatId": "1000",
                    "content": "Let's discuss this with the others.",
                    "data": {
                        "MediaConf": {
                            "requireAuth": false,
                            "url": "https://conf.bbm.bbmenterprise.com/join?appId=example"
                        },
                        "forwarded": false,
                        "priority": "None"
                    },
                    "flags": "",
                    "messageId": "2000",
                    "recall": "None",
                    "senderUri": "bbmpim://user/id/3000",
                    "state": "Delivered",
                    "stateIsPartial": true,
                    "tag": "MediaConf",
                    "timestamp": 309873090861
                },
                {
                    "chatId": "14",
                    "data": {
                        "Sticker": {
                            "id": "14"
                        },
                        "forwarded": false,
                        "priority": "None"
                    },
                    "flags": "",
                    "messageId": "14",
                    "recall": "None",
                    "senderUri": "bbmpim://user/id/14",
                    "state": "Delivered",
                    "stateIsPartial": true,
                    "tag": "Sticker",
                    "timestamp": 309873099861
                },
                {
                    "chatId": "15",
                    "content": "Cats are funny!",
                    "data": {
                        "Picture": {
                            "mimeType": "image/jpeg",
                            "suggestedFilename": "funny_cat.jpg"
                        },
                        "forwarded": false,
                        "priority": "None"
                    },
                    "file": "/picture/funny_cat.jpg",
                    "fileState": "Done",
                    "flags": "",
                    "messageId": "799874",
                    "recall": "None",
                    "senderUri": "bbmpim://user/id/0",
                    "state": "Delivered",
                    "stateIsPartial": true,
                    "tag": "Picture",
                    "thumb": "/picture/funny_cat_small.jpg",
                    "timestamp": 309873099871
                },
                {
                    "chatId": "16",
                    "content": "Here's the sales rep's info",
                    "data": {
                        "Contact": {
                            "suggestedFilename": "JohnDoe.vcf"
                        },
                        "forwarded": false,
                        "priority": "None"
                    },
                    "file": "/contact/JohnDoe.vcf",
                    "fileState": "Done",
                    "flags": "",
                    "messageId": "16",
                    "recall": "None",
                    "senderUri": "bbmpim://user/id/16",
                    "state": "Delivered",
                    "stateIsPartial": true,
                    "tag": "Contact",
                    "timestamp": 309873099871
                },
                {
                    "chatId": "17",
                    "content": "Our meeting tomorrow",
                    "data": {
                        "Calendar": {
                            "suggestedFilename": "meeting.ics"
                        },
                        "forwarded": false,
                        "priority": "None"
                    },
                    "file": "/calendar/meeting.ics",
                    "fileState": "Done",
                    "flags": "",
                    "messageId": "17",
                    "recall": "None",
                    "senderUri": "bbmpim://user/id/17",
                    "state": "Delivered",
                    "stateIsPartial": true,
                    "tag": "Calendar",
                    "timestamp": 309873099871
                },
                {
                    "chatId": "18",
                    "data": {
                        "VoiceNote": {
                            "suggestedFilename": "note.amr"
                        },
                        "forwarded": false,
                        "priority": "None"
                    },
                    "file": "/voicenotes/note.amr",
                    "fileState": "Done",
                    "flags": "",
                    "messageId": "18",
                    "recall": "None",
                    "senderUri": "bbmpim://user/id/18",
                    "state": "Delivered",
                    "stateIsPartial": true,
                    "tag": "VoiceNote",
                    "timestamp": 309873099871
                },
                {
                    "chatId": "38663836456",
                    "flags": "I",
                    "messageId": "8575645352",
                    "recall": "None",
                    "senderUri": "bbmpim://user/id/0",
                    "state": "Delivered",
                    "stateIsPartial": false,
                    "tag": "Gap",
                    "timestamp": 30984323543
                },
                {
                    "chatId": "19",
                    "content": "https://www.blackberry.com/us/en/products/blackberry-spark-platform",
                    "data": {
                        "Link": {
                            "descr": "BlackBerry Spark is the only Enterprise of Things (EoT) platform designed and built for ultra-secure hyperconnectivity from the kernel to the edge.",
                            "image": "https://rimblogs.files.wordpress.com/2017/06/business-man-secure.png",
                            "name": "BlackBerry Spark",
                            "title": "BlackBerry Spark: The EoT Platform for Ultra-secure Hyperconnectivity",
                            "url": "https://www.blackberry.com/us/en/products/blackberry-spark-platform"
                        },
                        "forwarded": false,
                        "priority": "None"
                    },
                    "flags": "",
                    "messageId": "19",
                    "recall": "None",
                    "senderUri": "bbmpim://user/id/14",
                    "state": "Delivered",
                    "stateIsPartial": false,
                    "tag": "Link",
                    "timestamp": 309873099861
                },
                {
                    "chatId": "19",
                    "content": "@John Doe, can you please respond to the request from @Jane Doe.",
                    "data": {
                        "forwarded": false,
                        "mentions": {
                            "users": [
                                {
                                    "len": 9,
                                    "pos": 0,
                                    "regId": "1602329767"
                                },
                                {
                                    "len": 9,
                                    "pos": 55,
                                    "regId": "1404567733"
                                }
                            ]
                        },
                        "priority": "None"
                    },
                    "flags": "",
                    "messageId": "20",
                    "recall": "None",
                    "senderUri": "bbmpim://user/id/14",
                    "state": "Delivered",
                    "stateIsPartial": false,
                    "tag": "Text",
                    "timestamp": 309873039661
                }
            ],
            "type": "chatMessage"
        }
    },
    {
        "listElements": {
            "type": "chatMessage"
        }
    },
    {
        "listChunk": {
            "elements": [
                {
                    "chatId": "8475",
                    "content": "Hello world!",
                    "flags": "I",
                    "localData": {
                        "field": "value"
                    },
                    "messageId": "793873",
                    "recall": "None",
                    "ref": [
                        {
                            "messageId": "236",
                            "tag": "Quote"
                        },
                        {
                            "messageId": "56",
                            "tag": "Edit"
                        },
                        {
                            "messageId": "8",
                            "tag": "Thread"
                        }
                    ],
                    "senderUri": "bbmpim://user/id/29",
                    "state": "Delivered",
                    "stateIsPartial": false,
                    "tag": "Text",
                    "timestamp": 30987309874
                },
                {
                    "chatId": "5",
                    "flags": "I",
                    "localData": {},
                    "messageId": "236",
                    "recall": "None",
                    "refBy": [
                        {
                            "count": 1,
                            "newestRef": "793873",
                            "tag": "Quote"
                        },
                        {
                            "count": 7,
                            "newestRef": "793873",
                            "tag": "Thread"
                        }
                    ],
                    "senderUri": "bbmpim://user/id/29",
                    "state": "Delivered",
                    "stateIsPartial": false,
                    "tag": "Join",
                    "timestamp": 30987309921
                },
                {
                    "chatId": "4347",
                    "content": "Goodbye cruel world!",
                    "flags": "",
                    "messageId": "799873",
                    "recall": "None",
                    "senderUri": "bbmpim://user/id/0",
                    "state": "Delivered",
                    "stateIsPartial": true,
                    "tag": "Text",
                    "timestamp": 309873099870
                },
                {
                    "chatId": "4347",
                    "data": {
                        "Admin": {
                            "promotion": true,
                            "userUri": "bbmpim://user/id/1"
                        },
                        "forwarded": false,
                        "priority": "None"
                    },
                    "file": "/files/report.doc",
                    "fileState": "Done",
                    "flags": "",
                    "messageId": "799874",
                    "recall": "None",
                    "senderUri": "bbmpim://user/id/0",
                    "state": "Delivered",
                    "stateIsPartial": true,
                    "tag": "Admin",
                    "timestamp": 309873099871
                },
                {
                    "chatId": "4347",
                    "content": "Here is my report",
                    "data": {
                        "File": {
                            "contentType": "application/msword",
                            "suggestedFilename": "report.doc"
                        },
                        "forwarded": false,
                        "priority": "None"
                    },
                    "file": "/files/report.doc",
                    "fileState": "Done",
                    "flags": "",
                    "messageId": "799874",
                    "recall": "None",
                    "senderUri": "bbmpim://user/id/0",
                    "state": "Delivered",
                    "stateIsPartial": true,
                    "tag": "File",
                    "timestamp": 309873099871
                },
                {
                    "chatId": "6",
                    "content": "Follow me on Glympse: www.glympse.com",
                    "data": {
                        "Glympse": {
                            "id": "123234232"
                        },
                        "forwarded": false,
                        "priority": "None"
                    },
                    "flags": "",
                    "messageId": "6",
                    "recall": "None",
                    "senderUri": "bbmpim://user/id/0",
                    "state": "Delivered",
                    "stateIsPartial": true,
                    "tag": "Glympse",
                    "timestamp": 309873099871
                },
                {
                    "chatId": "7",
                    "content": "Follow me on Glympse: www.glympse.com",
                    "data": {
                        "GlympseRequest": {
                            "duration": 300
                        },
                        "forwarded": false,
                        "priority": "None"
                    },
                    "flags": "",
                    "messageId": "7",
                    "recall": "None",
                    "senderUri": "bbmpim://user/id/0",
                    "state": "Delivered",
                    "stateIsPartial": true,
                    "tag": "GlympseRequest",
                    "timestamp": 309873099871
                },
                {
                    "chatId": "8",
                    "content": "Important Message",
                    "data": {
                        "forwarded": false,
                        "priority": "High"
                    },
                    "flags": "",
                    "messageId": "8",
                    "recall": "None",
                    "senderUri": "bbmpim://user/id/0",
                    "state": "Delivered",
                    "stateIsPartial": true,
                    "tag": "Text",
                    "timestamp": 309873099871
                },
                {
                    "chatId": "9",
                    "content": "The answer is 2.",
                    "data": {
                        "Quote": {
                            "source": "John Doe",
                            "text": "What is 1+1?",
                            "timestamp": 562737600
                        },
                        "forwarded": false,
                        "priority": "None"
                    },
                    "flags": "IU",
                    "messageId": "9",
                    "recall": "None",
                    "senderUri": "bbmpim://user/id/0",
                    "state": "Delivered",
                    "stateIsPartial": true,
                    "tag": "Quote",
                    "timestamp": 309873099871
                },
                {
                    "chatId": "10",
                    "content": "Me too!",
                    "data": {
                        "ReferencedUpdate": {
                            "type": "PersonalMessage",
                            "update": "Looking forward to this weekend."
                        },
                        "forwarded": false,
                        "priority": "None"
                    },
                    "flags": "",
                    "messageId": "10",
                    "recall": "None",
                    "senderUri": "bbmpim://user/id/0",
                    "state": "Delivered",
                    "stateIsPartial": true,
                    "tag": "ReferencedUpdate",
                    "timestamp": 309873099871
                },
                {
                    "chatId": "4347",
                    "data": {
                        "Remove": {
                            "userUri": "bbmpim://user/id/1"
                        },
                        "forwarded": false,
                        "priority": "None"
                    },
                    "flags": "",
                    "messageId": "799874",
                    "recall": "None",
                    "senderUri": "bbmpim://user/id/0",
                    "state": "Delivered",
                    "stateIsPartial": true,
                    "tag": "Remove",
                    "timestamp": 309873099871
                },
                {
                    "chatId": "11",
                    "flags": "",
                    "messageId": "11",
                    "recall": "None",
                    "senderUri": "bbmpim://user/id/0",
                    "state": "Delivered",
                    "stateIsPartial": true,
                    "tag": "Screencap",
                    "timestamp": 309873099871
                },
                {
                    "chatId": "12",
                    "data": {
                        "Call": {
                            "callType": "Video",
                            "duration": 326,
                            "eventType": "Ended",
                            "secure": false
                        },
                        "forwarded": false,
                        "priority": "None"
                    },
                    "flags": "",
                    "messageId": "12",
                    "recall": "None",
                    "senderUri": "bbmpim://user/id/12",
                    "state": "Delivered",
                    "stateIsPartial": true,
                    "tag": "Call",
                    "timestamp": 309873099861
                },
                {
                    "chatId": "12",
                    "data": {
                        "InviteStatus": {
                            "status": "InterOrgRestriction"
                        },
                        "forwarded": false,
                        "priority": "None"
                    },
                    "flags": "",
                    "messageId": "12",
                    "recall": "None",
                    "senderUri": "bbmpim://user/id/12",
                    "state": "Delivered",
                    "stateIsPartial": true,
                    "tag": "InviteStatus",
                    "timestamp": 309873099861
                },
                {
                    "chatId": "12",
                    "data": {
                        "Leave": {
                            "reason": "InterOrgRestriction"
                        },
                        "forwarded": false,
                        "priority": "None"
                    },
                    "flags": "",
                    "messageId": "12",
                    "recall": "None",
                    "senderUri": "bbmpim://user/id/12",
                    "state": "Delivered",
                    "stateIsPartial": true,
                    "tag": "Leave",
                    "timestamp": 309873099861
                },
                {
                    "chatId": "12",
                    "flags": "",
                    "messageId": "12",
                    "recall": "None",
                    "senderUri": "bbmpim://user/id/12",
                    "state": "Delivered",
                    "stateIsPartial": true,
                    "tag": "Leave",
                    "timestamp": 309873099861
                },
                {
                    "chatId": "13",
                    "data": {
                        "Location": {
                            "altitude": "3",
                            "city": "Halifax",
                            "country": "Canada",
                            "horizontalAccuracy": "90",
                            "latitude": "44.64692",
                            "longitude": "-63.57822",
                            "name": "Halifax, NS, Canada",
                            "postalCode": "",
                            "state": "NS",
                            "street": ""
                        },
                        "forwarded": false,
                        "priority": "None"
                    },
                    "flags": "",
                    "messageId": "13",
                    "recall": "None",
                    "senderUri": "bbmpim://user/id/13",
                    "state": "Delivered",
                    "stateIsPartial": true,
                    "tag": "Location",
                    "timestamp": 309873090861
                },
                {
                    "chatId": "1000",
                    "content": "Let's discuss this with the others.",
                    "data": {
                        "MediaConf": {
                            "requireAuth": false,
                            "url": "https://conf.bbm.bbmenterprise.com/join?appId=example"
                        },
                        "forwarded": false,
                        "priority": "None"
                    },
                    "flags": "",
                    "messageId": "2000",
                    "recall": "None",
                    "senderUri": "bbmpim://user/id/3000",
                    "state": "Delivered",
                    "stateIsPartial": true,
                    "tag": "MediaConf",
                    "timestamp": 309873090861
                },
                {
                    "chatId": "14",
                    "data": {
                        "Sticker": {
                            "id": "14"
                        },
                        "forwarded": false,
                        "priority": "None"
                    },
                    "flags": "",
                    "messageId": "14",
                    "recall": "None",
                    "senderUri": "bbmpim://user/id/14",
                    "state": "Delivered",
                    "stateIsPartial": true,
                    "tag": "Sticker",
                    "timestamp": 309873099861
                },
                {
                    "chatId": "15",
                    "content": "Cats are funny!",
                    "data": {
                        "Picture": {
                            "mimeType": "image/jpeg",
                            "suggestedFilename": "funny_cat.jpg"
                        },
                        "forwarded": false,
                        "priority": "None"
                    },
                    "file": "/picture/funny_cat.jpg",
                    "fileState": "Done",
                    "flags": "",
                    "messageId": "799874",
                    "recall": "None",
                    "senderUri": "bbmpim://user/id/0",
                    "state": "Delivered",
                    "stateIsPartial": true,
                    "tag": "Picture",
                    "thumb": "/picture/funny_cat_small.jpg",
                    "timestamp": 309873099871
                },
                {
                    "chatId": "16",
                    "content": "Here's the sales rep's info",
                    "data": {
                        "Contact": {
                            "suggestedFilename": "JohnDoe.vcf"
                        },
                        "forwarded": false,
                        "priority": "None"
                    },
                    "file": "/contact/JohnDoe.vcf",
                    "fileState": "Done",
                    "flags": "",
                    "messageId": "16",
                    "recall": "None",
                    "senderUri": "bbmpim://user/id/16",
                    "state": "Delivered",
                    "stateIsPartial": true,
                    "tag": "Contact",
                    "timestamp": 309873099871
                },
                {
                    "chatId": "17",
                    "content": "Our meeting tomorrow",
                    "data": {
                        "Calendar": {
                            "suggestedFilename": "meeting.ics"
                        },
                        "forwarded": false,
                        "priority": "None"
                    },
                    "file": "/calendar/meeting.ics",
                    "fileState": "Done",
                    "flags": "",
                    "messageId": "17",
                    "recall": "None",
                    "senderUri": "bbmpim://user/id/17",
                    "state": "Delivered",
                    "stateIsPartial": true,
                    "tag": "Calendar",
                    "timestamp": 309873099871
                },
                {
                    "chatId": "18",
                    "data": {
                        "VoiceNote": {
                            "suggestedFilename": "note.amr"
                        },
                        "forwarded": false,
                        "priority": "None"
                    },
                    "file": "/voicenotes/note.amr",
                    "fileState": "Done",
                    "flags": "",
                    "messageId": "18",
                    "recall": "None",
                    "senderUri": "bbmpim://user/id/18",
                    "state": "Delivered",
                    "stateIsPartial": true,
                    "tag": "VoiceNote",
                    "timestamp": 309873099871
                },
                {
                    "chatId": "38663836456",
                    "flags": "I",
                    "messageId": "8575645352",
                    "recall": "None",
                    "senderUri": "bbmpim://user/id/0",
                    "state": "Delivered",
                    "stateIsPartial": false,
                    "tag": "Gap",
                    "timestamp": 30984323543
                },
                {
                    "chatId": "19",
                    "content": "https://www.blackberry.com/us/en/products/blackberry-spark-platform",
                    "data": {
                        "Link": {
                            "descr": "BlackBerry Spark is the only Enterprise of Things (EoT) platform designed and built for ultra-secure hyperconnectivity from the kernel to the edge.",
                            "image": "https://rimblogs.files.wordpress.com/2017/06/business-man-secure.png",
                            "name": "BlackBerry Spark",
                            "title": "BlackBerry Spark: The EoT Platform for Ultra-secure Hyperconnectivity",
                            "url": "https://www.blackberry.com/us/en/products/blackberry-spark-platform"
                        },
                        "forwarded": false,
                        "priority": "None"
                    },
                    "flags": "",
                    "messageId": "19",
                    "recall": "None",
                    "senderUri": "bbmpim://user/id/14",
                    "state": "Delivered",
                    "stateIsPartial": false,
                    "tag": "Link",
                    "timestamp": 309873099861
                },
                {
                    "chatId": "19",
                    "content": "@John Doe, can you please respond to the request from @Jane Doe.",
                    "data": {
                        "forwarded": false,
                        "mentions": {
                            "users": [
                                {
                                    "len": 9,
                                    "pos": 0,
                                    "regId": "1602329767"
                                },
                                {
                                    "len": 9,
                                    "pos": 55,
                                    "regId": "1404567733"
                                }
                            ]
                        },
                        "priority": "None"
                    },
                    "flags": "",
                    "messageId": "20",
                    "recall": "None",
                    "senderUri": "bbmpim://user/id/14",
                    "state": "Delivered",
                    "stateIsPartial": false,
                    "tag": "Text",
                    "timestamp": 309873039661
                }
            ],
            "last": true,
            "type": "chatMessage"
        }
    },
    {
        "listChange": {
            "elements": [
                {
                    "chatId": "8475",
                    "localData": {
                        "field": "value"
                    },
                    "messageId": "793873"
                },
                {
                    "chatId": "5",
                    "localData": {},
                    "messageId": "236"
                },
                {
                    "chatId": "4347",
                    "messageId": "799873"
                },
                {
                    "chatId": "4347",
                    "messageId": "799874"
                },
                {
                    "chatId": "4347",
                    "messageId": "799874"
                },
                {
                    "chatId": "6",
                    "messageId": "6"
                },
                {
                    "chatId": "7",
                    "messageId": "7"
                },
                {
                    "chatId": "8",
                    "messageId": "8"
                },
                {
                    "chatId": "9",
                    "messageId": "9"
                },
                {
                    "chatId": "10",
                    "messageId": "10"
                },
                {
                    "chatId": "4347",
                    "messageId": "799874"
                },
                {
                    "chatId": "11",
                    "messageId": "11"
                },
                {
                    "chatId": "12",
                    "messageId": "12"
                },
                {
                    "chatId": "12",
                    "messageId": "12"
                },
                {
                    "chatId": "12",
                    "messageId": "12"
                },
                {
                    "chatId": "12",
                    "messageId": "12"
                },
                {
                    "chatId": "13",
                    "messageId": "13"
                },
                {
                    "chatId": "1000",
                    "messageId": "2000"
                },
                {
                    "chatId": "14",
                    "messageId": "14"
                },
                {
                    "chatId": "15",
                    "messageId": "799874"
                },
                {
                    "chatId": "16",
                    "messageId": "16"
                },
                {
                    "chatId": "17",
                    "messageId": "17"
                },
                {
                    "chatId": "18",
                    "messageId": "18"
                },
                {
                    "chatId": "38663836456",
                    "messageId": "8575645352"
                },
                {
                    "chatId": "19",
                    "messageId": "19"
                },
                {
                    "chatId": "19",
                    "messageId": "20"
                }
            ],
            "type": "chatMessage"
        }
    }
]

chatMessageFileProgress

TypechatMessageFileProgress
SinceR5
Primary keychatId, messageId
ActionsrequestListElements
EventslistAdd, listChange, listElements, listRemove

This list reports upload and download progress information for active 'chatMessage' file attachment transfers.

Each item in this list corresponds to a single 'chatMessage' entry and is identified by the same key fields: 'chatId' and 'messageId'. When an entry exists in this list, bbmcore is actively trying to upload or download the attached file. The fields of the entry in this list indicate the progress bbmcore has made in that active transfer. When an entry is removed from this list, bbmcore is no longer actively trying to transfer it. When a transfer attempt fails, it will not be represented in this list until bbmcore retries it, but the associated 'chatMessage' 'fileState' will still be 'Transferring'.

Changes in this list will be reported only when the previously reported value of 'bytes' and the current value of 'bytes' differ enough that the progress towards the 'total' achieves a different 5% increment.

For example, if a file was 100 bytes in 'total' and the previous report was 37 'bytes', then a change would only be reported for this entry after 'bytes' reached at least 40. A change from 37 to 39 would not be reported by bbmcore because 'bytes' must reach at least 40 to move from the 35-40% increment to the 40-45% (or higher) increment.

Your application doesn't have to wait for a change in 'bytes' to get an initial progress value for an active transfer it has previously been ignoring. Your application can query the list directly with 'requestListElements' at any time. When such a request returns no entry for a given pair of ids, it means that bbmcore isn't currently trying to upload or download the attached file or no progress information is available for the transfer. (See the caveat on 'total'.)

Attributes:
NameTypeReqSinceLogDescription
bytesnumber (uint64)ReqR5Yes

The number of bytes transferred so far in this attempt.

Your application must not depend on this reaching 'total' to mean the transfer succeeded or completed. Use the 'fileState' of the actual 'chatMessage' to determine the overall transfer state.

chatIdchat keyReqR5Yes

Holds the id of the chat that contains the attachment's message.

messageIdchatMessage keyReqR5Yes

Holds the id of the message (within that chat referred to by 'chatId') whose attachment's transfer progress is being reported.

totalnumber (uint64)ReqR5Yes

The total number of bytes expected in the transfer.

If for some reason the total number of bytes cannot be determined or if the total number of bytes is zero, the transfer will not report progress via this list. This doesn't mean that bbmcore isn't trying to perform the transfer in such cases.

Thus, this value is never zero and never changes until the list element is removed.

Examples:
[
    {
        "listAdd": {
            "elements": [
                {
                    "bytes": 0,
                    "chatId": "12",
                    "messageId": "2",
                    "total": 1000
                },
                {
                    "bytes": 16384,
                    "chatId": "1",
                    "messageId": "8122",
                    "total": 32768
                },
                {
                    "bytes": 400,
                    "chatId": "1",
                    "messageId": "8123",
                    "total": 400
                }
            ],
            "type": "chatMessageFileProgress"
        }
    },
    {
        "listRemove": {
            "elements": [
                {
                    "chatId": "12",
                    "messageId": "2"
                },
                {
                    "chatId": "1",
                    "messageId": "8122"
                },
                {
                    "chatId": "1",
                    "messageId": "8123"
                }
            ],
            "type": "chatMessageFileProgress"
        }
    },
    {
        "listElements": {
            "type": "chatMessageFileProgress"
        }
    },
    {
        "listChunk": {
            "elements": [
                {
                    "bytes": 0,
                    "chatId": "12",
                    "messageId": "2",
                    "total": 1000
                },
                {
                    "bytes": 16384,
                    "chatId": "1",
                    "messageId": "8122",
                    "total": 32768
                },
                {
                    "bytes": 400,
                    "chatId": "1",
                    "messageId": "8123",
                    "total": 400
                }
            ],
            "last": true,
            "type": "chatMessageFileProgress"
        }
    }
]

chatParticipant

TypechatParticipant
SinceR4
Primary keychatId, userUri
ActionsrequestListElements, requestListMatching
EventslistAdd, listChange, listElements, listRemove

This list holds the participants for each chat identified by chatId. The local user is never included in this list.

Attributes:
NameTypeReqSinceLogDescription
chatIdstringReqR4Yes

The id of the chat this participant is a member of.

flagsstringReqR4Yes

Compact read-only flags about the participant. Each flag that is 'true' has its corresponding letter present in the string. Each flag that is 'false' has its corresponding letter not present in the string. The letters will always be provided in alphabetical order.

Flag NameLetterSinceDescription
adminA R4 The participant is an admin for the chat. This only applies to chats without the 'oneToOne' flag.
statestringReqR4Yes

The current state of the participant.

This field is an enumeration.

MemberDescription
ActiveThe participant is active in the chat and will receive messages posted to the chat.
LeftThe participant has left the chat. They remain in the participant list to identify their historical messages.
PendingThe participant is in the process of being invited to a chat.
userUriuser keyReqR4Yes

The URI of the user this participant represents.

Action Details:
MessagerequestListMatching
Description

Use requestListMatching to lookup subsets of this list.

Criteria
NameTypeSinceDescription
chatIdstringR4When provided, all participants for the given chat will be returned. The local user's participant is not included. This criteria may not be used in combination with any other.
userUristringR5Must be used in combination with state. When provided, returns all participants from any chat if they match the given userUri and state.
statestringR5Must be used in combination with userUri.
Examples:
[
    {
        "listAdd": {
            "elements": [
                {
                    "chatId": "2398734",
                    "flags": "",
                    "state": "Active",
                    "userUri": "bbmpim://user/id/123"
                },
                {
                    "chatId": "77",
                    "flags": "A",
                    "state": "Pending",
                    "userUri": "bbmpim://user/id/321"
                }
            ],
            "type": "chatParticipant"
        }
    },
    {
        "listRemove": {
            "elements": [
                {
                    "chatId": "2398734",
                    "userUri": "bbmpim://user/id/123"
                },
                {
                    "chatId": "77",
                    "userUri": "bbmpim://user/id/321"
                }
            ],
            "type": "chatParticipant"
        }
    },
    {
        "listElements": {
            "type": "chatParticipant"
        }
    },
    {
        "listChunk": {
            "elements": [
                {
                    "chatId": "2398734",
                    "flags": "",
                    "state": "Active",
                    "userUri": "bbmpim://user/id/123"
                },
                {
                    "chatId": "77",
                    "flags": "A",
                    "state": "Pending",
                    "userUri": "bbmpim://user/id/321"
                }
            ],
            "last": true,
            "type": "chatParticipant"
        }
    }
]

global

Typeglobal
Since2.1
Primary keyname
ActionsrequestListChange, requestListElements
EventslistChange, listElements

This list holds the set of global variables exchanged between your application and bbmcore. The list uses string keys and mixed-type values. The key is the variable name. The set of valid variables and their meaning is documented in the 'globals' section.

Attributes:
NameTypeReqSinceLogDescription
namestringReq2.1Yes

String name of the global variable. This list has a closed set of valid variable names. See the 'global' section for information about the set of variables and their semantics.

valueanyReq2.1Yes

Value of the variable. The type depends on the variable name, so ignore what 'type' is documented for this attribute here.

Action Details:
MessagerequestListChange
Since2.1
Attributesvalue

requestListChange is used for modifying the value of a global variable. Certain globals are read-only and will ignore attempts to modify their value. The schema of the value attribute must match the schema of the global itself. See the documentation of the global for more information.

Examples:
[
    {
        "listElements": {
            "type": "global"
        }
    },
    {
        "listChunk": {
            "elements": [
                {
                    "name": "setupState",
                    "value": {
                        "progressMessage": "Restoring",
                        "state": "Ongoing"
                    }
                },
                {
                    "name": "endpointId",
                    "value": "asd4fgdffssf3987bb0a"
                }
            ],
            "last": true,
            "type": "global"
        }
    },
    {
        "listChange": {
            "elements": [
                {
                    "name": "setupState",
                    "value": {
                        "progressMessage": "Restoring",
                        "state": "Ongoing"
                    }
                },
                {
                    "name": "endpointId",
                    "value": "asd4fgdffssf3987bb0a"
                }
            ],
            "type": "global"
        }
    }
]

stat

Typestat
SinceR5
Primary keyname
ActionsrequestListAll
EventslistAll, listChange, listElements

Your application uses this list to retrieve stats that bbmcore has recorded about its operation and performance. Stats recorded by bbmcore are local to the device and do not contain personally identifiable information. bbmcore will only ever provide this data to your application when requested to do so.

Every time your application retrieves this list with 'requestListAll', it can contain different data. Bbmcore remembers what values were sent in the most recent 'stat' list collected by your application until your application sends a 'statsCommitted' message. When it receives 'statsCommitted', bbmcore considers the values in the most recently collected 'stat' list to have been exported by your application and committed permanently. After that 'statsCommitted' message, subsequent collections of stats with this list will no longer include that committed data.

If your application can't commit the values it collected with 'requestListAll', it must not send 'statsCommitted'. In such cases, the next copy of of this list that your application collects will be even more up to date and will include the data returned previously (back to the previous 'statsCommitted').

The values in this list persist across bbmcore restarts, and a 'statsCommitted' message can and will complete a 'stats' retrieval even if it was from a previous incarnation of bbmcore.

Statistics whose values are zero when the list is requested are not included in the list.

No 'listElements' or 'listChange' will ever be sent for this list.

This list does not define which statistics are recorded. Interpretation of the statistics is intended to be done by offline analysis and reporting.

Attributes:
NameTypeReqSinceLogDescription
countarrayReqR5Yes

The count(s) associated with this statistic.

Iff there are multiple elements, then this statistic has multiple parts, each with its own scalar counter. Each part that has a non-zero count will be included with a number in the 'count' array and its part name in the 'part' array. The part's name and number will be at corresponding positions in the two arrays.

If no 'part' array is present, then the statistic does not have multiple parts and the 'count' array will have only one element.

The following table describes the type of each array element.

TypeReqSinceLogDescription
number (uint64)ReqR5Yes

The count of this statistic (or this part of the statistic). This will always contain at least one element.

namestringReqR5Yes

The name of the statistic.

partarrayOptR5Yes

Iff there are multiple elements, then this statistic has multiple parts, each with its own scalar counter. Each part that has a non-zero count will be included with a number in the 'count' array and its part name in the 'part' array. The part's name and number will be at corresponding positions in the two arrays.

If no 'part' array is present, then the statistic does not have multiple parts and the 'count' array will have only one element.

The following table describes the type of each array element.

TypeReqSinceLogDescription
stringReqR5Yes

The name of this part of the statistic. If the 'part' array is present, it will always contain at least one part name.

Examples:
[
    {
        "listAll": {
            "type": "stat"
        }
    },
    {
        "listChunk": {
            "elements": [
                {
                    "count": [
                        1
                    ],
                    "name": "setup"
                },
                {
                    "count": [
                        77
                    ],
                    "name": "setup.err"
                },
                {
                    "count": [
                        12,
                        1,
                        2
                    ],
                    "name": "mailbox.addMember",
                    "part": [
                        "ok",
                        "500",
                        "400"
                    ]
                },
                {
                    "count": [
                        42
                    ],
                    "name": "mailbox.removeMember",
                    "part": [
                        "ok"
                    ]
                },
                {
                    "count": [
                        7,
                        102,
                        4
                    ],
                    "name": "msg",
                    "part": [
                        "Picture",
                        "Text",
                        "File"
                    ]
                },
                {
                    "count": [
                        1,
                        2,
                        4
                    ],
                    "name": "msg.thumb.Picture",
                    "part": [
                        "4K",
                        "8K",
                        "64K"
                    ]
                },
                {
                    "count": [
                        1,
                        2,
                        2,
                        1,
                        1
                    ],
                    "name": "msg.file.Picture",
                    "part": [
                        "256K",
                        "2M",
                        "3M",
                        "4M",
                        "8M"
                    ]
                },
                {
                    "count": [
                        2,
                        1,
                        1
                    ],
                    "name": "msg.file.File",
                    "part": [
                        "128K",
                        "48M",
                        "128M"
                    ]
                }
            ],
            "last": true,
            "type": "stat"
        }
    },
    {
        "listElements": {
            "type": "stat"
        }
    },
    {
        "listChunk": {
            "elements": [
                {
                    "count": [
                        1
                    ],
                    "name": "setup"
                },
                {
                    "count": [
                        77
                    ],
                    "name": "setup.err"
                },
                {
                    "count": [
                        12,
                        1,
                        2
                    ],
                    "name": "mailbox.addMember",
                    "part": [
                        "ok",
                        "500",
                        "400"
                    ]
                },
                {
                    "count": [
                        42
                    ],
                    "name": "mailbox.removeMember",
                    "part": [
                        "ok"
                    ]
                },
                {
                    "count": [
                        7,
                        102,
                        4
                    ],
                    "name": "msg",
                    "part": [
                        "Picture",
                        "Text",
                        "File"
                    ]
                },
                {
                    "count": [
                        1,
                        2,
                        4
                    ],
                    "name": "msg.thumb.Picture",
                    "part": [
                        "4K",
                        "8K",
                        "64K"
                    ]
                },
                {
                    "count": [
                        1,
                        2,
                        2,
                        1,
                        1
                    ],
                    "name": "msg.file.Picture",
                    "part": [
                        "256K",
                        "2M",
                        "3M",
                        "4M",
                        "8M"
                    ]
                },
                {
                    "count": [
                        2,
                        1,
                        1
                    ],
                    "name": "msg.file.File",
                    "part": [
                        "128K",
                        "48M",
                        "128M"
                    ]
                }
            ],
            "last": true,
            "type": "stat"
        }
    }
]

typing

Typetyping
SinceR4
Primary keyuserUri, chatId
ActionsrequestListAll, requestListElements
EventslistAdd, listAll, listChange, listElements, listRemove

This is used to store the set of users that are currently typing a message in a chat. When bbmcore believes the remote user to be typing a message in a chat, it will insert the user/chat pair into this list. When it no longer believes the user to be typing a message, it removes the pair from the list. The same user may be typing in multiple chats, and the same chat may contain multiple typing users. This list never contains entries for the local user. This list may contain entries for nonexistent users and chats.

Attributes:
NameTypeReqSinceLogDescription
chatIdchat keyReqR4Yes

Holds the id of the chat in which the user is typing.

messageIdchatMessage keyOptR6Yes

If supplied, this is the id of the 'chatMessage' the user is taking the action against as indicated by the 'tag' field. This field is never present without the 'tag' field. If the message identified by this field isn't known to the local endpoint when the typing notification arrives, the notification (including 'tag') will still be added to this list, but the 'messageId' field will be omitted.

tagstringOptR6Yes

Your application-specified tag that indicates what kind of typing action the user is performing. For example, this may be used to indicate that the user is taking a picture to send, recording a voice note, or editing an existing message. When omitted, your application must assume the user is typing a message.

userUriuser keyReqR4Yes

Holds the unique identifier of the user that is currently typing.

Examples:
[
    {
        "listAdd": {
            "elements": [
                {
                    "chatId": "239789432",
                    "userUri": "bbmpim://user/id/1"
                },
                {
                    "chatId": "17",
                    "tag": "VoiceNote",
                    "userUri": "bbmpim://user/id/5"
                },
                {
                    "chatId": "17",
                    "messageId": "90",
                    "tag": "Edit",
                    "userUri": "bbmpim://user/id/5"
                }
            ],
            "type": "typing"
        }
    },
    {
        "listAll": {
            "type": "typing"
        }
    },
    {
        "listChunk": {
            "elements": [
                {
                    "chatId": "239789432",
                    "userUri": "bbmpim://user/id/1"
                },
                {
                    "chatId": "17",
                    "tag": "VoiceNote",
                    "userUri": "bbmpim://user/id/5"
                },
                {
                    "chatId": "17",
                    "messageId": "90",
                    "tag": "Edit",
                    "userUri": "bbmpim://user/id/5"
                }
            ],
            "last": true,
            "type": "typing"
        }
    },
    {
        "listRemove": {
            "elements": [
                {
                    "chatId": "239789432",
                    "userUri": "bbmpim://user/id/1"
                },
                {
                    "chatId": "17",
                    "userUri": "bbmpim://user/id/5"
                },
                {
                    "chatId": "17",
                    "userUri": "bbmpim://user/id/5"
                }
            ],
            "type": "typing"
        }
    },
    {
        "listElements": {
            "type": "typing"
        }
    },
    {
        "listChunk": {
            "elements": [
                {
                    "chatId": "239789432",
                    "userUri": "bbmpim://user/id/1"
                },
                {
                    "chatId": "17",
                    "tag": "VoiceNote",
                    "userUri": "bbmpim://user/id/5"
                },
                {
                    "chatId": "17",
                    "messageId": "90",
                    "tag": "Edit",
                    "userUri": "bbmpim://user/id/5"
                }
            ],
            "last": true,
            "type": "typing"
        }
    }
]

user

Typeuser
Since2.0
Primary keyuri
ActionsrequestListChange, requestListElements, requestListMatching
EventslistAdd, listChange, listElements, listRemove

This list consists of all the users known to bbmcore. Other lists, such as the 'participant' list, often refer to entries in this 'user' list. Your application never requests the list in full. Instead, it uses 'requestListElements' calls to lookup one or more users by their 'uri'.

Attributes:
NameTypeReqSinceLogDescription
keyStatestringOpt
Synced
R3Yes

The current state of the user's keys. A new protected user is created in the 'Import' state.

This field is an enumeration.

MemberDescription
ImportThe user's keys need to be retrieved from external storage and imported into bbmcore. When using Cloud Key Storage, your application must perform this import using 'userKeysImport'. When using the BlackBerry Key Management Service (KMS), bbmcore will do this automatically.
SyncedThe user's keys are synced.
pinstringOptR4No

Holds the user's PIN as an 8-character lowercase hexadecimal string. This field will be omitted when the user has no PIN.

regIdstring (int64)Opt2014.10No

Holds the unique identifier for the user. This identifier is exposed to partner applications. If this field is not present, it indicates that the user does not have a regId or that the regId is unknown.

uristringReq2.1Yes

Holds the unique identifier for the user. See the URIs section for information on the URI format.

Action Details:
MessagerequestListMatching
Description

Use requestListMatching to lookup subsets of this list.

Criteria
NameTypeSinceDescription
regIdstring (int64)2014.10Match a single user by regId. This is mutually exclusive with all other criteria. Returns an empty list if no match is found, any other criteria are specified, or any errors are encountered.
pinstringR3Match a single user by PIN. This is mutually exclusive with all other criteria. Returns an empty list if no match is found, any other criteria are specified, or any errors are encountered.
keyStatestringR3Match all users with the given 'keyState'. The local user is not returned. Its 'keyState' can be queried via the 'profileKeysState' global. This is mutually exclusive with all other criteria. Returns an empty list if no match is found, any other criteria are specified, or any errors are encountered.
Examples:
[
    {
        "listAdd": {
            "elements": [
                {
                    "avatarHash": "450235345",
                    "category": "Colleagues",
                    "displayName": "J. Binks",
                    "flags": "EPR",
                    "isContact": true,
                    "keyState": "Import",
                    "maxVcardSize": 15,
                    "nickname": "J. Binks",
                    "personalMessage": "Busy writing scripts",
                    "personalMessageTimestamp": "98739872",
                    "uri": "bbmpim://dbid/93"
                },
                {
                    "avatarHash": "150235345",
                    "category": "",
                    "displayName": "G. Smith",
                    "flags": "PQS",
                    "isContact": false,
                    "keyState": "Synced",
                    "maxVcardSize": 194,
                    "nickname": "G. Smith",
                    "personalMessage": "Destroy him, my robots.",
                    "personalMessageTimestamp": "28739872",
                    "uri": "bbmpim://dbid/33"
                },
                {
                    "avatarHash": "34234321",
                    "category": "",
                    "displayName": "H. Solo",
                    "flags": "ER",
                    "isContact": true,
                    "keyState": "Synced",
                    "maxVcardSize": 0,
                    "nickname": "H. Solo",
                    "personalMessage": "I shot first",
                    "personalMessageTimestamp": "2987392",
                    "uri": "bbmpim://dbid/100"
                },
                {
                    "avatarHash": "235345",
                    "category": "",
                    "displayName": "John Smith",
                    "flags": "EPQ",
                    "isContact": false,
                    "keyState": "Synced",
                    "maxVcardSize": 0,
                    "nickname": "John from work",
                    "personalMessage": "Boom goes the dynamite",
                    "personalMessageTimestamp": "3434344",
                    "uri": "bbmpim://dbid/400"
                },
                {
                    "avatarHash": "650235345",
                    "category": "",
                    "displayName": "John Traveller",
                    "flags": "EFPRZ",
                    "isContact": true,
                    "keyState": "Synced",
                    "lastConnectedTime": "1432580033",
                    "maxVcardSize": 0,
                    "nickname": "Johnny",
                    "personalMessage": "",
                    "regId": "123456789012",
                    "uri": "bbmpim://dbid/500"
                },
                {
                    "avatarHash": "9024296666",
                    "category": "Rebels",
                    "displayName": "David",
                    "flags": "EFPR",
                    "isContact": false,
                    "keyState": "Synced",
                    "maxVcardSize": 0,
                    "nickname": "",
                    "org": {
                        "firstName": "David",
                        "id": "a1taxi",
                        "lastName": "Jones",
                        "readOnly": true
                    },
                    "personalMessage": "",
                    "pin": "ca224cbb",
                    "regId": "19024296666",
                    "uri": "bbmpim://dbid/99"
                },
                {
                    "avatarHash": "9024296666",
                    "category": "",
                    "displayName": "JC",
                    "flags": "EFPR",
                    "isContact": false,
                    "keyState": "Synced",
                    "maxVcardSize": 0,
                    "nickname": "",
                    "org": {
                        "department": "Executives",
                        "firstName": "John",
                        "id": "blackberry",
                        "lastName": "Chen",
                        "readOnly": false,
                        "title": "CEO"
                    },
                    "personalMessage": "",
                    "pin": "ffff1111",
                    "regId": "1902429777",
                    "uri": "bbmpim://dbid/99"
                }
            ],
            "type": "user"
        }
    },
    {
        "listRemove": {
            "elements": [
                {
                    "uri": "bbmpim://dbid/93"
                },
                {
                    "uri": "bbmpim://dbid/33"
                },
                {
                    "uri": "bbmpim://dbid/100"
                },
                {
                    "uri": "bbmpim://dbid/400"
                },
                {
                    "uri": "bbmpim://dbid/500"
                },
                {
                    "uri": "bbmpim://dbid/99"
                },
                {
                    "uri": "bbmpim://dbid/99"
                }
            ],
            "type": "user"
        }
    },
    {
        "listElements": {
            "type": "user"
        }
    },
    {
        "listChunk": {
            "elements": [
                {
                    "avatarHash": "450235345",
                    "category": "Colleagues",
                    "displayName": "J. Binks",
                    "flags": "EPR",
                    "isContact": true,
                    "keyState": "Import",
                    "maxVcardSize": 15,
                    "nickname": "J. Binks",
                    "personalMessage": "Busy writing scripts",
                    "personalMessageTimestamp": "98739872",
                    "uri": "bbmpim://dbid/93"
                },
                {
                    "avatarHash": "150235345",
                    "category": "",
                    "displayName": "G. Smith",
                    "flags": "PQS",
                    "isContact": false,
                    "keyState": "Synced",
                    "maxVcardSize": 194,
                    "nickname": "G. Smith",
                    "personalMessage": "Destroy him, my robots.",
                    "personalMessageTimestamp": "28739872",
                    "uri": "bbmpim://dbid/33"
                },
                {
                    "avatarHash": "34234321",
                    "category": "",
                    "displayName": "H. Solo",
                    "flags": "ER",
                    "isContact": true,
                    "keyState": "Synced",
                    "maxVcardSize": 0,
                    "nickname": "H. Solo",
                    "personalMessage": "I shot first",
                    "personalMessageTimestamp": "2987392",
                    "uri": "bbmpim://dbid/100"
                },
                {
                    "avatarHash": "235345",
                    "category": "",
                    "displayName": "John Smith",
                    "flags": "EPQ",
                    "isContact": false,
                    "keyState": "Synced",
                    "maxVcardSize": 0,
                    "nickname": "John from work",
                    "personalMessage": "Boom goes the dynamite",
                    "personalMessageTimestamp": "3434344",
                    "uri": "bbmpim://dbid/400"
                },
                {
                    "avatarHash": "650235345",
                    "category": "",
                    "displayName": "John Traveller",
                    "flags": "EFPRZ",
                    "isContact": true,
                    "keyState": "Synced",
                    "lastConnectedTime": "1432580033",
                    "maxVcardSize": 0,
                    "nickname": "Johnny",
                    "personalMessage": "",
                    "regId": "123456789012",
                    "uri": "bbmpim://dbid/500"
                },
                {
                    "avatarHash": "9024296666",
                    "category": "Rebels",
                    "displayName": "David",
                    "flags": "EFPR",
                    "isContact": false,
                    "keyState": "Synced",
                    "maxVcardSize": 0,
                    "nickname": "",
                    "org": {
                        "firstName": "David",
                        "id": "a1taxi",
                        "lastName": "Jones",
                        "readOnly": true
                    },
                    "personalMessage": "",
                    "pin": "ca224cbb",
                    "regId": "19024296666",
                    "uri": "bbmpim://dbid/99"
                },
                {
                    "avatarHash": "9024296666",
                    "category": "",
                    "displayName": "JC",
                    "flags": "EFPR",
                    "isContact": false,
                    "keyState": "Synced",
                    "maxVcardSize": 0,
                    "nickname": "",
                    "org": {
                        "department": "Executives",
                        "firstName": "John",
                        "id": "blackberry",
                        "lastName": "Chen",
                        "readOnly": false,
                        "title": "CEO"
                    },
                    "personalMessage": "",
                    "pin": "ffff1111",
                    "regId": "1902429777",
                    "uri": "bbmpim://dbid/99"
                }
            ],
            "last": true,
            "type": "user"
        }
    },
    {
        "listChange": {
            "elements": [
                {
                    "nickname": "J. Binks",
                    "uri": "bbmpim://dbid/93"
                },
                {
                    "nickname": "G. Smith",
                    "uri": "bbmpim://dbid/33"
                },
                {
                    "nickname": "H. Solo",
                    "uri": "bbmpim://dbid/100"
                },
                {
                    "nickname": "John from work",
                    "uri": "bbmpim://dbid/400"
                },
                {
                    "nickname": "Johnny",
                    "uri": "bbmpim://dbid/500"
                },
                {
                    "nickname": "",
                    "uri": "bbmpim://dbid/99"
                },
                {
                    "nickname": "",
                    "uri": "bbmpim://dbid/99"
                }
            ],
            "type": "user"
        }
    }
]

All Globals

authTokenState

NameauthTokenState
Since2016.03

This global indicates if bbmcore requires an authToken value from your application, using the 'authToken' message. The authToken value is used by identity providers to grant further authorization within the BlackBerry Infrastructure.

Bbmcore will try to avoid requesting authToken values as much as possible.

Your application may rely on bbmcore to rate limit how often this global value is something other than 'Ok'. Your application should react automatically when this global's value changes.

Attributes:
TypeReqSinceLogDescription
stringReq2016.03Yes

The current state of the authToken value in bbmcore.

This field is an enumeration.

MemberDescription
Needed

bbmcore doesn't currently have a usable authToken value. To continue any communication with the BlackBerry Infrastructure, your application must provide an authToken using the 'authToken' message. If the 'authTokenState' is 'Needed', setup can't proceed.

The first time setup is initiated by the 'authToken' message, the 'authTokenState' will be 'Needed'. However, there are a number of other conditions that can cause the state to change to 'Needed', such as a failed setup attempt, or an internal refresh of authentication.

OkBbmcore has a usable authToken value, and it doesn't require another value from your application. If your application has a reason to supply an updated authToken value, it can be updated without solicitation.
Rejectedbbmcore attempted to use a previously-supplied authToken value, but the value (or its derivative products) was rejected during authentication or authorization. In this state, your application must provide an authToken using the 'authToken' message. However, your application is encouraged to re-assert the user's identity before providing an updated authToken value, and the user might need to be prompted to log in again, or your application might need to clear cached credentials.
Examples:
[
    {
        "listElements": {
            "type": "global"
        }
    },
    {
        "listChunk": {
            "elements": [
                {
                    "name": "authTokenState",
                    "value": "Needed"
                }
            ],
            "last": true,
            "type": "global"
        }
    },
    {
        "listChange": {
            "elements": [
                {
                    "name": "authTokenState",
                    "value": "Needed"
                }
            ],
            "type": "global"
        }
    },
    {
        "listElements": {
            "type": "global"
        }
    },
    {
        "listChunk": {
            "elements": [
                {
                    "name": "authTokenState",
                    "value": "Ok"
                }
            ],
            "last": true,
            "type": "global"
        }
    },
    {
        "listChange": {
            "elements": [
                {
                    "name": "authTokenState",
                    "value": "Ok"
                }
            ],
            "type": "global"
        }
    }
]

chatMessageFileAutoDownload

NamechatMessageFileAutoDownload
SinceR5

This controls whether bbmcore will automatically download newly received file attachments.

Regardless of this setting, your application can ask for individual attachments to be downloaded using the 'chatMessageFileDownload' request.

Attributes:
TypeReqSinceLogDescription
booleanReqR5Yes

When true (the default), bbmcore will download any 'chatMessage' file attachments as soon as it receives a message with an attachment in a 'Ready' chat. (Messages downloaded as part of chat restoration or joining a chat are never automatically downloaded even when 'chatMessageFileAutoDownload' is set to true. Such file attachments remain in the 'Available' state.)

When false, bbmcore will not automatically download any 'chatMessage' file attachments. Available file attachments will remain in the 'Available' state.

Action Details:
MessagerequestListChange
SinceR5
Attributesvalue

Your application can change the 'chatMessageFileAutoDownload' setting with 'requestListChange' on the 'global' list.

Examples:
[
    {
        "listElements": {
            "type": "global"
        }
    },
    {
        "listChunk": {
            "elements": [
                {
                    "name": "chatMessageFileAutoDownload",
                    "value": true
                }
            ],
            "last": true,
            "type": "global"
        }
    },
    {
        "listChange": {
            "elements": [
                {
                    "name": "chatMessageFileAutoDownload",
                    "value": true
                }
            ],
            "type": "global"
        }
    }
]

endpointId

NameendpointId
SinceR5

The identifier for this endpoint. This must be treated as an opaque value by application.

Attributes:
TypeReqSinceLogDescription
stringReqR5No
Examples:
[
    {
        "listElements": {
            "type": "global"
        }
    },
    {
        "listChunk": {
            "elements": [
                {
                    "name": "endpointId",
                    "value": "asd4fgdffssf3987bb0a"
                }
            ],
            "last": true,
            "type": "global"
        }
    },
    {
        "listChange": {
            "elements": [
                {
                    "name": "endpointId",
                    "value": "asd4fgdffssf3987bb0a"
                }
            ],
            "type": "global"
        }
    }
]

localPin

NamelocalPin
Since2.1

Associates the PIN that is assigned by the BlackBerry Infrastructure with the local profile. The PIN is an 8-character hexadecimal string (in lower case), or it is an empty string if no PIN is currently assigned to the local profile.

Attributes:
TypeReqSinceLogDescription
stringReq2.1No
Examples:
[
    {
        "listElements": {
            "type": "global"
        }
    },
    {
        "listChunk": {
            "elements": [
                {
                    "name": "localPin",
                    "value": "3987bb0a"
                }
            ],
            "last": true,
            "type": "global"
        }
    },
    {
        "listChange": {
            "elements": [
                {
                    "name": "localPin",
                    "value": "3987bb0a"
                }
            ],
            "type": "global"
        }
    },
    {
        "listElements": {
            "type": "global"
        }
    },
    {
        "listChunk": {
            "elements": [
                {
                    "name": "localPin",
                    "value": ""
                }
            ],
            "last": true,
            "type": "global"
        }
    },
    {
        "listChange": {
            "elements": [
                {
                    "name": "localPin",
                    "value": ""
                }
            ],
            "type": "global"
        }
    }
]

localUri

NamelocalUri
Since2.2

This holds the local user's URI as a foreign key into 'listUser'. When a user URI appears elsewhere in the protocol, your application compares the user URI to the 'localUri' value, to determine if the URI refers to the local user.

Attributes:
TypeReqSinceLogDescription
user keyReq2.2No
Examples:
[
    {
        "listElements": {
            "type": "global"
        }
    },
    {
        "listChunk": {
            "elements": [
                {
                    "name": "localUri",
                    "value": "bbmpim://user/id/0"
                }
            ],
            "last": true,
            "type": "global"
        }
    },
    {
        "listChange": {
            "elements": [
                {
                    "name": "localUri",
                    "value": "bbmpim://user/id/0"
                }
            ],
            "type": "global"
        }
    }
]

profileKeysState

NameprofileKeysState
SinceR3

Indicates the current state of the profile's signing and encryption key pairs.

This state only applies when your application uses Cloud Key Storage without the BlackBerry Key Management Service.

Attributes:
TypeReqSinceLogDescription
stringReqR3Yes

The current state of the profile's keys. A new profile is created in the 'NotSynced' state.

This field is an enumeration.

MemberDescription
NotSyncedThe profile's keys are not synced. The profile's keys need to be either imported into bbmcore via 'profileKeysImport', or exported from bbmcore via 'profileKeysExport' and put into external storage.
SyncedThe profile's keys are synced.
Action Details:
MessagerequestListChange
SinceR3
Attributesvalue

requestListChange can be used to set the state to 'Synced'.

Examples:
[
    {
        "listElements": {
            "type": "global"
        }
    },
    {
        "listChunk": {
            "elements": [
                {
                    "name": "profileKeysState",
                    "value": "Synced"
                }
            ],
            "last": true,
            "type": "global"
        }
    },
    {
        "listChange": {
            "elements": [
                {
                    "name": "profileKeysState",
                    "value": "Synced"
                }
            ],
            "type": "global"
        }
    },
    {
        "listElements": {
            "type": "global"
        }
    },
    {
        "listChunk": {
            "elements": [
                {
                    "name": "profileKeysState",
                    "value": "NotSynced"
                }
            ],
            "last": true,
            "type": "global"
        }
    },
    {
        "listChange": {
            "elements": [
                {
                    "name": "profileKeysState",
                    "value": "NotSynced"
                }
            ],
            "type": "global"
        }
    }
]

registrationToken

NameregistrationToken
SinceR5

In R5, endpoints are given this registration token when they are assigned a regId during setup. This token is signed by the BlackBerry Infrastructure. When decoded, the token contains trusted information about the association of your application user id (as passed to 'authToken') with the assigned regId. The steps for decoding and verifying the registration token are explained in detail in the Developer Guide.

Endpoints that have not yet been assigned a regId and endpoints that were assigned a regId before the R5 release do not have a registration token value. In those endpoints, this global will be the empty string.

Attributes:
TypeReqSinceLogDescription
stringReqR5No

The registration token given to this endpoint during setup, or the empty string. See above.

Examples:
[
    {
        "listElements": {
            "type": "global"
        }
    },
    {
        "listChunk": {
            "elements": [
                {
                    "name": "registrationToken",
                    "value": "50yjSGScACkfrdPE3CHibuopdF7yQWulFafTepbtOCcALhslpwudzZ7X3cMfwUP9Q8aT52GkwXJ2yqEbSLpkJepHbqwrNOVrirlzoChDXk40mEP6kxqi9uw7uY13UkFz"
                }
            ],
            "last": true,
            "type": "global"
        }
    },
    {
        "listChange": {
            "elements": [
                {
                    "name": "registrationToken",
                    "value": "50yjSGScACkfrdPE3CHibuopdF7yQWulFafTepbtOCcALhslpwudzZ7X3cMfwUP9Q8aT52GkwXJ2yqEbSLpkJepHbqwrNOVrirlzoChDXk40mEP6kxqi9uw7uY13UkFz"
                }
            ],
            "type": "global"
        }
    }
]

setupAccount

NamesetupAccount
Since2015.04

Indicates if a new or existing Spark Communications identity was used during the most recent setup attempt. Note: the value of this global changes before setup is complete. To see what kind of identity was used for the most recent setup attempt that was successful, check this 'setupAccount' value when 'setupState' transitions to 'Success'.

Attributes:
TypeReqSinceLogDescription
stringReq2015.04Yes

Indicates what kind of identity was used for the most recent attempt to set up Spark Communications Services.

This field is an enumeration.

MemberDescription
ExistingAn existing Spark Communications identity was used during the most recent attempt to set up.
NewA new Spark Communications identity was used during the most recent attempt to set up.
NoneNo attempt has been made to set up Spark Communications Services.
Examples:
[
    {
        "listElements": {
            "type": "global"
        }
    },
    {
        "listChunk": {
            "elements": [
                {
                    "name": "setupAccount",
                    "value": "None"
                }
            ],
            "last": true,
            "type": "global"
        }
    },
    {
        "listChange": {
            "elements": [
                {
                    "name": "setupAccount",
                    "value": "None"
                }
            ],
            "type": "global"
        }
    },
    {
        "listElements": {
            "type": "global"
        }
    },
    {
        "listChunk": {
            "elements": [
                {
                    "name": "setupAccount",
                    "value": "New"
                }
            ],
            "last": true,
            "type": "global"
        }
    },
    {
        "listChange": {
            "elements": [
                {
                    "name": "setupAccount",
                    "value": "New"
                }
            ],
            "type": "global"
        }
    },
    {
        "listElements": {
            "type": "global"
        }
    },
    {
        "listChunk": {
            "elements": [
                {
                    "name": "setupAccount",
                    "value": "Existing"
                }
            ],
            "last": true,
            "type": "global"
        }
    },
    {
        "listChange": {
            "elements": [
                {
                    "name": "setupAccount",
                    "value": "Existing"
                }
            ],
            "type": "global"
        }
    }
]

setupState

NamesetupState
Since2.1

This indicates the state of the setup process.

Endpoint setup includes registering the endpoint with the BlackBerry Infrastructure and synchronizing the endpoint's copy of identity data, including any security keys.

The following diagram demonstrates the flow of state changes in 'setupState' for all modes of setup:

Attributes:
NameTypeReqSinceLogDescription
progressMessagestringOpt2.1Yes

When the 'state' is 'Ongoing', this indicates the current phase of setup. When the 'state' is not 'Ongoing', this field is omitted or set to 'Unknown'.

This field is an enumeration.

MemberDescription
CompletingSetup is completing with a new registration.
RestoringThe user's Spark Communications identity information is being restored from the BlackBerry Infrastructure.
TransferringThe user's Spark Communications identity information is being transferred.
UnknownThe current state of the progress is unknown or not applicable.
statestringReq2.1Yes

This indicates the current setup state.

The initial 'authToken' request triggers bbmcore to begin setup. However, 'authTokenState' transitions don't change the setup state. For example, the 'authTokenState' transitions to 'Rejected' or 'Needed', setup doesn't fail (but it might not succeed until a usable 'authToken' is provided). The 'authTokenState' and the 'setupState' are independent, but 'authToken' can trigger a setup attempt when 'setupState' is set to 'NotRequested'.

The only way to stop setup after it starts is by sending the 'wipe' command to delete all bbmcore data.

When certain minor errors occur during setup, bbmcore automatically retries the setup by using the 'retryServerRequests' message. These minor errors are handled by bbmcore, and they don't result in 'state' changes.

This field is an enumeration.

MemberDescription
DeviceSwitchRequiredA device switch is required for setup to proceed. bbmcore is waiting for 'setupRetry' as a confirmation from your application. Once the confirmation is received, the 'state' will return to 'Ongoing'.
FullAt least one other endpoint must be removed before setup may proceed. Endpoints may be removed using 'endpointDeregister'. After removing some endpoints, setup may be retried using 'setupRetry'. Once a retry is started, the 'state' will return to 'Ongoing'.
NotRequestedEndpoint setup hasn't started. In this state, bbmcore is waiting for 'authToken' before proceeding (see that message for more details).
OngoingIndicates that bbmcore is performing actions that will cause a state change. The current progress message is obtained from the 'progressMessage' attribute.
SuccessIndicates setup was successful.
SyncRequired

This endpoint must be synchronized before setup can proceed. bbmcore is waiting for 'syncStart' to start the sync. Once the sync is started, the 'state' will move to 'SyncStarted'.

This occurs only when your application uses the BlackBerry Key Management Service (KMS). In such applications, all endpoints must synchronize with KMS during setup. In this state, bbmcore either needs the passcode for existing sync data, or it needs a new passcode to create new sync data.

The 'syncStart' documentation explains how to provide bbmcore with the information necessary to proceed from this state.

SyncStarted

The endpoint sync has been started.

This occurs only when your application uses the BlackBerry Key Management Service (KMS).

Examples:
[
    {
        "listElements": {
            "type": "global"
        }
    },
    {
        "listChunk": {
            "elements": [
                {
                    "name": "setupState",
                    "value": {
                        "state": "Success"
                    }
                }
            ],
            "last": true,
            "type": "global"
        }
    },
    {
        "listChange": {
            "elements": [
                {
                    "name": "setupState",
                    "value": {
                        "state": "Success"
                    }
                }
            ],
            "type": "global"
        }
    },
    {
        "listElements": {
            "type": "global"
        }
    },
    {
        "listChunk": {
            "elements": [
                {
                    "name": "setupState",
                    "value": {
                        "progressMessage": "Transferring",
                        "state": "Ongoing"
                    }
                }
            ],
            "last": true,
            "type": "global"
        }
    },
    {
        "listChange": {
            "elements": [
                {
                    "name": "setupState",
                    "value": {
                        "progressMessage": "Transferring",
                        "state": "Ongoing"
                    }
                }
            ],
            "type": "global"
        }
    }
]

syncPasscodeState

NamesyncPasscodeState
SinceR6

This state is only used when your application uses the BlackBerry Key Management Service and the 'setupState' is 'SyncRequired'.

When your application sees 'setupState' change to 'SyncRequired', it should examine this global.

  1. When 'syncPasscodeState' is 'None', your application should wait for 'syncPasscodeState' to change before sending 'syncStart'.
  2. When 'syncPasscodeState' is not 'None', its value is already current and your application does not have to wait.

See 'syncStart' for more information.

Attributes:
TypeReqSinceLogDescription
stringReqR6Yes

This state tells your application whether bbmcore requires a passcode during the endpoint sync phase of setup.

This field is an enumeration.

MemberDescription
ExistingExisting sync data was found and is protected by a passcode. Your application must provide the existing passcode to bbmcore once the 'setupState' is 'state' 'SyncRequired' by sending 'syncStart' with 'action' set to 'Existing'. See that message for more information.
NewNo usable existing sync data was found. Your application must provide a new passcode to bbmcore once the 'setupState' is 'state' 'SyncRequired' by sending 'syncStart' with 'action' set to 'New'. See that message for more information.
NoneNo sync passcode is required by bbmcore.
Examples:
[
    {
        "listElements": {
            "type": "global"
        }
    },
    {
        "listChunk": {
            "elements": [
                {
                    "name": "syncPasscodeState",
                    "value": "None"
                }
            ],
            "last": true,
            "type": "global"
        }
    },
    {
        "listChange": {
            "elements": [
                {
                    "name": "syncPasscodeState",
                    "value": "None"
                }
            ],
            "type": "global"
        }
    },
    {
        "listElements": {
            "type": "global"
        }
    },
    {
        "listChunk": {
            "elements": [
                {
                    "name": "syncPasscodeState",
                    "value": "New"
                }
            ],
            "last": true,
            "type": "global"
        }
    },
    {
        "listChange": {
            "elements": [
                {
                    "name": "syncPasscodeState",
                    "value": "New"
                }
            ],
            "type": "global"
        }
    },
    {
        "listElements": {
            "type": "global"
        }
    },
    {
        "listChunk": {
            "elements": [
                {
                    "name": "syncPasscodeState",
                    "value": "Existing"
                }
            ],
            "last": true,
            "type": "global"
        }
    },
    {
        "listChange": {
            "elements": [
                {
                    "name": "syncPasscodeState",
                    "value": "Existing"
                }
            ],
            "type": "global"
        }
    }
]

syncing

Namesyncing
SinceR7

This global boolean indicates when bbmcore is performing reconnect synchronization with the BlackBerry Infrastructure. On mobile OSes and within other environments that are aggressive about terminating or suspending applications, your application should take steps to keep bbmcore running while this global is true.

For example, consider an Android application that receives push notifications when there are protocol messages waiting for bbmcore to fetch from the BlackBerry Infrastructure. Your application could use this global as part of the following strategy.

  1. When your application receives the push, it raises a "connected" foreground notification (if one is not already raised) that will keep your application running.
  2. When that notification is raised, your application starts a short timer. This timer will give bbmcore time to connect to the BlackBerry Infrastructure, which will happen before this global is raised. If this timer expires, your application "gives up" on waiting for the global to change, and removes the foreground notification.
  3. Your application then forwards that push notification to the lower layers which will react by connecting to the BlackBerry Infrastructure.
  4. Once bbmcore has successfully connected, it changes the 'syncing' global to 'true'. In response, your application raises the notification if it isn't already raised. Your application also sets or extends the notification timer for a longer duration. Again, if that timer expires, your application removes the notification.
  5. When the syncing process completes, bbmcore changes the 'syncing' global back to 'false'. In response, if the notification is still raised, your application removes it and cancels the timer.

In extreme circumstances, the 'syncing' global can remain true for a long time as bbmcore attempts to recover from unusual failure cases. The timers described above give your application control over the maximum duration it is willing to keep the notification raised.

Attributes:
TypeReqSinceLogDescription
booleanReqR7No
Examples:
[
    {
        "listElements": {
            "type": "global"
        }
    },
    {
        "listChunk": {
            "elements": [
                {
                    "name": "syncing",
                    "value": true
                }
            ],
            "last": true,
            "type": "global"
        }
    },
    {
        "listChange": {
            "elements": [
                {
                    "name": "syncing",
                    "value": true
                }
            ],
            "type": "global"
        }
    }
]