{
  "openapi": "3.1.0",
  "info": {
    "title": "ChurchDesk Public API v2.0.0",
    "version": "2.0.0",
    "description": "Use ChurchDesk Public API v2.0.0 to fetch ChurchDesk data on demand.\n\n## Base URL\n\nAll endpoints are served from `https://api.churchdesk.com`, and the paths below already include the `/v2.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/v2.0.0/events?organizationId=<ORGANIZATION-ID>'\n```\n\nDo not add an `/api` prefix — `https://api.churchdesk.com/api/v2.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."
    }
  ],
  "paths": {
    "/v2.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": "imageFormat",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cid",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "requireImage",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "API response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicBlogsResponse"
                }
              }
            }
          }
        },
        "summary": "List blog posts",
        "tags": [
          "Churchscreen"
        ],
        "description": "Returns the most recent blog posts. Repeat `organizationId` to merge several organizations into one response; each post carries the `organizationId` it belongs to and the partner token must be valid for every organization named.",
        "security": [
          {
            "partnerApiKey": []
          },
          {
            "partnerToken": []
          }
        ]
      }
    },
    "/v2.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": []
          }
        ]
      }
    },
    "/v2.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": []
          }
        ]
      }
    },
    "/v2.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": []
          }
        ]
      }
    },
    "/v2.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": []
          }
        ]
      }
    },
    "/v2.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": []
          }
        ]
      }
    },
    "/v2.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": []
          }
        ]
      }
    },
    "/v2.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": []
          }
        ]
      }
    },
    "/v2.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": []
          }
        ]
      }
    },
    "/v2.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": []
          }
        ]
      }
    },
    "/v2.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": []
          }
        ]
      }
    },
    "/v2.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/PostApiV200NewslettersSubscribeRequestBody"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "API response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicNewsletterSubscriptionResponse"
                }
              }
            }
          }
        },
        "summary": "Subscribe to newsletter",
        "tags": [
          "Newsletter"
        ],
        "security": [
          {
            "partnerApiKey": []
          },
          {
            "partnerToken": []
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "PublicBlogsResponse": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "id": {
              "type": "number"
            },
            "organizationId": {
              "type": "number"
            },
            "title": {
              "type": "string"
            },
            "description": {
              "type": "string"
            },
            "summary": {
              "type": "string"
            },
            "publishDate": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "string",
                  "format": "date-time"
                }
              ]
            },
            "image": {
              "anyOf": [
                {
                  "allOf": [
                    {
                      "type": "object",
                      "additionalProperties": {
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    },
                    {
                      "type": "object",
                      "properties": {
                        "copyright": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "copyright"
                      ]
                    }
                  ]
                },
                {
                  "type": "null"
                }
              ]
            },
            "descriptionShort": {
              "type": "string"
            }
          },
          "required": [
            "id",
            "organizationId",
            "title",
            "description",
            "summary",
            "publishDate",
            "image",
            "descriptionShort"
          ]
        }
      },
      "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"
          ]
        }
      },
      "PostApiV200NewslettersSubscribeRequestBody": {
        "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"
                ]
              }
            }
          }
        ]
      },
      "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"
        ]
      },
      "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"
        ]
      },
      "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."
      }
    }
  }
}
