Everwhy Open Everwhy

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.

On this page

General

GET / No key needed

About the API

Its name, version and where the docs are.

AnswerWhen
200OK

GET /openapi.json No key needed

This document

The OpenAPI 3.1 description of the API.

AnswerWhen
200OK

GET /status No key needed

Status

Health checks (the same as the status page).

AnswerWhen
200OK

GET /me

Your key

Which school and key a request acts as, the credits and the rate limit.

AnswerWhen
200OK
401No 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.

AnswerWhen
200OK
401No key, or a key that isn't valid (auth_required, invalid_key)
429Too many requests (rate_limited, with retry_after)

Classes

GET /classes

List classes

The school's classes (a sample class for sandbox keys).

AnswerWhen
200OK
401No key, or a key that isn't valid (auth_required, invalid_key)
429Too many requests (rate_limited, with retry_after)

GET /classes/{class_id}

A class

Its roster (nicknames only) and its assignments.

AnswerWhen
200OK
401No key, or a key that isn't valid (auth_required, invalid_key)
404Not found (not_found)
429Too many requests (rate_limited, with retry_after)

GET /classes/{class_id}/assignments

A class's assignments

Each with how many students have done it.

AnswerWhen
200OK
401No key, or a key that isn't valid (auth_required, invalid_key)
404Not found (not_found)
429Too 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.

AnswerWhen
200OK
401No key, or a key that isn't valid (auth_required, invalid_key)
404Not found (not_found)
429Too 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

AnswerWhen
200OK
401No key, or a key that isn't valid (auth_required, invalid_key)
429Too 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

AnswerWhen
200OK
401No key, or a key that isn't valid (auth_required, invalid_key)
429Too 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.

FieldSent asRequiredAbout
audioform-dataYesm4a, webm, ogg or wav, up to 2 MB (30 seconds for pronunciation, 20 per speaking-test prompt). Scored and deleted at once.
textform-dataYesThe words expected, up to 300 characters
languageform-dataYesA voice, such as es-ES
studentform-dataNoYour 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.
AnswerWhen
201Scored
400Bad request (invalid, audio_invalid, unknown_item)
401No key, or a key that isn't valid (auth_required, invalid_key)
402Out of credits (no_credits, with balance and needed)
429Too many requests (rate_limited, with retry_after)
503No 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.

FieldSent asRequiredAbout
testjsonYes
studentjsonNoYour 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.
AnswerWhen
201Started
400Bad request (invalid, audio_invalid, unknown_item)
401No key, or a key that isn't valid (auth_required, invalid_key)
402Out of credits (no_credits, with balance and needed)
404Not found (not_found)
429Too many requests (rate_limited, with retry_after)
503No scorer for live keys right now (speech_unavailable)

GET /assessments/{assessment_id}

An assessment

Its status, scores and (once finished) its result.

AnswerWhen
200OK
401No key, or a key that isn't valid (auth_required, invalid_key)
404Not found (not_found)
429Too many requests (rate_limited, with retry_after)

DELETE /assessments/{assessment_id}

Delete an assessment

It's gone at once, scores and all.

AnswerWhen
204Deleted
401No key, or a key that isn't valid (auth_required, invalid_key)
404Not found (not_found)
429Too 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).

FieldSent asRequiredAbout
audioform-dataYesm4a, webm, ogg or wav, up to 2 MB (30 seconds for pronunciation, 20 per speaking-test prompt). Scored and deleted at once.
AnswerWhen
200OK
400Bad request (invalid, audio_invalid, unknown_item)
401No key, or a key that isn't valid (auth_required, invalid_key)
404Not found (not_found)
409Conflict (attempt_finished, time_up, nothing_scored, no_tries_left)
429Too many requests (rate_limited, with retry_after)
503No 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.

AnswerWhen
200OK
401No key, or a key that isn't valid (auth_required, invalid_key)
404Not found (not_found)
409Conflict (attempt_finished, time_up, nothing_scored, no_tries_left)
429Too many requests (rate_limited, with retry_after)

Webhooks

GET /webhooks

List webhooks

This mode's webhooks.

AnswerWhen
200OK
401No key, or a key that isn't valid (auth_required, invalid_key)
429Too 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.

FieldSent asRequiredAbout
urljsonYes
eventsjsonNo
AnswerWhen
201Added
400Bad request (invalid, audio_invalid, unknown_item)
401No key, or a key that isn't valid (auth_required, invalid_key)
429Too many requests (rate_limited, with retry_after)

DELETE /webhooks/{webhook_id}

Remove a webhook

No more deliveries go to it.

AnswerWhen
204Removed
401No key, or a key that isn't valid (auth_required, invalid_key)
404Not found (not_found)
429Too 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).

AnswerWhen
200OK
401No key, or a key that isn't valid (auth_required, invalid_key)
404Not found (not_found)
429Too 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"
      ]
    }
  }
}