Add an external question to a pad

Adds a question that lives outside CoderPad (in your ATS or question bank) to a pad as a new environment, with the starter code you send. The pad switches to that environment. Each call creates a new environment, even for the same question_id.

You can add questions to your own pads. Organization owners can add questions to any pad of their organization.

Starter code is contents for a single-file language, or file_contents for a project template (language set to a template slug such as multifile_python). file_contents is merged over the template's files: a file replaces the template file with the same path, and "delete": true drops a template file. Inline file_contents is bounded: at most 400 files and 4 MiB of text per call, and every file needs contents, a url, or "delete": true.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
string
required

The pad ID, as shown in the pad URL.

Body Params
string
required

Your identifier for the question. It does not have to exist in CoderPad; it is kept on the pad's added_question event (GET /pads/{id}/events).

string

The title shown to the participants.

string
required

A language key, or a project template slug for a multi-file environment; see Languages in the introduction.

string

For a project template, the template version to use. Defaults to the latest.

string

Starter code, for single-file languages.

file_contents
array of objects

Starter files, for project templates. Merged over the template's own files. At most 400 entries and 4 MiB of contents in total; above either bound the request is refused with 413 and nothing is added.

file_contents
candidate_instructions
array of objects

Instructions shown to the candidate, as a list of steps. Each step has Markdown instructions and optionally a name, default_visible (false hides the step until the interviewer reveals it) and the files it concerns.

candidate_instructions
string

A reference solution, visible to the interviewer only.

integer

The ID of a verified custom database of your organization to attach, for languages and project templates that support databases.

boolean

Whether AI Assist is available on the new environment. The environment's AI chats can also be configured with ai_chat_model (or ai_shared_chat_model / ai_private_chat_model), ai_chat_assist_mode, ai_chat_system_prompt (or ai_shared_chat_system_prompt / ai_private_chat_system_prompt), ai_interviewer_commands and interview_coach, in the same shapes as a question's AI settings.

Responses
204

The question was added to the pad.

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