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

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

NameTypeDescription

userId*

String

Your userId or registered email on the Marsview api platform

Headers

NameTypeDescription

Authorization*

String

Marsview api access token. You can generate it here

content-type*

String

The data type of the content in the request

Request Body

NameTypeDescription

userId*

String

Your userId or registered email on the Marsview api platform

statementTagName*

String

The name of the statementTag to be created

statementTagSamples*

Array

Array of text/sentences samples for the statementTag

statementTagPhrases

Integer

Array of phrases that used for phrase matching

threshold

Float

The confidence threshold to be used for statement tag detection

priority

Integer

The priority of the statement tag

{
    "status": true,
    "data": {
        "statementTag": "statement-bxllq7f8vkxh7t78e-1640158143710"
    }
}

Example Curl Request

Shown below is a code snippet to create a new intent

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

{
    "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

NameTypeDescription

userId*

String

Your userId or registered email on the Marsview api platform

Headers

NameTypeDescription

Authorization*

String

Marsview api access token. You can generate it here

content-type*

String

The data type of the content in the request

{
    "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
            }
        ]
    }
}

Example Curl Request

Shown below is a code snippet to fetch all the intents of a user

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

{
    "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

NameTypeDescription

userId*

String

Your userId or registered email on the Marsview api platform

statementTagId*

String

The statementTagId that needs to be deleted

Headers

NameTypeDescription

Authorization*

String

Marsview api access token. You can generate it here

content-type*

String

The data type of the content in the request

{
    "status": true,
    "data": {
        "msg": "Statement Tag Deleted successfully",
        "statementTagId": "statement-bxllq7f8vkxgv8jhu-1640137024434"
    }
}

Example Curl Request

Shown below is a code snippet to delete an existing intent

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

{
    "status": true,
    "data": {
        "msg": "Statement Tag Deleted successfully",
        "statementTagId": "statement-bxllq7f8vkxgv8jhu-1640137024434"
    }
}

Last updated