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

# Publish a package, or a new version of one

> Publishing to a slug you already used adds a version to that package rather than creating a second one, and un-retires it if it had been taken down. The public address is returned **once**, on the first publish: only a hash of its token is stored.



## OpenAPI

````yaml https://api.doers.sh/openapi.json post /v2/packages
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/packages:
    post:
      tags:
        - Packages
      summary: Publish a package, or a new version of one
      description: >-
        Publishing to a slug you already used adds a version to that package
        rather than creating a second one, and un-retires it if it had been
        taken down. The public address is returned **once**, on the first
        publish: only a hash of its token is stored.
      operationId: publishPackage
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                changelog:
                  type: string
                  default: ''
                  maxLength: 10000
                emoji:
                  anyOf:
                    - type: string
                      maxLength: 200
                    - type: 'null'
                files:
                  type: array
                  items:
                    type: object
                    properties:
                      path:
                        type: string
                        minLength: 1
                        description: Relative, `/`-separated, no `..`.
                      content:
                        type: string
                    required:
                      - path
                      - content
                    additionalProperties: false
                  minItems: 1
                  maxItems: 64
                kind:
                  type: string
                  enum:
                    - agent
                    - note
                    - folder
                  description: >-
                    An agent and its notes, a note on its own, or a folder of
                    them.
                licence:
                  description: >-
                    Chosen explicitly. Omitted means unlicensed: nothing is
                    licensed on the author's behalf.
                  anyOf:
                    - type: string
                      enum:
                        - mit
                        - cc-by-4.0
                    - type: 'null'
                name:
                  type: string
                  minLength: 1
                  maxLength: 200
                permissions:
                  type: array
                  description: >-
                    Operation ids this version asks to be allowed to call, by
                    name (`listTasks`). Enforced by the server at every
                    execution boundary, never by the package. An id this API
                    does not have is a 400.
                  default: []
                  items:
                    type: string
                  maxItems: 32
                slug:
                  type: string
                  minLength: 1
                  maxLength: 80
                summary:
                  type: string
                  default: ''
                  maxLength: 10000
              required:
                - files
                - kind
                - name
                - slug
              additionalProperties: false
      responses:
        '201':
          description: Created.
          content:
            application/json:
              schema:
                type: object
                properties:
                  package:
                    type: object
                    properties:
                      id:
                        type: string
                      kind:
                        type: string
                        enum:
                          - agent
                          - note
                          - folder
                        description: >-
                          An agent and its notes, a note on its own, or a folder
                          of them.
                      slug:
                        type: string
                      name:
                        type: string
                      emoji:
                        anyOf:
                          - type: string
                          - type: 'null'
                      summary:
                        type: string
                      latestVersion:
                        type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                      fileCount:
                        type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                        description: Files in the version currently published.
                      published:
                        type: boolean
                        description: >-
                          `false` once taken down. Existing installs are
                          unaffected.
                      createdAt:
                        type: number
                        description: Epoch milliseconds.
                      updatedAt:
                        type: number
                        description: Epoch milliseconds.
                    required:
                      - id
                      - kind
                      - slug
                      - name
                      - emoji
                      - summary
                      - latestVersion
                      - fileCount
                      - published
                      - createdAt
                      - updatedAt
                    additionalProperties: false
                  url:
                    anyOf:
                      - type: string
                      - type: 'null'
                    description: >-
                      The public address, on the FIRST publish only. `null`
                      afterwards.
                required:
                  - package
                  - url
                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.

````