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

# What is due on a day

> The habits whose rule fires on that day, each with its completion for the day if any. Archived habits are never due.



## OpenAPI

````yaml https://api.doers.sh/openapi.json get /v2/habits/due/{day}
openapi: 3.1.0
info:
  title: Doers API
  version: 2.0.0
  description: >-
    The open API of Doers: tasks, projects, areas, prioritised context and the
    day's plan.


    ## Authentication


    Every route requires a bearer token, generated from **Settings > API & MCP**
    in the app:


    ```

    Authorization: Bearer pc_…

    ```


    ## Two date fields, not to be confused


    - `when` — the **schedule**: `today`, `anytime` (Later), `someday` (Future)
    or a date.

    - `deadline` — the **commitment**, independent of the schedule.


    ## Time zone


    The server reasons in UTC and does not know yours. Send the `X-PC-Today:
    YYYY-MM-DD` header

    (or the `day` argument where it exists) so dated operations use your local
    day.


    ## MCP server


    The same token gives access to the [Model Context
    Protocol](https://modelcontextprotocol.io)

    server at `POST https://doers.sh/mcp`, which exposes the same operations as
    tools for Claude,

    Cursor and other compatible clients.
servers:
  - url: https://api.doers.sh
    description: Production.
security:
  - bearerAuth: []
tags:
  - name: Tasks
  - name: Projects
  - name: Areas
  - name: Headings
  - name: Comments
  - name: Realtime
  - name: Devices
  - name: Context
  - name: Plan
  - name: Sessions
  - name: Rounds
  - name: Journal
  - name: Habits
  - name: Stats
  - name: Users
  - name: Profiles
  - name: Workspaces
  - name: Access
  - name: Activity
  - name: Tokens
  - name: Referrals
  - name: Files
  - name: Connections
  - name: Collaborators
  - name: Links
  - name: Packages
  - name: Installs
  - name: Billing
  - name: Calendar
  - name: Coach
  - name: Marketplace
paths:
  /v2/habits/due/{day}:
    get:
      tags:
        - Habits
      summary: What is due on a day
      description: >-
        The habits whose rule fires on that day, each with its completion for
        the day if any. Archived habits are never due.
      operationId: listDueHabits
      parameters:
        - name: day
          in: path
          required: true
          description: Local day key, `YYYY-MM-DD`.
          schema:
            type: string
            format: date
            pattern: >-
              ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                properties:
                  habits:
                    type: array
                    items:
                      type: object
                      properties:
                        habit:
                          type: object
                          properties:
                            id:
                              type: string
                            name:
                              type: string
                            startsOn:
                              type: string
                              format: date
                              pattern: >-
                                ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
                              description: The anchor every occurrence is expanded from.
                            rule:
                              type: object
                              properties:
                                every:
                                  type: integer
                                  minimum: 1
                                  maximum: 365
                                  description: 'The multiplier: 2 × week.'
                                unit:
                                  type: string
                                  enum:
                                    - day
                                    - week
                                    - month
                                    - year
                                weekdays:
                                  description: >-
                                    ISO weekdays (1 = Monday … 7 = Sunday) the
                                    weekly rule fires on. Only valid with unit
                                    "week".
                                  minItems: 1
                                  maxItems: 7
                                  type: array
                                  items:
                                    type: integer
                                    minimum: 1
                                    maximum: 7
                              required:
                                - every
                                - unit
                              additionalProperties: false
                              description: >-
                                A habit's rule: the task's repeat grammar
                                without a mode, phased on `startsOn`.
                            target:
                              oneOf:
                                - type: object
                                  properties:
                                    kind:
                                      type: string
                                      const: check
                                  required:
                                    - kind
                                  additionalProperties: false
                                - type: object
                                  properties:
                                    kind:
                                      type: string
                                      const: quantity
                                    amount:
                                      type: integer
                                      minimum: 1
                                      maximum: 100000
                                    unit:
                                      type: string
                                      minLength: 1
                                      maxLength: 40
                                  required:
                                    - kind
                                    - amount
                                    - unit
                                  additionalProperties: false
                                - type: object
                                  properties:
                                    kind:
                                      type: string
                                      const: minutes
                                    minutes:
                                      type: integer
                                      minimum: 1
                                      maximum: 1440
                                  required:
                                    - kind
                                    - minutes
                                  additionalProperties: false
                              description: >-
                                What one occurrence asks for: a tick, a quantity
                                in a unit, or minutes.
                            createdAt:
                              type: number
                              description: Epoch milliseconds.
                            archivedAt:
                              anyOf:
                                - type: number
                                  description: Epoch milliseconds.
                                - type: 'null'
                          required:
                            - id
                            - name
                            - startsOn
                            - rule
                            - target
                            - createdAt
                            - archivedAt
                          additionalProperties: false
                        completion:
                          anyOf:
                            - type: object
                              properties:
                                id:
                                  type: string
                                habitId:
                                  type: string
                                day:
                                  type: string
                                  format: date
                                  pattern: >-
                                    ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
                                  description: Local day key, `YYYY-MM-DD`.
                                amount:
                                  anyOf:
                                    - type: integer
                                      minimum: 0
                                      maximum: 9007199254740991
                                    - type: 'null'
                                  description: What was done, for a quantity target.
                                minutes:
                                  anyOf:
                                    - type: integer
                                      minimum: 0
                                      maximum: 9007199254740991
                                    - type: 'null'
                                  description: What was done, for a minutes target.
                                completedAt:
                                  type: number
                                  description: Epoch milliseconds.
                              required:
                                - id
                                - habitId
                                - day
                                - amount
                                - minutes
                                - completedAt
                              additionalProperties: false
                            - type: 'null'
                      required:
                        - habit
                        - completion
                      additionalProperties: false
                required:
                  - habits
                additionalProperties: false
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/TooManyRequests'
components:
  responses:
    BadRequest:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
      description: >-
        Invalid request — unreadable body, out-of-range field or unknown
        parameter.
    Unauthorized:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
      description: Token missing, unknown or revoked.
    TooManyRequests:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
      description: Too many requests. `Retry-After` says how many seconds to wait.
  schemas:
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              description: Stable machine-readable code.
            message:
              type: string
              description: Human-readable message.
            details:
              type: array
              description: Per-field detail, present on validation errors.
              items:
                type: object
                properties:
                  field:
                    type: string
                  message:
                    type: string
                required:
                  - field
                  - message
          required:
            - code
            - message
      required:
        - error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: A `pc_…` token generated from Settings > API & MCP.

````