{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/przypominamy-com/json-schema/przypominamy-com-contact-input-schema.json",
  "title": "ContactInput",
  "description": "Treść `POST /v1/contacts` (wymagane `msisdn`) i `PATCH /v1/contacts/{id}` (wszystko opcjonalne). W `POST` może być też tablicą takich obiektów (do 500).",
  "x-generated": "2026-10-31",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/przypominamy-com-openapi.json#/components/schemas/ContactInput",
  "type": "object",
  "properties": {
    "msisdn": {
      "type": "string",
      "description": "Numer (E.164, bez plusa lub 9 cyfr = Polska); klucz upsertu"
    },
    "first_name": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 80,
      "description": "Imię - placeholder `{{imie}}`"
    },
    "last_name": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 80,
      "description": "Nazwisko - placeholder `{{nazwisko}}`"
    },
    "email": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 200,
      "description": "Placeholder `{{email}}`"
    },
    "fields": {
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": {
        "type": "string",
        "maxLength": 200
      },
      "description": "Pola własne (do 20; klucz `[a-zA-Z_][a-zA-Z0-9_]{0,30}`) - placeholder `{{nazwa_pola}}`"
    },
    "groups": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Nazwy lub id grup; nieistniejące nazwy są tworzone; zastępuje dotychczasowe przypisania"
    }
  }
}