---
title: "Get versioned prompt"
method: GET
path: "/agents/{agentId}/versioned_prompts/{id}"
---

# Get versioned prompt

`GET /agents/{agentId}/versioned_prompts/{id}`

## Request

- Base URL: `https://api.vogent.ai/api`
- URL: `https://api.vogent.ai/api/agents/{agentId}/versioned_prompts/{id}`
- Auth: HTTP bearer

Gets a specific versioned prompt for a given agent.

## Response `200`

Successful operation

- VersionedPrompt
  - `id` string, required: Unique identifier for the versioned prompt
  - `name` string, required: Human-readable name for the versioned prompt
  - `agentType` 'STANDARD' | 'CUSTOM_FLOW', required
  - `prompt` string, nullable, required: The actual prompt content that will be used by the agent. Can be null for CUSTOM_FLOW agent types
  - `flowDefinition` FlowDefinition
    - `nodes` ApiFlowNode[], required
      - `id` string, required
      - `name` string, required
      - `type` string, required: The node type. View the available types at https://docs.vogent.ai/flow.
      - `transitionRules` FlowTransitionRule[], required
        - `conditionType` 'always' | 'equal' | 'in' | 'greater' | 'less' | 'language', required: The condition used to evaluate the transition rule. If language, the value will be used as a natural language condition to describe when to execute a transition.
        - `arrayConditionType` 'any' | 'all', nullable: The type of array condition to apply. 'any' means at least one element must match, 'all' means all elements must match.
        - `field` string, nullable
        - `value` string, nullable
        - `values` string[], nullable
        - `transitionNodeId` string, required
      - `outputSchema` string, nullable: The JSON schema describing the output of this node. This is generated automatically from the node type and node data.
      - `nodeData` object, required: The node-specific configuration. View the schemas by type at https://docs.vogent.ai/flow.
    - `globalContext` string, nullable, required
    - `aiOpen` boolean, required: Deprecated, use openingLineType instead.
    - `openingLineType` 'INBOUND_ONLY' | 'INBOUND_OUTBOUND' | 'NONE', required
  - `aiModelId` string: The AI model ID to use for the agent.
  - `modelOptionValues` ModelOptionValue[]
    - `optionId` string, required: The ID of option.
    - `value` string, required

## Other responses

- `400`: Invalid input
- `422`: Validation exception

---

[API](https://skmtc.dev/vogent/apis/vogent-openapi-3-0.md) - [All operations](https://skmtc.dev/vogent/apis/vogent-openapi-3-0/llms.txt) - [OpenAPI document](https://skmtc.dev/vogent/apis/vogent-openapi-3-0/revisions/a5966cc364ef?raw)
