# Trigger.dev integration

> Background jobs platform: trigger tasks and batches, inspect and replay runs, manage schedules, environment variables, queues, deployments, waitpoints and sessions.

- Authentication: apiKey

## Tools (69)

- **Abort bulk action**: Abort a pending bulk action so it stops processing additional runs. Runs already processed by the action are not undone.
- **Activate Schedule**: Activate a schedule by its ID. This will only work on `IMPERATIVE` schedules that were created in the dashboard or using the imperative SDK functions like `schedules.create()`.
- **Add tags to a run**: Adds one or more tags to a run. Runs can have a maximum of 10 tags. Duplicate tags are ignored.
- **Append Session Record**: Append one record to a session channel (in or out).
- **Batch trigger a specific task**: Batch trigger a specific task with up to 1,000 payloads. All items in the batch run the same task.
- **Batch trigger tasks**: Batch trigger tasks with up to 1,000 payloads with SDK 4.3.1+ (500 in prior versions).
- **Cancel a run**: Cancels an in-progress run. If the run is already completed, this will have no effect.
- **Close a session**: Close a session. Closing is terminal and idempotent — closing an already-closed session returns the existing row unchanged. A closed session cannot be reopened, and reusing its `externalId` on create returns `409`. Requires a secret key — a session public token cannot close a session.
- **Complete a waitpoint token**: Completes a waitpoint token, unblocking any run that is waiting for it via `wait.forToken()`. An optional `data` payload can be passed and will be returned to the waiting run. If the token is already completed, this is a no-op and returns `success: true`. This endpoint accepts both secret API keys a
- **Create a batch (phase 1)**: Phase 1 of 2-phase batch API. Creates a batch record and optionally blocks the parent run for batchTriggerAndWait. After creating a batch, stream items via POST /api/v3/batches/{batchId}/items.
- **Create a schedule**: Create a new `IMPERATIVE` schedule based on the specified options.
- **Create a session**: Create a Session and trigger its first run in one atomic call. A Session is the durable identity for a bi-directional stream of records (the `.in` and `.out` channels) that survives across the runs processing it. Idempotent on `externalId` within an environment.
- **Create a waitpoint token**: Creates a new waitpoint token that can be used to pause a run until an external event completes it. The token includes a `url` which can be called via HTTP POST to complete the waitpoint. Use the token ID with `wait.forToken()` inside a task to pause execution until the token is completed.
- **Create bulk action**: Create an asynchronous bulk action to cancel or replay runs selected by run IDs or filters.
- **Create environment variable**: Create a new environment variable for a specific project and environment.
- **Deactivate Schedule**: Deactivate a schedule by its ID. This will only work on `IMPERATIVE` schedules that were created in the dashboard or using the imperative SDK functions like `schedules.create()`.
- **Delete environment variable**: Delete a specific environment variable for a specific project and environment.
- **Delete Schedule**: Delete a schedule by its ID. This will only work on `IMPERATIVE` schedules that were created in the dashboard or using the imperative SDK functions like `schedules.create()`.
- **Drain Session Channel Records**: Fetch a batch of session channel records without holding an SSE connection.
- **Execute a TRQL query**: Execute a TRQL (Trigger.dev Query Language) query against your run data. TRQL is a SQL-style query language that allows you to analyze runs, calculate metrics, and export data.
- **Get all supported timezones**: Get all supported timezones that schedule tasks support.
- **Get deployment**: Retrieve information about a specific deployment by its ID.
- **Get latest deployment**: Retrieve information about the latest unmanaged deployment for the authenticated project.
- **Get query schema**: Get the schema for TRQL queries, including all available tables, their columns, data types, descriptions, and allowed values.
- **Ignore an error**: Mark an error group as ignored. Provide a `duration` to ignore it for a fixed window, and/or thresholds that re-surface the error when exceeded. Send a JSON body (use `{}` to ignore indefinitely).
- **List all queues**: List all queues in your environment with pagination support.
- **List all schedules**: List all schedules. You can also paginate the results.
- **List built-in dashboards**: List available built-in dashboards with their widgets. Each dashboard contains pre-built TRQL queries for common metrics like run success rates, costs, and LLM usage.
- **List bulk actions**: List bulk actions in the current environment. Bulk actions are returned newest first and can be paginated with cursor pagination.
- **List concurrency limits**: List the environment's declared concurrency limits (anonymous inline limits appear under their derived `task/<task-id>` names), with each limit's bounds and its live running and queued counts. Results are ordered by the underlying row name, so named limits sort before `task/`-derived inline limits.
- **List deployments**: List deployments for the authenticated environment, ordered by most recent first.
- **List environment variables**: List all environment variables for a specific project and environment.
- **List errors**: List error groups in a specific environment. Runs that fail are grouped by a fingerprint derived from the error type, message, and stack trace. Filter by task identifier, version, status, search text, and time range.
- **List runs**: List runs in a specific environment. You can filter the runs by status, created at, task identifier, version, and more.
- **List sessions**: List sessions in the current environment, newest first. Filter by type, tags, task identifier, external id, status, and creation window. Use cursor-based pagination with `page[after]` and `page[before]` to navigate pages. List rows omit `triggerConfig`; retrieve a single session to read it.
- **List waitpoint tokens**: Returns a paginated list of waitpoint tokens for the current environment. Results are ordered by creation date, newest first. Use cursor-based pagination with `page[after]` and `page[before]` to navigate pages.
- **Override concurrency limit**: Override a concurrency limit's bounds. Only the given fields change; the declared values are kept and restored by reset. To stop runs holding a limit, prefer the pause endpoint (it keeps the configured bounds); overriding `total` to `0` also blocks every run holding the limit.
- **Override queue concurrency limit**: Override the concurrency limit of a queue. This is useful for temporarily scaling up or down based on demand.
- **Pause or resume a concurrency limit**: Pause a concurrency limit to prevent runs holding it from starting, or resume a paused limit. Runs that are currently executing will continue to completion, and the limit's configured bounds are kept.
- **Pause or resume a queue**: Pause a queue to prevent new runs from starting, or resume a paused queue. Runs that are currently executing will continue to completion.
- **Promote deployment**: Promote a previously deployed version to be the current version for the environment. This makes the specified version active for new task runs.
- **Read Session Channel (SSE)**: Subscribe to a session channel as a Server-Sent Events stream.
- **Replay a run**: Creates a new run with the same payload and options as the original run.
- **Reschedule a delayed run**: Updates a delayed run with a new delay. Only valid when the run is in the DELAYED state.
- **Reset concurrency limit**: Reset a concurrency limit back to the values declared in your code, clearing any override.
- **Reset queue concurrency limit**: Reset the concurrency limit of a queue back to its base value defined in code.
- **Resolve an error**: Mark an error group as resolved. Optionally record the worker version that resolved it. Send a JSON body (use `{}` when you have no fields to set).
- **Retrieve a batch**: Retrieve a batch by its ID, including its status and the IDs of all runs in the batch.
- **Retrieve an error**: Retrieve detailed information about a single error group, including its lifecycle state and the worker versions it has affected.
- **Retrieve a queue**: Get a queue by its ID, or by type and name.
- **Retrieve a run**: Retrieve information about a run, including its status, payload, output, and attempts. If you authenticate with a Public API key, we will omit the payload and output fields for security reasons.
- **Retrieve a session**: Retrieve a single session by its friendly id (`session_…`) or your `externalId`. The response includes `triggerConfig` and the friendly `currentRunId` of the live run, if any.
- **Retrieve a waitpoint token**: Retrieves a waitpoint token by its ID, including its current status and output if it has been completed.
- **Retrieve batch results**: Returns the execution results of all completed runs in a batch. Only finished runs (successful or failed) are included in the items array — runs that are still executing are omitted. Returns 404 if the batch doesn't exist.
- **Retrieve bulk action**: Retrieve the status and aggregate processing counts for a bulk action.
- **Retrieve concurrency limit**: Retrieve a concurrency limit by name, with its bounds and live running and queued counts.
- **Retrieve environment variable**: Retrieve a specific environment variable for a specific project and environment.
- **Retrieve run events**: Returns all OTel span events for a run. Useful for debugging and observability.
- **Retrieve run result**: Returns the execution result of a completed run. Returns 404 if the run doesn't exist or hasn't finished yet.
- **Retrieve run trace**: Returns the OTel trace subtree for the requested run — the run's span as `rootSpan`, its ancestor chain, and its descendant spans. For child or nested runs in a large trace, this is scoped to that run rather than the trace-wide root.
- **Retrieve Schedule**: Get a schedule by its ID.
- **Stream batch items (phase 2)**: Phase 2 of 2-phase batch API. Accepts an NDJSON stream of batch items and enqueues them. Each line in the body should be a valid BatchItemNDJSON object. The stream is processed with backpressure - items are enqueued as they arrive. The batch is sealed when the stream completes successfully.
- **Trigger a task**: Trigger a task by its identifier.
- **Unresolve an error**: Move a resolved or ignored error group back to unresolved.
- **Update a session**: Update a session's `tags` or `metadata`. Pass `metadata: null` to clear it. Requires a secret key — a session public token cannot update a session. `externalId` is read-only after create: it cannot be changed or cleared. Sending a value different from the current one (including `null` when one is se
- **Update environment variable**: Update a specific environment variable for a specific project and environment.
- **Update run metadata**: Update the metadata of a run.
- **Update Schedule**: Update a schedule by its ID. This will only work on `IMPERATIVE` schedules that were created in the dashboard or using the imperative SDK functions like `schedules.create()`.
- **Upload environment variables**: Upload mulitple environment variables for a specific project and environment.

Connect Trigger.dev in General Input: https://www.generalinput.com/apps/trigger-dev