# place.stream.server.defs

> Published by [did:web:stream.place](https://lexicon.garden/identity/did:web:stream.place)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:web:stream.place/place.stream.server.defs)
- [Documentation](https://lexicon.garden/lexicon/did:web:stream.place/place.stream.server.defs/docs)
- [Examples](https://lexicon.garden/lexicon/did:web:stream.place/place.stream.server.defs/examples)

## Definitions

### `place.stream.server.defs#storage`

**Type**: `object`

S3 storage configuration for backups.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `url` | `string` | Yes | S3 storage URL with masked secret key in format: s3+https://ACCESS_KEY:***@endpoint/bucket |
| `isActive` | `boolean` | Yes | Whether backup storage is currently active. |

### `place.stream.server.defs#webhook`

**Type**: `object`

A webhook configuration for receiving Streamplace events.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `id` | `string` | Yes | Unique identifier for this webhook. |
| `url` | `string` (uri) | Yes | The webhook URL where events will be sent. |
| `name` | `string` | No | A user-friendly name for this webhook. |
| `active` | `boolean` | Yes | Whether this webhook is currently active. |
| `events` | `array` | Yes | The types of events this webhook should receive. |
| `prefix` | `string` | No | Text to prepend to webhook messages. |
| `suffix` | `string` | No | Text to append to webhook messages. |
| `rewrite` | `array` | No | Text replacement rules for webhook messages. |
| `createdAt` | `string` (datetime) | Yes | When this webhook was created. |
| `muteWords` | `array` | No | Words to filter out from chat messages. Messages containing any of these words will not be forwarded. |
| `updatedAt` | `string` (datetime) | No | When this webhook was last updated. |
| `errorCount` | `integer` | No | Number of consecutive errors for this webhook. |
| `description` | `string` | No | A description of what this webhook is used for. |
| `lastTriggered` | `string` (datetime) | No | When this webhook was last triggered. |

### `place.stream.server.defs#rewriteRule`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `to` | `string` | Yes | Text to replace with. |
| `from` | `string` | Yes | Text to search for and replace. |

## Raw Schema

```json
{
  "id": "place.stream.server.defs",
  "defs": {
    "storage": {
      "type": "object",
      "required": [
        "url",
        "isActive"
      ],
      "properties": {
        "url": {
          "type": "string",
          "description": "S3 storage URL with masked secret key in format: s3+https://ACCESS_KEY:***@endpoint/bucket"
        },
        "isActive": {
          "type": "boolean",
          "description": "Whether backup storage is currently active."
        }
      },
      "description": "S3 storage configuration for backups."
    },
    "webhook": {
      "type": "object",
      "required": [
        "id",
        "url",
        "events",
        "active",
        "createdAt"
      ],
      "properties": {
        "id": {
          "type": "string",
          "description": "Unique identifier for this webhook."
        },
        "url": {
          "type": "string",
          "format": "uri",
          "description": "The webhook URL where events will be sent."
        },
        "name": {
          "type": "string",
          "maxLength": 100,
          "description": "A user-friendly name for this webhook."
        },
        "active": {
          "type": "boolean",
          "description": "Whether this webhook is currently active."
        },
        "events": {
          "type": "array",
          "items": {
            "enum": [
              "chat",
              "livestream",
              "follow",
              "mention",
              "stream.received"
            ],
            "type": "string"
          },
          "description": "The types of events this webhook should receive."
        },
        "prefix": {
          "type": "string",
          "maxLength": 100,
          "description": "Text to prepend to webhook messages."
        },
        "suffix": {
          "type": "string",
          "maxLength": 100,
          "description": "Text to append to webhook messages."
        },
        "rewrite": {
          "type": "array",
          "items": {
            "ref": "#rewriteRule",
            "type": "ref"
          },
          "description": "Text replacement rules for webhook messages."
        },
        "createdAt": {
          "type": "string",
          "format": "datetime",
          "description": "When this webhook was created."
        },
        "muteWords": {
          "type": "array",
          "items": {
            "type": "string",
            "maxLength": 100
          },
          "description": "Words to filter out from chat messages. Messages containing any of these words will not be forwarded."
        },
        "updatedAt": {
          "type": "string",
          "format": "datetime",
          "description": "When this webhook was last updated."
        },
        "errorCount": {
          "type": "integer",
          "description": "Number of consecutive errors for this webhook."
        },
        "description": {
          "type": "string",
          "maxLength": 500,
          "description": "A description of what this webhook is used for."
        },
        "lastTriggered": {
          "type": "string",
          "format": "datetime",
          "description": "When this webhook was last triggered."
        }
      },
      "description": "A webhook configuration for receiving Streamplace events."
    },
    "rewriteRule": {
      "type": "object",
      "required": [
        "from",
        "to"
      ],
      "properties": {
        "to": {
          "type": "string",
          "maxLength": 100,
          "description": "Text to replace with."
        },
        "from": {
          "type": "string",
          "maxLength": 100,
          "minLength": 1,
          "description": "Text to search for and replace."
        }
      }
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
