Custom Statement Tags
​
Marsview offers intent recognition for text, speech in async and real-time.
Custom statement tag detection Learn more​
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

post
https://api.marsview.ai/cb/v1/profile/statement_tags/create_statement_tag
Creates a new statement tag and responds with the new statementTagId in the database

Example Curl Request

Shown below is a code snippet to create a new intent
1
curl --location --request POST 'https://api.marsview.ai/cb/v1/profile/statement_tags/create_statement_tag/<userId>' \
2
--header 'Content-Type: application/json' \
3
--header 'Authorization: Bearer <JWT access token>' \
4
--data-raw '{
5
"userId" : "[email protected]",
6
"statementTagName" : "Demo StatementTag",
7
"statementTagSamples" : ["This is a statement tag sample", "These samples are used of statement tag detection"],
8
"statementTagSamplePhrases" : ["statement tag phrase", "phrase sample"],
9
"priority" : 2,
10
"threshold" : 0.8
11
}'
Copied!

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
1
{
2
"status": true,
3
"data": {
4
"statementTag": "statement-bxllq7f8vkxh7t78e-1640158143710"
5
}
6
}
Copied!

Get User Statement Tags

API Request

get
https://api.marsview.ai/cb/v1/profile/statement_tags/get_user_statement_tags
Responds with all the statement tag data and from the database

Example Curl Request

Shown below is a code snippet to fetch all the intents of a user
1
curl --location --request GET 'https://api.marsview.ai/cb/v1/profile/statement_tags/get_user_statement_tags/<userId>' \
2
--header 'Content-Type: application/json' \
3
--header 'Authorization: Bearer <JWT access token>'
Copied!

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
1
{
2
"status": true,
3
"data": {
4
[
5
{
6
"_id": "61c28121c3201048f422b612",
7
"type": "custom",
8
"user_id": "[email protected]",
9
"statement_tag_id": "statement-bxllq7f8vkxgv7vmk-1640136993500",
10
"statement_tag_name": "sample name",
11
"implements": [],
12
"statement_tag_samples": [
13
"This is a statement tag sample",
14
"These samples are used of statement tag detection"
15
],
16
"statement_tag_sample_phrases": [
17
"statement tag phrase",
18
"phrase sample"
19
],
20
"priority": 2,
21
"threshold": 0.8,
22
"deleted": false
23
}
24
]
25
}
26
}
Copied!

Deletion of Statement Tags

API Request

delete
https://api.marsview.ai/cb/v1/profile/statement_tags/delete_statement_tag
Deletes an existing statement tag and responds with the deleted statementTagId from the database

Example Curl Request

Shown below is a code snippet to delete an existing intent
1
curl --location --request DELETE 'https://api.marsview.ai/cb/v1/profile/statement_tags/delete_statement_tag/<userId>/<statementTagId>' \
2
--header 'Content-Type: application/json' \
3
--header 'Authorization: Bearer <JWT access token>'
Copied!

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
1
{
2
"status": true,
3
"data": {
4
"msg": "Statement Tag Deleted successfully",
5
"statementTagId": "statement-bxllq7f8vkxgv8jhu-1640137024434"
6
}
7
}
Copied!