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

# Delete a saved query

> Removes a query from the config. Its fields are no longer locked by it (they stay read-only until an admin makes them editable again in the app). A 409 means the config changed since you read it (or `expected_version` is not the live one): read it again.



## OpenAPI

````yaml /api/statisfy-api.openapi.json delete /v1/integrations/{key}/queries/{query_id}
openapi: 3.1.0
info:
  description: >-
    The agent-first Statisfy API. Authenticate with an API key (`Authorization:
    Bearer stfy_live_…`), then call `GET /v1/meta/capabilities` to discover
    every operation and its schemas.
  title: Statisfy API
  version: 1.0.0
servers:
  - url: https://api.statisfy.com
    description: Production
security: []
paths:
  /v1/integrations/{key}/queries/{query_id}:
    delete:
      tags:
        - integrations
      summary: Delete a saved query
      description: >-
        Removes a query from the config. Its fields are no longer locked by it
        (they stay read-only until an admin makes them editable again in the
        app). A 409 means the config changed since you read it (or
        `expected_version` is not the live one): read it again.
      operationId: integrations_delete_query
      parameters:
        - description: The integration key, such as snowflake or salesforce
          in: path
          name: key
          required: true
          schema:
            type: string
        - in: path
          name: query_id
          required: true
          schema:
            type: string
        - description: >-
            The config `version` you read. Sent: a change against a version that
            is no longer live is a 409 and writes nothing (0 = the config was
            never saved). Left out, the change always lands
          in: query
          name: expected_version
          required: false
          schema:
            anyOf:
              - minimum: 0
                type: integer
              - type: 'null'
            default: null
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeletedIntegrationQuery'
          description: Successful Response
      security:
        - HTTPBearer: []
components:
  schemas:
    DeletedIntegrationQuery:
      properties:
        deleted:
          const: true
          default: true
          title: Deleted
          type: boolean
        id:
          title: Id
          type: string
        version:
          description: The config's version after the delete
          title: Version
          type: integer
      required:
        - id
        - version
      title: DeletedIntegrationQuery
      type: object
  securitySchemes:
    HTTPBearer:
      scheme: bearer
      type: http
      description: >-
        An API key, sent as `Authorization: Bearer stfy_live_…`. See
        [Authentication](/rest-api/authentication) for how to get one and which
        scopes it needs.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.