API reference
Version 1.0.0. Base address https://everwhy.app/api/schools/v1. Send your key as Authorization: Bearer ew_live_…. This page is drawn from the OpenAPI document, which you can load into your own tools.
- General: About the API · This document · Status · Your key · Usage and credits
- Classes: List classes · A class · A class's assignments · Results of an assignment
- Assessments: Speaking tests · List assessments · Assess pronunciation · Start a speaking test · An assessment · Delete an assessment · Record a prompt · Finish a speaking test
- Webhooks: List webhooks · Add a webhook · Remove a webhook · Send a test event
- Schemas
General
GET / No key needed
About the API
Its name, version and where the docs are.
| Answer | When |
|---|---|
200 | OK |
GET /openapi.json No key needed
This document
The OpenAPI 3.1 description of the API.
| Answer | When |
|---|---|
200 | OK |
GET /status No key needed
Status
Health checks (the same as the status page).
| Answer | When |
|---|---|
200 | OK |
GET /me
Your key
Which school and key a request acts as, the credits and the rate limit.
| Answer | When |
|---|---|
200 | OK |
401 | No key, or a key that isn't valid (auth_required, invalid_key) |
GET /usage
Usage and credits
Requests and credits by day (the last 30 days) and by endpoint (this month), for this key's mode.
| Answer | When |
|---|---|
200 | OK |
401 | No key, or a key that isn't valid (auth_required, invalid_key) |
429 | Too many requests (rate_limited, with retry_after) |
Classes
GET /classes
List classes
The school's classes (a sample class for sandbox keys).
| Answer | When |
|---|---|
200 | OK |
401 | No key, or a key that isn't valid (auth_required, invalid_key) |
429 | Too many requests (rate_limited, with retry_after) |
GET /classes/{class_id}
A class
Its roster (nicknames only) and its assignments.
| Answer | When |
|---|---|
200 | OK |
401 | No key, or a key that isn't valid (auth_required, invalid_key) |
404 | Not found (not_found) |
429 | Too many requests (rate_limited, with retry_after) |
GET /classes/{class_id}/assignments
A class's assignments
Each with how many students have done it.
| Answer | When |
|---|---|
200 | OK |
401 | No key, or a key that isn't valid (auth_required, invalid_key) |
404 | Not found (not_found) |
429 | Too many requests (rate_limited, with retry_after) |
GET /assignments/{assignment_id}/results
Results of an assignment
Every student's status, score and when they finished.
| Answer | When |
|---|---|
200 | OK |
401 | No key, or a key that isn't valid (auth_required, invalid_key) |
404 | Not found (not_found) |
429 | Too many requests (rate_limited, with retry_after) |
Assessments
GET /speaking-tests
Speaking tests
Every language level whose speaking test can run now. ?language=es (or es-ES) narrows it to one language.
Query: language
| Answer | When |
|---|---|
200 | OK |
401 | No key, or a key that isn't valid (auth_required, invalid_key) |
429 | Too many requests (rate_limited, with retry_after) |
GET /assessments
List assessments
Newest first, 50 a page; student and kind filter, cursor pages.
Query: student, kind, cursor
| Answer | When |
|---|---|
200 | OK |
401 | No key, or a key that isn't valid (auth_required, invalid_key) |
429 | Too many requests (rate_limited, with retry_after) |
POST /assessments/pronunciation
Assess pronunciation
A recording and the words expected in; scores for the whole phrase and each word out, with tips. 66 credits a minute of speech, one per started 60/66 of a second (nothing for sandbox keys). Sends assessment.finished.
| Field | Required | About |
|---|---|---|
audio | Yes | m4a, webm, ogg or wav, up to 2 MB (30 seconds for pronunciation, 20 per speaking-test prompt). Scored and deleted at once. |
text | Yes | The words expected, up to 300 characters |
language | Yes | A voice, such as es-ES |
student | No | Your own id for the student (up to 64 characters, no spaces), or a student id from GET /classes/{class_id}. Never a name or an email. |
| Answer | When |
|---|---|
201 | Scored |
400 | Bad request (invalid, audio_invalid, unknown_item) |
401 | No key, or a key that isn't valid (auth_required, invalid_key) |
402 | Out of credits (no_credits, with balance and needed) |
429 | Too many requests (rate_limited, with retry_after) |
503 | No scorer for live keys right now (speech_unavailable) |
POST /assessments/speaking
Start a speaking test
8 prompts drawn from the level's lessons, in three parts; 30 minutes to record them. 437 credits (nothing for sandbox keys), refunded when nothing is scored.
| Field | Required | About |
|---|---|---|
test | Yes | |
student | No | Your own id for the student (up to 64 characters, no spaces), or a student id from GET /classes/{class_id}. Never a name or an email. |
| Answer | When |
|---|---|
201 | Started |
400 | Bad request (invalid, audio_invalid, unknown_item) |
401 | No key, or a key that isn't valid (auth_required, invalid_key) |
402 | Out of credits (no_credits, with balance and needed) |
404 | Not found (not_found) |
429 | Too many requests (rate_limited, with retry_after) |
503 | No scorer for live keys right now (speech_unavailable) |
GET /assessments/{assessment_id}
An assessment
Its status, scores and (once finished) its result.
| Answer | When |
|---|---|
200 | OK |
401 | No key, or a key that isn't valid (auth_required, invalid_key) |
404 | Not found (not_found) |
429 | Too many requests (rate_limited, with retry_after) |
DELETE /assessments/{assessment_id}
Delete an assessment
It's gone at once, scores and all.
| Answer | When |
|---|---|
204 | Deleted |
401 | No key, or a key that isn't valid (auth_required, invalid_key) |
404 | Not found (not_found) |
429 | Too many requests (rate_limited, with retry_after) |
POST /assessments/{assessment_id}/items/{item_id}
Record a prompt
One recording for one prompt of a speaking test; recording a prompt again replaces its score. Each recording is scored, so a prompt takes 3 recordings and a test 16 (409 no_tries_left, with scope: item or test), and a test 12 a minute (429 rate_limited).
| Field | Required | About |
|---|---|---|
audio | Yes | m4a, webm, ogg or wav, up to 2 MB (30 seconds for pronunciation, 20 per speaking-test prompt). Scored and deleted at once. |
| Answer | When |
|---|---|
200 | OK |
400 | Bad request (invalid, audio_invalid, unknown_item) |
401 | No key, or a key that isn't valid (auth_required, invalid_key) |
404 | Not found (not_found) |
409 | Conflict (attempt_finished, time_up, nothing_scored, no_tries_left) |
429 | Too many requests (rate_limited, with retry_after) |
503 | No scorer for live keys right now (speech_unavailable) |
POST /assessments/{assessment_id}/finish
Finish a speaking test
Scores the test and returns its report (prompts not recorded count as 0), and sends assessment.finished. Finishing again returns the same assessment.
| Answer | When |
|---|---|
200 | OK |
401 | No key, or a key that isn't valid (auth_required, invalid_key) |
404 | Not found (not_found) |
409 | Conflict (attempt_finished, time_up, nothing_scored, no_tries_left) |
429 | Too many requests (rate_limited, with retry_after) |
Webhooks
GET /webhooks
List webhooks
This mode's webhooks.
| Answer | When |
|---|---|
200 | OK |
401 | No key, or a key that isn't valid (auth_required, invalid_key) |
429 | Too many requests (rate_limited, with retry_after) |
POST /webhooks
Add a webhook
An https address for assessment.finished. The answer holds the signing secret, once.
| Field | Required | About |
|---|---|---|
url | Yes | |
events | No |
| Answer | When |
|---|---|
201 | Added |
400 | Bad request (invalid, audio_invalid, unknown_item) |
401 | No key, or a key that isn't valid (auth_required, invalid_key) |
429 | Too many requests (rate_limited, with retry_after) |
DELETE /webhooks/{webhook_id}
Remove a webhook
No more deliveries go to it.
| Answer | When |
|---|---|
204 | Removed |
401 | No key, or a key that isn't valid (auth_required, invalid_key) |
404 | Not found (not_found) |
429 | Too many requests (rate_limited, with retry_after) |
POST /webhooks/{webhook_id}/test
Send a test event
A signed ping, tried once, at once: delivered or failed (what your address answered isn't passed back; check your server's own logs).
| Answer | When |
|---|---|
200 | OK |
401 | No key, or a key that isn't valid (auth_required, invalid_key) |
404 | Not found (not_found) |
429 | Too many requests (rate_limited, with retry_after) |
Schemas
Assessment
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"kind": {
"enum": [
"pronunciation",
"speaking_test"
]
},
"status": {
"enum": [
"in_progress",
"finished"
]
},
"sandbox": {
"type": "boolean"
},
"demo": {
"type": "boolean",
"description": "Scored by the offline demo scorer (sandbox keys)"
},
"student": {
"type": [
"string",
"null"
]
},
"language": {
"type": "string"
},
"text": {
"type": [
"string",
"null"
]
},
"test": {
"type": [
"object",
"null"
]
},
"items": {
"type": [
"array",
"null"
],
"items": {
"type": "object"
}
},
"result": {
"description": "A pronunciation result, or a finished speaking test's report; null until then",
"anyOf": [
{
"$ref": "#/components/schemas/PronunciationResult"
},
{
"$ref": "#/components/schemas/SpeakingReport"
},
{
"type": "null"
}
]
},
"credits": {
"type": "integer"
},
"refunded": {
"type": "boolean"
},
"created_at": {
"type": "string",
"format": "date-time"
},
"finished_at": {
"type": [
"string",
"null"
],
"format": "date-time"
},
"ends_at": {
"type": [
"string",
"null"
],
"format": "date-time"
}
}
}Assignment
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"class_id": {
"type": "string"
},
"kind": {
"enum": [
"lesson",
"course",
"problem_set",
"review"
]
},
"title": {
"type": "string"
},
"due_at": {
"type": "string",
"format": "date-time"
},
"created_at": {
"type": "string",
"format": "date-time"
},
"target": {
"type": "object",
"properties": {
"topic": {
"type": [
"string",
"null"
]
},
"level": {
"type": [
"integer",
"null"
]
},
"course": {
"type": [
"string",
"null"
]
},
"problem_set": {
"type": [
"string",
"null"
]
}
}
},
"done": {
"type": "integer"
},
"total": {
"type": "integer"
}
}
}Class
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"band": {
"enum": [
"kid",
"teen",
"adult"
]
},
"teacher": {
"type": "object",
"properties": {
"name": {
"type": "string"
}
}
},
"students": {
"type": "integer"
},
"course": {
"type": [
"object",
"null"
],
"properties": {
"slug": {
"type": "string"
},
"title": {
"type": "string"
}
}
},
"created_at": {
"type": "string",
"format": "date-time"
}
}
}ClassDetail
{
"allOf": [
{
"$ref": "#/components/schemas/Class"
},
{
"type": "object",
"properties": {
"students": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Student"
}
},
"assignments": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Assignment"
}
}
}
}
]
}Error
{
"type": "object",
"required": [
"code",
"detail"
],
"properties": {
"code": {
"type": "string",
"examples": [
"no_credits"
]
},
"detail": {
"type": "string"
},
"request_id": {
"type": "string"
}
}
}ItemScore
{
"type": "object",
"properties": {
"item_id": {
"type": "string"
},
"overall": {
"type": "integer"
},
"accuracy": {
"type": "integer"
},
"fluency": {
"type": "integer"
},
"completeness": {
"type": "integer"
},
"words": {
"type": "array",
"items": {
"type": "object",
"properties": {
"text": {
"type": "string"
},
"accuracy": {
"type": "integer"
},
"error": {
"type": [
"string",
"null"
],
"enum": [
null,
"mispronounced",
"omitted",
"inserted"
]
}
}
}
},
"text": {
"type": "string"
},
"romanization": {
"type": [
"string",
"null"
]
}
}
}Me
{
"type": "object",
"properties": {
"school": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
}
}
},
"key": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"mode": {
"enum": [
"live",
"sandbox"
]
},
"prefix": {
"type": "string"
}
}
},
"sandbox": {
"type": "boolean"
},
"credits": {
"type": "object",
"properties": {
"balance": {
"type": "integer"
}
}
},
"rate_limit": {
"type": "object",
"properties": {
"per_minute": {
"type": "integer"
}
}
}
}
}PronunciationResult
{
"type": "object",
"properties": {
"overall": {
"type": "integer"
},
"accuracy": {
"type": "integer"
},
"fluency": {
"type": "integer"
},
"completeness": {
"type": "integer"
},
"prosody": {
"type": [
"integer",
"null"
]
},
"words": {
"type": "array",
"items": {
"type": "object",
"properties": {
"text": {
"type": "string"
},
"accuracy": {
"type": "integer"
},
"error": {
"type": [
"string",
"null"
],
"enum": [
null,
"mispronounced",
"omitted",
"inserted"
]
}
}
}
},
"tips": {
"type": "array",
"items": {
"type": "string"
}
},
"seconds": {
"type": "number"
}
}
}Results
{
"type": "object",
"properties": {
"assignment": {
"$ref": "#/components/schemas/Assignment"
},
"results": {
"type": "array",
"items": {
"type": "object",
"properties": {
"student": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"nickname": {
"type": "string"
}
}
},
"status": {
"enum": [
"not_started",
"started",
"done",
"late"
]
},
"score": {
"type": [
"number",
"null"
],
"description": "A problem set's best score, 0 to 1"
},
"steps": {
"type": [
"object",
"null"
],
"properties": {
"done": {
"type": "integer"
},
"total": {
"type": "integer"
}
}
},
"completed_at": {
"type": [
"string",
"null"
],
"format": "date-time"
}
}
}
}
}
}SpeakingReport
{
"type": "object",
"description": "The same report the Everwhy app gives after a speaking test",
"properties": {
"id": {
"type": "string"
},
"overall": {
"type": "integer"
},
"accuracy": {
"type": "integer"
},
"fluency": {
"type": "integer"
},
"completeness": {
"type": "integer"
},
"scored": {
"type": "integer",
"description": "Prompts recorded and scored"
},
"total": {
"type": "integer"
},
"demo": {
"type": "boolean"
},
"level": {
"type": "object",
"properties": {
"cefr": {
"enum": [
"A1",
"A2",
"B1",
"B2",
"C1",
"C2"
]
},
"status": {
"enum": [
"clear",
"nearly",
"building"
]
},
"title": {
"type": "string"
},
"summary": {
"type": "string"
}
}
},
"parts": {
"type": "array",
"items": {
"type": "object"
}
},
"sounds": {
"type": "array",
"items": {
"type": "object",
"properties": {
"sound": {
"type": "string"
},
"tip": {
"type": "string"
},
"words": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
},
"words": {
"type": "array",
"items": {
"type": "object"
}
},
"next_steps": {
"type": "array",
"items": {
"type": "object"
}
},
"note": {
"type": "string",
"description": "It estimates pronunciation and fluency only; it isn't an official CEFR exam"
}
}
}SpeakingTest
{
"type": "object",
"properties": {
"id": {
"type": "string",
"examples": [
"es-a1"
]
},
"language": {
"type": "object",
"properties": {
"code": {
"type": "string"
},
"name": {
"type": "string"
},
"voice": {
"type": "string",
"examples": [
"es-ES"
]
}
}
},
"cefr": {
"enum": [
"A1",
"A2",
"B1",
"B2",
"C1",
"C2"
]
},
"title": {
"type": "string"
},
"prompts": {
"type": "integer"
},
"minutes": {
"type": "integer"
},
"cost": {
"type": "integer"
},
"parts": {
"type": "array",
"items": {
"type": "object"
}
}
}
}Status
{
"type": "object",
"properties": {
"status": {
"enum": [
"ok",
"degraded",
"down"
]
},
"checked_at": {
"type": "string",
"format": "date-time"
},
"checks": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"label": {
"type": "string"
},
"status": {
"enum": [
"ok",
"degraded",
"down",
"off"
]
},
"detail": {
"type": "string"
},
"latency_ms": {
"type": "integer"
}
}
}
}
}
}Student
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"nickname": {
"type": "string"
},
"kind": {
"enum": [
"school",
"account"
]
},
"joined_at": {
"type": "string",
"format": "date-time"
}
}
}Usage
{
"type": "object",
"properties": {
"mode": {
"enum": [
"live",
"sandbox"
]
},
"credits": {
"type": "object",
"properties": {
"balance": {
"type": "integer"
},
"spent_this_month": {
"type": "integer"
}
}
},
"requests": {
"type": "object",
"properties": {
"today": {
"type": "integer"
},
"this_month": {
"type": "integer"
}
}
},
"by_day": {
"type": "array",
"items": {
"type": "object",
"properties": {
"date": {
"type": "string",
"format": "date"
},
"requests": {
"type": "integer"
},
"credits": {
"type": "integer"
}
}
}
},
"by_endpoint": {
"type": "array",
"items": {
"type": "object",
"properties": {
"endpoint": {
"type": "string"
},
"requests": {
"type": "integer"
},
"credits": {
"type": "integer"
}
}
}
},
"rate_limit": {
"type": "object",
"properties": {
"per_minute": {
"type": "integer"
}
}
}
}
}Webhook
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"url": {
"type": "string"
},
"events": {
"type": "array",
"items": {
"type": "string"
}
},
"sandbox": {
"type": "boolean"
},
"created_at": {
"type": "string",
"format": "date-time"
},
"secret": {
"type": [
"string",
"null"
],
"description": "Only when the webhook is made: keep it to check signatures"
},
"last_delivery": {
"type": [
"object",
"null"
]
}
}
}