Create a links library item Experimental; added in 9.6.0

POST /api/links

Spaces method and path for this operation:

post /s/{space_id}/api/links

Refer to Spaces for more information.

Creates a new links library item and returns its ID, full state, and metadata.

Headers

  • kbn-xsrf string Required

    A required header to protect against CSRF attacks

application/json

Body

  • description string
  • layout string

    Whether to display the links in a horizontal or vertical layout.

    Values are horizontal or vertical.

  • links array[object] Required

    The list of links to display.

    Not more than 100 elements.

    One of:
  • tags array[string]

    Tag IDs associated with this library item.

    Not more than 1000 elements. Maximum length of each is 250. Default value is [] (empty).

  • title string Required

Responses

  • 201 application/json

    created

    Hide response attributes Show response attributes object
    • data object Required

      Additional properties are NOT allowed.

      Hide data attributes Show data attributes object
      • description string
      • layout string

        Whether to display the links in a horizontal or vertical layout.

        Values are horizontal or vertical.

      • links array[object] Required

        The list of links to display.

        Not more than 100 elements.

        One of:
      • tags array[string]

        Tag IDs associated with this library item.

        Not more than 1000 elements. Maximum length of each is 250. Default value is [] (empty).

      • title string Required
    • id string Required

      The unique ID of the links library item, as returned by the create or search endpoints.

    • meta object Required

      Additional properties are NOT allowed.

      Hide meta attributes Show meta attributes object
      • 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.

  • 400

    invalid request

  • 403

    forbidden

POST /api/links
curl \
  -X POST "${KIBANA_URL}/api/links" \
  -H "Authorization: ApiKey ${API_KEY}" \
  -H "kbn-xsrf: true" \
  -H "Content-Type: application/json" \
  -d '{
  "title": "Important Resources",
  "description": "A collection of important links",
  "links": [
    {
      "label": "Overview",
      "type": "dashboardLink",
      "destination": "dashboard-abc-123"
    },
    {
      "label": "Elastic Documentation",
      "type": "externalLink",
      "destination": "https://www.elastic.co/docs"
    }
  ],
  "layout": "horizontal"
}'
POST kbn:/api/links
{
  "summary": "Create a links library item",
  "value": {
    "title": "Important Resources",
    "description": "A collection of important links",
    "links": [
      {
        "label": "Overview",
        "type": "dashboardLink",
        "destination": "dashboard-abc-123"
      },
      {
        "label": "Elastic Documentation",
        "type": "externalLink",
        "destination": "https://www.elastic.co/docs"
      }
    ],
    "layout": "horizontal"
  }
}
Request example
{
  "description": "A collection of important links",
  "layout": "horizontal",
  "links": [
    {
      "destination": "dashboard-abc-123",
      "label": "Overview",
      "type": "dashboardLink"
    },
    {
      "destination": "https://www.elastic.co/docs",
      "label": "Elastic Documentation",
      "type": "externalLink"
    }
  ],
  "title": "Important Resources"
}
Response examples (201)
Creates a new links library item and returns its ID, full state, and metadata.
{
  "data": {
    "description": "A collection of important links",
    "layout": "horizontal",
    "links": [
      {
        "destination": "dashboard-abc-123",
        "label": "Overview",
        "options": {
          "open_in_new_tab": false,
          "use_filters": true,
          "use_time_range": true
        },
        "type": "dashboardLink"
      },
      {
        "destination": "https://www.elastic.co/docs",
        "label": "Elastic Documentation",
        "options": {
          "encode_url": true,
          "open_in_new_tab": true
        },
        "type": "externalLink"
      }
    ],
    "title": "Important Resources"
  },
  "id": "0ee9d0ea-06a0-4a30-bf4e-be4d3ca85bf3",
  "meta": {
    "created_at": "2026-06-03T23:33:39.979Z",
    "created_by": "u_EWATCHX9oIEsmcXj8aA1FkcaY3DE-XEpsiGTjrR2PmM_0",
    "managed": false,
    "updated_at": "2026-06-03T23:33:39.979Z",
    "updated_by": "u_EWATCHX9oIEsmcXj8aA1FkcaY3DE-XEpsiGTjrR2PmM_0",
    "version": "WzEwNywxXQ=="
  }
}