Developers

API Routes

All API accesses are done over HTTPS.

Authentication process

Authentication is done via HTTP headers. For more information, see the Authorization section.

Request Format

Send the request parameters in the body through a query string.

Response Format

The response format for all requests is a JSON object. The HTTP status code shows if a request succeeds or not. A 2xx status code means success. Any other code means a failure occurred.

Note

When a request fails, the response body is still in JSON.

Quick Reference

Note: The placeholders in the Try Out sections on this page are meant as an example. This not a demo. To try out a feature, make sure beforehand that this feature is enabled in your instance.

API Routes

default

GET /words

Obtains and returns the Inbenta Lexicon words related to the provided Lexical Unit ID parameter

Parameters
Name Description

()
lexical_unit_id
string (query)

provide the Lexical Unit ID to get the words from

* required fields
Responses
Code 200

get words response

{ // List of the Inbenta Lexicon words related to the provided Lexical Unit ID "words":
[
{ "word": string ...}
...]
...}
Code 400

Invalid parameters

// Error message
{ // Error status code "status": integer, // Error message string "error": string, // Error message reference "error_reference": string ...}
Code 401

Unauthorized access

// Error message
{ // Error status code "status": integer, // Error message string "error": string, // Error message reference "error_reference": string ...}
Code 500

get words error

// Error message
{ // Error status code "status": integer, // Error message string "error": string, // Error message reference "error_reference": string ...}
POST /sentiment-analysis

Uses AI to check a text or chat conversation for user sentiment, such as joy or frustration.

Parameters
Name Description
analysis_type *
string (body)

The type of information you are analyizing for sentiment. conversation will analyze a Chat conversation between two users. text will analyze a single block of text.

sentiments *
array (body)

An array of emotions or sentiment that you want to detect in the user.

input *
mixed (body)

The text or conversation to be analyzed for user sentiment. If you are using the analysis type text, submit the text in a string. If you are using the analysis type conversation, submit an array with the Chat conversation.

* required fields
Responses
Code 200

Get sentiment analysis response.

// Example: [{"sentiments":[{"name":"joy","topic":"gratitude"}]}]
json
Code 400

Invalid parameters

// Error message
{ // Error status code "status": integer, // Error message string "error": string, // Error message reference "error_reference": string ...}
Code 401

Unauthorized access

// Error message
{ // Error status code "status": integer, // Error message string "error": string, // Error message reference "error_reference": string ...}
Code 500

get sentiment analysis error

// Error message
{ // Error status code "status": integer, // Error message string "error": string, // Error message reference "error_reference": string ...}
POST /summary

Uses AI to summarize a text or chat conversation.

Parameters
Name Description
summary_type *
string (body)

The type of information you are summarizing. conversation will summarize a Chat conversation between two users. text will summarize a single block of text.

max_words *
int (body)

The maximum limit of characters for the summary to use.

input *
mixed (body)

The text or conversation to be summarized. If you are using the summary type text, submit the text in a string. If you are using the summary type conversation, submit an array with the Chat conversation.

* required fields
Responses
Code 200

Get summary response.

// Example: [{"summary":"The user requested a password reset and the agent directed them to the website's Forgot Password button, stating only the user can reset their own password."}]
string
Code 400

Invalid parameters

// Error message
{ // Error status code "status": integer, // Error message string "error": string, // Error message reference "error_reference": string ...}
Code 401

Unauthorized access

// Error message
{ // Error status code "status": integer, // Error message string "error": string, // Error message reference "error_reference": string ...}
Code 500

get summary error

// Error message
{ // Error status code "status": integer, // Error message string "error": string, // Error message reference "error_reference": string ...}

Interpretations

Use the following endpoints to obtain the interpretation of strings in natural language

GET /interpretations

Obtains and returns the Inbenta Natural Language Processing system’s interpretation of the string provided in the text parameter.

Parameters
Name Description

()
text
string (query)

provide the text to be interpreted

automatic_spell_correction
string (query)

option to apply Automatic Spell Correction to the provided text

contraction_level
number (query)

option to apply collocations that result in a contracted version of the provided text

* required fields
Responses
Code 200

get interpretations response

{ // Text interpretation according to Inbenta's Natural Language Processing system "interpretation":
{ // List of the symbol's interpreted lexical unit relations "lexical_units":
[
{ "lexical_unit_id": string, "identified_word": string, "symbol": string, "grammar_category": string, "semantic_category_weight": number, // List of the interpreted lexical units relations "relations":
[
{ "lexical_unit_id": string, "symbol": string, "grammar_category": string, "relevance": string ["Related","Similar","Synonym"] ...}
...]
...}
...]
...}
...}
Code 400

Invalid parameters

// Error message
{ // Error status code "status": integer, // Error message string "error": string, // Error message reference "error_reference": string ...}
Code 401

Unauthorized access

// Error message
{ // Error status code "status": integer, // Error message string "error": string, // Error message reference "error_reference": string ...}
Code 414

URI Too Long

// Error message
{ // Error status code "status": integer, // Error message string "error": string, // Error message reference "error_reference": string ...}
Code 500

get interpretations error

// Error message
{ // Error status code "status": integer, // Error message string "error": string, // Error message reference "error_reference": string ...}