{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/craaft-io/json-schema/craaft-io-invitation-create-schema.json",
  "title": "InvitationCreate",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/craaft-io-invitations-api-openapi.yml#/components/schemas/InvitationCreate",
  "type": "object",
  "required": [
    "email",
    "role"
  ],
  "properties": {
    "email": {
      "type": "string",
      "format": "email"
    },
    "role": {
      "type": "string",
      "enum": [
        "admin",
        "member"
      ]
    },
    "boardGrants": {
      "type": "array",
      "description": "Optional, only honoured for `role: \"member\"` invitations\n(admins auto-see every board). Persisted alongside the\ninvitation and applied atomically on accept.\n",
      "items": {
        "type": "object",
        "required": [
          "projectId",
          "role"
        ],
        "properties": {
          "projectId": {
            "type": "string",
            "format": "uuid"
          },
          "role": {
            "type": "string",
            "enum": [
              "admin",
              "contributor"
            ]
          }
        }
      }
    }
  }
}