Supaglue Comments API

The Comment object is used to represent a comment on a ticket.

OpenAPI Specification

supaglue-comments-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  version: 0.25.7
  title: Unified CRM Accounts Comments API
  contact:
    name: Supaglue
    email: docs@supaglue.com
    url: https://supaglue.com
  description: '#### Introduction


    Welcome to the Unified API (CRM) documentation. You can use this API to write to multiple third-party providers within the CRM category.


    [View common schema for CRM](https://docs.supaglue.com/platform/common-schemas/crm)


    #### Base API URL

    ```

    https://api.supaglue.io/crm/v2

    ```

    '
servers:
- url: https://api.supaglue.io/crm/v2
  description: Supaglue API
tags:
- name: Comments
  description: 'The Comment object is used to represent a comment on a ticket.

    '
paths:
  /comments:
    parameters:
    - $ref: '#/components/parameters/x-customer-id'
    - $ref: '#/components/parameters/x-provider-name'
    get:
      operationId: listComments
      summary: List comments
      description: ':::note

        This feature is only available in Preview to select customers on our Enterprise plan. [Contact us](mailto:team@supaglue.com) for more information.

        :::


        Returns a list of Comment objects.

        '
      tags:
      - Comments
      security:
      - x-api-key: []
      parameters:
      - $ref: '#/components/parameters/modified_after'
      - $ref: '#/components/parameters/page_size'
      - $ref: '#/components/parameters/cursor'
      responses:
        '200':
          description: CommentsData
          content:
            application/json:
              schema:
                type: object
                properties:
                  pagination:
                    $ref: '#/components/schemas/pagination'
                  records:
                    type: array
                    items:
                      $ref: '#/components/schemas/comment'
                required:
                - pagination
                - records
    post:
      operationId: createComment
      summary: Create comment
      description: Creates a Comment object with the given values.
      tags:
      - Comments
      parameters: []
      security:
      - x-api-key: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                record:
                  type: object
                  properties:
                    user:
                      type: string
                      example: 17a54124-287f-494d-965e-3c5b330c9a68
                    contact:
                      type: string
                      example: dde3fb16-b8eb-483d-81c4-b78100816f15
                    body:
                      type: string
                      nullable: true
                      example: When will these integrations be done? You all should use Supaglue.
                    html_body:
                      type: string
                      nullable: true
                      example: When will these integrations be done? You all should use <b>Supaglue<b>.
                    ticket:
                      type: string
                      nullable: true
                      example: fb8c55b6-1cb8-4b4c-9fb6-17924231619d
                    is_private:
                      type: boolean
                      example: true
                  required:
                  - user
                  - body
                  - ticket
                  - is_private
              required:
              - record
      responses:
        '201':
          description: Comment created
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    $ref: '#/components/schemas/errors'
                  record:
                    $ref: '#/components/schemas/created_record'
                  warnings:
                    $ref: '#/components/schemas/warnings'
  /comments/{comment_id}:
    parameters:
    - $ref: '#/components/parameters/x-customer-id'
    - $ref: '#/components/parameters/x-provider-name'
    - name: comment_id
      in: path
      required: true
      schema:
        type: string
      example: 0258cbc6-6020-430a-848e-aafacbadf4ae
    get:
      operationId: getComment
      summary: Get comment
      description: ':::note

        This feature is only available in Preview to select customers on our Enterprise plan. [Contact us](mailto:team@supaglue.com) for more information.

        :::


        Returns a Comment object with the given id.

        '
      tags:
      - Comments
      security:
      - x-api-key: []
      parameters:
      - $ref: '#/components/parameters/include_raw_data'
      responses:
        '200':
          description: CommentData
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/comment'
components:
  schemas:
    errors:
      type: array
      items:
        type: object
        properties:
          id:
            type: string
            description: A unique identifier for the instance of the error. Provide this to support when contacting Supaglue.
            example: 9366efb4-8fb1-4a28-bfb0-8d6f9cc6b5c5
          detail:
            type: string
            description: A detailed description of the error.
            example: 'Property values were not valid: [{"isValid":false,"message":"Property \"__about_us\" does not exist","error":"PROPERTY_DOESNT_EXIST","name":"__about_us","localizedErrorMessage":"Property \"__about_us\" does not exist"}]'
          problem_type:
            type: string
            description: The Supaglue error code associated with the error.
            example: MISSING_REQUIRED_FIELD
            deprecated: true
          title:
            type: string
            description: A brief description of the error. The schema and type of message will vary by Provider.
            example: 'Property values were not valid

              '
          code:
            type: string
            description: The Supaglue error code associated with the error.
            example: MISSING_REQUIRED_FIELD
          status:
            type: string
            description: The HTTP status code associated with the error.
            example: '400'
          meta:
            type: object
            description: Additional metadata about the error.
            properties:
              cause:
                type: object
                description: The cause of the error. Usually the underlying error from the remote Provider.
                example:
                  code: 400
                  body:
                    status: error
                    message: 'Property values were not valid: [{"isValid":false,"message":"Property \"__about_us\" does not exist","error":"PROPERTY_DOESNT_EXIST","name":"__about_us","localizedErrorMessage":"Property \"__about_us\" does not exist"}]'
                    correlationId: ac94252c-90b5-45d2-ad1d-9a9f7651d7d2
                    category: VALIDATION_ERROR
                  headers:
                    access-control-allow-credentials: 'false'
                    cf-cache-status: DYNAMIC
                    cf-ray: 8053d17b9dae9664-SJC
                    connection: close
                    content-length: '361'
                    content-type: application/json;charset=utf-8
                    date: Mon, 11 Sep 2023 23:51:22 GMT
                    nel: '{"success_fraction":0.01,"report_to":"cf-nel","max_age":604800}'
                    report-to: '{"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v3?s=FgwuXObO%2Fz6ahUJKsxjDLaXTWjooJ8tB0w4%2B%2BKaulGStx0FGkn1PoJoOx2KrFMfihzNdfAqikq7CmgbdlmwKB8hkmp3eTb68qpg10LXFlRgiSqRhbWM7yYSfo8CXmPBc"}],"group":"cf-nel","max_age":604800}'
                    server: cloudflare
                    strict-transport-security: max-age=31536000; includeSubDomains; preload
                    vary: origin, Accept-Encoding
                    x-content-type-options: nosniff
                    x-envoy-upstream-service-time: '91'
                    x-evy-trace-listener: listener_https
                    x-evy-trace-route-configuration: listener_https/all
                    x-evy-trace-route-service-name: envoyset-translator
                    x-evy-trace-served-by-pod: iad02/hubapi-td/envoy-proxy-6c94986c56-9xsh2
                    x-evy-trace-virtual-host: all
                    x-hubspot-correlation-id: ac94252c-90b5-45d2-ad1d-9a9f7651d7d2
                    x-hubspot-ratelimit-interval-milliseconds: '10000'
                    x-hubspot-ratelimit-max: '100'
                    x-hubspot-ratelimit-remaining: '99'
                    x-hubspot-ratelimit-secondly: '10'
                    x-hubspot-ratelimit-secondly-remaining: '9'
                    x-request-id: ac94252c-90b5-45d2-ad1d-9a9f7651d7d2
                    x-trace: 2B1B4386362759B6A4C34802AD168B803DDC1BE770000000000000000000
              origin:
                type: string
                enum:
                - remote-provider
                - supaglue
                description: The origin of the error.
                example: remote-provider
              application_name:
                type: string
                description: The name of the application that generated the error.
                example: MyCompany Production
            required:
            - origin
            additionalProperties: true
        required:
        - id
        - detail
        - problem_type
        - title
        - code
        - status
        - meta
        example:
        - meta:
            cause:
              code: 400
              body:
                status: error
                message: 'Property values were not valid: [{"isValid":false,"message":"Property \"__about_us\" does not exist","error":"PROPERTY_DOESNT_EXIST","name":"__about_us","localizedErrorMessage":"Property \"__about_us\" does not exist"}]'
                correlationId: ac94252c-90b5-45d2-ad1d-9a9f7651d7d2
                category: VALIDATION_ERROR
              headers:
                access-control-allow-credentials: 'false'
                cf-cache-status: DYNAMIC
                cf-ray: 8053d17b9dae9664-SJC
                connection: close
                content-length: '361'
                content-type: application/json;charset=utf-8
                date: Mon, 11 Sep 2023 23:51:22 GMT
                nel: '{"success_fraction":0.01,"report_to":"cf-nel","max_age":604800}'
                report-to: '{"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v3?s=FgwuXObO%2Fz6ahUJKsxjDLaXTWjooJ8tB0w4%2B%2BKaulGStx0FGkn1PoJoOx2KrFMfihzNdfAqikq7CmgbdlmwKB8hkmp3eTb68qpg10LXFlRgiSqRhbWM7yYSfo8CXmPBc"}],"group":"cf-nel","max_age":604800}'
                server: cloudflare
                strict-transport-security: max-age=31536000; includeSubDomains; preload
                vary: origin, Accept-Encoding
                x-content-type-options: nosniff
                x-envoy-upstream-service-time: '91'
                x-evy-trace-listener: listener_https
                x-evy-trace-route-configuration: listener_https/all
                x-evy-trace-route-service-name: envoyset-translator
                x-evy-trace-served-by-pod: iad02/hubapi-td/envoy-proxy-6c94986c56-9xsh2
                x-evy-trace-virtual-host: all
                x-hubspot-correlation-id: ac94252c-90b5-45d2-ad1d-9a9f7651d7d2
                x-hubspot-ratelimit-interval-milliseconds: '10000'
                x-hubspot-ratelimit-max: '100'
                x-hubspot-ratelimit-remaining: '99'
                x-hubspot-ratelimit-secondly: '10'
                x-hubspot-ratelimit-secondly-remaining: '9'
                x-request-id: ac94252c-90b5-45d2-ad1d-9a9f7651d7d2
                x-trace: 2B1B4386362759B6A4C34802AD168B803DDC1BE770000000000000000000
          detail: 'Property values were not valid: [{"isValid":false,"message":"Property \"__about_us\" does not exist","error":"PROPERTY_DOESNT_EXIST","name":"__about_us","localizedErrorMessage":"Property \"__about_us\" does not exist"}]'
          problem_type: MISSING_REQUIRED_FIELD
          title: 'Property values were not valid

            '
          code: MISSING_REQUIRED_FIELD
          status: '400'
          id: 9366efb4-8fb1-4a28-bfb0-8d6f9cc6b5c5
    created_record:
      type: object
      properties:
        id:
          type: string
      required:
      - id
    pagination:
      type: object
      properties:
        next:
          type: string
          nullable: true
          example: eyJpZCI6IjQyNTc5ZjczLTg1MjQtNDU3MC05YjY3LWVjYmQ3MDJjNmIxNCIsInJldmVyc2UiOmZhbHNlfQ==
        previous:
          type: string
          nullable: true
          example: eyJpZCI6IjBjZDhmYmZkLWU5NmQtNDEwZC05ZjQxLWIwMjU1YjdmNGI4NyIsInJldmVyc2UiOnRydWV9
        total_count:
          type: number
          example: 100
      required:
      - next
      - previous
    comment:
      type: object
      properties:
        user:
          type: string
          example: 17a54124-287f-494d-965e-3c5b330c9a68
        contact:
          type: string
          example: dde3fb16-b8eb-483d-81c4-b78100816f15
        body:
          type: string
          nullable: true
          example: When will these integrations be done? You all should use Supaglue.
        html_body:
          type: string
          nullable: true
          example: When will these integrations be done? You all should use <b>Supaglue<b>.
        ticket:
          type: string
          nullable: true
          example: fb8c55b6-1cb8-4b4c-9fb6-17924231619d
        is_private:
          type: boolean
          example: true
      required:
      - user
      - body
      - ticket
      - is_private
    warnings:
      type: array
      items:
        type: object
        properties:
          detail:
            type: string
          problem_type:
            type: string
          title:
            type: string
  parameters:
    page_size:
      name: page_size
      in: query
      schema:
        type: string
      example: 123
      description: 'Number of results to return per page. (Max: 1000)'
    include_raw_data:
      name: include_raw_data
      in: query
      schema:
        type: boolean
      description: Whether to include raw data fetched from the 3rd party provider.
      example: true
    x-provider-name:
      name: x-provider-name
      in: header
      schema:
        type: string
      example: salesforce
      description: The provider name
      required: true
    modified_after:
      name: modified_after
      in: query
      schema:
        type: string
        format: date-time
      description: If provided, will only return objects modified after this datetime. Datetime must be in ISO 8601 format and URI encoded.
      example: '2023-02-23T00:00:00Z'
    x-customer-id:
      name: x-customer-id
      in: header
      schema:
        type: string
      example: my-customer-1
      description: The customer ID that uniquely identifies the customer in your application
      required: true
    cursor:
      name: cursor
      in: query
      schema:
        type: string
      example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw
      description: The pagination cursor value
  securitySchemes:
    x-api-key:
      type: apiKey
      name: x-api-key
      in: header
      description: API key to allow developers to access the API