{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/shipstar-ai/json-schema/shipstar-ai-recipient-upsert-request-schema.json",
  "title": "RecipientUpsertRequest",
  "x-generated": "2026-10-31",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/shipstar-ai-openapi.json#/components/schemas/RecipientUpsertRequest",
  "properties": {
    "recipients": {
      "items": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "$ref": "#/$defs/RecipientInput"
          }
        ]
      },
      "type": "array",
      "maxItems": 1000,
      "minItems": 1,
      "title": "Recipients"
    }
  },
  "type": "object",
  "required": [
    "recipients"
  ],
  "$defs": {
    "RecipientInput": {
      "properties": {
        "email": {
          "type": "string",
          "maxLength": 320,
          "title": "Email"
        },
        "name": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 200
            },
            {
              "type": "null"
            }
          ],
          "title": "Name"
        },
        "external_id": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 255
            },
            {
              "type": "null"
            }
          ],
          "title": "External Id"
        },
        "attributes": {
          "anyOf": [
            {
              "additionalProperties": true,
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "title": "Attributes"
        }
      },
      "type": "object",
      "required": [
        "email"
      ],
      "title": "RecipientInput",
      "description": "One contact in an add/upsert payload.\n\n`email` is validated server-side per item (not by pydantic) so one bad\naddress reports back in `invalid` instead of 422-ing the batch."
    }
  }
}