For the complete documentation index, see llms.txt. This page is also available as Markdown.

Inbox Agents

Lists all agent's online status from a chatbot

get

Required Permission: chatbots.inbox.agents.list

Resource: chatbots/:chatbotId

Authorizations
x-chatcaptain-keystringRequired
Path parameters
chatbotIdstringRequired

The ID of the chatbot.

Responses
200

A list of agent's online status.

application/json
errorstringOptional

Optional error message.

get/v1/inbox/{chatbotId}/agents/online
GET /v1/inbox/{chatbotId}/agents/online HTTP/1.1
Host: api.chatcaptain.com
x-chatcaptain-key: YOUR_API_KEY
Accept: */*
{
  "agents": [
    {
      "agentId": "i1def0QdChav9VSVFqPi",
      "online": true,
      "lastSeen": "2025-10-06T10:00:00Z"
    }
  ],
  "error": "text"
}

Sets the agent's own online status

post

Required Permission: chatbots.inbox.agents.online.edit

Resource: chatbots/:chatbotId

Authorizations
x-chatcaptain-keystringRequired
Path parameters
chatbotIdstringRequired

The ID of the chatbot.

Body
onlinebooleanRequired

Sets the online status of the agent.

Example: true
clientTimestampstringRequired

The client timestamp when the request is made. This is used to resolve conflicts when multiple requests are made in a short period of time.

Example: 123456789
Responses
200

The updated online status.

application/json
errorstringOptional

Optional error message.

post/v1/inbox/{chatbotId}/agents/me/online
POST /v1/inbox/{chatbotId}/agents/me/online HTTP/1.1
Host: api.chatcaptain.com
x-chatcaptain-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 43

{
  "online": true,
  "clientTimestamp": 123456789
}
{
  "agent": {
    "agentId": "i1def0QdChav9VSVFqPi",
    "online": true,
    "lastSeen": "2025-10-06T10:00:00Z"
  },
  "error": "text"
}

Retrieves the agent's own notification settings

get

Required Permission: chatbots.inbox.agents.notifications.get

Resource: chatbots/:chatbotId

Authorizations
x-chatcaptain-keystringRequired
Path parameters
chatbotIdstringRequired

The ID of the chatbot.

Responses
200

The current settings.

application/json
errorstringOptional

Optional error message.

get/v1/inbox/{chatbotId}/agents/me/notifications
GET /v1/inbox/{chatbotId}/agents/me/notifications HTTP/1.1
Host: api.chatcaptain.com
x-chatcaptain-key: YOUR_API_KEY
Accept: */*
{
  "settings": {
    "agentId": "Bs47n9wcxy6CWnt48Av3",
    "botHandoverToUnassigned": {
      "email": true,
      "browser": true
    },
    "botAssignsYou": {
      "email": true,
      "browser": true
    },
    "conversationsAssignedToYou": {
      "email": true,
      "browser": true
    },
    "pushToken": "cVA6cG-ztyB-M8_7yul:APAnGnnmmELFUbziLIVatyDVe_DyihdJhiaQHYw",
    "conversationsAssignedToYourTeam": {
      "email": true,
      "browser": true
    }
  },
  "error": "text"
}

Updates the agent's own notification settings

post

Required Permission: chatbots.inbox.agents.notifications.edit

Resource: chatbots/:chatbotId

Authorizations
x-chatcaptain-keystringRequired
Path parameters
chatbotIdstringRequired

The ID of the chatbot.

Body
pushTokenstringOptional

The push token for browser notifications.

Example: cVA6cG-ztyB-M8_7yul:APAnGnnmmELFUbziLIVatyDVe_DyihdJhiaQHYw
Responses
200

The updated settings.

application/json
errorstringOptional

Optional error message.

post/v1/inbox/{chatbotId}/agents/me/notifications
POST /v1/inbox/{chatbotId}/agents/me/notifications HTTP/1.1
Host: api.chatcaptain.com
x-chatcaptain-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 300

{
  "botHandoverToUnassigned": {
    "email": true,
    "browser": true
  },
  "botAssignsYou": {
    "email": true,
    "browser": true
  },
  "conversationsAssignedToYou": {
    "email": true,
    "browser": true
  },
  "pushToken": "cVA6cG-ztyB-M8_7yul:APAnGnnmmELFUbziLIVatyDVe_DyihdJhiaQHYw",
  "conversationsAssignedToYourTeam": {
    "email": true,
    "browser": true
  }
}
{
  "settings": {
    "agentId": "Bs47n9wcxy6CWnt48Av3",
    "botHandoverToUnassigned": {
      "email": true,
      "browser": true
    },
    "botAssignsYou": {
      "email": true,
      "browser": true
    },
    "conversationsAssignedToYou": {
      "email": true,
      "browser": true
    },
    "pushToken": "cVA6cG-ztyB-M8_7yul:APAnGnnmmELFUbziLIVatyDVe_DyihdJhiaQHYw",
    "conversationsAssignedToYourTeam": {
      "email": true,
      "browser": true
    }
  },
  "error": "text"
}

Last updated