{"name":"upstash-qstash-js","url":"https://skills.sh/upstash/skills/upstash-qstash-js","install":"npx skills add upstash/skills --skill upstash-qstash-js","sdk":"upstash","key":"upstash/upstash-qstash-js","description":"Work with the QStash TypeScript/JavaScript SDK for serverless messaging, scheduling. Use when publishing messages to HTTP endpoints, creating schedules, managing queues, verifying incoming messages and other QStash features in serverless environments.","hasContent":true,"content":"---\nname: upstash-qstash-js\ndescription: Work with the QStash TypeScript/JavaScript SDK for serverless messaging, scheduling. Use when publishing messages to HTTP endpoints, creating schedules, managing queues, verifying incoming messages and other QStash features in serverless environments.\n---\n\n# QStash JavaScript SDK\n\nQStash is an HTTP-based messaging and scheduling solution for serverless and edge runtimes. This skill helps you use the QStash JS SDK effectively.\n\n## When to use this skill\n\nUse this skill when:\n\n- Publishing HTTP messages to endpoints or URL groups\n- Creating scheduled or delayed message delivery\n- Managing FIFO queues with configurable parallelism\n- Verifying incoming webhook signatures from QStash\n- Implementing callbacks, DLQ handling, or message deduplication\n\n## Quick Start\n\n### Installing the SDK\n\n```bash\nnpm install @upstash/qstash\n```\n\n### Basic Publishing\n\n```typescript\nimport { Client } from \"@upstash/qstash\";\n\nconst client = new Client({\n  token: process.env.QSTASH_TOKEN!,\n});\n\nconst result = await client.publishJSON({\n  url: \"https://my-api.example.com/webhook\",\n  body: { event: \"user.created\", userId: \"123\" },\n});\n```\n\n## Core Concepts\n\nFor fundamental QStash operations, see:\n\n- [Publishing Messages](fundamentals/publishing-messages.md)\n- [Schedules](fundamentals/schedules.md)\n- [Queues and Flow Control](fundamentals/queues-and-flow-control.md)\n- [URL Groups](fundamentals/url-groups.md)\n- [Local Development](fundamentals/local-development.md) — automatic dev server via `devMode: true`\n\nFor verifying incoming messages:\n\n- [Receiver Verification](verification/receiver.md) - Core signature verification with the Receiver class\n- Platform-Specific Verifiers:\n  - [Next.js](verification/platform-specific/nextjs.md) - App Router, Pages Router, and Edge Runtime\n\nFor advanced features:\n\n- [Callbacks](advanced/callbacks.md)\n- [Dead Letter Queue (DLQ)](advanced/dlq.md)\n- [Message Deduplication](advanced/deduplication.md)\n- [Region migration & multi-region support](advanced/multi-region/summary.md)\n  - If needed, [multi-region env variable setup verification script](advanced/multi-region/verify-multi-region-setup.ts). Can be run without arguments\n\n## Platform Support\n\nQStash JS SDK works across various platforms:\n\n- Next.js (App Router and Pages Router)\n- Cloudflare Workers\n- Deno\n- Node.js (v18+)\n- Vercel Edge Runtime\n- SvelteKit, Nuxt, SolidJS, and other frameworks\n\n> **Note on Workflow SDK:** For building complex durable workflows that chain multiple QStash messages together, consider using the separate QStash Workflow SDK (`@upstash/workflow`). The Workflow SDK empowers you to orchestrate multi-step processes with automatic state management, retries, and fault tolerance. This Skills file focuses on the core QStash messaging SDK.\n\n## Best Practices\n\n- Always verify incoming QStash messages using the Receiver class\n- Use environment variables for tokens and signing keys\n- Set appropriate retry counts and timeouts for your use case\n- Use queues for ordered processing with controlled parallelism\n- Implement DLQ handling for failed message recovery\n","contentSource":"https://raw.githubusercontent.com/upstash/skills/main/skills/upstash-qstash-js/SKILL.md","contentFetchedAt":"2026-07-27T09:00:58.298Z"}