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

# Install a package from its address

> Returns the files for the client to write. Installing something you already have is not an error: it returns what you are on rather than moving you, so re-opening a link never changes what is on your disk behind your back.



## OpenAPI

````yaml https://api.doers.sh/openapi.json post /v2/installs
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/installs:
    post:
      tags:
        - Installs
      summary: Install a package from its address
      description: >-
        Returns the files for the client to write. Installing something you
        already have is not an error: it returns what you are on rather than
        moving you, so re-opening a link never changes what is on your disk
        behind your back.
      operationId: installPackage
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                acceptedDigest:
                  description: >-
                    The content digest of the preview whose permissions were
                    accepted — **required**, because an install with nothing to
                    compare against is an install nobody consented to. Send
                    `null` only when the preview showed none, which is what a
                    version frozen before digests existed reports. Anything
                    other than an exact match with the version on offer is
                    refused with 409 rather than quietly installing something
                    else.
                  anyOf:
                    - type: string
                      minLength: 64
                      maxLength: 64
                    - type: 'null'
                packageId:
                  type: string
                  description: From a package already granted to you.
                  format: uuid
                  pattern: >-
                    ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                token:
                  type: string
                  description: From a share link.
                  minLength: 1
                  maxLength: 128
              required:
                - acceptedDigest
              additionalProperties: false
      responses:
        '201':
          description: Created.
          content:
            application/json:
              schema:
                type: object
                properties:
                  install:
                    type: object
                    properties:
                      id:
                        type: string
                      packageId:
                        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
                      version:
                        type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                      latestVersion:
                        anyOf:
                          - type: integer
                            minimum: -9007199254740991
                            maximum: 9007199254740991
                          - type: 'null'
                        description: '`null` once the author has taken it down.'
                      updateAvailable:
                        type: boolean
                      publisher:
                        type: object
                        properties:
                          id:
                            type: string
                          kind:
                            type: string
                            enum:
                              - personal
                              - official
                          handle:
                            type: string
                          displayName:
                            type: string
                        required:
                          - id
                          - kind
                          - handle
                          - displayName
                        additionalProperties: false
                      installedAt:
                        type: number
                        description: Epoch milliseconds.
                      revoked:
                        type: boolean
                        description: >-
                          The author took the package down. What is installed
                          still works.
                      files:
                        type: array
                        items:
                          type: object
                          properties:
                            path:
                              type: string
                            content:
                              type: string
                          required:
                            - path
                            - content
                          additionalProperties: false
                    required:
                      - id
                      - packageId
                      - kind
                      - slug
                      - name
                      - emoji
                      - summary
                      - version
                      - latestVersion
                      - updateAvailable
                      - publisher
                      - installedAt
                      - revoked
                      - files
                    additionalProperties: false
                  files:
                    type: array
                    items:
                      type: object
                      properties:
                        path:
                          type: string
                        content:
                          type: string
                      required:
                        - path
                        - content
                      additionalProperties: false
                  alreadyInstalled:
                    type: boolean
                required:
                  - install
                  - files
                  - alreadyInstalled
                additionalProperties: false
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '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.
    NotFound:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
      description: >-
        Resource does not exist **or** belongs to another account — the API
        never distinguishes the two.
    Conflict:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
      description: Conflicts with the resource's current state.
    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.

````