Messages
Appends messages to the thread — the history stays on the server.
Updated on Aug 10, 2026
The thread is the conversation. Each new message is a POST — and that is all you send: the previous history is already there, stored by the platform.
https://api.hinow.ai/v1/threadsBearerAppends a message to the conversation.
Parâmetros
messagesarray· body`user` or `assistant`.
tool_resourcesobject· bodyMessage appended
metadataobject· body
Respostas
https://api.hinow.ai/v1/threads/{thread_id}/messagesBearerAcrescenta uma mensagem à conversa.
Parâmetros
thread_idstring· pathobrigatóriorolestring· bodyobrigatóriouser ou assistant.
contentstring | array· bodyobrigatórioTexto simples ou blocos de conteúdo (text, image_url).
attachmentsarray· bodyArquivos anexados à mensagem.
metadataobject· body
Respostas
A listagem segue a paginação por cursor da OpenAI: limit (até 100), order (asc|desc), after e before recebendo um id de mensagem. O filtro run_id devolve só o que uma execução específica produziu.
# a resposta mais recente
curl -s "https://api.hinow.ai/v1/threads/thread_.../messages?order=desc&limit=1" \
-H "Authorization: Bearer hi_SUA_API_KEY"
# só as mensagens geradas por um run
curl -s "https://api.hinow.ai/v1/threads/thread_.../messages?run_id=run_..." \
-H "Authorization: Bearer hi_SUA_API_KEY"Mensagens do assistente chegam com role: "assistant", run_id e assistant_id preenchidos, e o texto em content[0].text.value.
# ler
curl -s https://api.hinow.ai/v1/threads/thread_... -H "Authorization: Bearer hi_SUA_API_KEY"
# editar metadata / tool_resources
curl -s https://api.hinow.ai/v1/threads/thread_... \
-H "Authorization: Bearer hi_SUA_API_KEY" -H "Content-Type: application/json" \
-d '{"metadata": {"cliente": "acme"}}'
# remover (leva as mensagens junto)
curl -s -X DELETE https://api.hinow.ai/v1/threads/thread_... -H "Authorization: Bearer hi_SUA_API_KEY"# ler
curl -s https://api.hinow.ai/v1/threads/thread_.../messages/msg_... \
-H "Authorization: Bearer hi_SUA_API_KEY"
# editar (apenas metadata)
curl -s https://api.hinow.ai/v1/threads/thread_.../messages/msg_... \
-H "Authorization: Bearer hi_SUA_API_KEY" -H "Content-Type: application/json" \
-d '{"metadata": {"revisada": "sim"}}'
# remover
curl -s -X DELETE https://api.hinow.ai/v1/threads/thread_.../messages/msg_... \
-H "Authorization: Bearer hi_SUA_API_KEY"Extensão HINOW: listar threads
A OpenAI nunca ofereceu GET /v1/threads — aqui existe, com a mesma paginação dos demais recursos. Útil para reconstruir a lista de conversas de um usuário sem manter um índice paralelo.

