History, closure & ratings
Read history
Lists accept only limit (default 20, range 1–100) and opaque cursor; the conversation list additionally accepts exact external_conversation_id. There is no page number, status/channel filter or live since cursor. Results are newest first by creation time and ID. Follow pagination.next_cursor to older pages; null means there is no older page. Reverse/sort for chronological display. Re-read the first page for new messages and merge by message ID.
GET /v1/ask/conversations?external_conversation_id=customer-42-1688-673124809943-1&limit=20
Authorization: Bearer YOUR_HIOBUY_PRODUCTION_KEYGET /v1/ask/conversations/11111111-1111-4111-8111-111111111111
Authorization: Bearer YOUR_HIOBUY_PRODUCTION_KEYGET /v1/ask/conversations/11111111-1111-4111-8111-111111111111/messages?limit=20
Authorization: Bearer YOUR_HIOBUY_PRODUCTION_KEY{
"data": [
{
"id": "22222222-2222-4222-8222-222222222222",
"conversation_id": "11111111-1111-4111-8111-111111111111",
"client_message_id": "22222222-2222-4222-8222-222222222222",
"sender_type": "staff",
"type": "text",
"content": "We can help you confirm neutral packaging with the supplier.",
"language": "en",
"status": "accepted",
"translation_status": "translated",
"created_at": "2026-11-13T13:01:00.000Z",
"attachments": []
}
],
"pagination": {
"next_cursor": null
}
}Public history contains original customer text and published customer-facing staff replies (sender_type=customer or staff). Private staff drafts, originals and internal notes are excluded. For integrations explicitly enabled for post-send recall, staff replies publish immediately after translation, without a fixed 30-second hold. Staff may recall them for 30 seconds from the server publication transaction; this deadline is not exposed by the public API and must not be inferred from created_at or Webhook delivery time. Legacy integrations retain their existing pre-publication hold until compatibility is confirmed. A recalled reply remains as a terminal recalled_at placeholder with empty content, no media and the original message ID/order; do not invent a status=recalled value. Incoming translation_status=pending is not a delivery failure. Do not overwrite the customer’s original text.
HIOBuy derives the App from your Key. Do not send X-External-App-Id, choose an App on behalf of the client, or connect directly to HIOAsk. Never expose API Keys or Webhook secrets in browser storage, frontend code, URLs or logs. Your backend must additionally enforce which signed-in customer owns each conversation: App isolation alone is not end-user authorization.
Close a conversation
Send {} with an Idempotency-Key to close. Closing is terminal and idempotent; a retry does not reopen the conversation or reset the rating window. Sending a new customer message after closure returns 409 CONVERSATION_CLOSED. Refresh/recovery must reuse your saved conversation UUID, rather than creating another thread.
POST /v1/ask/conversations/11111111-1111-4111-8111-111111111111/close
Authorization: Bearer YOUR_HIOBUY_PRODUCTION_KEY
Content-Type: application/json
Idempotency-Key: close-customer-42-product-1
{}Submit a rating
First read rating availability. status is not_closed, available, expired or submitted; eligible_until is the server deadline. Submit one integer rating from 1–5 within seven days after closure, with an optional comment of at most 1,000 Unicode code points. Preserve the same Idempotency-Key and payload for retries. Ratings are immutable: a different second submission returns 409 RATING_ALREADY_SUBMITTED; expiry returns 410 RATING_WINDOW_CLOSED.
GET /v1/ask/conversations/11111111-1111-4111-8111-111111111111/rating
Authorization: Bearer YOUR_HIOBUY_PRODUCTION_KEY{
"data": {
"status": "available",
"eligible_until": "2026-11-20T13:02:00.000Z",
"rating": null
}
}POST /v1/ask/conversations/11111111-1111-4111-8111-111111111111/rating
Authorization: Bearer YOUR_HIOBUY_PRODUCTION_KEY
Content-Type: application/json
Idempotency-Key: rate-customer-42-product-1
{
"rating": 5,
"comment": "Helpful supplier support."
}Keep message API reconciliation on page load, reconnect and periodically with backoff. Refresh both the newest page and previously loaded/visible history pages: recall preserves created_at and does not move an older message to the first page. A cursor only loads older records; there is no since/updated_since change feed. Merge by App + conversation + message ID and preserve any stored recalled_at tombstone over an older normal response. Fetch current conversation/rating state; never reopen a closed conversation from an old event. Keep drafts and stable send IDs after uncertain sends.
Message references for enabled integrations
Reference-enabled integrations may receive reply_to_message_id in the existing ask.message.created message. Persist the association, not a copied excerpt. Resolve it through the same App + conversation message map. If the target has recalled_at, every referencing display must use a recall placeholder, including when recall arrives before creation or a referencing reply. A recalled reply also hides its own reference. Older API responses and immutable creation retries must not restore quoted text or media. Keep event ID/payload deduplication and signatures unchanged. Do not downgrade receivers while reference-bearing events or history remain in use.
Get Support
Need integration help? Contact Developer Support at support@hiobuy.com · Response within 1–2 business days