API Documentation
Custom attributes
10 min
custom attributes allow you to extend nima's data model with platform specific metadata by integrating these critical data points into your moderation workflow, your moderators gain access to richer context when making decisions overview custom attributes enable you to send platform specific metadata about content, reporters, and reportees display this metadata in the moderation console for better context configure custom attributes as clickable urls for quick access to external resources make more informed moderation decisions based on your platform's unique data defining custom attributes before sending custom attributes via the api, you must first define them in the nima dashboard configuration steps navigate to configuration go to admin settings > custom attributes select entity choose the tab corresponding to the entity you want to add attributes to content attributes related to the content being moderated reporter attributes related to the user who reported the content reportee attributes related to the user who created the content add attribute click on "add attribute" specify details name enter a descriptive name for the attribute (this must match the name used in your api payload) type select the corresponding attribute type string text values number numeric values date date values boolean true/false values activate click create and ensure your newly created attribute is active via the corresponding toggle switch sending custom attributes via api once configured, you can include your custom attributes within the customerspecific json node of your api payload content attributes send custom attributes within the content customerspecific node example if you configured an attribute named post views under the content entity "content" { "content id" "098765434567", "title" "content title", "url" "https //example com/content", "type" { "id" "img" }, "customerspecific" { "post views" "943", "post likes" "12" } } reporter attributes send custom attributes within the reporter customerspecific node example if you configured reporter account creation date under the reporter entity "reporter" { "id" "321", "name" "reporter james", "emailaddress" "reporter\@example com", "customerspecific" { "reporter account creation date" "11/01/2023", "reporter account verified" "true" } } reportee attributes send custom attributes within the reportee customerspecific node example if you configured reportee account creation date under the reportee entity "reportee" { "id" "123", "name" "reportee john", "emailaddress" "reportee\@example com", "customerspecific" { "reportee account creation date" "11/01/2023", "reportee player level" "vip" } } displaying custom attributes as urls in some cases, you may want to display custom attributes as clickable url links in the moderation console this is particularly useful for linking to user profiles on your platform original posts or content analytics dashboards internal admin tools configuration steps define custom attributes create custom attributes in the dashboard as described above (e g , link to post , link to profile ) send url values include valid urls as the values for these custom attributes in your api payload "content" { "content id" "098765434567", "title" "content title", "url" "https //pbs twimg com/media/example jpg", "type" { "id" "img" }, "status" "published", "customerspecific" { "link to post" "https //twitter com/olympics/status/1783450999891300620", "link to profile" "https //twitter com/olympics" } } view in console the urls will be displayed as clickable links within the moderation console, allowing moderators to quickly access the referenced resources best practices naming conventions use descriptive, snake case names for custom attributes (e g , account creation date , post views ) ensure consistency between the attribute name in the dashboard and your api payload avoid special characters or spaces in attribute names data types choose the appropriate data type for your attribute to ensure proper validation and display for urls, use the string type for dates, use the date type to enable proper formatting