jira.js
Type-safe Jira REST API client for JavaScript and TypeScript. Supports Jira Cloud, Data Center, Agile, Service Management, Assets, Teams and organization APIs.
What is jira.js?
Type-safe Jira REST API client for JavaScript and TypeScript. Supports Jira Cloud, Data Center, Agile, Service Management, Assets, Teams and organization APIs. Runtime response validation, tree-shakable ESM, Node.js and browsers.
Overview of jira.js
What it is
jira.js is a TypeScript client for the Atlassian Jira REST APIs, supporting both Jira Cloud and self-hosted Jira Data Center. It covers the Jira Cloud platform API, Jira Agile API, Jira Service Management API, Assets API, Teams API, organization administration APIs, and Jira Data Center API. The library is ESM-only, requires Node.js 22 or newer, and works in modern browsers. It ships with type definitions and has a single runtime dependency (zod). TypeScript 5.7 or newer is required. The project is open source under the MIT license. Version 6.0 is a major rewrite; users of version 5 should read the migration guide before upgrading. The library supports OAuth 2.0 (3LO) with automatic token refresh, and can be used tree-shakable by importing individual endpoint functions. It validates responses at runtime against a schema and provides a typed error hierarchy with predicates.
Key features
- Type-safe: every endpoint, parameter and model is typed; source code ships with the package so “go to definition” works.
- Runtime validation: responses are checked against a schema; drift is reported by field.
- Promise-based: all methods use async/await.
- Tree-shakable: import a single endpoint function instead of a whole client.
- Universal: one ESM build for Node.js 22+ and modern browsers.
- One dependency: only
zod. - Typed errors with predicates that survive bundling, minification and duplicate installs.
Use cases
Integration with Jira for automation, webhook handlers, CI/CD pipelines, and browser-based tools. Building custom dashboards, issue management, sprint tracking, service desk request handling, and organization administration (users, groups, provisioning).
Getting started
bash# Using npmnpm install jira.js# Using yarnyarn add jira.js# Using pnpmpnpm add jira.jsA quick example:typescriptimport { createCloudClient } from 'jira.js';const jira = createCloudClient({ host: 'https://your-domain.atlassian.net', auth: { type: 'basic', email: '[email protected]', apiToken: 'YOUR_API_TOKEN', },});const project = await jira.projects.getProject({ projectIdOrKey: 'YOUR_PROJECT_KEY' });const issue = await jira.issues.createIssue({ fields: { summary: 'Hello Jira.js!', issuetype: { name: 'Task' }, project: { key: project.key }, },});console.log(`Issue created: ${issue.key}`);
License and pricing
The license is MIT. The pricing type is open source; no additional pricing information is stated.
Based on the project's public README and repository metadata.