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

# Delete Workflows by ID

> Deletes the specified workflow by ID (could be a soft-delete or permanent, depending on server logic). Requires both JWT and x-api-key.



## OpenAPI

````yaml delete /workflows/{workflow_id}
openapi: 3.1.0
info:
  title: Playbook API Documentation
  description: >-
    This is the documentation for the Playbook API. You can use this API to use
    our service programmatically, this is done by using your API key. <br/> You
    can view your API key using the 'User' tab on https://beta.playbook3d.com/.
  version: '1.0'
servers: []
security: []
tags: []
paths:
  /workflows/{workflow_id}:
    delete:
      tags:
        - workflows
      summary: Delete Workflow by ID
      description: >-
        Deletes the specified workflow by ID (could be a soft-delete or
        permanent, depending on server logic). Requires both JWT and x-api-key.
      operationId: delete_workflow
      parameters:
        - name: workflow_id
          in: path
          description: The UUID of the workflow you want to delete.
          required: true
          schema:
            type: string
            format: uuid
        - name: x-api-key
          in: header
          description: >-
            Your API key. This is required by most endpoints to access the API
            programmatically. You can view your x-api-key using the 'Profile'
            tab on the website.
          required: true
          schema:
            type: string
        - name: Authorization
          in: header
          description: Bearer token for authentication (JWT).
          required: true
          schema:
            type: string
      responses:
        '200':
          description: >-
            Successful Deletion. The server returns a JSON body about the
            removed workflow.
          content:
            application/json:
              schema:
                type: object
                properties:
                  workflow:
                    type: object
                    description: The deleted workflow object or confirmation details.
                example:
                  workflow:
                    id: 123e4567-e89b-12d3-a456-426614174000
                    name: Deleted Workflow
                    status: removed
                    deleted_at: '2024-12-31T00:00:00Z'
        '204':
          description: No Content. The server indicates success but returns no body.
        '400':
          description: Bad Request. Possibly invalid workflow_id format.
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    type: string
                    description: Bad Request. Possibly invalid workflow_id format.
                example:
                  description: Bad Request. Possibly invalid workflow_id format.
        '401':
          description: Unauthorized. The Bearer token or API key is invalid or missing.
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    type: string
                    description: >-
                      Unauthorized. The Bearer token or API key is invalid or
                      missing.
                example:
                  description: >-
                    Unauthorized. The Bearer token or API key is invalid or
                    missing.
        '403':
          description: >-
            Forbidden. The user does not have permission to delete this
            workflow.
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    type: string
                    description: >-
                      Forbidden. The user does not have permission to delete
                      this workflow.
                example:
                  description: >-
                    Forbidden. The user does not have permission to delete this
                    workflow.
        '404':
          description: Not Found. The workflow with the given ID was not found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    type: string
                    description: Not Found. The workflow with the given ID was not found.
                example:
                  description: Not Found. The workflow with the given ID was not found.
        '500':
          description: Internal Server Error. Something went wrong on the server.
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    type: string
                    description: Internal Server Error. Something went wrong on the server.
                example:
                  description: Internal Server Error. Something went wrong on the server.
      x-codeSamples:
        - lang: cURL
          source: |-
            curl -X DELETE \
              -H 'Authorization: Bearer $API_KEY' \
              -H 'Accept: application/json' \
              '$BASE_URL/workflows/$workflow_id'
        - lang: Python
          source: >-
            import requests


            headers = {
                'x-api-key': '<YOUR_API_KEY>',
                'Authorization': 'Bearer <YOUR_JWT_TOKEN>',
                'Accept': 'application/json'
            }

            resp =
            requests.delete(f"https://example.com/workflows/{workflow_id}",
            headers=headers)

            print(resp.status_code, resp.text)
        - lang: JavaScript
          source: |-
            fetch(`https://example.com/workflows/${workflow_id}`, {
              method: 'DELETE',
              headers: {
                'x-api-key': '<YOUR_API_KEY>',
                'Authorization': 'Bearer <YOUR_JWT_TOKEN>',
                'Accept': 'application/json'
              }
            }).then(async res => {
              console.log(res.status);
              console.log(await res.text());
            }).catch(err => console.error(err));
        - lang: C#
          source: >-
            // Using HttpClient

            HttpClient client = new HttpClient();

            client.DefaultRequestHeaders.Add("x-api-key", "<YOUR_API_KEY>");

            client.DefaultRequestHeaders.Authorization = new
            AuthenticationHeaderValue("Bearer", "<YOUR_JWT_TOKEN>");


            var response = await
            client.DeleteAsync($"https://example.com/workflows/{workflow_id}");

            string content = await response.Content.ReadAsStringAsync();

            Console.WriteLine(response.StatusCode);

            Console.WriteLine(content);

````