Ask a follow-up

.md

Another question in a conversation that exists. The answer follows over the websocket.

Scopesai:write
POST/v1/me/ai/conversations/{id}/messages

The next question in a conversation. The assistant reads the conversation so far with it. Like the first question the response comes back before the answer is written, with the question and the empty answer to draw.

One answer at a time per conversation. While one is still being written, a new question answers 409 ai_answer_in_progress. Wait for its turn_state to leave streaming, or stop it, and ask again. An answer still marked as being written after five minutes belongs to a worker that died, and is closed as failed when the next question comes.

The body is the same as for a new question: message, and up to five files in attachments.

Request

curl -X POST https://api.proppertrading.com/v1/me/ai/conversations/01a16152-7e42-70cd-91a4-b6b80ee47daa/messages \
  -H "Authorization: Bearer ptat_9f2c1a44_3b8e7d2f5c9a1b4e6d8f0a2c4e6b8d1f" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: 0b9d4e7a-5c21-4f83-a6d0-7e2c9b1f4a35" \
  -d '{"message": "And how much drawdown do I have left overall?"}'

Response

202, the question is stored and the answer is on its way:

{
    "data": {
        "object": "ai_turn",
        "conversation": {
            "id": "01a16152-7e42-70cd-91a4-b6b80ee47daa",
            "object": "ai_conversation",
            "title": null,
            "pinned": false,
            "surface": "trader_chat",
            "channel": "private-ai-chat.01a16152-7e42-70cd-91a4-b6b80ee47daa",
            "last_message_at": "2026-10-22T01:56:47+00:00",
            "created_at": "2026-10-22T01:55:58+00:00"
        },
        "question": {
            "id": "aimsg_cukccxsj98gvv2mb",
            "object": "ai_message",
            "role": "user",
            "content": "And how much drawdown do I have left overall?",
            "status": "complete",
            "attachments": [],
            "actions": [],
            "created_at": "2026-10-22T01:56:47+00:00"
        },
        "answer": {
            "id": "aimsg_yrf25cr33ju3zuc2",
            "object": "ai_message",
            "role": "assistant",
            "content": "",
            "status": "streaming",
            "attachments": [],
            "actions": [],
            "created_at": "2026-10-22T01:56:47+00:00"
        }
    },
    "meta": {
        "request_id": "req_01m5gn6fccrdjv0pn7dnx049fy"
    }
}

Errors

StatusCodeMeaning
400invalid_attachmentA file's data is not base64, or it is empty
400attachment_too_largeA file over 10 MB once decoded
400missing_idempotency_keyEvery POST needs one
400workspace_requiredOur own staff, without a firm in Propper-Workspace
403ai_unavailableThe firm has the assistant switched off for this chat
403ai_kyc_requiredA trader whose account is locked until the identity check is done
403forbiddenStaff whose role does not include use_ai_chat
403insufficient_scopeThis device does not hold ai:write
404resource_not_foundNo conversation of yours with that id in this chat and this firm
409ai_answer_in_progressThe previous answer is still being written
422validation_failedNo message, one over 4000 characters, more than five files, or a file of a type that is not allowed
429ai_limit_reachedAn allowance is used up. state says which and resets_at when it comes back
429rate_limit_exceededTwenty questions and deletions a minute, shared with the website

The 409 as it comes back:

{
    "error": {
        "type": "invalid_request_error",
        "code": "ai_answer_in_progress",
        "message": "The assistant is still answering in this conversation. Wait for it, or stop it, and ask again.",
        "doc_url": "https://proppertrading.com/docs/api/errors#ai_answer_in_progress",
        "request_id": "req_01m5gn55x271ets01x4sxxx3c8"
    }
}