Jira API with CURL throws error {"errorMessages":["The value 'XXX' does not exist for the field 'project'."],"errors":{}}

Platform Notice: Data Center Only - This article only applies to Atlassian apps on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Problem

There is an issue with REST API using CURL

  • When running the REST URL using the browser , the JSON response is OK

  • When running the REST URL using CURL with PHP, user receives the following error :

  {"errorMessages":["The value 'XXX' does not exist for the field 'project'."],"errors":{}}

Cause

This error can be thrown when the API call is being made without proper authentication and/or authorization. The Jira REST API does allow anonymous access for some endpoints, so when a call is made without authentication, the system can reply in this manner to avoid leaking details to unauthenticated requests. An authenticated, and authorized user session needs to be created first.

Resolution

Create a session as per Security overview. One way would be to use Basic authentication or use the JSESSIONID in the request header.

Updated on April 21, 2026

Still need help?

The Atlassian Community is here for you.