POST
/
v1
/
api
/
conversations
/
{conversationId}
/
message
/
{messageId}
/
action
Handle Message Action
curl --request POST \
  --url https://api.trillet.ai/v1/api/conversations/{conversationId}/message/{messageId}/action \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --header 'x-workspace-id: <x-workspace-id>' \
  --data '{
  "metadata": {
    "action": "<string>",
    "editedMessage": "<string>"
  }
}'
{
  "status": "success",
  "message": {
    "_id": "64fbbc2e98312c4b82123456",
    "message": "Hello, how can I assist you?",
    "to": "+1234567890",
    "sent": true,
    "status": "approved",
    "timestamp": "2024-12-03T12:00:00Z"
  }
}

Headers

x-api-key
string
required
API key used for authenticating requests to the API.
x-workspace-id
string
required
Workspace identifier for the API.

Path Parameters

conversationId
string
required
The unique identifier for the conversation containing the message.
messageId
string
required
The unique identifier for the message to be acted upon.

Request Body

metadata
object
required

Response Fields

status
string
The status of the action, indicating success or failure.
message
object
The updated or rejected message details.
{
  "status": "success",
  "message": {
    "_id": "64fbbc2e98312c4b82123456",
    "message": "Hello, how can I assist you?",
    "to": "+1234567890",
    "sent": true,
    "status": "approved",
    "timestamp": "2024-12-03T12:00:00Z"
  }
}