---
title: "Save brand message with embedding"
method: POST
path: "/api/v1/workflow/agent/save-brand-message"
tags: ["Workflow Agent"]
---

# Save brand message with embedding

`POST /api/v1/workflow/agent/save-brand-message`

## Request

- Base URL: `https://api.kolect.com`
- URL: `https://api.kolect.com/api/v1/workflow/agent/save-brand-message`
- Auth: HTTP bearer

Saves a brand message to the database with generated embedding for semantic search.
This endpoint is used by workflow agents to store messages with full context.

## Request body

- object
  - `brand_id` string, required: The brand ID this message belongs to
  - `channel` string, required: The communication channel (e.g., 'feishu', 'slack', 'email')
  - `sender` string, required: The sender type (e.g., 'user', 'agent', 'staff')
  - `content` string, required: The message content
  - `metadata` object: Optional metadata object
  - `ticket_id` string, required: The ticket ID this message belongs to
  - `partnership_id` string: Partnership ID (optional)
  - `partnership_status` string: Partnership status (optional)
  - `bot_mentioned` boolean: Whether the bot was mentioned (@) in the message (optional)

## Response `200`

Message saved successfully

- object
  - `success` boolean
  - `data` object: The saved message data
    - `id` string
    - `brand_id` string
    - `channel` string
    - `sender` string
    - `content` string
    - `metadata` object
    - `created_at` string, date-time
    - `updated_at` string, date-time
  - `message` string

## Other responses

- `400`: Bad request - validation error
- `500`: Internal server error

---

[API](https://skmtc.dev/kolect/apis/kolect-api.md) · [All operations](https://skmtc.dev/kolect/apis/kolect-api/llms.txt) · [OpenAPI document](https://skmtc.dev/kolect/apis/kolect-api/revisions/fe54528e8f54?raw)
