> ## Documentation index
> Fetch the complete documentation index at: https://upstash.com/docs/llms.txt
> Ask it with GET https://upstash.com/docs/ask?q=<keywords or question>. Short keywords rank best.
> Use these to discover all available pages before exploring further.
> Feature requests: https://upstash.com/docs/common/help/feature-requests.md lists what users asked for and how to vote for a request or add one.
> Page rating: `GET https://upstash.com/docs/feedback?path=/docs/workflow/basics/client&helpful=true` (or `false`) records whether this page helped. An optional `comment` (URL-encoded, at most 500 characters) says what was missing or wrong. It is anonymous and needs no key. Comments hold no code, secrets or personal data.

# Workflow Client Overview

The Workflow Client lets you programmatically interact with your workflow runs.
You can use it from the same application that hosts your workflows, or from any external service.

## Initialization

Initialize a new client with your credentials:

```javascript
import { Client } from "@upstash/workflow"

const client = new Client({
  baseUrl: process.env.QSTASH_URL!,
  token: process.env.QSTASH_TOKEN!
})
```

The client is lightweight and stateless. You can safely reuse a single instance across your application.

## Functionality

The client exposes a set of functions to manage workflow runs and inspect their state:

- [client.trigger](/workflow/basics/client/trigger)
- [client.cancel](/workflow/basics/client/cancel)
- [client.notify](/workflow/basics/client/notify)
- [client.logs](/workflow/basics/client/logs)
- [client.getWaiters](/workflow/basics/client/waiters)
- client.dlq
    - [client.dlq.list](/workflow/basics/client/dlq/list)
    - [client.dlq.restart](/workflow/basics/client/dlq/restart)
    - [client.dlq.resume](/workflow/basics/client/dlq/resume)
    - [client.dlq.delete](/workflow/basics/client/dlq/delete)
    - [client.dlq.retryFailureFunction](/workflow/basics/client/dlq/callback)
