---
title: "Get Prompt"
method: GET
path: "/prompts/{id}"
tags: ["Prompts"]
---

# Get Prompt

`GET /prompts/{id}`

Retrieve a prompt and optionally personalize it with dynamic variables. Perfect for fetching the prompt you want to use right before sending it to your AI.

**Dynamic Variables:** Use handlebars-style placeholders like `{{userName}}` in your prompt, then pass query parameters to fill them in.

**Example:** Calling `/prompts/abc-123?userName=Alice&productName=Premium` will replace `{{userName}}` with "Alice" and `{{productName}}` with "Premium" in the returned prompt.

## Path parameters

- `id` string, required — The prompt identifier. Can be: internal prompt ID (UUID), or externalPromptId (your custom ID).

## Response `200`

Prompt retrieved successfully

- GetPromptResponse
  - `composedPrompt` string, required — The prompt with variables interpolated from query parameters.
  - `prompt` Prompt, required — The full prompt object with components.
    - `id` string, uuid, required — The Greenflash prompt ID.
    - `externalPromptId` string — Your external identifier for the prompt.
    - `name` string, nullable, required — Prompt name.
    - `description` string, nullable, required — Prompt description.
    - `source` string, nullable, required — Prompt source.
    - `productId` string, uuid, nullable, required — The product ID this prompt is associated with.
    - `archivedAt` string, nullable, required — ISO 8601 timestamp when archived, or null if active.
    - `createdAt` string, required — ISO 8601 timestamp when created.
    - `updatedAt` string, required — ISO 8601 timestamp when last updated.
    - `components` PromptComponent[], required — Array of prompt components that make up this prompt.
      - `id` string, uuid, required — The Greenflash component ID.
      - `externalComponentId` string — Your external identifier for the component.
      - `type` 'system' | 'user' | 'tool' | 'guardrail' | 'rag' | 'agent' | 'other' — Component type: system, user, tool, guardrail, rag, agent, or a custom type (other).
      - `source` string, required — Component source (e.g., customer, participant, greenflash).
      - `name` string, nullable, required — Component name.
      - `content` string, required — The content of the component.
      - `isDynamic` boolean, nullable, required — Whether the component content changes dynamically.
      - `createdAt` string, required — ISO 8601 timestamp when created.
      - `updatedAt` string, required — ISO 8601 timestamp when last updated.

## Other responses

- `404` — Prompt not found
- `500` — Server error

## Changes

- **2026-02-18** `d5edd18f9685` — 1 breaking, 7 warning, 1 info
  - the response property `prompt/components/items/type` became optional for the status `200`
  - added the new `agent` enum value to the `prompt/components/items/type` response property for the response status `200`
  - added the new `guardrail` enum value to the `prompt/components/items/type` response property for the response status `200`
  - added the new `other` enum value to the `prompt/components/items/type` response property for the response status `200`
  - …5 more
- **2025-11-24** `c1998d918478` — 1 info
  - api tag `Prompts` added
- **2025-10-29** `f1cd8a0e3bee` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/greenflash-ai/apis/greenflash-api-reference/changes/prompts/:id/get.md)

---

[API](https://skmtc.dev/greenflash-ai/apis/greenflash-api-reference.md) · [All operations](https://skmtc.dev/greenflash-ai/apis/greenflash-api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/greenflash-ai/greenflash-api-reference/revisions/c566e560677d/schema)
