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

# Pause or resume a monitor

> Set a monitor's status to paused or active

export const MonitorsExperimental = () => <Warning>
    <strong>Monitors is experimental.</strong> Request and payload shapes can change without a deprecation window. Monitors isn't recommended for production workflows.
  </Warning>;

<MonitorsExperimental />

## Notes

* To authenticate, you'll need a [Tako API key](https://tako.com/console/api-keys). It's best practice to store it as an environment variable to avoid hardcoding sensitive credentials in your code.
* `status` is the only field this endpoint takes, and **nothing else on a monitor changes after create.** To change a monitor's type, parameters, channels, or window, [delete it](/api-reference/monitors-delete) and create a new one.
* Resuming a monitor whose `active_until` has already passed answers `400`. That monitor is expired, not paused — recreate it with a new window.
* Resuming clears `last_evaluation_outcome` back to `null`, because the pause invalidated that verdict.
* Pausing keeps the monitor and its firings. Use it instead of [delete](/api-reference/monitors-delete) when you want the history.


## OpenAPI

````yaml PATCH /v1/monitors/{id}
openapi: 3.1.0
info:
  title: Knowledge Search API
  version: 1.0.0
servers:
  - url: https://tako.com/api/
    description: Tako Production API Server
security: []
paths:
  /v1/monitors/{id}:
    parameters:
      - description: Resource id
        required: true
        schema:
          type: string
          format: uuid
        name: id
        in: path
    patch:
      tags:
        - monitors
      summary: Pause or resume a monitor
      description: >-
        Set status to active or paused. Resuming a monitor whose active_until
        has passed answers 400. Nothing else on a monitor changes after create.


        **Experimental.** Request and payload shapes can change without a
        deprecation window. Monitors isn't recommended for production workflows.
      operationId: patchMonitor
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MonitorPatch'
        required: true
      responses:
        '200':
          description: One monitor
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MonitorResponse'
        '400':
          description: Invalid request data (validation or malformed body).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BaseAPIError'
        '401':
          description: Missing or invalid API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BaseAPIError'
        '404':
          description: No resource with this id belongs to the caller.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BaseAPIError'
      security:
        - apiKey: []
components:
  schemas:
    MonitorPatch:
      properties:
        status:
          $ref: '#/components/schemas/MonitorStatus'
      type: object
      required:
        - status
      title: MonitorPatch
    MonitorResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        name:
          type: string
          title: Name
        type:
          type: string
          title: Type
        parameters:
          additionalProperties: true
          type: object
          title: Parameters
        fire_once:
          type: boolean
          title: Fire Once
        status:
          $ref: '#/components/schemas/MonitorStatus'
        status_reason:
          anyOf:
            - $ref: '#/components/schemas/StatusReason'
            - type: 'null'
          description: >-
            Why Tako paused the monitor. Null while the monitor is active, and
            null when you paused it yourself.
        active_from:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Active From
        active_until:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Active Until
        last_evaluated_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Last Evaluated At
          description: >-
            When the evaluation rule last ran for this monitor. Null until the
            first evaluation.
        last_evaluation_outcome:
          anyOf:
            - $ref: '#/components/schemas/EvaluationOutcome'
            - type: 'null'
          description: >-
            How that evaluation ended. Null until the first evaluation, and null
            again after you resume a paused monitor, because the pause
            invalidated that verdict. An active monitor with no firings and a
            recent predates_monitor or before_window here is alive and waiting
            for an occurrence that happens after it was created. no_occurrence
            means the type read no occurrence, which includes finding no usable
            data to compare.
        channel_ids:
          items:
            type: string
            format: uuid
          type: array
          title: Channel Ids
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
      type: object
      required:
        - id
        - name
        - type
        - parameters
        - fire_once
        - status
        - status_reason
        - active_from
        - active_until
        - last_evaluated_at
        - last_evaluation_outcome
        - channel_ids
        - created_at
        - updated_at
      title: MonitorResponse
    BaseAPIError:
      properties:
        error_message:
          type: string
          title: Error Message
        error_type:
          $ref: '#/components/schemas/APIErrorType'
      type: object
      required:
        - error_message
        - error_type
      title: BaseAPIError
    MonitorStatus:
      type: string
      enum:
        - active
        - paused
      title: MonitorStatus
    StatusReason:
      type: string
      enum:
        - fired_once
        - unloadable
        - expired
        - completed
      title: StatusReason
    EvaluationOutcome:
      type: string
      enum:
        - fired
        - already_fired
        - no_occurrence
        - predates_monitor
        - outside_lookback
        - unloadable
        - completed
        - unknown_type
        - inactive
        - deleted
        - expired
        - before_window
        - crashed
      title: EvaluationOutcome
      description: >-
        How one evaluation of a monitor ended. `fired` wrote a firing, and
        `already_fired` found that occurrence already recorded. `no_occurrence`
        found the condition unmet. `predates_monitor` and `before_window` found
        an occurrence from before the monitor or its `active_from`, and
        `outside_lookback` found one too old to report. `expired`, `unloadable`
        and `unknown_type` name why the rule stopped before reading data,
        `completed` means the subject reached an end state that leaves the
        condition unreachable, and `crashed` means the type raised while reading
        it. `deleted` and `inactive` reach only the `monitors.evaluation`
        metric; neither is ever stored on a monitor row.
    APIErrorType:
      type: string
      enum:
        - BAD_REQUEST
        - AUTHENTICATION_ERROR
        - INTERNAL_SERVER_ERROR
        - RELEVANT_RESULTS_NOT_FOUND
        - RATE_LIMIT_EXCEEDED
        - PAYMENT_REQUIRED
        - REQUEST_TIMEOUT
        - FORBIDDEN
        - NOT_FOUND
        - SERVICE_UNAVAILABLE
        - SERVICE_OVERLOADED
        - UNSUPPORTED_CONTENT_FORMAT
      title: APIErrorType
  securitySchemes:
    apiKey:
      type: apiKey
      name: X-API-Key
      in: header

````