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?
Hey Paulo,
You should take a look at the keepFromSource parameter and remove members from it. It worked for me.
Hi Paulo,
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> \
-d idMembers=<member_id_1>,<member_id_2>,...
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
Cheers,
Vishaal S | The Trello Team
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
Example:
But, when I send both "idMembers" and "idCardSource", the members are not added to the card.
Example:
https://api.trello.com/1/cards?idList={ID_LIST}&key={KEY}&token={TOKEN}&idCardSource={ID_CARD_TEMPLATE}&due={DUE_DATE}&idMembers=ID_MEMBER1,ID_MEMBER2&name={NAME}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Perfect! I will follow there!
Thank you again Vishaal!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.