Mitigate AI Platform

Send a chat message

Send messages to the AI assistant programmatically using secure token authentication.

POST
/api/v1/chats

Authorization

BearerAuth
AuthorizationBearer <token>

In: header

Header Parameters

Authorization*string

Bearer token

Request Body

application/json

prompt*string

The message to send to the AI assistant

user_id?string

Unique identifier for the user

title?string

Title for the chat session

tags?array<>

Array of tags for categorizing the chat

workspace_id?string

ID of the workspace to use. If not provided, defaults to the default workspace

chat_id?string

ID of an existing chat to continue the conversation. If not provided, a new chat is created

response_type?string

Type of response handling: 'immediate' (default) or 'async'

Value in"immediate" | "async"
response_url?string

URL to send the response to. Required when response_type is 'async'

attachments?array<>

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://ai-platform.mitigate.dev/api/v1/chats" \  -H "Authorization: string" \  -H "Content-Type: application/json" \  -d '{    "prompt": "string"  }'
{
  "response": "string"
}
{
  "message": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}