---
title: "Manage services"
method: POST
path: "/v1/services"
tags: ["services"]
---

# Manage services

`POST /v1/services`

Perform a service operation such as start, stop, or replan.

## Request body

- object
  - `action` 'autostart' | 'replan' | 'restart' | 'start' | 'stop' — The action to perform.
  - `services` string[] — A list of service names. Required for "start", "stop", and "restart". Ignored for "replan" and "autostart" (resolved automatically for "autostart" to default services).

## Response `202`

Accepted - asynchronous operation started.

- PostServicesResponse
  - `type` string — Response type, "sync".
  - `status-code` integer — HTTP response status code.
  - `status` string — The description of the HTTP status code. See the [IANA list](https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml).
  - `change` string — The Change ID of the asynchronous change.
  - `result` unknown

## Changes

> 12 revisions in range; 1 could not be searched.

- **2025-01-02** `1cb37312be6c` — 1 warning, 2 info
  - removed the optional property `allOf[subschema #2]/change` from the response with the `202` status
  - added `#/components/schemas/BaseAsyncResponse` to the response body `allOf` list for the response status `202`
  - removed `#/components/schemas/BaseResponse` from the response body `allOf` list for the response status `202`
- **2024-12-24** `26cd4f832e9c` — 1 breaking
  - the `allOf[subschema #2]/result` response's property type/format changed from `object, null`/`` to `null`/`` for status `202`
- **2024-12-22** `b3903318c3bd` — 1 breaking, 3 info
  - the `allOf[subschema #2]/result` response's property type/format changed from `null`/`` to `object, null`/`` for status `202`
  - added `#/components/schemas/BaseResponse` to the response body `allOf` list for the response status `202`
  - removed `#/components/schemas/BaseAsyncResponse` from the response body `allOf` list for the response status `202`
  - added the optional property `allOf[subschema #2]/change` to the response with the `202` status

[Change history](https://skmtc.dev/canonical/apis/pebble-api/changes/v1/services/post.md)

---

[API](https://skmtc.dev/canonical/apis/pebble-api.md) · [All operations](https://skmtc.dev/canonical/apis/pebble-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/canonical/pebble-api/revisions/a94f353eccac/schema)
