Not able to create Options for CustomFields

I am trying to create options for customfields I am using Jira cloud rest call But getting status 400 Here is URL and request body.
Rest URl
and Body
[{“options”:[{“value”:“Asset Tag”}]}]

In response, I am getting this
HTTP Status 400 – Bad Request
This Rest call i am using
Any Suggestion How to create option for customFields.

You probably already have, but take note of this statement:

" Note that this operation only works for issue field select list options created in Jira or using operations from the Issue custom field options resource , it cannot be used with issue field select list options created by Connect apps."

Hi @david.pinn
Thanks for the suggestion , What I did is first I called this rest call

for creating the custom fields in Jira. After that, I am trying to add options using the rest call then also the same error. Anything wrong in this way.
Can You please suggest some way to do that properly?

In Jira Cloud, I understand that there are two separate categories of custom fields, which are managed via corresponding and separate sets of REST end-points. The end-points that have /customField/ in their paths relate to standard custom fields, and the end-points that have /field/ in their paths relate to app-installed issue fields.

Atlassian Connect apps can install issue field modules dynamically, and then create options for those fields via the POST /rest/api/3/field/{fieldKey}/option end-point.

I note that there is also a POST /rest/api/3/field end-point for creating issue fields. I have no experience with that end-point, but since it is of the /field/ variety, one might assume that it creates fields that can then be augmented with options via the POST /rest/api/3/field/{fieldKey}/option end-point.

Hi @david.pinn
Thanks for response
I tried this rest call also-- /rest/api/3/field/{fieldKey}/option and passed data in body like this
[{“value”:“Asset Tag”}] but still getting the same error. 400 status any suggestion where i am wrong.

What is in the body of the 400 response? Usually it will contain an error message.

So, you’re passing an array? If so, then that’s not what’s expected. You need to pass a JSON object.

I tried this way also {“options”: {“value”:“Asset Tag”}} But still same error.
This is coming in the response body.

Type Status Report


Message Claim ‘qsh’ is missing.


Description The server cannot or will not process the request due to something that is perceived to be a**
** client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).**

Any suggestions.

‘qsh’ is part of a JWT token. I suspect that either you are not including a JWT token with your HTTP request, or else the JWT token is not properly constructed. Have a look at ‘Understanding JWT for Connect apps’ for information about creating and submitting JWT tokens with your requests to Jira Cloud.

This is a post request so I tried to pass jwt token**(i got this from addon)** in Header like this Authorization Bearer jwt-token But still it is showing 401**(using Postman)** So any suggestions for this what I am missing here.

The JWT token you mention - is it the one delivered to your app by Jira when a new host application installs your app? If so, then you can’t use that same JWT when you make requests to Jira from your app. You have to create a separate JWT token.

Hi @david.pinn Thanks for response,
if i pass api token which i got from here
in basic auth that is working with postman so when i am trying this with code it is giving 400 error because data is coming inside . And this way it is fixed for single user but how we do in our addon so multiple users can access.
Any Suggestions.