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

# Delete a workflow

> Deletes a workflow for a specific user. This endpoint does not delete a workflow for all users.



## OpenAPI

````yaml delete /workflows/{workflowId}
openapi: 3.0.1
info:
  title: Embedded 2025-09
  version: '5.0'
servers:
  - url: https://production.runalloy.com
security: []
paths:
  /workflows/{workflowId}:
    delete:
      summary: Delete a workflow
      description: >-
        Deletes a workflow for a specific user. This endpoint does not delete a
        workflow for all users.
      operationId: delete-workflow
      parameters:
        - name: userId
          in: query
          description: >-
            The Id of the user you want to lookup. Returned from the Create User
            endpoint. Note: you can also use the Embedded user's `username` in
            this field.
          schema:
            type: string
          required: true
        - name: workflowId
          in: path
          description: The Id of the workflow to delete
          schema:
            type: string
          required: true
        - name: Authorization
          in: header
          required: true
          schema:
            type: string
            default: bearer YOUR_API_KEY
        - $ref: '#/components/parameters/xApiVersion'
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value:
                    deleted: true
              schema:
                type: object
                properties:
                  deleted:
                    type: boolean
                    example: true
      deprecated: false
      security: []
      x-code-samples:
        - lang: cURL
          source: >
            curl -X DELETE
            "https://production.runalloy.com/workflows/{workflowId}?userId={{userId}}"
            \
              -H "Authorization: bearer YOUR_API_KEY" \
              -H "x-api-version: 2025-09"
        - lang: Python
          source: |
            import requests

            url = "https://production.runalloy.com/workflows/{workflowId}"
            params = {"userId": "{{userId}}"}
            headers = {
                "Authorization": "bearer YOUR_API_KEY",
                "x-api-version": "2025-09"
            }

            response = requests.delete(url, params=params, headers=headers)
            print(response.json())
        - lang: JavaScript
          source: >
            const userId = "{{userId}}";

            const workflowId = "{workflowId}";

            const url =
            `https://production.runalloy.com/workflows/${workflowId}?userId=${userId}`;


            fetch(url, {
              method: "DELETE",
              headers: {
                "Authorization": "bearer YOUR_API_KEY",
                "x-api-version": "2025-09"
              }
            })
              .then(response => response.json())
              .then(data => console.log(data))
              .catch(error => console.error("Error:", error));
components:
  parameters:
    xApiVersion:
      name: x-api-version
      in: header
      required: true
      description: The version of the API to use. The current API version is **2025-09**.
      schema:
        type: string
        default: 2025-09

````