POST Text API

The Async Text API allows you to process any text payload.

It can be useful in any use case where you have access to the textual content of a type of conversation, and you want to extract the insightful items supported by the Conversation API.

HTTP REQUEST#

POST https://api.symbl.ai/v1/process/text

Example API call#

curl --location --request POST 'https://api.symbl.ai/v1/process/text' \
--header 'x-api-key: <generated_valid_token>' \
--header 'Content-Type: application/json' \
--data-raw '{
"entities": [{"customType": "Hiring Process", "text": "internships"}],
"detectPhrases":true,
"messages": [
{
"payload": {
"content": "Hi Mike, Natalia here. Hope you don’t mind me reaching out. Who would be the best possible person to discuss internships and student recruitment at ABC Corp? Would you mind pointing me toward the right person and the best way to reach them? Thanks in advance for your help, I really appreciate it!"
},
"from": {
"userId": "natalia@example.com",
"name": "Natalia"
},
"duration":{
"startTime":"2020-07-21T16:02:19.01Z",
"endTime":"2020-07-21T16:04:19.99Z"
}
},
{
"payload": {
"content": "Hey Natalia, thanks for reaching out. I am connecting you with Steve who handles recruitements for us."
},
"from": {
"userId": "mike@abccorp.com",
"name": "Mike"
},
"duration":{
"startTime":"2020-07-21T16:04:19.99Z",
"endTime":"2020-07-21T16:04:20.99Z"
}
}
]
}'

Request Headers#

Header NameRequiredValue
x-api-keyYesyour_auth_token
Content-Type Yesapplication/json

Request Body#

FieldRequiredTypeDescription
nameNostringYour meeting name. Default name set to conversationId.
messagesYeslistInput Messages to look for insights. See the messages section below for more details.
confidenceThresholdNodoubleMinimum required confidence for the insight to be recognized. Value ranges between 0.0 to 1.0. Default value is 0.5 .
detectPhrasesNobooleanIt shows Actionable Phrases in each sentence of conversation. These sentences can be found using the Conversation's Messages API. Default value is false.
entitiesNolistInput custom entities which can be detected in conversation using Entities' API.

messages#

FieldRequiredTypeDescription
payloadYesobjectInput Messages to look for insights. See the messages section below for more details.
fromNoobjectInformation about the User information produced the content of this message.
durationNoobjectDuration object containing startTime and endTime for the transcript.

payload#

FieldRequiredTypeDefaultDescription
contentTypeNostring (MIME type)text/plainTo indicate the type and/or format of the content. Please see RFC 6838 for more details. Currently only text/plain is supported.
fromNoobjectThe content of the message in the specified MIME type in the contentType field.

from(user)#

FieldRequiredTypeDescription
nameNostringName of the user.
userIdNostringA unique identifier of the user. E-mail ID is usually a preferred identifier for the user.

duration#

FieldRequiredTypeDescription
startTimeNoDateTimeThe start time for the particular text content.
endTimeNoDateTimeThe start time for the particular text content.

Query Params#

ParameterRequiredValue
webhookUrlNoWebhook url on which job updates to be sent. (This should be post API)

WebhookUrl will be used to send the status of job created for uploaded audio. Every time the status of the job changes it will be notified on the WebhookUrl.

Webhook Payload#

FieldDescription
jobIdID to be used with Job API.
statusCurrent status of the job. (Valid statuses - [ scheduled, in_progress, completed ])

Response#

{
"conversationId": "5815170693595136",
"jobId": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"
}

Response Object#

FieldDescription
conversationIdID to be used with Conversation API.
jobIdID to be used with Job API.

Response on reaching limit#

FieldDescription
Payload{ "message" : "This API has a limit of maximum of 5 number of concurrent jobs per account. If you are looking to scale, and need more concurrent jobs than this limit, please contact us at support@symbl.ai" }
Header{ "statusCode" : 429 }