Skip to main content

Inbox API

Inbox API

import { CodeBoltClient } from '@codebolt/clientsdk';

const client = new CodeBoltClient();

Quick Reference

MethodDescription
acknowledgeAcknowledges an inbox message.
clearResolvedClears all resolved inbox messages.
createMessageCreates a new inbox message.
getMessagesRetrieves all inbox messages.
resolveResolves an inbox message.

Methods


acknowledge

client.inbox.acknowledge(messageId: string): Promise<void>

Acknowledges an inbox message.

Marks a message as seen/acknowledged without resolving it. This indicates the user is aware of the message but may not have acted on it yet.

ParameterTypeRequiredDescription
messageIdstringYesThe unique identifier of the message to acknowledge

Returns: Promise<void> — A promise that resolves when the message has been acknowledged

Full reference →


clearResolved

client.inbox.clearResolved(): Promise<void>

Clears all resolved inbox messages.

Removes messages that have been marked as resolved, cleaning up the inbox. Unresolved and acknowledged messages are not affected.

No parameters.

Returns: Promise<void> — A promise that resolves when the resolved messages have been cleared

Full reference →


createMessage

client.inbox.createMessage(data: CreateInboxMessageRequest): Promise<InboxMessage>

Creates a new inbox message.

Posts a message to the inbox that will appear as a notification for the user. Use this to communicate important information, requests for input, or status updates from agents.

ParameterTypeRequiredDescription
dataCreateInboxMessageRequestYesMessage creation payload including title, body, and priority

Returns: Promise<InboxMessage> — A promise that resolves to the newly created

Full reference →


getMessages

client.inbox.getMessages(params?: InboxMessageListParams): Promise<InboxMessage[]>

Retrieves all inbox messages.

Returns the full list of messages in the inbox, including unread, acknowledged, and unresolved messages. Use optional parameters to filter by status or paginate results.

ParameterTypeRequiredDescription
paramsInboxMessageListParamsNoOptional query and filter parameters

Returns: Promise<InboxMessage[]> — A promise that resolves to an array of objects

Full reference →


resolve

client.inbox.resolve(messageId: string): Promise<void>

Resolves an inbox message.

Marks a message as fully resolved, indicating the user has addressed it. Resolved messages can later be cleared with .

ParameterTypeRequiredDescription
messageIdstringYesThe unique identifier of the message to resolve

Returns: Promise<void> — A promise that resolves when the message has been resolved

Full reference →