# place.stream.badge.def

> Defines a badge's visual appearance and type. Created by the issuer and referenced by issuance records.

- Kind: record
- Record key: tid
- Authority: badge.stream.place
- Lexicon: 1
- Published by [stream.place](https://lexicon.garden/identity/did:plc:rbvrr34edl5ddpuwcubjiost), not the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:rbvrr34edl5ddpuwcubjiost/place.stream.badge.def)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:rbvrr34edl5ddpuwcubjiost/place.stream.badge.def/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:rbvrr34edl5ddpuwcubjiost/place.stream.badge.def/analytics)

## Record (`place.stream.badge.def`)

Type: record · key tid

### Properties

- `badgeType` (string, required): The category of this badge, used for scope and display rules.
  - Constraints: knownValues: place.stream.badge.defs#vip | place.stream.badge.defs#event
- `createdAt` (string · datetime, required)
- `description` (string): Optional description of the badge.
  - Constraints: maxLength: 256
- `image` (blob): Badge icon image.
  - Constraints: maxSize: 262144, accept: image/png, image/jpeg, image/gif, image/webp
- `name` (string, required): Display name for this badge.
  - Constraints: maxLength: 64

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Defines a badge's visual appearance and type. Created by the issuer and referenced by issuance records.",
      "key": "tid",
      "record": {
        "properties": {
          "badgeType": {
            "description": "The category of this badge, used for scope and display rules.",
            "knownValues": [
              "place.stream.badge.defs#vip",
              "place.stream.badge.defs#event"
            ],
            "type": "string"
          },
          "createdAt": {
            "format": "datetime",
            "type": "string"
          },
          "description": {
            "description": "Optional description of the badge.",
            "maxLength": 256,
            "type": "string"
          },
          "image": {
            "accept": [
              "image/png",
              "image/jpeg",
              "image/gif",
              "image/webp"
            ],
            "description": "Badge icon image.",
            "maxSize": 262144,
            "type": "blob"
          },
          "name": {
            "description": "Display name for this badge.",
            "maxLength": 64,
            "type": "string"
          }
        },
        "required": [
          "name",
          "badgeType",
          "createdAt"
        ],
        "type": "object"
      },
      "type": "record"
    }
  },
  "id": "place.stream.badge.def",
  "lexicon": 1
}
```
