reactions
toggle reaction
Toggle a reaction on a target resource (Article, Comment, or User) on behalf of the authenticated user.
### Toggle Logic:
- **First Request**: Creates a new reaction of the specified category on the reactable target.
- **Second Request (with same parameters)**: Deletes the existing reaction.
- Particularly useful for simple, interactive UI buttons like "Like", "Unicorn", or "Save" where clicking toggles the active state.
post/api/reactions/toggle
Query parameters
category'like' | 'unicorn' | 'exploding_head' | 'raised_hands' | 'fire' required
The type of reaction (e.g. like for standard likes, unicorn for outstanding posts, save for bookmarking to the reading list).
reactable_idinteger required
The unique numerical ID of the target resource (Article, Comment, or User) being reacted to.
reactable_type'Comment' | 'Article' | 'User' required
The class name of the target resource being reacted to (e.g. Article, Comment, User).
Response
successful