---
title: "Update an Agent Observability prompt"
method: PATCH
path: "/api/v2/llm-obs/v1/prompts/{prompt_id}"
tags: ["Agent Observability"]
---

# Update an Agent Observability prompt

`PATCH /api/v2/llm-obs/v1/prompts/{prompt_id}`

## Request

- Base URL: `https://api.datadoghq.com`
- URL: `https://api.datadoghq.com/api/v2/llm-obs/v1/prompts/{prompt_id}`
- Auth: one of:
  - API key in header `DD-API-KEY` and API key in header `DD-APPLICATION-KEY`
  - OAuth 2
    - Authorization code: `/oauth2/v1/authorize`
    - Token URL: `/oauth2/v1/token`
- TypeScript: <https://skmtc.dev/datadog/apis/datadog-api-v2-collection/docs/api/v2/llm-obs/v1/prompts/:prompt_id/patch.ts> (a function with typed inputs; its response is checked against the schema)

Update the title, the description, or both, for an Agent Observability prompt.

## Path parameters

- `prompt_id` string, required

## Request body

- LLMObsUpdatePromptRequest: Request to update an Agent Observability prompt's metadata.
  - `data` LLMObsUpdatePromptData, required: Data object for updating an Agent Observability prompt.
    - `attributes` LLMObsUpdatePromptDataAttributes, required: Attributes for updating an Agent Observability prompt. At least one of `title` or `description` must be provided; both attributes are optional individually.
      - `description` string: Optional new description for the prompt.
      - `title` string: Optional new title for the prompt.
    - `type` 'prompt-templates', required: Resource type of an Agent Observability prompt.

## Response `200`

OK

- LLMObsPromptResponse: Response containing a single Agent Observability prompt.
  - `data` LLMObsPromptData, required: Data object for an Agent Observability prompt.
    - `attributes` LLMObsPromptDataAttributes, required: Attributes of an Agent Observability prompt registry entry. Prompt list and metadata-update responses omit complete template and configuration data.
      - `author` string: UUID of the user who authored the prompt.
      - `created_at` string, date-time: Timestamp when the prompt was created.
      - `created_from` string, required: Source that created the prompt, such as `ui-registry`, `sdk-registry`, or `sdk-instrumentation`.
      - `datasets` LLMObsPromptDataset[]: Datasets observed in runs associated with this prompt.
        - `id` string, required: Unique identifier of the dataset.
        - `name` string: Name of the dataset.
      - `description` string: Description of the prompt.
      - `extracted_from` string: Source prompt from which this prompt was extracted, when applicable.
      - `in_registry` boolean, required: Whether the prompt is a registry entry (as opposed to a code-discovered prompt).
      - `last_seen_at` string, date-time: Timestamp of the most recent observed run of this prompt.
      - `last_version_created_at` string, date-time: Timestamp when the most recent version of the prompt was created.
      - `ml_app` string: The ML application this prompt is associated with.
      - `ml_apps` string[]: ML applications observed running this prompt.
      - `num_versions` integer, required: Number of versions of the prompt.
      - `prompt_id` string, required: Customer-provided identifier of the prompt.
      - `source` 'registry' | 'code', required: Whether the prompt was created from the registry or discovered from observed LLM calls.
      - `tags` string[]: Tags observed on runs of this prompt.
      - `title` string: Title of the prompt.
    - `id` string, required: Unique identifier of the prompt.
    - `type` 'prompt-templates', required: Resource type of an Agent Observability prompt.

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found
- `429`: Too many requests

---

[API](https://skmtc.dev/datadog/apis/datadog-api-v2-collection.md) - [All operations](https://skmtc.dev/datadog/apis/datadog-api-v2-collection/llms.txt) - [OpenAPI document](https://skmtc.dev/datadog/apis/datadog-api-v2-collection/revisions/3f70db624329?raw)
