{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/shipstar-ai/json-schema/shipstar-ai-recipient-upsert-response-schema.json",
  "title": "RecipientUpsertResponse",
  "x-generated": "2026-10-31",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/shipstar-ai-openapi.json#/components/schemas/RecipientUpsertResponse",
  "properties": {
    "added": {
      "type": "integer",
      "title": "Added",
      "default": 0
    },
    "updated": {
      "type": "integer",
      "title": "Updated",
      "default": 0
    },
    "reactivated": {
      "type": "integer",
      "title": "Reactivated",
      "default": 0
    },
    "unchanged": {
      "type": "integer",
      "title": "Unchanged",
      "default": 0
    },
    "skipped_unsubscribed": {
      "type": "integer",
      "title": "Skipped Unsubscribed",
      "default": 0
    },
    "invalid": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "title": "Invalid",
      "default": []
    },
    "conflicts": {
      "items": {
        "$ref": "#/$defs/RecipientConflict"
      },
      "type": "array",
      "title": "Conflicts",
      "default": []
    }
  },
  "type": "object",
  "$defs": {
    "RecipientConflict": {
      "properties": {
        "email": {
          "type": "string",
          "title": "Email"
        },
        "external_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "External Id"
        },
        "reason": {
          "type": "string",
          "title": "Reason"
        }
      },
      "type": "object",
      "required": [
        "email",
        "reason"
      ],
      "title": "RecipientConflict"
    }
  }
}