CCDV-F Claude API Mechanics Practice Question
In the Messages API 'messages' array, which TWO roles are currently supported for maintaining conversation history?
⚠ Common exam trap
Candidates frequently try to insert 'system' or 'developer' roles directly into the messages array, forgetting that the Messages API strictly requires alternating 'user' and 'assistant' roles for the conversation history.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
user
The Messages API enforces a strict structure for conversation history to ensure the model correctly understands the dialogue flow. Unlike some other APIs that allow custom roles, Claude specifically recognizes two primary roles within the messages array. Correctly utilizing these roles is fundamental to building a coherent chat history that the model can process.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
user
Why this is correct
The 'user' role represents instructions or queries provided by the human interacting with the model. It is a required role for the first message in the array (unless the assistant response is being pre-filled) and is used to provide the context that Claude must respond to.
- ✗
system
Why it's wrong here
While 'system' is a valid concept in Claude's architecture, it is not a role used inside the 'messages' array. Instead, system instructions are passed via a separate top-level 'system' parameter. Placing a 'system' role inside the messages array will result in a 400 validation error.
- ✓
assistant
Why this is correct
The 'assistant' role represents previous responses generated by Claude. Including these in the messages array allows the model to maintain context of what it has already said, which is essential for multi-turn conversations where the user might refer back to earlier parts of the dialogue.
- ✗
function
Why it's wrong here
The role 'function' is not supported in the Anthropic Messages API. Anthropic handles tool interactions using a different mechanism where tool results are returned within a 'user' role message containing a 'tool_result' block. Using 'function' as a role will cause a request validation failure.
- ✗
admin
Why it's wrong here
There is no 'admin' role in the Claude API ecosystem. All administrative or high-level instructions should be placed in the system prompt. Using unsupported roles like 'admin' will lead to an API error, as the schema only allows for a specific set of recognized participant roles.
About these practice questions
One of 257 original CCDV-F practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official Anthropic exam blueprint
This CCDV-F practice question is part of Courseiva's free Anthropic certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the CCDV-F exam.