# Identity: badges

> The portal shell's counts in one read: unread over every thread (counted up to a cap), unread per thread of the newest page, contact requests waiting, requests parked for a person

## The portal shell's counts in one read: unread over every thread (counted up to a cap), unread per thread of the newest page, contact requests waiting, requests parked for a person

`GET /v1/identities/{slug}/badges` · operation `getIdentityBadges`

Requires the `batondeck:messages:read` permission (action `message:read`).

**Parameters**

| Name | In | Type | Required | Notes |
|---|---|---|---|---|
| `slug` | path | string | yes |  |

**Responses**

| Status | Meaning |
|---|---|
| 200 | The portal shell's counts in one read: unread over every thread (counted up to a cap), unread per thread of the newest page, contact requests waiting, requests parked for a person |
| 401 | No portal session, and no live API key. |
| 403 | The policy refused, or the request was cross-site. |
| 404 | No such resource, or none this session may see. |

<details>
<summary>200 response schema</summary>

```json
{
  "type": "object",
  "properties": {
    "unread": {
      "type": "object",
      "properties": {
        "count": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "capped": {
          "type": "boolean"
        }
      },
      "required": [
        "count",
        "capped"
      ],
      "additionalProperties": false
    },
    "threads": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "contact_fpr": {
            "type": "string"
          },
          "unread": {
            "type": "number"
          }
        },
        "required": [
          "id",
          "contact_fpr",
          "unread"
        ],
        "additionalProperties": false
      }
    },
    "pending_in": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ]
    },
    "parked": {
      "type": "number"
    },
    "names": {
      "anyOf": [
        {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {
            "type": "string"
          }
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "unread",
    "threads",
    "pending_in",
    "parked",
    "names"
  ],
  "additionalProperties": false
}
```

</details>

```sh
curl -X GET 'https://api.batondeck.com/v1/identities/:slug/badges' \
  -H "Authorization: Bearer $BATONDECK_API_KEY"
```
