Goal
Run your first Durable Job from TypeScript.Prerequisites
- Node.js 20 or newer
- A StackShift API key
- Callback verification key and account ID
Workflow
1
Install the SDK.
2
Create a StackShift client.
3
Enqueue a job with an idempotency key.
4
Register a handler and expose an invocation route.
5
Run the app and observe the job run in StackShift.
Callback authentication
SDK 0.2.0 includes signed callback adapters. Configure the public key and account ID from the authenticated verification-key endpoint. JavaScript public routes use handleRequest; Go HTTPHandler requires Options.Verification. Set handlerUrl on the first submission to register a public HTTPS callback. Signed callbacks require the coordinated backend reliability rollout.Install the SDK
For TypeScript, install the npm package. For Go, install the public GitHub module with go get.Initialize the client
The API key is the only required credential. It authenticates the request and scopes Durable Jobs internally, so you can use the SDK from any backend, whether or not that backend is deployed on StackShift.Enqueue a job
Use an idempotency key for any job started from an API request, checkout callback, signup flow, or webhook.Add a worker handler
Run and observe
- Run your app locally or deploy it to StackShift.
- Trigger the API route that enqueues the job.
- Open the Durable Jobs run in StackShift to see status, attempts, logs, payload, and timeline.
Expected result
A job run is queued, invoked, completed, and visible in the Durable Jobs timeline.
Related guides
Using Queues
Use queues for background execution, retry policy, delayed jobs, and concurrency control.
Observability
Inspect each job run through status, attempts, logs, payload, result, errors, and timeline.