# org.tangled.webhook.defs

> Published by [tangled.org](https://lexicon.garden/identity/did:plc:wshs7t2adsemcrrd4snkeqli)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:wshs7t2adsemcrrd4snkeqli/org.tangled.webhook.defs)
- [Documentation](https://lexicon.garden/lexicon/did:plc:wshs7t2adsemcrrd4snkeqli/org.tangled.webhook.defs/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:wshs7t2adsemcrrd4snkeqli/org.tangled.webhook.defs/examples)

## Definitions

### `org.tangled.webhook.defs#delivery`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `createdAt` | `string` (datetime) | Yes |  |
| `event` | `ref` → `#eventType` | Yes | Event type that triggered the delivery. |
| `id` | `string` | Yes | Unique ID for tracking this delivery attempt. |
| `requestBody` | `bytes` | No |  |
| `responseBody` | `bytes` | No |  |
| `responseCode` | `integer` | No |  |
| `success` | `boolean` | Yes |  |
| `url` | `string` (uri) | Yes |  |
| `webhook` | `string` | Yes | ID of the webhook this delivery belongs to. |

### `org.tangled.webhook.defs#eventType`

**Type**: `string`

**Known Values**:
- `push`
- `repository:renamed`
- `pull_request:created`
- `pull_request:resubmitted`
- `pull_request:merged`
- `pull_request:closed`
- `pull_request:reopened`
- `org.tangled.event.pullRequest`

### `org.tangled.webhook.defs#webhook`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `active` | `boolean` | Yes | Whether the webhook is currently enabled. |
| `createdAt` | `string` (datetime) | Yes |  |
| `events` | `array` | Yes | Event types this webhook is subscribed to. |
| `id` | `string` | Yes | Webhook identifier. |
| `updatedAt` | `string` (datetime) | No |  |
| `url` | `string` (uri) | Yes | Endpoint URL that receives webhook payloads. |

## Raw Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "delivery": {
      "properties": {
        "createdAt": {
          "format": "datetime",
          "type": "string"
        },
        "event": {
          "description": "Event type that triggered the delivery.",
          "ref": "#eventType",
          "type": "ref"
        },
        "id": {
          "description": "Unique ID for tracking this delivery attempt.",
          "type": "string"
        },
        "requestBody": {
          "type": "bytes"
        },
        "responseBody": {
          "type": "bytes"
        },
        "responseCode": {
          "type": "integer"
        },
        "success": {
          "type": "boolean"
        },
        "url": {
          "format": "uri",
          "type": "string"
        },
        "webhook": {
          "description": "ID of the webhook this delivery belongs to.",
          "type": "string"
        }
      },
      "required": [
        "id",
        "webhook",
        "event",
        "url",
        "success",
        "createdAt"
      ],
      "type": "object"
    },
    "eventType": {
      "knownValues": [
        "push",
        "repository:renamed",
        "pull_request:created",
        "pull_request:resubmitted",
        "pull_request:merged",
        "pull_request:closed",
        "pull_request:reopened",
        "org.tangled.event.pullRequest"
      ],
      "type": "string"
    },
    "webhook": {
      "properties": {
        "active": {
          "description": "Whether the webhook is currently enabled.",
          "type": "boolean"
        },
        "createdAt": {
          "format": "datetime",
          "type": "string"
        },
        "events": {
          "description": "Event types this webhook is subscribed to.",
          "items": {
            "ref": "#eventType",
            "type": "ref"
          },
          "type": "array"
        },
        "id": {
          "description": "Webhook identifier.",
          "type": "string"
        },
        "updatedAt": {
          "format": "datetime",
          "type": "string"
        },
        "url": {
          "description": "Endpoint URL that receives webhook payloads.",
          "format": "uri",
          "type": "string"
        }
      },
      "required": [
        "id",
        "url",
        "active",
        "events",
        "createdAt"
      ],
      "type": "object"
    }
  },
  "id": "org.tangled.webhook.defs",
  "lexicon": 1
}
```
