InsightWorker Logo
  • contact@verticalserve.com
Docs / Authentication / JIRA API token

JIRA API token

InsightWorker's jira_search and jira_issue tools authenticate to Atlassian Cloud via HTTP Basic auth (your email + an API token).

Step 1 — Get the API token

  1. Visit id.atlassian.com/manage-profile/security/api-tokens
  2. Click Create API token
  3. Label it insightworker so you can find it later
  4. Copy the token immediately — Atlassian shows it once

Step 2 — Configure InsightWorker

~/.insightworker/.env:

JIRA_BASE_URL=https://yourorg.atlassian.net
JIRA_EMAIL=you@yourorg.com
JIRA_API_TOKEN=<the token from step 1>

JIRA_BASE_URL should NOT have a trailing slash. Use the bare hostname your team types into a browser.

Restart the agent.

Step 3 — Verify

In the chat:

List my open JIRA issues from the active sprint.

Should return ticket keys + summaries. If you get 401 Unauthorized, double-check that JIRA_EMAIL is the email associated with your Atlassian account (not your tenant's Slack-linked alias or anything similar).

Permissions

API tokens inherit the permissions of the user who created them. The user needs read access to the projects and issues you intend to query. For most teams this is the default — if you can search for it in the JIRA UI, the token can search for it via API.

For agent apps that update issues (add comments, transition statuses), the token user needs the corresponding write permissions. We currently only ship read tools (jira_search, jira_issue); write capability is on the roadmap.

Self-hosted JIRA Server / Data Center

The token flow above is Atlassian Cloud only. Self-hosted JIRA Server / Data Center uses Personal Access Tokens via a different endpoint. Set:

JIRA_BASE_URL=https://jira.yourcompany.com
JIRA_EMAIL=  # leave blank
JIRA_API_TOKEN=<personal access token from your JIRA profile>

The agent's jira_search will route correctly when JIRA_EMAIL is empty (uses Bearer auth instead of Basic).

Rotation

Tokens don't auto-expire on Atlassian Cloud unless your org has a policy. Best practice is to rotate every ~90 days:

  1. Create a new token in the Atlassian UI
  2. Update JIRA_API_TOKEN in .env
  3. Restart the agent
  4. Delete the old token

Common gotchas

SymptomCauseFix
401 UnauthorizedEmail / token mismatchVerify JIRA_EMAIL matches the Atlassian account that issued the token
403 Forbidden on a projectPermission schemeToken user needs Browse Projects on the target project
JQL parse errorBad JQL syntaxRun the same JQL in JIRA's UI search to validate; agent passes it through unchanged
Empty results when issues existWrong project filterMany JQL queries default to "active sprint of current board"; specify project explicitly: project = ENG AND ...

See also


Source: docs/authentication/jira-api-token.md in the public repo. Open a PR with corrections.