Search code examples
asana

New tags using POST in /tags asana API endpoint does'nt create the new tag


we constructed the new tag JSON like

data:{
    name:"busy Tag"
    notes:"This is new tag to b created in API"
    workspace:"xyz456987"
    }

on post http request to /tags api we get the response

data =     {
            color = "<null>";
            "created_at" = "2014-07-19T12:59:13.162Z";
            followers =         (
            );
            id = 14895043902988;
            name = "busy tag";
            notes = "This is new tag to b created in API";
            workspace = {
            id = 6486925687953;
            name = t;
        };
};

Yet the created tag doesn't appear in the web app tags list and also the api call doesn't retrieve the newly created tag.

UPDATE: when i put id of the new tag in the address bar like

https://app.asana.com/0/14896850962516/14896850962516

shows the tag in the webapp. Yet the api call is unable retrieve the the newly created tag item.


Solution

  • I'll quote my answer from Asana tag API query often misses newly created Tags:

    The answer is that tags which aren't associated with any tasks are - unfortunately - hidden in the app, and consequently also in the API. As you discovered, you can get the ID back from the POST to create and then associate it with a task from there (since there's little purpose in creating a tag if you're not associating it with something that shouldn't typically be a problem, but it is clunky). We are looking at changing our data model for tags to be a bit more intuitive in future, but that's still a ways off, so this is the reality for the foreseeable future.