---
title: "Upsert a markdown library item"
method: PUT
path: "/api/markdowns/{id}"
tags: ["Markdowns"]
---

# Upsert a markdown library item

`PUT /api/markdowns/{id}`

**Spaces method and path for this operation:**

<div><span class="operation-verb put">put</span>&nbsp;<span class="operation-path">/s/{space_id}/api/markdowns/{id}</span></div>

Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information.

Replaces the full state of a markdown library item. Partial updates are not supported.
To make incremental changes, retrieve the item first, modify the fields you need, then send the complete object back.

If no item exists with the specified ID, a new one is created.

## Path parameters

- `id` string, required

## Headers

- `kbn-xsrf` string, required

## Request body

- object
  - `content` string, required — The Markdown text rendered by the panel. Supports GitHub-flavored Markdown, including headings, paragraphs, lists, links, images, tables, blockquotes, and code blocks. Use `\n` for line breaks within JSON strings.
  - `description` string — A short description of the markdown library item.
  - `settings` object — Display settings for the markdown panel.
    - `open_links_in_new_tab` boolean — Open links in a new browser tab.
  - `title` string, required — The markdown library item title.

## Response `200`

updated

- object
  - `data` object, required
    - `content` string, required — The Markdown text rendered by the panel. Supports GitHub-flavored Markdown, including headings, paragraphs, lists, links, images, tables, blockquotes, and code blocks. Use `\n` for line breaks within JSON strings.
    - `description` string — A short description of the markdown library item.
    - `settings` object — Display settings for the markdown panel.
      - `open_links_in_new_tab` boolean — Open links in a new browser tab.
    - `title` string, required — The markdown library item title.
  - `id` string, required — The unique ID of the markdown library item, as returned by the create or search endpoints.
  - `meta` KibanaHTTPAPIsKbnAsCodeMeta, required
    - `created_at` string — Timestamp when the object was created (ISO 8601).
    - `created_by` string — User profile ID of the user who created the object.
    - `managed` boolean — When `true`, the object is managed by Kibana and cannot be edited by users.
    - `owner` string — Identifier of the plugin or team that owns this object.
    - `updated_at` string — Timestamp when the object was last updated (ISO 8601).
    - `updated_by` string — User profile ID of the user who last updated the object.
    - `version` string — Internal version identifier for optimistic concurrency control.

## Other responses

- `201` — created
- `400` — invalid request
- `403` — forbidden

---

[API](https://skmtc.net/elastic/apis/kibana-apis.md) · [All operations](https://skmtc.net/elastic/apis/kibana-apis/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/elastic/kibana-apis/versions/531c9e2a7d23/schema)
