API

API

Overview

Parts of Approval Path are available through a Web API. Calls are authenticated with an API key that you create in the app.

Where API keys live

Open the Approval Path global view and go to Apps → Approval Path for Jira → API Keys.

image-20261012-171147.png

A global admin sees and can edit every API key in the instance, not only the ones they created. Editing someone else's key never reveals its value.


Creating a key

Select Create. An empty form opens titled Create API key. Nothing exists until you submit it, so leaving the form before submitting creates nothing.

Fill in the settings described under The Configuration tab and submit.

Copy the value straight away

When the key is created, its value is shown once in a box with a Copy and this warning:

Copy this key now and store it somewhere safe. For security reasons it is not stored and cannot be shown again.

Copy is the only accented button while the value is visible. Once you have copied it, the accent moves to Update.

If you try to leave the page without copying the value of a key you have just created, you are asked to confirm, because the value cannot be recovered. Closing or reloading the browser tab shows the browser's own warning as well.

After that, only a fingerprint is shown. On an existing key the fingerprint appears as plain text beside the key name, with no copy action.

image-20261013-093532.png

The Configuration tab

Privileges

Privileges decide which operations the key is allowed to perform. They are shown as a matrix, with resources down the side and operations across the top. Combinations that do not exist are greyed out and have no control, so Action links offers Read only.

Resource

Create

Read

Update

Archive

Delete

Resource

Create

Read

Update

Archive

Delete

Definition

Create a definition

Retrieve one by ID, or list them

Update one by ID

N/A

Delete a definition

Condition

Create a condition

Retrieve one by ID, or list them

Update one by ID

N/A

Archives the condition rather than removing it

Approval

Create an approval

Retrieve one by ID, or list them

Submit approval decisions

Archive an approval

Delete an approval

Action links

N/A

Generate signed action links

N/A

N/A

N/A

Action links → Read lets API consumers generate secure signed action links, such as Approve and Reject, for a specific approval step. Enabling it activates Fast Path, so authorized users complete actions straight from an email or API link without a confirmation page.

Approval → Update (Submit approval decisions) lets the key record approve, reject, abstain or consent decisions in an approver's name. It can be granted only while Approval decisions through the Web API is turned on in global settings, and Select all skips it otherwise. A key that already holds it keeps it and can have it removed. If a key with this privilege allows every IP address, it is flagged in the key list, and the form warns: "This key can record approval decisions from any IP address. Restrict Allowed IPs to your integration's addresses."

 

Performer origin

Allow change performer origin sits below the matrix, separated from it by a line. It is a setting rather than a privilege. Turn it on and a Performer origin row appears, which decides who the API acts as when it creates, deletes or decides on approvals.

Option

What it does

Option

What it does

User

A specific user you pick.

Work item field User

Takes the user from a work item field of type User, or the first element of a User array. You can set a default user for when the field holds no valid user. Without a default, the call returns an error.

User from API

The call passes a user ID in its body. Choose the group that user has to belong to; a key with this option cannot be saved without a group. You can set a default user for when the ID is empty or invalid. A user outside the group returns an error.

The call passes a user ID in its body. Choose the group that user has to belong to; a key with this option cannot be saved without a group. You can set a default user for when the ID is empty or invalid. A user outside the group returns an error.

Key validity

image-20261013-094252.png

Both boundaries sit on one row, each with a date and a time, and one timezone selector applies to both. The selector starts on your own timezone, and changing it keeps the dates and times you entered and reads them in the new timezone. A hint line below states both boundaries in your timezone.

Above the inputs are duration presets: 30 days, 90 days, 1 year and 2 years. Selecting one sets the end boundary relative to the start, and whichever preset matches the current range is shown as selected. A new key starts at 2 years.

 

Network and description

image-20261013-094311.png

Allowed IPs restricts which addresses or ranges can use the key. A new key starts at 0.0.0.0/0,::/0, which allows every address. Set all restores that value.

Description is optional, a single line that grows as you type, up to 4000 characters.


The Usage tab

Every Web API call made with the key is logged with its time, the IP it came from, the result, and a dump of the request.

The result is either Authorized or the reason the call was turned away:

  • The key is archived

  • The key is not yet valid

  • The key has expired

  • The IP is not allowed

  • The key lacks the privilege for that operation

The key is checked before the request itself is validated, so calls carrying invalid input are logged too.

Two kinds of call never appear here. Calls made with an unknown key cannot be tied to a key, and requests whose body, path or query parameters cannot be read are rejected before the key is checked.

The tab states this at the top: only the last 7 days of usage are stored, and older entries are removed automatically.


The History tab

Creating, editing and archiving a key each record a version. Saving without changing anything records nothing.

Frame 242.png

Versions are listed newest first with the date, what happened (Created, Edited or Archived), who did it, the IP they did it from, and a summary of what changed. Expanding a version shows each setting before and after. The first recorded version shows the settings the key started with.

The first version of a key is listed as Initial settings and shows the name, privileges, validity dates, allowed IPs and the performer origin setting as they were at creation. A key created with no privileges reads no privileges.

Keys that existed before this feature arrived carry a single version holding their current settings, marked Created if the key was never edited and Edited at its last modification otherwise.


Submitting decisions through the Web API

An external system can record a decision on an approval in an approver's name, with no browser and no login. Use it when part of a process runs outside Jira.

Turn it on in three places

  1. A global admin turns on Approval decisions through the Web API in global settings (General, section Web API). It is off by default.

  2. The definition has Allow decisions through the Web API selected. It applies to approvals started after the definition is saved.

  3. The API key has the Submit approval decisions privilege.

Turning the global setting off stops Web API decisions on every approval at once, including running ones.

Whose name the decision is recorded under

Key setting

The decision is recorded as

Key setting

The decision is recorded as

No performer origin

The key's owner

User

The user chosen on the key. This is the safest mode: the key can only ever decide as that one person, for example a service account that is the approver of the integration's step.

User from API

The person named in the call (userId), who must belong to the key's group

Work item field User

The user in the work item field, read at each call

The person must be an active Atlassian account that can see the work item. When the app's permissions are enabled, the person also needs the permission to view approvals. JSM portal customers cannot be named.

The call

POST /webapi/v2/approvals/{approvalId}/decisions

{ "requestId": "erp-po-4711-approve", "decision": "APPROVE", "comment": "Approved by the ERP purchase workflow" }

Field

Required

Meaning

Field

Required

Meaning

requestId

Yes

Your unique ID for this decision, 1 to 100 characters from A-Z a-z 0-9 . _ : -

decision

Yes

APPROVE, REJECT, ABSTAIN or CONSENT

comment

When the step requires one

At most 1000 characters

userId

Only for User from API keys

Atlassian account ID of the person who decides

stepId

No

The step to decide. Without it, the step is chosen when the person can decide exactly one. If there are more, nothing is recorded and the response lists the candidates.

onBehalfOf

No

For a delegate: the account ID of the approver whose place they take

The same rules apply as in the approval panel. The person must be an approver on an active user or group step and must not have decided on it yet. The decision must fit the step, and a required comment must be present. Vote steps and email steps cannot be decided through the Web API. Approvals that are archived, completed or past their decision deadline cannot be decided either.

Sending the same requestId again returns the recorded decision with replayed: true and records nothing new, so retries are safe. A refused call records nothing, and its response carries a machine-readable reason.

Seeing where a decision came from

In the approval panel, a decision taken outside the panel shows its channel next to the decision date, for example "via Web API" or "via Slack". Anyone who can see the approval can open the details of a Web API decision: the API key name and the decision time. A global admin also sees the key fingerprint, the key owner, the source IP, the request ID and a link to the key. The request body, including the comment, is visible in the key's Usage tab for 7 days.

Security

Whoever holds a key with this privilege can record a decision in an approver's name, and Approval Path cannot tell whether that person really decided. Keep the key secret, restrict Allowed IPs to your integration's addresses, and prefer the User performer origin.


Using the Web API with an API key

With the key generated, you can now make a call to the Web API. First of all, set Authorization and Content-Type headers in your REST client.

Authorization: Bearer mc96LyRi9nUQySSjKXEf8xfqUZzjS2CYhRK8bWSRRfQi Content-Type: 'application/json'

Endpoints

Base path: https://app.approval-path.com/webapi/v2

Macro Pack