{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/skribble/json-schema/skribble-signature-observer-response-schema.json",
  "title": "SignatureObserverResponse",
  "description": "Response object representing an observer that has been added to a signature request.\n\nDepending on the type, either user_info or group_info is present.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/skribble-signature-observer-api-openapi.yml#/components/schemas/SignatureObserverResponse",
  "oneOf": [
    {
      "$ref": "#/$defs/UserObserverResponse"
    },
    {
      "$ref": "#/$defs/GroupObserverResponse"
    }
  ],
  "$defs": {
    "GroupObserverResponse": {
      "title": "Group Observer Response",
      "type": "object",
      "required": [
        "id",
        "type",
        "invited_at",
        "invited_by",
        "group_info"
      ],
      "properties": {
        "id": {
          "type": "string",
          "description": "Unique observer identifier."
        },
        "type": {
          "type": "string",
          "description": "Observer type.",
          "const": "GROUP"
        },
        "invited_at": {
          "type": "string",
          "format": "date-time",
          "description": "Timestamp when the observer was invited."
        },
        "invited_by": {
          "type": "string",
          "description": "Identifier of the user or API key that invited the observer."
        },
        "group_info": {
          "type": "object",
          "description": "Information about the group observer.",
          "required": [
            "id",
            "name"
          ],
          "properties": {
            "id": {
              "type": "string",
              "description": "Group ID."
            },
            "name": {
              "type": "string",
              "description": "Group name."
            },
            "version_id": {
              "type": "string",
              "description": "Group version identifier."
            }
          }
        }
      }
    },
    "UserObserverResponse": {
      "title": "User Observer Response",
      "type": "object",
      "required": [
        "id",
        "type",
        "invited_at",
        "invited_by",
        "user_info"
      ],
      "properties": {
        "id": {
          "type": "string",
          "description": "Unique observer identifier."
        },
        "type": {
          "type": "string",
          "description": "Observer type.",
          "const": "USER"
        },
        "invited_at": {
          "type": "string",
          "format": "date-time",
          "description": "Timestamp when the observer was invited."
        },
        "invited_by": {
          "type": "string",
          "description": "Identifier of the user or API key that invited the observer."
        },
        "user_info": {
          "type": "object",
          "description": "Information about the user observer.",
          "properties": {
            "id": {
              "type": "string",
              "description": "User ID."
            },
            "email": {
              "type": "string",
              "format": "email",
              "description": "User email address."
            }
          }
        }
      }
    }
  }
}