POST
/
evaluate
/
highlight
/
{highlight_id}
JavaScript
import Hyperspell from 'hyperspell';

const client = new Hyperspell({
  apiKey: 'My API Key',
});

const response = await client.evaluate.scoreHighlight('highlight_id');

console.log(response.message);
{
  "success": true,
  "message": "<string>"
}

Authorizations

Authorization
string
header
required

API Key or JWT User Token. If using an API Key, set the X-As-User header to act as a specific user. A JWT User Token is always scoped to a specific user.

Path Parameters

highlight_id
string
required

Body

application/json
score
number
default:0

Rating of the chunk from -1 (bad) to +1 (good).

Required range: -1 <= x <= 1
comment
string | null

Comment on the chunk

Response

Successful Response

success
boolean
required

Whether the feedback was successfully saved.

message
string
required

A message describing the result.