---
title: "Favorite a Timeline or Timeline template"
method: PATCH
path: "/api/timeline/_favorite"
tags: ["Security Timeline API"]
---

# Favorite a Timeline or Timeline template

`PATCH /api/timeline/_favorite`

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

<div><span class="operation-verb patch">patch</span>&nbsp;<span class="operation-path">/s/{space_id}/api/timeline/_favorite</span></div>

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

Favorite a Timeline or Timeline template for the current user.

## Request body

- object
  - `templateTimelineId` string, nullable, required
  - `templateTimelineVersion` number, nullable, required
  - `timelineId` string, nullable, required
  - `timelineType` 'default' | 'template', required — The type of Timeline.

## Response `200`

Indicates a successful call.

- SecurityTimelineAPIFavoriteTimelineResponse
  - `favorite` SecurityTimelineAPIFavoriteTimelineResult[]
    - `favoriteDate` number, nullable
    - `fullName` string, nullable
    - `userName` string, nullable
  - `savedObjectId` string, required
  - `templateTimelineId` string, nullable
  - `templateTimelineVersion` number, nullable
  - `timelineType` 'default' | 'template' — The type of Timeline.
  - `version` string, required

## Other responses

- `403` — Indicates the user does not have the required permissions to persist the favorite status.

---

[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)
