Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Populating custom fields via. API Edited

I'm having some trouble populating a custom field on a card via. the API. The URL I am using is: 

https://api.trello.com/1/card/{CardID}/customField/{CustomFieldID}/item?key={Key}&token={Token}

The response I'm getting when making the request is a 400 code, and the response body is: 

Invalid value for custom field type

The data that is being sent in the PUT request is: 

{ "value" : { "text": "Hello, world!" }}

Is there anything obvious that I'm doing wrong here? Would you be able to point me in the right directiion? The custom field is of type: text, so I'm at a loss.

1 answer

@Mikeres0What seems wrong to me is the url / path for cards, you use:

https://api.trello.com/1/card/{CardID}/ ......

whereas it should be:

https://api.trello.com/1/cards/{CardID}/ ......

i.e. cards

So there seems to be an error in the Trello docs!.

ping for @bentley and @Torben

bentley Atlassian Team Oct 19, 2018

All of the endpoints accept both singular and plural nouns in the route, so I don't think that is the problem.

That error message leads me to believe that you're trying to update a Custom Field that has a type other than text (dropdown, number, etc.). Can you confirm that it is a text type Custom Field?

If it is a text Custom Field, then I'd guess that something might be up with the body. Here is a Postman collection that includes a single PUT request that works to update a Custom Field: https://www.getpostman.com/collections/e82e59d6d5ba6e41f485

@bentley

All of the endpoints accept both singular and plural nouns in the route, so I don't think that is the problem.

Is that documented somewhere?  Could not find this in the API reference.

bentley Atlassian Team Oct 22, 2018

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Trello

📹 What is Trello?

Hello Community!  My name is Brittany Joiner and I am a Trello enthusiast and Atlassian Community Leader. I'll be sharing with you a series of videos with my top tips on how to best use Trello...

225 views 7 14
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you