APG PayAPG Paydocs

Reporting

Create report conversation messages

POST/report-conversations/{reportConversationId}/messages
Request
POSThttps://api.tst.au.apgpay.dev/report-conversations/{reportConversationId}/messages
curl -X POST https://api.tst.au.apgpay.dev/report-conversations/{reportConversationId}/messages \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"prompt":"string","context":{"dashboardId":"string","tab":"string","proposal":{}}}'

Send a message to one of the caller's conversations, answered with the conversation so far as its context, as server-sent events as the first message is. One message is answered at a time: a message sent while another is answered is refused with 409, and so is one to a conversation that has used all it may.

Permissions

Required permission
reports:query

Requires the `query` action on `reports` for the supplied runtime context

Path parameters

reportConversationIdstring
required

Request body

promptstringrequired

The message, at most 2000 characters. The first message of a conversation is its title.

Where the person is asking from.

Example request
{
  "prompt": "string",
  "context": {
    "dashboardId": "string",
    "tab": "string",
    "proposal": {}
  }
}

Responses

The response is a typed union.

Discriminated by event
event = "done"

The run has ended. Always the last event.

Example
{
  "event": "done",
  "data": {
    "usage": {
      "inputTokens": 1250,
      "outputTokens": 1250
    }
  }
}

Error responses