Sign up ×
Web Applications Stack Exchange is a question and answer site for power users of web applications. It's 100% free, no registration required.

I've failed creating list/card using HTTP post. It seems that I did not understand:

  1. How to build the HTTP request
  2. From where to get the list ID/card ID to fill in the HTTP request

Can you give some examples how to create list/card and from where do I get the relevant ID?

share|improve this question
Are you using the Trello API? – Zoot Jul 5 '12 at 20:52

1 Answer 1

As an example of card creation, I describe a bookmarklet that I use to create Trello cards from Stack Exchange questions. (More serious applications, e.g., interfacing accounts of other users, would be a topic at Stack Overflow rather than here.)

Here is what you will need:

  1. Make sure you are logged in to Trello.
  2. Get app key by following instructions in Trello docs: it's as simple as following a link from there.
  3. Get a token for read/write access by following the URL below, and approving the request. put app key here &name=Your+App+Name&expiration=never&response_type=token&scope=read,write
  1. Visit the Trello board you want to use, and record the characters in the URL after (this is called "board id" below, although technically not the same thing).
  2. Get ids of the lists in this board by directing your browser to put board id here /lists?key= put app key here &token= put token here

(for reading the response, it helps if you have a browser extension for formatting JSON).

After collecting the above data, put it in the following script and use any bookmarklet generator to wrap it up.

key = 'put app key here';
token = 'put write-access token here';
lists = {stackoverflow: 'put list id here', webapps: 'put list id here'};
site = location.hostname.split('.')[0];
id = lists[site];
if (id) {
  opts = {name: $('#question-header a').text(), desc: location.href, idList: id, urlSource: null, due: null};
  $.post(''+key+'&token='+token, opts, function() {alert('Card added')});

The script creates a card in your list for the SE site (assuming it exists), with the name being the title of the question, and the description being its URL (which becomes clickable in the Trello web interface). A confirmation message is shown.

Note: the bookmarklet uses jQuery. On Stack Exchange sites (and many others) jQuery is already loaded. If you are not sure if jQuery is available, include it with the bookmarklet (MrColes bookmarklet creator does this for you).

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.