{
  "openapi": "3.1.0",
  "info": {
    "title": "ChurchDesk Public API v3.0.0",
    "version": "3.0.0",
    "description": "Use ChurchDesk Public API v3.0.0 to fetch ChurchDesk data on demand and retrieve resources referenced by webhook actions.\n\n## Base URL\n\nAll endpoints are served from `https://api.churchdesk.com`, and the paths below already include the `/v3.0.0` version prefix — so the full URL of a request is the base URL followed by the path shown for the endpoint:\n\n```\ncurl -H 'X-API-Key: <API-KEY>' \\\n  'https://api.churchdesk.com/v3.0.0/events?organizationId=<ORGANIZATION-ID>'\n```\n\nDo not add an `/api` prefix — `https://api.churchdesk.com/api/v3.0.0/events` responds `404`. If you are calling a ChurchDesk application host rather than `api.churchdesk.com`, these endpoints are not part of the public API contract and may move.\n\n## Authentication\n\nEvery endpoint requires a partner token. Contact [support@churchdesk.com](mailto:support@churchdesk.com) to obtain one.\n\nUse the `X-API-Key` header to send the token: `X-API-Key: <API-KEY>`.\n\nFor backwards compatibility, you can also use the `partnerToken` query parameter: `?partnerToken=<API-KEY>`.\n\nPublic write requests can also send `partnerToken` in the JSON request body."
  },
  "servers": [
    {
      "url": "https://api.churchdesk.com",
      "description": "ChurchDesk production API"
    }
  ],
  "tags": [
    {
      "name": "Blogs",
      "description": "Blogs API endpoints."
    },
    {
      "name": "Calendar",
      "description": "Calendar API endpoints."
    },
    {
      "name": "Churchscreen",
      "description": "Churchscreen API endpoints."
    },
    {
      "name": "Galleries",
      "description": "Galleries API endpoints."
    },
    {
      "name": "Newsletter",
      "description": "Newsletter API endpoints."
    },
    {
      "name": "Portal",
      "description": "Portal API endpoints."
    }
  ],
  "paths": {
    "/events/{id}": {
      "get": {
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "integer",
              "exclusiveMinimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "API response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnershipEventResponse"
                }
              }
            }
          }
        },
        "summary": "Retrieve event by partner token",
        "tags": [
          "Calendar"
        ],
        "description": "Get information regarding the event by specific id, authenticated via partner token.",
        "security": [
          {
            "partnerApiKey": []
          },
          {
            "partnerToken": []
          }
        ]
      }
    },
    "/v3.0.0/blogs": {
      "get": {
        "parameters": [
          {
            "name": "organizationId",
            "required": true,
            "in": "query",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "integer"
              },
              "description": "The organization to read. Repeat the parameter to read several organizations in one request (`?organizationId=1&organizationId=2`)."
            }
          },
          {
            "name": "cid",
            "required": false,
            "in": "query",
            "schema": {}
          },
          {
            "name": "requireImage",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "schema": {
              "type": "integer",
              "exclusiveMinimum": 0
            }
          },
          {
            "name": "offset",
            "required": false,
            "in": "query",
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "minimum": 0
            }
          },
          {
            "name": "imageFormat",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "thumbnail",
                "ckeditorlarge",
                "ckeditormedium",
                "galleryview",
                "span6",
                "span6_16-9",
                "span7_16-9",
                "span3",
                "span3_16-9",
                "span3 16-9",
                "span6_square",
                "slideshow",
                "slideshow-widgets",
                "slideshow-widgets-span12",
                "slideshow-widgets-span4",
                "slideshow-widgets-span7",
                "church_banner",
                "churchscreen",
                "churchscreen-wide",
                "span4_16-9",
                "span5_16-9",
                "span12_16-9",
                "16-9",
                "people-message-simple-logo",
                "people-message",
                "people-message-simple",
                "medium-slideshow",
                "medium-event",
                "sidebar-event",
                "large",
                "3-4",
                "main-logo",
                "mobile-logo",
                "calendar-poster-event-image",
                "event-invitation-event-image",
                "favicon",
                "raw"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "API response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicBlogsV3Response"
                }
              }
            }
          }
        },
        "summary": "List blogs for churchscreen",
        "tags": [
          "Blogs"
        ],
        "description": "A list of the blog posts, ordered by published date, newest first.",
        "security": [
          {
            "partnerApiKey": []
          },
          {
            "partnerToken": []
          }
        ]
      }
    },
    "/v3.0.0/blogs/categories": {
      "get": {
        "parameters": [
          {
            "name": "organizationId",
            "required": true,
            "in": "query",
            "schema": {
              "type": "integer",
              "exclusiveMinimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "API response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicBlogCategoriesResponse"
                }
              }
            }
          }
        },
        "summary": "List blog categories",
        "tags": [
          "Blogs"
        ],
        "security": [
          {
            "partnerApiKey": []
          },
          {
            "partnerToken": []
          }
        ]
      }
    },
    "/v3.0.0/events": {
      "get": {
        "parameters": [
          {
            "name": "organizationId",
            "required": true,
            "in": "query",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "integer"
              },
              "description": "The organization to read. Repeat the parameter to read several organizations in one request (`?organizationId=1&organizationId=2`)."
            }
          },
          {
            "name": "imageFormat",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "scope",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "organization",
                "portal"
              ],
              "default": "organization",
              "description": "The organization set whose events are returned. `portal` is available only to a portal host and includes all member organizations; combined with several `organizationId` values it expands each named organization's portal and deduplicates the result. Outdoor mode ignores this parameter."
            }
          },
          {
            "name": "cid",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rid",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "itemsNumber",
            "required": false,
            "in": "query",
            "schema": {
              "type": [
                "integer",
                "null"
              ]
            }
          },
          {
            "name": "pageMarker",
            "required": false,
            "in": "query",
            "schema": {
              "type": [
                "integer",
                "null"
              ]
            }
          },
          {
            "name": "outdoor",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "startDate",
            "required": false,
            "in": "query",
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "string",
                  "format": "date-time"
                }
              ],
              "description": "The beginning of the range as an ISO 8601 date (`YYYY-MM-DD`, interpreted as UTC) or date-time with a timezone."
            }
          },
          {
            "name": "endDate",
            "required": false,
            "in": "query",
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "string",
                  "format": "date-time"
                }
              ],
              "description": "The end of the range as an ISO 8601 date (`YYYY-MM-DD`, interpreted as UTC) or date-time with a timezone. A date without a time includes the entire UTC day."
            }
          },
          {
            "name": "requireImage",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "API response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicEventsResponse"
                }
              }
            }
          }
        },
        "summary": "List upcoming events",
        "tags": [
          "Calendar"
        ],
        "description": "Returns upcoming events for the organization. Repeat `organizationId` to merge several organizations into one response; each event carries the `organizationId` it belongs to and the partner token must be valid for every organization named. Portal hosts can use `scope=portal` to include events from every member organization; this requires a partner token belonging to the host organization. Rota and intention data follows each event organization's publishing settings.",
        "security": [
          {
            "partnerApiKey": []
          },
          {
            "partnerToken": []
          }
        ]
      }
    },
    "/v3.0.0/events/{id}": {
      "get": {
        "parameters": [
          {
            "name": "organizationId",
            "required": true,
            "in": "query",
            "schema": {
              "type": "integer",
              "exclusiveMinimum": 0
            }
          },
          {
            "name": "imageFormat",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": [
                "integer",
                "null"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "API response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicEventResponse"
                }
              }
            }
          }
        },
        "summary": "Retrieve event details",
        "tags": [
          "Calendar"
        ],
        "security": [
          {
            "partnerApiKey": []
          },
          {
            "partnerToken": []
          }
        ]
      }
    },
    "/v3.0.0/events/categories": {
      "get": {
        "parameters": [
          {
            "name": "organizationId",
            "required": true,
            "in": "query",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "integer"
              },
              "description": "The organization to read. Repeat the parameter to read several organizations in one request (`?organizationId=1&organizationId=2`)."
            }
          }
        ],
        "responses": {
          "200": {
            "description": "API response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicEventCategoriesResponse"
                }
              }
            }
          }
        },
        "summary": "List event categories",
        "tags": [
          "Calendar"
        ],
        "description": "Returns the event categories of the organization. Repeat `organizationId` to merge several organizations into one response; each category carries the `organizationId` it belongs to and the partner token must be valid for every organization named.",
        "security": [
          {
            "partnerApiKey": []
          },
          {
            "partnerToken": []
          }
        ]
      }
    },
    "/v3.0.0/events/resources": {
      "get": {
        "parameters": [
          {
            "name": "organizationId",
            "required": true,
            "in": "query",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "integer"
              },
              "description": "The organization to read. Repeat the parameter to read several organizations in one request (`?organizationId=1&organizationId=2`)."
            }
          }
        ],
        "responses": {
          "200": {
            "description": "API response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicEventResourcesResponse"
                }
              }
            }
          }
        },
        "summary": "List event resources",
        "tags": [
          "Calendar"
        ],
        "description": "Returns the event resources of the organization. Repeat `organizationId` to merge several organizations into one response; each resource carries the `organizationId` it belongs to and the partner token must be valid for every organization named.",
        "security": [
          {
            "partnerApiKey": []
          },
          {
            "partnerToken": []
          }
        ]
      }
    },
    "/v3.0.0/galleries": {
      "get": {
        "parameters": [
          {
            "name": "organizationId",
            "required": true,
            "in": "query",
            "schema": {
              "type": "integer",
              "exclusiveMinimum": 0
            }
          },
          {
            "name": "imageFormat",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "API response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicGalleriesResponse"
                }
              }
            }
          }
        },
        "summary": "List public galleries",
        "tags": [
          "Galleries"
        ],
        "security": [
          {
            "partnerApiKey": []
          },
          {
            "partnerToken": []
          }
        ]
      }
    },
    "/v3.0.0/galleries/{id}": {
      "get": {
        "parameters": [
          {
            "name": "organizationId",
            "required": true,
            "in": "query",
            "schema": {
              "type": "integer",
              "exclusiveMinimum": 0
            }
          },
          {
            "name": "imageFormat",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": [
                "integer",
                "null"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "API response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicGalleryResponse"
                }
              }
            }
          }
        },
        "summary": "Retrieve gallery images",
        "tags": [
          "Galleries"
        ],
        "security": [
          {
            "partnerApiKey": []
          },
          {
            "partnerToken": []
          }
        ]
      }
    },
    "/v3.0.0/info": {
      "get": {
        "parameters": [
          {
            "name": "organizationId",
            "required": true,
            "in": "query",
            "schema": {
              "type": "integer",
              "exclusiveMinimum": 0
            }
          },
          {
            "name": "imageFormat",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "API response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicChurchInfoResponse"
                }
              }
            }
          }
        },
        "summary": "Get church information",
        "tags": [
          "Churchscreen"
        ],
        "security": [
          {
            "partnerApiKey": []
          },
          {
            "partnerToken": []
          }
        ]
      }
    },
    "/v3.0.0/messages": {
      "get": {
        "parameters": [
          {
            "name": "organizationId",
            "required": true,
            "in": "query",
            "schema": {
              "type": "integer",
              "exclusiveMinimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "API response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicMessagesResponse"
                }
              }
            }
          }
        },
        "summary": "List outdoor blog messages",
        "tags": [
          "Blogs"
        ],
        "security": [
          {
            "partnerApiKey": []
          },
          {
            "partnerToken": []
          }
        ]
      }
    },
    "/v3.0.0/newsletters": {
      "get": {
        "parameters": [
          {
            "name": "organizationId",
            "required": true,
            "in": "query",
            "schema": {
              "type": "integer",
              "exclusiveMinimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "API response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicNewslettersResponse"
                }
              }
            }
          }
        },
        "summary": "List newsletters (people tags)",
        "tags": [
          "Newsletter"
        ],
        "security": [
          {
            "partnerApiKey": []
          },
          {
            "partnerToken": []
          }
        ]
      }
    },
    "/v3.0.0/newsletters/subscribe": {
      "post": {
        "parameters": [
          {
            "name": "organizationId",
            "required": true,
            "in": "query",
            "schema": {
              "type": "integer",
              "exclusiveMinimum": 0
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PostApiV300NewslettersSubscribeRequestBody"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "API response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicNewsletterSubscriptionResponse"
                }
              }
            }
          }
        },
        "summary": "Subscribe to newsletter",
        "tags": [
          "Newsletter"
        ],
        "security": [
          {
            "partnerApiKey": []
          },
          {
            "partnerToken": []
          }
        ]
      }
    },
    "/v3.0.0/portal": {
      "get": {
        "parameters": [
          {
            "name": "organizationId",
            "required": true,
            "in": "query",
            "schema": {
              "type": "integer",
              "exclusiveMinimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "API response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicPortalStructureResponse"
                }
              }
            }
          }
        },
        "summary": "Get portal structure",
        "tags": [
          "Portal"
        ],
        "description": "Returns the portals hosted by an organization and their member organizations.",
        "security": [
          {
            "partnerApiKey": []
          },
          {
            "partnerToken": []
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "PartnershipEventResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "number"
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "summary": {
            "type": "string"
          },
          "startDate": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "string",
                "format": "date-time"
              }
            ]
          },
          "endDate": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "string",
                "format": "date-time"
              }
            ]
          },
          "hideEndTime": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "allDay": {
            "type": "boolean"
          },
          "price": {
            "type": [
              "string",
              "null"
            ]
          },
          "contributor": {
            "type": [
              "string",
              "null"
            ]
          },
          "resources": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "number"
                },
                "name": {
                  "type": "string"
                },
                "color": {
                  "type": "number"
                }
              },
              "required": [
                "id",
                "name",
                "color"
              ],
              "additionalProperties": {}
            }
          },
          "image": {
            "type": [
              "string",
              "null"
            ]
          },
          "imageTitle": {
            "type": [
              "string",
              "null"
            ]
          },
          "imageCopyright": {
            "type": [
              "string",
              "null"
            ]
          },
          "location": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "number"
                  },
                  "address": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "address2": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "city": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "zipcode": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "state": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "country": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "longitude": {
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "latitude": {
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "name": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "resourceId": {
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "resourceName": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "locationName": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "uniqueLocationId": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "uniqueLocationId"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "organization": {
            "type": "object",
            "properties": {
              "id": {
                "type": "number"
              },
              "name": {
                "type": "string"
              },
              "language": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "timezone": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "installationUrl": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "countryIso2": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "logo": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "siteAddress": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "siteDomain": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "denomination": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "name"
                ]
              },
              "partnerExternalId": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "name",
              "partnerExternalId"
            ]
          },
          "url": {
            "type": "string"
          },
          "categories": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "number"
                },
                "name": {
                  "type": "string"
                },
                "targetPartnerCategories": {
                  "type": [
                    "array",
                    "null"
                  ],
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "anyOf": [
                          {
                            "type": "number"
                          },
                          {
                            "type": "string"
                          }
                        ]
                      },
                      "machineName": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "id",
                      "machineName"
                    ]
                  }
                }
              },
              "required": [
                "id",
                "name",
                "targetPartnerCategories"
              ]
            }
          }
        },
        "required": [
          "id",
          "startDate",
          "endDate",
          "allDay",
          "resources",
          "organization",
          "url",
          "categories"
        ]
      },
      "PublicBlogsV3Response": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "id": {
              "type": "number"
            },
            "organizationId": {
              "type": "number"
            },
            "title": {
              "type": "string"
            },
            "body": {
              "type": "string"
            },
            "summary": {
              "type": "string"
            },
            "publishDate": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "string",
                  "format": "date-time"
                }
              ]
            },
            "schedulePublish": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "null"
                }
              ]
            },
            "scheduleUnpublish": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "null"
                }
              ]
            },
            "image": {
              "anyOf": [
                {
                  "allOf": [
                    {
                      "type": "object",
                      "additionalProperties": {
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    },
                    {
                      "type": "object",
                      "properties": {
                        "copyright": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "copyright"
                      ]
                    }
                  ]
                },
                {
                  "type": "null"
                }
              ]
            },
            "category": {
              "type": "object",
              "properties": {
                "cid": {
                  "type": "number"
                },
                "name": {
                  "type": "string"
                }
              },
              "required": [
                "cid",
                "name"
              ]
            },
            "url": {
              "type": "string"
            }
          },
          "required": [
            "id",
            "organizationId",
            "title",
            "body",
            "summary",
            "publishDate",
            "schedulePublish",
            "scheduleUnpublish",
            "image",
            "category",
            "url"
          ]
        }
      },
      "PublicBlogCategoriesResponse": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "id": {
              "type": "number"
            },
            "name": {
              "type": "string"
            }
          },
          "required": [
            "id",
            "name"
          ]
        }
      },
      "PublicEventsResponse": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "id": {
              "type": "number"
            },
            "organizationId": {
              "type": "number"
            },
            "title": {
              "type": "string"
            },
            "description": {
              "type": "string"
            },
            "summary": {
              "type": [
                "string",
                "null"
              ]
            },
            "startDate": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "string",
                  "format": "date-time"
                }
              ]
            },
            "endDate": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "string",
                  "format": "date-time"
                }
              ]
            },
            "location": {
              "type": [
                "string",
                "null"
              ]
            },
            "locationObj": {
              "type": [
                "object",
                "null"
              ],
              "properties": {
                "id": {
                  "type": "number"
                },
                "address": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "address2": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "city": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "zipcode": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "state": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "country": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "longitude": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "latitude": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "name": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "location_map": {
                  "type": "object",
                  "properties": {
                    "resourceSourceId": {
                      "type": [
                        "number",
                        "null"
                      ]
                    }
                  }
                }
              },
              "required": [
                "id"
              ]
            },
            "locationName": {
              "type": [
                "string",
                "null"
              ]
            },
            "contributor": {
              "type": [
                "string",
                "null"
              ]
            },
            "price": {
              "type": [
                "string",
                "null"
              ]
            },
            "showEndtime": {
              "type": "boolean"
            },
            "allDay": {
              "type": "boolean"
            },
            "resources": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "number"
                  },
                  "title": {
                    "type": "string"
                  },
                  "color": {
                    "type": "number"
                  }
                },
                "required": [
                  "id",
                  "title",
                  "color"
                ]
              }
            },
            "categories": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "number"
                  },
                  "name": {
                    "type": "string"
                  },
                  "title": {
                    "type": "string"
                  },
                  "color": {
                    "type": "number"
                  }
                },
                "required": [
                  "id",
                  "color"
                ]
              }
            },
            "image": {
              "anyOf": [
                {
                  "allOf": [
                    {
                      "type": "object",
                      "additionalProperties": {
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    },
                    {
                      "type": "object",
                      "properties": {
                        "title": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "copyright": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "required": [
                        "title",
                        "copyright"
                      ]
                    }
                  ]
                },
                {
                  "type": "null"
                }
              ]
            },
            "createdAt": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "string",
                  "format": "date-time"
                }
              ]
            },
            "updatedAt": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "string",
                  "format": "date-time"
                }
              ]
            },
            "parishes": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "number"
                  },
                  "title": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "title"
                ]
              }
            },
            "rotas": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "taskId": {
                    "type": "number"
                  },
                  "title": {
                    "type": "string"
                  },
                  "type": {
                    "type": "string"
                  },
                  "users": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "number"
                        },
                        "fullName": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "fullName"
                      ]
                    }
                  }
                },
                "required": [
                  "taskId",
                  "title",
                  "type",
                  "users"
                ]
              }
            },
            "intentions": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "intentionType": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "intentionTypeAbbreviation": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "text": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "intentionType",
                  "intentionTypeAbbreviation",
                  "text"
                ]
              }
            },
            "formLink": {
              "type": "string"
            },
            "formEmbed": {
              "type": "string"
            }
          },
          "required": [
            "id",
            "organizationId",
            "title",
            "description",
            "startDate",
            "endDate",
            "locationObj",
            "showEndtime",
            "allDay",
            "resources",
            "categories",
            "image",
            "createdAt",
            "updatedAt",
            "parishes",
            "rotas",
            "intentions"
          ]
        }
      },
      "PublicEventResponse": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "number"
              },
              "organizationId": {
                "type": "number"
              },
              "title": {
                "type": "string"
              },
              "cancelledAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "description": {
                "type": "string"
              },
              "summary": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "startDate": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "string",
                    "format": "date-time"
                  }
                ]
              },
              "endDate": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "string",
                    "format": "date-time"
                  }
                ]
              },
              "location": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "price": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "contributor": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "categories": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "number"
                    },
                    "name": {
                      "type": "string"
                    },
                    "color": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "color"
                  ]
                }
              },
              "resources": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "number"
                    },
                    "title": {
                      "type": "string"
                    },
                    "color": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "id",
                    "title",
                    "color"
                  ]
                }
              },
              "parishes": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "number"
                    },
                    "title": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "title"
                  ]
                }
              },
              "allDay": {
                "type": "boolean"
              },
              "image": {
                "anyOf": [
                  {
                    "allOf": [
                      {
                        "type": "object",
                        "additionalProperties": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      {
                        "type": "object",
                        "properties": {
                          "title": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "copyright": {
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "required": [
                          "title",
                          "copyright"
                        ]
                      }
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "hideEndTime": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "rotas": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "taskId": {
                      "type": "number"
                    },
                    "title": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string"
                    },
                    "users": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "number"
                          },
                          "fullName": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "fullName"
                        ]
                      }
                    }
                  },
                  "required": [
                    "taskId",
                    "title",
                    "type",
                    "users"
                  ]
                }
              },
              "intentions": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "intentionType": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "intentionTypeAbbreviation": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "text": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "intentionType",
                    "intentionTypeAbbreviation",
                    "text"
                  ]
                }
              },
              "formLink": {
                "type": "string"
              },
              "formEmbed": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "organizationId",
              "title",
              "cancelledAt",
              "description",
              "startDate",
              "endDate",
              "categories",
              "resources",
              "parishes",
              "allDay",
              "image",
              "rotas",
              "intentions"
            ]
          },
          {
            "type": "object",
            "properties": {},
            "additionalProperties": false
          }
        ]
      },
      "PublicEventCategoriesResponse": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "id": {
              "type": "number"
            },
            "name": {
              "type": "string"
            },
            "organizationId": {
              "type": "number"
            }
          },
          "required": [
            "id",
            "name",
            "organizationId"
          ]
        }
      },
      "PublicEventResourcesResponse": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "id": {
              "type": "number"
            },
            "organizationId": {
              "type": "number"
            },
            "name": {
              "type": "string"
            },
            "color": {
              "type": "number"
            }
          },
          "required": [
            "id",
            "organizationId",
            "name",
            "color"
          ]
        }
      },
      "PublicGalleriesResponse": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "id": {
              "type": "number"
            },
            "title": {
              "type": "string"
            },
            "createdAt": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "string",
                  "format": "date-time"
                }
              ]
            },
            "authorName": {
              "type": "string"
            },
            "imagesCount": {
              "type": "number"
            },
            "coverImage": {
              "type": [
                "object",
                "null"
              ],
              "additionalProperties": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          },
          "required": [
            "id",
            "title",
            "createdAt",
            "authorName",
            "imagesCount",
            "coverImage"
          ]
        }
      },
      "PublicGalleryResponse": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "number"
              },
              "title": {
                "type": "string"
              },
              "images": {
                "type": "array",
                "items": {
                  "allOf": [
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "number"
                        },
                        "title": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "required": [
                        "id"
                      ]
                    },
                    {
                      "type": "object",
                      "additionalProperties": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "number"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    }
                  ]
                }
              }
            },
            "required": [
              "id",
              "title",
              "images"
            ]
          },
          {
            "type": "object",
            "properties": {},
            "additionalProperties": false
          }
        ]
      },
      "PublicChurchInfoResponse": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "address": {
            "type": [
              "string",
              "null"
            ]
          },
          "description": {
            "type": "string"
          },
          "workingHours": {
            "type": "string"
          },
          "moreInfo": {
            "type": [
              "string",
              "null"
            ]
          },
          "image": {
            "type": "object",
            "additionalProperties": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        },
        "required": [
          "name",
          "address",
          "description",
          "workingHours",
          "moreInfo",
          "image"
        ]
      },
      "PublicMessagesResponse": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "id": {
              "type": "number"
            },
            "title": {
              "type": "string"
            },
            "body": {
              "type": "string"
            },
            "summary": {
              "type": [
                "string",
                "null"
              ]
            },
            "body_short": {
              "type": "string"
            },
            "church_name": {
              "type": "string"
            },
            "church_banner": {
              "type": [
                "string",
                "null"
              ]
            },
            "image": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "id",
            "title",
            "body",
            "body_short",
            "church_name",
            "church_banner",
            "image"
          ]
        }
      },
      "PublicNewslettersResponse": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "id": {
              "type": "number"
            },
            "name": {
              "type": "string"
            },
            "createdAt": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "string",
                  "format": "date-time"
                }
              ]
            },
            "updatedAt": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "string",
                  "format": "date-time"
                }
              ]
            },
            "references": {
              "type": "number"
            }
          },
          "required": [
            "id",
            "name",
            "createdAt",
            "updatedAt",
            "references"
          ]
        }
      },
      "PostApiV300NewslettersSubscribeRequestBody": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "phone": {
            "type": "string"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "number"
                }
              },
              "required": [
                "id"
              ]
            }
          },
          "churches": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "number"
                }
              },
              "required": [
                "id"
              ]
            },
            "minItems": 1
          }
        },
        "required": [
          "churches"
        ]
      },
      "PublicNewsletterSubscriptionResponse": {
        "allOf": [
          {
            "$ref": "#/components/schemas/GetPersonResponse"
          },
          {
            "type": "object",
            "properties": {
              "postCode": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "countryIso2": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          }
        ]
      },
      "PublicPortalStructureResponse": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/PublicPortalStructure"
        }
      },
      "GetPersonResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "number"
          },
          "globalPersonId": {
            "type": [
              "string",
              "null"
            ]
          },
          "firstName": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "lastName": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "callName": {
            "type": [
              "string",
              "null"
            ]
          },
          "fullName": {
            "type": [
              "string",
              "null"
            ]
          },
          "title": {
            "type": [
              "string",
              "null"
            ]
          },
          "externalId": {
            "type": [
              "string",
              "null"
            ]
          },
          "externalSource": {
            "type": [
              "string",
              "null"
            ]
          },
          "note": {
            "type": [
              "string",
              "null"
            ]
          },
          "phone": {
            "type": [
              "string",
              "null"
            ]
          },
          "homePhone": {
            "type": [
              "string",
              "null"
            ]
          },
          "workPhone": {
            "type": [
              "string",
              "null"
            ]
          },
          "workMobilePhone": {
            "type": [
              "string",
              "null"
            ]
          },
          "email": {
            "type": [
              "string",
              "null"
            ]
          },
          "emailStatus": {
            "type": [
              "string",
              "null"
            ]
          },
          "occupation": {
            "type": [
              "string",
              "null"
            ]
          },
          "gender": {
            "type": [
              "string",
              "null"
            ]
          },
          "birthday": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "picture": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PersonPicture"
              },
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "createdAt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "deletedAt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "emailNotification": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "string"
              }
            ]
          },
          "smsNotification": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "string"
              }
            ]
          },
          "organization": {
            "type": "object",
            "properties": {
              "id": {
                "type": "number"
              },
              "name": {
                "type": "string"
              }
            }
          },
          "contactId": {
            "type": [
              "number",
              "null"
            ]
          },
          "organizationId": {
            "type": [
              "number",
              "null"
            ]
          },
          "receiveCommunicationFromFilters": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "contributions": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "relations": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/PersonRelation"
                }
              },
              {
                "type": "string"
              }
            ]
          },
          "churches": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/PersonChurch"
                }
              },
              {
                "type": "string"
              }
            ]
          },
          "tags": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/PersonTag"
                }
              },
              {
                "type": "string"
              }
            ]
          },
          "street": {
            "type": [
              "string",
              "null"
            ]
          },
          "city": {
            "type": [
              "string",
              "null"
            ]
          },
          "poBoxNumber": {
            "type": [
              "string",
              "null"
            ]
          },
          "poBoxPostCode": {
            "type": [
              "string",
              "null"
            ]
          },
          "zipcode": {
            "type": [
              "string",
              "null"
            ]
          },
          "country": {
            "type": [
              "string",
              "null"
            ]
          },
          "prefix": {
            "type": [
              "string",
              "null"
            ]
          },
          "formSubmissions": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/PersonFormSubmission"
                }
              },
              {
                "type": "string"
              }
            ]
          },
          "peopleNewsletterLists": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/PersonSegment"
                }
              },
              {
                "type": "string"
              }
            ]
          },
          "participantLists": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/PersonSegment"
                }
              },
              {
                "type": "string"
              }
            ]
          },
          "allergy": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "string"
              }
            ]
          },
          "salutation": {
            "type": [
              "string",
              "null"
            ]
          },
          "formalSalutation": {
            "type": [
              "string",
              "null"
            ]
          },
          "civilStatus": {
            "type": [
              "string",
              "null"
            ]
          },
          "dietary": {
            "type": [
              "string",
              "null"
            ]
          },
          "medicalNote": {
            "type": [
              "string",
              "null"
            ]
          },
          "nationalIdentificationNumber": {
            "type": [
              "string",
              "null"
            ]
          },
          "denomination": {
            "type": [
              "string",
              "null"
            ]
          },
          "baptismDate": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "civilMarriageDate": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "confirmationDate": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "membershipDate": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "dateOfDeath": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "auditLogs": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/PersonAuditLog"
                }
              },
              {
                "type": "string"
              }
            ]
          },
          "canDelete": {
            "type": "boolean"
          },
          "unSubscriptions": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/PersonUnSubscription"
                }
              },
              {
                "type": "string"
              }
            ]
          },
          "consents": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/PersonConsent"
                }
              },
              {
                "type": "string"
              }
            ]
          },
          "fields": {
            "type": "object",
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "canView": {
                      "type": "boolean"
                    },
                    "canEdit": {
                      "type": "boolean"
                    },
                    "canEditExtended": {
                      "type": "boolean"
                    },
                    "canEditSensitive": {
                      "type": "boolean"
                    },
                    "accessType": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "label": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string"
                    },
                    "value": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  }
                },
                {
                  "type": "boolean"
                },
                {
                  "type": "string"
                },
                {
                  "type": "number"
                }
              ]
            }
          },
          "lifeEventMessageOptIn": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/LifeEventMessageOptInItem"
                }
              },
              {
                "type": "string"
              }
            ]
          },
          "canReceiveLifeEventMessage": {
            "type": "boolean"
          },
          "metadata": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string"
              }
            }
          },
          "customFieldsData": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/PersonCustomFieldData"
                }
              },
              {
                "type": "string"
              }
            ]
          },
          "lastContribution": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "settings": {
            "type": "object",
            "properties": {
              "notifications": {
                "type": "object",
                "properties": {
                  "email": {
                    "type": "boolean"
                  },
                  "sms": {
                    "type": "boolean"
                  }
                }
              }
            }
          },
          "primaryEmailSource": {
            "type": "string"
          },
          "user": {
            "$ref": "#/components/schemas/LinkedUser"
          }
        },
        "required": [
          "id",
          "primaryEmailSource"
        ]
      },
      "PublicPortalStructure": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "organizations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublicPortalStructureOrganization"
            }
          }
        },
        "required": [
          "id",
          "name",
          "organizations"
        ],
        "additionalProperties": false
      },
      "PersonPicture": {
        "type": "object",
        "properties": {
          "id": {
            "type": [
              "number",
              "null"
            ]
          },
          "url": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "PersonRelation": {
        "type": "object",
        "properties": {
          "relationId": {
            "type": "number"
          },
          "relation": {
            "type": "string"
          },
          "person": {
            "$ref": "#/components/schemas/RelationPerson"
          },
          "isEmailShared": {
            "type": "boolean"
          },
          "isPhoneShared": {
            "type": "boolean"
          }
        }
      },
      "PersonChurch": {
        "type": "object",
        "properties": {
          "id": {
            "type": "number"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name"
        ]
      },
      "PersonTag": {
        "type": "object",
        "properties": {
          "id": {
            "type": "number"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "id"
        ]
      },
      "PersonFormSubmission": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "personId": {
            "type": "number"
          },
          "formId": {
            "type": "string"
          },
          "submissionId": {
            "type": "string"
          },
          "createdAt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "PersonSegment": {
        "type": "object",
        "properties": {
          "id": {
            "type": "number"
          },
          "name": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "organizationId": {
            "type": "number"
          },
          "subscribed": {
            "type": "boolean"
          }
        }
      },
      "PersonAuditLog": {
        "type": "object",
        "properties": {
          "id": {
            "type": "number"
          },
          "action": {
            "type": "string"
          },
          "createdAt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "changedFields": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "actionTakerUsername": {
            "type": "string"
          },
          "mergePersonFullName": {
            "type": "string"
          },
          "mergePersonId": {
            "type": "number"
          }
        }
      },
      "PersonUnSubscription": {
        "type": "object",
        "properties": {
          "id": {
            "type": "number"
          },
          "listName": {
            "type": "string"
          },
          "listId": {
            "type": "number"
          },
          "unsubscribedAt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "PersonConsent": {
        "type": "object",
        "properties": {
          "id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "number"
              }
            ]
          },
          "personId": {
            "type": "number"
          },
          "dateOfConsent": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "dateOfDoubleOptIn": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "deletedAt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "consentType": {
            "$ref": "#/components/schemas/ConsentType"
          },
          "status": {
            "type": "string"
          },
          "source": {
            "$ref": "#/components/schemas/ConsentSource"
          },
          "deletedBy": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "id": {
                "type": "number"
              },
              "name": {
                "type": "string"
              },
              "picture": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          },
          "deletedBySourceType": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "LifeEventMessageOptInItem": {
        "type": "object",
        "properties": {
          "id": {
            "type": "number"
          },
          "personId": {
            "type": "number"
          },
          "optIn": {
            "type": "boolean"
          },
          "updatedBy": {
            "type": [
              "number",
              "null"
            ]
          },
          "updatedByType": {
            "type": [
              "string",
              "null"
            ]
          },
          "updatedByName": {
            "type": [
              "string",
              "null"
            ]
          },
          "createdAt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "PersonCustomFieldData": {
        "type": "object",
        "properties": {
          "fieldName": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "value": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "number"
              },
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "LinkedUser": {
        "type": "object",
        "properties": {
          "id": {
            "type": "number"
          },
          "email": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "inactive",
              "blocked"
            ]
          },
          "roles": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "name"
              ]
            }
          },
          "firstName": {
            "type": [
              "string",
              "null"
            ]
          },
          "lastName": {
            "type": [
              "string",
              "null"
            ]
          },
          "fullName": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "email",
          "status",
          "roles",
          "firstName",
          "lastName",
          "fullName"
        ]
      },
      "PublicPortalStructureOrganization": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "name": {
            "type": "string"
          },
          "isHost": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "name",
          "isHost"
        ],
        "additionalProperties": false
      },
      "RelationPerson": {
        "type": "object",
        "properties": {
          "personId": {
            "type": "number"
          },
          "firstName": {
            "type": [
              "string",
              "null"
            ]
          },
          "lastName": {
            "type": [
              "string",
              "null"
            ]
          },
          "fullName": {
            "type": [
              "string",
              "null"
            ]
          },
          "email": {
            "type": [
              "string",
              "null"
            ]
          },
          "picture": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PersonPicture"
              },
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "ConsentType": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "link": {
            "type": [
              "string",
              "null"
            ]
          },
          "organizationId": {
            "type": "number"
          },
          "defaultConsent": {
            "type": "boolean"
          }
        }
      },
      "ConsentSource": {
        "type": "object",
        "properties": {
          "id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "type": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "picture": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      }
    },
    "securitySchemes": {
      "partnerApiKey": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Key",
        "description": "Preferred: send the partner token in the X-API-Key header."
      },
      "partnerToken": {
        "type": "apiKey",
        "in": "query",
        "name": "partnerToken",
        "description": "Legacy option: send the partner token as a query parameter."
      }
    }
  }
}
