You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
I'm creating cards via API. When I add the idCardSource (using another card as a template) the field idMembers is ignored. If I just remove the idCardSource from the query parameters, the idMembers field is considered and the members are added to the card. Someone has faced the same situation?
Welcome to the Atlassian community!
Unfortunately, Trello API does not have a separate endpoint for adding members to a card during card creation. Instead, you need to add the members to the card after it has been created, by updating the card's idMembers property.
Here is an example cURL request to update a card and add members to it:
curl -X PUT https://api.trello.com/1/cards/<card_id> \
-d key=<your_api_key> \
-d token=<your_token> \
We also have an active developer community, so if you have any questions about setting this up, I'd recommend reaching out there: https://community.developer.atlassian.com/c/trello/42
Vishaal S | The Trello Team
First, thank you for the answer Vishaal!
I was not trying to add members to the card using a separate endpoint, I was using the parameter "idMembers" of the "Create Card" endpoint (https://developer.atlassian.com/cloud/trello/rest/api-group-cards/#api-cards-post-request).
When I input a list of members (idMembers) without inputting a template card (idCardSource), all works fine and the members are added to the card.
But, when I send both "idMembers" and "idCardSource", the members are not added to the card.
Ah! Ideally, that should work based on the card templates as well, For a question like this and a potential workaround, Trello's Developer Community is really your best bet: https://community.developer.atlassian.com/c/trello/42
API experts and Trello Developer Advocates are there, and they'll be best able to answer your questions.