Open (or resume) a conversation for a card
POST
/conversation/start
const url = 'https://api.harperharbor.com/open/v1/conversation/start';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"roleId":"example","greetingIndex":1}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.harperharbor.com/open/v1/conversation/start \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "roleId": "example", "greetingIndex": 1 }'Authorizations
Section titled “Authorizations”Request Body
Section titled “Request Body”Media typeapplication/json
object
roleId
required
string
greetingIndex
0 = roleWelcome
integer
Examplegenerated
{ "roleId": "example", "greetingIndex": 1}Responses
Section titled “Responses”Conversation opened.
Media typeapplication/json
object
conversationId
string
title
string
messageCount
integer
Examplegenerated
{ "conversationId": "example", "title": "example", "messageCount": 1}