Skip to content

/v1/projects/{projectId}/conversations (POST)

POST
/v1/projects/{projectId}/conversations
curl --request POST \
--url https://service.testing.nairon.cloud/v1/projects/example/conversations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "name": "example", "description": "example", "design": { "schemaVersion": "cd/1", "entry": { "stepId": "example", "alternates": [ "example" ] }, "steps": { "additionalProperty": { "kind": "greeting", "name": "example", "introLine": "example", "persona": { "whoAmI": "example", "purpose": "example" }, "on": { "next": "example" } } }, "knowledge": [ { "id": "example", "kind": "knowledgeBase", "knowledgeBaseId": "example" } ], "variables": [ { "id": "example", "name": "example", "type": "text" } ], "integrations": [ { "id": "example", "kind": "crm", "integrationId": "example" } ], "hooks": { "before": { "rootNodeId": "example", "entryPoints": { "additionalProperty": "example" }, "nodes": { "additionalProperty": { "id": "example", "name": "example", "next": { "hookNode": "example", "step": "example", "end": true }, "webhook": { "url": "example", "headers": { "additionalProperty": "example" }, "secretHint": "example", "signatureHeader": "example", "payload": [ { "id": "example", "key": "example", "source": "variable", "systemVariable": "example", "variableId": "example", "value": "example", "aiPrompt": "example" } ], "timeoutSeconds": 1, "responseVariableId": "example", "responsePath": "example" }, "fetch": { "url": "example", "method": "GET", "query": { "additionalProperty": "example" }, "headers": { "additionalProperty": "example" }, "body": [ { "id": "example", "key": "example", "source": "variable", "systemVariable": "example", "variableId": "example", "value": "example", "aiPrompt": "example" } ], "responseFormat": "json", "responseMappings": [ { "id": "example", "variableId": "example", "path": "example", "transform": "auto", "defaultValue": "example" } ] }, "condition": { "mode": "logic", "branches": [ { "id": "example", "label": "example", "predicate": { "variable": { "systemVariable": "example", "variableId": "example" }, "operator": "eq", "value": "example" }, "next": { "hookNode": "example", "step": "example", "end": true } } ], "else": { "hookNode": "example", "step": "example", "end": true } }, "setVariable": { "variableId": "example", "value": "example" }, "sendSms": { "to": { "systemVariable": "example", "variableId": "example", "literalString": "example" }, "message": "example" }, "crmLookup": { "integrationRef": "example", "matchBy": [ "phone" ], "phoneSource": { "systemVariable": "example", "variableId": "example" }, "emailSource": { "systemVariable": "example", "variableId": "example" }, "fieldMappings": [ { "id": "example", "field": "example", "variableId": "example", "defaultValue": "example" } ], "includePrimaryDeal": true, "onNotFound": { "hookNode": "example", "step": "example", "end": true } }, "crmWrite": { "integrationRef": "example", "contactIdSource": { "systemVariable": "example", "variableId": "example" }, "createContactIfMissing": true, "operations": [ "log_call" ], "logCall": { "subjectTemplate": "example", "includeTranscript": true, "includeSummary": true, "includeRecordingUrl": true }, "createNote": { "bodyTemplate": "example" }, "updateContact": { "propertyMappings": [ { "id": "example", "property": "example", "propertyLabel": "example", "source": "variable", "systemVariable": "example", "variableId": "example", "value": "example", "aiPrompt": "example" } ] } } } } }, "after": { "entryPoints": { "additionalProperty": "example" }, "prematureHangupNodeId": "example", "nodes": { "additionalProperty": { "id": "example", "name": "example", "next": { "hookNode": "example", "step": "example", "end": true }, "webhook": { "url": "example", "headers": { "additionalProperty": "example" }, "secretHint": "example", "signatureHeader": "example", "payload": [ { "id": "example", "key": "example", "source": "variable", "systemVariable": "example", "variableId": "example", "value": "example", "aiPrompt": "example" } ], "timeoutSeconds": 1, "responseVariableId": "example", "responsePath": "example" }, "fetch": { "url": "example", "method": "GET", "query": { "additionalProperty": "example" }, "headers": { "additionalProperty": "example" }, "body": [ { "id": "example", "key": "example", "source": "variable", "systemVariable": "example", "variableId": "example", "value": "example", "aiPrompt": "example" } ], "responseFormat": "json", "responseMappings": [ { "id": "example", "variableId": "example", "path": "example", "transform": "auto", "defaultValue": "example" } ] }, "condition": { "mode": "logic", "branches": [ { "id": "example", "label": "example", "predicate": { "variable": { "systemVariable": "example", "variableId": "example" }, "operator": "eq", "value": "example" }, "next": { "hookNode": "example", "step": "example", "end": true } } ], "else": { "hookNode": "example", "step": "example", "end": true } }, "setVariable": { "variableId": "example", "value": "example" }, "sendSms": { "to": { "systemVariable": "example", "variableId": "example", "literalString": "example" }, "message": "example" }, "crmLookup": { "integrationRef": "example", "matchBy": [ "phone" ], "phoneSource": { "systemVariable": "example", "variableId": "example" }, "emailSource": { "systemVariable": "example", "variableId": "example" }, "fieldMappings": [ { "id": "example", "field": "example", "variableId": "example", "defaultValue": "example" } ], "includePrimaryDeal": true, "onNotFound": { "hookNode": "example", "step": "example", "end": true } }, "crmWrite": { "integrationRef": "example", "contactIdSource": { "systemVariable": "example", "variableId": "example" }, "createContactIfMissing": true, "operations": [ "log_call" ], "logCall": { "subjectTemplate": "example", "includeTranscript": true, "includeSummary": true, "includeRecordingUrl": true }, "createNote": { "bodyTemplate": "example" }, "updateContact": { "propertyMappings": [ { "id": "example", "property": "example", "propertyLabel": "example", "source": "variable", "systemVariable": "example", "variableId": "example", "value": "example", "aiPrompt": "example" } ] } } } } } }, "compliance": { "aiDisclosure": { "additionalProperty": { "status": "approved", "checkedText": "example", "reason": "example" } } }, "layout": { "additionalProperty": { "x": 1, "y": 1 } } } }'
projectId
required
string format: cuid
/^[cC][0-9a-z]{6,}$/
Media typeapplication/json
object
name
required
string
>= 1 characters <= 200 characters
description
string
<= 5000 characters
design
object
schemaVersion
required
string
Allowed values: cd/1
entry
required
object
stepId
required
string
>= 1 characters
alternates
Array<string>
steps
required
object
key
additional properties
One of:
object
kind
required
string
Allowed values: greeting
name
string
introLine
string
persona
object
whoAmI
string
purpose
string
on
required
object
next
string
>= 1 characters
knowledge
Array
One of:
object
id
required
string
>= 1 characters
kind
required
string
Allowed values: knowledgeBase
knowledgeBaseId
required
string
>= 1 characters
variables
Array<object>
object
id
required
string
>= 1 characters
name
string
type
required
string
Allowed values: text number object
integrations
Array<object>
object
id
required
string
>= 1 characters
kind
required
string
Allowed values: crm calendar knowledge
integrationId
required
string
>= 1 characters
hooks
object
before
object
rootNodeId
string
>= 1 characters
entryPoints
object
key
additional properties
string
>= 1 characters
nodes
required
object
key
additional properties
object
id
required
string
>= 1 characters
name
string
next
object
hookNode
string
>= 1 characters
step
string
>= 1 characters
end
boolean
webhook
object
url
required
string
headers
object
key
additional properties
string
secretHint
string
signatureHeader
string
payload
required
Array<object>
object
id
required
string
>= 1 characters
key
required
string
source
required
string
Allowed values: variable custom ai
systemVariable
string
variableId
string
>= 1 characters
value
string
aiPrompt
string
timeoutSeconds
integer
>= -9007199254740991 <= 9007199254740991
responseVariableId
string
>= 1 characters
responsePath
string
fetch
object
url
required
string
method
required
string
Allowed values: GET POST
query
object
key
additional properties
string
headers
object
key
additional properties
string
body
Array<object>
object
id
required
string
>= 1 characters
key
required
string
source
required
string
Allowed values: variable custom ai
systemVariable
string
variableId
string
>= 1 characters
value
string
aiPrompt
string
responseFormat
string
Allowed values: json text
responseMappings
required
Array<object>
object
id
required
string
>= 1 characters
variableId
required
string
>= 1 characters
path
string
transform
string
Allowed values: auto text number boolean json
defaultValue
string
condition
One of:
object
mode
required
string
Allowed values: logic
branches
required
Array<object>
object
id
required
string
>= 1 characters
label
required
string
predicate
required
object
variable
required
object
systemVariable
string
variableId
string
>= 1 characters
operator
required
string
Allowed values: eq neq exists not_exists gt lt contains
value
string
next
required
object
hookNode
string
>= 1 characters
step
string
>= 1 characters
end
boolean
else
required
object
hookNode
string
>= 1 characters
step
string
>= 1 characters
end
boolean
setVariable
object
variableId
required
string
>= 1 characters
value
required
string
sendSms
object
to
required
object
systemVariable
string
variableId
string
>= 1 characters
literalString
string
message
required
string
crmLookup
object
integrationRef
required
string
>= 1 characters
matchBy
required
Array<string>
Allowed values: phone email
phoneSource
object
systemVariable
string
variableId
string
>= 1 characters
emailSource
object
systemVariable
string
variableId
string
>= 1 characters
fieldMappings
required
Array<object>
object
id
required
string
>= 1 characters
field
required
string
variableId
required
string
>= 1 characters
defaultValue
string
includePrimaryDeal
boolean
onNotFound
object
hookNode
string
>= 1 characters
step
string
>= 1 characters
end
boolean
crmWrite
object
integrationRef
required
string
>= 1 characters
contactIdSource
required
object
systemVariable
string
variableId
string
>= 1 characters
createContactIfMissing
boolean
operations
required
Array<string>
Allowed values: log_call create_note update_contact
logCall
object
subjectTemplate
string
includeTranscript
required
boolean
includeSummary
required
boolean
includeRecordingUrl
required
boolean
createNote
object
bodyTemplate
required
string
updateContact
object
propertyMappings
required
Array<object>
object
id
required
string
>= 1 characters
property
required
string
propertyLabel
string
source
required
string
Allowed values: variable custom ai
systemVariable
string
variableId
string
>= 1 characters
value
string
aiPrompt
string
after
object
entryPoints
object
key
additional properties
string
>= 1 characters
prematureHangupNodeId
string
>= 1 characters
nodes
required
object
key
additional properties
object
id
required
string
>= 1 characters
name
string
next
object
hookNode
string
>= 1 characters
step
string
>= 1 characters
end
boolean
webhook
object
url
required
string
headers
object
key
additional properties
string
secretHint
string
signatureHeader
string
payload
required
Array<object>
object
id
required
string
>= 1 characters
key
required
string
source
required
string
Allowed values: variable custom ai
systemVariable
string
variableId
string
>= 1 characters
value
string
aiPrompt
string
timeoutSeconds
integer
>= -9007199254740991 <= 9007199254740991
responseVariableId
string
>= 1 characters
responsePath
string
fetch
object
url
required
string
method
required
string
Allowed values: GET POST
query
object
key
additional properties
string
headers
object
key
additional properties
string
body
Array<object>
object
id
required
string
>= 1 characters
key
required
string
source
required
string
Allowed values: variable custom ai
systemVariable
string
variableId
string
>= 1 characters
value
string
aiPrompt
string
responseFormat
string
Allowed values: json text
responseMappings
required
Array<object>
object
id
required
string
>= 1 characters
variableId
required
string
>= 1 characters
path
string
transform
string
Allowed values: auto text number boolean json
defaultValue
string
condition
One of:
object
mode
required
string
Allowed values: logic
branches
required
Array<object>
object
id
required
string
>= 1 characters
label
required
string
predicate
required
object
variable
required
object
systemVariable
string
variableId
string
>= 1 characters
operator
required
string
Allowed values: eq neq exists not_exists gt lt contains
value
string
next
required
object
hookNode
string
>= 1 characters
step
string
>= 1 characters
end
boolean
else
required
object
hookNode
string
>= 1 characters
step
string
>= 1 characters
end
boolean
setVariable
object
variableId
required
string
>= 1 characters
value
required
string
sendSms
object
to
required
object
systemVariable
string
variableId
string
>= 1 characters
literalString
string
message
required
string
crmLookup
object
integrationRef
required
string
>= 1 characters
matchBy
required
Array<string>
Allowed values: phone email
phoneSource
object
systemVariable
string
variableId
string
>= 1 characters
emailSource
object
systemVariable
string
variableId
string
>= 1 characters
fieldMappings
required
Array<object>
object
id
required
string
>= 1 characters
field
required
string
variableId
required
string
>= 1 characters
defaultValue
string
includePrimaryDeal
boolean
onNotFound
object
hookNode
string
>= 1 characters
step
string
>= 1 characters
end
boolean
crmWrite
object
integrationRef
required
string
>= 1 characters
contactIdSource
required
object
systemVariable
string
variableId
string
>= 1 characters
createContactIfMissing
boolean
operations
required
Array<string>
Allowed values: log_call create_note update_contact
logCall
object
subjectTemplate
string
includeTranscript
required
boolean
includeSummary
required
boolean
includeRecordingUrl
required
boolean
createNote
object
bodyTemplate
required
string
updateContact
object
propertyMappings
required
Array<object>
object
id
required
string
>= 1 characters
property
required
string
propertyLabel
string
source
required
string
Allowed values: variable custom ai
systemVariable
string
variableId
string
>= 1 characters
value
string
aiPrompt
string
compliance
object
aiDisclosure
object
key
additional properties
object
status
required
string
Allowed values: approved rejected
checkedText
required
string
reason
string
layout
object
key
additional properties
object
x
required
number
y
required
number

Default Response

Media typeapplication/json
object
id
required
string format: cuid
/^[cC][0-9a-z]{6,}$/
projectId
required
string format: cuid
/^[cC][0-9a-z]{6,}$/
name
required
string
description
required
Any of:
string
design
required
object
kind
required
string
Allowed values: simple graph
activeVersion
required
Any of:
object
n
required
integer
>= -9007199254740991 <= 9007199254740991
tag
required
string
createdAt
required
string
Example
{
"design": {
"kind": "simple"
}
}