---
title: "Update Prompt"
method: PUT
path: "/sdk/v1/prompts/{id}"
---

# Update Prompt

`PUT /sdk/v1/prompts/{id}`

Update the configuration of an existing prompt and deploys it.

## Path parameters

- `id` string, required

## Request body

- PromptBody
  - `name` string, required
  - `tools` object[], required
    - `toolId` string, required
  - `messages` PromptMessage[], required
    - `content` MessageContentBlockSchema[], required
      - union
        - TextContentBlock
          - `type` 'TEXT', required
          - `text` string, required
        - ImageBase64ContentBlock
          - `type` 'IMAGE_BASE64', required
          - `imageBase64` string, required
          - `mediaType` string, required
        - ToolCallContentBlock
          - `type` 'TOOL_CALL', required
          - `toolCall` ToolFunctionCall, required
            - `toolCallId` string, required — TOOL_CALL_1
            - `type` 'function', required — The type of the tool. Currently, only `function` is supported.
            - `function` object, required
              - …
        - ToolResultContentBlock
          - `type` 'TOOL_RESULT', required
          - `toolCallId` string, required
          - `result` string, required
    - `role` 'assistant' | 'system' | 'tool' | 'user', required
    - `promptMessageId` string, required
  - `parameters` object, required
    - `provider` 'ANTHROPIC' | 'OPENAI', required — The LLM model provider.
    - `name` string, required — The name of the model for the provider.
    - `responseFormat` 'JSON' | 'TEXT', required — Example: PromptResponseFormat.TEXT
    - `temperature` number, required — Example: 1
    - `topP` number, required — Example: 1
    - `topK` number, nullable, required — Example: 50
    - `frequencyPenalty` number, required — Example: 0
    - `presencePenalty` number, required — Example: 0
    - `maxTokens` number, nullable, required — Example: 100
    - `seed` number, nullable, required — Example: 97946543
    - `toolChoice` string, nullable, required
    - `stream` boolean, required
    - `parallelToolCalls` boolean, required

## Response `200`

Successful operation

- PromptConfiguration
  - `id` string, required — Example: "PROMPT_1"
  - `name` string, required — Example: "Check the weather"
  - `parameters` object, required
    - `provider` 'ANTHROPIC' | 'OPENAI', required — The LLM model provider.
    - `name` string, required — The name of the model for the provider.
    - `responseFormat` 'JSON' | 'TEXT', required — Example: PromptResponseFormat.TEXT
    - `temperature` number, required — Example: 1
    - `topP` number, required — Example: 1
    - `topK` number, nullable, required — Example: 50
    - `frequencyPenalty` number, required — Example: 0
    - `presencePenalty` number, required — Example: 0
    - `maxTokens` number, nullable, required — Example: 100
    - `seed` number, nullable, required — Example: 97946543
    - `toolChoice` string, nullable, required
    - `stream` boolean, required
    - `parallelToolCalls` boolean, required
  - `messages` ConversationMessage[], required — The configured messages WITHOUT variables replaced.
    - `content` MessageContentBlockSchema[], required
      - union
        - TextContentBlock
          - `type` 'TEXT', required
          - `text` string, required
        - ImageBase64ContentBlock
          - `type` 'IMAGE_BASE64', required
          - `imageBase64` string, required
          - `mediaType` string, required
        - ToolCallContentBlock
          - `type` 'TOOL_CALL', required
          - `toolCall` ToolFunctionCall, required
            - `toolCallId` string, required — TOOL_CALL_1
            - `type` 'function', required — The type of the tool. Currently, only `function` is supported.
            - `function` object, required
              - …
        - ToolResultContentBlock
          - `type` 'TOOL_RESULT', required
          - `toolCallId` string, required
          - `result` string, required
    - `role` 'assistant' | 'system' | 'tool' | 'user', required
  - `tools` object[], required
    - `id` string, required — The initial messages to be included with your call to the LLM API.
    - `name` string, required — The name of the tool to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.
    - `description` string, required — A description of what the tool does, used by the model to choose when and how to call the tool.
    - `parameters` ToolParameters, required — The parameters the functions accepts, described as a JSON Schema object. This schema is designed to match the TypeScript Record<string, unknown>, allowing for any properties with values of any type.

## Other responses

- `400` — Missing or invalid parameters
- `401` — Unauthorized
- `404` — Not found
- `500` — Internal Server Error

---

[API](https://skmtc.net/prompt-foundry/apis/prompt-foundry-api.md) · [All operations](https://skmtc.net/prompt-foundry/apis/prompt-foundry-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/prompt-foundry/prompt-foundry-api/versions/84eb1e848fd1/schema)
