---
type: api
title: Enable an SLO
description: You must have the `write` privileges for the **SLOs** feature in the **Observability** section of the Kibana feature privileges.
url: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/operation/operation-enablesloop
resource: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/operation/operation-enablesloop
products:
  - Kibana
---

# Enable an SLO

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

## Paths

- `POST` `/s/{spaceId}/api/observability/slos/{sloId}/enable`

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

#### Path Parameters

- `spaceId` (string)
  An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used.
- `sloId` (string)
  An identifier for the slo.

## Description

You must have the `write` privileges for the **SLOs** feature in the **Observability** section of the Kibana feature privileges.

## Responses

#### `204`

Successful request

#### `400`

Bad request

`application/json`

- `error` (string)
- `message` (string)
- `statusCode` (number)
#### `401`

Unauthorized response

`application/json`

- `error` (string)
- `message` (string)
- `statusCode` (number)
#### `403`

Forbidden response

`application/json`

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

Not found response

`application/json`

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

#### Console

```console
POST /s/{spaceId}/api/observability/slos/{sloId}/enable
```

#### curl

```curl
curl -X POST "https://{kibana_url}/s/{spaceId}/api/observability/slos/{sloId}/enable" \
  -H "kbn-xsrf: true"
```

## Response Examples

#### Bad request

```json
{
  "error": "Bad Request",
  "message": "Invalid value \u0027foo\u0027 supplied to: id",
  "statusCode": 400
}
```

#### Unauthorized

```json
{
  "error": "Unauthorized",
  "message": "security_exception: unable to authenticate user for REST request [/api/observability/slos]",
  "statusCode": 401
}
```

#### Forbidden

```json
{
  "error": "Forbidden",
  "message": "security_exception: action [slo_write] is unauthorized for user",
  "statusCode": 403
}
```

#### Not found

```json
{
  "error": "Not Found",
  "message": "SLO [3749f390-03a3-11ee-8139-c7ff60a1692d] not found",
  "statusCode": 404
}
```

