> ## Documentation Index
> Fetch the complete documentation index at: https://docs.baseten.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Deactivate a standalone sampler

> Shuts down a standalone Loops sampler by ID.



## OpenAPI

````yaml post /v1/loops/samplers/{sampler_id}/deactivate
openapi: 3.1.0
info:
  description: REST API for management of Baseten resources
  title: Baseten management API
  version: 1.0.0
servers:
  - url: https://api.baseten.co
security:
  - BearerAuth: []
paths:
  /v1/loops/samplers/{sampler_id}/deactivate:
    parameters:
      - $ref: '#/components/parameters/sampler_id'
    post:
      summary: Deactivates a standalone Loops sampler
      description: >-
        Shuts down a standalone Loops sampler by ID. Succeeds if it is already
        inactive. A sampler paired to a run always returns 409 with the run's
        ID, even if it is inactive.
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeactivateLoopsSamplerResponseV1'
      x-codeSamples:
        - lang: bash
          source: >
            curl --request POST \

            --url
            https://api.baseten.co/v1/loops/samplers/{sampler_id}/deactivate \

            --header "Authorization: Bearer $BASETEN_API_KEY"
        - lang: python
          source: >-
            import requests

            import os

            API_KEY = os.environ.get("BASETEN_API_KEY", "<YOUR_API_KEY>")

            url =
            "https://api.baseten.co/v1/loops/samplers/{sampler_id}/deactivate"


            headers = {"Authorization": f"Bearer {API_KEY}"}


            response = requests.request(
                "POST",
                url,
                headers=headers,
                json={}
            )


            print(response.text)
components:
  parameters:
    sampler_id:
      schema:
        type: string
      name: sampler_id
      in: path
      required: true
  schemas:
    DeactivateLoopsSamplerResponseV1:
      description: Response for ``POST /v1/loops/samplers/<sampler_id>/deactivate``.
      properties:
        id:
          description: The deactivated Loops sampler ID.
          title: Id
          type: string
        base_model:
          description: The base model the deactivated sampler was serving.
          title: Base Model
          type: string
        user:
          $ref: '#/components/schemas/UserV1'
          description: The user who owns the Loops sampler.
      required:
        - id
        - base_model
        - user
      title: DeactivateLoopsSamplerResponseV1
      type: object
    UserV1:
      description: A user.
      properties:
        email:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          description: Email of the user.
          title: Email
      title: UserV1
      type: object
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: >-
        Send `Authorization: Bearer <api_key>`. The legacy `Authorization:
        Api-Key <api_key>` scheme is also accepted.

````