Skip to main content
POST
/
slack
/
messages
Log Slack message
curl --request POST \
  --url https://ai.wisepilot.app/api/v1/slack/messages \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "slack_user_id": "<string>",
  "channel_id": "<string>",
  "event_type": "app_mention",
  "user_text": "<string>",
  "agent_id": "<string>",
  "thread_ts": "<string>",
  "event_ts": "<string>",
  "channel_type": "<string>",
  "raw_text": "<string>",
  "response_text": "<string>",
  "tools_used": [
    "<string>"
  ],
  "is_plan": false,
  "model": "<string>",
  "prompt_tokens": 123,
  "completion_tokens": 123,
  "total_tokens": 123,
  "duration_ms": 123,
  "estimated_cost": 123,
  "error_message": "<string>"
}
'
{
  "ok": true,
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}

Authorizations

Authorization
string
header
required

API key prefixed with cr_ (e.g. cr_a1b2c3...)

Body

application/json
slack_user_id
string
required

Slack user ID (e.g. U12345)

channel_id
string
required

Slack channel ID

event_type
enum<string>
required
Available options:
app_mention,
dm,
thread_reply
user_text
string
required

User message (after stripping @mention)

agent_id
string
required

Bot agent identifier (e.g. wgm, fbv)

thread_ts
string | null

Thread timestamp if in a thread

event_ts
string | null
channel_type
string | null

e.g. im, channel, group

raw_text
string | null

Original text before stripping

response_text
string | null

Bot reply (null if error)

tools_used
string[] | null
is_plan
boolean
default:false
model
string | null
prompt_tokens
integer | null
completion_tokens
integer | null
total_tokens
integer | null
duration_ms
integer | null
estimated_cost
number<double> | null
error_message
string | null

Set when processing failed

Response

Message logged

ok
boolean
required
id
string<uuid>
required

Created slack_messages row ID