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

# Suspend service

> **Token scope:** `account` · `org` · `project` — read-only tokens refused (not a GET).

Suspend a compute service: takes it offline now, but on the microvm plane it still WAKES ON REQUEST (use stop to keep it offline). On legacy Fly it stays down until start. All plans.



## OpenAPI

````yaml /openapi/project.json post /projects/{projectId}/services/{serviceId}/suspend
openapi: 3.1.0
info:
  title: InstaCloud API — Project level
  version: 0.1.0
  description: >-
    Endpoints under `/projects/{projectId}`: branches, services, deploys,
    secrets, databases, storage, cron, observability, governance. Callable with
    any token whose binding covers the project.


    Generated from the platform's own OpenAPI document
    (https://api.instacloud.com/openapi.json); see the [API
    overview](/reference/api/overview) for authentication and token scopes.
servers:
  - url: https://api.instacloud.com
    description: InstaCloud
security:
  - bearerAuth: []
tags:
  - name: Projects
    description: Projects inside an organization.
  - name: Branches
    description: >-
      Branch environments of a project: isolated database, storage and compute
      per branch.
  - name: Services
    description: 'Services on a branch: compute, postgres, storage and managed databases.'
  - name: Deploy
    description: Deploy an image or a source to a compute service.
  - name: Compute
    description: Build output of a compute service.
  - name: Secrets
    description: User secrets, service credentials and how they bind into compute env.
  - name: Database
    description: Postgres databases, extensions, credentials and ad-hoc SQL.
  - name: Storage
    description: Objects in a storage service.
  - name: Backups
    description: Database backups and restores.
  - name: Cron
    description: Scheduled HTTP calls against a service or an external URL.
  - name: Observability
    description: Logs, metrics, deploy events and database insight.
  - name: Governance
    description: Per-project agent policy and the approval queue.
  - name: Audit
    description: The project's event timeline, including agent-ingested events.
  - name: Domains
    description: >-
      Domains bought through InstaCloud, bring-your-own zones and their DNS
      records.
  - name: Billing
    description: Usage, cycles, invoices and credits.
  - name: Templates
    description: Deploy a template into a project.
paths:
  /projects/{projectId}/services/{serviceId}/suspend:
    post:
      tags:
        - Services
      summary: Suspend service
      description: >-
        **Token scope:** `account` · `org` · `project` — read-only tokens
        refused (not a GET).


        Suspend a compute service: takes it offline now, but on the microvm
        plane it still WAKES ON REQUEST (use stop to keep it offline). On legacy
        Fly it stays down until start. All plans.
      operationId: suspendService
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: projectId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: serviceId
          required: true
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  service:
                    $ref: '#/components/schemas/Service'
                  state:
                    description: 'live runtime state: running|suspended|stopped|none|unknown'
                    type: string
        '202':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                  approvalId:
                    type: string
                  action:
                    type: string
                  actions:
                    type: array
                    items:
                      type: string
                  message:
                    type: string
                  url:
                    type: string
                required:
                  - status
                  - approvalId
                  - action
                  - actions
                  - message
                  - url
        '400':
          description: Default Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
        '404':
          description: Default Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Service:
      description: >-
        A project-level service (postgres | storage | compute | redis | mysql |
        mongodb).
      type: object
      properties:
        id:
          format: uuid
          type: string
        project_id:
          format: uuid
          type: string
        type:
          type: string
          enum:
            - postgres
            - storage
            - compute
            - redis
            - mysql
            - mongodb
        name:
          type: string
        spec:
          description: >-
            compute: {cpu_kind,cpus,memory_mb}; postgres: sized by its instance
            ceiling (cpuMilli/memoryMib)
          type: object
          additionalProperties: true
        machine_count:
          description: compute only
          type: integer
        desired_state:
          description: compute only — developer-set lifecycle intent
          type: string
          enum:
            - running
            - stopped
            - suspended
        always_on:
          description: >-
            compute only — true (the platform default for new compute services):
            machines never scale to zero; false: idle machines suspend and wake
            on request. Billing is actual usage either way.
          type: boolean
        websocket:
          description: >-
            compute only — the app speaks WebSocket, so its machines carry
            connections-based concurrency and a 512 MB guest floor. Re-asserted
            by any redeploy given no flag, including restart. null: never
            recorded.
          type:
            - boolean
            - 'null'
        region:
          type:
            - string
            - 'null'
        domain:
          description: default access domain (postgres/compute)
          type:
            - string
            - 'null'
        public:
          description: storage only — bucket(s) served with anonymous public-read
          type: boolean
        image:
          description: compute only — container image currently run
          type:
            - string
            - 'null'
        port:
          description: >-
            compute/managed database — compute image port, or the private
            database TCP port
          type:
            - integer
            - 'null'
        start_command:
          description: >-
            Runtime startup override via sh -c; null uses the built image
            default. Stored as readable service settings.
          type:
            - string
            - 'null'
        volume_applied_mount_path:
          description: >-
            Last successfully confirmed Compute mount path; null means unknown,
            not proof of a changed path.
          type:
            - string
            - 'null'
        volume_mount_path:
          description: >-
            Compute volume mount path; null or omitted means /data for legacy
            volumes. Changes apply on deployment.
          type:
            - string
            - 'null'
        volume_gib:
          description: >-
            compute/managed database — size (whole Gi) of the persistent data
            volume; null = no volume. Compute can attach/grow via PUT
            .../volume; managed databases are platform-managed in v1
          type:
            - integer
            - 'null'
        pg_version:
          description: >-
            postgres only — the Postgres MAJOR version the service runs (e.g.
            16), known before the instance is ever connected to or woken. Pick
            client tooling (pg_dump/pg_restore/psql) of the same major. null:
            never recorded (a legacy row). The exact server_version of a RUNNING
            instance is on GET .../database/metrics
          type:
            - integer
            - 'null'
        template_deployment_id:
          format: uuid
          description: >-
            the template deployment that created this service (survives branch
            clones); null for services created directly
          type:
            - string
            - 'null'
        template_modified:
          description: >-
            true once the service was reconfigured away from its
            template-deployed spec
          type: boolean
        template_code:
          description: >-
            the template this service was deployed from; null for services
            created directly, and for one whose deployment record has been
            pruned
          type:
            - string
            - 'null'
        template_logo_url:
          description: >-
            the template's mark, absolute and pinned to the commit that
            published it; null when the template is not in the registry (or
            carries no logo). Joined live rather than stored, because a
            republish moves it
          type:
            - string
            - 'null'
        source:
          $ref: '#/components/schemas/ServiceSourceSummary'
        status:
          type: string
          enum:
            - creating
            - active
            - error
            - deleting
            - deleted
        created_at:
          format: date-time
          type: string
    Error:
      type: object
      properties:
        error:
          type: string
      required:
        - error
    ServiceSourceSummary:
      description: >-
        compute only — where the running image comes from: an image somebody
        deployed (type=image) or a connected repository (type=github). Full
        resource: GET /projects/{id}/services/{serviceId}/source
      type: object
      properties:
        type:
          type: string
          enum:
            - image
            - github
        owner:
          type: string
        repo:
          type: string
        branch:
          description: the repo branch this service tracks
          type: string
        auto_deploy:
          description: a push to `branch` rebuilds and redeploys the service
          type: boolean
      required:
        - type
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Session access JWT or an API token (`insta_<prefix>_<secret>`).

````