Create a question

Creates a question in your question bank.

  • For a single-file language, send the starter code in contents.
  • For a project template (for example multifile_python or react), set language to the template slug and send the files either:
    • in file_contents: the files replace the template files with the same path or are added, and the other template files are kept. "deleted": true removes a template file.
    • as a zip archive in zip_file (multipart request): the archive replaces all the template files, except the template's .cpad configuration file, which is kept unless the archive has one. A single enclosing folder is removed from the paths.

For project template questions, the response's language is the template slug, and its file_contents is an array of the question's files, with the template files it removed marked "deleted": true.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params
question
object
required
Headers
string
enum
Defaults to application/json

Generated from available request content types

Allowed:
Responses

Language
Credentials
Bearer
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json