Editing and pinning stories in the API

We’ve got a double-feature this week! You can now edit comments in the API by making a PUT request to /stories/story-id and providing new text. Whether a comment has been edited or not will be reflected in the is_edited attribute of the comment.

You can now also pin and unpin comments and attachments by making a PUT request and setting is_pinned.

4 Likes

There was an oversight in our original publication of these docs. They’ve been updated now to also specify that storied can be deleted by making a request of the form DELETE /stories/story-id.

1 Like

Hi,

As per the documentation here it says you can edit stories by giving either text or html_text. tries to update stories from postman but I get below error.
[ { message: ‘html_text: Cannot write this property’,
help: ‘For more information on API status codes and how to handle them, read the docs on errors: https://asana.com/developers/documentation/getting-started/errors’ } ] }

This comes for both text and html_text.

Could you please help me on this.

Hi @parikshit_sardessai, the API only allows modifying text for comments, not all stories. Can you confirm that the type of story you’re trying to modify is indeed a comment?

Yes it is working for type comment.

Is There Any Way to Add Created_by On Story With Api

No, that field is read-only. See my other reply to you.