> ## 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

> Use this endpoint to create a deadline with the input payload. A deadline tracks a due date for a report and, optionally, the template that should be used to fulfill it.

<Note>
  These endpoints power deadline management in the **Console**. You can also call them directly to integrate deadlines into your own systems.
</Note>


## OpenAPI

````yaml en/openapi/v3-current/reporter.yaml post /v1/deadlines
openapi: 3.1.0
info:
  title: Reporter
  description: ''
  version: 2.1.2
servers:
  - url: https://reporter.sandbox.lerian.net
security: []
tags: []
paths:
  /v1/deadlines:
    post:
      tags:
        - Deadlines API
      summary: Create a Deadline
      description: >-
        Use this endpoint to create a deadline with the input payload. A
        deadline tracks a due date for a report and, optionally, the template
        that should be used to fulfill it.
      parameters:
        - $ref: '#/components/parameters/Authorization'
        - $ref: '#/components/parameters/XOrganizationId'
        - $ref: '#/components/parameters/XIdempotency'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateDeadlineInput'
            example:
              name: Monthly Regulatory Report
              description: Monthly regulatory compliance report
              type: regulatory
              frequency: monthly
              dueDate: '2026-03-31T23:59:59Z'
              color: '#FF5733'
              notifyDaysBefore: 5
              monthsOfYear:
                - 1
                - 6
              templateId: 00000000-0000-0000-0000-000000000000
              active: true
      responses:
        '201':
          description: Indicates that the deadline was successfully created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Deadline'
          headers: {}
        '400':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                Error0016:
                  $ref: '#/components/examples/Error0016'
                Error0017:
                  $ref: '#/components/examples/Error0017'
                Error0018:
                  $ref: '#/components/examples/Error0018'
                Error0019:
                  $ref: '#/components/examples/Error0019'
          headers: {}
      security: []
components:
  parameters:
    Authorization:
      name: Authorization
      in: header
      description: >-
        The authorization token in the 'Bearer <token>' format.  


        **Important:** This header is required if your environment has Access
        Manager enabled. For more information, refer to the [Access
        Manager](/en/access-manager) documentation.
      required: false
      schema:
        type: string
    XOrganizationId:
      name: X-Organization-id
      in: header
      description: The unique identifier of the Organization associated with the request.
      required: true
      example: 019c96a0-0a98-7287-9a31-786e0809c769
      schema:
        type: string
    XIdempotency:
      name: X-Idempotency
      in: header
      description: >-
        Optional idempotency key for safe retries. If omitted, the server may
        generate one automatically.


        See [Retries and idempotency](/en/reference/retries-idempotency) for
        details.
      required: false
      schema:
        type: string
  schemas:
    CreateDeadlineInput:
      type: object
      description: The input payload to create a deadline.
      required:
        - name
        - type
        - frequency
        - dueDate
        - color
      properties:
        name:
          type: string
          description: Human-readable name of the deadline.
        description:
          type: string
          description: Optional description of the deadline.
        type:
          type: string
          description: Type of the deadline (e.g., `regulatory`, `custom`).
        frequency:
          type: string
          description: How often the deadline recurs (e.g., `monthly`, `annual`).
        dueDate:
          type: string
          description: The date and time when the deadline is due, in RFC 3339 format.
        color:
          type: string
          description: Color used to visually identify the deadline (hex format).
        notifyDaysBefore:
          type: integer
          description: Number of days before the due date when notifications start.
        monthsOfYear:
          type: array
          description: Months of the year (1-12) in which the deadline applies.
          items:
            type: integer
        templateId:
          type: string
          description: >-
            Unique identifier of the template used to fulfill the deadline
            (UUID).
        active:
          type: boolean
          description: Whether the deadline is active.
    Deadline:
      type: object
      description: Details about a deadline.
      properties:
        id:
          type: string
          description: Unique identifier of the deadline (UUID).
        name:
          type: string
          description: Human-readable name of the deadline.
        description:
          type: string
          description: Description of the deadline.
        type:
          type: string
          description: Type of the deadline (e.g., `regulatory`, `custom`).
        frequency:
          type: string
          description: How often the deadline recurs (e.g., `monthly`, `annual`).
        dueDate:
          type: string
          description: The date and time when the deadline is due, in RFC 3339 format.
        color:
          type: string
          description: Color used to visually identify the deadline (hex format).
        notifyDaysBefore:
          type: integer
          description: Number of days before the due date when notifications start.
        monthsOfYear:
          type: array
          description: Months of the year (1-12) in which the deadline applies.
          items:
            type: integer
        templateId:
          type: string
          description: >-
            Unique identifier of the template used to fulfill the deadline
            (UUID).
        templateName:
          type: string
          description: Name of the template used to fulfill the deadline.
        status:
          type: string
          description: >-
            Current status of the deadline (e.g., `pending`, `overdue`,
            `delivered`).
        active:
          type: boolean
          description: Whether the deadline is active.
        deliveredAt:
          type: string
          description: Timestamp marking when the deadline was delivered, if applicable.
        createdAt:
          type: string
          description: Timestamp marking when the deadline was created.
        updatedAt:
          type: string
          description: Timestamp marking the last update to the deadline.
    Error:
      type: object
      properties:
        code:
          type: string
          description: A unique, stable identifier for the error.
        title:
          type: string
          description: A brief summary of the issue.
        message:
          type: string
          description: Detailed guidance for resolving the error.
      description: Response message error.
      required:
        - code
        - title
        - message
  examples:
    Error0016:
      summary: Missing Fields in Request
      value:
        code: TPL-0016
        title: Missing Fields in Request
        message: >-
          Your request is missing one or more required fields. Please refer to
          the documentation to ensure all necessary fields are included in your
          request.
    Error0017:
      summary: Bad Request
      value:
        code: TPL-0017
        title: Bad Request
        message: >-
          The server could not understand the request due to malformed syntax.
          Please check the listed fields and try again.
    Error0018:
      summary: Internal Server Error
      value:
        code: TPL-0018
        title: Internal Server Error
        message: >-
          The server encountered an unexpected error. Please try again later or
          contact support.
    Error0019:
      summary: Invalid Query Parameter
      value:
        code: TPL-0019
        title: Invalid Query Parameter
        message: >-
          One or more query parameters are in an incorrect format. Please check
          the following parameters '%v' and ensure they meet the required format
          before trying again.

````