# How to manage Likes?

**URL:** <https://forum.asana.com/t/how-to-manage-likes/21790>\
**Category:** API & Developers\
**Created:** [10 May 2018 18:04 UTC](https://forum.asana.com/t/how-to-manage-likes/21790 "2018-05-10T18:04:03Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Phil\_Seeman](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/phil_seeman/32/81525_2.png) [@Phil\_Seeman](https://forum.asana.com/u/Phil_Seeman)\
**Post date:** [10 May 2018 18:04 UTC](https://forum.asana.com/t/how-to-manage-likes/21790/1 "2018-05-10T18:04:03Z")

</div>

I’m looking for some guidance as to how to manage Likes (formerly Hearts).

According to [this Stackoverflow answer](https://stackoverflow.com/a/34340186/3073617), they are their own object. But I can’t find any information about that object in the Asana documentation. So I have some questions:

1. Is there an object model available somewhere for Likes? The API Explorer still refers to them as Hearts. When I expand Hearts for a Task, it looks like it’s an object with properties of Id and User. Is that correct?

2. I’m wondering why they are a separate object and not just a collection of users like Collaborators, Members, etc.?

3. When accessing this info via my code, should I still use Hearts per the API Explorer or should I use Likes? In my own testing, it appears that both work. I’m assuming we should use Likes but wanted to confirm that there’s not still some reason to use Hearts.

4. How would one go about adding a Like to a Task via the API?

Thanks for any guidance!

---

<div class="post-metadata">

**Author:** ![Phil\_Seeman](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/phil_seeman/32/81525_2.png) [@Phil\_Seeman](https://forum.asana.com/u/Phil_Seeman)\
**Post date:** [10 May 2018 18:12 UTC](https://forum.asana.com/t/how-to-manage-likes/21790/2 "2018-05-10T18:12:03Z")

</div>

One other puzzle regarding my question #1 about the object model for Likes: the example in the Stackoverflow answer shows it containing properties of “target” and “created\_at”, but when I expand Likes, both in the API Explorer and in my own code, I don’t see these properties - I only see “id” and “user”. What’s up with the “target” and “created\_at” properties shown in the SO answer?

---

<div class="post-metadata">

**Author:** ![Jeff\_Schneider](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/jeff_schneider/32/146_2.png) [@Jeff\_Schneider](https://forum.asana.com/u/Jeff_Schneider)\
**Post date:** [14 May 2018 19:10 UTC](https://forum.asana.com/t/how-to-manage-likes/21790/3 "2018-05-14T19:10:32Z")

</div>

Hi @Phil_Seeman,

Thanks for reaching out and sorry if the hearts/likes documentation is confusing. We hope to clarify the documentaiton in the future. I’ve addressed your questions below:

1. There is no standalone documentation for `Likes`. You can find references to `Likes`, however, in the [Tasks](https://asana.com/developers/api-reference/tasks) and [Stories](https://asana.com/developers/api-reference/stories) docs.

2. Unfortunately, I don’t have any insight into the design decisions that went into making Hearts (which became Likes). Our docs do have an error. As you figured out, the response is not an array of people who’ve liked the task (as the docs indicate). Likes are actually their own object.

3. You should use `Likes` as I imagine that we will eventually deprecate `Hearts`.

4. The `likes` array is read-only, however, the `liked` boolean is writeable as part of a PUT to /tasks/{id}.

There must have been a change in the API. I will investiage further and ask the API team. When I `GET /tasks/<task-id>?opt_expand=likes` the response is:

```
"liked": true,
    "likes": [
      {
        "id": 987654321, // like-id
        "user": {
          "id": 123456789, // user-id
          "name": "Jeff Schneider"
        }
      }
    ],

```

I don’t t get “target” or “created\_at” objects either.

---

<div class="post-metadata">

**Author:** ![Phil\_Seeman](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/phil_seeman/32/81525_2.png) [@Phil\_Seeman](https://forum.asana.com/u/Phil_Seeman)\
**Post date:** [23 May 2018 09:16 UTC](https://forum.asana.com/t/how-to-manage-likes/21790/4 "2018-05-23T09:16:20Z")

</div>

Hi Jeff,

Thank very much for the reply and the info.

> [@Jeff\_Schneider](#):
>
> I believe this is an intentional design decision as likes are meant to convey a user action in the product and not a programmtic action via the API

The only comment I’d make here is that the solution I’m creating has a UI and so it would actually be appropriate for a user to be able to make the “like” action there - so the option to create a Like would be useful. But it’s not the end of the world that it’s not available in the API. 😃

---

<div class="post-metadata">

**Author:** ![Jeff\_Schneider](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/jeff_schneider/32/146_2.png) [@Jeff\_Schneider](https://forum.asana.com/u/Jeff_Schneider)\
**Post date:** [23 May 2018 20:44 UTC](https://forum.asana.com/t/how-to-manage-likes/21790/5 "2018-05-23T20:44:16Z")

</div>

@Phil_Seeman after doing a bit of digging, you actually can modify likes via the API. While the `likes` array is read-only, the `liked` boolean is writeable as part of a PUT to /tasks/{id}. (I updated my response to question #4 above)

Thank you for your feedback – I agree that developers often want to create a new UI for Asana within another tool. We strive for product parity with the API.

Could you provide a bit more detail about what you are building? Knowing how devs actually consume the API helps to shape our API roadmap and docs.

---

<div class="post-metadata">

**Author:** ![Phil\_Seeman](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/phil_seeman/32/81525_2.png) [@Phil\_Seeman](https://forum.asana.com/u/Phil_Seeman)\
**Post date:** [24 May 2018 20:18 UTC](https://forum.asana.com/t/how-to-manage-likes/21790/6 "2018-05-24T20:18:26Z")

</div>

@Jeff_Schneider Wow that’s fantastic! Thanks so much for discovering that and letting us know - really appreciate it.

The project is an Asana client with two main features: it’s outlined-based so makes it easy to visualize and work with sub-tasks; and is a thick client so it syncs data to the machine and thus allows for offline use. We actually just put up a very basic page to garner potential interest - see [GetTreesana.com](http://gettreesana.com).

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/system/32/276370_2.png) [@system](https://forum.asana.com/u/system)\
**Post date:** [30 May 2025 19:08 UTC](https://forum.asana.com/t/how-to-manage-likes/21790/7 "2025-05-30T19:08:35Z")

</div>

Closed on 30 May 2025 19:08 UTC


