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

# Bolt API

<Info>
  **Prerequisites:**

  * This feature is available with the [**Paradime Bolt plan**](https://www.paradime.io/pricing)**.**
  * Your API keys ***must*** have either Bolt Schedules Admin or Bolt Schedules Metadata Viewer capabilities.
</Info>

The Bolt API allows you to easily manage and control Bolt schedules and runs within your workspace.

<Warning>
  **Schedules are identified by slug.** The `triggerBoltRun`, `retryBoltRunFromFailure`, `boltScheduleName`, `suspendBoltSchedule`, `listBoltRuns`, and `deleteBoltSchedule` operations all take a `slug: String` argument — the identifier returned by `createBoltSchedule` and shown in the Bolt UI.
</Warning>

<Info>
  The examples below authenticate with an **account API key** — pass `Authorization: Bearer <token>` and `X-Paradime-Workspace: <workspace_uid>` (the account key starts with `prdm_cmp_`). Legacy **workspace API keys** are still supported: send `X-API-KEY` and `X-API-SECRET` headers instead. See API Keys.
</Info>

### List Bolt schedules

This endpoint will return the `active` Bolt schedules in your workspace.

**Example Request**

<Tabs>
  <Tab title="GraphQL">
    ```python theme={"system"}
    import requests
    import os

    # API credentials
    api_endpoint = "<YOUR_API_ENDPOINT>"
    api_token = "<YOUR_API_TOKEN>"          # account API key (starts with prdm_cmp_)
    workspace_uid = "<YOUR_WORKSPACE_UID>"

    graphql_query = """
    query ListBoltSchedules {
        listBoltSchedules(offset: 0, limit: 10, showInactive: false) {
            schedules {
                slug
                name
                schedule
                owner
                lastRunAt
                lastRunState
                nextRunAt
                id
                uuid
                source
                turboCi {
                    enabled
                    deferredScheduleSlug
                    successfulRunOnly
                }
                deferredSchedule {
                    deferredScheduleSlug
                    enabled
                    successfulRunOnly
                }
                commands
                gitBranch
                notifications {
                    slackNotifications {
                        channel
                        events
                    }
                    emailNotifications {
                        channel
                        events
                    }
                }
            }
            totalCount
        }
    }
      """
      
    response = requests.post(api_endpoint, json={"query": graphql_query}, headers={
          "Content-Type": "application/json",
          "Authorization": f"Bearer {api_token}",
          "X-Paradime-Workspace": workspace_uid,
      })

    print(response.json())
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={"system"}
    curl -X POST "<YOUR_API_ENDPOINT>" \
         -H "Content-Type: application/json" \
         -H "Authorization: Bearer <YOUR_API_TOKEN>" \
         -H "X-Paradime-Workspace: <YOUR_WORKSPACE_UID>" \
         -d '{
           "query": "query ListBoltSchedules($offset: Int!, $limit: Int!, $showInactive: Boolean!) { listBoltSchedules(offset: $offset, limit: $limit, showInactive: $showInactive) { schedules { slug name schedule owner lastRunAt lastRunState nextRunAt id uuid source turboCi { enabled deferredScheduleSlug successfulRunOnly } deferredSchedule { deferredScheduleSlug enabled successfulRunOnly } commands gitBranch notifications { slackNotifications { channel events } emailNotifications { channel events } } } totalCount } }",
           "variables": {
             "offset": 0,
             "limit": 10,
             "showInactive": false
           }
         }'
    ```
  </Tab>
</Tabs>

<Accordion title="Example response">
  ```json theme={"system"}
  {
    "data": {
      "listBoltSchedules": {
        "schedules": [
          {
            "slug": "fabio-chld-yaml",
            "name": "fabio-chld-yaml",
            "schedule": "OFF",
            "owner": "fabio@paradime.io",
            "lastRunAt": null,
            "lastRunState": null,
            "nextRunAt": null,
            "id": 973767,
            "uuid": "f5f98a76-c978-31c5-9296-aae9903653f4",
            "source": "yaml",
            "turboCi": null,
            "deferredSchedule": null,
            "commands": ["dbt run"],
            "gitBranch": "main",
            "notifications": {
              "slackNotifications": [],
              "emailNotifications": []
            }
          }
        ],
        "totalCount": 26
      }
    }
  }
  ```
</Accordion>

### List schedules across all workspaces

This endpoint returns the schedule names and slugs across **all workspaces** in your account, together with the workspace each one belongs to. This is useful with an account API key, where a single credential can operate across multiple workspaces.

**Example Request**

<Tabs>
  <Tab title="GraphQL">
    ```python theme={"system"}
    import requests

    # API credentials
    api_endpoint = "<YOUR_API_ENDPOINT>"
    api_token = "<YOUR_API_TOKEN>"          # account API key (starts with prdm_cmp_)
    workspace_uid = "<YOUR_WORKSPACE_UID>"

    graphql_query = """
    query ListAllScheduleNames {
        listAllScheduleNames {
            ok
            schedules {
                name
                slug
                workspaceName
                workspaceUid
            }
        }
    }
    """

    response = requests.post(api_endpoint, json={"query": graphql_query}, headers={
          "Content-Type": "application/json",
          "Authorization": f"Bearer {api_token}",
          "X-Paradime-Workspace": workspace_uid,
      })

    print(response.json())
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={"system"}
    curl -X POST "<YOUR_API_ENDPOINT>" \
         -H "Content-Type: application/json" \
         -H "Authorization: Bearer <YOUR_API_TOKEN>" \
         -H "X-Paradime-Workspace: <YOUR_WORKSPACE_UID>" \
         -d '{
           "query": "query ListAllScheduleNames { listAllScheduleNames { ok schedules { name slug workspaceName workspaceUid } } }"
         }'
    ```
  </Tab>
</Tabs>

<Accordion title="Example response">
  ```json theme={"system"}
  {
    "data": {
      "listAllScheduleNames": {
        "ok": true,
        "schedules": [
          {
            "name": "Nightly build",
            "slug": "nightly-build-a1b2c3",
            "workspaceName": "Analytics",
            "workspaceUid": "abc123def456"
          }
        ]
      }
    }
  }
  ```
</Accordion>

### List runs for a schedule

This endpoint returns the runs for a given Bolt schedule, identified by its `slug`.

**Example Request**

<Tabs>
  <Tab title="GraphQL">
    ```python theme={"system"}
    import requests

    # API credentials
    api_endpoint = "<YOUR_API_ENDPOINT>"
    api_token = "<YOUR_API_TOKEN>"          # account API key (starts with prdm_cmp_)
    workspace_uid = "<YOUR_WORKSPACE_UID>"

    graphql_query = """
    query ListBoltRuns {
        listBoltRuns(slug: "flowing-pachy-wyy4fs", offset: 0, limit: 10) {
            ok
            runs {
                id
                state
                actor
                actorEmail
                parentScheduleRunId
                startDttm
                endDttm
                gitInfo {
                    branch
                    commitHash
                    pullRequestId
                }
            }
        }
    }
    """

    response = requests.post(api_endpoint, json={"query": graphql_query}, headers={
          "Content-Type": "application/json",
          "Authorization": f"Bearer {api_token}",
          "X-Paradime-Workspace": workspace_uid,
      })

    print(response.json())
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={"system"}
    curl -X POST "<YOUR_API_ENDPOINT>" \
         -H "Content-Type: application/json" \
         -H "Authorization: Bearer <YOUR_API_TOKEN>" \
         -H "X-Paradime-Workspace: <YOUR_WORKSPACE_UID>" \
         -d '{
           "query": "query ListBoltRuns($slug: String, $offset: Int!, $limit: Int!) { listBoltRuns(slug: $slug, offset: $offset, limit: $limit) { ok runs { id state actor actorEmail parentScheduleRunId startDttm endDttm gitInfo { branch commitHash pullRequestId } } } }",
           "variables": {
             "slug": "flowing-pachy-wyy4fs",
             "offset": 0,
             "limit": 10
           }
         }'
    ```
  </Tab>
</Tabs>

<Accordion title="Example response">
  ```json theme={"system"}
  {
    "data": {
      "listBoltRuns": {
        "ok": true,
        "runs": [
          {
            "id": 15509,
            "state": "SUCCESS",
            "actor": "John Doe",
            "actorEmail": "john@acme.io",
            "parentScheduleRunId": null,
            "startDttm": "2024-08-27 22:58:57.738046",
            "endDttm": "2024-08-27 22:59:11.323692",
            "gitInfo": {
              "branch": "main",
              "commitHash": "a1b2c3d",
              "pullRequestId": null
            }
          }
        ]
      }
    }
  }
  ```
</Accordion>

### Get Bolt schedule details

This endpoint will enable you to check the status of a schedule by passing a Bolt schedule `slug`.

**Example Request**

<Tabs>
  <Tab title="GraphQL">
    ```python theme={"system"}
    import requests
    import os

    # API credentials
    api_endpoint = "<YOUR_API_ENDPOINT>"
    api_token = "<YOUR_API_TOKEN>"          # account API key (starts with prdm_cmp_)
    workspace_uid = "<YOUR_WORKSPACE_UID>"

    graphql_query = """
    query BoltScheduleName {
        boltScheduleName(slug: "flowing-pachy-wyy4fs") {
            ok
            slug
            name
            latestRunId
            commands
            owner
            schedule
            uuid
            source
        }
    }
      """
      
    response = requests.post(api_endpoint, json={"query": graphql_query}, headers={
          "Content-Type": "application/json",
          "Authorization": f"Bearer {api_token}",
          "X-Paradime-Workspace": workspace_uid,
      })

    print(response.json())
      
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={"system"}
    curl -X POST "<YOUR_API_ENDPOINT>" \
         -H "Content-Type: application/json" \
         -H "Authorization: Bearer <YOUR_API_TOKEN>" \
         -H "X-Paradime-Workspace: <YOUR_WORKSPACE_UID>" \
         -d '{
           "query": "query BoltScheduleName($slug: String) { boltScheduleName(slug: $slug) { ok slug name latestRunId commands owner schedule uuid source } }",
           "variables": {
             "slug": "flowing-pachy-wyy4fs"
           }
         }'
    ```
  </Tab>
</Tabs>

<Accordion title="Example response">
  ```json theme={"system"}
  {
    "data": {
      "boltScheduleName": {
        "ok": true,
        "slug": "flowing-pachy-wyy4fs",
        "name": "Nightly build",
        "latestRunId": 15475,
        "commands": ["dbt test"],
        "owner": "john@acme.io",
        "schedule": "OFF",
        "uuid": "a3d6ceea-abe3-333e-ac8b-c0b48cce5678",
        "source": "ui"
      }
    }
  }
  ```
</Accordion>

### Trigger a Bolt run

This endpoint will enable you to trigger a Bolt schedule run by passing a schedule `slug`.

**Example Request**

<Tabs>
  <Tab title="GraphQL">
    ```python theme={"system"}
    import requests
    import os

    # API credentials
    api_endpoint = "<YOUR_API_ENDPOINT>"
    api_token = "<YOUR_API_TOKEN>"          # account API key (starts with prdm_cmp_)
    workspace_uid = "<YOUR_WORKSPACE_UID>"

    graphql_query = """
    mutation TriggerBoltRun {
        triggerBoltRun(slug: "flowing-pachy-wyy4fs") {
            runId
        }
    }
      """
      
    response = requests.post(api_endpoint, json={"query": graphql_query}, headers={
          "Content-Type": "application/json",
          "Authorization": f"Bearer {api_token}",
          "X-Paradime-Workspace": workspace_uid,
      })

    print(response.json())

    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={"system"}
    curl -X POST "<YOUR_API_ENDPOINT>" \
         -H "Content-Type: application/json" \
         -H "Authorization: Bearer <YOUR_API_TOKEN>" \
         -H "X-Paradime-Workspace: <YOUR_WORKSPACE_UID>" \
         -d '{
           "query": "mutation TriggerBoltRun($slug: String) { triggerBoltRun(slug: $slug) { runId } }",
           "variables": {
             "slug": "flowing-pachy-wyy4fs"
           }
         }'
    ```
  </Tab>
</Tabs>

<Accordion title="Example response">
  ```json theme={"system"}
  {
    "data": {
      "triggerBoltRun": {
        "runId": 15477
      }
    }
  }
  ```
</Accordion>

### Trigger a Bolt run with custom commands

This endpoint will enable you to trigger a Bolt schedule with a custom command and overwrite the actual commands defined in the schedule for that particular run.

This only modifies the command at runtime for the triggered Bolt schedule and not the commands configuration defined in the schedule.

**Example Request**

<Tabs>
  <Tab title="GraphQL">
    ```python theme={"system"}
    import requests
    import os

    # API credentials
    api_endpoint = "<YOUR_API_ENDPOINT>"
    api_token = "<YOUR_API_TOKEN>"          # account API key (starts with prdm_cmp_)
    workspace_uid = "<YOUR_WORKSPACE_UID>"

    graphql_query = """
    mutation TriggerBoltRun {
        triggerBoltRun(slug: "flowing-pachy-wyy4fs", commands: ["dbt compile", "dbt test"]) {
            runId
        }
    }
      """
      
    response = requests.post(api_endpoint, json={"query": graphql_query}, headers={
          "Content-Type": "application/json",
          "Authorization": f"Bearer {api_token}",
          "X-Paradime-Workspace": workspace_uid,
      })

    print(response.json())
      
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={"system"}
    curl -X POST "<YOUR_API_ENDPOINT>" \
         -H "Content-Type: application/json" \
         -H "Authorization: Bearer <YOUR_API_TOKEN>" \
         -H "X-Paradime-Workspace: <YOUR_WORKSPACE_UID>" \
         -d '{
           "query": "mutation TriggerBoltRun($slug: String, $commands: [String!]) { triggerBoltRun(slug: $slug, commands: $commands) { runId } }",
           "variables": {
             "slug": "flowing-pachy-wyy4fs",
             "commands": ["dbt compile", "dbt test"]
           }
         }'
    ```
  </Tab>
</Tabs>

<Accordion title="Example response">
  ```json theme={"system"}
  {
    "data": {
      "triggerBoltRun": {
        "runId": 15483
      }
    }
  }
  ```
</Accordion>

### Trigger a Bolt run with a custom git branch

This endpoint will enable you to trigger a Bolt schedule with a custom git commit and overwrite the branch name defined in the schedule configuration.

This only modifies the commit at runtime for the triggered Bolt schedule and not the branch name defined in the schedule.

**Example Request**

<Tabs>
  <Tab title="GraphQL">
    ```python theme={"system"}
    import requests
    import os

    # API credentials
    api_endpoint = "<YOUR_API_ENDPOINT>"
    api_token = "<YOUR_API_TOKEN>"          # account API key (starts with prdm_cmp_)
    workspace_uid = "<YOUR_WORKSPACE_UID>"

    graphql_query = """
    mutation TriggerBoltRun {
        triggerBoltRun(slug: "flowing-pachy-wyy4fs", branch: "feature-branch-123") {
            runId
        }
    }
      """
      
    response = requests.post(api_endpoint, json={"query": graphql_query}, headers={
          "Content-Type": "application/json",
          "Authorization": f"Bearer {api_token}",
          "X-Paradime-Workspace": workspace_uid,
      })

    print(response.json())
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={"system"}
    curl -X POST "<YOUR_API_ENDPOINT>" \
         -H "Content-Type: application/json" \
         -H "Authorization: Bearer <YOUR_API_TOKEN>" \
         -H "X-Paradime-Workspace: <YOUR_WORKSPACE_UID>" \
         -d '{
           "query": "mutation TriggerBoltRun($slug: String, $branch: String!) { triggerBoltRun(slug: $slug, branch: $branch) { runId } }",
           "variables": {
             "slug": "flowing-pachy-wyy4fs",
             "branch": "feature-branch-123"
           }
         }'
    ```
  </Tab>
</Tabs>

<Accordion title="Example response">
  ```json theme={"system"}
  {
    "data": {
      "triggerBoltRun": {
        "runId": 15483
      }
    }
  }
  ```
</Accordion>

### Trigger a Bolt run with a PR number

This endpoint enables you to trigger a Bolt schedule with a specific pull request number, which is particularly useful for Turbo CI workflows that need to associate runs with pull requests for smart cancellation and concurrency enabedled.

<Tabs>
  <Tab title="GraphQL">
    ```python theme={"system"}
    import os
    import requests

    # API credentials
    api_endpoint = "<YOUR_API_ENDPOINT>"
    api_token = "<YOUR_API_TOKEN>"          # account API key (starts with prdm_cmp_)
    workspace_uid = "<YOUR_WORKSPACE_UID>"

    graphql_query = """
    mutation TriggerBoltRun($slug: String, $branch: String, $prNumber: Int) {
        triggerBoltRun(slug: $slug, branch: $branch, prNumber: $prNumber) {
            runId
        }
    }
    """

    variables = {
        "slug": "flowing-pachy-wyy4fs",
        "branch": "feature-branch-123",
        "prNumber": 123
    }

    response = requests.post(
        api_endpoint,
        json={
            "query": graphql_query,
            "variables": variables
        },
        headers={
            "Content-Type": "application/json",
            "Authorization": f"Bearer {api_token}",
            "X-Paradime-Workspace": workspace_uid,
        }
    )

    print(response.json())
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={"system"}
    curl -X POST <YOUR_API_ENDPOINT> \
      -H "Content-Type: application/json" \
      -H "Authorization: Bearer <YOUR_API_TOKEN>" \
      -H "X-Paradime-Workspace: <YOUR_WORKSPACE_UID>" \
      -d '{
        "query": "mutation TriggerBoltRun($slug: String, $branch: String, $prNumber: Int) { triggerBoltRun(slug: $slug, branch: $branch, prNumber: $prNumber) { runId } }",
        "variables": {
          "slug": "flowing-pachy-wyy4fs",
          "branch": "feature-branch-123",
          "prNumber": 123
        }
      }'
    ```
  </Tab>
</Tabs>

<Accordion title="Example response">
  ```json theme={"system"}
  {
    "data": {
      "triggerBoltRun": {
        "runId": 15477
      }
    }
  }
  ```
</Accordion>

### Trigger a Bolt run with a reason

This endpoint enables you to trigger a Bolt schedule with a freeform `reason` describing why or from where the run was triggered (e.g. the application that made the call). The reason is stored with the run for context and auditing.

<Tabs>
  <Tab title="GraphQL">
    ```python theme={"system"}
    import os
    import requests

    # API credentials
    api_endpoint = "<YOUR_API_ENDPOINT>"
    api_token = "<YOUR_API_TOKEN>"          # account API key (starts with prdm_cmp_)
    workspace_uid = "<YOUR_WORKSPACE_UID>"

    graphql_query = """
    mutation TriggerBoltRun($slug: String, $reason: String) {
        triggerBoltRun(slug: $slug, reason: $reason) {
            runId
        }
    }
    """

    variables = {
        "slug": "flowing-pachy-wyy4fs",
        "reason": "triggered by data-quality-bot"
    }

    response = requests.post(
        api_endpoint,
        json={
            "query": graphql_query,
            "variables": variables
        },
        headers={
            "Content-Type": "application/json",
            "Authorization": f"Bearer {api_token}",
            "X-Paradime-Workspace": workspace_uid,
        }
    )

    print(response.json())
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={"system"}
    curl -X POST <YOUR_API_ENDPOINT> \
      -H "Content-Type: application/json" \
      -H "Authorization: Bearer <YOUR_API_TOKEN>" \
      -H "X-Paradime-Workspace: <YOUR_WORKSPACE_UID>" \
      -d '{
        "query": "mutation TriggerBoltRun($slug: String, $reason: String) { triggerBoltRun(slug: $slug, reason: $reason) { runId } }",
        "variables": {
          "slug": "flowing-pachy-wyy4fs",
          "reason": "triggered by data-quality-bot"
        }
      }'
    ```
  </Tab>
</Tabs>

<Accordion title="Example response">
  ```json theme={"system"}
  {
    "data": {
      "triggerBoltRun": {
        "runId": 15477
      }
    }
  }
  ```
</Accordion>

### Cancel a Bolt run

This endpoint will enable you to cancel a Bolt run by passing the `runID` of a Bolt schedule.

**Example Request**

<Tabs>
  <Tab title="GraphQL">
    ```python theme={"system"}
    import requests
    import os

    # API credentials
    api_endpoint = "<YOUR_API_ENDPOINT>"
    api_token = "<YOUR_API_TOKEN>"          # account API key (starts with prdm_cmp_)
    workspace_uid = "<YOUR_WORKSPACE_UID>"

    graphql_query = """
    mutation CancelBoltRun {
        cancelBoltRun(scheduleRunId: 15507) {
            ok
        }
    }
      """
      
    response = requests.post(api_endpoint, json={"query": graphql_query}, headers={
          "Content-Type": "application/json",
          "Authorization": f"Bearer {api_token}",
          "X-Paradime-Workspace": workspace_uid,
      })

    print(response.json())
      
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={"system"}
    curl -X POST "<YOUR_API_ENDPOINT>" \
         -H "Content-Type: application/json" \
         -H "Authorization: Bearer <YOUR_API_TOKEN>" \
         -H "X-Paradime-Workspace: <YOUR_WORKSPACE_UID>" \
         -d '{
           "query": "mutation CancelBoltRun($scheduleRunId: Int!) { cancelBoltRun(scheduleRunId: $scheduleRunId) { ok } }",
           "variables": {
             "scheduleRunId": 15507
           }
         }'
    ```
  </Tab>
</Tabs>

<Accordion title="Example response">
  ```json theme={"system"}
  {
    "data": {
      "cancelBoltRun": {
        "ok": true
      }
    }
  }
  ```
</Accordion>

### Retry a Bolt Run

**Retry the latest failed run of a schedule by slug**

This endpoint will enable you to retry the **latest failed run** of a Bolt schedule by passing only the schedule `slug` — no run ID required. The retry resumes from the failed command of the most recent run of the schedule. The first failed dbt command is automatically substituted with `dbt retry` when supported. Infrastructure commands (`git clone`, `dbt deps`) are skipped — they run automatically on every Bolt run.

A new Bolt run is created and its `runId` is returned. The original failed run is unchanged.

**Example Request**

<Tabs>
  <Tab title="GraphQL">
    ```python theme={"system"}
    import requests
    import os

    # API credentials
    api_endpoint = "<YOUR_API_ENDPOINT>"
    api_token = "<YOUR_API_TOKEN>"          # account API key (starts with prdm_cmp_)
    workspace_uid = "<YOUR_WORKSPACE_UID>"

    graphql_query = """
    mutation RetryBoltRunFromFailure {
        retryBoltRunFromFailure(slug: "flowing-pachy-wyy4fs") {
            runId
        }
    }
      """

    response = requests.post(api_endpoint, json={"query": graphql_query}, headers={
          "Content-Type": "application/json",
          "Authorization": f"Bearer {api_token}",
          "X-Paradime-Workspace": workspace_uid,
      })

    print(response.json())
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={"system"}
    curl -X POST "<YOUR_API_ENDPOINT>" \
         -H "Content-Type: application/json" \
         -H "Authorization: Bearer <YOUR_API_TOKEN>" \
         -H "X-Paradime-Workspace: <YOUR_WORKSPACE_UID>" \
         -d '{
           "query": "mutation RetryBoltRunFromFailure($slug: String) { retryBoltRunFromFailure(slug: $slug) { runId } }",
           "variables": {
             "slug": "flowing-pachy-wyy4fs"
           }
         }'
    ```
  </Tab>
</Tabs>

<Accordion title="Example response">
  ```json theme={"system"}
  {
    "data": {
      "retryBoltRunFromFailure": {
        "runId": 15513
      }
    }
  }
  ```
</Accordion>

<Warning>
  This endpoint will return an error if:

  * the schedule has no runs yet
  * the latest run is still in progress
  * the latest run has no commands to retry
  * all commands in the latest run succeeded — in this case, there is nothing to retry.
</Warning>

### **Retry a failed Bolt run by ID (failed commands only)**

This endpoint will enable you to retry a failed Bolt run by re-running **only the failed commands**. The first failed dbt command is automatically substituted with `dbt retry` when supported, re-running just the failed models. Infrastructure commands (`git clone`, `dbt deps`) are skipped — they run automatically on every Bolt run.

A new Bolt run is created and its `runId` is returned. The original failed run is unchanged.

**Example Request**

<Tabs>
  <Tab title="GraphQL">
    ```python theme={"system"}
    import requests
    import os

    # API credentials
    api_endpoint = "<YOUR_API_ENDPOINT>"
    api_token = "<YOUR_API_TOKEN>"          # account API key (starts with prdm_cmp_)
    workspace_uid = "<YOUR_WORKSPACE_UID>"

    graphql_query = """
    mutation RetryBoltRun {
        retryBoltRun(scheduleRunId: 15509) {
            ok
            runId
        }
    }
      """

    response = requests.post(api_endpoint, json={"query": graphql_query}, headers={
          "Content-Type": "application/json",
          "Authorization": f"Bearer {api_token}",
          "X-Paradime-Workspace": workspace_uid,
      })

    print(response.json())
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={"system"}
    curl -X POST "<YOUR_API_ENDPOINT>" \
         -H "Content-Type: application/json" \
         -H "Authorization: Bearer <YOUR_API_TOKEN>" \
         -H "X-Paradime-Workspace: <YOUR_WORKSPACE_UID>" \
         -d '{
           "query": "mutation RetryBoltRun($scheduleRunId: Int!) { retryBoltRun(scheduleRunId: $scheduleRunId) { ok runId } }",
           "variables": {
             "scheduleRunId": 15509
           }
         }'
    ```
  </Tab>
</Tabs>

<Accordion title="Example response">
  ```json theme={"system"}
  {
    "data": {
      "retryBoltRun": {
        "ok": true,
        "runId": 15511
      }
    }
  }
  ```
</Accordion>

<Warning>
  This endpoint will return an error if:

  * the original run is still in progress (`Cannot retry a run that is still in progress`)
  * the original run has no commands to retry (`Schedule run has no commands to retry`)
  * all original commands succeeded (`All commands were successful, nothing to retry`)
  * only infrastructure commands (`git clone`, `dbt deps`) failed — in this case, trigger the original schedule again instead.
</Warning>

### **Retry a Bolt run by ID (all commands)**

This endpoint will enable you to retry a Bolt run by re-running **every** original command verbatim, regardless of which ones succeeded or failed. Infrastructure commands (`git clone`, `dbt deps`) are excluded — they run automatically on every Bolt run.

A new Bolt run is created and its `runId` is returned. The original run is unchanged.

**Example Request**

<Tabs>
  <Tab title="GraphQL">
    ```python theme={"system"}
    import requests
    import os

    # API credentials
    api_endpoint = "<YOUR_API_ENDPOINT>"
    api_token = "<YOUR_API_TOKEN>"          # account API key (starts with prdm_cmp_)
    workspace_uid = "<YOUR_WORKSPACE_UID>"

    graphql_query = """
    mutation RetryAllBoltRun {
        retryAllBoltRun(scheduleRunId: 15509) {
            ok
            runId
        }
    }
      """

    response = requests.post(api_endpoint, json={"query": graphql_query}, headers={
          "Content-Type": "application/json",
          "Authorization": f"Bearer {api_token}",
          "X-Paradime-Workspace": workspace_uid,
      })

    print(response.json())
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={"system"}
    curl -X POST "<YOUR_API_ENDPOINT>" \
         -H "Content-Type: application/json" \
         -H "Authorization: Bearer <YOUR_API_TOKEN>" \
         -H "X-Paradime-Workspace: <YOUR_WORKSPACE_UID>" \
         -d '{
           "query": "mutation RetryAllBoltRun($scheduleRunId: Int!) { retryAllBoltRun(scheduleRunId: $scheduleRunId) { ok runId } }",
           "variables": {
             "scheduleRunId": 15509
           }
         }'
    ```
  </Tab>
</Tabs>

<Accordion title="Example response">
  ```json theme={"system"}
  {
    "data": {
      "retryAllBoltRun": {
        "ok": true,
        "runId": 15512
      }
    }
  }
  ```
</Accordion>

### Get Bolt run status

This endpoint will enable you to check the status of a Bolt run run by passing the `runID`.

**Example Request**

<Tabs>
  <Tab title="GraphQL">
    ```python theme={"system"}
    import requests
    import os

    # API credentials
    api_endpoint = "<YOUR_API_ENDPOINT>"
    api_token = "<YOUR_API_TOKEN>"          # account API key (starts with prdm_cmp_)
    workspace_uid = "<YOUR_WORKSPACE_UID>"

    graphql_query = """
    query BoltRunStatus {
        boltRunStatus(runId: 15509) {
            ok
            state
            commands {
                id
                command
                startDttm
                endDttm
                stdout
                stderr
                returnCode
            }
        }
    }
      """
      
    response = requests.post(api_endpoint, json={"query": graphql_query}, headers={
          "Content-Type": "application/json",
          "Authorization": f"Bearer {api_token}",
          "X-Paradime-Workspace": workspace_uid,
      })

    print(response.json())
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={"system"}
    curl -X POST "<YOUR_API_ENDPOINT>" \
         -H "Content-Type: application/json" \
         -H "Authorization: Bearer <YOUR_API_TOKEN>" \
         -H "X-Paradime-Workspace: <YOUR_WORKSPACE_UID>" \
         -d '{
           "query": "query BoltRunStatus($runId: Int!) { boltRunStatus(runId: $runId) { ok state commands { id command startDttm endDttm stdout stderr returnCode } } }",
           "variables": {
             "runId": 15509
           }
         }'
    ```
  </Tab>
</Tabs>

<Accordion title="Example response">
  ```json theme={"system"}
  {
    "data": {
      "boltRunStatus": {
        "ok": true,
        "state": "ERROR",
        "commands": [
          {
            "id": 59241,
            "command": "dbt test",
            "startDttm": "2024-08-27 22:59:01.476387",
            "endDttm": "2024-08-27 22:59:11.323692",
            "stdout": "the command logs",
            "stderr": "the command logs",
            "returnCode": 1
          },
          {
            "id": 59239,
            "command": "git clone ...",
            "startDttm": "2024-08-27 22:58:57.738046",
            "endDttm": "2024-08-27 22:58:59.135456",
            "stdout": "",
            "stderr": "the command logs",
            "returnCode": -10
          },
          {
            "id": 59240,
            "command": "dbt deps",
            "startDttm": "2024-08-27 22:58:59.234308",
            "endDttm": "2024-08-27 22:59:01.468001",
            "stdout": "the command logs",
            "stderr": "the command logs",
            "returnCode": -10
          }
        ]
      }
    }
  }
  ```
</Accordion>

### Get Bolt command details

This endpoint will enable you to extract for a given command all the related details including raw error logs by passing a `commandId`. This is normally used in conjunction with the Paradime Webhooks.

**Example Request**

<Tabs>
  <Tab title="GraphQL">
    ```python theme={"system"}
    import requests
    import os

    # API credentials
    api_endpoint = "<YOUR_API_ENDPOINT>"
    api_token = "<YOUR_API_TOKEN>"          # account API key (starts with prdm_cmp_)
    workspace_uid = "<YOUR_WORKSPACE_UID>"

    graphql_query = """
    query BoltCommand {
        boltCommand(commandId: 59241) {
            command
            startDttm
            endDttm
            stdout
            stderr
            returnCode
            scheduleRunId
            resources {
                id
                path
            }
            ok
        }
    }
      """
      
    response = requests.post(api_endpoint, json={"query": graphql_query}, headers={
          "Content-Type": "application/json",
          "Authorization": f"Bearer {api_token}",
          "X-Paradime-Workspace": workspace_uid,
      })

    print(response.json())
      
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={"system"}
    curl -X POST "<YOUR_API_ENDPOINT>" \
         -H "Content-Type: application/json" \
         -H "Authorization: Bearer <YOUR_API_TOKEN>" \
         -H "X-Paradime-Workspace: <YOUR_WORKSPACE_UID>" \
         -d '{
           "query": "query BoltCommand($commandId: Int!) { boltCommand(commandId: $commandId) { command startDttm endDttm stdout stderr returnCode scheduleRunId resources { id path } ok } }",
           "variables": {
             "commandId": 59241
           }
         }'
    ```
  </Tab>
</Tabs>

<Accordion title="Example response">
  ```json theme={"system"}
  {
    "data": {
      "boltCommand": {
        "command": "dbt test",
        "startDttm": "2024-08-27 22:59:01.476387",
        "endDttm": "2024-08-27 22:59:11.323692",
        "stdout": "your command log",
        "stderr": "your command log",
        "returnCode": 1,
        "scheduleRunId": 15509,
        "resources": [
          {"id": 306227, "path": "target/partial_parse.msgpack"},
          {"id": 306228, "path": "target/manifest.json"},
          {"id": 306229, "path": "target/semantic_manifest.json"},
          {"id": 306230, "path": "target/graph_summary.json"},
          {"id": 306231, "path": "target/graph.gpickle"},
          {"id": 306232, "path": "target/compiled/demo_sales_project/data/schema.yml/not_null_customer_conversions_revenue.sql"},
          {"id": 306233, "path": "target/compiled/demo_sales_project/data/schema.yml/not_null_customer_conversions_converted_at.sql"},
          {"id": 306234, "path": "target/compiled/demo_sales_project/data/schema.yml/not_null_customer_conversions_customer_id.sql"},
          {"id": 306235, "path": "target/compiled/demo_sales_project/data/schema.yml/not_null_sessions_customer_id.sql"},
          {"id": 306236, "path": "target/compiled/demo_sales_project/data/schema.yml/not_null_sessions_ended_at.sql"},
          {"id": 306237, "path": "target/compiled/demo_sales_project/data/schema.yml/not_null_sessions_started_at.sql"},
          {"id": 306238, "path": "target/compiled/demo_sales_project/data/schema.yml/unique_customer_conversions_customer_id.sql"},
          {"id": 306239, "path": "target/compiled/demo_sales_project/models/staging/schema.yml/accepted_values_stg_payments_c7909fb19b1f0177c2bf99c7912f06ef.sql"},
          {"id": 306240, "path": "target/compiled/demo_sales_project/models/staging/schema.yml/accepted_values_stg_orders_status__placed.sql"},
          {"id": 306241, "path": "target/compiled/demo_sales_project/models/staging/schema.yml/not_null_stg_payments_payment_id.sql"},
          {"id": 306242, "path": "target/compiled/demo_sales_project/models/staging/schema.yml/not_null_stg_customers_customer_id.sql"},
          {"id": 306243, "path": "target/compiled/demo_sales_project/models/staging/schema.yml/unique_stg_customers_customer_id.sql"},
          {"id": 306244, "path": "target/compiled/demo_sales_project/models/staging/schema.yml/unique_stg_payments_payment_id.sql"},
          {"id": 306245, "path": "target/compiled/demo_sales_project/models/marts/core/schema.yml/accepted_values_order_items_7244335ae3a9655e09872a7a5b8cb110.sql"},
          {"id": 306246, "path": "target/compiled/demo_sales_project/models/marts/core/schema.yml/not_null_order_items_amount.sql"},
          {"id": 306247, "path": "target/compiled/demo_sales_project/models/marts/core/schema.yml/not_null_order_items_coupon_amount.sql"},
          {"id": 306248, "path": "target/compiled/demo_sales_project/models/marts/core/schema.yml/not_null_order_items_bank_transfer_amount.sql"},
          {"id": 306249, "path": "target/compiled/demo_sales_project/models/marts/core/schema.yml/not_null_order_items_credit_card_amount.sql"},
          {"id": 306250, "path": "target/compiled/demo_sales_project/models/marts/core/schema.yml/not_null_order_items_customer_id.sql"},
          {"id": 306251, "path": "target/compiled/demo_sales_project/models/marts/core/schema.yml/not_null_order_items_order_id.sql"},
          {"id": 306252, "path": "target/compiled/demo_sales_project/models/marts/core/schema.yml/not_null_order_items_gift_card_amount.sql"},
          {"id": 306253, "path": "target/compiled/demo_sales_project/models/marts/core/schema.yml/unique_order_items_order_id.sql"},
          {"id": 306254, "path": "target/compiled/demo_sales_project/models/marts/core/intermediate/schema.yml/accepted_values_order_payments_b6878290bdd2ef4d6ef0513a1d8fdbbc.sql"},
          {"id": 306255, "path": "target/compiled/demo_sales_project/models/marts/core/intermediate/schema.yml/not_null_order_payments_payment_id.sql"},
          {"id": 306256, "path": "target/compiled/demo_sales_project/models/marts/core/intermediate/schema.yml/relationships_order_payments_1c8c3f46d5739a85e060a829410bf06d.sql"},
          {"id": 306257, "path": "target/compiled/demo_sales_project/models/marts/core/intermediate/schema.yml/unique_order_payments_payment_id.sql"},
          {"id": 306258, "path": "target/compiled/demo_sales_project/tests/assert_total_payment_amount_is_positive.sql"},
          {"id": 306259, "path": "target/run/demo_sales_project/data/schema.yml/not_null_customer_conversions_converted_at.sql"},
          {"id": 306260, "path": "target/run/demo_sales_project/data/schema.yml/not_null_customer_conversions_revenue.sql"},
          {"id": 306261, "path": "target/run/demo_sales_project/data/schema.yml/not_null_customer_conversions_customer_id.sql"},
          {"id": 306262, "path": "target/run/demo_sales_project/data/schema.yml/not_null_sessions_customer_id.sql"},
          {"id": 306263, "path": "target/run/demo_sales_project/data/schema.yml/not_null_sessions_ended_at.sql"},
          {"id": 306264, "path": "target/run/demo_sales_project/data/schema.yml/not_null_sessions_started_at.sql"},
          {"id": 306265, "path": "target/run/demo_sales_project/data/schema.yml/unique_customer_conversions_customer_id.sql"},
          {"id": 306266, "path": "target/run/demo_sales_project/tests/assert_total_payment_amount_is_positive.sql"},
          {"id": 306267, "path": "target/run/demo_sales_project/models/staging/schema.yml/accepted_values_stg_payments_c7909fb19b1f0177c2bf99c7912f06ef.sql"},
          {"id": 306268, "path": "target/run/demo_sales_project/models/staging/schema.yml/accepted_values_stg_orders_status__placed.sql"},
          {"id": 306269, "path": "target/run/demo_sales_project/models/staging/schema.yml/not_null_stg_payments_payment_id.sql"},
          {"id": 306270, "path": "target/run/demo_sales_project/models/staging/schema.yml/not_null_stg_customers_customer_id.sql"},
          {"id": 306271, "path": "target/run/demo_sales_project/models/staging/schema.yml/unique_stg_customers_customer_id.sql"},
          {"id": 306272, "path": "target/run/demo_sales_project/models/staging/schema.yml/unique_stg_payments_payment_id.sql"},
          {"id": 306273, "path": "target/run/demo_sales_project/models/marts/core/schema.yml/accepted_values_order_items_7244335ae3a9655e09872a7a5b8cb110.sql"},
          {"id": 306274, "path": "target/run/demo_sales_project/models/marts/core/schema.yml/not_null_order_items_amount.sql"},
          {"id": 306275, "path": "target/run/demo_sales_project/models/marts/core/schema.yml/not_null_order_items_coupon_amount.sql"},
          {"id": 306276, "path": "target/run/demo_sales_project/models/marts/core/schema.yml/not_null_order_items_bank_transfer_amount.sql"},
          {"id": 306277, "path": "target/run/demo_sales_project/models/marts/core/schema.yml/not_null_order_items_credit_card_amount.sql"},
          {"id": 306278, "path": "target/run/demo_sales_project/models/marts/core/schema.yml/not_null_order_items_customer_id.sql"},
          {"id": 306279, "path": "target/run/demo_sales_project/models/marts/core/schema.yml/not_null_order_items_gift_card_amount.sql"},
          {"id": 306280, "path": "target/run/demo_sales_project/models/marts/core/schema.yml/not_null_order_items_order_id.sql"},
          {"id": 306281, "path": "target/run/demo_sales_project/models/marts/core/schema.yml/unique_order_items_order_id.sql"},
          {"id": 306282, "path": "target/run/demo_sales_project/models/marts/core/intermediate/schema.yml/accepted_values_order_payments_b6878290bdd2ef4d6ef0513a1d8fdbbc.sql"},
          {"id": 306283, "path": "target/run/demo_sales_project/models/marts/core/intermediate/schema.yml/not_null_order_payments_payment_id.sql"},
          {"id": 306284, "path": "target/run/demo_sales_project/models/marts/core/intermediate/schema.yml/relationships_order_payments_1c8c3f46d5739a85e060a829410bf06d.sql"},
          {"id": 306285, "path": "target/run/demo_sales_project/models/marts/core/intermediate/schema.yml/unique_order_payments_payment_id.sql"},
          {"id": 306286, "path": "target/run_results.json"},
          {"id": 306287, "path": "logs/dbt.log"}
        ],
        "ok": true
      }
    }
  }
  ```
</Accordion>

### **Get Bolt command live logs**

This endpoint streams stdout and stderr for a Bolt command **while it is still running** — useful for tailing a run in real time rather than waiting for it to finish and reading the final logs from `boltCommand`.

The query is cursor-paginated:

* Pass `cursor: "0:0"` on the first call to fetch from the beginning of the command's output.
* Each response includes a new `cursor` — pass it back into the next call to fetch only new lines.
* When the command finishes, `finished` returns `true`. Stop polling.
* Each line carries a `stream` field of either `STDOUT` or `STDERR`. Within a batch, `STDOUT` lines precede `STDERR` lines — true cross-stream ordering is not recorded.

**Example Request**

<Tabs>
  <Tab title="GraphQL">
    ```python theme={"system"}
    import time
    import requests

    # API credentials
    api_endpoint = "<YOUR_API_ENDPOINT>"
    api_token = "<YOUR_API_TOKEN>"          # account API key (starts with prdm_cmp_)
    workspace_uid = "<YOUR_WORKSPACE_UID>"

    graphql_query = """
    query BoltCommandLogs($commandId: Int!, $cursor: String) {
        boltCommandLogs(commandId: $commandId, cursor: $cursor) {
            lines {
                stream
                line
            }
            cursor
            finished
        }
    }
    """

    headers = {
        "Content-Type": "application/json",
        "Authorization": f"Bearer {api_token}",
        "X-Paradime-Workspace": workspace_uid,
    }

    cursor = "0:0"
    while True:
        response = requests.post(
            api_endpoint,
            json={
                "query": graphql_query,
                "variables": {"commandId": 59241, "cursor": cursor},
            },
            headers=headers,
        )
        batch = response.json()["data"]["boltCommandLogs"]

        for entry in batch["lines"]:
            print(f"[{entry['stream'].lower()}] {entry['line']}", end="")

        if batch["finished"]:
            break

        cursor = batch["cursor"]
        if not batch["lines"]:
            time.sleep(2)
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={"system"}
    curl -X POST "<YOUR_API_ENDPOINT>" \
         -H "Content-Type: application/json" \
         -H "Authorization: Bearer <YOUR_API_TOKEN>" \
         -H "X-Paradime-Workspace: <YOUR_WORKSPACE_UID>" \
         -d '{
           "query": "query BoltCommandLogs($commandId: Int!, $cursor: String) { boltCommandLogs(commandId: $commandId, cursor: $cursor) { lines { stream line } cursor finished } }",
           "variables": {
             "commandId": 59241,
             "cursor": "0:0"
           }
         }'
    ```
  </Tab>
</Tabs>

<Accordion title="Example response">
  ```json theme={"system"}
  {
    "data": {
      "boltCommandLogs": {
        "lines": [
          {"stream": "STDOUT", "line": "Running with dbt=1.7.4\n"},
          {"stream": "STDOUT", "line": "Found 24 models, 12 tests, 4 sources\n"},
          {"stream": "STDOUT", "line": "1 of 24 START sql table model dbt_prod.stg_orders ... [RUN]\n"},
          {"stream": "STDERR", "line": "WARNING: Stale manifest detected\n"}
        ],
        "cursor": "12:3",
        "finished": false
      }
    }
  }
  ```

  When the command has exited, the response looks like:

  ```json theme={"system"}
  {
    "data": {
      "boltCommandLogs": {
        "lines": [
          {"stream": "STDOUT", "line": "Completed successfully\n"}
        ],
        "cursor": "32:3",
        "finished": true
      }
    }
  }
  ```
</Accordion>

### Get Bolt command resource URL

This endpoint will enable you to extract for a given command the related resource generated by the execution of the command, for example the `run_results.json` or the `manifest.json` by passing a `resourceId`. This is normally used in conjunction with the Paradime Webhooks.

**Example Request**

<Tabs>
  <Tab title="GraphQL">
    ```python theme={"system"}
    import requests
    import os

    # API credentials
    api_endpoint = "<YOUR_API_ENDPOINT>"
    api_token = "<YOUR_API_TOKEN>"          # account API key (starts with prdm_cmp_)
    workspace_uid = "<YOUR_WORKSPACE_UID>"

    graphql_query = """
    query BoltResourceUrl {
        boltResourceUrl(resourceId: 306228) {
            ok
            url
        }
    }
      """
      
    response = requests.post(api_endpoint, json={"query": graphql_query}, headers={
          "Content-Type": "application/json",
          "Authorization": f"Bearer {api_token}",
          "X-Paradime-Workspace": workspace_uid,
      })

    print(response.json())
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={"system"}
    curl -X POST "<YOUR_API_ENDPOINT>" \
         -H "Content-Type: application/json" \
         -H "Authorization: Bearer <YOUR_API_TOKEN>" \
         -H "X-Paradime-Workspace: <YOUR_WORKSPACE_UID>" \
         -d '{
           "query": "query BoltResourceUrl($resourceId: Int!) { boltResourceUrl(resourceId: $resourceId) { ok url } }",
           "variables": {
             "resourceId": 306228
           }
         }'
    ```
  </Tab>
</Tabs>

<Accordion title="Example response">
  ```json theme={"system"}
  {
    "data": {
      "boltResourceUrl": {
        "ok": true,
        "url": "the url to the resource e.g. manifest.json"
      }
    }
  }
  ```
</Accordion>

### Create a Bolt schedule

This mutation creates a new Bolt schedule and returns its `slug`. The slug is the identifier you pass to every other Bolt endpoint (`triggerBoltRun`, `boltScheduleName`, `deleteBoltSchedule`, etc.).

The required input fields are `name`, `schedule`, `environment`, and `commands`. The `BoltScheduleInput` type also supports a wide set of optional fields (`gitBranch`, `description`, `timezone`, `ownerEmail`, `suspended`, `slaSeconds`, `triggerOnMerge`) plus nested objects for notifications, third-party incident integrations, the self-healing agent, Turbo CI / deferred-schedule config, parent-schedule triggers, and environment-variable overrides.

<Warning>
  There is a short consistency window (\~10s) between schedule creation and the trigger path accepting the new slug. Clients that immediately call `triggerBoltRun` on a brand-new slug may need to retry for a few seconds.
</Warning>

**Minimal create**

**Example Request**

<Tabs>
  <Tab title="GraphQL">
    ```python theme={"system"}
    import requests

    api_endpoint = "<YOUR_API_ENDPOINT>"
    api_token = "<YOUR_API_TOKEN>"          # account API key (starts with prdm_cmp_)
    workspace_uid = "<YOUR_WORKSPACE_UID>"

    graphql_query = """
    mutation CreateBoltSchedule($schedule: BoltScheduleInput!) {
        createBoltSchedule(schedule: $schedule) {
            ok
            slug
            name
        }
    }
    """

    variables = {
        "schedule": {
            "name": "Nightly build",
            "schedule": "0 1 * * *",
            "environment": "production",
            "commands": ["dbt build"]
        }
    }

    response = requests.post(
        api_endpoint,
        json={"query": graphql_query, "variables": variables},
        headers={
            "Content-Type": "application/json",
            "Authorization": f"Bearer {api_token}",
            "X-Paradime-Workspace": workspace_uid,
        },
    )

    print(response.json())
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={"system"}
    curl -X POST "<YOUR_API_ENDPOINT>" \
         -H "Content-Type: application/json" \
         -H "Authorization: Bearer <YOUR_API_TOKEN>" \
         -H "X-Paradime-Workspace: <YOUR_WORKSPACE_UID>" \
         -d '{
           "query": "mutation CreateBoltSchedule($schedule: BoltScheduleInput!) { createBoltSchedule(schedule: $schedule) { ok slug name } }",
           "variables": {
             "schedule": {
               "name": "Nightly build",
               "schedule": "0 1 * * *",
               "environment": "production",
               "commands": ["dbt build"]
             }
           }
         }'
    ```
  </Tab>
</Tabs>

<Accordion title="Example response">
  ```json theme={"system"}
  {
    "data": {
      "createBoltSchedule": {
        "ok": true,
        "slug": "nightly-build-a1b2c3",
        "name": "Nightly build"
      }
    }
  }
  ```
</Accordion>

### **Create with notifications, env vars, and self-healing**

The same mutation, with the optional nested objects populated.

**Example Request**

<Tabs>
  <Tab title="GraphQL">
    ```python theme={"system"}
    import requests

    api_endpoint = "<YOUR_API_ENDPOINT>"
    api_token = "<YOUR_API_TOKEN>"          # account API key (starts with prdm_cmp_)
    workspace_uid = "<YOUR_WORKSPACE_UID>"

    graphql_query = """
    mutation CreateBoltSchedule($schedule: BoltScheduleInput!) {
        createBoltSchedule(schedule: $schedule) {
            ok
            slug
            name
        }
    }
    """

    variables = {
        "schedule": {
            "name": "Nightly build",
            "schedule": "0 1 * * *",
            "environment": "production",
            "commands": ["dbt build"],
            "gitBranch": "main",
            "description": "Nightly run of the production warehouse build.",
            "timezone": "UTC",
            "notifications": {
                "slackNotifications": [
                    {"channel": "#data-alerts", "events": ["failed"]}
                ],
                "emailNotifications": [
                    {"channel": "ops@example.com", "events": ["failed", "passed"]}
                ]
            },
            "selfHealing": {
                "enabled": True,
                "slackChannel": "#data-alerts"
            },
            "envVars": [
                {"key": "DBT_PROFILES_DIR", "value": "/workspace/profiles"},
                {"key": "DBT_TARGET", "value": "prod"}
            ]
        }
    }

    response = requests.post(
        api_endpoint,
        json={"query": graphql_query, "variables": variables},
        headers={
            "Content-Type": "application/json",
            "Authorization": f"Bearer {api_token}",
            "X-Paradime-Workspace": workspace_uid,
        },
    )

    print(response.json())
    ```
  </Tab>
</Tabs>

### Suspend or resume a Bolt schedule

This mutation suspends or resumes a Bolt schedule by `slug`. Pass `suspend: true` to suspend the schedule (pausing its time-based runs) or `suspend: false` to resume it.

**Example Request**

<Tabs>
  <Tab title="GraphQL">
    ```python theme={"system"}
    import requests

    api_endpoint = "<YOUR_API_ENDPOINT>"
    api_token = "<YOUR_API_TOKEN>"          # account API key (starts with prdm_cmp_)
    workspace_uid = "<YOUR_WORKSPACE_UID>"

    graphql_query = """
    mutation SuspendBoltSchedule($slug: String, $suspend: Boolean!) {
        suspendBoltSchedule(slug: $slug, suspend: $suspend) {
            ok
        }
    }
    """

    variables = {"slug": "flowing-pachy-wyy4fs", "suspend": True}

    response = requests.post(
        api_endpoint,
        json={"query": graphql_query, "variables": variables},
        headers={
            "Content-Type": "application/json",
            "Authorization": f"Bearer {api_token}",
            "X-Paradime-Workspace": workspace_uid,
        },
    )

    print(response.json())
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={"system"}
    curl -X POST "<YOUR_API_ENDPOINT>" \
         -H "Content-Type: application/json" \
         -H "Authorization: Bearer <YOUR_API_TOKEN>" \
         -H "X-Paradime-Workspace: <YOUR_WORKSPACE_UID>" \
         -d '{
           "query": "mutation SuspendBoltSchedule($slug: String, $suspend: Boolean!) { suspendBoltSchedule(slug: $slug, suspend: $suspend) { ok } }",
           "variables": {
             "slug": "flowing-pachy-wyy4fs",
             "suspend": true
           }
         }'
    ```
  </Tab>
</Tabs>

<Accordion title="Example response">
  ```json theme={"system"}
  {
    "data": {
      "suspendBoltSchedule": {
        "ok": true
      }
    }
  }
  ```
</Accordion>

### Delete a Bolt schedule

This mutation deletes a Bolt schedule by `slug`. Schedules defined in YAML cannot be deleted via the API — remove them from the repository instead.

**Example Request**

<Tabs>
  <Tab title="GraphQL">
    ```python theme={"system"}
    import requests

    api_endpoint = "<YOUR_API_ENDPOINT>"
    api_token = "<YOUR_API_TOKEN>"          # account API key (starts with prdm_cmp_)
    workspace_uid = "<YOUR_WORKSPACE_UID>"

    graphql_query = """
    mutation DeleteBoltSchedule($slug: String!) {
        deleteBoltSchedule(slug: $slug) {
            ok
        }
    }
    """

    variables = {"slug": "nightly-build-a1b2c3"}

    response = requests.post(
        api_endpoint,
        json={"query": graphql_query, "variables": variables},
        headers={
            "Content-Type": "application/json",
            "Authorization": f"Bearer {api_token}",
            "X-Paradime-Workspace": workspace_uid,
        },
    )

    print(response.json())
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={"system"}
    curl -X POST "<YOUR_API_ENDPOINT>" \
         -H "Content-Type: application/json" \
         -H "Authorization: Bearer <YOUR_API_TOKEN>" \
         -H "X-Paradime-Workspace: <YOUR_WORKSPACE_UID>" \
         -d '{
           "query": "mutation DeleteBoltSchedule($slug: String!) { deleteBoltSchedule(slug: $slug) { ok } }",
           "variables": {
             "slug": "nightly-build-a1b2c3"
           }
         }'
    ```
  </Tab>
</Tabs>

<Accordion title="Example response">
  ```json theme={"system"}
  {
    "data": {
      "deleteBoltSchedule": {
        "ok": true
      }
    }
  }
  ```
</Accordion>

<Warning>
  This endpoint will return an error if the slug does not match a UI/API-created schedule in the workspace (e.g. it belongs to a YAML-defined schedule, has already been deleted, or never existed).
</Warning>


## Related topics

- [Bolt API](/products/bolt/bolt-api.md)
- [4. Trigger Types](/products/bolt/creating-schedules/trigger-types.md)
- [API Reference](/developers/graphql-api/api-reference/index.md)
- [GraphQL API](/developers/graphql-api/index.md)
- [Bolt Pipelines](/products/bolt/index.md)
