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

# UpdateHeartbeatAPI mirrors the erdo_update_heartbeat MCP tool.




## OpenAPI

````yaml /api/openapi.json patch /v1/heartbeats/{heartbeatID}
openapi: 3.0.0
info:
  title: Erdo API
  description: >-
    Erdo's REST API: query and write datasets, run agents, manage threads,
    integrations, pages, evals, workstreams, and experiments. Authenticate with
    a Bearer API key (erdo_api_...) or scoped token (erdo_token_...).
  version: '2026-07-26'
servers:
  - url: https://api.erdo.ai
    description: Production
security:
  - bearerAuth: []
paths:
  /v1/heartbeats/{heartbeatID}:
    patch:
      summary: |
        UpdateHeartbeatAPI mirrors the erdo_update_heartbeat MCP tool.
      operationId: PATCH:mcp.UpdateHeartbeatAPI
      parameters:
        - allowEmptyValue: true
          explode: false
          in: path
          name: heartbeatID
          required: true
          schema:
            type: string
          style: simple
      requestBody:
        content:
          application/json:
            schema:
              properties:
                active_window_end:
                  type: string
                active_window_start:
                  type: string
                description:
                  type: string
                enabled:
                  type: boolean
                instructions:
                  type: string
                interval_minutes:
                  format: int64
                  type: integer
                name:
                  type: string
                script_js:
                  type: string
                timezone:
                  type: string
              type: object
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  active_days:
                    items:
                      format: int64
                      type: integer
                    type: array
                  active_window_end:
                    type: string
                  active_window_start:
                    type: string
                  created_at:
                    type: string
                  description:
                    type: string
                  id:
                    format: uuid
                    type: string
                  instructions:
                    title: >
                      Instructions is the agent automation's prompt; empty for a
                      scripted one.
                    type: string
                  interval_minutes:
                    format: int64
                    type: integer
                  kind:
                    description: >
                      "script" (a deterministic zero-LLM JS body runs each
                      tick). It tells a caller which body field a read carries
                      and which one an update should send: instructions for an
                      agent automation, script\_js for a scripted one.
                    title: >
                      Kind is "agent" (an LLM runs each tick, driven by
                      instructions) or
                    type: string
                  latest_status:
                    type: string
                  name:
                    type: string
                  next_run_at:
                    type: string
                  script_js:
                    description: >
                      Present on a read so a caller can read-modify-write the
                      script.
                    title: >
                      ScriptJS is the scripted automation's JS body; empty for
                      an agent one.
                    type: string
                  state:
                    type: string
                  timezone:
                    type: string
                type: object
          description: Success response
        default:
          $ref: '#/components/responses/APIError'
components:
  responses:
    APIError:
      content:
        application/json:
          schema:
            externalDocs:
              url: https://pkg.go.dev/encore.dev/beta/errs#Error
            properties:
              code:
                description: Error code
                example: not_found
                externalDocs:
                  url: https://pkg.go.dev/encore.dev/beta/errs#ErrCode
                type: string
              details:
                description: Error details
                type: object
              message:
                description: Error message
                type: string
            title: APIError
            type: object
      description: Error response
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: An Erdo API key (erdo_api_...) or scoped token (erdo_token_...).

````