Messaging

In this doc we will explain how you can add a message to a conversation using our API

Our platform allows you to manage a client conversation using API and webhooks. You can check the webhooks document to know how you can receive different events on webhooks.

To send a message to a client, you will need to use addMessage mutation with the following parameters:

Parameter

Type

Description

workspaceId

number

The workspace ID.

integrationId

string

The integration (channel) ID.

convId

string

The conversation ID.

content

string

The content of the message, in the case of media messages, will contain the URL of the media file.

type

string

The type of the message, currently we are supporting the following types:

  • text

  • image

  • audio

  • document

  • video

  • template

  • contacts

  • note

You can check our playground to explore and interact with GraphQL APIs easily and intuitively with real-time documentation.

The β€œNote” message is only used internally to follow up on specific events or notes during the conversations, so the note message type will not be sent to the client; it will just be appended to the conversation messages.

Request & Response

POST https://gateway.bcrumbs.net/core/gq
Example
mutation addMessage($input: MessageInput!) { addMessage(input: $input) { messageId content type isAgent status externalMessageId tags createdAt } } input MessageInput { workspaceId: Int! integrationId: ID! convId: ID! content: String! type: MessageType! }

We are returning the following structure in the response of adding a message to a conversation:

Example
{ "workspaceId": 12, "messageId": "15582e91-aeb8-4404-96f5-bb0e0bfcc2bc", "content": "Hello world ....", "type": "text", "isAgent": true, "externalMessageId": "15582e91-aeb8-4404-96f5-bb0e0bfcc2bc", "tags": ["tag1", "tag2"], "createdAt": "2024-12-19T13:32:04.009Z", }