---
title: "Deactivate a service"
method: POST
path: "/v1/{organization}/service/{service_id}/deactivate/"
tags: ["Service"]
---

# Deactivate a service

`POST /v1/{organization}/service/{service_id}/deactivate/`

## Request

- Base URL: `https://api.amigo.ai`
- URL: `https://api.amigo.ai/v1/{organization}/service/{service_id}/deactivate/`
- Auth: HTTP bearer and API key in header `X-ORG-ID` and HTTP basic
- TypeScript: <https://skmtc.dev/amigo/apis/amigo-api/docs/v1/:organization/service/:service_id/deactivate/post.ts> (a function with typed inputs; its response is checked against the schema)

Deactivate exactly one service while preserving its configuration and related data.

Available during maintenance. Requires `Service:UpdateService` and `Service:GetService`
for both the current and inactive service. An already-inactive service is a read-only
success. This does not terminate existing conversations or background processing.
After an uncertain response, read the exact service before deciding what to do next.

## Path parameters

- `service_id` string, required: The exact identifier of the service.
- `organization` string, required

## Headers

- `x-mongo-cluster-name` string, nullable: The Mongo cluster name to perform this request in. This is usually not needed unless the organization does not exist yet in the Amigo organization infra config database.
- `Sec-WebSocket-Protocol` string[]

## Request body

- DeactivateRequest
  - `expected_updated_at` string, date-time, required: The updated_at from the reviewed service snapshot. Active stale snapshots are rejected.

## Response `200`

Successful Response

- DeactivateResponse
  - `id` string, required: The identifier of the service.
  - `name` string, required: The name of the service.
  - `version_sets` object, required: The available version sets of the service.
  - `description` string, required: A description of the service.
  - `is_active` boolean, required: Whether the service is active.
  - `service_hierarchical_state_machine_id` string, required: The ID of the state machine that this service uses.
  - `agent_id` string, required: The ID of the agent that this service uses.
  - `tags` Tag[], required: The tags of the service.
    - `key` string, required
    - `value` string, nullable, required
  - `keyterms` string[], required: A list of keyterms that are easy to get wrong during audio transcriptions that tend to occur commonly in audio sessions using this service.
  - `creator` AmigoLibMongoCollectionsServiceServiceUserInfo, required
    - `org_id` string, required
    - `user_id` string, required
  - `updated_by` AmigoLibMongoCollectionsServiceServiceUserInfo, required
    - `org_id` string, required
    - `user_id` string, required
  - `updated_at` string, date-time, required: The timestamp to supply when deactivating this service.
  - `changed` boolean, required: Whether this request deactivated an active service.
  - `webhook_queued` boolean, required: Whether this request queued a service-updated webhook after committing the change.

## Other responses

- `400`: Service is used in a simulation unit test.
- `401`: Invalid authorization credentials.
- `403`: Missing required permissions.
- `404`: Organization or service not found.
- `409`: The service changed or a concurrent write conflicted. Read it again.
- `422`: Validation Error
- `429`: Rate limit exceeded.

## Changes

> 58 revisions in range; 3 not diffed.

- **2026-10-30** `fd3c06d4bc2c`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/amigo/apis/amigo-api/changes/v1/:organization/service/:service_id/deactivate/post.md)

---

[API](https://skmtc.dev/amigo/apis/amigo-api.md) - [All operations](https://skmtc.dev/amigo/apis/amigo-api/llms.txt) - [OpenAPI document](https://skmtc.dev/amigo/apis/amigo-api/revisions/fd3c06d4bc2c?raw)
