---
title: "Pin/unpin an event"
method: PATCH
path: "/api/pinned_event"
tags: ["Security Timeline API"]
---

# Pin/unpin an event

`PATCH /api/pinned_event`

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

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

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

Pin/unpin an event to/from an existing Timeline.

## Request body

- object
  - `eventId` string, required — The `_id` of the associated event for this pinned event.
  - `pinnedEventId` string, nullable — The `savedObjectId` of the pinned event you want to unpin.
  - `timelineId` string, required — The `savedObjectId` of the timeline that you want this pinned event unpinned from.

## Response `200`

Indicates a successful call.

- union
  - SecurityTimelineAPIPinnedEvent
    - `created` number, nullable — The time the pinned event was created, using a 13-digit Epoch timestamp.
    - `createdBy` string, nullable — The user who created the pinned event.
    - `updated` number, nullable — The last time the pinned event was updated, using a 13-digit Epoch timestamp
    - `updatedBy` string, nullable — The user who last updated the pinned event
    - `eventId` string, required — The `_id` of the associated event for this pinned event.
    - `timelineId` string, required — The `savedObjectId` of the timeline that this pinned event is associated with
    - `pinnedEventId` string, required — The `savedObjectId` of this pinned event
    - `version` string, required — The version of this pinned event
  - object
    - `unpinned` boolean, required — Indicates whether the event was successfully unpinned

---

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