---
title: "Resolve a prompt template for a given event type and scope chain"
method: GET
path: "/api/prompt-templates/resolved"
tags: ["PromptTemplates"]
---

# Resolve a prompt template for a given event type and scope chain

`GET /api/prompt-templates/resolved`

## Query parameters

- `eventType` string, required
- `agentId` string
- `repoId` string

## Response `200`

Resolved template info

- object
  - `resolution` object, required
    - `text` string, required
    - `templateId` string
    - `scope` string
    - `skipped` boolean, required
    - `unresolved` string[], required
  - `dbResult` union, required
    - object
      - `template` PromptTemplateResponse, required
        - `id` string, required
        - `eventType` string, required
        - `scope` 'global' | 'agent' | 'repo', required
        - `scopeId` string, nullable, required
        - `state` 'enabled' | 'default_prompt_fallback' | 'skip_event', required
        - `body` string, required
        - `isDefault` boolean, required
        - `version` number, required
        - `createdBy` string, nullable, required
        - `createdAt` string, required
        - `updatedAt` string, required
        - `defaultDrifted` boolean, required
    - object
      - `skip` true, required
  - `definition` object, nullable, required
    - `eventType` string, required
    - `header` string, required
    - `defaultBody` string, required
    - `variables` object[], required
      - `name` string, required
      - `description` string, required
      - `example` string
    - `category` 'event' | 'system' | 'common' | 'task_lifecycle' | 'session', required

## Other responses

- `400` — Missing eventType

## Changes

- **2026-08-20** `d06bca6c3ff5` — 12 breaking, 1 info
  - the `dbResult/anyOf[subschema #1]/template` response's property type changed from `object` to no type for status `200`
  - removed the required property `dbResult/anyOf[subschema #1]/template/body` from the response with the `200` status
  - removed the required property `dbResult/anyOf[subschema #1]/template/createdAt` from the response with the `200` status
  - removed the required property `dbResult/anyOf[subschema #1]/template/createdBy` from the response with the `200` status
  - …9 more
- **2026-08-07** `06cac6a7c5bc` — 2 info
  - added the media type `application/json` for the response with the status `200`
  - added the media type `application/json` for the response with the status `400`

[Change history](https://skmtc.dev/desplega-ai/apis/agent-swarm-api/changes/api/prompt-templates/resolved/get.md)

---

[API](https://skmtc.dev/desplega-ai/apis/agent-swarm-api.md) · [All operations](https://skmtc.dev/desplega-ai/apis/agent-swarm-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/desplega-ai/agent-swarm-api/revisions/8cde933218b5/schema)
