{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/derive-to/json-schema/derive-to-slack-subscription-schema.json",
  "title": "SlackSubscription",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/derive-to-slack-api-openapi.yml#/components/schemas/SlackSubscription",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "channel_id": {
      "type": "string",
      "description": "Slack channel id, e.g. C0123ABC456"
    },
    "channel_name": {
      "type": [
        "string",
        "null"
      ],
      "description": "The channel's #name for display, or null if unknown"
    },
    "scope_kind": {
      "type": "string",
      "enum": [
        "workspace",
        "collection"
      ],
      "description": "Whether this covers the whole workspace or one collection"
    },
    "scope_id": {
      "type": "string",
      "description": "The collection id when scope_kind is \"collection\"; empty for a workspace scope"
    },
    "scope_title": {
      "type": [
        "string",
        "null"
      ],
      "description": "The scoped collection's title, resolved for display. Null for a workspace scope, and also when the collection has been deleted — the subscription then matches nothing, and saying so is more useful than a bare id."
    },
    "events": {
      "type": "string",
      "description": "Comma-separated event types to deliver, or \"*\" for all events"
    },
    "authors": {
      "type": "string",
      "enum": [
        "all",
        "human",
        "agent"
      ],
      "description": "Whose activity reaches this channel: everyone, only people, or only agents"
    },
    "active": {
      "anyOf": [
        {
          "type": "number",
          "enum": [
            0
          ]
        },
        {
          "type": "number",
          "enum": [
            1
          ]
        }
      ],
      "description": "Whether deliveries are enabled (1) or paused (0)"
    },
    "created_at": {
      "type": "string"
    }
  },
  "required": [
    "id",
    "channel_id",
    "channel_name",
    "scope_kind",
    "scope_id",
    "scope_title",
    "events",
    "authors",
    "active",
    "created_at"
  ]
}