Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Help needed with The Automation REST API's

Peter Rossum_ van
March 19, 2026

I try to create a Automation Rule with the REST API's
The Automation REST API
Getting an existing (example) rule by UID works fine using a personal API token as OAth2 or scoped does not work. But, okay with a personal token I can go on.
So, using the data from that example rule I try te create a new rule.
However I get the "bad request' error.
Before I copy the whole body in here, are there any simple things I can check?
The questions hat come to my mind are:
Should I pass optional properties as null values or empty arrays, or can I simply leave them out?
And should I also add a new UID for the new rule, or is that created when posting?
For the example rule that I use to copy, there are no connections used for the components. Is that okay?
Is de order of the properties an issue? Is is essential that those properties are like the documenation os the API?
So....
Is there anyone that has some expirence with creating an Automation Rule using this API?

2 answers

0 votes
Marc -Devoteam-
Community Champion
March 20, 2026

Hi @Peter Rossum_ van 

Can you show the full rule and in details alls ateps in your rule.

Also show the audit log, what is that revieling.

Also what API cal you using, not al API endpoints can be used. Using a scoped token requires right permissions and scopes.

 

0 votes
Mark B Wager
Contributor
March 19, 2026

Hi Peter

Can you provide a screenshot? I'm struggling to understand exactly what you're trying to do.

Are you asking if anyone has successfully created a new Jira "Automation" rule via the Automation REST API, and what common gotchas cause a 400 Bad Request when you copy an existing rule’s JSON and POST it?

 

EXAMPLE:
POST
/gateway/api/automation/public/{product}/{cloudId}/rest/v1/rule

 

ANSWER:
Not all auth methods work.

Works

  • Personal API token (user-based)
  • Must be a user with permission to create automation rules (project admin or Jira admin, depending on scope)

Does NOT work

  • OAuth 2.0 (3LO)
  • Forge apps
  • App-scoped tokens

Atlassian explicitly documents that Forge and OAuth2 apps cannot access these rule management endpoints. [developer....assian.com]

 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events