# io.atcr.sailor.webhook

> Published by [atcr.io](https://lexicon.garden/identity/did:plc:wfj5kyialpmcv2fzk6uqwsln)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:wfj5kyialpmcv2fzk6uqwsln/io.atcr.sailor.webhook)
- [Documentation](https://lexicon.garden/lexicon/did:plc:wfj5kyialpmcv2fzk6uqwsln/io.atcr.sailor.webhook/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:wfj5kyialpmcv2fzk6uqwsln/io.atcr.sailor.webhook/examples)

## Definitions

### `io.atcr.sailor.webhook`

**Type**: `record`

Public webhook metadata stored in the user's PDS. Links to a private io.atcr.hold.webhook record on the hold where URL and secret are stored. Part of a two-record split: this record is visible via ATProto (Jetstream), the hold record is not.

**Key**: `tid`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `holdDid` | `string` (did) | Yes | DID of the hold where the webhook is configured |
| `triggers` | `integer` | Yes | Bitmask of trigger events: 0x01=scan:first, 0x02=scan:all, 0x04=scan:changed |
| `createdAt` | `string` (datetime) | Yes | RFC3339 timestamp of when the webhook was created |
| `updatedAt` | `string` (datetime) | No | RFC3339 timestamp of when the webhook was last updated |
| `privateCid` | `string` | Yes | CID of the corresponding io.atcr.hold.webhook record on the hold |

## Raw Schema

```json
{
  "id": "io.atcr.sailor.webhook",
  "defs": {
    "main": {
      "key": "tid",
      "type": "record",
      "record": {
        "type": "object",
        "required": [
          "holdDid",
          "triggers",
          "privateCid",
          "createdAt"
        ],
        "properties": {
          "holdDid": {
            "type": "string",
            "format": "did",
            "description": "DID of the hold where the webhook is configured"
          },
          "triggers": {
            "type": "integer",
            "minimum": 0,
            "description": "Bitmask of trigger events: 0x01=scan:first, 0x02=scan:all, 0x04=scan:changed"
          },
          "createdAt": {
            "type": "string",
            "format": "datetime",
            "description": "RFC3339 timestamp of when the webhook was created"
          },
          "updatedAt": {
            "type": "string",
            "format": "datetime",
            "description": "RFC3339 timestamp of when the webhook was last updated"
          },
          "privateCid": {
            "type": "string",
            "maxLength": 128,
            "description": "CID of the corresponding io.atcr.hold.webhook record on the hold"
          }
        }
      },
      "description": "Public webhook metadata stored in the user's PDS. Links to a private io.atcr.hold.webhook record on the hold where URL and secret are stored. Part of a two-record split: this record is visible via ATProto (Jetstream), the hold record is not."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
