Skip to content
API documentation
View as MarkdownOpen in Claude

Applications

Withdraw one of your students from an exam

DELETE
/v1/{organizationId}/application/{applicationId}

Deletes an application of one of your students. data is the application as it was, with exam, payment and user as ids.

An application whose payment is settled (status paid, with an amount above 0) cannot be deleted: deleting refunds nothing, and this API never moves money. A free exam’s payment (paid, amount 0) and a pending or canceled one do not block it.

The payment is the only state checked. Whether the student has started the exam, or its sitting has passed, is not: read participated and examSubmitted first if that matters to you.

Your students are the ones your account registered: an application of anyone else’s student answers 404, as an unknown id does. Deleting again answers 404 too, so a retried delete that gets 404 has already succeeded.

Parameters

Path parameters

NameTypeDescription
organizationIdrequiredstringpattern ^[0-9a-f]{24}$

The organization’s _id: 24 hexadecimal digits, as listOrganizations (GET /v1/organization) lists it.

Example 64b7f0c2a1d3e4f5a6b7c8d9

applicationIdrequiredstring

The application’s _id, from createApplication or one of the application lists.

Responses

200 OK

Success: message is "Application deleted successfully.".

Body

  • successbooleanrequired

    Always true on a success.

    one oftrue

  • messagestringrequired

    exampleApplication deleted successfully.

  • dataobject · ApplicationRecordResponserequired

    An application as stored, with exam, user and payment as ids. Read the application to have them resolved.

    16 fields of data
    • _idstringrequired

      The application’s id: what applicationId takes.

      example6650a1b2c3d4e5f6a7b8c9e5

    • examstringrequired

      The id of the exam applied for.

      example6650a1b2c3d4e5f6a7b8c9e1

    • userstringrequired

      The organization’s own id for the student, not the id you registered them with. The application reads resolve it into a record carrying both.

      example6650a1b2c3d4e5f6a7b8c9e9

    • paymentstring

      The id of the application’s payment.

      example6650a1b2c3d4e5f6a7b8c9e6

    • partnersarray of ApplicationPartnerResponserequired

      On a team exam, the other members of the team. Empty for an exam sat alone.

      2 fields of each item
      • userstring

        The team member’s id in this organization. Not one of your students’ ids, and not resolved.

        example6650a1b2c3d4e5f6a7b8c9d6

      • acceptedboolean

        Whether they have accepted the invitation to the team.

        exampletrue

    • participatedbooleanrequired

      Whether the student has started the exam. A started application cannot be moved to another exam.

      examplefalse

    • examStartstring

      When the student started the exam; absent until then.

      formatdate-timeexample2026-11-14T10:04:12.000Z

    • examSubmittedboolean

      Whether the student has handed the exam in. A handed-in application cannot be moved to another exam.

      examplefalse

    • submitDatestring

      When the student handed the exam in; absent until then.

      formatdate-timeexample2026-11-14T11:12:40.000Z

    • simulationStartedbooleanrequired

      Whether the student has started the practice run.

      examplefalse

    • simulationStartstring

      When the student started the practice run; absent until then.

      formatdate-timeexample2026-11-07T10:00:00.000Z

    • simulationSubmittedbooleanrequired

      Whether the student has handed the practice run in.

      examplefalse

    • removeAfterstring

      Only on an application to an exam on a make-up sitting: when it will be removed, 6 hours after it was made.

      formatdate-timeexample2026-09-02T14:05:00.000Z

    • uuidstringrequired

      A short reference code for the application.

      examplea3f-09c-7e1

    • createdAtstringrequired

      When the application was made.

      formatdate-timeexample2026-09-01T09:30:00.000Z

    • updatedAtstringrequired

      When the application last changed.

      formatdate-timeexample2026-09-02T14:05:00.000Z

Headers

X-RateLimit-Limit integer

Requests your account may make to this operation per window (100).

X-RateLimit-Remaining integer

Requests left in the current window.

X-RateLimit-Reset integer

Seconds until the current window ends.

Example

{
  "success": true,
  "message": "Application deleted successfully.",
  "data": {
    "_id": "6650a1b2c3d4e5f6a7b8c9e5",
    "exam": "6650a1b2c3d4e5f6a7b8c9e1",
    "user": "6650a1b2c3d4e5f6a7b8c9e9",
    "payment": "6650a1b2c3d4e5f6a7b8c9e6",
    "partners": [
      {
        "user": "6650a1b2c3d4e5f6a7b8c9d6",
        "accepted": true
      }
    ],
    "participated": false,
    "examStart": "2026-11-14T10:04:12.000Z",
    "examSubmitted": false,
    "submitDate": "2026-11-14T11:12:40.000Z",
    "simulationStarted": false,
    "simulationStart": "2026-11-07T10:00:00.000Z",
    "simulationSubmitted": false,
    "removeAfter": "2026-09-02T14:05:00.000Z",
    "uuid": "a3f-09c-7e1",
    "createdAt": "2026-09-01T09:30:00.000Z",
    "updatedAt": "2026-09-02T14:05:00.000Z"
  }
}

Example request

# $TOKEN: a short-lived token you minted with your API key and secret
curl -sS -X DELETE 'https://api.main-team.org/v1/<organizationId>/application/<applicationId>' \
  -H "Authorization: Bearer $TOKEN"

Search the API documentation

Guides, endpoints by name, path or permission, and error codes such as not_found.