Create a pad

Creates a pad owned by you, or by another user of your organization with user_email. Creating a pad counts towards your pad quota.

Fields you omit use your account defaults (privacy, code execution, language) and your organization's AI Assist setting.

A pad starts with one of:

  • A question from your question bank (question_id).
  • A single-file language: set language to the language key and optionally send the starter code in contents.
  • A project template (for example multifile_python or react): set language to the template slug. The pad opens on the template's files, or on your own files sent 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.

These cannot be combined: question_id excludes contents, file_contents and zip_file; a project template excludes contents; a single-file language excludes file_contents and zip_file.

A project template pad has a null language and contents in responses; its files are available through pad_environment_ids and GET /pad_environments/{id}.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params
pad
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