Reference
Objects
The core JSON objects returned by dmbridge.
These JSON objects use shared fields for X and Instagram. Fields that cannot
be represented consistently across both platforms remain in providerData.
Contract schema version 6. This page is rendered directly from
contracts/dmbridge/schemas.json.| Property | Type | Required |
|---|---|---|
| userID | string | yes |
| username | string | null | yes |
| displayName | string | null | yes |
JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"userID": {
"type": "string",
"minLength": 1
},
"username": {
"type": [
"string",
"null"
]
},
"displayName": {
"type": [
"string",
"null"
]
}
},
"required": [
"userID",
"username",
"displayName"
],
"additionalProperties": false,
"$id": "https://dmbridge.dev/schemas/v6/participant.json"
}| Property | Type | Required |
|---|---|---|
| attachmentID | string | yes |
| type | "image" | "video" | "audio" | "voice" | "file" | "gif" | "sticker" | "link" | "location" | "contact" | "sharedPost" | "sharedStory" | "sharedReel" | "reply" | "quote" | "system" | "deleted" | "unsupported" | "unknown" | yes |
| mediaType | string | null | yes |
| filename | string | null | yes |
| sourceURL | string (uri) | null | yes |
| providerData | object | no |
JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"attachmentID": {
"type": "string",
"minLength": 1
},
"type": {
"type": "string",
"enum": [
"image",
"video",
"audio",
"voice",
"file",
"gif",
"sticker",
"link",
"location",
"contact",
"sharedPost",
"sharedStory",
"sharedReel",
"reply",
"quote",
"system",
"deleted",
"unsupported",
"unknown"
]
},
"mediaType": {
"type": [
"string",
"null"
]
},
"filename": {
"type": [
"string",
"null"
]
},
"sourceURL": {
"anyOf": [
{
"type": "string",
"format": "uri"
},
{
"type": "null"
}
]
},
"providerData": {
"type": "object",
"additionalProperties": true
}
},
"required": [
"attachmentID",
"type",
"mediaType",
"filename",
"sourceURL"
],
"additionalProperties": false,
"$id": "https://dmbridge.dev/schemas/v6/attachment.json"
}| Property | Type | Required |
|---|---|---|
| reaction | string | yes |
| userIDs | array<string> | yes |
| reactedByAuthenticatedUser | boolean | null | yes |
JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"reaction": {
"type": "string",
"minLength": 1
},
"userIDs": {
"type": "array",
"items": {
"type": "string"
}
},
"reactedByAuthenticatedUser": {
"type": [
"boolean",
"null"
]
}
},
"required": [
"reaction",
"userIDs",
"reactedByAuthenticatedUser"
],
"additionalProperties": false,
"$id": "https://dmbridge.dev/schemas/v6/reaction.json"
}| Property | Type | Required |
|---|---|---|
| messageID | string | yes |
| conversationID | string | yes |
| senderID | string | null | yes |
| senderUsername | string | null | yes |
| sentAt | string (date-time) | null | yes |
| type | "text" | "image" | "video" | "audio" | "voice" | "file" | "gif" | "sticker" | "link" | "location" | "contact" | "sharedPost" | "sharedStory" | "sharedReel" | "reply" | "quote" | "system" | "deleted" | "unsupported" | "unknown" | yes |
| text | string | null | yes |
| direction | "inbound" | "outbound" | "unknown" | yes |
| replyToMessageID | string | null | yes |
| read | boolean | null | yes |
| attachments | array<attachment> | yes |
| reactions | array<reaction> | yes |
| providerType | string | null | yes |
| providerData | object | no |
JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"messageID": {
"type": "string",
"minLength": 1
},
"conversationID": {
"type": "string",
"minLength": 1
},
"senderID": {
"type": [
"string",
"null"
]
},
"senderUsername": {
"type": [
"string",
"null"
]
},
"sentAt": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"type": {
"type": "string",
"enum": [
"text",
"image",
"video",
"audio",
"voice",
"file",
"gif",
"sticker",
"link",
"location",
"contact",
"sharedPost",
"sharedStory",
"sharedReel",
"reply",
"quote",
"system",
"deleted",
"unsupported",
"unknown"
]
},
"text": {
"type": [
"string",
"null"
]
},
"direction": {
"type": "string",
"enum": [
"inbound",
"outbound",
"unknown"
]
},
"replyToMessageID": {
"type": [
"string",
"null"
]
},
"read": {
"type": [
"boolean",
"null"
]
},
"attachments": {
"type": "array",
"items": {
"$ref": "https://dmbridge.dev/schemas/v6/attachment.json"
}
},
"reactions": {
"type": "array",
"items": {
"$ref": "https://dmbridge.dev/schemas/v6/reaction.json"
}
},
"providerType": {
"type": [
"string",
"null"
]
},
"providerData": {
"type": "object",
"additionalProperties": true
}
},
"required": [
"messageID",
"conversationID",
"senderID",
"senderUsername",
"sentAt",
"type",
"text",
"direction",
"replyToMessageID",
"read",
"attachments",
"reactions",
"providerType"
],
"additionalProperties": false,
"$id": "https://dmbridge.dev/schemas/v6/message.json"
}| Property | Type | Required |
|---|---|---|
| conversationID | string | yes |
| type | "direct" | "group" | "unknown" | yes |
| protocol | "standard" | "xchat" | "instagram" | yes |
| title | string | null | yes |
| participants | array<participant> | yes |
| unreadCount | integer | null | yes |
| unread | boolean | null | yes |
| latestMessageAt | string (date-time) | null | yes |
| latestMessageID | string | null | yes |
| lastReadMessageID | string | null | yes |
| muted | boolean | null | yes |
| archived | boolean | null | yes |
| providerData | object | no |
JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"conversationID": {
"type": "string",
"minLength": 1
},
"type": {
"type": "string",
"enum": [
"direct",
"group",
"unknown"
]
},
"protocol": {
"type": "string",
"enum": [
"standard",
"xchat",
"instagram"
]
},
"title": {
"type": [
"string",
"null"
]
},
"participants": {
"type": "array",
"items": {
"$ref": "https://dmbridge.dev/schemas/v6/participant.json"
}
},
"unreadCount": {
"anyOf": [
{
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"unread": {
"type": [
"boolean",
"null"
]
},
"latestMessageAt": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"latestMessageID": {
"type": [
"string",
"null"
]
},
"lastReadMessageID": {
"type": [
"string",
"null"
]
},
"muted": {
"type": [
"boolean",
"null"
]
},
"archived": {
"type": [
"boolean",
"null"
]
},
"providerData": {
"type": "object",
"additionalProperties": true
}
},
"required": [
"conversationID",
"type",
"protocol",
"title",
"participants",
"unreadCount",
"unread",
"latestMessageAt",
"latestMessageID",
"lastReadMessageID",
"muted",
"archived"
],
"additionalProperties": false,
"$id": "https://dmbridge.dev/schemas/v6/conversation.json"
}| Property | Type | Required |
|---|---|---|
| requestID | string | yes |
| conversation | conversation | yes |
| state | "received" | "sent" | "none" | "unknown" | yes |
| category | "priority" | "hidden" | "requests" | null | yes |
| senderRecentlyModifiedProfile | boolean | null | yes |
| socialProofUserIDs | array<string> | yes |
| hasMoreMessages | boolean | null | yes |
| detailReadMarksDelivered | boolean | yes |
| providerData | object | no |
JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"requestID": {
"type": "string",
"minLength": 1
},
"conversation": {
"$ref": "https://dmbridge.dev/schemas/v6/conversation.json"
},
"state": {
"type": "string",
"enum": [
"received",
"sent",
"none",
"unknown"
]
},
"category": {
"anyOf": [
{
"type": "string",
"enum": [
"priority",
"hidden",
"requests"
]
},
{
"type": "null"
}
]
},
"senderRecentlyModifiedProfile": {
"type": [
"boolean",
"null"
]
},
"socialProofUserIDs": {
"type": "array",
"items": {
"type": "string"
}
},
"hasMoreMessages": {
"type": [
"boolean",
"null"
]
},
"detailReadMarksDelivered": {
"type": "boolean"
},
"providerData": {
"type": "object",
"additionalProperties": true
}
},
"required": [
"requestID",
"conversation",
"state",
"category",
"senderRecentlyModifiedProfile",
"socialProofUserIDs",
"hasMoreMessages",
"detailReadMarksDelivered"
],
"additionalProperties": false,
"$id": "https://dmbridge.dev/schemas/v6/messageRequest.json"
}| Property | Type | Required |
|---|---|---|
| provider | "x" | "instagram" | yes |
| account | string | null | yes |
| authenticated | boolean | yes |
| groupConversations | boolean | yes |
| folders | array<string> | yes |
| messageTypes | object | yes |
| mutations | object | yes |
| messageReadMode | "exact" | "through" | "conversation" | "unsupported" | yes |
| attachments | object | yes |
| messageRequests | object | yes |
| xchat | object | no |
| limitations | array<string> | yes |
JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"provider": {
"type": "string",
"enum": [
"x",
"instagram"
]
},
"account": {
"type": [
"string",
"null"
]
},
"authenticated": {
"type": "boolean"
},
"groupConversations": {
"type": "boolean"
},
"folders": {
"type": "array",
"items": {
"type": "string"
}
},
"messageTypes": {
"type": "object",
"properties": {
"read": {
"type": "array",
"items": {
"type": "string",
"enum": [
"text",
"image",
"video",
"audio",
"voice",
"file",
"gif",
"sticker",
"link",
"location",
"contact",
"sharedPost",
"sharedStory",
"sharedReel",
"reply",
"quote",
"system",
"deleted",
"unsupported",
"unknown"
]
}
},
"send": {
"type": "array",
"items": {
"type": "string",
"enum": [
"text",
"image",
"video",
"audio",
"voice",
"file",
"gif",
"sticker",
"link",
"location",
"contact",
"sharedPost",
"sharedStory",
"sharedReel",
"reply",
"quote",
"system",
"deleted",
"unsupported",
"unknown"
]
}
}
},
"required": [
"read",
"send"
],
"additionalProperties": false
},
"mutations": {
"type": "object",
"additionalProperties": {
"type": "boolean"
}
},
"messageReadMode": {
"type": "string",
"enum": [
"exact",
"through",
"conversation",
"unsupported"
]
},
"attachments": {
"type": "object",
"properties": {
"list": {
"type": "boolean"
},
"download": {
"type": "boolean"
},
"send": {
"type": "boolean"
}
},
"required": [
"list",
"download",
"send"
],
"additionalProperties": false
},
"messageRequests": {
"type": "object",
"properties": {
"list": {
"type": "boolean"
},
"get": {
"type": "boolean"
},
"messages": {
"type": "boolean"
},
"accept": {
"type": "boolean"
},
"decline": {
"type": "boolean"
},
"categories": {
"type": "array",
"items": {
"type": "string"
}
},
"detailReadMarksDelivered": {
"type": "boolean"
},
"acceptRequiresReply": {
"type": "boolean"
}
},
"required": [
"list",
"get",
"messages",
"accept",
"decline",
"categories",
"detailReadMarksDelivered",
"acceptRequiresReply"
],
"additionalProperties": false
},
"xchat": {
"type": "object",
"additionalProperties": true
},
"limitations": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"provider",
"account",
"authenticated",
"groupConversations",
"folders",
"messageTypes",
"mutations",
"messageReadMode",
"attachments",
"messageRequests",
"limitations"
],
"additionalProperties": false,
"$id": "https://dmbridge.dev/schemas/v6/capabilities.json"
}