Fetch answers in bulk

Fetch up to 50 existing answers in one request instead of one call per question. This reads stored answers only and never re-runs the answer pipeline.

data is aligned with your input: data[i] corresponds to question_ids[i]. An id that does not exist, or belongs to another app, comes back as null, so answers never leak across apps.


End-to-end — open a thread

1. Get the thread's questions in order.

BASE=https://api.askmiso.com

curl -X POST "$BASE/v1/ask/user_history/thread" \
  -H "X-Api-Key: $KEY" -H "Content-Type: application/json" \
  -d '{ "question_id": "0e1f2a3b-...", "user_id": "alice" }'
{
  "data": {
    "question_ids": [
      "0e1f2a3b-...",
      "1a2b3c4d-..."
    ],
    "has_more": false
  }
}

2. Fetch every answer in one call.

curl -X POST "$BASE/v1/ask/answers" \
  -H "X-Api-Key: $KEY" -H "Content-Type: application/json" \
  -d '{ "question_ids": ["0e1f2a3b-...", "1a2b3c4d-..."] }'
{
  "message": "success",
  "data": [
    {
      "question_id": "0e1f2a3b-...",
      "question": "How do interest rate cuts affect mor…",
      "answer": "Lower rates make mortgages cheaper. [1]",
      "sources": [
        { "product_id": "rates-and-mortgages",
          "title": "What rate cuts mean for your mortgage" }
      ]
    },
    null
  ]
}

3. Render in order. Walk question_ids and use the matching index in data. Skip a null — that question is not visible to this key.

Each entry matches the data of GET /v1/ask/questions/{question_id}/answer, so the same rendering code works for both.

Body·
required
application/json
  • question_ids
    Type: array string[] 1…50Format: uuid
    required

    The ids to fetch (1-50).

Responses
  • application/json
Request Example for post/v1/ask/answers
curl 'https://api.askmiso.com/v1/ask/answers?api_key=YOUR_SECRET_TOKEN' \
  --request POST \
  --header 'Content-Type: application/json' \
  --data '{
  "question_ids": [
    "0e1f2a3b-4c5d-6e7f-8a9b-0c1d2e3f4a5b",
    "1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d"
  ]
}'
{
  "message": "success",
  "data": [
    {
      "question_id": "0e1f2a3b-4c5d-6e7f-8a9b-0c1d2e3f4a5b",
      "question": "How do interest rate cuts affect mortgages?",
      "answer": "Lower rates make mortgages cheaper. [1]",
      "sources": []
    },
    null
  ]
}