DevelopersAPI reference

Team chat API

REST endpoints for team chat in SKUFlow: 7 operations with parameters, request and response fields, permissions and curl examples.

Base URL: https://app.skuflow.ai/api. Every call needs Authorization: Bearer skf_… (Authentication); {organizationId} ($ORGANIZATION_ID in the examples) is your business's id.

OperationEndpointRisk
What's waiting for me (badge counts)GET /organizations/{organizationId}/badgesread
My conversationsGET /organizations/{organizationId}/chatread
Who I can messageGET /organizations/{organizationId}/chat/peopleread
Open a direct messagePOST /organizations/{organizationId}/chat/directwrite
A conversation's messagesGET /organizations/{organizationId}/chat/{conversationId}/messagesread
Write in a conversationPOST /organizations/{organizationId}/chat/{conversationId}/messageswrite
Mark a conversation readPOST /organizations/{organizationId}/chat/{conversationId}/readwrite

What's waiting for me (badge counts)

GET /organizations/{organizationId}/badges

The counts behind the red badges in the app: unread team chat messages (and which conversations), unread notifications, customers' texts waiting (messages: unread customer-text notifications, engagement.read), and what waits in the inbox: new requests (requests.read). Counts the caller may not see are 0. Read-only.

Permissionorganization.read (Owner, Admin, Staff, Member)
Riskread, OAuth scope skuflow.read. Read: reads only.
MCP toolchat_badges (toolset team)

Example

curl "https://app.skuflow.ai/api/organizations/$ORGANIZATION_ID/badges" \
  -H "Authorization: Bearer $SKUFLOW_API_KEY"

Response

200: the answer's fields
FieldTypeDescription
chatinteger
chatConversationsarray of string
notificationsinteger
messagesintegerUnread customer-text notifications in this business (the Messages badge); already counted in notifications.
inboxobject
inbox.requestsintegerNEW requests.
inbox.totalinteger
totalintegerchat + notifications + inbox.total: the app icon's badge.

My conversations

GET /organizations/{organizationId}/chat

The caller's team chat, most recent first: the whole team and their direct messages, each with a title, the last message and the caller's unread count. Read-only.

Permissionorganization.read (Owner, Admin, Staff, Member)
Riskread, OAuth scope skuflow.read. Read: reads only.
MCP toolchat_conversations (toolset team)

Example

curl "https://app.skuflow.ai/api/organizations/$ORGANIZATION_ID/chat" \
  -H "Authorization: Bearer $SKUFLOW_API_KEY"

Response

200: the answer's fields

An array of objects:

FieldTypeDescription
idstringConversation id (for …/chat/{conversationId}/messages).
kindenumOne of TEAM, DIRECT.
titlestringTeam, or the other person's name.
lastMessageobject or nullThe latest message (first 200 characters).
lastMessage.bodystring
lastMessage.authorstring
lastMessage.atstring (date-time)
unreadintegerMessages from others since the caller last read it.

Who I can message

GET /organizations/{organizationId}/chat/people

The business's members (name and role) to start a direct message with; not the caller. Read-only.

Permissionorganization.read (Owner, Admin, Staff, Member)
Riskread, OAuth scope skuflow.read. Read: reads only.
MCP toolchat_people (toolset team)

Example

curl "https://app.skuflow.ai/api/organizations/$ORGANIZATION_ID/chat/people" \
  -H "Authorization: Bearer $SKUFLOW_API_KEY"

Response

200: the answer's fields

An array of objects:

FieldTypeDescription
userIdstringThe member's user id (for POST /chat/direct).
namestring
rolestring

Open a direct message

POST /organizations/{organizationId}/chat/direct

The caller's conversation with another member of the business (made on first use). 404 for someone who isn't a member.

Permissionorganization.read (Owner, Admin, Staff, Member)
Riskwrite, OAuth scope skuflow.write. Write: creates or changes records inside the business; nothing leaves it.
MCP toolchat_openDirect (toolset team)

Request body

FieldTypeRequiredDescription
userIdstringYesUp to 200 characters.

Example

curl -X POST "https://app.skuflow.ai/api/organizations/$ORGANIZATION_ID/chat/direct" \
  -H "Authorization: Bearer $SKUFLOW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"userId":"user_id"}'

Response

200: the answer's fields
FieldTypeDescription
idstringConversation id (for …/chat/{conversationId}/messages).
kindenumOne of TEAM, DIRECT.

A conversation's messages

GET /organizations/{organizationId}/chat/{conversationId}/messages

The latest messages, oldest first (before for older ones), with who wrote each. 404 for a conversation the caller can't see. Read-only.

Permissionorganization.read (Owner, Admin, Staff, Member)
Riskread, OAuth scope skuflow.read. Read: reads only.
MCP toolchat_messages (toolset team)

Parameters

NameInTypeRequiredDescription
conversationIdpathstringYes
beforequerystring (date-time)No
limitqueryintegerNo1–100.

Example

curl "https://app.skuflow.ai/api/organizations/$ORGANIZATION_ID/chat/{conversationId}/messages" \
  -H "Authorization: Bearer $SKUFLOW_API_KEY"

Response

200: the answer's fields

An array of objects:

FieldTypeDescription
idstring
userIdstringThe author's user id.
bodystring
createdAtstring (date-time)
authorstringThe author's name.
minebooleanSent by the caller.

Write in a conversation

POST /organizations/{organizationId}/chat/{conversationId}/messages

Posts a message (up to 4000 characters); the others in the conversation are notified. Returns it.

Permissionorganization.read (Owner, Admin, Staff, Member)
Riskwrite, OAuth scope skuflow.write. Write: creates or changes records inside the business; nothing leaves it.
MCP toolchat_send (toolset team)

Parameters

NameInTypeRequiredDescription
conversationIdpathstringYes

Request body

FieldTypeRequiredDescription
bodystringYesUp to 4000 characters.

Example

curl -X POST "https://app.skuflow.ai/api/organizations/$ORGANIZATION_ID/chat/{conversationId}/messages" \
  -H "Authorization: Bearer $SKUFLOW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"body":"string"}'

Response

201: the answer's fields
FieldTypeDescription
idstring
userIdstringThe author's user id.
bodystring
createdAtstring (date-time)
minebooleanSent by the caller.

Mark a conversation read

POST /organizations/{organizationId}/chat/{conversationId}/read

Everything in it up to now counts as read for the caller.

Permissionorganization.read (Owner, Admin, Staff, Member)
Riskwrite, OAuth scope skuflow.write. Write: creates or changes records inside the business; nothing leaves it.
MCP toolchat_read (toolset team)

Parameters

NameInTypeRequiredDescription
conversationIdpathstringYes

Example

curl -X POST "https://app.skuflow.ai/api/organizations/$ORGANIZATION_ID/chat/{conversationId}/read" \
  -H "Authorization: Bearer $SKUFLOW_API_KEY"

Response

200: the answer's fields
FieldTypeDescription
oktrue

On this page