Skip to main content
POST
/
athlete
/
ai-athlete-assistant
/
chat
Send a message to the AI athlete assistant
curl --request POST \
  --url http://localhost/mogl/mogl-backend/api/athlete/ai-athlete-assistant/chat \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "job_id": 42,
  "message": "What deliverables are expected for this deal?",
  "session_id": "550e8400-e29b-41d4-a716-446655440000"
}
'
{
  "status": "success",
  "message": "Message Sent Successfully!",
  "data": [
    {
      "turn_id": 1,
      "session_id": "550e8400-e29b-41d4-a716-446655440000",
      "sender": "athlete",
      "content": "What deliverables are expected for this deal?",
      "created_at": "2025-01-01T00:00:00Z"
    }
  ]
}

Authorizations

Authorization
string
header
required

JWT Bearer token authentication. Use the /api/login endpoint to obtain a token.

Body

application/json
job_id
integer
required

ID of the job/deal this conversation is about.

Required range: x >= 1
Example:

42

message
string
required

The athlete's message to the assistant (max 2000 characters).

Maximum string length: 2000
Example:

"What deliverables are expected for this deal?"

session_id
string | null

UUID of an existing session to continue. Omit to auto-resume the latest session for this job or start a new one.

Maximum string length: 64
Example:

"550e8400-e29b-41d4-a716-446655440000"

Response

Message sent. Returns both the athlete message item and the assistant reply item.

status
string
Example:

"success"

message
string
Example:

"Message Sent Successfully!"

data
object[]