> For the complete documentation index, see [llms.txt](https://guide.fariaedu.com/integrations-portal/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://guide.fariaedu.com/integrations-portal/managebac/public-rest-apis/v2p0/online-assessment.md).

# Online Assessment

## Update an Online Assessment

> Updates an OnlineAssessment record as specified by assess\_prep\_uid.\
> The \<code>Content-Type\</code> header must be set to \<code>application/json\</code>,\
> and the request body should contain the fields you want to update as a JSON payload.<br>

```json
{"openapi":"3.0.3","info":{"title":"API V2P0","version":"v2p0"},"tags":[],"servers":[{"url":"https://api.managebac.com","description":"CA ManageBac API server."},{"url":"https://api.managebac.cn","description":"CN ManageBac API server."},{"url":"https://api.us.managebac.com","description":"US1 ManageBac API server."},{"url":"https://api.managebac.us","description":"US2 ManageBac API server."},{"url":"https://api.managebactest.com","description":"UAT ManageBac API server."},{"url":"https://{Host}","variables":{"Host":{"default":"api.devel.managebac.com","enum":["api.devel.managebac.com","api-faria.devel.managebac.com","api.managebac.dev"]}}}],"security":[{"bearerAuth":[]},{"authTokenQuery":[]},{"authTokenHeader":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"OAuth 2.0 Bearer token obtained via client credentials grant. Pass the token in the Authorization header as `Bearer <token>`."},"authTokenQuery":{"type":"apiKey","name":"auth_token","in":"query","description":"Your V2 API authentication token may be passed in the parameters. To protect your key, use [environment variables](https://cloud.google.com/docs/authentication/api-keys#securing_an_api_key)."},"authTokenHeader":{"type":"apiKey","name":"auth-token","in":"header","description":"Your V2 API authentication token may be passed in the header. To protect your key, use [environment variables](https://cloud.google.com/docs/authentication/api-keys#securing_an_api_key)."}},"schemas":{"OnlineAssessment":{"type":"object","properties":{"id":{"type":"integer","description":"Unique ID in ManageBac"},"user_id":{"type":"integer","description":"Unique user ID in ManageBac"},"title":{"type":"string","description":"Online Assessment title"},"mode":{"type":"string","enum":["online","online_secure","offline"]},"points":{"type":"integer","description":"Max points for Diploma task with points assessment model or MYP task with local points assessment model"},"duration":{"type":"integer","description":"Online Assessment duration in minutes"},"assess_prep_uid":{"type":"string","description":"Unique identifier for an AssessPrep task"},"assess_prep_uuid":{"type":"string","description":"Unique AssessPrep task UUID"},"start_at":{"type":"string","description":"ISO8601 datetime for Online Assessment due date & time."},"created_at":{"type":"string","description":"Created date; yyyy-mm-dd."},"updated_at":{"type":"string","description":"Updated date; yyy-mm-dd"},"task_id":{"type":"integer","description":"Unique task ID in ManageBac"},"email":{"type":"string","description":"Author email"},"program_code":{"type":"string","description":"Program code"},"grade_code":{"type":"string","description":"Grade code"},"role":{"type":"string","description":"Author role in ManageBac"},"subject":{"type":"string","description":"Subject name"},"subject_group":{"type":"string","description":"Subject Group name"}}},"AccessDeniedError":{"type":"object","description":"Returned when the API token is missing, invalid, or has been disabled.","properties":{"error":{"type":"string","description":"Always returns \"Access Denied\" when authentication fails. Check that your API token is valid and enabled."}}},"NotFound":{"type":"object","description":"Returned when the requested resource cannot be found by the given ID.","properties":{"error":{"type":"string","description":"A human-readable message indicating which resource could not be found, including the model name and the ID that was looked up."}}},"UpdateOnlineAssessment":{"type":"object","required":["title","mode"],"properties":{"assess_prep_uid":{"type":"string","description":"Unique identifier for an AssessPrep task"},"title":{"type":"string","description":"New ManageBac task title"},"mode":{"type":"string","description":"Online Assessment mode","enum":["online","online_secure","offline"]},"questions_count":{"type":"integer","description":"Questions count in online assessment"},"points":{"type":"integer","description":"Max points for Diploma task with points assessment model or MYP task with local points assessment model"},"duration":{"type":"integer","description":"Online Assessment duration in minutes"},"start_at":{"type":"string","description":"ISO8601 datetime for Online Assessment due date & time."},"status":{"type":"string","enum":["draft","published","closed"]},"video_monitoring":{"type":"boolean","description":"Switch to enable/disable video monitoring"},"criteria_labels":{"type":"array","description":"Criteria labels","items":{"type":"object","properties":{"label":{"type":"string","description":"Criteria name without label"},"title":{"type":"string","description":"Criteria label"},"descriptors":{"type":"array","items":{"allOf":[{"type":"object","properties":{"level":{"type":"string","description":"Descriptor level"},"descriptor":{"type":"string","description":"Descriptor"}}}]}}}}}}}}},"paths":{"/v2p0/tasks/{task_id}/online_assessments/{assess_prep_uid}":{"patch":{"summary":"Update an Online Assessment","operationId":"updateOnlineAssessment","tags":["OnlineAssessment"],"description":"Updates an OnlineAssessment record as specified by assess_prep_uid.\nThe <code>Content-Type</code> header must be set to <code>application/json</code>,\nand the request body should contain the fields you want to update as a JSON payload.\n","parameters":[{"name":"task_id","in":"path","description":"Unique identifier for a task.","schema":{"type":"integer"},"required":true},{"name":"assess_prep_uid","in":"path","description":"Unique identifier for an AssessPrep task.","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"online_assessment":{"$ref":"#/components/schemas/OnlineAssessment"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessDeniedError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"title":{"type":"array","items":{"type":"string"}},"mode":{"type":"array","items":{"type":"string"}}}}}}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"online_assessment":{"$ref":"#/components/schemas/UpdateOnlineAssessment"}}}}}}}}}}
```
