Skip to content
Gustavo Peixoto

Dec 5, 202615 min read

A Jira API key's, in practice, an Atlassian API token: a personal credential you create for your Atlassian account and send with your email on every request, whether you're calling Jira directly or wiring it into a tool like Activepieces.

Manage Pieces modal dialog showing 315 selected pieces with a searchable list of available integrations.

Jira Cloud has no separate "Jira key" screen. Atlassian's API token documentation, checked on 2026-12-05, confirms this.

Don't expect the token to be scoped to a project or a single app. It acts as you, so anything your account can do in Jira, the token can do.

A leaked token's a leaked login for every site that account can reach, which's why storage matters more than creation.

Create your first Jira API token

  1. Sign in at id.atlassian.com with the account that can open your Jira site.
  2. Open the API tokens page under Security and choose Create API token.
  3. Name it after the job it does, such as ci-reporting, and set an expiry if the form offers one.
  4. Copy the value immediately. Atlassian won't show it again.

You need an Atlassian account with access to the Jira site and nothing else. The token gets that account's permissions, so a dedicated service account with narrow project access is the safer owner.

Test your Jira API token with /myself

Put the token in an environment variable, not in the command text:

export JIRA_API_TOKEN="paste-token-here"

curl -u [email protected]:$JIRA_API_TOKEN \
 -H "Accept: application/json" \
 https://your-domain.atlassian.net/rest/api/3/myself

If a JSON body comes back with your accountId and displayName, the token works. A 401 means the email and token don't match, or the token's been revoked or's expired.

A 404 usually means the site name in the URL's wrong. Fix those before you write any real integration code.

Activepieces takes the token you just tested as-is: it's what you paste into the connection, and Jira is one of the 751 integrations counted in its MIT-licensed open source monorepo, so a breach in any of the 751 would expose your token.

It keeps app connectors as integrations that an admin enables per project, listed with their package name and version, as the settings screen below shows.

Whichever way you call Jira, the token behind it's the same one, and everything above applies to Jira Cloud only.

Server and Data Center use personal access tokens

On self-hosted Jira, you don't use id.atlassian.com. You create a personal access token from your profile inside your own Jira instance, and you send it as a bearer token in the Authorization header, with no email.

The /myself check still works against your own host. If a Cloud-style email and token pair returns 401 there, you're using the wrong mechanism, not a wrong password.

This takes minutes, not a project: automate it in Activepieces free.

Jira API token capabilities and limitations

Your account's reach is the token's reach: every project you can open, and nothing your account can't. That's also its flaw: you can't narrow it.

A 401 means the pair's wrong; a 403 means the token works and your account lacks the permission. A new token fixes neither.

Permissions follow the account

Because a personal token has no scopes of its own, Jira checks every request against the account that created the token. So an admin's token can delete projects and a read-only user's token can't.

If that person leaves or loses a role, the token's reach changes silently. Any script using it can start failing with 403s, or quietly keep acting with more power than anyone intended.

Against the same REST API as any other mechanism, the token reaches:

  • issues
  • projects
  • users
  • search
  • comments
  • attachments
  • workflows
  • the agile boards

You get no endpoints the account couldn't call from the browser. Check Atlassian's REST reference for current paths before relying on one, since the API's versioned and Atlassian retires older endpoints.

Rate limits as Atlassian documents them

Which pool you sit in sets Jira Cloud's quota, and the figures below come from Lilach Bullock's summary.

Jira Cloud API quota by tier

Tier 1 global's 65,000 base points per hour, so a busy integration on that tier will hit 429 responses well before the hour ends if each call's costly.

Tier 2 Standard's 100,000 points, which gives you roughly half again as much room.

At Tier 2 Premium it's 130,000 plus 20 points per user, at least double Tier 1, which matters if several automations share one account. Each call spends points, so a query returning many fields costs more than a narrow one.

Look at the chart below, which shows the three pools side by side. Take from it that your plan, not your code, sets the ceiling, so budget calls before you scale.

Three tanks of different sizes with identical taps

Token versus OAuth versus Forge

Scope granularity Whose permissions apply Token lifetime Rate-limit treatment
Personal API token None; full account reach The account that created it Up to 1 year Counted against the account's pool
OAuth 2.0 (3LO) Per-scope consent The user who authorizes the app 3600 s access token, refreshed Counted per app and user
Forge/Connect app Declared in the app manifest The app, or the invoking user Managed by the platform Platform-managed

Read the table and one thing stands out: only the personal token gives up scoping entirely. The table's a summary, so verify the rate-limit cells against Atlassian's current documentation.

For anything shared or long-lived, OAuth or Forge lets you grant less. The token's the right choice for a personal script you own, and the storage and error-handling rules in the next section matter most there.

Fix Jira API 401, 403, 404, 429 errors

When a script holding a Jira token fails, it's almost always one of four status codes, and each points at a different layer: credentials, permissions, address or rate.

The table below pairs each code with its usual cause, the first thing to check and the fix, so you can triage from the status line before reading any logs.

Code Typical cause First check Fix
401 Wrong email, bad base64, revoked or expired token Does email:token encode cleanly and match the account that made the token? Re-encode, or issue a new token
403 Account lacks permission on the project Can you open that project in the browser as the same user? Get the project permission granted
404 Wrong site URL, or a resource you cannot see Is the host your yoursite.atlassian.net? Correct the URL or the permission
429 Too many requests Is a Retry-After header present? Wait, then retry with backoff and jitter

429 rate-limit errors dwarf other API error codes

Start with 429, even though it's the least interesting to debug. In a general API dataset from Requesty, not Jira-specific, 429 made up 66.36% of errors, so rate limiting's the failure your automation will meet most often. Auth errors are rare by comparison.

At 0.59% of errors in the Requesty data, 401 is rare, so when you see one it's almost always your own setup.

Basic auth needs email:token base64-encoded, with the email of the account that created the token. A stray newline in the encoded string or a password in place of the token both produce a 401.

Email and token joined into one encoded string with a stray newline

Fix Jira API 403 and 404 errors

0.05% of errors in the same dataset are 403s, which means a 403's a specific, fixable signal: the token authenticated, but the account lacks permission on that project.

At 3.96%, 404 has two common causes, which means it's not your primary error concern. One's a mistyped site URL. The other's an issue or project your account can't see, which can show up as "not found" rather than "forbidden".

A bad JQL string usually returns an error message naming the faulty field, so read the body before you touch permissions.

For a 429, read the Retry-After header and sleep at least that long. When it's missing, back off exponentially and add random jitter so parallel workers don't retry in lockstep. Cap the attempts, or a stuck job will hammer Jira indefinitely.

When a token that worked yesterday now returns 401, it has usually expired or been revoked.

Create a new one in your Atlassian account, update wherever you store it, and log the failure loudly rather than retrying, because no amount of backoff fixes a dead credential.

You can follow the rest of this with the builder open. Start free, no card.

Keep your Jira API token secure

Keep the token in an environment variable or secret manager, issue it to a dedicated service account, and never put it in code or a public repo. The cheapest dead credential's one you retired on purpose.

Use a dedicated service account

Generate a token from your own Atlassian account and it acts as you: a leaked copy can read and edit everything you can, and it stops working the day you leave the company or lose access.

Create a separate Atlassian account for the integration, give it access only to the projects the automation touches, and generate the token there. A leak then exposes a few projects instead of your whole footprint, and nobody's offboarding breaks production.

Store Jira API tokens in environment variables

Read the token at runtime from an environment variable, or from a secret manager if you have one:

export JIRA_EMAIL="[email protected]"
export JIRA_API_TOKEN="..."

Keep .env files in .gitignore and out of Docker images. Never ship the token in browser JavaScript or a mobile app, because anyone can open the network tab and read it. Calls to Jira belong on a server you control.

By default the expiry's 365 days, according to Atlassian's token management page, and you can pick anything from 1 to 365, meaning leaked credentials could be misused for a full year.

Atlassian API token expiry setting

A token you forget about can therefore stay valid for a full year after it leaks. Set 30 or 90 days instead, and treat the expiry as a calendar reminder to rotate, so you're cycling credentials on a fixed schedule.

A long stack of calendar pages beside a short one, each with a key

Rotate and revoke a leaked Jira token

Rotate by creating the new token first, deploying it, confirming requests succeed, and only then deleting the old one at id.atlassian.com. Delete first and you take your own integration down.

After a leak, the same four jobs apply in any order, and none can be skipped, which means you cannot consider the breach remediated until all four are complete.

  • Create a replacement token.
  • Check the Jira audit log for activity you didn't make.
  • Purge the token from git history, not just the latest commit.
  • Update the secret store with the new value.

Start with whichever you can finish fastest, which is usually the deletion, since it takes about a minute.

Skipping the history purge's the usual mistake: the token's still readable in old commits and forks, and deleting it only helps if the replacement never lands in the same place.

Use the Jira token in Activepieces without code

Paste the Jira token once, as a connection, and every flow can reuse it, with unlimited flows on every plan including free, so the next rotation's one edit instead of a hunt through scripts.

That matters because a token you can only replace in one place's a token you'll actually replace.

Paste the token once as a connection

Add a Jira Cloud connection and fill in three fields: your site URL, the Atlassian account email, and the API token.

Those are the same three things a direct REST call needs, so nothing here's new, it just lives in the connection instead of in a script or a .env file.

For rotation, the consequence's a good one. When you revoke the old token and issue a new one, you update the connection and every flow using it picks up the change.

A workflow canvas showing an Instance Stopped trigger connected to a Revoke Token HTTP request step, with the right panel…

If you skip that step, the flows fail with a 401 from Jira, which is at least a loud way to find out.

Even here, the token acts as you, so a connection made from your personal account can do whatever you can do in Jira. Use a dedicated account where you can.

Where the pasted token is stored is a separate question from what it can do. On a self-hosted instance or the enterprise cloud tier, Activepieces can route connection secrets, this Jira token included, to your own secret manager instead of its database.

With an external secret manager configured on a self-hosted instance, the Activepieces database holds no copy of the Jira token, so a breach or subpoena of the vendor's side turns up nothing.

The secret-manager integration appears in the enterprise governance feature set next to SCIM, custom RBAC, SSO/SAML and audit logs, and MoneyGram, Moneypenny, Alan and FundingSocieties run Activepieces in production.

Run a first action

Build the smallest flow that proves the connection works: a Manual Trigger, then one Jira action. Pick the action from the list the integration offers in the step picker rather than from memory, since that list's what the integration really supports.

Though the screenshot shows a different app, a Suno quickstart, the layout's the same one you'll see.

It has a Manual Trigger, an action step, and a selected step whose right panel holds a required Connection dropdown, a required field mapped from the previous step, and error handling with Add Error Handler and Retry on Failure.

Activepieces workflow builder showing a Suno music task lookup workflow with three steps and configuration panel

Two steps are marked Incomplete until their required fields are filled, and unpublished changes sit behind a Publish button, so incomplete work cannot be published.

Turn on error handling before you publish. A retry on a 429's reasonable, but a retry on a 401 just repeats a bad credential.

When you need an endpoint the integration doesn't list, or want full control over the request, direct REST's the better choice. For everything else, the connection's enough.

  1. Create a token for a dedicated Jira account, not your personal one.
  2. Add the Jira Cloud connection in Activepieces with site URL, email and token.
  3. Run one action from a Manual Trigger and confirm it succeeds.
  4. Add an error handler to that step before publishing.
  5. Put the next rotation date on a calendar, and replace the token in the connection when it comes.

Frequently asked questions

Does a Jira API token expire? Yes. Atlassian's current tokens are created with an expiry date, so a token that worked last quarter can stop working with no change in your code.

When it does, calls return a 401, the same as a wrong token. Put the expiry date in a calendar or secrets manager when you create the token, and rotate it before then.

Can I use my Jira password instead of an API token? No, not against Jira Cloud's REST API. Basic authentication with an account password is no longer accepted there, so you send your Atlassian email plus an API token.

This is also safer, because you can revoke a token without changing the password that guards your whole account.

Is the Jira API free to use?

Yes. Creating a token and calling the REST API doesn't cost anything extra, and the limits depend on your Jira plan and how heavy your usage is.

Calls are rate limited, so a loop that hammers the API will eventually get a 429. Back off and retry rather than assuming the key's broken. Check Atlassian's current plan documentation for exact limits before you plan around them.

Why does my token work in curl but fail in my app? Almost always because the app's not sending what curl sent. Typical output:

HTTP 401 Unauthorized

Check these, in order of how often they bite:

  1. The token was read from an environment variable that's empty or missing in the app's process, though it's set in your shell.
  2. A trailing newline or stray quote came in with the pasted value.
  3. The email:token pair wasn't Base64-encoded into the Basic header, or was encoded twice.
  4. The app calls a different site URL than the one you tested with curl.

Print the length of the token and the exact host at startup, never the token itself. That usually settles it in a minute.

Can one token access several Jira sites?

Because the token belongs to your Atlassian account, not to one site, it acts as you wherever your account has access, so you call each site at its own URL and get the permissions you hold on that site.

That's convenient and also the risk: a leaked token exposes every site you can reach.

If an integration only needs one site or one job, give it a separate account with narrow access and a token of its own.

Share

Build it

Set this up in minutes.

No code required. Connect your accounts, and Activepieces runs it from there.

Start free Talk to sales