> For the complete documentation index, see [llms.txt](https://synap.ac/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://synap.ac/docs/api/reference/exams/create-exammoderation.md).

# Create ExamModeration

Opens moderation on the exam: the state in which an administrator corrects results after the fact. While open, no new attempt on the exam can start, no draft version can be created or published, and the correction routes (marking-entry and max-points overrides, exam-version re-marks and re-grades) are allowed; while closed they are refused. Opening requires the exam to be ready: a version published, no attempt in progress and no marking session in a moderation-blocking status. Otherwise the call is refused with every blocker itemised as an invalid field (`notPublished`, `inProgressAttempts`, `openMarkingSessions`), each with what is involved in `meta`. An open draft version beside a published one does not refuse opening; the readiness report lists it as a warning. Readiness is a time-of-check answer: an attempt starting in the instant between the check and the write is not prevented. Opening an exam already open changes nothing and answers 200. Requires the override-marking grant on the exam. Not available (501) unless post-submission attempt management is enabled for the portal.

```json
{"openapi":"3.0.1","info":{"title":"Synap API","version":"3.0.0"},"tags":[{"name":"Exams","description":"Endpoints related to Exam creation and management."}],"servers":[{"url":"https://api.synap.ac/v3","description":"Production"},{"url":"https://api-stage.synap.ac/v3","description":"Staging"}],"security":[{"SessionAuth":[]},{"PATAuth":[]},{"AutomationAuth":[]},{"LegacySessionAuth":[]}],"components":{"securitySchemes":{"SessionAuth":{"type":"http","scheme":"bearer","description":"Authorize the request using a Session Token.","bearerFormat":"r:<token>"},"PATAuth":{"type":"http","scheme":"bearer","description":"Authorise the request using a personal access token.","bearerFormat":"p:"},"AutomationAuth":{"type":"http","scheme":"bearer","description":"Authorise the request with a short-lived token signed by the automations engine on behalf of a workflow owner.","bearerFormat":"a:<token>"},"LegacySessionAuth":{"type":"apiKey","description":"[Legacy] Authorize the request using a Session Token.","in":"header","name":"X-Syn-Session-Token"}},"schemas":{"ObjectId":{"type":"string","description":"The primary key for each resource."},"ExamModeration":{"type":"object","required":["id","type"],"properties":{"id":{"$ref":"#/components/schemas/ObjectId"},"type":{"type":"string","description":"Identifies the Resource.","enum":["ExamModeration"]},"attributes":{"type":"object","properties":{"status":{"type":"string","enum":["open","closed"],"description":"The only writable attribute, and the only value an update takes is `closed`. An exam never opened reads as closed."},"openedAt":{"type":"string","format":"date-time","readOnly":true,"nullable":true,"description":"When the current or last open began; null for an exam never opened."},"openedBy":{"type":"string","readOnly":true,"nullable":true,"description":"The user who opened it; null when opened by the system."},"closedAt":{"type":"string","format":"date-time","readOnly":true,"nullable":true,"description":"When the last open ended; null while open or never opened."},"closedBy":{"type":"string","readOnly":true,"nullable":true,"description":"The user who closed it; null when closed by the system."}}},"relationships":{"type":"object","properties":{"exam":{"type":"object","description":"The exam; the resource id is the exam id.","readOnly":false,"properties":{"data":{"type":"object","required":["id","type"],"nullable":true,"properties":{"id":{"$ref":"#/components/schemas/ObjectId"},"type":{"type":"string","description":"Identifies the Resource.","enum":["Exam-V-2"]}}}}}}}}},"BadRequestApiError":{"type":"object","description":"The request was invalid.","properties":{"id":{"type":"string","description":"Unique ID of this error occurrence."},"status":{"type":"string","description":"HTTP status code."},"code":{"type":"string","description":"Synap internal error code."},"title":{"type":"string"},"detail":{"type":"string"},"source":{"type":"object","properties":{"pointer":{"type":"string"},"parameter":{"type":"string"}}}}},"UnauthorizedApiError":{"type":"object","description":"Unauthorized request.","properties":{"id":{"type":"string","description":"Unique ID of this error occurrence."},"status":{"type":"string","description":"HTTP status code."},"code":{"type":"string","description":"Synap internal error code."},"title":{"type":"string"},"detail":{"type":"string"},"source":{"type":"object","properties":{"pointer":{"type":"string"},"parameter":{"type":"string"}}}}},"ForbiddenApiError":{"type":"object","description":"Forbidden request.","properties":{"id":{"type":"string","description":"Unique ID of this error occurrence."},"status":{"type":"string","description":"HTTP status code."},"code":{"type":"string","description":"Synap internal error code."},"title":{"type":"string"},"detail":{"type":"string"},"source":{"type":"object","properties":{"pointer":{"type":"string"},"parameter":{"type":"string"}}}}},"NotFoundApiError":{"type":"object","description":"The request resource could not be found.","properties":{"id":{"type":"string","description":"Unique ID of this error occurrence."},"status":{"type":"string","description":"HTTP status code."},"code":{"type":"string","description":"Synap internal error code."},"title":{"type":"string"},"detail":{"type":"string"},"source":{"type":"object","properties":{"pointer":{"type":"string"},"parameter":{"type":"string"}}}}},"ApiError":{"type":"object","description":"This is an error response structure. The id, status, code, title and detail will vary based on the error situation.","properties":{"id":{"type":"string","description":"Unique ID of this error occurrence."},"status":{"type":"string","description":"HTTP status code."},"code":{"type":"string","description":"Synap internal error code."},"title":{"type":"string"},"detail":{"type":"string"},"source":{"type":"object","properties":{"pointer":{"type":"string"},"parameter":{"type":"string"}}}}}}},"paths":{"/exam-moderations":{"post":{"summary":"Create ExamModeration","description":"Opens moderation on the exam: the state in which an administrator corrects results after the fact. While open, no new attempt on the exam can start, no draft version can be created or published, and the correction routes (marking-entry and max-points overrides, exam-version re-marks and re-grades) are allowed; while closed they are refused. Opening requires the exam to be ready: a version published, no attempt in progress and no marking session in a moderation-blocking status. Otherwise the call is refused with every blocker itemised as an invalid field (`notPublished`, `inProgressAttempts`, `openMarkingSessions`), each with what is involved in `meta`. An open draft version beside a published one does not refuse opening; the readiness report lists it as a warning. Readiness is a time-of-check answer: an attempt starting in the instant between the check and the write is not prevented. Opening an exam already open changes nothing and answers 200. Requires the override-marking grant on the exam. Not available (501) unless post-submission attempt management is enabled for the portal.","tags":["Exams"],"parameters":[],"requestBody":{"required":true,"content":{"application/vnd.api+json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"object","required":["type","relationships"],"properties":{"type":{"type":"string","description":"Identifies the Resource.","enum":["ExamModeration"]},"attributes":{"type":"object","properties":{}},"relationships":{"type":"object","required":["exam"],"properties":{"exam":{"type":"object","description":"The exam; the resource id is the exam id.","readOnly":false,"properties":{"data":{"type":"object","required":["id","type"],"nullable":false,"properties":{"id":{"$ref":"#/components/schemas/ObjectId"},"type":{"type":"string","description":"Identifies the Resource.","enum":["Exam-V-2"]}}}},"required":["data"]}}}}}}}}}},"responses":{"200":{"description":"OK: moderation was already open, nothing changed","content":{"application/vnd.api+json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/ExamModeration"}}}}}},"201":{"description":"Created","content":{"application/vnd.api+json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/ExamModeration"}}}}}},"400":{"description":"Bad Request","content":{"application/vnd.api+json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/BadRequestApiError"}}}}}}},"401":{"description":"Unauthorized","content":{"application/vnd.api+json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/UnauthorizedApiError"}}}}}}},"403":{"description":"Forbidden","content":{"application/vnd.api+json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/ForbiddenApiError"}}}}}}},"404":{"description":"Not Found","content":{"application/vnd.api+json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/NotFoundApiError"}}}}}}},"409":{"description":"Conflict","content":{"application/vnd.api+json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/ApiError"}}}}}}},"501":{"description":"Not enabled for this portal","content":{"application/vnd.api+json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/ApiError"}}}}}}}},"operationId":"examModerations.createExamModeration"}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://synap.ac/docs/api/reference/exams/create-exammoderation.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
