Subscribe a thread to updates

Watch this thread for important new content. Idempotent. A thread the user does not own returns 404.

Miso judges significance before it appends anything, so no update means no unread indicator.


End-to-end — offer updates on a thread

1. Subscribe.

BASE=https://api.askmiso.com/v1/ask/user_history/thread/updates
TID=0e1f2a3b-4c5d-6e7f-8a9b-0c1d2e3f4a5b

curl -X POST "$BASE/subscribe" \
  -H "X-Api-Key: $KEY" -H "Content-Type: application/json" \
  -d "{ \"user_id\": \"alice\", \"thread_id\": \"$TID\" }"
{ "message": "success" }

2. Poll the account-level indicator, for example every 60 seconds:

curl -X POST "$BASE" \
  -H "X-Api-Key: $KEY" -H "Content-Type: application/json" \
  -d '{ "user_id": "alice" }'
{ "message": "success", "data": { "has_new": true } }

3. Refresh the sidebar when it turns true. The row with "has_new": true holds the new answer.

4. Clear it when the reader opens the thread:

curl -X POST "$BASE/dismiss_thread" \
  -H "X-Api-Key: $KEY" -H "Content-Type: application/json" \
  -d "{ \"user_id\": \"alice\", \"thread_id\": \"$TID\" }"

Use dismiss_overall instead when the reader dismisses the notification without opening anything — that clears only the account level and leaves each thread's own indicator in place.

Body·
required
application/json
  • thread_id
    Type: string Format: uuid
    required

    The thread's root question id.

  • user_id
    Type: string
    required
Responses
  • application/json
  • application/json
  • 500

    Miso could not read or write the history store. Retry, and keep what you have on screen — this is no longer reported as an empty list.

Request Example for post/v1/ask/user_history/thread/updates/subscribe
curl 'https://api.askmiso.com/v1/ask/user_history/thread/updates/subscribe?api_key=YOUR_SECRET_TOKEN' \
  --request POST \
  --header 'Content-Type: application/json' \
  --data '{
  "user_id": "alice",
  "thread_id": "0e1f2a3b-4c5d-6e7f-8a9b-0c1d2e3f4a5b"
}'
{
  "message": "success"
}