---
type: api
title: Import Timelines
description: **Spaces method and path for this operation:**
url: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/v8/operation/operation-importtimelines
resource: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/v8/operation/operation-importtimelines
products:
  - Kibana
---

# Import Timelines

- Server: `https://{kibana_url}`

## Paths

- `POST` `/api/timeline/_import`
- `POST` `/s/{space_id}/api/timeline/_import`

- [Api key auth](/elastic/docs-builder/docs/4371/api/doc/kibana/v8/authentication#apikeyauth)
- [Basic auth](/elastic/docs-builder/docs/4371/api/doc/kibana/v8/authentication#basicauth)

## Description

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

Import Timelines.

## Request Body

`application/json`

The Timelines to import as a readable stream.

- `file` (object) — required
- `isImmutable` (enum) — optional
  Whether the Timeline should be immutable
  Values: `true`, `false`

## Responses

#### `200`

Indicates the import of Timelines was successful.

`application/json`

- `errors` ([] object)
  The list of failed Timeline imports
  - `error` (object)
    The error containing the reason why the timeline could not be imported
    - `message` (string)
      The reason why the timeline could not be imported
    - `status_code` (number)
      The HTTP status code of the error
  - `id` (string)
    The ID of the timeline that failed to import
- `success` (boolean)
  Indicates whether any of the Timelines were successfully imports
- `success_count` (number)
  The amount of successfully imported/updated Timelines
- `timelines_installed` (number)
  The amount of successfully installed Timelines
- `timelines_updated` (number)
  The amount of successfully updated Timelines
#### `400`

Indicates the import of Timelines was unsuccessful because of an invalid file extension.

`application/json`

- `body` (string)
  The error message
- `statusCode` (number)
#### `404`

Indicates that we were unable to locate the saved object client necessary to handle the import.

`application/json`

- `body` (string)
  The error message
- `statusCode` (number)
#### `409`

Indicates the import of Timelines was unsuccessful.

`application/json`

- `body` (string)
  The error message
- `statusCode` (number)
## Code Examples

#### Console

```console
POST /api/timeline/_import
```

#### curl

```curl
curl -X POST "https://{kibana_url}/api/timeline/_import"
```

