Skip to main content
POST
/
autocompose
/
v1
/
spellcheck
/
correction
Check for spelling mistakes
curl --request POST \
  --url https://api.sandbox.asapp.com/autocompose/v1/spellcheck/correction \
  --header 'Content-Type: application/json' \
  --header 'asapp-api-id: <api-key>' \
  --header 'asapp-api-secret: <api-key>' \
  --data '
{
  "text": "How is tihs ",
  "typingEvent": {
    "cursorStart": 11,
    "cursorEnd": 12
  },
  "userDictionary": [
    "Hellooo"
  ],
  "language": "en"
}
'
{
  "id": "01BX5ZZKBKACTAV9WEVGEMMVS1",
  "misspelledText": "tihs",
  "correctedText": "this",
  "position": 7
}

Authorizations

asapp-api-id
string
header
required
asapp-api-secret
string
header
required

Body

application/json

The parameters for getting a spelling correction as a message is being typed.

text
string
required

Text being typed by the agent, already entered into the composer

typingEvent
object
required
userDictionary
string[]

Words that should not be corrected if they are present on the text

language
string

Optional IETF language tag of the text. If not provided, the default language will be assumed which most likely will be English but it could be a different language depending on the customer setup.

Response

Successfully checked for a spelling mistake.

id
string

ID for the spelling correction that was returned (to be used in analytics events)

Example:

"01BX5ZZKBKACTAV9WEVGEMMVS1"

misspelledText
string

misspelling that needs to be replaced with the corrected text

Example:

"tihs"

correctedText
string

correction for the misspelling

Example:

"this"

position
integer

position where the misspelling starts

Example:

7