Create a conversation
POST
/api/conversations
const url = 'https://api.getvespy.com/api/conversations';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"body":"example","channel":"in_app","emailSenderSource":"system","fromAccountId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","participantId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","participantType":"tenant","subject":"example","toAddresses":["example"]}'};
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.getvespy.com/api/conversations \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "body": "example", "channel": "in_app", "emailSenderSource": "system", "fromAccountId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "participantId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "participantType": "tenant", "subject": "example", "toAddresses": [ "example" ] }'Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
body
required
string
channel
string
emailSenderSource
string
fromAccountId
string format: uuid
participantId
string format: uuid
participantType
string
subject
string
toAddresses
Array<string>
Responses
Section titled “Responses”Default Response
Media typeapplication/json
object
conversation
required
object
channels
required
Array<string>
createdAt
required
string format: date-time
id
required
string format: uuid
lastMessageAt
required
string format: date-time
latestMessagePreview
required
string
organizationId
required
string format: uuid
participantEmail
required
string format: email
participantId
required
string format: uuid
participantName
required
string
participantPhone
required
string
participantType
required
string
status
required
string
subject
required
string
unreadCount
required
integer
updatedAt
required
string format: date-time
message
required
object
body
required
string
channel
required
string
conversationId
required
string format: uuid
createdAt
required
string format: date-time
emailMessageId
required
string
externalId
required
string
fromAddress
required
string
id
required
string format: uuid
metadata
required
object
key
additional properties
any
organizationId
required
string format: uuid
senderId
required
string format: uuid
senderName
required
string
senderType
required
string
smsSid
required
string
toAddresses
required
Array<string>
Example
{ "conversation": { "channels": [ "in_app" ], "participantType": "tenant", "status": "open" }, "message": { "channel": "in_app", "senderType": "staff" }}Default Response
Media typeapplication/json
object
code
string
errors
Array<object>
object
code
required
string
message
required
string
path
required
string
message
required
string
Examplegenerated
{ "code": "example", "errors": [ { "code": "example", "message": "example", "path": "example" } ], "message": "example"}Default Response
Media typeapplication/json
object
code
string
errors
Array<object>
object
code
required
string
message
required
string
path
required
string
message
required
string
Examplegenerated
{ "code": "example", "errors": [ { "code": "example", "message": "example", "path": "example" } ], "message": "example"}Default Response
Media typeapplication/json
object
code
string
errors
Array<object>
object
code
required
string
message
required
string
path
required
string
message
required
string
Examplegenerated
{ "code": "example", "errors": [ { "code": "example", "message": "example", "path": "example" } ], "message": "example"}Default Response
Media typeapplication/json
object
code
string
errors
Array<object>
object
code
required
string
message
required
string
path
required
string
message
required
string
Examplegenerated
{ "code": "example", "errors": [ { "code": "example", "message": "example", "path": "example" } ], "message": "example"}Default Response
Media typeapplication/json
object
code
string
errors
Array<object>
object
code
required
string
message
required
string
path
required
string
message
required
string
Examplegenerated
{ "code": "example", "errors": [ { "code": "example", "message": "example", "path": "example" } ], "message": "example"}