chat

Start a chat with Happenstance Chat, optionally with its first message.

Chat searches the user's network (their connections, their friends' and their groups'), researches people and drafts outreach, over as many turns as the conversation needs. A message returns at once with a turn id: poll GET /v1/chat/{chat_id}/turns/{turn_id} until the turn's status is completed, then read the people and drafts.

Each turn is charged when it finishes. Returns 402 when the balance is below 3 credits.

post/v1/chat

Request

  • Base URL
    https://api.happenstance.ai (the document declares no server; this is the origin it was published from)
  • Auth
    HTTP bearer

Request body

messagestring nullable

The first message. Omit it to create an empty chat and send messages with POST /v1/chat/{chat_id}/messages.

Response

Successful Response

idstring required

The chat's id

urlstring required

The chat in the Happenstance app

turn_idstring nullable

The first message's turn, when a message was sent

status'queued' | 'running' | 'completed' | 'failed' | 'cancelled' nullable

The turn's status, when a message was sent

warningstring nullable

Warning message when credit balance is low

Changes