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

# Create a deadline

> Creates a deadline and returns the persisted entity.



## OpenAPI

````yaml /pt/openapi/v3-current/reporter.yaml post /v1/deadlines
openapi: 3.1.0
info:
  contact:
    email: contact@lerian.studio
    name: Lerian Studio
    url: https://lerian.studio
  description: Use this API to manage the data sources, templates, and reports of Reporter.
  license:
    name: Lerian Studio General License
  title: Midaz Reporter API
  version: 4.0.0
servers:
  - url: https://reporter.sandbox.lerian.net
security:
  - BearerAuth: []
tags:
  - description: Generated report instances and their lifecycle.
    name: Reports
  - description: Reusable report definitions.
    name: Templates
  - description: Interactive construction of report templates.
    name: Template Builder
  - description: Scheduled report due-date tracking.
    name: Deadlines
  - description: Configured inputs that feed report data.
    name: Data Sources
  - description: Aggregated reporting metrics.
    name: Metrics
  - description: Published business event catalog and delivery policies.
    name: Streaming
paths:
  /v1/deadlines:
    post:
      tags:
        - Deadlines
      summary: Create a deadline
      description: Creates a deadline and returns the persisted entity.
      operationId: createDeadline
      requestBody:
        content:
          application/json:
            schema:
              properties:
                active:
                  description: Whether the deadline is active.
                  examples:
                    - true
                  type: boolean
                color:
                  description: Hex color used to identify the deadline.
                  examples:
                    - '#FF5733'
                  type: string
                description:
                  description: Optional deadline description.
                  examples:
                    - Monthly regulatory compliance report
                  type: string
                dueDate:
                  description: Date and time when the deadline is due.
                  examples:
                    - '2026-03-31T23:59:59Z'
                  format: date-time
                  type: string
                filters:
                  additionalProperties:
                    additionalProperties:
                      additionalProperties:
                        $ref: '#/components/schemas/DeadlineFilterCondition'
                      type: object
                    type: object
                  description: >-
                    Filter conditions this deadline applies when it fires,
                    grouped by data source, table, and field. Optional: omit it
                    for a deadline that filters nothing.
                  examples:
                    - accounts:
                        account:
                          vencimento:
                            period: previous_month
                  type: object
                frequency:
                  description: Deadline recurrence frequency.
                  examples:
                    - monthly
                  type: string
                monthsOfYear:
                  description: Months in which a semiannual or annual deadline occurs.
                  examples:
                    - - 1
                      - 6
                  items:
                    format: int64
                    type: integer
                  type:
                    - array
                    - 'null'
                name:
                  description: Human-readable deadline name.
                  examples:
                    - Monthly Regulatory Report
                  type: string
                notifyDaysBefore:
                  description: Days before the due date when notifications begin.
                  examples:
                    - 5
                  format: int64
                  type: integer
                templateId:
                  description: Template used to generate the deadline report.
                  examples:
                    - 00000000-0000-0000-0000-000000000001
                  type: string
                type:
                  description: Deadline category.
                  examples:
                    - regulatory
                  type: string
              required:
                - color
                - dueDate
                - frequency
                - name
                - type
              type: object
        description: JSON request payload.
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Deadline'
          description: Created
        '400':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Bad Request
        '401':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Unauthorized
        '403':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Forbidden
        '404':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Not Found
        '409':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Conflict
        '422':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Unprocessable Entity
        '500':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Internal Server Error
components:
  schemas:
    DeadlineFilterCondition:
      properties:
        between:
          description: Inclusive lower and upper bounds for a range match.
          examples:
            - - 100
              - 1000
          items: {}
          type:
            - array
            - 'null'
        eq:
          description: Values matched for equality; multiple values are combined with OR.
          examples:
            - - active
              - pending
          items: {}
          type:
            - array
            - 'null'
        gt:
          description: Single lower-bound value that the field must exceed.
          examples:
            - - 100
          items: {}
          type:
            - array
            - 'null'
        gte:
          description: Single inclusive lower-bound value for the field.
          examples:
            - - '2025-06-01'
          items: {}
          type:
            - array
            - 'null'
        in:
          description: Values for which the field may match any member of the list.
          examples:
            - - active
              - pending
              - suspended
          items: {}
          type:
            - array
            - 'null'
        isNull:
          description: >-
            Matches records where the field holds no value (NULL, or absent in a
            document). Carries no values and is not combined with other
            operators on the same field.
          examples:
            - true
          type: boolean
        lt:
          description: Single upper-bound value that the field must remain below.
          examples:
            - - 1000
          items: {}
          type:
            - array
            - 'null'
        lte:
          description: Single inclusive upper-bound value for the field.
          examples:
            - - '2025-06-30'
          items: {}
          type:
            - array
            - 'null'
        nin:
          description: Values excluded from matching records.
          examples:
            - - deleted
              - archived
          items: {}
          type:
            - array
            - 'null'
        notNull:
          description: Matches records where the field holds a value. Carries no values.
          examples:
            - true
          type: boolean
        notStartsWith:
          description: Text prefixes excluded from matching records. Text columns only.
          examples:
            - - '7'
              - '8'
          items: {}
          type:
            - array
            - 'null'
        period:
          description: >-
            Relative date window resolved into a concrete range when a deadline
            fires. Mutually exclusive with every other operator on the same
            field.
          examples:
            - previous_month
          type: string
        startsWith:
          description: >-
            Text prefixes the field may begin with; any one of them matches.
            Text columns only.
          examples:
            - - '1'
              - '2'
          items: {}
          type:
            - array
            - 'null'
      type: object
    Deadline:
      properties:
        active:
          description: Whether the deadline is active.
          examples:
            - true
          type: boolean
        color:
          description: Hex color used to identify the deadline.
          examples:
            - '#FF5733'
          type: string
        createdAt:
          description: Date and time when the deadline was created.
          examples:
            - '2026-01-01T00:00:00Z'
          format: date-time
          type: string
        deliveredAt:
          description: Date and time when the deadline was delivered.
          examples:
            - '2026-03-15T10:00:00Z'
          format: date-time
          type: string
        description:
          description: Optional deadline description.
          examples:
            - Monthly regulatory compliance report
          type: string
        dueDate:
          description: >-
            Date and time when the deadline is due. Its clock time is the hour
            the reminder starts firing from.
          examples:
            - '2026-03-31T23:59:59Z'
          format: date-time
          type: string
        filters:
          additionalProperties:
            additionalProperties:
              additionalProperties:
                $ref: '#/components/schemas/DeadlineFilterCondition'
              type: object
            type: object
          description: >-
            Filter conditions this deadline applies when it fires, grouped by
            data source, table, and field. Absent when the deadline filters
            nothing.
          examples:
            - accounts:
                account:
                  vencimento:
                    period: previous_month
          type: object
        frequency:
          description: Deadline recurrence frequency.
          examples:
            - monthly
          type: string
        id:
          description: Unique deadline identifier.
          examples:
            - 00000000-0000-0000-0000-000000000000
          type: string
        institution:
          description: >-
            The institution the reports this deadline generates read for: an
            institution id, or "all". Absent, each report takes the tenant's
            only institution when it fires, reads everything when the tenant has
            none, and is refused when it has several.
          examples:
            - 00000000-0000-0000-0000-000000000000
          type: string
        monthsOfYear:
          description: Months in which a semiannual or annual deadline occurs.
          examples:
            - - 1
              - 6
          items:
            format: int64
            type: integer
          type:
            - array
            - 'null'
        name:
          description: Human-readable deadline name.
          examples:
            - Monthly Regulatory Report
          type: string
        notifyDaysBefore:
          description: Days before the due date when notifications begin.
          examples:
            - 5
          format: int64
          type: integer
        status:
          description: Current derived deadline status.
          examples:
            - pending
          type: string
        templateId:
          description: Template used to generate the report.
          examples:
            - 00000000-0000-0000-0000-000000000000
          type: string
        templateName:
          description: Human-readable name of the associated template.
          examples:
            - Financial Template
          type: string
        timezone:
          description: >-
            IANA timezone name that gives the dueDate clock time its meaning,
            along which the recurrence advances, and in which today's calendar
            day is counted for the past-day refusal and daysUntilDue. Empty
            means UTC.
          examples:
            - America/Sao_Paulo
          type: string
        type:
          description: Deadline category.
          examples:
            - regulatory
          type: string
        updatedAt:
          description: Date and time when the deadline was last updated.
          examples:
            - '2026-01-01T00:00:00Z'
          format: date-time
          type: string
      type: object
    Detail:
      properties:
        code:
          description: >-
            Stable, machine-readable domain error code scoped to the emitting
            service (format: <SERVICE>-NNNN).
          type: string
        detail:
          description: >-
            A human-readable explanation specific to this occurrence of the
            problem.
          examples:
            - Property foo is required but is missing.
          type: string
        errors:
          description: Optional list of individual error details
          examples:
            - - location: body.templateId
                message: expected string to match 'uuid' format
                value: not-a-uuid
          items:
            $ref: '#/components/schemas/ErrorDetail'
          type:
            - array
            - 'null'
        instance:
          description: >-
            A URI reference that identifies the specific occurrence of the
            problem.
          examples:
            - https://example.com/error-log/abc123
          format: uri
          type: string
        status:
          description: HTTP status code
          examples:
            - 400
          format: int64
          type: integer
        title:
          description: >-
            A short, human-readable summary of the problem type. This value
            should not change between occurrences of the error.
          examples:
            - Bad Request
          type: string
        type:
          default: about:blank
          description: A URI reference to human-readable documentation for the error.
          examples:
            - https://example.com/errors/example
          format: uri
          type: string
        upstream:
          $ref: '#/components/schemas/Upstream'
          description: >-
            RFC 9457 extension member: the error a proxied third-party provider
            reported. Absent unless the emitting service explicitly surfaced
            one.
      type: object
    ErrorDetail:
      properties:
        location:
          description: >-
            Where the error occurred, e.g. 'body.items[3].tags' or
            'path.thing-id'
          examples:
            - body.templateId
          type: string
        message:
          description: Error message text
          examples:
            - expected string to match 'uuid' format
          type: string
        value:
          description: The value at the given location
          examples:
            - not-a-uuid
      type: object
    Upstream:
      additionalProperties: false
      properties:
        code:
          description: The upstream provider's own error code, verbatim.
          examples:
            - E4001
          type: string
        message:
          description: >-
            The upstream provider's own error message, verbatim (bounded, never
            its raw response body).
          examples:
            - account not found at provider
          type: string
      type: object
  securitySchemes:
    BearerAuth:
      bearerFormat: JWT
      description: JWT bearer token issued by the identity provider.
      scheme: bearer
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.