"Field 'customfield_XXXX' cannot be set. It is not on the appropriate screen, or unknown."

On jira 8.16, I am facing problem with creating Jira tickets via API with the below error.

i have added the fields to all the screens available, still i am facing the problem.

Could you please help me out with this?

@KartikPatra welcome to the Atlassian developer community.

Can you post the payload you are trying to POST. Or maybe just the section of fields where you are trying to set this custom field?

the below API doesn’t list the custom fields which I have already added to the screen.
https:///rest/api/2/screens/10001/availableFields

@KartikPatra,

If the API doesn’t list your custom field as available, then it would explain why you can’t POST a value for it. I can only think of 2 possibilities. One is that you have the wrong screen id. Let’s assume that you do know how to find that, the other problem could be that you missed activating the screen. See the last step here:
https://confluence.atlassian.com/adminjiraserver/defining-a-screen-938847288.html

Let us know if that solves your problem. Otherwise, more context would really help.

Thank you so much for the quick reply.
I did activate the screens, but still the ‘availableFields’ API doesn’t list the custom fields i have added.

Hi there

Are you running this on a multi-node Data Center?

sorry for reviving but didn’t see this mentioned: that error message can be a bit vague/misleading-- for me the problem was just insufficient permission on the project.