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: 

Trello API - Create card with custom fields

Sergejs Jefremovs
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 25, 2020

Hello, i`m trying to find a solution, how i can create Trello card with 3 custom fields. For now my card is creating, but only with name and labels, and no other info is inserted in Custom fields. 

I need to request phone number, email and date.

$ch = curl_init( $url );

$request = json_encode( array( "name"=> $card_name, "labels" => "red, blue", "*here is my custom field`s ID*" => array( "idModel" => $idmodel, 'value' => array ( 'text' => 'test@test.tst') ), "*here is my custom field`s ID*" => array( "idModel" => $idmodel, 'value' => array ( 'number' => '11111') ) ) );

curl_setopt( $ch, CURLOPT_POSTFIELDS, $request );

curl_setopt( $ch, CURLOPT_HTTPHEADER, array('Content-Type:application/json'));

$result = curl_exec($ch);

curl_close($ch); 

 In 

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Garrett
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 31, 2020

Hey Sergejs, I'd really recommend posting this over in our developer community: https://community.developer.atlassian.com/c/trello

Our engineers keep an eye out there, and they or any champions would be happy to help you out with that.

TAGS
AUG Leaders

Atlassian Community Events