{
  "openapi": "3.0.1",
  "info": {
    "title": "OnStage Public API",
    "version": "v1"
  },
  "servers": [
    {
      "url": "https://api.on-stage.app",
      "description": "Production"
    }
  ],
  "tags": [
    {
      "name": "Authentication",
      "description": "Exchange your client ID and secret for an access token."
    },
    {
      "name": "Team",
      "description": "Your token and the team's daily limit, the team's people, and their availability."
    },
    {
      "name": "Events",
      "description": "Read, duplicate, change, publish and delete events, set their reminders, and answer invitations."
    },
    {
      "name": "Setlist",
      "description": "Build and change an event's setlist."
    },
    {
      "name": "People",
      "description": "Who serves in an event, and creating many events with their people at once."
    },
    {
      "name": "Rehearsals",
      "description": "An event's rehearsals."
    },
    {
      "name": "Blockouts",
      "description": "The token owner's own blockouts."
    },
    {
      "name": "Songs",
      "description": "The team's song library and its artists."
    },
    {
      "name": "Song files",
      "description": "Attach PDF and audio files to songs."
    },
    {
      "name": "Batches",
      "description": "Follow and undo bulk writes."
    },
    {
      "name": "Reports",
      "description": "Serving, song usage and insights reports."
    },
    {
      "name": "Presentation software",
      "description": "Events shaped as services, for presentation software such as Holyrics and FreeShow."
    }
  ],
  "paths": {
    "/integrations/v1/events/{eventId}/setlist": {
      "put": {
        "tags": [
          "Setlist"
        ],
        "summary": "Replace a setlist",
        "description": "Replaces an event's whole setlist with the items given. Previews by default; send dryRun false to apply.",
        "operationId": "integrationReplaceSetlist",
        "parameters": [
          {
            "name": "eventId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetlistBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BatchResult"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/integrations/v1/events/{eventId}/reminders": {
      "put": {
        "tags": [
          "Events"
        ],
        "summary": "Set an event's reminders",
        "description": "Replaces an event's reminders: how many days before and at what time the people serving are reminded. Previews by default; send dryRun false to apply.",
        "operationId": "integrationReplaceEventReminders",
        "parameters": [
          {
            "name": "eventId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EventRemindersBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BatchResult"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/oauth/token": {
      "post": {
        "tags": [
          "Authentication"
        ],
        "summary": "Get an access token",
        "description": "Exchanges your client ID and secret (grant_type=client_credentials, with HTTP Basic or in the form body) for an access token that lasts one hour.",
        "operationId": "exchangeOAuthToken",
        "parameters": [
          {
            "name": "params",
            "in": "query",
            "required": true,
            "schema": {
              "type": "object",
              "additionalProperties": {
                "type": "string"
              }
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {
                  "type": "string"
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TokenResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/integrations/v1/songs/{songId}/files": {
      "post": {
        "tags": [
          "Song files"
        ],
        "summary": "Start a song file upload",
        "description": "Starts attaching a PDF or audio file to a song: answers a URL to upload the file to. Finish it with Finish a song file upload.",
        "operationId": "beginUpload",
        "parameters": [
          {
            "name": "songId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BeginSongFileUploadRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BeginSongFileUploadResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/integrations/v1/songs/{songId}/files/{fileId}/complete": {
      "post": {
        "tags": [
          "Song files"
        ],
        "summary": "Finish a song file upload",
        "description": "Finishes a file upload started with Start a song file upload, so the file shows on the song.",
        "operationId": "completeUpload",
        "parameters": [
          {
            "name": "songId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fileId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntegrationSongFileSummary"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/integrations/v1/songs/batches": {
      "post": {
        "tags": [
          "Songs"
        ],
        "summary": "Add songs in bulk",
        "description": "Adds many songs to the team's library at once, with their sections or ChordPro, and decides what happens to duplicates. Previews by default; send dryRun false to apply.",
        "operationId": "uploadSongs",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SongBatchRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BatchResult"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/integrations/v1/schedule/batches": {
      "post": {
        "tags": [
          "People"
        ],
        "summary": "Create events in bulk",
        "description": "Creates many events at once, with their setlists and the people serving, optionally publishing them. Previews by default; send dryRun false to apply.",
        "operationId": "uploadSchedule",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScheduleBatchRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BatchResult"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/integrations/v1/events/{eventId}/setlist/reorder": {
      "post": {
        "tags": [
          "Setlist"
        ],
        "summary": "Reorder the setlist",
        "description": "Puts an event's setlist items in the order given by their ids. Applies at once and returns the event.",
        "operationId": "integrationReorderSetlist",
        "parameters": [
          {
            "name": "eventId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReorderSetlistBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntegrationEvent"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/integrations/v1/events/{eventId}/setlist/items": {
      "post": {
        "tags": [
          "Setlist"
        ],
        "summary": "Add a setlist item",
        "description": "Adds a song or a moment to an event's setlist, at a position or at the end. Applies at once and returns the event.",
        "operationId": "integrationAddSetlistItem",
        "parameters": [
          {
            "name": "eventId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddSetlistItemBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntegrationEvent"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/integrations/v1/events/{eventId}/response": {
      "post": {
        "tags": [
          "Events"
        ],
        "summary": "Answer an event invitation",
        "description": "Accepts or declines the token owner's own invitation to an event.",
        "operationId": "integrationRespondToEvent",
        "parameters": [
          {
            "name": "eventId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EventResponseBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvitationAnswer"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/integrations/v1/events/{eventId}/rehearsals": {
      "get": {
        "tags": [
          "Rehearsals"
        ],
        "summary": "List an event's rehearsals",
        "description": "Lists the rehearsals of an event, with their dates and locations.",
        "operationId": "integrationGetRehearsals",
        "parameters": [
          {
            "name": "eventId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/IntegrationRehearsal"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Rehearsals"
        ],
        "summary": "Add a rehearsal",
        "description": "Adds a rehearsal to an event. Applies at once.",
        "operationId": "integrationAddRehearsal",
        "parameters": [
          {
            "name": "eventId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RehearsalBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntegrationRehearsal"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/integrations/v1/events/{eventId}/duplicate": {
      "post": {
        "tags": [
          "Events"
        ],
        "summary": "Duplicate an event",
        "description": "Copies an event, with its setlist, positions and reminders, into a new draft. Optionally give the copy a new name and date. Applies at once.",
        "operationId": "integrationDuplicateEvent",
        "parameters": [
          {
            "name": "eventId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DuplicateEventBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntegrationEvent"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/integrations/v1/events/publish": {
      "post": {
        "tags": [
          "Events"
        ],
        "summary": "Publish events",
        "description": "Publishes draft events so the people serving are invited. Previews by default; send dryRun false to apply.",
        "operationId": "integrationPublishEvents",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PublishEventsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BatchResult"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/integrations/v1/blockouts": {
      "post": {
        "tags": [
          "Blockouts"
        ],
        "summary": "Add a blockout",
        "description": "Adds a blockout for the token owner: dates they are not available, with an optional reason.",
        "operationId": "integrationAddBlockout",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BlockoutBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntegrationBlockout"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/integrations/v1/songs/{songId}": {
      "get": {
        "tags": [
          "Songs"
        ],
        "summary": "Get a song",
        "description": "Gets one song: its key, tempo, time signature, themes, CCLI number, sections and files.",
        "operationId": "integrationGetSong",
        "parameters": [
          {
            "name": "songId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntegrationSong"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Songs"
        ],
        "summary": "Change a song",
        "description": "Changes a song's details or content: title, artist, key, tempo, themes, CCLI, copyright, sections or ChordPro. Previews by default; send dryRun false to apply.",
        "operationId": "integrationUpdateSong",
        "parameters": [
          {
            "name": "songId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateSongBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BatchResult"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/integrations/v1/events/{eventId}": {
      "get": {
        "tags": [
          "Events"
        ],
        "summary": "Get an event",
        "description": "Gets one event: its details, setlist, reminders and, unless includeParticipants is false, who is serving.",
        "operationId": "integrationGetEvent",
        "parameters": [
          {
            "name": "eventId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "includeParticipants",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntegrationEvent"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Events"
        ],
        "summary": "Delete an event",
        "description": "Deletes an event. Previews by default; add ?dryRun=false to delete it.",
        "operationId": "integrationDeleteEvent",
        "parameters": [
          {
            "name": "eventId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "notify",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "dryRun",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "object"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Events"
        ],
        "summary": "Change an event",
        "description": "Changes an event's name, date, time or location. Previews by default; send dryRun false to apply.",
        "operationId": "integrationUpdateEvent",
        "parameters": [
          {
            "name": "eventId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateEventBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BatchResult"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/integrations/v1/events/{eventId}/setlist/items/{itemId}": {
      "delete": {
        "tags": [
          "Setlist"
        ],
        "summary": "Remove a setlist item",
        "description": "Removes one item from an event's setlist. Applies at once and returns the event.",
        "operationId": "integrationDeleteSetlistItem",
        "parameters": [
          {
            "name": "eventId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "itemId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntegrationEvent"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Setlist"
        ],
        "summary": "Change a setlist item",
        "description": "Changes one setlist item: its key, duration, name, description or position. Applies at once and returns the event.",
        "operationId": "integrationUpdateSetlistItem",
        "parameters": [
          {
            "name": "eventId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "itemId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateSetlistItemBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntegrationEvent"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/integrations/v1/events/{eventId}/rehearsals/{rehearsalId}": {
      "delete": {
        "tags": [
          "Rehearsals"
        ],
        "summary": "Remove a rehearsal",
        "description": "Removes a rehearsal from an event. Applies at once.",
        "operationId": "integrationDeleteRehearsal",
        "parameters": [
          {
            "name": "eventId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rehearsalId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Rehearsals"
        ],
        "summary": "Change a rehearsal",
        "description": "Changes a rehearsal's name, date or location. Applies at once.",
        "operationId": "integrationUpdateRehearsal",
        "parameters": [
          {
            "name": "eventId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rehearsalId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RehearsalBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntegrationRehearsal"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/integrations/v1/events/{eventId}/participants": {
      "patch": {
        "tags": [
          "People"
        ],
        "summary": "Change who is serving",
        "description": "Adds, removes or replaces the people serving in an event's positions, and decides what happens when someone has a blockout. Previews by default; send dryRun false to apply.",
        "operationId": "integrationUpdateParticipants",
        "parameters": [
          {
            "name": "eventId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ParticipantsBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BatchResult"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/integrations/v1/team/context": {
      "get": {
        "tags": [
          "Team"
        ],
        "summary": "Get the team context",
        "description": "Gets the team at a glance: its members, groups and positions, event templates, your time zone and your own member record. Read it before planning events.",
        "operationId": "getContext",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TeamContextResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/integrations/v1/team/availability": {
      "get": {
        "tags": [
          "Team"
        ],
        "summary": "Get team availability",
        "description": "Lists the team's blockouts between two dates: who is unavailable, when and why.",
        "operationId": "getAvailability",
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AvailabilityEntry"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/integrations/v1/songs": {
      "get": {
        "tags": [
          "Songs"
        ],
        "summary": "Search songs",
        "description": "Searches the team's song library by title or artist, a page at a time.",
        "operationId": "search",
        "parameters": [
          {
            "name": "query",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/IntegrationSongSummary"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/integrations/v1/services": {
      "get": {
        "tags": [
          "Presentation software"
        ],
        "summary": "List services for presentation software",
        "description": "Lists upcoming events shaped as services, the way presentation software such as Holyrics and FreeShow reads them.",
        "operationId": "getServices",
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetPresenterServicesResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/integrations/v1/services/{eventId}": {
      "get": {
        "tags": [
          "Presentation software"
        ],
        "summary": "Get a service for presentation software",
        "description": "Gets one event as a service, with each song's lyrics in slide-sized sections.",
        "operationId": "getService",
        "parameters": [
          {
            "name": "eventId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PresenterServiceDetail"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/integrations/v1/reports/{report}": {
      "get": {
        "tags": [
          "Reports"
        ],
        "summary": "Get a report",
        "description": "Gets one report for a date range: serving_summary, song_usage, upcoming_events, availability, or one of the insights reports (insights_overview, insights_members, insights_member, insights_events, insights_songs, insights_adoption). Some reports need a role that sees all events.",
        "operationId": "getReport",
        "parameters": [
          {
            "name": "report",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "order",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "teamMemberId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/integrations/v1/me": {
      "get": {
        "tags": [
          "Team"
        ],
        "summary": "Get your token details and daily limit",
        "description": "Who the token acts for, its team, role and scopes, and the team's daily request limit: how many requests it allows, how many are used today and when the count resets.",
        "operationId": "integrationGetMe",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntegrationMe"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/integrations/v1/events": {
      "get": {
        "tags": [
          "Events"
        ],
        "summary": "List events",
        "description": "Lists the team's events between two dates, with their setlists and, unless includeParticipants is false, who is serving.",
        "operationId": "getEvents",
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "includeParticipants",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/IntegrationEvent"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/integrations/v1/batches": {
      "get": {
        "tags": [
          "Batches"
        ],
        "summary": "List recent batches",
        "description": "Lists the team's most recent batches (previews and applied writes), newest first.",
        "operationId": "getBatches",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/BatchResult"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/integrations/v1/batches/{id}": {
      "get": {
        "tags": [
          "Batches"
        ],
        "summary": "Get a batch",
        "description": "Gets one batch: its status, what it changed or would change, and any items that failed. Poll it after a write that answered 202.",
        "operationId": "getBatch",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BatchResult"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Batches"
        ],
        "summary": "Undo a batch",
        "description": "Undoes an applied batch, within 7 days. Answers 202 and undoes it in the background.",
        "operationId": "undoBatch",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BatchResult"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/integrations/v1/artists": {
      "get": {
        "tags": [
          "Songs"
        ],
        "summary": "List artists",
        "description": "Lists the artists in the team's song library, optionally filtered by a search text.",
        "operationId": "integrationGetArtists",
        "parameters": [
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/IntegrationArtist"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/integrations/v1/blockouts/{blockoutId}": {
      "delete": {
        "tags": [
          "Blockouts"
        ],
        "summary": "Remove a blockout",
        "description": "Removes one of the token owner's blockouts.",
        "operationId": "integrationDeleteBlockout",
        "parameters": [
          {
            "name": "blockoutId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "SetlistBody": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SetlistItemInput"
            }
          },
          "dryRun": {
            "type": "boolean"
          },
          "idempotencyKey": {
            "type": "string"
          },
          "notify": {
            "type": "boolean"
          }
        }
      },
      "SetlistItemInput": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string"
          },
          "eventItemId": {
            "type": "string"
          },
          "song": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "durationSeconds": {
            "type": "integer",
            "format": "int32"
          },
          "leadVocals": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "participants": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "BatchCounts": {
        "required": [
          "created",
          "failed",
          "pending",
          "skipped",
          "undone"
        ],
        "type": "object",
        "properties": {
          "pending": {
            "type": "integer",
            "format": "int32"
          },
          "created": {
            "type": "integer",
            "format": "int32"
          },
          "skipped": {
            "type": "integer",
            "format": "int32"
          },
          "failed": {
            "type": "integer",
            "format": "int32"
          },
          "undone": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "BatchEntityType": {
        "type": "string",
        "enum": [
          "EVENT",
          "STAGER",
          "SONG",
          "EVENT_ITEM"
        ]
      },
      "BatchItem": {
        "required": [
          "entityId",
          "entityType",
          "error",
          "index",
          "label",
          "parentIndex",
          "status",
          "warnings"
        ],
        "type": "object",
        "properties": {
          "index": {
            "type": "integer",
            "format": "int32"
          },
          "parentIndex": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "status": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/BatchItemStatus"
              }
            ]
          },
          "entityType": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/BatchEntityType"
              }
            ]
          },
          "entityId": {
            "type": "string",
            "nullable": true
          },
          "label": {
            "type": "string",
            "nullable": true
          },
          "error": {
            "type": "string",
            "nullable": true
          },
          "warnings": {
            "type": "array",
            "nullable": true,
            "items": {
              "type": "string"
            }
          }
        }
      },
      "BatchItemStatus": {
        "type": "string",
        "enum": [
          "PENDING",
          "CREATED",
          "SKIPPED",
          "FAILED",
          "UNDONE"
        ]
      },
      "BatchKind": {
        "type": "string",
        "enum": [
          "SCHEDULE",
          "SONGS",
          "UNDO",
          "PARTICIPANTS",
          "SETLIST",
          "PUBLISH",
          "EVENT_UPDATE",
          "SONG_UPDATE",
          "EVENT_REMINDERS"
        ]
      },
      "BatchResult": {
        "required": [
          "counts",
          "createdAt",
          "done",
          "failureReason",
          "finishedAt",
          "id",
          "items",
          "kind",
          "options",
          "preview",
          "startedAt",
          "status",
          "summary",
          "total",
          "undoesBatchId",
          "undoneAt"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": true
          },
          "kind": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/BatchKind"
              }
            ]
          },
          "status": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/BatchStatus"
              }
            ]
          },
          "preview": {
            "type": "boolean"
          },
          "undoesBatchId": {
            "type": "string",
            "nullable": true
          },
          "options": {
            "type": "object",
            "additionalProperties": {
              "type": "object"
            },
            "nullable": true
          },
          "summary": {
            "type": "object",
            "additionalProperties": {
              "type": "object"
            },
            "nullable": true
          },
          "counts": {
            "type": "object",
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/BatchCounts"
              }
            ]
          },
          "done": {
            "type": "integer",
            "format": "int32"
          },
          "total": {
            "type": "integer",
            "format": "int32"
          },
          "failureReason": {
            "type": "string",
            "nullable": true
          },
          "items": {
            "type": "array",
            "nullable": true,
            "items": {
              "$ref": "#/components/schemas/BatchItem"
            }
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "startedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "finishedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "undoneAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        }
      },
      "BatchStatus": {
        "type": "string",
        "enum": [
          "PREVIEW",
          "QUEUED",
          "APPLYING",
          "APPLIED",
          "PARTIAL",
          "FAILED",
          "UNDONE"
        ]
      },
      "EventRemindersBody": {
        "type": "object",
        "properties": {
          "reminders": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReminderInput"
            }
          },
          "dryRun": {
            "type": "boolean"
          },
          "idempotencyKey": {
            "type": "string"
          }
        }
      },
      "LocalTime": {
        "type": "object",
        "properties": {
          "hour": {
            "type": "integer",
            "format": "int32"
          },
          "minute": {
            "type": "integer",
            "format": "int32"
          },
          "second": {
            "type": "integer",
            "format": "int32"
          },
          "nano": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "ReminderInput": {
        "type": "object",
        "properties": {
          "daysBefore": {
            "type": "integer",
            "format": "int32"
          },
          "time": {
            "$ref": "#/components/schemas/LocalTime"
          }
        }
      },
      "TokenResponse": {
        "required": [
          "access_token",
          "created_at",
          "expires_in",
          "refresh_token",
          "scope",
          "team_id",
          "team_name",
          "token_type"
        ],
        "type": "object",
        "properties": {
          "access_token": {
            "type": "string",
            "nullable": true
          },
          "refresh_token": {
            "type": "string",
            "nullable": true
          },
          "token_type": {
            "type": "string",
            "nullable": true
          },
          "expires_in": {
            "type": "integer",
            "format": "int64"
          },
          "created_at": {
            "type": "integer",
            "format": "int64"
          },
          "scope": {
            "type": "string",
            "nullable": true
          },
          "team_id": {
            "type": "string",
            "nullable": true
          },
          "team_name": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "BeginSongFileUploadRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "contentType": {
            "type": "string"
          },
          "size": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "BeginSongFileUploadResponse": {
        "required": [
          "expiresAt",
          "fileId",
          "headers",
          "method",
          "uploadUrl"
        ],
        "type": "object",
        "properties": {
          "fileId": {
            "type": "string",
            "nullable": true
          },
          "uploadUrl": {
            "type": "string",
            "nullable": true
          },
          "method": {
            "type": "string",
            "nullable": true
          },
          "headers": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "nullable": true
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        }
      },
      "IntegrationSongFileSummary": {
        "required": [
          "fileId",
          "name",
          "size",
          "type"
        ],
        "type": "object",
        "properties": {
          "fileId": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "type": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/SongFileType"
              }
            ]
          },
          "size": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          }
        }
      },
      "SongFileType": {
        "type": "string",
        "enum": [
          "audio",
          "pdf",
          "other",
          "link"
        ]
      },
      "SongBatchInput": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "artist": {
            "type": "string"
          },
          "key": {
            "type": "string"
          },
          "tempo": {
            "type": "integer",
            "format": "int32"
          },
          "timeSignature": {
            "type": "string"
          },
          "ccli": {
            "type": "string"
          },
          "copyright": {
            "type": "string"
          },
          "themes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "chordpro": {
            "type": "string"
          },
          "sections": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SongSectionInput"
            }
          }
        }
      },
      "SongBatchRequest": {
        "type": "object",
        "properties": {
          "dryRun": {
            "type": "boolean"
          },
          "onDuplicate": {
            "type": "string"
          },
          "idempotencyKey": {
            "type": "string"
          },
          "songs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SongBatchInput"
            }
          }
        }
      },
      "SongSectionInput": {
        "type": "object",
        "properties": {
          "label": {
            "type": "string"
          },
          "number": {
            "type": "integer",
            "format": "int32"
          },
          "content": {
            "type": "string"
          }
        }
      },
      "AssignmentInput": {
        "type": "object",
        "properties": {
          "teamMemberId": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "group": {
            "type": "string"
          },
          "position": {
            "type": "string"
          }
        }
      },
      "ScheduleBatchRequest": {
        "type": "object",
        "properties": {
          "dryRun": {
            "type": "boolean"
          },
          "publish": {
            "type": "boolean"
          },
          "onBlockout": {
            "type": "string"
          },
          "onDuplicateEvent": {
            "type": "string"
          },
          "idempotencyKey": {
            "type": "string"
          },
          "events": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ScheduleEventInput"
            }
          }
        }
      },
      "ScheduleEventInput": {
        "type": "object",
        "properties": {
          "dateTime": {
            "type": "string",
            "format": "date-time"
          },
          "name": {
            "type": "string"
          },
          "template": {
            "type": "string"
          },
          "location": {
            "type": "string"
          },
          "participants": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AssignmentInput"
            }
          }
        }
      },
      "ReorderSetlistBody": {
        "type": "object",
        "properties": {
          "itemIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "EventStatus": {
        "type": "string",
        "enum": [
          "draft",
          "published",
          "deleted",
          "created"
        ]
      },
      "IntegrationEvent": {
        "required": [
          "dateTime",
          "id",
          "location",
          "name",
          "participants",
          "setlist",
          "status",
          "templateId",
          "totalDurationSeconds"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "dateTime": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "location": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/EventStatus"
              }
            ]
          },
          "templateId": {
            "type": "string",
            "nullable": true
          },
          "participants": {
            "type": "array",
            "nullable": true,
            "items": {
              "$ref": "#/components/schemas/RosterEntry"
            }
          },
          "setlist": {
            "type": "array",
            "nullable": true,
            "items": {
              "$ref": "#/components/schemas/SetlistEntry"
            }
          },
          "totalDurationSeconds": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          }
        }
      },
      "ParticipationStatus": {
        "type": "string",
        "enum": [
          "CONFIRMED",
          "DECLINED",
          "PENDING",
          "UNINVITED"
        ]
      },
      "RosterEntry": {
        "required": [
          "groupName",
          "name",
          "participationStatus",
          "positionName",
          "stagerId",
          "teamMemberId"
        ],
        "type": "object",
        "properties": {
          "stagerId": {
            "type": "string",
            "nullable": true
          },
          "teamMemberId": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "groupName": {
            "type": "string",
            "nullable": true
          },
          "positionName": {
            "type": "string",
            "nullable": true
          },
          "participationStatus": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/ParticipationStatus"
              }
            ]
          }
        }
      },
      "SetlistEntry": {
        "required": [
          "artist",
          "description",
          "durationSeconds",
          "eventItemId",
          "key",
          "leadVocals",
          "name",
          "participants",
          "position",
          "songId",
          "type"
        ],
        "type": "object",
        "properties": {
          "position": {
            "type": "integer",
            "format": "int32"
          },
          "type": {
            "type": "string",
            "nullable": true
          },
          "eventItemId": {
            "type": "string",
            "nullable": true
          },
          "songId": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "artist": {
            "type": "string",
            "nullable": true
          },
          "key": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "durationSeconds": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "leadVocals": {
            "type": "array",
            "nullable": true,
            "items": {
              "$ref": "#/components/schemas/SetlistPerson"
            }
          },
          "participants": {
            "type": "array",
            "nullable": true,
            "items": {
              "$ref": "#/components/schemas/SetlistPerson"
            }
          }
        }
      },
      "SetlistPerson": {
        "required": [
          "name",
          "teamMemberId"
        ],
        "type": "object",
        "properties": {
          "teamMemberId": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "AddSetlistItemBody": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string"
          },
          "songId": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "durationSeconds": {
            "type": "integer",
            "format": "int32"
          },
          "position": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "EventResponseBody": {
        "type": "object",
        "properties": {
          "response": {
            "type": "string"
          }
        }
      },
      "InvitationAnswer": {
        "required": [
          "eventId",
          "participationStatus"
        ],
        "type": "object",
        "properties": {
          "eventId": {
            "type": "string"
          },
          "participationStatus": {
            "type": "string"
          }
        }
      },
      "RehearsalBody": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "dateTime": {
            "type": "string",
            "format": "date-time"
          },
          "location": {
            "type": "string"
          }
        }
      },
      "IntegrationRehearsal": {
        "required": [
          "dateTime",
          "eventId",
          "id",
          "location",
          "name"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "eventId": {
            "type": "string"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "dateTime": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "location": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "DuplicateEventBody": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "dateTime": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "PublishEventsRequest": {
        "type": "object",
        "properties": {
          "eventIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "dryRun": {
            "type": "boolean"
          },
          "idempotencyKey": {
            "type": "string"
          }
        }
      },
      "BlockoutBody": {
        "type": "object",
        "properties": {
          "startDate": {
            "type": "string",
            "format": "date-time"
          },
          "endDate": {
            "type": "string",
            "format": "date-time"
          },
          "reason": {
            "type": "string"
          }
        }
      },
      "IntegrationBlockout": {
        "required": [
          "endDate",
          "id",
          "reason",
          "startDate"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "startDate": {
            "type": "string",
            "format": "date-time"
          },
          "endDate": {
            "type": "string",
            "format": "date-time"
          },
          "reason": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "UpdateSongBody": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "artist": {
            "type": "string"
          },
          "key": {
            "type": "string"
          },
          "tempo": {
            "type": "integer",
            "format": "int32"
          },
          "timeSignature": {
            "type": "string"
          },
          "ccli": {
            "type": "string"
          },
          "copyright": {
            "type": "string"
          },
          "themes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "chordpro": {
            "type": "string"
          },
          "sections": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SongSectionInput"
            }
          },
          "dryRun": {
            "type": "boolean"
          },
          "idempotencyKey": {
            "type": "string"
          }
        }
      },
      "UpdateEventBody": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "dateTime": {
            "type": "string",
            "format": "date-time"
          },
          "location": {
            "type": "string"
          },
          "dryRun": {
            "type": "boolean"
          },
          "idempotencyKey": {
            "type": "string"
          },
          "notify": {
            "type": "boolean"
          }
        }
      },
      "UpdateSetlistItemBody": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "durationSeconds": {
            "type": "integer",
            "format": "int32"
          },
          "description": {
            "type": "string"
          },
          "leadVocals": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "ParticipantRemoval": {
        "type": "object",
        "properties": {
          "teamMemberId": {
            "type": "string"
          },
          "group": {
            "type": "string"
          },
          "position": {
            "type": "string"
          }
        }
      },
      "ParticipantReplacement": {
        "type": "object",
        "properties": {
          "from": {
            "type": "string"
          },
          "to": {
            "type": "string"
          },
          "group": {
            "type": "string"
          },
          "position": {
            "type": "string"
          }
        }
      },
      "ParticipantsBody": {
        "type": "object",
        "properties": {
          "add": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AssignmentInput"
            }
          },
          "remove": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ParticipantRemoval"
            }
          },
          "replace": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ParticipantReplacement"
            }
          },
          "onBlockout": {
            "type": "string"
          },
          "dryRun": {
            "type": "boolean"
          },
          "idempotencyKey": {
            "type": "string"
          }
        }
      },
      "MemberInviteStatus": {
        "type": "string",
        "enum": [
          "confirmed",
          "pending",
          "declined",
          "inactive"
        ]
      },
      "MemberRole": {
        "type": "string",
        "enum": [
          "owner",
          "admin",
          "editor",
          "scheduler",
          "member"
        ]
      },
      "TeamContextEventTemplate": {
        "required": [
          "id",
          "name"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "TeamContextGroup": {
        "required": [
          "id",
          "isDefault",
          "name",
          "positions"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "isDefault": {
            "type": "boolean",
            "nullable": true
          },
          "positions": {
            "type": "array",
            "nullable": true,
            "items": {
              "$ref": "#/components/schemas/TeamContextPosition"
            }
          }
        }
      },
      "TeamContextMe": {
        "required": [
          "role",
          "teamMemberId"
        ],
        "type": "object",
        "properties": {
          "teamMemberId": {
            "type": "string",
            "nullable": true
          },
          "role": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/MemberRole"
              }
            ]
          }
        }
      },
      "TeamContextMember": {
        "required": [
          "email",
          "inviteStatus",
          "name",
          "role",
          "teamMemberId",
          "userId"
        ],
        "type": "object",
        "properties": {
          "teamMemberId": {
            "type": "string",
            "nullable": true
          },
          "userId": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true
          },
          "role": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/MemberRole"
              }
            ]
          },
          "inviteStatus": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/MemberInviteStatus"
              }
            ]
          }
        }
      },
      "TeamContextPosition": {
        "required": [
          "id",
          "name"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "TeamContextResponse": {
        "required": [
          "actorTimezone",
          "eventTemplates",
          "groups",
          "me",
          "members",
          "team"
        ],
        "type": "object",
        "properties": {
          "team": {
            "type": "object",
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/TeamContextTeam"
              }
            ]
          },
          "actorTimezone": {
            "type": "string",
            "nullable": true
          },
          "members": {
            "type": "array",
            "nullable": true,
            "items": {
              "$ref": "#/components/schemas/TeamContextMember"
            }
          },
          "groups": {
            "type": "array",
            "nullable": true,
            "items": {
              "$ref": "#/components/schemas/TeamContextGroup"
            }
          },
          "eventTemplates": {
            "type": "array",
            "nullable": true,
            "items": {
              "$ref": "#/components/schemas/TeamContextEventTemplate"
            }
          },
          "me": {
            "type": "object",
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/TeamContextMe"
              }
            ]
          }
        }
      },
      "TeamContextTeam": {
        "required": [
          "id",
          "name"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "AvailabilityEntry": {
        "required": [
          "endDate",
          "reason",
          "startDate",
          "teamMemberId"
        ],
        "type": "object",
        "properties": {
          "teamMemberId": {
            "type": "string",
            "nullable": true
          },
          "startDate": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "endDate": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "reason": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "IntegrationSongSummary": {
        "required": [
          "artist",
          "hasFiles",
          "id",
          "key",
          "lastPlayed",
          "tempo",
          "title"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": true
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "artist": {
            "type": "string",
            "nullable": true
          },
          "key": {
            "type": "string",
            "nullable": true
          },
          "tempo": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "lastPlayed": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "hasFiles": {
            "type": "boolean"
          }
        }
      },
      "IntegrationSong": {
        "required": [
          "artist",
          "capo",
          "ccli",
          "copyright",
          "files",
          "id",
          "key",
          "lastPlayed",
          "originalKey",
          "sections",
          "tempo",
          "themes",
          "timeSignature",
          "title"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": true
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "artist": {
            "type": "string",
            "nullable": true
          },
          "key": {
            "type": "string",
            "nullable": true
          },
          "originalKey": {
            "type": "string",
            "nullable": true
          },
          "tempo": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "timeSignature": {
            "type": "string",
            "nullable": true
          },
          "themes": {
            "type": "array",
            "nullable": true,
            "items": {
              "type": "string"
            }
          },
          "ccli": {
            "type": "string",
            "nullable": true
          },
          "copyright": {
            "type": "string",
            "nullable": true
          },
          "lastPlayed": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "capo": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "sections": {
            "type": "array",
            "nullable": true,
            "items": {
              "$ref": "#/components/schemas/IntegrationSongSection"
            }
          },
          "files": {
            "type": "array",
            "nullable": true,
            "items": {
              "$ref": "#/components/schemas/IntegrationSongFileSummary"
            }
          }
        }
      },
      "IntegrationSongSection": {
        "required": [
          "content",
          "label",
          "notes",
          "number",
          "repeats",
          "unscheduled"
        ],
        "type": "object",
        "properties": {
          "label": {
            "type": "string",
            "nullable": true
          },
          "number": {
            "type": "integer",
            "format": "int32"
          },
          "repeats": {
            "type": "integer",
            "format": "int32"
          },
          "notes": {
            "type": "string",
            "nullable": true
          },
          "content": {
            "type": "string",
            "nullable": true
          },
          "unscheduled": {
            "type": "boolean"
          }
        }
      },
      "GetPresenterServicesResponse": {
        "required": [
          "hasMore",
          "services"
        ],
        "type": "object",
        "properties": {
          "services": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PresenterServiceOverview"
            }
          },
          "hasMore": {
            "type": "boolean"
          }
        }
      },
      "PresenterServiceOverview": {
        "required": [
          "dateTime",
          "id",
          "itemCount",
          "location",
          "name",
          "updatedAt"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "dateTime": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "location": {
            "type": "string",
            "nullable": true
          },
          "itemCount": {
            "type": "integer",
            "format": "int32"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        }
      },
      "PresenterSection": {
        "required": [
          "instrumental",
          "label",
          "name",
          "notes",
          "number",
          "repeats",
          "slides",
          "unscheduled"
        ],
        "type": "object",
        "properties": {
          "label": {
            "type": "string",
            "nullable": true
          },
          "number": {
            "type": "integer",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "repeats": {
            "type": "integer",
            "format": "int32"
          },
          "notes": {
            "type": "string",
            "nullable": true
          },
          "instrumental": {
            "type": "boolean"
          },
          "unscheduled": {
            "type": "boolean"
          },
          "slides": {
            "type": "array",
            "nullable": true,
            "items": {
              "$ref": "#/components/schemas/PresenterSlide"
            }
          }
        }
      },
      "PresenterServiceDetail": {
        "required": [
          "dateTime",
          "id",
          "items",
          "location",
          "name",
          "updatedAt"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "dateTime": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "location": {
            "type": "string",
            "nullable": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PresenterServiceItem"
            }
          }
        }
      },
      "PresenterServiceItem": {
        "required": [
          "durationMs",
          "index",
          "name",
          "notes",
          "song",
          "type"
        ],
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "notes": {
            "type": "string",
            "nullable": true
          },
          "index": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "durationMs": {
            "type": "integer",
            "format": "int64"
          },
          "song": {
            "type": "object",
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/PresenterSong"
              }
            ]
          }
        }
      },
      "PresenterSlide": {
        "required": [
          "lines"
        ],
        "type": "object",
        "properties": {
          "lines": {
            "type": "array",
            "nullable": true,
            "items": {
              "type": "string"
            }
          }
        }
      },
      "PresenterSong": {
        "required": [
          "artist",
          "ccli",
          "copyright",
          "id",
          "key",
          "lyricsText",
          "meter",
          "originalKey",
          "sections",
          "tempo",
          "title"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": true
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "artist": {
            "type": "string",
            "nullable": true
          },
          "key": {
            "type": "string",
            "nullable": true
          },
          "originalKey": {
            "type": "string",
            "nullable": true
          },
          "tempo": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "meter": {
            "type": "string",
            "nullable": true
          },
          "ccli": {
            "type": "string",
            "nullable": true
          },
          "copyright": {
            "type": "string",
            "nullable": true
          },
          "lyricsText": {
            "type": "string",
            "nullable": true
          },
          "sections": {
            "type": "array",
            "nullable": true,
            "items": {
              "$ref": "#/components/schemas/PresenterSection"
            }
          }
        }
      },
      "DailyLimit": {
        "required": [
          "limit",
          "paidPlan",
          "resetsAt",
          "used"
        ],
        "type": "object",
        "properties": {
          "limit": {
            "type": "integer",
            "format": "int32"
          },
          "used": {
            "type": "integer",
            "format": "int32"
          },
          "paidPlan": {
            "type": "boolean"
          },
          "resetsAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "IntegrationMe": {
        "required": [
          "clientId",
          "dailyLimit",
          "email",
          "name",
          "role",
          "scopes",
          "teamId",
          "teamName",
          "userId"
        ],
        "type": "object",
        "properties": {
          "userId": {
            "type": "string"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true
          },
          "teamId": {
            "type": "string"
          },
          "teamName": {
            "type": "string",
            "nullable": true
          },
          "role": {
            "type": "string"
          },
          "clientId": {
            "type": "string",
            "nullable": true
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "dailyLimit": {
            "$ref": "#/components/schemas/DailyLimit"
          }
        }
      },
      "IntegrationArtist": {
        "required": [
          "id",
          "name"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        }
      },
      "ApiError": {
        "required": [
          "errorCode",
          "errorDescription",
          "errorName",
          "param"
        ],
        "type": "object",
        "properties": {
          "errorCode": {
            "type": "integer",
            "format": "int32"
          },
          "errorName": {
            "type": "string"
          },
          "errorDescription": {
            "type": "string",
            "nullable": true
          },
          "param": {
            "type": "string",
            "nullable": true
          }
        }
      }
    },
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    }
  }
}
