`POST /api/v1/assignments` — create an assignment.
POST
/api/v1/assignments
const url = 'https://example.com/api/v1/assignments';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"description":"example","modules":["example"],"name":"example","selector":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/v1/assignments \ --header 'Content-Type: application/json' \ --data '{ "description": "example", "modules": [ "example" ], "name": "example", "selector": "example" }'Request Body required
Section titled “Request Body required ” Media type application/json
Request body for POST /api/v1/assignments.
object
description
string | null
modules
required
Array<string>
name
required
string
selector
required
string
Example generated
{ "description": "example", "modules": [ "example" ], "name": "example", "selector": "example"}Responses
Section titled “ Responses ”Assignment created
Media type application/json
Example generated
exampleInvalid request body
Assignment already exists