---
title: Custom attributes
slug: custom-attributes
docTags: 
createdAt: 2025-03-04T13:57:55.763Z
---

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

1. **Navigate to Configuration:** Go to **Configure > API & Integration > Custom Attributes**
2. **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
   - **Reported Account** - Attributes related to the user who created the content
3. **Add Attribute:** Click on **"Add Attribute"**
4. **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
     - **List** - Multiple values sent as an array (e.g. `["news", "politics"]`)
5. **Activate:** Click **Create** and ensure your newly created attribute is **active** via the corresponding toggle switch

![](https://api.archbee.com/api/optimize/ijRmXIIrObJhIfPMa8rmJ/r1jnW-EPjQ8v0GfaeSOif_image.png)

### Managing which queues display an attribute

From the **Configure > API & Integration > Custom Attributes** page, you can see and manage which queues display each custom attribute without editing each queue individually. Each attribute shows a count of the queues it appears in, and a selection panel lets you add or remove queues — individually or in bulk — to control where the attribute is surfaced in the moderation console.

## 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:

```json
"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:

```json
"reporter": {
  "id": "321",
  "name": "Reporter James",
  "emailAddress": "reporter@example.com",
  "customerSpecific": {
    "reporter_account_creation_date": "11/01/2023",
    "reporter_account_verified": "true"
  }
}
```

### Reported account attributes

Send custom attributes within the `reportee.customerSpecific` node.

**Example:** If you configured `reportee_account_creation_date` under the Reportee entity:

```json
"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

1. **Define Custom Attributes:** Create custom attributes in the dashboard as described above (e.g., `link_to_post`, `link_to_profile`)
2. **Send URL Values:** Include valid URLs as the values for these custom attributes in your API payload:

```json
"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"
  }
}
```

3. **View in Console:** The URLs will be displayed as clickable links within the moderation console, allowing moderators to quickly access the referenced resources

::Image[]{src="https://files.readme.io/f01d0d1-Screenshot_2024-04-25_at_16.10.19.png" size="78" width="2276" height="1276" position="center" darkWidth="2276" darkHeight="1276" showCaption="false"}

## 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
- For multi-valued data such as categories or tags, use the **List** type so rules can match on any of the values

### Validation

Nima validates custom attributes on every incoming report against the attributes configured in your instance. A report is rejected with `400 Bad Request` when a custom attribute is not registered in Nima, or when its value does not match the attribute's type. The error names the attribute and the reason, so integration issues surface immediately:

```json
{
  "statusCode": 400,
  "message": "Content.post_views must be of type string",
  "error": "Bad Request"
}
```
