openapi: 3.0.0 info: title: Antragsgrün API description: REST API for [Antragsgrün](https://antragsgruen.de/) version: 0.4.0 paths: /rest: get: operationId: getConsultations summary: List of consultations in this site tags: - Consultations responses: '200': description: Consultation list content: application/json: schema: $ref: '#/components/schemas/ConsultationLinkList' '403': $ref: '#/components/responses/ApiDisabled' /rest/user: get: operationId: getUser summary: Gets user information tags: - User security: - bearerAuth: [ ] responses: '200': description: User information content: application/json: schema: $ref: '#/components/schemas/UserInfo' '401': $ref: '#/components/responses/Unauthorized' /rest/user/login: post: operationId: loginUser summary: Log in with username and password to retrieve a JWT description: > Only succeeds if the account could also log in without any further interactive step on the website: the e-mail address must already be confirmed, no forced password change must be pending, no captcha must currently be required (e.g. after repeated failed login attempts), and the account must not have two-factor authentication set up or enforced. Accounts hitting any of these cases have to log in through the regular web UI instead. tags: - User requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/UserLoginRequest' responses: '200': description: > Login successful. Returns a JWT to be used as a bearer token for subsequent requests. The token is only valid on the site it was issued on, and is invalidated by a password change. content: application/json: schema: $ref: '#/components/schemas/UserLoginResponse' '401': description: Invalid username or password content: application/json: schema: $ref: '#/components/schemas/ErrorUnauthorized' '403': description: > Login is not possible via the API: the REST API is not enabled for this site, the site's login method does not allow username/password login, the e-mail address is not confirmed yet, a password change is required, a captcha is required, or two-factor authentication is set up/enforced for this account. content: application/json: schema: $ref: '#/components/schemas/ErrorNoPermission' /rest/{consultationPath}: get: operationId: getConsultation summary: Overview over this consultation, with links to motions and amendments. tags: - Consultations parameters: - $ref: '#/components/parameters/consultationPath' responses: '200': description: Consultation info, motion and amendment links content: application/json: schema: $ref: '#/components/schemas/ConsultationWithLinks' '403': $ref: '#/components/responses/ApiDisabled' '404': $ref: '#/components/responses/NotFound' /rest/{consultationPath}/motion-types: get: operationId: getMotionTypes summary: List of motion types defined for this consultation tags: - Motion Types parameters: - $ref: '#/components/parameters/consultationPath' responses: '200': description: Motion type list content: application/json: schema: $ref: '#/components/schemas/MotionTypeList' '403': $ref: '#/components/responses/ApiDisabled' '404': $ref: '#/components/responses/NotFound' /rest/{consultationPath}/motion-types/{motionTypeId}: patch: operationId: updateMotionType summary: Updates the settings of an existing motion type description: > Partial update: only the top-level groups present in the request body are changed (e.g. omitting "policies" leaves the existing policies untouched). A group that is present must be provided in full, replacing whatever was previously configured for that group. Does not create, delete, or reorder motion types, and does not touch section definitions - only existing settings of an existing motion type are updated. tags: - Motion Types security: - bearerAuth: [ ] parameters: - $ref: '#/components/parameters/consultationPath' - $ref: '#/components/parameters/motionTypeId' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/MotionTypeUpdateRequest' responses: '200': description: Motion type was updated successfully. Returns the full, updated motion type. content: application/json: schema: $ref: '#/components/schemas/MotionType' '401': $ref: '#/components/responses/Unauthorized' '403': description: No permission to change consultation settings, or the REST API is not enabled for this consultation content: application/json: schema: $ref: '#/components/schemas/ErrorNoPermission' '404': $ref: '#/components/responses/NotFound' '422': description: Validation error (e.g. unknown pdf_layout_id, invalid deadline dates, amendment_initiator_settings missing "settings" while same_as_motion is false) content: application/json: schema: $ref: '#/components/schemas/ErrorValidation' /rest/{consultationPath}/proposed-procedure: get: operationId: getProposedProcedure summary: Gets the public proposed procedure of this consultation tags: - Consultations parameters: - $ref: '#/components/parameters/consultationPath' responses: '200': description: The proposed procedure content: application/json: schema: $ref: '#/components/schemas/ProposedProcedure' '403': $ref: '#/components/responses/ApiDisabled' '404': $ref: '#/components/responses/NotFound' /rest/{consultationPath}/motion: post: operationId: createMotion summary: Create a new motion in this consultation tags: - Motions security: - bearerAuth: [ ] parameters: - $ref: '#/components/parameters/consultationPath' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/MotionCreateRequest' responses: '201': description: Motion was created successfully. Returns the full motion details, including the URL under which it can be retrieved. content: application/json: schema: $ref: '#/components/schemas/MotionDetails' '401': $ref: '#/components/responses/Unauthorized' '403': description: No permission to create motions, or the REST API is not enabled for this consultation content: application/json: schema: $ref: '#/components/schemas/ErrorNoPermission' '404': $ref: '#/components/responses/NotFound' '422': description: Validation error (e.g. required section missing, text too long) content: application/json: schema: $ref: '#/components/schemas/ErrorValidation' /rest/{consultationPath}/motion/{motionSlug}: get: operationId: getMotion summary: Details of this motion description: The URL of this endpoint is not 100% predictable (because of motionSlug) - please only use the links provided by the consultation index tags: - Motions parameters: - $ref: '#/components/parameters/consultationPath' - $ref: '#/components/parameters/motionSlug' - $ref: '#/components/parameters/lineNumbers' responses: '200': description: Motion info, including links to amendments content: application/json: schema: $ref: '#/components/schemas/MotionDetails' '403': $ref: '#/components/responses/ApiDisabled' '404': $ref: '#/components/responses/NotFound' put: operationId: updateMotion summary: Updates this motion tags: - Motions security: - bearerAuth: [ ] parameters: - $ref: '#/components/parameters/consultationPath' - $ref: '#/components/parameters/motionSlug' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/MotionUpdateRequest' responses: '200': description: Motion was updated successfully. Returns the full motion details, including the URL under which it can be retrieved. content: application/json: schema: $ref: '#/components/schemas/MotionDetails' '401': $ref: '#/components/responses/Unauthorized' '403': description: No permission to create motions, or the REST API is not enabled for this consultation content: application/json: schema: $ref: '#/components/schemas/ErrorNoPermission' '404': $ref: '#/components/responses/NotFound' '422': description: Validation error (e.g. required section missing, text too long) content: application/json: schema: $ref: '#/components/schemas/ErrorValidation' /rest/{consultationPath}/motion/{motionSlug}/screen: post: operationId: screenMotion summary: Screens (publishes) this motion, assigning it its final prefix and version description: > Only possible while the motion is in the screening process (submitted, unscreened) and the current user holds the screening privilege for this motion type. tags: - Motions security: - bearerAuth: [ ] parameters: - $ref: '#/components/parameters/consultationPath' - $ref: '#/components/parameters/motionSlug' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/MotionScreenRequest' responses: '200': description: Motion was screened successfully. Returns the full motion details. content: application/json: schema: $ref: '#/components/schemas/MotionDetails' '401': $ref: '#/components/responses/Unauthorized' '403': description: Screening this motion is not possible (missing privilege, or the motion is not in the screening process), or the REST API is not enabled for this consultation content: application/json: schema: $ref: '#/components/schemas/ErrorNoPermission' '404': $ref: '#/components/responses/NotFound' '422': description: Validation error (e.g. the given prefix/version is already used by another motion) content: application/json: schema: $ref: '#/components/schemas/ErrorValidation' /rest/{consultationPath}/motion/{motionSlug}/amendment: post: operationId: createAmendment summary: Create a new amendment to this motion tags: - Amendments security: - bearerAuth: [ ] parameters: - $ref: '#/components/parameters/consultationPath' - $ref: '#/components/parameters/motionSlug' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/AmendmentCreateRequest' responses: '201': description: Amendment was created successfully. Returns the full amendment details. content: application/json: schema: $ref: '#/components/schemas/AmendmentDetails' '401': $ref: '#/components/responses/Unauthorized' '403': description: No permission to create amendments, or the REST API is not enabled for this consultation content: application/json: schema: $ref: '#/components/schemas/ErrorNoPermission' '404': $ref: '#/components/responses/NotFound' '422': description: Validation error (e.g. required section missing, text too long) content: application/json: schema: $ref: '#/components/schemas/ErrorValidation' /rest/{consultationPath}/motion/{motionSlug}/amendment/{amendmentId}: get: operationId: getAmendment summary: Details of this amendment description: The URL of this endpoint is not 100% predictable (because of motionSlug) - please only use the links provided by the consultation index tags: - Amendments parameters: - $ref: '#/components/parameters/consultationPath' - $ref: '#/components/parameters/motionSlug' - $ref: '#/components/parameters/amendmentId' responses: '200': description: Amendment info, including links to amendments content: application/json: schema: $ref: '#/components/schemas/AmendmentDetails' '403': $ref: '#/components/responses/ApiDisabled' '404': $ref: '#/components/responses/NotFound' put: operationId: updateAmendment summary: Updates this amendment tags: - Amendments security: - bearerAuth: [ ] parameters: - $ref: '#/components/parameters/consultationPath' - $ref: '#/components/parameters/motionSlug' - $ref: '#/components/parameters/amendmentId' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/AmendmentUpdateRequest' responses: '200': description: Amendment was updated successfully. Returns the full amendment details. content: application/json: schema: $ref: '#/components/schemas/AmendmentDetails' '401': $ref: '#/components/responses/Unauthorized' '403': description: No permission to edit this amendment, or the REST API is not enabled for this consultation content: application/json: schema: $ref: '#/components/schemas/ErrorNoPermission' '404': $ref: '#/components/responses/NotFound' '422': description: Validation error (e.g. required section missing, text too long) content: application/json: schema: $ref: '#/components/schemas/ErrorValidation' /rest/{consultationPath}/motion/{motionSlug}/support: post: operationId: supportMotion summary: Support this motion (or the pending secondary motion it represents) as the current user description: > Idempotent: if the current user already supports this motion, no additional support entry is created and the current motion state is returned unchanged. tags: - Motions security: - bearerAuth: [ ] parameters: - $ref: '#/components/parameters/consultationPath' - $ref: '#/components/parameters/motionSlug' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/SupportRequest' responses: '200': description: Support was registered (or already existed). Returns the full motion details. content: application/json: schema: $ref: '#/components/schemas/MotionDetails' '401': $ref: '#/components/responses/Unauthorized' '403': description: Supporting this motion is not possible (policy, deadline or status), or the REST API is not enabled for this consultation content: application/json: schema: $ref: '#/components/schemas/ErrorNoPermission' '404': $ref: '#/components/responses/NotFound' '422': description: Validation error (e.g. name missing, organization required) content: application/json: schema: $ref: '#/components/schemas/ErrorValidation' delete: operationId: revokeMotionSupport summary: Revoke the current user's support/like/dislike of this motion description: "Idempotent: if the current user does not support this motion, this is a no-op." tags: - Motions security: - bearerAuth: [ ] parameters: - $ref: '#/components/parameters/consultationPath' - $ref: '#/components/parameters/motionSlug' responses: '200': description: Support was revoked (or did not exist). Returns the full motion details. content: application/json: schema: $ref: '#/components/schemas/MotionDetails' '401': $ref: '#/components/responses/Unauthorized' '403': description: Revoking support is not possible given the current motion status, or the REST API is not enabled for this consultation content: application/json: schema: $ref: '#/components/schemas/ErrorNoPermission' '404': $ref: '#/components/responses/NotFound' /rest/{consultationPath}/motion/{motionSlug}/amendment/{amendmentId}/support: post: operationId: supportAmendment summary: Support this amendment as the current user description: > Idempotent: if the current user already supports this amendment, no additional support entry is created and the current amendment state is returned unchanged. tags: - Amendments security: - bearerAuth: [ ] parameters: - $ref: '#/components/parameters/consultationPath' - $ref: '#/components/parameters/motionSlug' - $ref: '#/components/parameters/amendmentId' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/SupportRequest' responses: '200': description: Support was registered (or already existed). Returns the full amendment details. content: application/json: schema: $ref: '#/components/schemas/AmendmentDetails' '401': $ref: '#/components/responses/Unauthorized' '403': description: Supporting this amendment is not possible (policy, deadline or status), or the REST API is not enabled for this consultation content: application/json: schema: $ref: '#/components/schemas/ErrorNoPermission' '404': $ref: '#/components/responses/NotFound' '422': description: Validation error (e.g. name missing, organization required) content: application/json: schema: $ref: '#/components/schemas/ErrorValidation' delete: operationId: revokeAmendmentSupport summary: Revoke the current user's support/like/dislike of this amendment description: "Idempotent: if the current user does not support this amendment, this is a no-op." tags: - Amendments security: - bearerAuth: [ ] parameters: - $ref: '#/components/parameters/consultationPath' - $ref: '#/components/parameters/motionSlug' - $ref: '#/components/parameters/amendmentId' responses: '200': description: Support was revoked (or did not exist). Returns the full amendment details. content: application/json: schema: $ref: '#/components/schemas/AmendmentDetails' '401': $ref: '#/components/responses/Unauthorized' '403': description: Revoking support is not possible given the current amendment status, or the REST API is not enabled for this consultation content: application/json: schema: $ref: '#/components/schemas/ErrorNoPermission' '404': $ref: '#/components/responses/NotFound' /rest/{consultationPath}/motion/{motionSlug}/amendment/{amendmentId}/screen: post: operationId: screenAmendment summary: Screens (publishes) this amendment, assigning it its final prefix description: > Only possible while the amendment is in the screening process (submitted, unscreened) and the current user holds the screening privilege for this motion type. tags: - Amendments security: - bearerAuth: [ ] parameters: - $ref: '#/components/parameters/consultationPath' - $ref: '#/components/parameters/motionSlug' - $ref: '#/components/parameters/amendmentId' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/AmendmentScreenRequest' responses: '200': description: Amendment was screened successfully. Returns the full amendment details. content: application/json: schema: $ref: '#/components/schemas/AmendmentDetails' '401': $ref: '#/components/responses/Unauthorized' '403': description: Screening this amendment is not possible (missing privilege, or the amendment is not in the screening process), or the REST API is not enabled for this consultation content: application/json: schema: $ref: '#/components/schemas/ErrorNoPermission' '404': $ref: '#/components/responses/NotFound' '422': description: Validation error (e.g. the given prefix is already used by another amendment) content: application/json: schema: $ref: '#/components/schemas/ErrorValidation' /rest/{consultationPath}/agenda: get: operationId: getAgenda summary: Gets the agenda of this consultation tags: - Agenda parameters: - $ref: '#/components/parameters/consultationPath' responses: '200': description: The agenda content: application/json: schema: $ref: '#/components/schemas/AgendaList' '403': $ref: '#/components/responses/ApiDisabled' '404': $ref: '#/components/responses/NotFound' post: operationId: saveAgenda summary: Save the new agenda tags: - Agenda security: - bearerAuth: [ ] parameters: - $ref: '#/components/parameters/consultationPath' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/AgendaList' responses: '200': description: The agenda content: application/json: schema: $ref: '#/components/schemas/AgendaList' '401': $ref: '#/components/responses/Unauthorized' '403': description: No permission to edit the agenda, or the REST API is not enabled for this consultation content: application/json: schema: $ref: '#/components/schemas/ErrorNoPermission' '404': $ref: '#/components/responses/NotFound' /rest/{consultationPath}/debate: get: operationId: getCurrentDebate summary: The current state of the "Currently debated" section description: > Returns the motion, amendment, or agenda item that is currently being debated. This endpoint is available without authentication as long as the "Currently debated" feature is enabled for the consultation, independently of whether general API access is enabled for the site. tags: - Debate parameters: - $ref: '#/components/parameters/consultationPath' responses: '200': description: The current debate state. `current` is null if nothing is being debated right now. content: application/json: schema: $ref: '#/components/schemas/DebateState' '404': description: The consultation was not found, or the "Currently debated" feature is not enabled content: application/json: schema: $ref: '#/components/schemas/ErrorNotFound' put: operationId: startDebate summary: Start a debate over a motion, amendment, or agenda item description: > Makes the given item the consultation's currently debated item, ending the debate over another item if one is going on. If the given item is already being debated, nothing changes (no new debate history entry is created). Requires the privilege to moderate debates. Like the GET endpoint, it works independently of whether general API access is enabled for the site. tags: - Debate security: - bearerAuth: [ ] parameters: - $ref: '#/components/parameters/consultationPath' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/DebateStartRequest' responses: '200': description: The debate was started; the new debate state is returned. content: application/json: schema: $ref: '#/components/schemas/DebateState' '400': description: The request body could not be parsed content: application/json: schema: $ref: '#/components/schemas/ErrorValidation' '401': $ref: '#/components/responses/Unauthorized' '403': description: Missing privilege to moderate debates content: application/json: schema: $ref: '#/components/schemas/ErrorNoPermission' '404': description: > The consultation or the item to be debated was not found (this includes motions and amendments that are not published), or the "Currently debated" feature is not enabled content: application/json: schema: $ref: '#/components/schemas/ErrorNotFound' delete: operationId: endDebate summary: End the ongoing debate description: > Ends the debate over the currently debated item, if there is one; the item goes into the debate history. Does nothing if no debate is going on. Requires the privilege to moderate debates. Like the GET endpoint, it works independently of whether general API access is enabled for the site. tags: - Debate security: - bearerAuth: [ ] parameters: - $ref: '#/components/parameters/consultationPath' responses: '200': description: The debate was ended; the new debate state (with `current` being null) is returned. content: application/json: schema: $ref: '#/components/schemas/DebateState' '401': $ref: '#/components/responses/Unauthorized' '403': description: Missing privilege to moderate debates content: application/json: schema: $ref: '#/components/schemas/ErrorNoPermission' '404': description: The consultation was not found, or the "Currently debated" feature is not enabled content: application/json: schema: $ref: '#/components/schemas/ErrorNotFound' /rest/{consultationPath}/debate/voting: get: operationId: getDebateVoting summary: The voting state of the currently debated item (moderation) description: > Returns the voting attached to the currently debated item, plus the data the moderation widget needs to create or assign one. The resolved voting is the block explicitly assigned to the debate, or - for a debated motion/amendment that is a voting item - the block it belongs to. Requires the privilege to moderate debates. tags: - Debate security: - bearerAuth: [ ] parameters: - $ref: '#/components/parameters/consultationPath' responses: '200': description: The voting state for the current debate. content: application/json: schema: $ref: '#/components/schemas/DebateVotingState' '401': $ref: '#/components/responses/Unauthorized' '403': description: Missing privilege to moderate debates content: application/json: schema: $ref: '#/components/schemas/ErrorNoPermission' '404': description: The consultation was not found, or the "Currently debated" feature is not enabled content: application/json: schema: $ref: '#/components/schemas/ErrorNotFound' put: operationId: assignDebateVoting summary: Assign an existing voting block to the current debate description: > Sets the given voting block as the voting for the currently debated item. Requires the privilege to moderate debates. tags: - Debate security: - bearerAuth: [ ] parameters: - $ref: '#/components/parameters/consultationPath' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/DebateVotingAssignRequest' responses: '200': description: The voting block was assigned; the new voting state is returned. content: application/json: schema: $ref: '#/components/schemas/DebateVotingState' '400': description: The request body could not be parsed content: application/json: schema: $ref: '#/components/schemas/ErrorValidation' '401': $ref: '#/components/responses/Unauthorized' '403': description: Missing privilege to moderate debates content: application/json: schema: $ref: '#/components/schemas/ErrorNoPermission' '404': description: The consultation, the debate, or the voting block was not found content: application/json: schema: $ref: '#/components/schemas/ErrorNotFound' post: operationId: createDebateVoting summary: Create a voting for the currently debated item description: > Creates a new voting block in preparing state and assigns it to the currently debated item. For a debated motion/amendment, the item itself becomes the single voting item; for an agenda item, the given question is used as the voting title and question. Requires the privilege to moderate debates. tags: - Debate security: - bearerAuth: [ ] parameters: - $ref: '#/components/parameters/consultationPath' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/DebateVotingCreateRequest' responses: '200': description: The voting was created and assigned; the new voting state is returned. content: application/json: schema: $ref: '#/components/schemas/DebateVotingState' '400': description: The request body could not be parsed content: application/json: schema: $ref: '#/components/schemas/ErrorValidation' '401': $ref: '#/components/responses/Unauthorized' '403': description: Missing privilege to moderate debates content: application/json: schema: $ref: '#/components/schemas/ErrorNoPermission' '404': description: The consultation was not found, no debate is going on, or the feature is not enabled content: application/json: schema: $ref: '#/components/schemas/ErrorNotFound' delete: operationId: unassignDebateVoting summary: Unassign the voting from the current debate description: > Clears the voting explicitly assigned to the currently debated item (does not delete the voting block itself). Requires the privilege to moderate debates. tags: - Debate security: - bearerAuth: [ ] parameters: - $ref: '#/components/parameters/consultationPath' responses: '200': description: The voting was unassigned; the new voting state is returned. content: application/json: schema: $ref: '#/components/schemas/DebateVotingState' '401': $ref: '#/components/responses/Unauthorized' '403': description: Missing privilege to moderate debates content: application/json: schema: $ref: '#/components/schemas/ErrorNoPermission' '404': description: The consultation was not found, no debate is going on, or the feature is not enabled content: application/json: schema: $ref: '#/components/schemas/ErrorNotFound' /rest/{consultationPath}/debate/selectable: get: operationId: getDebateSelectables summary: The items a debate moderator can pick as the debated one description: > Lists the motions, amendments, and agenda items of the consultation that can be made the currently debated item, in the order the moderation widget offers them. Agenda items that are date separators are left out, as there is nothing to debate about them. Requires the privilege to moderate debates. Like the other debate endpoints, it works independently of whether general API access is enabled for the site. tags: - Debate security: - bearerAuth: [ ] parameters: - $ref: '#/components/parameters/consultationPath' responses: '200': description: The selectable items, grouped by type. content: application/json: schema: $ref: '#/components/schemas/DebateSelectables' '401': $ref: '#/components/responses/Unauthorized' '403': description: Missing privilege to moderate debates content: application/json: schema: $ref: '#/components/schemas/ErrorNoPermission' '404': description: The consultation was not found, or the "Currently debated" feature is not enabled content: application/json: schema: $ref: '#/components/schemas/ErrorNotFound' /rest/{consultationPath}/debate/speech-queue: post: operationId: getOrCreateDebateSpeechQueue summary: The speaking list of the currently debated item (moderation) description: > Returns the speaking list of the currently debated item in its admin representation, creating an inactive one with the consultation's configured subqueues if the item does not have one yet. With `{"activate": true}` the list is additionally marked active, which enables the speaking list feature for the consultation and deactivates the other non-agenda lists - the same effect the regular speech administration has. Requires the privilege to moderate debates. tags: - Debate security: - bearerAuth: [ ] parameters: - $ref: '#/components/parameters/consultationPath' requestBody: required: false content: application/json: schema: $ref: '#/components/schemas/DebateSpeechQueueRequest' responses: '200': description: The speaking list of the debated item. content: application/json: schema: $ref: '#/components/schemas/SpeechQueueAdmin' '400': description: The debated item cannot have a speaking list content: application/json: schema: $ref: '#/components/schemas/ErrorValidation' '401': $ref: '#/components/responses/Unauthorized' '403': description: Missing privilege to moderate debates content: application/json: schema: $ref: '#/components/schemas/ErrorNoPermission' '404': description: The consultation was not found, no debate is going on, or the feature is not enabled content: application/json: schema: $ref: '#/components/schemas/ErrorNotFound' /rest/{consultationPath}/speech/{queueIds}: get: operationId: getSpeechQueues summary: The user-facing state of one or more speaking lists description: > Returns the current state of the given speaking lists as seen by a participant. This is the endpoint the speaking-list widgets poll. It is available without authentication; if a JWT is sent, the response marks the current user's own applications (`have_applied`). tags: - Speech parameters: - $ref: '#/components/parameters/consultationPath' - name: queueIds in: path required: true description: A single speaking-list ID or a comma-separated list of IDs. example: "3,4" schema: type: string responses: '200': description: The requested speaking lists, in the order of the requested IDs. content: application/json: schema: type: array items: $ref: '#/components/schemas/SpeechQueueUser' '404': $ref: '#/components/responses/NotFound' /rest/{consultationPath}/speech/{queueId}/item: post: operationId: registerToSpeak summary: Apply to speak on a speaking list description: > Adds the current user (or, for anonymous participants, a cookie-identified user with the given name) to the speaking list. Works without authentication unless the consultation requires login to speak. tags: - Speech parameters: - $ref: '#/components/parameters/consultationPath' - $ref: '#/components/parameters/speechQueueId' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/SpeechRegisterRequest' responses: '200': description: The application was registered; the updated speaking list is returned. content: application/json: schema: $ref: '#/components/schemas/SpeechQueueUser' '400': description: The request body could not be parsed, or a required field (name/subqueue) is missing content: application/json: schema: $ref: '#/components/schemas/ErrorValidation' '401': description: The consultation requires login to speak, but no user is authenticated content: application/json: schema: $ref: '#/components/schemas/ErrorUnauthorized' '403': description: The list (or point-of-order sub-list) is currently not open for applications content: application/json: schema: $ref: '#/components/schemas/ErrorNoPermission' '404': $ref: '#/components/responses/NotFound' /rest/{consultationPath}/speech/{queueId}/unregister: post: operationId: unregisterFromSpeaking summary: Withdraw the current user's application from a speaking list description: > Removes the current user's (or cookie-identified user's) not-yet-started applications from the speaking list. Has no request body. tags: - Speech parameters: - $ref: '#/components/parameters/consultationPath' - $ref: '#/components/parameters/speechQueueId' responses: '200': description: The application was withdrawn; the updated speaking list is returned. content: application/json: schema: $ref: '#/components/schemas/SpeechQueueUser' '404': $ref: '#/components/responses/NotFound' /rest/{consultationPath}/speech/{queueIds}/admin: get: operationId: getSpeechQueuesAdmin summary: The moderator-facing state of one or more speaking lists description: > Returns the full moderation view of the given speaking lists, including applicant names and metadata. This is the endpoint the moderation widgets poll. Requires the privilege to manage speaking lists. tags: - Speech security: - bearerAuth: [ ] parameters: - $ref: '#/components/parameters/consultationPath' - name: queueIds in: path required: true description: A single speaking-list ID or a comma-separated list of IDs. example: "3,4" schema: type: string responses: '200': description: The moderation views of the speaking lists, in the order of the requested IDs. content: application/json: schema: type: array items: $ref: '#/components/schemas/SpeechQueueAdmin' '401': $ref: '#/components/responses/Unauthorized' '403': description: Missing privilege to manage speaking lists content: application/json: schema: $ref: '#/components/schemas/ErrorNoPermission' '404': $ref: '#/components/responses/NotFound' /rest/{consultationPath}/speech/{queueId}/admin/settings: post: operationId: setSpeechQueueSettings summary: Update a speaking list's settings and activation description: > Updates a speaking list's settings (open state, speaking time, etc.) and activation. Activating a non-agenda-item list deactivates the other active list. Requires the privilege to manage speaking lists. tags: - Speech security: - bearerAuth: [ ] parameters: - $ref: '#/components/parameters/consultationPath' - $ref: '#/components/parameters/speechQueueId' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/SpeechQueueSettingsRequest' responses: '200': description: The settings were saved; the updated list plus the rendered sidebar HTML are returned. content: application/json: schema: $ref: '#/components/schemas/SpeechQueueSettingsResponse' '401': $ref: '#/components/responses/Unauthorized' '403': description: Missing privilege to manage speaking lists content: application/json: schema: $ref: '#/components/schemas/ErrorNoPermission' '404': $ref: '#/components/responses/NotFound' /rest/{consultationPath}/speech/{queueId}/admin/reset: post: operationId: resetSpeechQueue summary: Empty a speaking list description: Deletes all items (applications and slots) of a speaking list. Requires the privilege to manage speaking lists. tags: - Speech security: - bearerAuth: [ ] parameters: - $ref: '#/components/parameters/consultationPath' - $ref: '#/components/parameters/speechQueueId' responses: '200': description: The list was emptied; the updated moderation view is returned. content: application/json: schema: $ref: '#/components/schemas/SpeechQueueAdmin' '401': $ref: '#/components/responses/Unauthorized' '403': description: Missing privilege to manage speaking lists content: application/json: schema: $ref: '#/components/schemas/ErrorNoPermission' '404': $ref: '#/components/responses/NotFound' /rest/{consultationPath}/speech/{queueId}/admin/randomize: post: operationId: randomizeSpeechQueue summary: Shuffle the waiting applicants of a speaking list description: Randomizes the order of the not-yet-scheduled applications. Requires the privilege to manage speaking lists. tags: - Speech security: - bearerAuth: [ ] parameters: - $ref: '#/components/parameters/consultationPath' - $ref: '#/components/parameters/speechQueueId' responses: '200': description: The waiting list was shuffled; the updated moderation view is returned. content: application/json: schema: $ref: '#/components/schemas/SpeechQueueAdmin' '401': $ref: '#/components/responses/Unauthorized' '403': description: Missing privilege to manage speaking lists content: application/json: schema: $ref: '#/components/schemas/ErrorNoPermission' '404': $ref: '#/components/responses/NotFound' /rest/{consultationPath}/speech/{queueId}/admin/item: post: operationId: createSpeechQueueItem summary: Add a named applicant to a speaking list (moderator) description: Adds a manually named entry to the applied list of a speaking list. Requires the privilege to manage speaking lists. tags: - Speech security: - bearerAuth: [ ] parameters: - $ref: '#/components/parameters/consultationPath' - $ref: '#/components/parameters/speechQueueId' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/SpeechCreateItemRequest' responses: '200': description: The entry was added; the updated moderation view is returned. content: application/json: schema: $ref: '#/components/schemas/SpeechQueueAdmin' '400': description: No name was given, or a subqueue is required but missing content: application/json: schema: $ref: '#/components/schemas/ErrorValidation' '401': $ref: '#/components/responses/Unauthorized' '403': description: Missing privilege to manage speaking lists content: application/json: schema: $ref: '#/components/schemas/ErrorNoPermission' '404': $ref: '#/components/responses/NotFound' /rest/{consultationPath}/speech/{queueId}/admin/item/{itemId}/{op}: post: operationId: performSpeechItemOperation summary: Perform a moderation operation on a speaking-list item description: > Applies an operation to a single speaking-list item: scheduling it into a slot, starting/stopping the speech, moving it within/between sub-lists, or deleting it. A request body is only required for the `move` operation. Requires the privilege to manage speaking lists. tags: - Speech security: - bearerAuth: [ ] parameters: - $ref: '#/components/parameters/consultationPath' - $ref: '#/components/parameters/speechQueueId' - name: itemId in: path required: true description: The numeric ID of the speaking-list item. example: 17 schema: type: integer - name: op in: path required: true description: The operation to perform on the item. schema: type: string enum: - set-slot - unset-slot - set-slot-and-start - start - stop - move - delete requestBody: required: false content: application/json: schema: $ref: '#/components/schemas/SpeechItemOperationRequest' responses: '200': description: The operation was applied; the updated moderation view is returned. content: application/json: schema: $ref: '#/components/schemas/SpeechQueueAdmin' '401': $ref: '#/components/responses/Unauthorized' '403': description: Missing privilege to manage speaking lists content: application/json: schema: $ref: '#/components/schemas/ErrorNoPermission' '404': $ref: '#/components/responses/NotFound' /rest/{consultationPath}/votings/open: get: operationId: getOpenVotings summary: The votings that are currently open description: > Returns every voting that is open for voting right now, including what the requesting user may still vote on and what they have already voted. Whether the single votes and the results are part of the payload depends on the configuration of each voting; the turnout always is. tags: - Votings security: - bearerAuth: [ ] parameters: - $ref: '#/components/parameters/consultationPath' responses: '200': description: The open votings. content: application/json: schema: type: array items: $ref: '#/components/schemas/VotingBlockUser' '401': description: Not logged in content: application/json: schema: $ref: '#/components/schemas/ErrorUnauthorized' /rest/{consultationPath}/votings/closed: get: operationId: getClosedVotings summary: The votings that are closed and whose results have been published tags: - Votings security: - bearerAuth: [ ] parameters: - $ref: '#/components/parameters/consultationPath' responses: '200': description: The closed votings. content: application/json: schema: type: array items: $ref: '#/components/schemas/VotingBlockUser' '401': description: Not logged in content: application/json: schema: $ref: '#/components/schemas/ErrorUnauthorized' /rest/{consultationPath}/votings/admin: get: operationId: getVotingsAdmin summary: All votings of the consultation, for administration description: > Like the user-facing endpoints, plus the configuration, the activity log and the people entitled to vote. Requires the privilege to manage votings. tags: - Votings security: - bearerAuth: [ ] parameters: - $ref: '#/components/parameters/consultationPath' responses: '200': description: All votings. content: application/json: schema: type: array items: $ref: '#/components/schemas/VotingBlockAdmin' '403': description: Missing the privilege to manage votings content: application/json: schema: $ref: '#/components/schemas/ErrorNoPermission' components: securitySchemes: bearerAuth: type: http scheme: bearer bearerFormat: JWT description: "Send a JWT in the `Authorization: Bearer ` header." parameters: consultationPath: in: path name: consultationPath description: The URL-path-segment identifying the consultation required: true example: std-parteitag schema: type: string motionSlug: in: path name: motionSlug description: The URL-path-segment identifying the motion. Not guaranteed to be stable - only use the values provided by the consultation index links. required: true example: 123-motion schema: type: string amendmentId: in: path name: amendmentId description: The numeric ID of the amendment required: true example: 42 schema: type: string motionTypeId: in: path name: motionTypeId description: The numeric ID of the motion type required: true example: 3 schema: type: string lineNumbers: in: query name: lineNumbers required: false description: If true, then line number markers will be returned in the text (if there are any) example: true schema: type: boolean speechQueueId: in: path name: queueId description: The numeric ID of the speaking list required: true example: 3 schema: type: string responses: ApiDisabled: description: The REST API is not enabled for this consultation content: application/json: schema: $ref: '#/components/schemas/ErrorApiDisabled' NotFound: description: The consultation (or the requested resource within it) was not found content: application/json: schema: $ref: '#/components/schemas/ErrorNotFound' Unauthorized: description: Missing, invalid, or expired bearer token content: application/json: schema: $ref: '#/components/schemas/ErrorUnauthorized' schemas: AgendaList: x-php-namespace: agenda type: object required: - items properties: items: type: array items: $ref: '#/components/schemas/AgendaItem' AgendaItem: x-php-namespace: agenda type: object required: - type - title - settings - children properties: id: type: integer description: Always set when retrieving the agenda; only optional when saving, for newly created items. example: 12 type: type: string enum: - item - date_separator code: type: string description: If not set or null (default), the agenda item code will be automatically determined. example: "7." title: type: string example: "Discussion about motions" time: type: string example: "12:34" description: Time in 24h format date: type: string example: "2020-12-31" description: Only relevant for type=date_separator. Format is YYYY-MM-DD settings: $ref: '#/components/schemas/AgendaItemSettings' children: type: array items: $ref: '#/components/schemas/AgendaItem' AgendaItemSettings: x-php-namespace: agenda type: object required: - has_speaking_list - in_proposed_procedures - motion_types properties: has_speaking_list: type: boolean speaking_lists: type: array nullable: true items: type: integer description: Only set when this object is returned from the API; ignored when using the object for saving the agenda. in_proposed_procedures: type: boolean motion_types: type: array items: type: integer description: List of Motion Type IDs permissible for this agenda item. At the moment, only one is supported, subject to future enhancements. example: - 12 ConsultationLinkList: x-php-namespace: consultation type: object required: - consultations properties: consultations: type: array items: $ref: '#/components/schemas/ConsultationLink' ConsultationLink: x-php-namespace: consultation type: object properties: title: type: string example: 44. Bundesdelegiertenkonferenz title_short: type: string example: 44. BDK date_published: type: string example: "2015-03-30T03:27:20+02:00" url_path: type: string example: consultation url_json: type: string example: https://test.antragsgruen.de/rest/consultation url_html: type: string example: https://test.antragsgruen.de/consultation ConsultationWithLinks: x-php-namespace: consultation type: object properties: title: type: string example: 44. Bundesdelegiertenkonferenz title_short: type: string example: 44. BDK motion_links: type: array items: $ref: '#/components/schemas/MotionLinkWithAmendmentLinks' speaking_lists: type: array items: $ref: '#/components/schemas/SpeakingList' page_links: type: array items: $ref: '#/components/schemas/PageLinks' url_json: type: string example: https://test.antragsgruen.de/rest/consultation url_html: type: string example: https://test.antragsgruen.de/consultation DebateState: x-php-namespace: debate type: object properties: current: $ref: '#/components/schemas/DebateItem' DebateItemTargetType: x-php-namespace: debate type: string description: The type of item a debate refers to enum: - motion - amendment - agenda_item - free_text DebateStartRequest: x-php-namespace: debate type: object description: > Names what should be debated from now on: a motion, amendment, or agenda item (via target_id), or free text (via text, with target_type "free_text"). required: - target_type properties: target_type: $ref: '#/components/schemas/DebateItemTargetType' target_id: type: integer nullable: true description: The ID of the motion, amendment, or agenda item to be debated. Null for free_text. example: 2 text: type: string nullable: true description: The free text to be shown as debated. Used (and required) only for target_type "free_text". example: "General debate on the budget" DebateItem: x-php-namespace: debate type: object nullable: true description: The currently debated item. Null if nothing is being debated right now. required: - id - target_type - title - date_started properties: id: type: integer example: 1 target_type: $ref: '#/components/schemas/DebateItemTargetType' target_id: type: integer nullable: true description: The ID of the debated motion, amendment, or agenda item (depending on target_type). Null for free_text. example: 2 title: type: string x-php-type: '\app\models\api\LocalizedString' example: "O’zapft is!" title_with_prefix: type: string nullable: true x-php-type: '\app\models\api\LocalizedString' example: "A2: O’zapft is!" initiators_html: type: string nullable: true x-php-type: '\app\models\api\LocalizedString' description: Formatted list of the initiators. Null for agenda items. date_started: type: string example: "2026-07-10T10:00:00+02:00" url_json: type: string nullable: true description: REST URL of the debated motion or amendment. Null for agenda items. example: https://test.antragsgruen.de/rest/consultation/2-ozapft-is url_html: type: string nullable: true description: URL of the HTML page of the debated motion or amendment. Null for agenda items. example: https://test.antragsgruen.de/consultation/2-ozapft-is speech_queue: $ref: '#/components/schemas/DebateItemSpeechQueue' voting_block: $ref: '#/components/schemas/DebateItemVotingBlock' DebateItemSpeechQueue: x-php-namespace: debate type: object nullable: true description: The speaking list attached to the debated item. Null if none is attached. required: - id - is_active - title properties: id: type: integer description: ID of the speaking list, usable with the speech endpoints example: 23 is_active: type: boolean description: Whether the speaking list is currently active title: type: string x-php-type: '\app\models\api\LocalizedString' description: Title of the speaking list DebateItemVotingBlock: x-php-namespace: debate type: object nullable: true description: > The voting block for the debated item: the one explicitly assigned to the debate, or - for a debated motion/amendment that is a voting item - the block it belongs to. Null if none. required: - id - status - title properties: id: type: integer description: ID of the voting block, usable with the voting endpoints example: 42 status: type: integer description: Status of the voting block (see VotingBlock statuses) example: 1 title: type: string description: Title of the voting block DebateVotingState: x-php-namespace: debate type: object description: The voting attached to the current debate plus the data needed to create or assign one. required: - create_mode - selectable_voting_blocks - can_unassign - can_administer_votings properties: can_administer_votings: type: boolean description: > Whether this moderator may also administer the voting itself - opening, closing and configuring it - which takes the privilege to manage votings, not the one to moderate a debate. Where it is false the moderation widget shows the voting as a read-only card; where it is true it hosts the voting administration for the debated item. assigned_voting_block_id: type: integer nullable: true description: The voting block explicitly assigned to the debate (debateItem.votingBlockId). Null if none is assigned. example: 42 can_unassign: type: boolean description: > Whether unassigning the explicitly assigned voting block would actually remove the voting from the debate. False when the debated motion/amendment is itself a voting item of a block, so a fallback voting would remain; the moderation widget then hides the "unassign" button (which would otherwise appear to do nothing). resolved_voting_block: $ref: '#/components/schemas/DebateVotingBlock' create_mode: type: string description: > Which creation UI the moderator should see when no voting is resolved yet: "motion"/"amendment" offer a one-click "create voting" for the debated item, "question" offers a free-text question form, "none" when nothing is being debated. enum: - motion - amendment - question - none selectable_voting_blocks: type: array description: All voting blocks of the consultation, offered for manual assignment. items: $ref: '#/components/schemas/DebateVotingBlockOption' DebateVotingBlock: x-php-namespace: debate type: object nullable: true description: Compact representation of the voting attached to the debate, shown as a card in the moderation widget. required: - id - title - status - votes_total - votes_users - admin_link properties: id: type: integer example: 42 title: type: string example: "A2: O’zapft is!" status: type: integer description: Voting block status (0 = offline, 1 = preparing, 2 = open, 3 = closed/published, 4 = closed/unpublished) example: 1 votes_total: type: integer example: 0 votes_users: type: integer example: 0 admin_link: type: string nullable: true description: > URL of the full voting administration page for managing, opening, or closing this voting. Null for a moderator without the privilege to manage votings, who cannot open that page. example: https://test.antragsgruen.de/std-parteitag/consultation/admin-votings DebateVotingBlockOption: x-php-namespace: debate type: object description: A voting block offered in the "assign existing voting" dropdown. required: - id - title - status properties: id: type: integer example: 42 title: type: string example: "A2: O’zapft is!" status: type: integer example: 1 DebateVotingAssignRequest: x-php-namespace: debate type: object description: Assigns an existing voting block to the current debate. required: - voting_block_id properties: voting_block_id: type: integer example: 42 DebateVotingCreateRequest: x-php-namespace: debate type: object description: > Creates a voting for the current debate. For a debated motion/amendment the item itself becomes the voting item and "question" is ignored; for a debated agenda item, "question" is the voting title and question. properties: question: type: string nullable: true description: The question and title of the voting, used when an agenda item is debated. example: "Should we adjourn the meeting?" DebateSelectables: x-php-namespace: debate type: object description: The items that can be made the currently debated one, grouped by type. required: - motions - amendments - agenda_items properties: motions: type: array items: $ref: '#/components/schemas/DebateSelectableItem' amendments: type: array items: $ref: '#/components/schemas/DebateSelectableItem' agenda_items: type: array items: $ref: '#/components/schemas/DebateSelectableItem' DebateSelectableItem: x-php-namespace: debate type: object description: One item that can be made the currently debated one. required: - target_type - target_id - title properties: target_type: $ref: '#/components/schemas/DebateItemTargetType' target_id: type: integer description: To be passed as target_id when starting a debate over this item. example: 2 title: type: string example: "O’zapft is!" title_with_prefix: type: string nullable: true example: "A2: O’zapft is!" initiators_html: type: string nullable: true description: Formatted list of the initiators. Null for agenda items. DebateSpeechQueueRequest: x-php-namespace: debate type: object description: Options for retrieving the speaking list of the currently debated item. properties: activate: type: boolean description: > If true, the speaking list is marked active, so that it is shown to the participants. If false or absent, it is only created if it does not exist yet. example: true MotionLinkWithAmendmentLinks: x-php-namespace: imotion type: object properties: type: type: string description: Describes if this is a motion or an amendment (e.g., a statute amendment to be shown like a motion) enum: - motion - amendment id: type: integer example: 23 agenda_item: type: string example: Title of the agenda item prefix: type: string example: A1 title: type: string example: Pure title of the motion title_with_intro: type: string example: "Motion A1: Pure title of the motion" title_with_prefix: type: string example: "A1: Pure title of the motion" status_id: type: integer example: 3 description: Refer to https://github.com/CatoTH/antragsgruen/blob/main/models/db/IMotion.php#L47 for a definition of the status IDs status_title: type: string example: Eingereicht initiators_html: type: string example: "Testuser 1" amendment_links: type: array items: $ref: '#/components/schemas/AmendmentLink' url_json: type: string example: https://test.antragsgruen.de/rest/consultation/123-motion url_html: type: string example: https://test.antragsgruen.de/consultation/123-motion PageLinks: type: object properties: id: type: integer example: 23 in_menu: type: boolean description: Indicates if this page is shown in the main menu title: type: string example: Pure title of the motion url_json: type: string example: https://test.antragsgruen.de/rest/page/testpage url_html: type: string example: https://test.antragsgruen.de/consultation/page/testpage MotionLink: x-php-namespace: imotion type: object properties: id: type: integer example: 23 agenda_item: type: string example: Title of the agenda item prefix: type: string example: A1 title: type: string example: Pure title of the motion title_with_intro: type: string example: "Motion A1: Pure title of the motion" title_with_prefix: type: string example: "A1: Pure title of the motion" initiators_html: type: string example: "Testuser 1" url_json: type: string example: https://test.antragsgruen.de/rest/consultation/123-motion url_html: type: string example: https://test.antragsgruen.de/consultation/123-motion MotionDetails: x-php-namespace: imotion type: object properties: type: type: string example: motion id: type: integer example: 23 agenda_item: type: string example: Title of the agenda item prefix: type: string example: A1 title: type: string example: Pure title of the motion title_with_intro: type: string example: "Motion A1: Pure title of the motion" title_with_prefix: type: string example: "A1: Pure title of the motion" status_id: type: integer example: 3 description: Refer to https://github.com/CatoTH/antragsgruen/blob/main/models/db/IMotion.php#L47 for a definition of the status IDs status_title: type: string example: Eingereicht date_published: type: string example: "2015-03-30T03:27:20+02:00" supporters: type: array items: $ref: '#/components/schemas/Supporter' initiators: type: array items: $ref: '#/components/schemas/Supporter' initiators_html: type: string example: "Testuser 1" sections: type: array items: $ref: '#/components/schemas/MotionSection' proposed_procedure: $ref: '#/components/schemas/MotionProposedProcedure' amendment_links: type: array items: $ref: '#/components/schemas/AmendmentLink' url_json: type: string example: https://test.antragsgruen.de/rest/consultation/123-motion url_html: type: string example: https://test.antragsgruen.de/consultation/123-motion pagination: $ref: '#/components/schemas/MotionPagination' MotionPagination: x-php-namespace: imotion type: object nullable: true description: Links to the previous and next motion in the consultation's sorted order. Null when the consultation has prev/next navigation disabled. properties: prev: type: string nullable: true description: REST URL of the previous motion, or null if this is the first one. example: https://test.antragsgruen.de/rest/consultation/122-previous-motion next: type: string nullable: true description: REST URL of the next motion, or null if this is the last one. example: https://test.antragsgruen.de/rest/consultation/124-next-motion MotionCreateRequest: x-php-namespace: imotion type: object required: - motion_type_id - sections - initiators properties: motion_type_id: type: integer description: ID of the motion type to create this motion under example: 3 agenda_item_id: type: integer nullable: true description: ID of the agenda item to associate this motion with. Null means no agenda item. example: 5 sections: type: array description: Content for each section, identified by the section definition ID from MotionTypeSectionDefinition. items: $ref: '#/components/schemas/MotionUpdateSection' initiators: type: array description: At least one initiator must be provided. items: $ref: '#/components/schemas/IMotionUpdateInitiator' supporters: type: array nullable: true description: Optional list of supporters for this motion. items: $ref: '#/components/schemas/IMotionUpdateSupporter' tags: type: array nullable: true description: IDs of public topic tags to apply. Only effective when the consultation allows user-defined tags. items: type: integer example: - 7 MotionUpdateRequest: x-php-namespace: imotion type: object required: - sections - initiators properties: agenda_item_id: type: integer nullable: true description: ID of the agenda item to associate this motion with. Null means no agenda item. example: 5 sections: type: array description: Content for each section, identified by the section definition ID from MotionTypeSectionDefinition. items: $ref: '#/components/schemas/MotionUpdateSection' initiators: type: array description: At least one initiator must be provided. items: $ref: '#/components/schemas/IMotionUpdateInitiator' supporters: type: array nullable: true description: Optional list of supporters for this motion. items: $ref: '#/components/schemas/IMotionUpdateSupporter' tags: type: array nullable: true description: IDs of public topic tags to apply. Only effective when the consultation allows user-defined tags. items: type: integer example: - 7 MotionUpdateSection: x-php-namespace: imotion type: object required: - section_id properties: section_id: type: integer description: ID of the section definition (from MotionTypeSectionDefinition) this data belongs to. example: 12 data: nullable: true oneOf: - type: string - type: array items: {} description: > Content for this section. For Title and TextSimple sections, plain text or HTML as accepted by the section type. For Image and PDF sections, the base64-encoded file content is expected. Section types with structured data (e.g. tabular data) expect an indexed array. Null or omitted means the section is left empty (only valid for optional sections). example: "

This is the motion text

" AmendmentCreateRequest: x-php-namespace: imotion type: object required: - sections - initiators properties: sections: type: array description: Content for each amended section, identified by the section definition ID from MotionTypeSectionDefinition. items: $ref: '#/components/schemas/AmendmentUpdateSection' initiators: type: array description: At least one initiator must be provided. items: $ref: '#/components/schemas/IMotionUpdateInitiator' supporters: type: array nullable: true description: Optional list of supporters for this amendment. items: $ref: '#/components/schemas/IMotionUpdateSupporter' tags: type: array nullable: true description: IDs of public topic tags to apply. Only effective when the consultation allows user-defined tags. items: type: integer example: - 7 reason: type: string nullable: true description: Explanation or reasoning for this amendment (maps to changeExplanation). example: "

This change is necessary because...

" editorial: type: string nullable: true description: Editorial note accompanying the amendment (maps to changeEditorial). example: "

Editorial remark

" global_alternative: type: boolean nullable: true description: Whether this amendment is a global alternative replacing the entire motion. example: false amending_amendment_id: type: integer nullable: true description: ID of an existing amendment that this amendment itself amends (for amendments-to-amendments). Null means this amends the base motion directly. example: null AmendmentUpdateRequest: x-php-namespace: imotion type: object required: - sections - initiators properties: sections: type: array description: Content for each amended section, identified by the section definition ID from MotionTypeSectionDefinition. items: $ref: '#/components/schemas/AmendmentUpdateSection' initiators: type: array description: At least one initiator must be provided. items: $ref: '#/components/schemas/IMotionUpdateInitiator' supporters: type: array nullable: true description: Optional list of supporters for this amendment. items: $ref: '#/components/schemas/IMotionUpdateSupporter' tags: type: array nullable: true description: IDs of public topic tags to apply. Only effective when the consultation allows user-defined tags. items: type: integer example: - 7 reason: type: string nullable: true description: Explanation or reasoning for this amendment (maps to changeExplanation). example: "

This change is necessary because...

" editorial: type: string nullable: true description: Editorial note accompanying the amendment (maps to changeEditorial). example: "

Editorial remark

" global_alternative: type: boolean nullable: true description: Whether this amendment is a global alternative replacing the entire motion. example: false AmendmentUpdateSection: x-php-namespace: imotion type: object required: - section_id properties: section_id: type: integer description: ID of the section definition (from MotionTypeSectionDefinition) this data belongs to. example: 12 data: type: string nullable: true description: > The full amended HTML content for this section. For TextSimple sections this is the complete amended text (not a diff); the server computes the diff against the original motion section. For Image and PDF sections, a base64-encoded file. Null or omitted leaves the section unchanged. example: "

This is the amended text

" IMotionUpdateInitiator: x-php-namespace: imotion type: object required: - person_type - name properties: id: type: integer description: ID of the initiator. Recommended to set when updating initiators person_type: $ref: '#/components/schemas/SupporterType' name: type: string description: For person_type=person, the person's full name. For person_type=organization, the organization's name. example: Ava organization: type: string nullable: true description: For person_type=person, their organizational affiliation. example: E Corp contact_name: type: string nullable: true description: For person_type=organization, the name of the contact person within the organization. example: Johanna Doe contact_email: type: string nullable: true example: contact@example.org contact_phone: type: string nullable: true example: "+49 30 12345678" gender: type: string nullable: true description: Optional gender. Might be required by consultation. example: female resolution_date: type: string nullable: true description: For organization initiators, the date of the board resolution in YYYY-MM-DD format. example: "2025-01-15" IMotionUpdateSupporter: x-php-namespace: imotion type: object required: - name properties: id: type: integer description: ID of the support. Recommended to set when updating supporters person_type: $ref: '#/components/schemas/SupporterType' description: Whether this support is given by a natural person or by an organization. Defaults to person. name: type: string description: For person_type=person, the full name of the supporter. For person_type=organization, the name of the contact person within the organization. example: Ava organization: type: string nullable: true description: For person_type=person, the optional organizational affiliation of the supporter. For person_type=organization, the name of the supporting organization. example: E Corp gender: type: string nullable: true description: Optional gender. example: female SupportRequest: x-php-namespace: imotion type: object required: - name properties: person_type: $ref: '#/components/schemas/SupporterType' description: Whether the support is given as a natural person or on behalf of an organization. Defaults to person. The motion type's support settings determine which of the two is permitted. name: type: string description: For person_type=person, the full name of the supporter. For person_type=organization, the name of the contact person within the organization. Ignored and replaced by the account name if the current user's profile has a fixed name. example: Ava organization: type: string nullable: true description: For person_type=person, the optional organizational affiliation of the supporter; required if the motion type's support settings require organizations. For person_type=organization, the name of the supporting organization; always required. example: E Corp gender: type: string nullable: true description: Optional gender. Might be required by the motion type's support settings. example: female non_public: type: boolean nullable: true description: Whether this support should be hidden from the public supporter list. Only effective if the support settings allow non-public supports. example: false MotionScreenRequest: x-php-namespace: imotion type: object required: - version properties: title_prefix: type: string nullable: true description: The final prefix to assign to this motion (e.g. "A1"). Truncated to 50 characters. Must not collide with the prefix/version of another non-deleted motion in this consultation. If omitted or null, the next available prefix is generated automatically. example: A1 version: type: string description: The version label to assign to this motion. example: "1" AmendmentScreenRequest: x-php-namespace: imotion type: object properties: title_prefix: type: string nullable: true description: The final prefix to assign to this amendment (e.g. "AM1"). Truncated to 45 characters. Must not collide with the prefix of another amendment to the same motion. If omitted or null, the next available prefix is generated automatically. example: AM1 AmendmentLink: x-php-namespace: imotion type: object properties: id: type: integer example: 23 prefix: type: string example: AM1 status_id: type: integer example: 3 description: Refer to https://github.com/CatoTH/antragsgruen/blob/main/models/db/IMotion.php#L47 for a definition of the status IDs status_title: type: string example: Eingereicht initiators_html: type: string example: "Testuser 1" url_json: type: string example: https://test.antragsgruen.de/rest/consultation/123-motion/amendment/42 url_html: type: string example: https://test.antragsgruen.de/consultation/123-motion/42 AmendmentDetails: x-php-namespace: imotion type: object properties: type: type: string example: amendment id: type: integer example: 23 prefix: type: string example: AM1 title: type: string example: "AM1 to M1: My motion" title_with_prefix: type: string example: "AM1 to M1: My motion" first_line: type: integer example: 1 description: The first line affected by this amendment status_id: type: integer example: 3 description: Refer to https://github.com/CatoTH/antragsgruen/blob/main/models/db/IMotion.php#L47 for a definition of the status IDs status_title: type: string example: Eingereicht date_published: type: string example: "2015-03-30T03:27:20+02:00" motion: $ref: '#/components/schemas/MotionLink' supporters: type: array items: $ref: '#/components/schemas/Supporter' initiators: type: array items: $ref: '#/components/schemas/Supporter' initiators_html: type: string example: "Testuser 1" sections: type: array items: $ref: '#/components/schemas/AmendmentSection' proposed_procedure: $ref: '#/components/schemas/AmendmentProposedProcedure' url_json: type: string example: https://test.antragsgruen.de/rest/consultation/123-motion/amendment/42 url_html: type: string example: https://test.antragsgruen.de/consultation/123-motion/42 Supporter: x-php-namespace: imotion type: object required: - id properties: id: type: integer description: ID of the support type: $ref: '#/components/schemas/SupporterType' name: type: string example: Ava organization: type: string example: E Corp gender: type: string nullable: true description: Optional gender. example: female SupporterType: x-php-namespace: imotion type: string example: person description: Describes if it is a natural person or an organization enum: - person - organization MotionSection: x-php-namespace: imotion type: object properties: type: type: string example: TextSimple enum: - Title - TextSimple - TextHTML - Image - TabularData - PDFAttachment - PDFAlternative - VideoEmbed - Choice title: type: string example: Motion text html: type: string example: "This is the motion text" layout_right: type: boolean example: true description: In case of a two-column layout, true indicates this section is to be shown on the right AmendmentSection: x-php-namespace: imotion type: object properties: type: type: string example: TextSimple enum: - Title - TextSimple - TextHTML - Image - TabularData - PDFAttachment - PDFAlternative - VideoEmbed - Choice title: type: string example: Motion text html: type: string example: "

Antragstext

Von Zeile 23 bis 26:

Dolor lorem. Bavaria ipsum dolor

" AmendmentProposedProcedure: x-php-namespace: proposedprocedure type: object nullable: true description: this object is only set if the proposed procedure exists and is public; otherwise the field is "null" properties: status_id: type: integer example: 6 description: Refer to https://github.com/CatoTH/antragsgruen/blob/main/models/db/IMotion.php#L47 for a definition of the status IDs status_title: type: string example: Modifizierte Übernahme sections: type: array description: The proposed changed version of amendment sections; if there are propsed changes items: $ref: '#/components/schemas/AmendmentSection' MotionProposedProcedure: x-php-namespace: proposedprocedure type: object nullable: true description: this object is only set if the proposed procedure exists and is public; otherwise the field is "null" properties: status_id: type: integer example: 6 description: Refer to https://github.com/CatoTH/antragsgruen/blob/main/models/db/IMotion.php#L47 for a definition of the status IDs status_title: type: string example: Modifizierte Übernahme ProposedProcedure: x-php-namespace: proposedprocedure type: object description: The public proposed procedure, grouped into outer blocks of voting blocks properties: proposed_procedure: type: array items: $ref: '#/components/schemas/ProposedProcedureOuterBlock' ProposedProcedureOuterBlock: x-php-namespace: proposedprocedure type: object description: An outer proposed procedure block properties: title: type: string example: "Abstimmung: Wohnen" voting_blocks: type: array items: $ref: '#/components/schemas/ProposedProcedureVotingBlock' ProposedProcedureVotingBlock: x-php-namespace: proposedprocedure type: object description: A voting block properties: id: type: string example: "19" nullable: true description: ID or null title: type: string example: "Abstimmung: Wohnungstausch" nullable: true description: title or null items: type: array items: $ref: '#/components/schemas/ProposedProcedureVotingItem' ProposedProcedureVotingItem: x-php-namespace: proposedprocedure type: object description: An individual item (motion or amendment) in a voting block properties: type: type: string example: "Amendment" enum: - Motion - Amendment id: type: integer example: 23 description: the ID of the motion or amendment prefix: type: string example: "W-01-035-3" title_with_prefix: type: string example: "W-01-035-3: Recht auf Wohnen" url_json: type: string example: https://test.antragsgruen.de/rest/consultation/123-motion/amendment/42 url_html: type: string example: https://test.antragsgruen.de/consultation/123-motion/42 initiators_html: type: string example: "Testuser 1" procedure: type: string example: "

Abstimmung (Angenommen)

Das Thema der Abstimmung wird an mehreren Stellen im Antrag beantragt. Die Antragskommission schlägt vor, eine Abstimmung zwischen W-01-034-2 und W-01-035 durchzuführen. Wenn W-01-034-2 angenommen wird, sind W-01-433 und W-01-599 in den Beschlusstext übernommen. Wenn W-01-035 angenommen wird, werden die beiden Anträge W-01-433 und W-01-599 nicht in den Beschlusstext übernommen.

" SpeakingList: x-php-namespace: speakingList type: object properties: id: type: integer example: 23 is_open: type: boolean example: true description: if true, then users can apply for the speaking list have_applied: type: boolean example: true description: indicates if the current user has already applied for the speaking list. requires_login: type: boolean example: true description: indicates if users need to be logged in to apply subqueues: type: array items: $ref: '#/components/schemas/SpeakingListSubqueue' slots: type: array items: $ref: '#/components/schemas/SpeakingListSlot' current_time: type: integer example: 1650106796832 description: unix timestamp in milliseconds of the time the request was served on server side. Can be used to calculate time offset of the browser. speaking_time: type: integer nullable: true example: 300 description: if not null, then this indicates the time in seconds each speaker has SpeakingListSubqueue: x-php-namespace: speakingList type: object properties: id: type: integer example: 23 nullable: true description: can be null, if this is a default subqueue name: type: string example: Member group 1 nullable: true description: can be null, if this is a default subqueue num_applied: type: integer example: 4 description: number of users that have already applied for this subqueue have_applied: type: boolean example: true description: if the currently logged in user has applied for this subqueue applied: type: array items: $ref: '#/components/schemas/SpeakingListApplicant' description: list of users that have applied. Only provided if list the list is public. SpeakingListApplicant: x-php-namespace: speakingList type: object properties: id: type: integer example: 23 description: application id name: type: string example: Johanna Doe user_id: type: integer example: 23 description: user id is_point_of_order: type: boolean description: Indicates if this is a point of order. If true, it should be higher prioritized applied_at: type: string example: "2015-03-30T03:27:20+02:00" SpeakingListSlot: x-php-namespace: speakingList type: object properties: id: type: integer example: 23 nullable: true description: can be null, if this is a default subqueue subqueue: type: object properties: id: type: integer example: 23 nullable: true description: can be null, if this is a default subqueue name: type: string example: Member group 1 nullable: true description: can be null, if this is a default subqueue name: type: string example: Johanna Doe user_id: type: integer example: 123 position: type: integer example: 1 date_started: type: string nullable: true example: "2015-03-30T03:27:20+02:00" description: When the speaking started. null if not yet started. date_stopped: type: string nullable: true example: "2015-03-30T03:27:20+02:00" description: When the speaking stopped. null if not yet stopped. If this is null and date_started is set, then the person is currently speaking. date_applied: type: string example: "2015-03-30T03:27:20+02:00" description: When the speaker applied. Always set. UserInfo: x-php-namespace: user type: object required: - auth properties: auth: type: string example: email:test@example.org UserLoginRequest: x-php-namespace: user type: object required: - username - password properties: username: type: string description: The user's e-mail address (or other identifier used for login) example: test@example.org password: type: string example: "correct horse battery staple" UserLoginResponse: x-php-namespace: user type: object required: - token - exp properties: token: type: string description: "JWT to be sent as `Authorization: Bearer ` on subsequent REST API requests" example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9... exp: type: integer description: Unix timestamp when the token expires example: 1751020800 ErrorNoPermission: x-php-namespace: errors type: object properties: success: type: boolean example: false error: type: string example: No permission to edit the agenda ErrorValidation: x-php-namespace: errors type: object properties: success: type: boolean example: false errors: type: array items: type: string example: - "Motion text: No data given" ErrorNotFound: x-php-namespace: errors type: object properties: success: type: boolean example: false error: type: string example: Object not found ErrorApiDisabled: x-php-namespace: errors type: object properties: success: type: boolean example: false error: type: string example: API disabled ErrorUnauthorized: x-php-namespace: errors type: object properties: success: type: boolean example: false error: type: string example: Missing or invalid bearer token MotionTypeList: x-php-namespace: motionType type: object required: - items properties: items: type: array items: $ref: '#/components/schemas/MotionType' MotionType: x-php-namespace: motionType type: object required: - id - labels - motion_prefix - settings - policies - sections properties: id: type: integer example: 3 labels: $ref: '#/components/schemas/MotionTypeLabels' motion_prefix: type: string nullable: true description: Alphanumeric prefix prepended to motion numbering (e.g. "A" → A1, A2 …). Null means no prefix. example: A settings: $ref: '#/components/schemas/MotionTypeSettings' policies: $ref: '#/components/schemas/MotionTypePolicies' sections: type: array description: Ordered list of text/content sections that make up a motion of this type items: $ref: '#/components/schemas/MotionTypeSectionDefinition' MotionTypeLabels: x-php-namespace: motionType type: object required: - singular - plural - create properties: singular: type: string description: Singular label for one motion of this type example: Motion plural: type: string description: Plural label for motions of this type example: Motions create: type: string description: Label shown on the button/link that creates a new motion of this type example: Submit a motion MotionTypeSettingsAmendmentMultipleParagraphs: x-php-namespace: motionType type: string description: > Controls how many paragraphs an amendment may affect. `multiple` — any number of paragraphs; `single_paragraph` — exactly one paragraph; `single_change` — exactly one contiguous change. enum: - multiple - single_paragraph - single_change example: multiple MotionTypeSettings: x-php-namespace: motionType type: object required: - amendments_only - amendment_multiple_paragraphs - has_proposed_procedure - has_responsibilities - allow_amendments_to_amendments - screening_motions - screening_amendments - merging_deadlines - amendments_to_amendments_deadlines properties: amendments_only: type: boolean description: If true, no new top-level motions can be submitted — only amendments to existing ones example: false amendment_multiple_paragraphs: $ref: '#/components/schemas/MotionTypeSettingsAmendmentMultipleParagraphs' screening_motions: type: boolean description: Whether newly submitted motions of this type need to be screened by an admin before publication example: false screening_amendments: type: boolean description: Whether newly submitted amendments of this type need to be screened by an admin before publication example: false has_proposed_procedure: type: boolean description: Whether a proposed procedure (Antragskommission recommendation) can be attached to motions of this type example: true has_responsibilities: type: boolean description: Whether responsibility assignments are tracked for this motion type example: false allow_amendments_to_amendments: type: boolean description: Whether amendments to amendments (sub-amendments) are permitted example: false merging_deadlines: type: array description: Deadline windows for the amendment merging phase (not tied to a submission policy) items: $ref: '#/components/schemas/MotionTypeDeadlineEntry' amendments_to_amendments_deadlines: type: array description: > Deadline windows for submitting/editing amendments that amend another amendment rather than the base motion (only relevant when allow_amendments_to_amendments is true). If empty, the amendments deadline applies instead. items: $ref: '#/components/schemas/MotionTypeDeadlineEntry' MotionTypePolicies: x-php-namespace: motionType type: object required: - motions - amendments - comments - support_motions - support_amendments properties: motions: $ref: '#/components/schemas/MotionTypePolicy' amendments: $ref: '#/components/schemas/MotionTypePolicy' comments: $ref: '#/components/schemas/MotionTypePolicy' support_motions: $ref: '#/components/schemas/MotionTypePolicy' support_amendments: $ref: '#/components/schemas/MotionTypePolicy' MotionTypePolicyId: x-php-namespace: motionType type: string description: Policy identifier enum: - nobody - all - logged_in - admins - user_groups example: all MotionTypePolicy: x-php-namespace: motionType type: object required: - id - description - deadlines - current_user_permitted properties: id: $ref: '#/components/schemas/MotionTypePolicyId' description: type: string description: Human-readable label for the policy (language depends on the site locale) example: Everybody current_user_permitted: type: boolean description: > Whether the user performing the request fulfills this policy right now, including deadline restrictions where applicable. Computed for the anonymous public if the request is unauthenticated. example: true user_group_ids: type: array nullable: true description: Only present when id=user_groups. Lists the IDs of the permitted user groups. items: type: integer example: - 4 - 7 deadlines: type: array description: > Deadline windows for this policy's activity. An empty array means no deadline is enforced (always open). Multiple entries represent named windows; the activity is open if the current time falls within at least one window. items: $ref: '#/components/schemas/MotionTypeDeadlineEntry' MotionTypeDeadlineEntry: x-php-namespace: motionType type: object properties: start: type: string nullable: true description: ISO 8601 datetime from which the window is open. Null means "from the beginning of time". example: "2025-09-01T00:00:00+02:00" end: type: string nullable: true description: ISO 8601 datetime at which the window closes. Null means "no end". example: "2025-10-15T23:59:59+02:00" title: type: string nullable: true description: Optional label for this window shown in the UI (e.g. "Early submission period") example: "Early submission period" MotionTypeSectionDefinition: x-php-namespace: motionType type: object required: - id - type - title - required - max_len - line_numbers - has_amendments - has_comments - position_right properties: id: type: integer example: 12 type: type: string description: Determines how the section content is stored and rendered enum: - Title - TextSimple - TextHTML - TextEditorial - Image - TabularData - PDFAttachment - PDFAlternative - VideoEmbed - Choice example: TextSimple title: type: string description: Label shown above the section in the motion form and detail view example: Motion text required: type: string description: > Whether submitters must fill in this section. `no` — optional; `yes` — mandatory; `encouraged` — shown as recommended but not enforced. enum: - no - yes - encouraged example: yes max_len: type: integer description: Maximum character length enforced on submission. 0 means no limit. example: 0 line_numbers: type: boolean description: Whether line numbers are displayed for this section example: true has_amendments: type: boolean description: Whether amendments may modify this section example: true has_comments: type: string description: > Comment granularity for this section. `none` — no comments; `motion` — one comment thread per section; `paragraphs` — one thread per paragraph. enum: - none - motion - paragraphs example: none position_right: type: boolean description: In a two-column merging layout, true places this section in the right column example: false MotionTypeContactRequirement: x-php-namespace: motionType type: string description: "`none` — field is not collected; `optional` — may be filled in; `required` — must be filled in." enum: - none - optional - required example: optional MotionTypeSupportType: x-php-namespace: motionType type: string description: > `like`/`dislike` — visitors may express informal approval/disapproval; `support` — an official support/signature is required before this can be officially considered submitted. enum: - like - dislike - support example: like MotionTypeInitiatorsCanMergeAmendments: x-php-namespace: motionType type: string description: > Whether initiators are allowed to merge amendments into their own motion. `never` — not allowed; `no_collision` — allowed only for amendments that don't collide with other pending amendments; `with_collision` — allowed even if merging would obsolete colliding amendments. enum: - never - no_collision - with_collision example: never MotionTypeUpdateRequest: x-php-namespace: motionType type: object description: > Partial update of a motion type's settings. Every top-level property is optional; a property that is omitted leaves that part of the configuration untouched. A property that is present replaces the entire corresponding group (e.g. sending "labels" always sets all three of singular/plural/create). properties: labels: $ref: '#/components/schemas/MotionTypeLabelsRequest' motion_prefix: type: string nullable: true description: Alphanumeric prefix prepended to motion numbering (e.g. "A" → A1, A2 …). Null means no prefix. example: A sidebar_create_button: type: boolean description: Whether a "create new motion" button for this type is shown in the sidebar example: true amendment_multiple_paragraphs: $ref: '#/components/schemas/MotionTypeSettingsAmendmentMultipleParagraphs' initiators_can_merge_amendments: $ref: '#/components/schemas/MotionTypeInitiatorsCanMergeAmendments' settings: $ref: '#/components/schemas/MotionTypeSettingsUpdateRequest' policies: $ref: '#/components/schemas/MotionTypePoliciesUpdateRequest' deadlines: $ref: '#/components/schemas/MotionTypeDeadlinesUpdateRequest' pdf_layout_id: type: string description: > Identifier of the PDF layout to use, matching one of the ids returned by the (not yet REST-exposed) selectable-layouts list, e.g. "php0", "html2pdf3", "latex5". Sending an unknown id is a validation error. example: php0 motion_support_types: type: array description: Which informal reaction/support mechanisms are enabled for motions of this type items: $ref: '#/components/schemas/MotionTypeSupportType' example: - like - support amendment_support_types: type: array description: Which informal reaction/support mechanisms are enabled for amendments of this type items: $ref: '#/components/schemas/MotionTypeSupportType' example: - like - support motion_initiator_settings: $ref: '#/components/schemas/MotionTypeInitiatorSettingsUpdateRequest' amendment_initiator_settings: $ref: '#/components/schemas/MotionTypeAmendmentInitiatorSettingsUpdateRequest' MotionTypeLabelsRequest: x-php-namespace: motionType type: object required: - singular - plural - create properties: singular: type: string example: Motion plural: type: string example: Motions create: type: string example: Submit a motion MotionTypeSettingsUpdateRequest: x-php-namespace: motionType type: object required: - pdf_introduction - motion_title_intro - has_proposed_procedure - proposed_procedure_versioning - has_responsibilities - comments_restrict_view_to_writables - allow_amendments_to_amendments - screening_motions - screening_amendments - show_proposals_in_exports properties: pdf_introduction: type: string description: Free text shown as an introduction on generated PDFs example: "" motion_title_intro: type: string description: Text prepended to the title of motions of this type example: "" has_proposed_procedure: type: boolean description: Whether a proposed procedure (Antragskommission recommendation) can be attached to motions of this type example: true proposed_procedure_versioning: type: boolean description: Whether proposed-procedure versioning is enabled (only relevant when has_proposed_procedure is true) example: true has_responsibilities: type: boolean description: Whether responsibility assignments are tracked for this motion type example: false comments_restrict_view_to_writables: type: boolean description: If true, only users who could also comment may view existing comments example: false allow_amendments_to_amendments: type: boolean description: Whether amendments to amendments (sub-amendments) are permitted example: false screening_motions: type: boolean description: Whether newly submitted motions of this type need to be screened by an admin before publication example: false screening_amendments: type: boolean description: Whether newly submitted amendments of this type need to be screened by an admin before publication example: false show_proposals_in_exports: type: boolean description: Whether the proposed procedure is included in PDF/document exports example: false MotionTypePoliciesUpdateRequest: x-php-namespace: motionType type: object required: - motions - amendments - comments - support_motions - support_amendments properties: motions: $ref: '#/components/schemas/MotionTypePolicyUpdateRequest' amendments: $ref: '#/components/schemas/MotionTypePolicyUpdateRequest' comments: $ref: '#/components/schemas/MotionTypePolicyUpdateRequest' support_motions: $ref: '#/components/schemas/MotionTypePolicyUpdateRequest' support_amendments: $ref: '#/components/schemas/MotionTypePolicyUpdateRequest' MotionTypePolicyUpdateRequest: x-php-namespace: motionType type: object required: - id properties: id: $ref: '#/components/schemas/MotionTypePolicyId' user_group_ids: type: array nullable: true description: Only used when id=user_groups. IDs of the permitted user groups; unknown IDs are ignored. items: type: integer example: - 4 - 7 MotionTypeDeadlinesUpdateRequest: x-php-namespace: motionType type: object description: Replaces all deadline windows of the motion type. Each array may be empty to mean "no deadline". required: - motions - amendments - merging - comments - amendments_to_amendments properties: motions: type: array items: $ref: '#/components/schemas/MotionTypeDeadlineEntry' amendments: type: array items: $ref: '#/components/schemas/MotionTypeDeadlineEntry' merging: type: array items: $ref: '#/components/schemas/MotionTypeDeadlineEntry' comments: type: array items: $ref: '#/components/schemas/MotionTypeDeadlineEntry' amendments_to_amendments: type: array items: $ref: '#/components/schemas/MotionTypeDeadlineEntry' MotionTypeInitiatorSettingsUpdateRequest: x-php-namespace: motionType type: object description: Full settings for who may initiate/support motions (or amendments) of this type. required: - type - initiator_can_be_person - initiator_can_be_organization - person_policy - organization_policy - min_supporters - min_supporters_female - supporter_can_be_person - supporter_can_be_organization - allow_more_supporters - allow_supporting_after_publication - offer_non_public_supports - has_organizations - contact_name - contact_email - contact_phone - contact_gender - has_resolution_date properties: type: type: string description: > `only_initiator` — only the initiator submits, no separate supporter collection; `given_by_initiator` — the initiator enters supporters on their behalf; `collecting_supporters` — supporters register themselves after submission; `no_initiator` — no distinct initiator role. enum: - only_initiator - given_by_initiator - collecting_supporters - no_initiator example: only_initiator initiator_can_be_person: type: boolean example: true initiator_can_be_organization: type: boolean example: true person_policy: $ref: '#/components/schemas/MotionTypePolicyUpdateRequest' organization_policy: $ref: '#/components/schemas/MotionTypePolicyUpdateRequest' min_supporters: type: integer example: 1 min_supporters_female: type: integer nullable: true example: null supporter_can_be_person: type: boolean description: If supporters can support as a natural person. example: true supporter_can_be_organization: type: boolean description: If supporters can support on behalf of an organization. example: false allow_more_supporters: type: boolean example: true allow_supporting_after_publication: type: boolean example: false offer_non_public_supports: type: boolean example: false has_organizations: type: boolean example: true contact_name: $ref: '#/components/schemas/MotionTypeContactRequirement' contact_email: $ref: '#/components/schemas/MotionTypeContactRequirement' contact_phone: $ref: '#/components/schemas/MotionTypeContactRequirement' contact_gender: $ref: '#/components/schemas/MotionTypeContactRequirement' has_resolution_date: $ref: '#/components/schemas/MotionTypeContactRequirement' MotionTypeAmendmentInitiatorSettingsUpdateRequest: x-php-namespace: motionType type: object required: - same_as_motion properties: same_as_motion: type: boolean description: If true, amendments inherit the motion's initiator settings and "settings"/max_pdf_supporters below are ignored. example: false settings: $ref: '#/components/schemas/MotionTypeInitiatorSettingsUpdateRequest' max_pdf_supporters: type: integer nullable: true description: Maximum number of supporters listed on generated PDFs for amendments. Null means no limit. example: null SpeechRegisterRequest: x-php-namespace: speech type: object description: Request body for applying to speak. All fields are optional; a name is only needed for anonymous participants, a subqueue only if the list has several. properties: subqueue: type: integer nullable: true description: ID of the sub-list (e.g. "in favor"/"against") to apply to. Null/omitted when the list has no sub-lists. example: 4 username: type: string nullable: true description: Display name for anonymous participants. Ignored for logged-in users unless custom names are allowed. example: Jane Doe point_of_order: type: boolean description: Whether this is a point-of-order application. Defaults to false. example: false SpeechQueueSettingsRequest: x-php-namespace: speech type: object description: Request body for updating a speaking list's settings and activation. required: - is_active - is_open - is_open_poo - prefer_nonspeaker - allow_custom_names - show_names properties: is_active: type: boolean example: true is_open: type: boolean example: true is_open_poo: type: boolean description: Whether point-of-order applications are currently accepted. example: false prefer_nonspeaker: type: boolean example: false allow_custom_names: type: boolean example: true show_names: type: boolean example: true speaking_time: type: integer nullable: true description: Speaking time limit in seconds. Null disables the limit. example: 120 SpeechCreateItemRequest: x-php-namespace: speech type: object description: Request body for a moderator adding a named applicant to a speaking list. required: - name properties: name: type: string example: Jane Doe subqueue: type: integer nullable: true description: ID of the sub-list to add the entry to. Required if the list has sub-lists. example: 4 SpeechItemOperationRequest: x-php-namespace: speech type: object description: Optional request body for the `move` operation, giving the target position and sub-list. properties: new_subqueue_id: type: integer nullable: true description: ID of the sub-list to move the item into. Null/omitted keeps it out of any sub-list. example: 4 position: type: integer nullable: true description: Zero-based target position within the (waiting) list. example: 0 SpeechQueueUser: x-php-namespace: speech type: object description: The participant-facing view of a speaking list. required: - id - is_active - is_open - have_applied - allow_custom_names - is_open_poo - subqueues - slots - requires_login - current_time properties: id: type: integer example: 3 is_active: type: boolean example: true is_open: type: boolean example: true have_applied: type: boolean description: Whether the current user/cookie-user has a pending application on this list. example: false allow_custom_names: type: boolean example: true is_open_poo: type: boolean example: false subqueues: type: array items: $ref: '#/components/schemas/SpeechSubqueueUser' slots: type: array items: $ref: '#/components/schemas/SpeechSlot' requires_login: type: boolean example: false current_time: type: integer description: Server time in milliseconds since the epoch, used by clients to compute remaining speaking time. example: 1785091812308 speaking_time: type: integer nullable: true description: Speaking time limit in seconds, or null if none. example: 120 SpeechSubqueueUser: x-php-namespace: speech type: object description: A sub-list (e.g. "in favor"/"against") as seen by participants. required: - id - name - num_applied - have_applied properties: id: type: integer description: Sub-list ID, or -1 for the implicit default list. example: 4 name: type: string example: default num_applied: type: integer example: 2 have_applied: type: boolean example: false applied: type: array description: Applicants on this sub-list. Empty when the list is configured to hide names. items: $ref: '#/components/schemas/SpeechAppliedItem' SpeechAppliedItem: x-php-namespace: speech type: object description: An applicant on a speaking list, as shown to participants. required: - id - name - is_point_of_order - applied_at properties: id: type: integer example: 17 name: type: string example: Jane Doe is_point_of_order: type: boolean example: false applied_at: type: string description: ISO-8601 timestamp of when the application was made. example: "2026-07-10T10:00:00+02:00" SpeechSlot: x-php-namespace: speech type: object description: A scheduled or past speaking slot. required: - id - subqueue - name - position properties: id: type: integer example: 17 subqueue: $ref: '#/components/schemas/SpeechSlotSubqueue' name: type: string example: Jane Doe position: type: integer example: 1 date_started: type: string nullable: true description: ISO-8601 timestamp when the speech started, or null if not started. example: "2026-07-10T10:05:00+02:00" date_stopped: type: string nullable: true description: ISO-8601 timestamp when the speech ended, or null if not ended. example: null date_applied: type: string nullable: true description: ISO-8601 timestamp of the original application, or null. example: "2026-07-10T10:00:00+02:00" SpeechSlotSubqueue: x-php-namespace: speech type: object description: The sub-list a slot belongs to. required: - name properties: id: type: integer nullable: true description: Sub-list ID, or null for the default list. example: 4 name: type: string example: default SpeechQueueAdmin: x-php-namespace: speech type: object description: The moderator-facing view of a speaking list. required: - id - is_active - settings - subqueues - slots - current_time properties: id: type: integer example: 3 is_active: type: boolean example: true settings: $ref: '#/components/schemas/SpeechQueueSettings' subqueues: type: array items: $ref: '#/components/schemas/SpeechSubqueueAdmin' slots: type: array items: $ref: '#/components/schemas/SpeechSlot' other_active_name: type: string nullable: true description: Title of the other currently active list, if activating this one would deactivate it. example: null current_time: type: integer example: 1785091812308 SpeechSubqueueAdmin: x-php-namespace: speech type: object description: A sub-list as seen by moderators, split into scheduled ("onlist") and waiting ("applied") entries. required: - id - name - onlist - applied properties: id: type: integer example: 4 name: type: string example: default onlist: type: array items: $ref: '#/components/schemas/SpeechAdminItem' applied: type: array items: $ref: '#/components/schemas/SpeechAdminItem' SpeechAdminItem: x-php-namespace: speech type: object description: A speaking-list entry with the metadata available to moderators. required: - id - name - is_point_of_order - applied_at properties: id: type: integer example: 17 name: type: string example: Jane Doe user_id: type: integer nullable: true description: The account ID of the applicant, or null for anonymous/manually added entries. example: 42 user_token: type: string nullable: true description: The cookie-user token of an anonymous applicant, or null. example: null is_point_of_order: type: boolean example: false applied_at: type: string example: "2026-07-10T10:00:00+02:00" SpeechQueueSettings: x-php-namespace: speech type: object description: The settings of a speaking list, as returned in the moderation view. required: - is_open - is_open_poo - allow_custom_names - prefer_nonspeaker - show_names properties: is_open: type: boolean example: true is_open_poo: type: boolean example: false allow_custom_names: type: boolean example: true prefer_nonspeaker: type: boolean example: false show_names: type: boolean example: true speaking_time: type: integer nullable: true example: 120 SpeechQueueSettingsResponse: x-php-namespace: speech type: object description: Response of the settings update - the updated moderation view plus the re-rendered sidebar HTML. required: - queue - sidebar properties: queue: $ref: '#/components/schemas/SpeechQueueAdmin' sidebar: type: array description: The [primary, secondary] sidebar HTML fragments (empty strings when there is none). items: type: string VotingStatus: x-php-namespace: voting type: string description: > The state of a voting. "offline" means the voting itself is not held using Antragsgrün - only its result is recorded here. enum: - offline - preparing - open - closed_published - closed_unpublished VotingItemType: x-php-namespace: voting type: string description: The kind of thing that is being voted on. enum: - motion - amendment - question VotingItemResult: x-php-namespace: voting type: string description: The outcome for one item. Null as long as the voting has not been closed. enum: - accepted - rejected - quorum_reached - quorum_missed VotingVotesPublicity: x-php-namespace: voting type: string description: > Who may see who voted how. This is what the voter is promised before casting a vote; each vote is stored with the publicity it was cast under. enum: - nobody - admins - everybody VotingResultsPublicity: x-php-namespace: voting type: string description: Who may see the counted results. The turnout is visible either way. enum: - admins - everybody VotingActivityType: x-php-namespace: voting type: string description: What happened to a voting, as recorded in its activity log. enum: - opened - closed - reset - reopened VotingPublicity: x-php-namespace: voting type: object description: What this voting promises about the visibility of votes and results. required: - single_votes - results properties: single_votes: $ref: '#/components/schemas/VotingVotesPublicity' results: $ref: '#/components/schemas/VotingResultsPublicity' VotingAnswer: x-php-namespace: voting type: object description: One of the options that can be voted for, e.g. "yes". required: - api_id - title properties: api_id: type: string description: How this answer is referred to in votes and results. example: yes title: type: string description: The label to show, in the reader's language. x-php-type: '\app\models\api\LocalizedString' example: Ja result: $ref: '#/components/schemas/VotingItemResult' VotingStatistics: x-php-namespace: voting type: object description: > The turnout. Visible to everybody regardless of the result publicity: it says how many have voted, never how they voted. required: - votes - voters properties: votes: type: integer description: Votes cast, counting an item group that was voted on as one vote. example: 143 voters: type: integer description: People who have cast at least one vote. example: 143 VotingVoter: x-php-namespace: voting type: object description: A person whose vote is visible to the reader of this payload. required: - user_id - user_group_ids properties: user_id: type: integer example: 12 user_name: type: string nullable: true description: Rendered according to the voting's "votes_names" setting - the login name, the full name, or the organization. example: testuser@example.org user_group_ids: type: array description: The user groups this person belongs to, used to group the list of votes. items: type: integer VotingAbstention: x-php-namespace: voting type: object description: > The general abstention: abstaining from the voting as a whole rather than voting on the single items. "count" and "users" are only filled where the results, respectively the single votes, may be seen. required: - enabled properties: enabled: type: boolean description: Whether this voting offers a general abstention at all. count: type: integer nullable: true description: How many have abstained. Null where the results may not be seen. example: 4 users: type: array nullable: true description: Who has abstained. Null where the single votes may not be seen. items: $ref: '#/components/schemas/VotingVoter' VotingQuorum: x-php-namespace: voting type: object description: The quorum a voting has to reach. Null if it has none. required: - type - eligible properties: type: type: integer description: The quorum type as configured (see models/quorumType). example: 1 target: type: integer nullable: true description: How many votes are needed. Null for quorum types that describe their target in words instead. example: 100 target_label: type: string nullable: true description: The target as text, for quorum types that cannot express it as a number. x-php-type: '\app\models\api\LocalizedString' eligible: type: integer description: How many people the quorum is calculated from. example: 200 VotingItemGroupQuorum: x-php-namespace: voting type: object description: How far one item group is towards the quorum. properties: votes: type: integer nullable: true example: 130 current_label: type: string nullable: true description: The current state as text, for quorum types that cannot express it as a number. x-php-type: '\app\models\api\LocalizedString' VotingItemRef: x-php-namespace: voting type: object description: Refers to one of the items of this voting. required: - type - id properties: type: $ref: '#/components/schemas/VotingItemType' id: type: integer example: 3 VotingItem: x-php-namespace: voting type: object description: > One motion, amendment or question being voted on. Everything that is voted on *together* hangs off the item group this item points at, not off the item itself. required: - type - id - group_id - title_with_prefix properties: type: $ref: '#/components/schemas/VotingItemType' id: type: integer example: 3 group_id: type: string description: > The item group this item is voted on as part of. Items that are voted on individually have a group of their own. example: single:amendment:3 prefix: type: string nullable: true example: Ä1 title_with_prefix: type: string x-php-type: '\app\models\api\LocalizedString' example: "Ä1 to A1: Renewable energy" initiators_html: type: string nullable: true x-php-type: '\app\models\api\LocalizedString' url_html: type: string nullable: true url_json: type: string nullable: true procedure_html: type: string nullable: true description: The proposed procedure, as far as it is public. x-php-type: '\app\models\api\LocalizedString' result: $ref: '#/components/schemas/VotingItemResult' VotingAnswerCount: x-php-namespace: voting type: object required: - answer - votes properties: answer: type: string description: The api_id of the answer. example: yes votes: type: integer example: 120 VotingOrganizationResult: x-php-namespace: voting type: object description: The counted votes, optionally broken down by organization. required: - answers properties: organization: type: string nullable: true description: Null for the regular case of one result per voting. answers: type: array items: $ref: '#/components/schemas/VotingAnswerCount' VotingResults: x-php-namespace: voting type: object description: The result of one item group. Null where the reader may not see the results. required: - counts properties: counts: type: array items: $ref: '#/components/schemas/VotingOrganizationResult' quorum: $ref: '#/components/schemas/VotingItemGroupQuorum' VotingSingleVote: x-php-namespace: voting type: object description: One person's vote, as far as the reader may see it. required: - answer - weight - voter properties: answer: type: string description: The api_id of the answer that was voted for. example: yes weight: type: integer example: 1 voter: $ref: '#/components/schemas/VotingVoter' VotingItemGroup: x-php-namespace: voting type: object description: > Everything that is voted on with one click: several items voted on together, or a single item. Results and votes hang off the group, so they are transmitted once rather than once per item. required: - id - items properties: id: type: string example: single:amendment:3 name: type: string nullable: true description: The name of the group. Null for a group that only exists to hold one item. items: type: array items: $ref: '#/components/schemas/VotingItemRef' results: $ref: '#/components/schemas/VotingResults' single_votes: type: array nullable: true description: > Who voted how. Null where the reader may not see the single votes - which is decided per vote, as a vote keeps the publicity it was cast under. items: $ref: '#/components/schemas/VotingSingleVote' VotingUserVote: x-php-namespace: voting type: object required: - group_id - answer properties: group_id: type: string answer: type: string example: yes VotingUserState: x-php-namespace: voting type: object description: What this voting means for the person reading the payload. required: - eligible - vote_weight - abstained - votes - can_vote_group_ids properties: eligible: type: boolean description: Whether this person may vote here at all. vote_weight: type: integer example: 1 votes_remaining: type: integer nullable: true description: Null if the number of votes is not limited. abstained: type: boolean description: Whether this person has abstained from the voting as a whole. votes: type: array description: This person's own votes, whatever the publicity of the voting. items: $ref: '#/components/schemas/VotingUserVote' can_vote_group_ids: type: array description: The item groups this person may vote on right now. items: type: string VotingBlockUser: x-php-namespace: voting type: object description: A voting as it is shown to a participant. required: - id - title - status - position - current_time - answers - has_majority - is_presence_call - publicity - statistics - item_groups - items - me properties: id: type: integer example: 42 title: type: string example: Amendments to A1 status: $ref: '#/components/schemas/VotingStatus' position: type: integer description: > Where this voting is sorted among the others: descending, ties broken by descending id. A live event describes one voting, so a reader that is told the order can keep a list that arrives one member at a time in the order the administration gave it. assigned_motion_id: type: integer nullable: true description: The motion this voting is shown at. Null if it is shown on the votings page. opened_at: type: integer format: int64 nullable: true description: When the voting was opened, in milliseconds. Null unless it is open. current_time: type: integer format: int64 description: The server's clock in milliseconds, so that a countdown can correct for clock skew. voting_time: type: integer nullable: true description: How long the voting is open, in seconds. Null if there is no countdown. answers: type: array items: $ref: '#/components/schemas/VotingAnswer' has_majority: type: boolean description: Whether the answers of this voting express approval and rejection, so that a majority can be calculated. is_presence_call: type: boolean description: Whether this voting only records who is present. publicity: $ref: '#/components/schemas/VotingPublicity' quorum: $ref: '#/components/schemas/VotingQuorum' statistics: $ref: '#/components/schemas/VotingStatistics' abstention: $ref: '#/components/schemas/VotingAbstention' item_groups: type: array items: $ref: '#/components/schemas/VotingItemGroup' items: type: array items: $ref: '#/components/schemas/VotingItem' me: $ref: '#/components/schemas/VotingUserState' policy: $ref: '#/components/schemas/VotingPolicy' user_groups: type: array nullable: true description: > The user groups that can be given voting rights, with the number of their members - the list of votes is grouped by them. Frozen at the moment the voting is closed. items: $ref: '#/components/schemas/VotingUserGroup' VotingUserGroup: x-php-namespace: voting type: object description: A user group that can be given voting rights, with the number of its members. required: - id - title - member_count properties: id: type: integer title: type: string x-php-type: '\app\models\api\LocalizedString' member_count: type: integer VotingEligibilityUser: x-php-namespace: voting type: object required: - user_id - user_name - weight properties: user_id: type: integer user_name: type: string weight: type: integer VotingEligibilityGroup: x-php-namespace: voting type: object description: Who is entitled to vote, by user group. Frozen at the moment the voting is closed. required: - group_id - title - users properties: group_id: type: integer title: type: string x-php-type: '\app\models\api\LocalizedString' users: type: array items: $ref: '#/components/schemas/VotingEligibilityUser' VotingPolicy: x-php-namespace: voting type: object description: Who is allowed to vote. required: - id properties: id: type: integer description: type: string nullable: true x-php-type: '\app\models\api\LocalizedString' user_groups: type: array nullable: true description: > The IDs of the user groups admitted by the policy that works that way. Named as the policy API of the rest of Antragsgrün names it, since the same widget edits both. items: type: integer VotingMaxVotes: x-php-namespace: voting type: object description: How many votes the members of one user group have. required: - max_votes properties: group_id: type: integer nullable: true description: Null for the default that applies to everyone. max_votes: type: integer VotingSettings: x-php-namespace: voting type: object description: > The configuration of a voting as the administration form works with it - the raw values behind the resolved "publicity", "answers" and "quorum" of the payload. required: - votes_public - results_public - votes_names - answers_template properties: votes_public: type: integer description: 0 = nobody, 1 = admins, 2 = everybody results_public: type: integer description: 0 = admins only, 1 = everybody votes_names: type: integer description: How voters are named in the list of votes - 0 = login name, 1 = full name, 2 = organization answers_template: type: integer description: Which set of answers is offered (see models/votings/AnswerTemplates) majority_type: type: integer nullable: true quorum_type: type: integer nullable: true voting_time: type: integer nullable: true assigned_motion_id: type: integer nullable: true policy: $ref: '#/components/schemas/VotingPolicy' max_votes_by_group: type: array nullable: true items: $ref: '#/components/schemas/VotingMaxVotes' VotingActivityLogEntry: x-php-namespace: voting type: object required: - type - date properties: type: $ref: '#/components/schemas/VotingActivityType' date: type: string example: "2026-08-27T10:00:00+02:00" VotingEditable: x-php-namespace: voting type: object description: What the current status of the voting allows an administrator to change. required: - items_can_be_added - items_can_be_removed - settings_can_be_changed properties: items_can_be_added: type: boolean items_can_be_removed: type: boolean settings_can_be_changed: type: boolean description: Whether the settings that are frozen while a voting runs can be changed. VotingBlockAdmin: x-php-namespace: voting description: > A voting as it is shown to someone who administers votings: everything a participant sees, plus the configuration, the people entitled to vote, and the activity log. allOf: - $ref: '#/components/schemas/VotingBlockUser' - type: object required: - settings - log - editable properties: settings: $ref: '#/components/schemas/VotingSettings' eligibility: type: array nullable: true description: Who is entitled to vote. Null if the voting is open to everyone rather than to selected groups. items: $ref: '#/components/schemas/VotingEligibilityGroup' log: type: array items: $ref: '#/components/schemas/VotingActivityLogEntry' editable: $ref: '#/components/schemas/VotingEditable' VotingBlockProposedProcedure: x-php-namespace: voting type: object description: > A voting as it appears in the proposed procedure: what is to be voted on, and under which rules - never how anyone voted, and never a result. required: - answers - has_majority - is_presence_call - item_groups - items properties: id: type: integer nullable: true description: Null for items that are proposed for a voting which has not been created yet. title: type: string nullable: true status: $ref: '#/components/schemas/VotingStatus' assigned_motion_id: type: integer nullable: true answers: type: array items: $ref: '#/components/schemas/VotingAnswer' has_majority: type: boolean is_presence_call: type: boolean quorum: $ref: '#/components/schemas/VotingQuorum' statistics: $ref: '#/components/schemas/VotingStatistics' policy: $ref: '#/components/schemas/VotingPolicy' user_groups: type: array items: $ref: '#/components/schemas/VotingUserGroup' item_groups: type: array items: $ref: '#/components/schemas/VotingItemGroup' items: type: array items: $ref: '#/components/schemas/VotingItem'