Shortcut Software Documents API

The Documents API from Shortcut Software — 4 operation(s) for documents.

OpenAPI Specification

shortcut-software-documents-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  title: Shortcut Categories Documents API
  version: '3.0'
  description: Shortcut API
servers:
- url: https://api.app.shortcut.com
security:
- api_token: []
tags:
- name: Documents
paths:
  /api/v3/documents:
    get:
      responses:
        '200':
          description: Resource
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/DocSlim'
        '400':
          description: Schema mismatch
        '403':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DisabledFeatureError'
        '404':
          description: Resource does not exist
        '422':
          description: Unprocessable
      operationId: listDocs
      description: List Docs returns a list of Doc that the current user can read.
      summary: List Docs
      tags:
      - Documents
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateDoc'
        required: true
      responses:
        '201':
          description: Resource
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocSlim'
        '400':
          description: Schema mismatch
        '403':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DisabledFeatureError'
        '404':
          description: Resource does not exist
        '422':
          description: Unprocessable
      operationId: createDoc
      description: Creates a new Doc. Supports markdown or HTML input via content_format parameter.
      summary: Create Doc
      tags:
      - Documents
  /api/v3/documents/{doc-public-id}:
    get:
      parameters:
      - in: path
        name: doc-public-id
        description: The Doc's public ID
        required: true
        schema:
          type: string
          format: uuid
      - in: query
        name: content_format
        description: Format of the content to return. Defaults to 'markdown'. If 'html', includes HTML content in response.
        required: false
        schema:
          type: string
          enum:
          - markdown
          - html
      responses:
        '200':
          description: Resource
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Doc'
        '400':
          description: Schema mismatch
        '403':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DisabledFeatureError'
        '404':
          description: Resource does not exist
        '422':
          description: Unprocessable
      operationId: getDoc
      description: Get a Doc by its public ID with content. Use content_format=html query parameter to include HTML content.
      summary: Get Doc
      tags:
      - Documents
    put:
      parameters:
      - in: path
        name: doc-public-id
        description: The Doc's public ID
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateDoc'
        required: true
      responses:
        '200':
          description: Resource
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Doc'
        '400':
          description: Schema mismatch
        '403':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DisabledFeatureError'
        '404':
          description: Resource does not exist
        '422':
          description: Unprocessable
      operationId: updateDoc
      description: 'Updates an existing Doc''s title and/or content. Supports markdown or HTML input via content_format parameter. When a document is updated: (1) For Tiptap-migrated docs, SSE events notify connected Tiptap clients to refresh. (2) For non-migrated docs, CKEditor cache is flushed and SSE events notify connected CKEditor users.'
      summary: Update Doc
      tags:
      - Documents
    delete:
      parameters:
      - in: path
        name: doc-public-id
        description: The Doc's public ID
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GetDoc'
        required: true
      responses:
        '204':
          description: No Content
        '400':
          description: Schema mismatch
        '403':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DisabledFeatureError'
        '404':
          description: Resource does not exist
        '422':
          description: Unprocessable
      operationId: deleteDoc
      description: Permanently deletes a Doc and its associated data. Requires admin access to the doc. When a document is deleted, connected clients will be notified via SSE events.
      summary: Delete Doc
      tags:
      - Documents
  /api/v3/documents/{doc-public-id}/epics:
    get:
      parameters:
      - in: path
        name: doc-public-id
        description: The public ID of the Document.
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: Resource
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/EpicSlim'
        '400':
          description: Schema mismatch
        '403':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DisabledFeatureError'
        '404':
          description: Resource does not exist
        '422':
          description: Unprocessable
      operationId: listDocumentEpics
      description: Get a list of all Epics related to this Document.
      summary: List Document Epics
      tags:
      - Documents
  /api/v3/documents/{doc-public-id}/epics/{epic-public-id}:
    put:
      parameters:
      - in: path
        name: doc-public-id
        description: The public ID of the Document.
        required: true
        schema:
          type: string
          format: uuid
      - in: path
        name: epic-public-id
        description: The public ID of the Epic.
        required: true
        schema:
          type: integer
          format: int64
      responses:
        '204':
          description: No Content
        '400':
          description: Schema mismatch
        '403':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DisabledFeatureError'
        '404':
          description: Resource does not exist
        '422':
          description: '**Either:** (1) Unprocessable **or** (2)  '
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnprocessableError'
      operationId: linkDocumentToEpic
      description: Create a relationship between a Document and an Epic.
      summary: Link Document to Epic
      tags:
      - Documents
    delete:
      parameters:
      - in: path
        name: doc-public-id
        description: The public ID of the Document.
        required: true
        schema:
          type: string
          format: uuid
      - in: path
        name: epic-public-id
        description: The public ID of the Epic.
        required: true
        schema:
          type: integer
          format: int64
      responses:
        '204':
          description: No Content
        '400':
          description: Schema mismatch
        '403':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DisabledFeatureError'
        '404':
          description: Resource does not exist
        '422':
          description: Unprocessable
      operationId: unlinkDocumentFromEpic
      description: Remove a relationship between a Document and an Epic.
      summary: Unlink Document from Epic
      tags:
      - Documents
components:
  schemas:
    UpdateDoc:
      x-doc-skip: true
      type: object
      properties:
        title:
          maxLength: 256
          minLength: 1
          description: The new title for the document
          type: string
        content:
          description: The new content for the document.
          type: string
        content_format:
          description: 'Format of content. For input: specifies format of provided content (defaults to ''html''). For output: controls response format - ''markdown'' (default) or ''html'' to include HTML content.'
          type: string
          enum:
          - markdown
          - html
      additionalProperties: false
    EpicStats:
      description: A group of calculated values for this Epic.
      type: object
      properties:
        num_points_done:
          description: The total number of completed points in this Epic.
          type: integer
          format: int64
        num_related_documents:
          description: The total number of documents associated with this Epic.
          type: integer
          format: int64
        num_stories_unstarted:
          description: The total number of unstarted Stories in this Epic.
          type: integer
          format: int64
        num_stories_total:
          description: The total number of Stories in this Epic.
          type: integer
          format: int64
        last_story_update:
          description: The date of the last update of a Story in this Epic.
          type: string
          format: date-time
          nullable: true
        num_points_started:
          description: The total number of started points in this Epic.
          type: integer
          format: int64
        num_points_unstarted:
          description: The total number of unstarted points in this Epic.
          type: integer
          format: int64
        num_stories_started:
          description: The total number of started Stories in this Epic.
          type: integer
          format: int64
        num_stories_unestimated:
          description: The total number of Stories with no point estimate.
          type: integer
          format: int64
        num_stories_backlog:
          description: The total number of backlog Stories in this Epic.
          type: integer
          format: int64
        num_points_backlog:
          description: The total number of backlog points in this Epic.
          type: integer
          format: int64
        num_points:
          description: The total number of points in this Epic.
          type: integer
          format: int64
        num_stories_done:
          description: The total number of done Stories in this Epic.
          type: integer
          format: int64
      additionalProperties: false
      required:
      - num_points_done
      - num_related_documents
      - num_stories_unstarted
      - num_stories_total
      - last_story_update
      - num_points_started
      - num_points_unstarted
      - num_stories_started
      - num_stories_unestimated
      - num_stories_backlog
      - num_points_backlog
      - num_points
      - num_stories_done
    CreateDoc:
      x-doc-skip: true
      type: object
      properties:
        title:
          maxLength: 256
          minLength: 1
          description: The title for the new document.
          type: string
        content:
          description: The content for the new document.
          type: string
        content_format:
          description: Format of the content being sent. Defaults to 'html'. If 'markdown', content will be converted to HTML for storage. Storage is always HTML; this parameter just tells us what format you're sending.
          type: string
          enum:
          - markdown
          - html
      additionalProperties: false
      required:
      - title
      - content
    EpicSlim:
      description: EpicSlim represents the same resource as an Epic but is more light-weight, including all Epic fields except the comments array. The description string can be optionally included. Use the [Get Epic](#Get-Epic) endpoint to fetch the unabridged payload for an Epic.
      type: object
      properties:
        app_url:
          description: The Shortcut application url for the Epic.
          type: string
        description:
          description: The Epic's description.
          type: string
        archived:
          description: True/false boolean that indicates whether the Epic is archived or not.
          type: boolean
        started:
          description: A true/false boolean indicating if the Epic has been started.
          type: boolean
        entity_type:
          description: A string description of this resource.
          type: string
        labels:
          description: An array of Labels attached to the Epic.
          type: array
          items:
            $ref: '#/components/schemas/LabelSlim'
        mention_ids:
          description: '`Deprecated:` use `member_mention_ids`.'
          type: array
          items:
            type: string
            format: uuid
        member_mention_ids:
          description: An array of Member IDs that have been mentioned in the Epic description.
          type: array
          items:
            type: string
            format: uuid
        associated_groups:
          description: An array containing Group IDs and Group-owned story counts for the Epic's associated groups.
          type: array
          items:
            $ref: '#/components/schemas/EpicAssociatedGroup'
        project_ids:
          description: The IDs of Projects related to this Epic.
          type: array
          items:
            type: integer
            format: int64
        stories_without_projects:
          description: The number of stories in this epic which are not associated with a project.
          type: integer
          format: int64
        completed_at_override:
          description: A manual override for the time/date the Epic was completed.
          type: string
          format: date-time
          nullable: true
        productboard_plugin_id:
          description: The ID of the associated productboard integration.
          type: string
          format: uuid
          nullable: true
        started_at:
          description: The time/date the Epic was started.
          type: string
          format: date-time
          nullable: true
        completed_at:
          description: The time/date the Epic was completed.
          type: string
          format: date-time
          nullable: true
        objective_ids:
          description: An array of IDs for Objectives to which this epic is related.
          type: array
          items:
            type: integer
            format: int64
        name:
          description: The name of the Epic.
          type: string
        global_id:
          x-doc-skip: true
          type: string
        completed:
          description: A true/false boolean indicating if the Epic has been completed.
          type: boolean
        productboard_url:
          description: The URL of the associated productboard feature.
          type: string
          nullable: true
        planned_start_date:
          description: The Epic's planned start date.
          type: string
          format: date-time
          nullable: true
        state:
          description: '`Deprecated` The workflow state that the Epic is in.'
          type: string
        milestone_id:
          description: '`Deprecated` The ID of the Objective this Epic is related to. Use `objective_ids`.'
          type: integer
          format: int64
          nullable: true
        requested_by_id:
          description: The ID of the Member that requested the epic.
          type: string
          format: uuid
        epic_state_id:
          description: The ID of the Epic State.
          type: integer
          format: int64
        label_ids:
          description: An array of Label ids attached to the Epic.
          type: array
          items:
            type: integer
            format: int64
        started_at_override:
          description: A manual override for the time/date the Epic was started.
          type: string
          format: date-time
          nullable: true
        group_id:
          description: '`Deprecated` The ID of the group to associate with the epic. Use `group_ids`.'
          type: string
          format: uuid
          nullable: true
        updated_at:
          description: The time/date the Epic was updated.
          type: string
          format: date-time
          nullable: true
        group_mention_ids:
          description: An array of Group IDs that have been mentioned in the Epic description.
          type: array
          items:
            type: string
            format: uuid
        productboard_id:
          description: The ID of the associated productboard feature.
          type: string
          format: uuid
          nullable: true
        follower_ids:
          description: An array of UUIDs for any Members you want to add as Followers on this Epic.
          type: array
          items:
            type: string
            format: uuid
        group_ids:
          description: An array of UUIDS for Groups to which this Epic is related.
          type: array
          items:
            type: string
            format: uuid
        owner_ids:
          description: An array of UUIDs for any members you want to add as Owners on this new Epic.
          type: array
          items:
            type: string
            format: uuid
        external_id:
          description: This field can be set to another unique ID. In the case that the Epic has been imported from another tool, the ID in the other tool can be indicated here.
          type: string
          nullable: true
        id:
          description: The unique ID of the Epic.
          type: integer
          format: int64
        position:
          description: The Epic's relative position in the Epic workflow state.
          type: integer
          format: int64
        productboard_name:
          description: The name of the associated productboard feature.
          type: string
          nullable: true
        deadline:
          description: The Epic's deadline.
          type: string
          format: date-time
          nullable: true
        stats:
          $ref: '#/components/schemas/EpicStats'
        created_at:
          description: The time/date the Epic was created.
          type: string
          format: date-time
          nullable: true
      additionalProperties: false
      required:
      - app_url
      - archived
      - started
      - entity_type
      - labels
      - mention_ids
      - member_mention_ids
      - associated_groups
      - project_ids
      - stories_without_projects
      - completed_at_override
      - productboard_plugin_id
      - started_at
      - completed_at
      - objective_ids
      - name
      - global_id
      - completed
      - productboard_url
      - planned_start_date
      - state
      - milestone_id
      - requested_by_id
      - epic_state_id
      - label_ids
      - started_at_override
      - group_id
      - updated_at
      - group_mention_ids
      - productboard_id
      - follower_ids
      - group_ids
      - owner_ids
      - external_id
      - id
      - position
      - productboard_name
      - deadline
      - stats
      - created_at
    Doc:
      x-doc-skip: true
      type: object
      properties:
        id:
          description: The public id of the Doc
          type: string
          format: uuid
        title:
          description: The Doc's title
          type: string
          nullable: true
        content_markdown:
          description: The Doc's content in Markdown format (converted from HTML storage).
          type: string
          nullable: true
        content_html:
          description: The Doc's content in HTML format (as stored in S3). Only included when include_html=true query parameter is provided.
          type: string
          nullable: true
        app_url:
          description: The Shortcut application url for the Doc
          type: string
        created_at:
          description: The time/date the Doc was created
          type: string
          format: date-time
        updated_at:
          description: The time/date the Doc was last updated
          type: string
          format: date-time
        archived:
          description: Whether the Doc is archived
          type: boolean
      additionalProperties: false
      required:
      - id
      - title
      - content_markdown
      - app_url
      - created_at
      - updated_at
      - archived
    LabelSlim:
      description: A Label can be used to associate and filter Stories and Epics, and also create new Workspaces. A slim Label does not include aggregate stats. Fetch the Label using the labels endpoint to retrieve them.
      type: object
      properties:
        app_url:
          description: The Shortcut application url for the Label.
          type: string
        description:
          description: The description of the Label.
          type: string
          nullable: true
        archived:
          description: A true/false boolean indicating if the Label has been archived.
          type: boolean
        entity_type:
          description: A string description of this resource.
          type: string
        color:
          description: The hex color to be displayed with the Label (for example, "#ff0000").
          pattern: ^#[a-fA-F0-9]{6}$
          format: css-color
          minLength: 1
          type: string
          nullable: true
        name:
          description: The name of the Label.
          type: string
        global_id:
          x-doc-skip: true
          type: string
        updated_at:
          description: The time/date that the Label was updated.
          type: string
          format: date-time
          nullable: true
        external_id:
          description: This field can be set to another unique ID. In the case that the Label has been imported from another tool, the ID in the other tool can be indicated here.
          type: string
          nullable: true
        id:
          description: The unique ID of the Label.
          type: integer
          format: int64
        created_at:
          description: The time/date that the Label was created.
          type: string
          format: date-time
          nullable: true
      additionalProperties: false
      required:
      - app_url
      - description
      - archived
      - entity_type
      - color
      - name
      - global_id
      - updated_at
      - external_id
      - id
      - created_at
    UnprocessableError:
      type: object
      properties:
        message:
          type: string
      additionalProperties: false
      required:
      - message
    DocSlim:
      x-doc-skip: true
      type: object
      properties:
        id:
          description: The public id of the Doc
          type: string
          format: uuid
        title:
          description: The Docs Title
          type: string
          nullable: true
        app_url:
          description: The Shortcut application url for the Doc.
          type: string
      additionalProperties: false
      required:
      - id
      - title
      - app_url
    GetDoc:
      x-doc-skip: true
      type: object
      properties:
        content_format:
          description: Format of the content to return. Defaults to 'markdown'. If 'html', includes HTML content in response.
          type: string
          enum:
          - markdown
          - html
      additionalProperties: false
    EpicAssociatedGroup:
      type: object
      properties:
        group_id:
          description: The Group ID of the associated group.
          type: string
          format: uuid
        associated_stories_count:
          description: The number of stories this Group owns in the Epic.
          type: integer
          format: int64
      additionalProperties: false
      required:
      - group_id
    DisabledFeatureError:
      type: object
      properties:
        feature_tag:
          description: The feature that is disabled
          type: string
        message:
          description: The message explaining the error
          type: string
      additionalProperties: false
      required:
      - feature_tag
      - message
  securitySchemes:
    api_token:
      type: apiKey
      in: header
      name: Shortcut-Token