openapi: 3.0.1
info:
  title: Email Feedback Handler API Specification
  description: The Feedback Handler provides API endpoints to manage feedback from
    email notifications sent to recipient
  version: 1.0.102
servers:
- description: ''
  url: https://api.uat.btx.fr.banqup.com/core/feedback
- description: ''
  url: https://api.uat.btx.eu.banqup.com/core/feedback
paths:
  /v1/feedback/email/mailgun:
    post:
      tags:
      - Feedback Handler
      summary: Handle feedback
      description: 'Manage feedback from email notifications sent to recipient <br/>
        Scope: []'
      operationId: reportFeedback
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MailgunFeedbackRequest'
        required: true
      responses:
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 500
                error: INTERNAL
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27 12:34:50
                type: about:blank
                title: Internal Server Error
                detail: The server encountered an unexpected error.
        '200':
          description: Feedback reported successfully
          content:
            application/json: {}
        '406':
          description: Unacceptable feedback parameters
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
        '401':
          description: Unauthorized Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorProblemDetail'
              example:
                status: 401
                error: UNAUTHENTICATED
                requestId: a78150d2-7913-4ea6-933f-286cadac6745
                timestamp: 2018-08-27 12:34:50
                type: about:blank
                title: Unauthorized
                detail: Access to the requested resource lacks valid authentication
                  credentials.
components:
  schemas:
    EventData:
      required:
      - event
      - id
      type: object
      properties:
        event:
          type: string
        timestamp:
          type: string
        id:
          type: string
        envelope:
          type: object
        message:
          type: object
        recipient:
          type: string
        user-variables:
          $ref: '#/components/schemas/UserVariables'
    MailgunFeedbackRequest:
      type: object
      properties:
        signature:
          $ref: '#/components/schemas/Signature'
        event-data:
          $ref: '#/components/schemas/EventData'
    Signature:
      required:
      - signature
      - timestamp
      - token
      type: object
      properties:
        timestamp:
          type: string
        token:
          type: string
        signature:
          type: string
    UserVariables:
      required:
      - reference
      type: object
      properties:
        reference:
          maxLength: 2147483647
          minLength: 72
          type: string
    ApiErrorProblemDetail:
      required:
      - error
      - requestId
      - timestamp
      type: object
      properties:
        status:
          type: integer
          format: int32
        error:
          type: string
        requestId:
          type: string
        timestamp:
          type: string
          format: date-time
        type:
          type: string
          format: uri
        title:
          type: string
        detail:
          type: string
        instance:
          type: string
          format: uri
        problems:
          type: array
          items:
            $ref: '#/components/schemas/NestedProblem'
        properties:
          type: object
          additionalProperties:
            type: object
    NestedProblem:
      required:
      - detail
      - error
      - title
      type: object
      properties:
        error:
          type: string
        title:
          type: string
        detail:
          type: string
        type:
          type: string
          format: uri
