Marsview offers intent recognition for text, speech in async and real-time.
Custom statement tag detection in real-time speech analytics Learn more
Custom statement tag detection in async speech analytics Learn more
Creation of Statement Tags
API Request
Creates a new statement tag and responds with the new statementTagId in the database
POST
https://api.marsview.ai/cb/v1/profile/statement_tags/create_statement_tag
Creates
Query Parameters
Request Body
200: OK The statement tag is created if the server responds with a 200 status code and the status is set to True in the JSON response 401: Unauthorized If the request is unauthorized then the server responds with a 200 status code and the status is set to False in the JSON response
Copy {
"status" : true ,
"data" : {
"statementTag" : "statement-bxllq7f8vkxh7t78e-1640158143710"
}
}
Copy {
"status" : false ,
"error" : {
"name" : "JsonWebTokenError" ,
"message" : "invalid token"
} ,
"message" : "Error validating token"
} F
Example Curl Request
Shown below is a code snippet to create a new intent
Copy curl --location --request POST 'https://api.marsview.ai/cb/v1/profile/statement_tags/create_statement_tag/<userId>' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <JWT access token>' \
--data-raw '{
"userId" : "demo@marsview.ai",
"statementTagName" : "Demo StatementTag",
"statementTagSamples" : ["This is a statement tag sample", "These samples are used of statement tag detection"],
"statementTagSamplePhrases" : ["statement tag phrase", "phrase sample"],
"priority" : 2,
"threshold" : 0.8
}'
Example Response
The statement tag is created if the server responds with a 200 status code and the status
is set to True
in the JSON response
Copy {
"status": true,
"data": {
"statementTag": "statement-bxllq7f8vkxh7t78e-1640158143710"
}
}
Get User Statement Tags
API Request
Responds with all the statement tag data and from the database
GET
https://api.marsview.ai/cb/v1/profile/statement_tags/get_user_statement_tags
Creates
Query Parameters
200: OK The statement tag is deleted if the server responds with a 200 status code and the status is set to True in the JSON response 401: Unauthorized If the request is unauthorized then the server responds with a 200 status code and the status is set to False in the JSON response
Copy {
"status" : true ,
"data" : {
[
{
"_id" : "61c28121c3201048f422b612" ,
"type" : "custom" ,
"user_id" : "chandra.sekhar@marsview.ai" ,
"statement_tag_id" : "statement-bxllq7f8vkxgv7vmk-1640136993500" ,
"statement_tag_name" : "sample name" ,
"implements" : [] ,
"statement_tag_samples" : [
"This is a statement tag sample" ,
"These samples are used of statement tag detection"
] ,
"statement_tag_sample_phrases" : [
"statement tag phrase" ,
"phrase sample"
] ,
"priority" : 2 ,
"threshold" : 0.8 ,
"deleted" : false
}
]
}
}
Copy {
"status" : false ,
"error" : {
"name" : "JsonWebTokenError" ,
"message" : "invalid token"
} ,
"message" : "Error validating token"
} F
Example Curl Request
Shown below is a code snippet to fetch all the intents of a user
Copy curl --location --request GET 'https://api.marsview.ai/cb/v1/profile/statement_tags/get_user_statement_tags/<userId>' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <JWT access token>'
Example Response
The intents are fetched and returned if the server responds with a 200 status code and the status
is set to True
in the JSON response
Copy {
"status": true,
"data": {
[
{
"_id": "61c28121c3201048f422b612",
"type": "custom",
"user_id": "chandra.sekhar@marsview.ai",
"statement_tag_id": "statement-bxllq7f8vkxgv7vmk-1640136993500",
"statement_tag_name": "sample name",
"implements": [],
"statement_tag_samples": [
"This is a statement tag sample",
"These samples are used of statement tag detection"
],
"statement_tag_sample_phrases": [
"statement tag phrase",
"phrase sample"
],
"priority": 2,
"threshold": 0.8,
"deleted": false
}
]
}
}
Deletion of Statement Tags
API Request
Deletes an existing statement tag and responds with the deleted statementTagId from the database
DELETE
https://api.marsview.ai/cb/v1/profile/statement_tags/delete_statement_tag
Creates
Query Parameters
200: OK The statement tag is deleted if the server responds with a 200 status code and the status is set to True in the JSON response 401: Unauthorized If the request is unauthorized then the server responds with a 200 status code and the status is set to False in the JSON response
Copy {
"status" : true ,
"data" : {
"msg" : "Statement Tag Deleted successfully" ,
"statementTagId" : "statement-bxllq7f8vkxgv8jhu-1640137024434"
}
}
Copy {
"status" : false ,
"error" : {
"name" : "JsonWebTokenError" ,
"message" : "invalid token"
} ,
"message" : "Error validating token"
} F
Example Curl Request
Shown below is a code snippet to delete an existing intent
Copy curl --location --request DELETE 'https://api.marsview.ai/cb/v1/profile/statement_tags/delete_statement_tag/<userId>/<statementTagId>' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <JWT access token>'
Example Response
The intent is deleted if the server responds with a 200 status code and the status
is set to True
in the JSON response
Copy {
"status": true,
"data": {
"msg": "Statement Tag Deleted successfully",
"statementTagId": "statement-bxllq7f8vkxgv8jhu-1640137024434"
}
}