Skip to content

Create a test

POST
/tests
curl --request POST \
--url https://api-language-test.lernexa.com/api/v1/tests \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "name": "Ana Torres", "email": "ana.torres@example.com", "language": "French", "interfaceLanguage": "Spanish", "chineseScript": "simplified", "skills": [ "Use of language", "Reading", "Listening" ], "externalId": "006Qy00000A1b2CIAR-S1", "sendEmail": false }'

Creates a test for a candidate and, unless sendEmail is false, emails them its link. Safe to repeat with an externalId: a second request with it returns the first test, as it is now. At most 1,000 tests an hour per key.

Media typeapplication/json

A test to create. A field not listed here is refused.

object
name
required

The candidate’s name.

string
>= 1 characters <= 100 characters
email
required

The candidate’s email address. Their results go there when they finish.

string format: email
<= 254 characters
language
required

The language tested, by its English name, in any case: English, French, German, Spanish, Italian, Portuguese, Swedish, Mandarin, Japanese, Greek, Arabic, Dutch.

string
>= 1 characters <= 50 characters
interfaceLanguage

The candidate’s own language, for the screens and emails, by its English name. Left out or empty: English.

string
<= 50 characters
chineseScript

For a Mandarin test, its characters. Left out or empty: simplified.

string
Allowed values: simplified traditional
skills

The sections, as an array or as text separated by commas. Use of language is always tested. Left out or empty: your school’s defaults.

Array<string>
<= 4 items
Allowed values: Use of language Reading Listening Writing
externalId

Your own id for this sitting, sent back with the result. A second request with it returns the test the first created.

string
>= 1 characters <= 200 characters
sendEmail
Any of:
boolean

A test with this externalId already exists: it is returned as it is now, and the request’s other fields are ignored.

Media typeapplication/json

A test, with its result once completed.

object
id
required
string format: uuid
externalId
required

Your own id for the sitting, if you gave one.

string | null
name
required
string | null
email
required
string | null
language
required

The language tested.

string
Allowed values: English French German Spanish Italian Portuguese Swedish Mandarin Japanese Greek Arabic Dutch
interfaceLanguage
required

The candidate’s own language.

string
Allowed values: English French German Spanish Italian Portuguese Swedish Mandarin Japanese Greek Arabic Dutch
skills
required

The sections the test covers.

Array<string>
Allowed values: Use of language Reading Listening Writing
status
required

Invited until the candidate starts, in progress until every section is done, then completed.

string
Allowed values: invited in progress completed
url
required
Any of:
string format: uri
staffUrl
required

The test’s page in the staff app.

string format: uri
createdAt
required
string format: date-time
openedAt
required
Any of:
string format: date-time
completedAt
required
Any of:
string format: date-time
result
required
Any of:

What a completed test found, and what staff decided.

object
overall
required
Any of:

A CEFR level with one of four sub-bands.

object
level
required

The CEFR level.

string
Allowed values: A1 A2 B1 B2 C1 C2
band
required

Its quarter of the level.

string
Allowed values: Low Mid-Low Mid-High High
text
required

Level and band as one string, 11 characters at most.

string
placement
required
Any of:

A CEFR level with one of four sub-bands.

object
level
required

The CEFR level.

string
Allowed values: A1 A2 B1 B2 C1 C2
band
required

Its quarter of the level.

string
Allowed values: Low Mid-Low Mid-High High
text
required

Level and band as one string, 11 characters at most.

string
levelText
required

The level to record, at most 20 characters: the placement, else the overall level, else “Not enough evidence”.

string
sections
required

Each section the test covered, with its level.

Array<object>
object
skill
required
string
Allowed values: Use of language Reading Listening Writing
level
required
Any of:

A CEFR level with one of four sub-bands.

object
level
required

The CEFR level.

string
Allowed values: A1 A2 B1 B2 C1 C2
band
required

Its quarter of the level.

string
Allowed values: Low Mid-Low Mid-High High
text
required

Level and band as one string, 11 characters at most.

string
recordUrl
required
Any of:
string format: uri

Example

{
"language": "English",
"interfaceLanguage": "English",
"skills": [
"Use of language"
],
"status": "invited",
"result": {
"overall": {
"level": "A1",
"band": "Low",
"text": "B1 High"
},
"placement": {
"level": "A1",
"band": "Low",
"text": "B1 High"
},
"levelText": "B1 High",
"sections": [
{
"skill": "Use of language",
"level": {
"level": "A1",
"band": "Low",
"text": "B1 High"
}
}
]
}
}

Created.

Media typeapplication/json

A test, with its result once completed.

object
id
required
string format: uuid
externalId
required

Your own id for the sitting, if you gave one.

string | null
name
required
string | null
email
required
string | null
language
required

The language tested.

string
Allowed values: English French German Spanish Italian Portuguese Swedish Mandarin Japanese Greek Arabic Dutch
interfaceLanguage
required

The candidate’s own language.

string
Allowed values: English French German Spanish Italian Portuguese Swedish Mandarin Japanese Greek Arabic Dutch
skills
required

The sections the test covers.

Array<string>
Allowed values: Use of language Reading Listening Writing
status
required

Invited until the candidate starts, in progress until every section is done, then completed.

string
Allowed values: invited in progress completed
url
required
Any of:
string format: uri
staffUrl
required

The test’s page in the staff app.

string format: uri
createdAt
required
string format: date-time
openedAt
required
Any of:
string format: date-time
completedAt
required
Any of:
string format: date-time
result
required
Any of:

What a completed test found, and what staff decided.

object
overall
required
Any of:

A CEFR level with one of four sub-bands.

object
level
required

The CEFR level.

string
Allowed values: A1 A2 B1 B2 C1 C2
band
required

Its quarter of the level.

string
Allowed values: Low Mid-Low Mid-High High
text
required

Level and band as one string, 11 characters at most.

string
placement
required
Any of:

A CEFR level with one of four sub-bands.

object
level
required

The CEFR level.

string
Allowed values: A1 A2 B1 B2 C1 C2
band
required

Its quarter of the level.

string
Allowed values: Low Mid-Low Mid-High High
text
required

Level and band as one string, 11 characters at most.

string
levelText
required

The level to record, at most 20 characters: the placement, else the overall level, else “Not enough evidence”.

string
sections
required

Each section the test covered, with its level.

Array<object>
object
skill
required
string
Allowed values: Use of language Reading Listening Writing
level
required
Any of:

A CEFR level with one of four sub-bands.

object
level
required

The CEFR level.

string
Allowed values: A1 A2 B1 B2 C1 C2
band
required

Its quarter of the level.

string
Allowed values: Low Mid-Low Mid-High High
text
required

Level and band as one string, 11 characters at most.

string
recordUrl
required
Any of:
string format: uri

Example

{
"language": "English",
"interfaceLanguage": "English",
"skills": [
"Use of language"
],
"status": "invited",
"result": {
"overall": {
"level": "A1",
"band": "Low",
"text": "B1 High"
},
"placement": {
"level": "A1",
"band": "Low",
"text": "B1 High"
},
"levelText": "B1 High",
"sections": [
{
"skill": "Use of language",
"level": {
"level": "A1",
"band": "Low",
"text": "B1 High"
}
}
]
}
}

Not JSON, a field missing or wrong, or a field not listed. The sentence names them.

Media typeapplication/json
object
error
required

What went wrong, in a sentence.

string

Example generated

{
"error": "example"
}

No key, an unknown key or a revoked key.

Media typeapplication/json
object
error
required

What went wrong, in a sentence.

string

Example generated

{
"error": "example"
}

A language the test does not cover, or not yet. The sentence names it.

Media typeapplication/json
object
error
required

What went wrong, in a sentence.

string

Example generated

{
"error": "example"
}

Too many requests: 600 a minute per key, 1,200 a minute from one address. Wait a minute.

Media typeapplication/json
object
error
required

What went wrong, in a sentence.

string

Example generated

{
"error": "example"
}