{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/affiliatebase-io/json-schema/affiliatebase-io-invitation-schema.json",
  "title": "Invitation",
  "x-generated": "2026-11-01",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/affiliatebase-io-openapi.yml#/components/schemas/Invitation",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "kind": {
      "type": "string",
      "enum": [
        "member",
        "affiliate"
      ]
    },
    "email": {
      "type": "string",
      "format": "email"
    },
    "status": {
      "type": "string",
      "enum": [
        "pending",
        "accepted",
        "revoked"
      ]
    },
    "role": {
      "type": "string"
    },
    "campaign_id": {
      "oneOf": [
        {
          "type": "null"
        },
        {
          "type": "string",
          "format": "uuid"
        }
      ]
    },
    "affiliate_id": {
      "oneOf": [
        {
          "type": "null"
        },
        {
          "type": "string",
          "format": "uuid"
        }
      ]
    },
    "accepted_at": {
      "oneOf": [
        {
          "type": "null"
        },
        {
          "type": "string",
          "format": "date-time"
        }
      ]
    },
    "revoked_at": {
      "oneOf": [
        {
          "type": "null"
        },
        {
          "type": "string",
          "format": "date-time"
        }
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}