COR

COR Teams API

The Teams API from COR — 3 operation(s) for teams.

OpenAPI Specification

cor-teams-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: COR Attachments Teams 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: Teams
paths:
  /teams:
    get:
      tags:
      - Teams
      summary: Get Teams
      description: Retrieves a paginated list of teams. By default, responses are paginated with 20 items per page.
      parameters:
      - name: page
        in: query
        schema:
          type:
          - integer
          - boolean
          default: 1
        description: 'Page number (default: 1). Set to `false` to disable pagination.'
      - name: perPage
        in: query
        schema:
          type: integer
          default: 20
        description: 'Number of items per page (default: 20).'
      responses:
        '200':
          description: Paginated list of teams
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedTeamsResponse'
    post:
      tags:
      - Teams
      summary: Create a team
      description: Creates a new team entity.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TeamInput'
      responses:
        '200':
          description: Team created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Team'
  /teams/{team_id}:
    get:
      tags:
      - Teams
      summary: Get team by ID
      parameters:
      - name: team_id
        in: path
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: Team details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Team'
    put:
      tags:
      - Teams
      summary: Update a team
      description: Updates a team entity.
      parameters:
      - name: team_id
        in: path
        required: true
        schema:
          type: integer
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TeamInput'
      responses:
        '200':
          description: Team updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Team'
    delete:
      tags:
      - Teams
      summary: Delete a team
      description: Deletes a team from the system.
      parameters:
      - name: team_id
        in: path
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: Team deleted successfully
          content:
            application/json:
              schema:
                type: boolean
              example: true
  /teams/{team_id}/users:
    post:
      tags:
      - Teams
      summary: Add users to a team
      description: Adds users to a team by providing an array of user IDs.
      parameters:
      - name: team_id
        in: path
        required: true
        schema:
          type: integer
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TeamUsersInput'
            example:
              users_ids:
              - 8546
      responses:
        '200':
          description: Users added to team successfully
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/TeamUserRelation'
              example:
              - team_id: 4246
                user_id: 48429
                created_at: '2026-01-20 19:59:53'
                updated_at: '2026-01-20 19:59:53'
                id: 178149
                __meta__:
                  company_id: 2336
                  user:
                    id: 48429
                    first_name: Gonzalo
                    last_name: Test
                    email: test@projectcor.com
                    company_id: 2336
    delete:
      tags:
      - Teams
      summary: Remove users from a team
      description: Removes users from a team by providing an array of user IDs.
      parameters:
      - name: team_id
        in: path
        required: true
        schema:
          type: integer
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TeamUsersInput'
            example:
              users_ids:
              - 8546
      responses:
        '200':
          description: Users removed from team successfully
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/TeamUserRelation'
              example:
              - id: 178149
                team_id: 4246
                user_id: 48429
                created_at: '2026-01-20 19:59:53'
                updated_at: '2026-01-20 19:59:53'
                deleted_at: '2026-01-20T20:00:23.632Z'
                __meta__:
                  company_id: 2336
                  user:
                    id: 48429
                    first_name: Gonzalo
                    last_name: Test
                    email: test@projectcor.com
                    company_id: 2336
components:
  schemas:
    TeamInput:
      type: object
      required:
      - name
      properties:
        name:
          type: string
          description: Team Name
        description:
          type: string
          description: Team description
        workspace_id:
          type: integer
          description: Workspace ID
    TeamUserRelation:
      type: object
      properties:
        id:
          type: integer
          description: Team-User relation ID
        team_id:
          type: integer
          description: Team ID
        user_id:
          type: integer
          description: User ID
        created_at:
          type: string
          description: Creation timestamp in format YYYY-MM-DD HH:MM:SS
          example: '2026-01-21 14:09:52'
        updated_at:
          type: string
          description: Last update timestamp in format YYYY-MM-DD HH:MM:SS
          example: '2026-01-21 14:09:52'
        deleted_at:
          type: string
          format: date-time
          nullable: true
          description: Deletion timestamp (only present when removing users)
        __meta__:
          type: object
          properties:
            company_id:
              type: integer
              description: Company ID
            user:
              type: object
              properties:
                id:
                  type: integer
                first_name:
                  type: string
                last_name:
                  type: string
                email:
                  type: string
                  format: email
                company_id:
                  type: integer
    PaginatedTeamsResponse:
      type: object
      description: Paginated response for teams list
      properties:
        total:
          type:
          - string
          - integer
          description: Total number of teams
        perPage:
          type: integer
          description: Number of items per page
        page:
          type: integer
          description: Current page number
        lastPage:
          type: integer
          description: Last available page number
        data:
          type: array
          description: Array of teams for the current page
          items:
            $ref: '#/components/schemas/Team'
    Team:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
        description:
          type: string
        workspace_id:
          type: integer
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    TeamUsersInput:
      type: object
      required:
      - users_ids
      properties:
        users_ids:
          type: array
          items:
            type: integer
          description: Array of user IDs to add or remove from the team
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
    basicAuth:
      type: http
      scheme: basic