gravitygod
07/18/2025, 9:28 AMuserMessage, ToolCallMessage etc,
Is there a definitive list of what values might be included within the role field for each one?
https://docs.vapi.ai/api-reference/calls/get#response.body.messages.UserMessagegravitygod
07/18/2025, 9:31 AMtool_calls show up as a role, as well as bot and tool_call_resultChiranjeet Mishra
07/19/2025, 6:12 PMChiranjeet Mishra
07/20/2025, 11:22 PMrole property has default values for the message types as follows:
- **ToolMessage**: "tool"
- **AssistantMessage**: "assistant"
- **DeveloperMessage**: "developer"
These default values simplify message construction by allowing you to omit the role field. If you need more details about roles per message type, check the specific schema definitions the [Client Message documentation](https://docs.vapi.ai/api-reference/webhooks/client-message).gravitygod
07/22/2025, 6:20 AMrole in artifact.messages:
bot
tool_call_result
tool_calls
assistant
user
system
I'm trying to build my own ENUM, but can't see where these roles are listed?Chiranjeet Mishra
07/26/2025, 1:48 PMgravitygod
07/28/2025, 3:04 AMChiranjeet Mishra
07/31/2025, 7:33 AMconst ROLE = {
SYSTEM: 'system',
USER: 'user',
ASSISTANT: 'assistant',
TOOL: 'tool',
DEVELOPER: 'developer',
} as const;
If you have additional questions about the roles, feel free to put them heregravitygod
07/31/2025, 2:38 PMChiranjeet Mishra
08/01/2025, 8:17 AMgravitygod
08/04/2025, 5:30 AM