COR

COR Messages API

The Messages API from COR — 2 operation(s) for messages.

OpenAPI Specification

cor-messages-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: COR Attachments Messages API
  description: The COR API lets you integrate with projectcor.com applications using simple HTTP methods, in either XML or JSON formats, making this an ideal API for developing integrations with other softwares, external clients or mobile applications
  version: 1.0.0
servers:
- url: https://api.projectcor.com/v1
  description: Production server
security:
- bearerAuth: []
tags:
- name: Messages
paths:
  /projects/{id}/messages:
    post:
      tags:
      - Messages
      summary: Post project message
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: integer
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/MessageInput'
      responses:
        '200':
          description: Message posted successfully
  /projects/{project_id}/messages:
    get:
      tags:
      - Messages
      summary: Get messages by project
      parameters:
      - name: project_id
        in: path
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: List of messages
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Message'
components:
  schemas:
    MessageInput:
      type: object
      required:
      - message
      properties:
        message:
          type: string
          description: Text Message
        attachments:
          type: array
          items:
            $ref: '#/components/schemas/AttachmentInput'
          description: Optional attachments
    Message:
      type: object
      properties:
        id:
          type: integer
        message:
          type: string
        attachments:
          type: array
          items:
            $ref: '#/components/schemas/Attachment'
    Attachment:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
        url:
          type: string
        type:
          type: string
        created_at:
          type: string
          format: date-time
    AttachmentInput:
      type: object
      properties:
        id:
          type: integer
          description: ID Attachment
        name:
          type: string
          description: Name of file
        url:
          type: string
          description: public-url provided by COR
        type:
          type: string
          description: File type
        source:
          type: string
          description: 'Source of file: attachments S#, Drive, One Drive, Dropbox'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
    basicAuth:
      type: http
      scheme: basic