BUG: Checklists not created at correct position


Steps to reproduce the bug


When I try this, it will always create the new checklist at bottom (last position). No matter if I pass top or 1, it’s always at bottom. (tested with the Try it tool on the website as well as with normal curl from my server)

Expected Result

Place the new checklist in the intended position

Actual Result

Places new checklist at bottom

I’m unable to reproduce this. Here is the request I’m making using Postman with the key and token removed:

curl -X POST \
  'https://api.trello.com/1/checklists?key=&idCard=5b9fe3b44a19763e98aef7d2&name=NEW%20CHECKLIST%20bottom&pos=bottom&token=' \
  -H 'Accept: */*' \
  -H 'Accept-Encoding: gzip, deflate' \
  -H 'Cache-Control: no-cache' \
  -H 'Connection: keep-alive' \
  -H 'Content-Length: ' \
  -H 'Host: api.trello.com' \
  -H 'User-Agent: PostmanRuntime/7.16.3' \
  -H 'cache-control: no-cache'

Changing the pos to bottom, top, and positive integers all work as expected. Can you share the request you are making?

I’m using the one I referenced in the OP.
It’s definitely (still) not working, as it always creates it at the bottom:

My request is:

curl --request POST \
  --url 'https://api.trello.com/1/cards/6j8TDwj6/checklists?name=test&pos=top&key=MyKeyHere&token=MyTokenHere'

You’re right! Sorry, I missed that you were using the nested POST route.

Digging into it, it looks like we’re not respecting the pos arg if it is passed in. I’ve opened a PR to support it.

I’ll let you know when it is fixed.

Give it a try now. It looks like the fix for it just recently went live.

Thanks, works now. Issue can be closed