The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

Set custom field when creating card using REST API

Henry Öhman
April 17, 2023

Hi! I'm trying to set a custom field when creating a card using the REST API.

I need to set the custom field with the same post as the one I'm creating the card with.

 

I've tried adding "customFieldItems" but it does not work for me. 

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Answer accepted
Beverley
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 18, 2023

Hi Henry - welcome to the community!

There is a PUT request available to update a custom field item on a card: https://developer.atlassian.com/cloud/trello/rest/api-group-cards/#api-cards-idcard-customfield-idcustomfield-item-put

Feel free to search through the rest of the documentation to see what is available.

Henry Öhman
April 19, 2023

Hi Beverley!

So if I understand correctly there is no way to assign values to custom fields when creating the card, the card must first be created and then the custom field can be set with a second request.

Beverley
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 19, 2023

Hi Henry,


That's right - there isn’t a way to assign values to custom fields when creating a new card. You can only update custom field data in a separate API call after the card has been created. This is similar to how checklists and attachments work, as well. They can only be added to a card after the card has been created.

TAGS
AUG Leaders

Atlassian Community Events