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

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.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events