How to add custom field to issue with Rest API?

Hello,
I’m trying to add custom field to Issue with Rest API, I know I can’t add field if i still don’t add the field to screens schemes. I just wondering, is it possible to add custom field to project screen scheme with Rest API?

Best Regards,
Haziq.

Hello @HAZIQIZZAT

For Jira Data Center, you add fields to screens via the Screens: Add field endpoint.

1 Like

Hello @sunnyape,
Thanks for the reply. Where to get the fieldId?

What do you mean? You already know the id of the field. It’s right there, on your screen grab of Postman:

I already try it, but it said Invalid field id


am i wrong here?

In Data Center REST API, the document makes a distinction between fields and custom fields.

You can try this API to get the list of available fields:
https://docs.atlassian.com/software/jira/docs/api/REST/8.14.1/#api/2/screens-getFieldsToAdd
I’m guessing you won’t find any custom fields in the result.

Thanks for the help, I just got it working now. I just misunderstand with Request Body. :sweat_smile: