openapi: 3.2.0 info: title: mcpgate-backend Feedback API version: 0.4.20 tags: - name: Feedback paths: /feedback/register: post: tags: - Feedback summary: Register operationId: register_feedback_register_post requestBody: content: application/json: schema: $ref: '#/components/schemas/RegisterRequest' required: true responses: '201': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/RegisterResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /feedback/instance: patch: tags: - Feedback summary: Update Delivery description: 'Switch an already-registered instance between email and pull-mode. Lets the gateway flip ``pong_delivery`` when the operator toggles "deliver fix updates through my own channels" — without re-registering (which mints a new token and orphans existing reports). Authenticated by the instance''s own token.' operationId: update_delivery_feedback_instance_patch parameters: - name: X-Instance-Token in: header required: false schema: anyOf: - type: string - type: 'null' title: X-Instance-Token requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/UpdateDeliveryRequest' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/UpdateDeliveryResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /feedback/report: post: tags: - Feedback summary: Report operationId: report_feedback_report_post parameters: - name: X-Instance-Token in: header required: false schema: anyOf: - type: string - type: 'null' title: X-Instance-Token requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/ReportRequest' responses: '201': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/ReportResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /feedback/comment: post: tags: - Feedback summary: Comment description: 'Reporter adds a comment to their own previously-filed issue. Authentication chain: 1. ``X-Instance-Token`` proves the gateway is registered (same as every other relay endpoint). 2. The issue must be a ``Report`` filed FROM this gateway — prevents one tenant from commenting on another tenant''s issue even with a valid issue_iid. 3. ``reporter_email`` must hash to the same ``reporter_hash`` we stored at report time — prevents anyone other than the original reporter from posting follow-ups. Authorised comments are posted as ``[Comment from reporter ]`` on the upstream tracker so maintainers can tell apart reporter follow- ups from maintainer replies and bot fan-outs.' operationId: comment_feedback_comment_post parameters: - name: X-Instance-Token in: header required: false schema: anyOf: - type: string - type: 'null' title: X-Instance-Token requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CommentRequest' responses: '201': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/CommentResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /feedback/release: post: tags: - Feedback summary: Release operationId: release_feedback_release_post parameters: - name: X-Phase6-Secret in: header required: false schema: anyOf: - type: string - type: 'null' title: X-Phase6-Secret requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/ReleaseRequest' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/ReleaseResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /feedback/webhook: post: tags: - Feedback summary: Webhook operationId: webhook_feedback_webhook_post parameters: - name: X-Phase6-Secret in: header required: false schema: anyOf: - type: string - type: 'null' title: X-Phase6-Secret - name: X-Gitlab-Event in: header required: false schema: anyOf: - type: string - type: 'null' title: X-Gitlab-Event - name: X-Gitlab-Token in: header required: false schema: anyOf: - type: string - type: 'null' title: X-Gitlab-Token requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/WebhookNote' responses: '200': description: Successful Response content: application/json: schema: type: object additionalProperties: true title: Response Webhook Feedback Webhook Post '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /feedback/pongs: get: tags: - Feedback summary: List Pongs operationId: list_pongs_feedback_pongs_get parameters: - name: X-Instance-Token in: header required: false schema: anyOf: - type: string - type: 'null' title: X-Instance-Token responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/PongListResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /feedback/pongs/{pong_id}/delivered: post: tags: - Feedback summary: Ack Pong operationId: ack_pong_feedback_pongs__pong_id__delivered_post parameters: - name: pong_id in: path required: true schema: type: integer minimum: 1 title: Pong Id - name: X-Instance-Token in: header required: false schema: anyOf: - type: string - type: 'null' title: X-Instance-Token responses: '200': description: Successful Response content: application/json: schema: type: object additionalProperties: true title: Response Ack Pong Feedback Pongs Pong Id Delivered Post '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /feedback/data/{token}: delete: tags: - Feedback summary: Erase operationId: erase_feedback_data__token__delete parameters: - name: token in: path required: true schema: type: string title: Token responses: '200': description: Successful Response content: application/json: schema: type: object additionalProperties: true title: Response Erase Feedback Data Token Delete '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' components: schemas: HTTPValidationError: properties: detail: items: $ref: '#/components/schemas/ValidationError' type: array title: Detail type: object title: HTTPValidationError UpdateDeliveryRequest: properties: pong_delivery: type: string enum: - email - local title: Pong Delivery type: object required: - pong_delivery title: UpdateDeliveryRequest description: 'Flip an already-registered instance between email and pull-mode. pong_delivery is otherwise fixed at register time; the gateway needs to switch it when the operator toggles "deliver fix updates through my own channels" on/off without re-registering (which would mint a new token and orphan existing reports).' RegisterResponse: properties: instance_token: type: string title: Instance Token pong_delivery: type: string enum: - email - local title: Pong Delivery type: object required: - instance_token - pong_delivery title: RegisterResponse PongListResponse: properties: pongs: items: $ref: '#/components/schemas/PongOut' type: array title: Pongs type: object required: - pongs title: PongListResponse UpdateDeliveryResponse: properties: pong_delivery: type: string enum: - email - local title: Pong Delivery type: object required: - pong_delivery title: UpdateDeliveryResponse WebhookNote: properties: object_kind: anyOf: - type: string - type: 'null' title: Object Kind event_type: anyOf: - type: string - type: 'null' title: Event Type object_attributes: additionalProperties: true type: object title: Object Attributes issue: anyOf: - additionalProperties: true type: object - type: 'null' title: Issue user: anyOf: - additionalProperties: true type: object - type: 'null' title: User type: object title: WebhookNote description: Subset of GitLab Note Hook payload that we care about. ReportResponse: properties: ok: type: boolean title: Ok default: true ref: type: string title: Ref issue_iid: type: integer title: Issue Iid type: object required: - ref - issue_iid title: ReportResponse InlineAttachment: properties: filename: type: string maxLength: 255 minLength: 1 title: Filename mime_type: type: string maxLength: 128 minLength: 3 title: Mime Type data_base64: type: string maxLength: 8388608 minLength: 1 title: Data Base64 type: object required: - filename - mime_type - data_base64 title: InlineAttachment description: 'A single binary attachment to a customer-filed bug or feature report. Customers send bytes as base64 on the report-creation request — the bytes only cross the customer→backend boundary once, fitting the transfer-protocol model that bytes are references everywhere *except* the original ingress point. The backend decodes, uploads to the upstream tracker (GitLab `/projects/:id/uploads`), and splices the returned Markdown reference into the resulting issue body. The original bytes are not persisted on the backend after the issue is created. Size cap is 5 MB per attachment (decoded) — bigger payloads cross into territory where a streaming upload protocol would be the right answer; that''s a V2 ask if customer demand surfaces.' CommentResponse: properties: ok: type: boolean title: Ok default: true issue_iid: type: integer title: Issue Iid type: object required: - issue_iid title: CommentResponse RegisterRequest: properties: instance_url: type: string maxLength: 2083 minLength: 1 format: uri title: Instance Url admin_email: type: string format: email title: Admin Email consent_version: type: integer minimum: 1.0 title: Consent Version default: 1 pong_delivery: type: string enum: - email - local title: Pong Delivery default: email type: object required: - instance_url - admin_email title: RegisterRequest PongOut: properties: id: type: integer title: Id kind: type: string title: Kind payload: additionalProperties: true type: object title: Payload created_at: type: string format: date-time title: Created At type: object required: - id - kind - payload - created_at title: PongOut ValidationError: properties: loc: items: anyOf: - type: string - type: integer type: array title: Location msg: type: string title: Message type: type: string title: Error Type input: title: Input ctx: type: object title: Context type: object required: - loc - msg - type title: ValidationError ReleaseResponse: properties: ok: type: boolean title: Ok default: true pongs_dispatched: type: integer title: Pongs Dispatched pongs_skipped: type: integer title: Pongs Skipped support_pongs_dispatched: type: integer title: Support Pongs Dispatched default: 0 support_pongs_skipped: type: integer title: Support Pongs Skipped default: 0 type: object required: - pongs_dispatched - pongs_skipped title: ReleaseResponse ReportRequest: properties: type: type: string enum: - bug - feature title: Type title: type: string maxLength: 200 minLength: 3 title: Title description: type: string maxLength: 50000 minLength: 3 title: Description reporter_email: anyOf: - type: string format: email - type: 'null' title: Reporter Email anonymous: type: boolean title: Anonymous default: false is_test: type: boolean title: Is Test default: false attachments: items: $ref: '#/components/schemas/InlineAttachment' type: array maxItems: 5 title: Attachments type: object required: - type - title - description title: ReportRequest ReleaseRequest: properties: version: type: string maxLength: 64 minLength: 1 title: Version closed_issue_iids: items: type: integer type: array title: Closed Issue Iids type: object required: - version title: ReleaseRequest CommentRequest: properties: issue_iid: type: integer minimum: 1.0 title: Issue Iid reporter_email: type: string format: email title: Reporter Email body: type: string maxLength: 10000 minLength: 1 title: Body type: object required: - issue_iid - reporter_email - body title: CommentRequest description: 'Reporter-initiated follow-up on their own previously-filed report. Gateway authenticates via ``X-Instance-Token`` like other endpoints; the relay additionally verifies that ``reporter_email`` matches the hash stored when the issue was filed, so only the original reporter can comment.'