> ## Documentation Index
> Fetch the complete documentation index at: https://docs.payra.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Trigger Monitoring Job



## OpenAPI

````yaml /api-reference/openapi.json post /back-office/monitoring
openapi: 3.1.0
info:
  title: Payra API
  version: 1.0.0
  description: Documentação da API para Backoffice e Service
servers: []
security: []
paths:
  /back-office/monitoring:
    post:
      tags:
        - Monitoring
      summary: Trigger Monitoring Job
      operationId: triggerMonitoringJob
      requestBody:
        description: Monitoring job parameters
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                jobType:
                  type: string
                  enum:
                    - payments_status_mismatch
                    - invoices_mismatch
                    - payments_stuck
                    - customers_mismatch
                    - customer_info_mismatch
                  description: Type of monitoring job to run
                startDate:
                  type: string
                  pattern: ^\d{4}-\d{2}-\d{2}$
                  description: Start date in YYYY-MM-DD format
                endDate:
                  type: string
                  pattern: ^\d{4}-\d{2}-\d{2}$
                  description: End date in YYYY-MM-DD format
                all:
                  type: boolean
                  default: false
                  description: Whether to fetch all records or only active ones
              required:
                - jobType
      responses:
        '200':
          description: Monitoring job triggered successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - health_status_ok
                      - health_status_error
                      - validation_error
                      - bad_request
                      - unauthorized
                      - forbidden
                      - not_found
                      - method_not_allowed
                      - internal_server_error
                      - organization_not_found
                      - cannot_access_organization
                      - api_key_not_found
                      - resource_already_exists
                  message:
                    type: string
                  data:
                    type: object
                    properties:
                      message:
                        type: string
                      jobType:
                        type: string
                        enum:
                          - payments_status_mismatch
                          - invoices_mismatch
                          - payments_stuck
                          - customers_mismatch
                          - customer_info_mismatch
                      monitoringOptions:
                        type: object
                        properties:
                          startDate:
                            type: string
                          endDate:
                            type: string
                          all:
                            type: boolean
                        required:
                          - all
                    required:
                      - message
                      - jobType
                      - monitoringOptions
                required:
                  - data
        '400':
          description: Invalid job type
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - health_status_ok
                      - health_status_error
                      - validation_error
                      - bad_request
                      - unauthorized
                      - forbidden
                      - not_found
                      - method_not_allowed
                      - internal_server_error
                      - organization_not_found
                      - cannot_access_organization
                      - api_key_not_found
                      - resource_already_exists
                    default: bad_request
                  message:
                    type: string
                  data: {}
        '422':
          description: Failed Validation
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - health_status_ok
                      - health_status_error
                      - validation_error
                      - bad_request
                      - unauthorized
                      - forbidden
                      - not_found
                      - method_not_allowed
                      - internal_server_error
                      - organization_not_found
                      - cannot_access_organization
                      - api_key_not_found
                      - resource_already_exists
                    default: validation_error
                  message:
                    type: string
                  data:
                    type: array
                    items: {}
        '500':
          description: Server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - health_status_ok
                      - health_status_error
                      - validation_error
                      - bad_request
                      - unauthorized
                      - forbidden
                      - not_found
                      - method_not_allowed
                      - internal_server_error
                      - organization_not_found
                      - cannot_access_organization
                      - api_key_not_found
                      - resource_already_exists
                    default: internal_server_error
                  message:
                    type: string
                  data: {}
      security:
        - Bearer: []
components:
  securitySchemes:
    Bearer:
      type: http
      scheme: bearer

````