Govly Workspace Comments API

Post comments to workspaces.

OpenAPI Specification

govly-workspace-comments-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Govly Tools API (Alpha) Awards Workspace Comments API
  version: 1.0.0-alpha
  description: 'ALPHA / UNSTABLE: This API is still in active development. Endpoint behavior, request fields, response fields, error codes, and operation names may change before the Tools API is declared stable.

    REST-callable tool surface for agent and automation workflows. Agents are the primary consumer, but integrations can be built on this API. Responses are JSON for typed clients; MCP tools may render action results into text-oriented formats separately.

    '
servers:
- url: https://app.govly.com
security:
- bearerApiKey: []
- headerApiKey: []
tags:
- name: Workspace Comments
  description: Post comments to workspaces.
paths:
  /api/tools/v1/workspaces/{workspaceId}/comments:
    post:
      tags:
      - Workspace Comments
      operationId: create_workspace_comment
      summary: Post a Markdown comment to a workspace
      parameters:
      - $ref: '#/components/parameters/workspaceId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - body
              properties:
                body:
                  type: string
                  description: Markdown comment body.
      responses:
        '201':
          description: Created workspace comment
          content:
            application/json:
              schema:
                type: object
                required:
                - data
                properties:
                  data:
                    $ref: '#/components/schemas/Comment'
                  meta:
                    type: object
                    properties:
                      workspaceId:
                        type: string
        '401':
          $ref: '#/components/responses/Error'
        '403':
          $ref: '#/components/responses/Error'
        '404':
          $ref: '#/components/responses/Error'
        '422':
          $ref: '#/components/responses/Error'
components:
  parameters:
    workspaceId:
      name: workspaceId
      in: path
      required: true
      schema:
        type: string
  responses:
    Error:
      description: Error response
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
  schemas:
    WorkspaceAttachment:
      type: object
      required:
      - id
      - workspaceId
      - filename
      properties:
        id:
          type: string
        workspaceId:
          type: string
        commentId:
          type: string
          nullable: true
        filename:
          type: string
        contentType:
          type: string
        byteSize:
          type: integer
        createdAt:
          type: string
          format: date-time
        file:
          description: Present only on the workspace attachments endpoint. Workspace show responses surface attachments without download metadata.
          $ref: '#/components/schemas/AttachmentFile'
    ErrorEnvelope:
      type: object
      required:
      - errors
      properties:
        errors:
          type: array
          items:
            type: object
            required:
            - status
            - code
            - title
            - detail
            properties:
              status:
                type: string
              code:
                type: string
              title:
                type: string
              detail:
                type: string
              source:
                type: object
                properties:
                  pointer:
                    type: string
    Comment:
      type: object
      required:
      - id
      - body
      - createdAt
      - attachments
      properties:
        id:
          type: string
        body:
          type: string
          description: Markdown body for the comment.
        attachments:
          type: array
          description: Workspace attachments tied to this comment.
          items:
            $ref: '#/components/schemas/WorkspaceAttachment'
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
    AttachmentFile:
      type: object
      description: Presigned download metadata. Omitted when the attachment is redacted or URLs are excluded.
      required:
      - url
      - expiresAt
      properties:
        url:
          type: string
          format: uri
        expiresAt:
          type: string
          format: date-time
  securitySchemes:
    bearerApiKey:
      type: http
      scheme: bearer
      bearerFormat: API key
    headerApiKey:
      type: apiKey
      in: header
      name: X-API-KEY