This page demonstrates how to use custom_json operations for various social interactions on Hive.
What is custom_json?
The custom_json operation allows applications to broadcast custom JSON data to the blockchain. It’s commonly used for social actions like following, reblogging, and community interactions.
CustomJsonOperation Type
required_auths vs required_posting_auths
required_auths : Use when the operation requires active key authority (transfers, financial operations)
required_posting_auths : Use when the operation requires posting key authority (social actions like follow, reblog)
For most social operations, use required_posting_auths with an empty required_auths array.
Follow a User
Follow another user on Hive.
Unfollow a User
Unfollow by setting what to an empty array.
Mute a User
Mute a user to hide their content from your feed.
Unmute a User
Reblog a Post
Share another user’s post to your blog.
Delete Reblog
Remove a reblogged post from your blog.
Subscribe to a Hive community.
Pin a post in your community (requires admin/moderator role).
Mute a post in your community (moderator action).
Assign a role to a user in your community (requires admin).
Update your community settings (requires admin).
Custom App-Specific JSON
You can create custom operations for your own application.
Using Active Authority
For operations requiring active key (e.g., financial operations).
Common custom_json ID Values
follow - Following, unfollowing, muting users
reblog - Reblogging posts
community - Community operations
notify - Notification settings
rc - Resource credit delegations
Custom app IDs for your application
Important Notes
Most social operations use posting key (required_posting_auths)
Financial operations use active key (required_auths)
The json field must be a valid JSON string
Community operations require appropriate permissions (admin/mod)
Custom app IDs should be unique to avoid conflicts
When developing custom operations, choose a unique id value for your app to avoid conflicts with other applications on the blockchain.