openapi: 3.0.0
info:
  version: 0.0.1
  title: Nozbe API
  description: Nozbe API specification
  contact:
    name: Nozbe Support
    url: 'https://nozbe.help/'
    email: support@nozbe.com
externalDocs:
  description: 'More info - authorization, easy integration with OpenAPI Generator'
  url: 'https://files.nozbe.com/nt_api.pdf'
servers:
  - url: 'https://api4.nozbe.com/v1/api'
  - url: /v1/api
security:
  - ApiKeyAuth: []
tags:
  - name: teams
  - name: projects
  - name: tasks
  - name: comments
  - name: attachments
  - name: reminders
  - name: project_accesses
  - name: project_sections
  - name: tags
  - name: tag_assignments
  - name: team_members
  - name: users
  - name: task_events
  - name: task_recurrences
  - name: businesses
  - name: business_members
paths:
  /teams:
    get:
      summary: 'Get accessible teams. Filter results by adding params, e.g. ?name=MyTeam'
      operationId: getTeams
      tags:
        - teams
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/sortBy'
        - $ref: '#/components/parameters/fields'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Team'
        '400':
          $ref: '#/components/responses/BadRequestError'
        default:
          $ref: '#/components/responses/UnknownError'
  '/teams/{id}':
    get:
      summary: Get team by ID
      operationId: getTeamById
      tags:
        - teams
      parameters:
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/fields'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Team'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        default:
          $ref: '#/components/responses/UnknownError'
    put:
      summary: Update a team
      operationId: putTeamById
      tags:
        - teams
      parameters:
        - $ref: '#/components/parameters/id'
      requestBody:
        $ref: '#/components/requestBodies/jsonBody'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Team'
        '400':
          $ref: '#/components/responses/BadRequestError'
        default:
          $ref: '#/components/responses/UnknownError'
  /projects:
    get:
      summary: 'Get accessible projects. Filter results by adding params, e.g. ?team_id=abc&is_open=True'
      operationId: getProjects
      tags:
        - projects
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/sortBy'
        - $ref: '#/components/parameters/fields'
        - $ref: '#/components/parameters/team_id'
        - $ref: '#/components/parameters/is_single_actions'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Project'
        '400':
          $ref: '#/components/responses/BadRequestError'
        default:
          $ref: '#/components/responses/UnknownError'
    post:
      summary: Add a project
      operationId: postProject
      tags:
        - projects
      requestBody:
        $ref: '#/components/requestBodies/projectBody'
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Project'
        '400':
          $ref: '#/components/responses/BadRequestError'
        default:
          $ref: '#/components/responses/UnknownError'
  '/projects/{id}':
    get:
      summary: Get project by ID
      operationId: getProjectById
      tags:
        - projects
      parameters:
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/fields'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Project'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        default:
          $ref: '#/components/responses/UnknownError'
    put:
      summary: Update a project
      operationId: putProjectById
      tags:
        - projects
      parameters:
        - $ref: '#/components/parameters/id'
      requestBody:
        $ref: '#/components/requestBodies/jsonBody'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Project'
        '400':
          $ref: '#/components/responses/BadRequestError'
        default:
          $ref: '#/components/responses/UnknownError'
    delete:
      summary: Delete a project
      operationId: deleteProjectById
      tags:
        - projects
      parameters:
        - $ref: '#/components/parameters/id'
      responses:
        '200':
          description: OK
        '400':
          $ref: '#/components/responses/BadRequestError'
        default:
          $ref: '#/components/responses/UnknownError'
  /poll/tasks/new:
    get:
      summary: Get new tasks since last call
      operationId: pollTasksNew
      tags:
        - other
      parameters:
        - $ref: '#/components/parameters/fields'
        - $ref: '#/components/parameters/project_id'
        - $ref: '#/components/parameters/responsible_id'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Task'
        '400':
          $ref: '#/components/responses/BadRequestError'
        default:
          $ref: '#/components/responses/UnknownError'
  /poll/tasks/updated:
    get:
      summary: Get updated tasks since last call
      operationId: pollTasksUpdated
      tags:
        - other
      parameters:
        - $ref: '#/components/parameters/fields'
        - $ref: '#/components/parameters/project_id'
        - $ref: '#/components/parameters/responsible_id'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Task'
        '400':
          $ref: '#/components/responses/BadRequestError'
        default:
          $ref: '#/components/responses/UnknownError'
  '/projects/from_template/{id}':
    post:
      summary: Add a project from template
      operationId: postProjectFromTemplate
      tags:
        - projects
      parameters:
        - $ref: '#/components/parameters/id'
      requestBody:
        $ref: '#/components/requestBodies/jsonBodyOptional'
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Project'
        '400':
          $ref: '#/components/responses/BadRequestError'
        default:
          $ref: '#/components/responses/UnknownError'
  /tasks:
    get:
      summary: 'Get accessible tasks. Filter results by adding params, e.g. ?project_id=abc&review_reason=delegated'
      operationId: getTasks
      tags:
        - tasks
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/sortBy'
        - $ref: '#/components/parameters/fields'
        - $ref: '#/components/parameters/project_id'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  allOf:
                    - $ref: '#/components/schemas/Task'
                    - required:
                        - name
                        - author_id
                        - created_at
                        - last_activity_at
        '400':
          $ref: '#/components/responses/BadRequestError'
        default:
          $ref: '#/components/responses/UnknownError'
    post:
      summary: Add a task
      operationId: postTask
      tags:
        - tasks
      requestBody:
        $ref: '#/components/requestBodies/taskPostBody'
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Task'
        '400':
          $ref: '#/components/responses/BadRequestError'
        default:
          $ref: '#/components/responses/UnknownError'
  '/tasks/{id}':
    get:
      summary: Get task by ID
      operationId: getTaskById
      tags:
        - tasks
      parameters:
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/fields'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Task'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        default:
          $ref: '#/components/responses/UnknownError'
    put:
      summary: Update a task
      operationId: putTaskById
      tags:
        - tasks
      parameters:
        - $ref: '#/components/parameters/id'
      requestBody:
        $ref: '#/components/requestBodies/taskBody'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Task'
        '400':
          $ref: '#/components/responses/BadRequestError'
        default:
          $ref: '#/components/responses/UnknownError'
    delete:
      summary: Delete a task
      operationId: deleteTaskById
      tags:
        - tasks
      parameters:
        - $ref: '#/components/parameters/id'
      responses:
        '200':
          description: OK
        '400':
          $ref: '#/components/responses/BadRequestError'
        default:
          $ref: '#/components/responses/UnknownError'
  /task_events:
    get:
      summary: 'Get accessible task events. Filter results by adding params, e.g. ?task_id=abc'
      operationId: getTaskEvents
      tags:
        - task_events
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/sortBy'
        - $ref: '#/components/parameters/fields'
        - $ref: '#/components/parameters/task_id'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/TaskEvent'
        '400':
          $ref: '#/components/responses/BadRequestError'
        default:
          $ref: '#/components/responses/UnknownError'
  '/task_events/{id}':
    get:
      summary: Get task event by ID
      operationId: getTaskEventById
      tags:
        - task_events
      parameters:
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/fields'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskEvent'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        default:
          $ref: '#/components/responses/UnknownError'
  /comments:
    get:
      summary: 'Get accessible comments. Filter results by adding params, e.g. ?task_id=abc&is_pinned=True'
      operationId: getComments
      tags:
        - comments
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/sortBy'
        - $ref: '#/components/parameters/fields'
        - $ref: '#/components/parameters/task_id'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Comment'
        '400':
          $ref: '#/components/responses/BadRequestError'
        default:
          $ref: '#/components/responses/UnknownError'
    post:
      summary: Add a comment
      operationId: postComment
      tags:
        - comments
      requestBody:
        $ref: '#/components/requestBodies/commentBody'
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Comment'
        '400':
          $ref: '#/components/responses/BadRequestError'
        default:
          $ref: '#/components/responses/UnknownError'
  '/comments/{id}':
    get:
      summary: Get comment by ID
      operationId: getCommentById
      tags:
        - comments
      parameters:
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/fields'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Comment'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        default:
          $ref: '#/components/responses/UnknownError'
    put:
      summary: Update a comment
      operationId: putCommentById
      tags:
        - comments
      parameters:
        - $ref: '#/components/parameters/id'
      requestBody:
        $ref: '#/components/requestBodies/jsonBody'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Comment'
        '400':
          $ref: '#/components/responses/BadRequestError'
        default:
          $ref: '#/components/responses/UnknownError'
    delete:
      summary: Delete a comment
      operationId: deleteCommentById
      tags:
        - comments
      parameters:
        - $ref: '#/components/parameters/id'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Comment'
        '400':
          $ref: '#/components/responses/BadRequestError'
        default:
          $ref: '#/components/responses/UnknownError'
  '/comments/{comment_id}/attachments/{file_id}':
    get:
      summary: Get attachment metadata by its ID
      operationId: getattachmentById
      tags:
        - attachments
      parameters:
        - $ref: '#/components/parameters/file_id'
        - $ref: '#/components/parameters/comment_id'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Attachment'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        default:
          $ref: '#/components/responses/UnknownError'
    delete:
      summary: Delete an attachment
      operationId: deleteattachmentById
      tags:
        - attachments
      parameters:
        - $ref: '#/components/parameters/comment_id'
        - $ref: '#/components/parameters/file_id'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Attachment'
        '400':
          $ref: '#/components/responses/BadRequestError'
        default:
          $ref: '#/components/responses/UnknownError'
  '/comments/{comment_id}/attachments/{file_id}/content':
    get:
      summary: Get file content by attachment ID
      operationId: getattachmentByIdContent
      tags:
        - attachments
      parameters:
        - $ref: '#/components/parameters/file_id'
        - $ref: '#/components/parameters/comment_id'
      responses:
        '200':
          description: OK
        '400':
          $ref: '#/components/responses/BadRequestError'
        '403':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
        '501':
          $ref: '#/components/responses/NotImplemented'
        default:
          $ref: '#/components/responses/UnknownError'
    post:
      summary: Upload file content by its attachment ID
      operationId: postattachmentByIdContent
      tags:
        - attachments
      parameters:
        - $ref: '#/components/parameters/file_id'
        - $ref: '#/components/parameters/comment_id'
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                file:
                  type: string
                  format: binary
      responses:
        '200':
          description: OK
        '400':
          $ref: '#/components/responses/BadRequestError'
        '403':
          $ref: '#/components/responses/Unauthorized'
        '501':
          $ref: '#/components/responses/NotImplemented'
        default:
          $ref: '#/components/responses/UnknownError'
  '/comments/{comment_id}/attachment_with_content':
    post:
      summary: Upload file content to create attachment
      operationId: postattachmentByIdContent2
      tags:
        - attachments
      parameters:
        - $ref: '#/components/parameters/comment_id'
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                file:
                  type: string
                  format: binary
      responses:
        '200':
          description: OK
        '400':
          $ref: '#/components/responses/BadRequestError'
        '403':
          $ref: '#/components/responses/Unauthorized'
        '501':
          $ref: '#/components/responses/NotImplemented'
        default:
          $ref: '#/components/responses/UnknownError'
  '/comments/{comment_id}/attachments':
    get:
      summary: Get attachments related with comment
      operationId: getattachments
      tags:
        - attachments
      parameters:
        - $ref: '#/components/parameters/comment_id'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Attachment'
        '400':
          $ref: '#/components/responses/BadRequestError'
        default:
          $ref: '#/components/responses/UnknownError'
    post:
      summary: Add an attachment metadata
      operationId: postattachment
      parameters:
        - $ref: '#/components/parameters/comment_id'
      tags:
        - attachments
      requestBody:
        $ref: '#/components/requestBodies/attachmentBody'
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Attachment'
        '400':
          $ref: '#/components/responses/BadRequestError'
        default:
          $ref: '#/components/responses/UnknownError'
  /reminders:
    get:
      summary: 'Get accessible reminders. Filter results by adding params, e.g. ?task_id=abc&is_all_day=True'
      operationId: getReminders
      tags:
        - reminders
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/sortBy'
        - $ref: '#/components/parameters/fields'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Reminder'
        '400':
          $ref: '#/components/responses/BadRequestError'
        default:
          $ref: '#/components/responses/UnknownError'
    post:
      summary: Add a reminder
      operationId: postReminder
      tags:
        - reminders
      requestBody:
        $ref: '#/components/requestBodies/reminderBody'
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Reminder'
        '400':
          $ref: '#/components/responses/BadRequestError'
        default:
          $ref: '#/components/responses/UnknownError'
  '/reminders/{id}':
    get:
      summary: Get reminder by ID
      operationId: getReminderById
      tags:
        - reminders
      parameters:
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/fields'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Reminder'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        default:
          $ref: '#/components/responses/UnknownError'
    delete:
      summary: Delete a reminder
      operationId: deleteReminderById
      tags:
        - reminders
      parameters:
        - $ref: '#/components/parameters/id'
      responses:
        '200':
          description: OK
        '400':
          $ref: '#/components/responses/BadRequestError'
        default:
          $ref: '#/components/responses/UnknownError'
  /task_recurrences:
    get:
      summary: 'Get accessible task recurrences. Filter results by adding params, e.g. ?project_id=abc'
      operationId: getTaskRecurrences
      tags:
        - task_recurrences
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/sortBy'
        - $ref: '#/components/parameters/fields'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/TaskRecurrence'
        '400':
          $ref: '#/components/responses/BadRequestError'
        default:
          $ref: '#/components/responses/UnknownError'
    post:
      summary: Add a task recurrence
      operationId: postTaskRecurrence
      tags:
        - task_recurrences
      requestBody:
        $ref: '#/components/requestBodies/taskRecurrenceBody'
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskRecurrence'
        '400':
          $ref: '#/components/responses/BadRequestError'
        default:
          $ref: '#/components/responses/UnknownError'
  '/task_recurrences/{id}':
    get:
      summary: Get task recurrence by ID
      operationId: getTaskRecurrenceById
      tags:
        - task_recurrences
      parameters:
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/fields'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskRecurrence'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        default:
          $ref: '#/components/responses/UnknownError'
    put:
      summary: Update task recurrence
      operationId: putTaskRecurrenceById
      tags:
        - tasks
      parameters:
        - $ref: '#/components/parameters/id'
      requestBody:
        $ref: '#/components/requestBodies/taskRecurrenceBody'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskRecurrence'
        '400':
          $ref: '#/components/responses/BadRequestError'
        default:
          $ref: '#/components/responses/UnknownError'
    delete:
      summary: Delete a task recurrence
      operationId: deleteTaskRecurrenceById
      tags:
        - task_recurrences
      parameters:
        - $ref: '#/components/parameters/id'
      responses:
        '200':
          description: OK
        '400':
          $ref: '#/components/responses/BadRequestError'
        default:
          $ref: '#/components/responses/UnknownError'
  /project_accesses:
    get:
      summary: 'Get accessible projects accesses. Filter results by adding params, e.g. ?project_id=abc&is_manager=True'
      operationId: getProjectAccesses
      tags:
        - project_accesses
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/sortBy'
        - $ref: '#/components/parameters/fields'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ProjectAccess'
        '400':
          $ref: '#/components/responses/BadRequestError'
        default:
          $ref: '#/components/responses/UnknownError'
    post:
      summary: Add a project access
      operationId: postProjectAccess
      tags:
        - project_accesses
      requestBody:
        $ref: '#/components/requestBodies/projectAccessBody'
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProjectAccess'
        '400':
          $ref: '#/components/responses/BadRequestError'
        default:
          $ref: '#/components/responses/UnknownError'
  '/project_accesses/{id}':
    get:
      summary: Get project access by ID
      operationId: getProjectAccessById
      tags:
        - project_accesses
      parameters:
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/fields'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProjectAccess'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        default:
          $ref: '#/components/responses/UnknownError'
    put:
      summary: Update a project access
      operationId: putProjectAccessById
      tags:
        - project_accesses
      parameters:
        - $ref: '#/components/parameters/id'
      requestBody:
        $ref: '#/components/requestBodies/jsonBody'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProjectAccess'
        '400':
          $ref: '#/components/responses/BadRequestError'
        default:
          $ref: '#/components/responses/UnknownError'
    delete:
      summary: Delete a project access
      operationId: deleteProjectAccessById
      tags:
        - project_accesses
      parameters:
        - $ref: '#/components/parameters/id'
      responses:
        '200':
          description: OK
        '400':
          $ref: '#/components/responses/BadRequestError'
        default:
          $ref: '#/components/responses/UnknownError'
  /project_sections:
    get:
      summary: 'Get accessible projects sections. Filter results by adding params, e.g. ?project_id=abc'
      operationId: getProjectSections
      tags:
        - project_sections
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/sortBy'
        - $ref: '#/components/parameters/fields'
        - $ref: '#/components/parameters/project_id'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ProjectSection'
        '400':
          $ref: '#/components/responses/BadRequestError'
        default:
          $ref: '#/components/responses/UnknownError'
    post:
      summary: Add a project section
      operationId: postProjectSection
      tags:
        - project_sections
      requestBody:
        $ref: '#/components/requestBodies/projectSectionBody'
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProjectSection'
        '400':
          $ref: '#/components/responses/BadRequestError'
        default:
          $ref: '#/components/responses/UnknownError'
  '/project_sections/{id}':
    get:
      summary: Get project section by ID
      operationId: getProjectSectionById
      tags:
        - project_sections
      parameters:
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/fields'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProjectSection'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        default:
          $ref: '#/components/responses/UnknownError'
    put:
      summary: Update a project section
      operationId: putProjectSectionById
      tags:
        - project_sections
      parameters:
        - $ref: '#/components/parameters/id'
      requestBody:
        $ref: '#/components/requestBodies/jsonBody'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProjectSection'
        '400':
          $ref: '#/components/responses/BadRequestError'
        default:
          $ref: '#/components/responses/UnknownError'
    delete:
      summary: Delete a project section
      operationId: deleteProjectSectionById
      tags:
        - project_sections
      parameters:
        - $ref: '#/components/parameters/id'
      responses:
        '200':
          description: OK
        '400':
          $ref: '#/components/responses/BadRequestError'
        default:
          $ref: '#/components/responses/UnknownError'
  /tags:
    get:
      summary: 'Get accessible tags. Filter results by adding params, e.g. ?is_favorite=true'
      operationId: getTags
      tags:
        - tags
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/sortBy'
        - $ref: '#/components/parameters/fields'
        - $ref: '#/components/parameters/name'
        - $ref: '#/components/parameters/task_id'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Tag'
        '400':
          $ref: '#/components/responses/BadRequestError'
        default:
          $ref: '#/components/responses/UnknownError'
    post:
      summary: Add a tag
      operationId: postTag
      tags:
        - tags
      requestBody:
        $ref: '#/components/requestBodies/tagBody'
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Tag'
        '400':
          $ref: '#/components/responses/BadRequestError'
        default:
          $ref: '#/components/responses/UnknownError'
  '/tags/{id}':
    get:
      summary: Get tag by ID
      operationId: getTagById
      tags:
        - tags
      parameters:
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/fields'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Tag'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        default:
          $ref: '#/components/responses/UnknownError'
    put:
      summary: Update a tag
      operationId: putTagById
      tags:
        - tags
      parameters:
        - $ref: '#/components/parameters/id'
      requestBody:
        $ref: '#/components/requestBodies/jsonBody'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Tag'
        '400':
          $ref: '#/components/responses/BadRequestError'
        default:
          $ref: '#/components/responses/UnknownError'
  /tag_assignments:
    get:
      summary: 'Get accessible tag assignments. Filter results by adding params, e.g. ?tag_id=abc'
      operationId: getTagAssignments
      tags:
        - tag_assignments
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/sortBy'
        - $ref: '#/components/parameters/fields'
        - $ref: '#/components/parameters/task_id'
        - $ref: '#/components/parameters/tag_id'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/TagAssignment'
        '400':
          $ref: '#/components/responses/BadRequestError'
        default:
          $ref: '#/components/responses/UnknownError'
    post:
      summary: Add a tag assignment
      operationId: postTagAssignment
      tags:
        - tag_assignments
      requestBody:
        $ref: '#/components/requestBodies/tagAssignmentBody'
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TagAssignment'
        '400':
          $ref: '#/components/responses/BadRequestError'
        default:
          $ref: '#/components/responses/UnknownError'
  '/tag_assignments/{id}':
    get:
      summary: Get tag assignment by ID
      operationId: getTagAssignmentById
      tags:
        - tag_assignments
      parameters:
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/fields'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TagAssignment'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        default:
          $ref: '#/components/responses/UnknownError'
    delete:
      summary: Delete a tag assignment
      operationId: deleteTagAssignmentById
      tags:
        - tag_assignments
      parameters:
        - $ref: '#/components/parameters/id'
      responses:
        '200':
          description: OK
        '400':
          $ref: '#/components/responses/BadRequestError'
        default:
          $ref: '#/components/responses/UnknownError'
  /project_groups:
    get:
      summary: 'Get accessible project_groups. Filter results by adding params, e.g. ?is_favorite=true'
      operationId: getProjectGroups
      tags:
        - project_groups
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/sortBy'
        - $ref: '#/components/parameters/fields'
        - $ref: '#/components/parameters/name'
        - $ref: '#/components/parameters/team_id'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ProjectGroup'
        '400':
          $ref: '#/components/responses/BadRequestError'
        default:
          $ref: '#/components/responses/UnknownError'
    post:
      summary: Add a project_group
      operationId: postProjectGroup
      tags:
        - project_groups
      requestBody:
        $ref: '#/components/requestBodies/projectGroupBody'
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProjectGroup'
        '400':
          $ref: '#/components/responses/BadRequestError'
        default:
          $ref: '#/components/responses/UnknownError'
  '/project_groups/{id}':
    get:
      summary: Get project_group by ID
      operationId: getProjectGroupById
      tags:
        - project_groups
      parameters:
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/fields'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProjectGroup'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        default:
          $ref: '#/components/responses/UnknownError'
    put:
      summary: Update a project_group
      operationId: putProjectGroupById
      tags:
        - project_groups
      parameters:
        - $ref: '#/components/parameters/id'
      requestBody:
        $ref: '#/components/requestBodies/jsonBody'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProjectGroup'
        '400':
          $ref: '#/components/responses/BadRequestError'
        default:
          $ref: '#/components/responses/UnknownError'
    delete:
      summary: Delete a project group
      operationId: deleteProjectGroupById
      tags:
        - project_groups
      parameters:
        - $ref: '#/components/parameters/id'
      responses:
        '200':
          description: OK
        '400':
          $ref: '#/components/responses/BadRequestError'
        default:
          $ref: '#/components/responses/UnknownError'
  /group_assignments:
    get:
      summary: 'Get accessible group assignments. Filter results by adding params, e.g. ?group_id=abc'
      operationId: getGroupAssignments
      tags:
        - group_assignments
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/sortBy'
        - $ref: '#/components/parameters/fields'
        - $ref: '#/components/parameters/object_id'
        - $ref: '#/components/parameters/group_id'
        - $ref: '#/components/parameters/group_type'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/GroupAssignment'
        '400':
          $ref: '#/components/responses/BadRequestError'
        default:
          $ref: '#/components/responses/UnknownError'
    post:
      summary: Add a group assignment
      operationId: postGroupAssignment
      tags:
        - group_assignments
      requestBody:
        $ref: '#/components/requestBodies/groupAssignmentBody'
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GroupAssignment'
        '400':
          $ref: '#/components/responses/BadRequestError'
        default:
          $ref: '#/components/responses/UnknownError'
  '/group_assignments/{id}':
    get:
      summary: Get group assignment by ID
      operationId: getGroupAssignmentById
      tags:
        - group_assignments
      parameters:
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/fields'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GroupAssignment'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        default:
          $ref: '#/components/responses/UnknownError'
    delete:
      summary: Delete a group assignment
      operationId: deleteGroupAssignmentById
      tags:
        - group_assignments
      parameters:
        - $ref: '#/components/parameters/id'
      responses:
        '200':
          description: OK
        '400':
          $ref: '#/components/responses/BadRequestError'
        default:
          $ref: '#/components/responses/UnknownError'
  /team_members:
    get:
      summary: 'Get accessible team members. Filter results by adding params, e.g. ?role=admin&status=active'
      operationId: getTeamMembers
      tags:
        - team_members
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/sortBy'
        - $ref: '#/components/parameters/fields'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/TeamMember'
        '400':
          $ref: '#/components/responses/BadRequestError'
        default:
          $ref: '#/components/responses/UnknownError'
    post:
      summary: Add a team member
      operationId: postTeamMember
      tags:
        - team_members
      requestBody:
        $ref: '#/components/requestBodies/teamMemberBody'
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TeamMember'
        '400':
          $ref: '#/components/responses/BadRequestError'
        default:
          $ref: '#/components/responses/UnknownError'
  '/team_members/{id}':
    get:
      summary: Get team member by ID
      operationId: getTeamMemberById
      tags:
        - team_members
      parameters:
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/fields'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TeamMember'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        default:
          $ref: '#/components/responses/UnknownError'
    put:
      summary: Update a team member
      operationId: putTeamMemberById
      tags:
        - team_members
      parameters:
        - $ref: '#/components/parameters/id'
      requestBody:
        $ref: '#/components/requestBodies/jsonBody'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TeamMember'
        '400':
          $ref: '#/components/responses/BadRequestError'
        default:
          $ref: '#/components/responses/UnknownError'
    delete:
      summary: Delete a team member
      operationId: deleteTeamMemberById
      tags:
        - team_members
      parameters:
        - $ref: '#/components/parameters/id'
      responses:
        '200':
          description: OK
        '400':
          $ref: '#/components/responses/BadRequestError'
        default:
          $ref: '#/components/responses/UnknownError'
  /users:
    get:
      summary: 'Get accessible users. Filter results by adding params, e.g. ?name=John'
      operationId: getUsers
      tags:
        - users
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/sortBy'
        - $ref: '#/components/parameters/fields'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/User'
        '400':
          $ref: '#/components/responses/BadRequestError'
        default:
          $ref: '#/components/responses/UnknownError'
    post:
      summary: Add a user
      operationId: postUser
      tags:
        - users
      requestBody:
        $ref: '#/components/requestBodies/userBody'
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/User'
        '400':
          $ref: '#/components/responses/BadRequestError'
        default:
          $ref: '#/components/responses/UnknownError'
  '/users/{id}':
    get:
      summary: Get user by ID
      operationId: getUserById
      tags:
        - users
      parameters:
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/fields'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/User'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        default:
          $ref: '#/components/responses/UnknownError'
    put:
      summary: Update a user
      operationId: putUserById
      tags:
        - users
      parameters:
        - $ref: '#/components/parameters/id'
      requestBody:
        $ref: '#/components/requestBodies/jsonBody'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/User'
        '400':
          $ref: '#/components/responses/BadRequestError'
        default:
          $ref: '#/components/responses/UnknownError'
  /csv:
    post:
      summary: Add records in batch. Currently supports only tasks and projects records - upload CSV file either as "tasks" or "projects" field.
      operationId: postFromCsv
      tags:
        - other
      requestBody:
        $ref: '#/components/requestBodies/csvBody'
      responses:
        '201':
          description: Created many
          content:
            application/json:
              schema:
                anyOf:
                  - type: array
                    items:
                      $ref: '#/components/schemas/Task'
                  - type: array
                    items:
                      $ref: '#/components/schemas/Project'
        '400':
          $ref: '#/components/responses/BadRequestError'
        default:
          $ref: '#/components/responses/UnknownError'
  /businesses:
    get:
      summary: 'Get accessible businesses. Filter results by adding params, e.g. ?name=MyBusiness'
      operationId: getBusinesses
      tags:
        - businesses
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/sortBy'
        - $ref: '#/components/parameters/fields'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Business'
        '400':
          $ref: '#/components/responses/BadRequestError'
        default:
          $ref: '#/components/responses/UnknownError'
  '/businesses/{id}':
    get:
      summary: Get business by ID
      operationId: getBusinessById
      tags:
        - businesses
      parameters:
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/fields'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Business'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        default:
          $ref: '#/components/responses/UnknownError'
  /business_members:
    get:
      summary: 'Get accessible business members. Filter results by adding params, e.g. ?role=admin'
      operationId: getBusinessMembers
      tags:
        - business_members
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/sortBy'
        - $ref: '#/components/parameters/fields'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/BusinessMember'
        '400':
          $ref: '#/components/responses/BadRequestError'
        default:
          $ref: '#/components/responses/UnknownError'
  '/business_members/{id}':
    get:
      summary: Get business member by ID
      operationId: getBusinessMemberById
      tags:
        - business_members
      parameters:
        - $ref: '#/components/parameters/id'
        - $ref: '#/components/parameters/fields'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BusinessMember'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        default:
          $ref: '#/components/responses/UnknownError'
    put:
      summary: Update a business member
      operationId: putBusinessMemberById
      tags:
        - business_members
      parameters:
        - $ref: '#/components/parameters/id'
      requestBody:
        $ref: '#/components/requestBodies/jsonBody'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BusinessMember'
        '400':
          $ref: '#/components/responses/BadRequestError'
        default:
          $ref: '#/components/responses/UnknownError'
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
  parameters:
    id:
      name: id
      in: path
      required: true
      description: Object ID
      schema:
        type: string
        minLength: 16
        maxLength: 16
    limit:
      name: limit
      in: query
      required: false
      description: Max number of objects to return
      schema:
        type: integer
        minimum: 1
        maximum: 10000
        default: 100
    offset:
      name: offset
      in: query
      required: false
      description: Number of objects to skip
      schema:
        type: integer
        minimum: 0
        default: 0
    sortBy:
      name: sortBy
      in: query
      required: false
      description: 'List of params for sorting results, separated with commas. Put ''-'' at the beginning of param for descending order. Example ''created_at,-name,-ended_at'''
      schema:
        type: string
        pattern: '^[-a-z_,]*$'
    fields:
      name: fields
      in: query
      required: false
      description: 'List of fields that should be returned for each object, separated with commas'
      schema:
        type: string
        pattern: '^[a-z_,]*$'
    comment_id:
      name: comment_id
      in: path
      required: true
      description: Comment ID
      schema:
        type: string
        minLength: 16
        maxLength: 16
    file_id:
      name: file_id
      in: path
      required: true
      description: File ID
      schema:
        type: string
        minLength: 16
        maxLength: 16
    group_id:
      name: group_id
      in: query
      required: false
      description: Group ID
      schema:
        type: string
        minLength: 16
        maxLength: 16
    object_id:
      name: object_id
      in: query
      required: false
      description: Object ID
      schema:
        type: string
        minLength: 16
        maxLength: 16
    group_type:
      name: group_type
      in: query
      required: false
      description: Group type
      schema:
        type: string
        enum:
          - project
          - member
    name:
      name: name
      in: query
      required: false
      description: Name
      schema:
        type: string
    team_id:
      name: team_id
      in: query
      required: false
      description: Team ID
      schema:
        type: string
        minLength: 16
        maxLength: 16
    project_id:
      name: project_id
      in: query
      required: false
      description: Project ID
      schema:
        type: string
        minLength: 16
        maxLength: 16
    responsible_id:
      name: responsible_id
      in: query
      required: false
      description: Responsible ID
      schema:
        type: string
        minLength: 16
        maxLength: 16
    tag_id:
      name: tag_id
      in: query
      required: false
      description: Tag ID
      schema:
        type: string
        minLength: 16
        maxLength: 16
    task_id:
      name: task_id
      in: query
      required: false
      description: Task ID
      schema:
        type: string
        minLength: 16
        maxLength: 16
    is_single_actions:
      name: is_single_actions
      in: query
      required: false
      description: Single Tasks indicator
      schema:
        type: boolean
  requestBodies:
    jsonBody:
      required: true
      content:
        application/json:
          schema:
            type: object
    jsonBodyOptional:
      required: false
      content:
        application/json:
          schema:
            type: object
    teamBody:
      required: true
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Team'
    projectBody:
      required: true
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Project'
    taskBody:
      required: true
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Task'
    taskPostBody:
      required: true
      content:
        application/json:
          schema:
            allOf:
              - $ref: '#/components/schemas/Task'
              - required:
                  - name
    commentBody:
      required: true
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Comment'
    reminderBody:
      required: true
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Reminder'
    taskRecurrenceBody:
      required: true
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/TaskRecurrence'
    projectAccessBody:
      required: true
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ProjectAccess'
    projectSectionBody:
      required: true
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ProjectSection'
    tagBody:
      required: true
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Tag'
    projectGroupBody:
      required: true
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ProjectGroup'
    groupAssignmentBody:
      required: true
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GroupAssignment'
    tagAssignmentBody:
      required: true
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/TagAssignment'
    teamMemberBody:
      required: true
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/TeamMember'
    businessBody:
      required: true
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Business'
    businessMemberBody:
      required: true
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/BusinessMember'
    userBody:
      required: true
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/User'
    attachmentBody:
      required: true
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Attachment'
    csvBody:
      required: true
      content:
        multipart/form-data:
          schema:
            type: object
            properties:
              tasks:
                type: string
                format: binary
                description: 'CSV file of tasks definitions as `name,project_id,responsible_id,due_at,is_all_day,is_followed`'
              projects:
                type: string
                format: binary
                description: 'CSV file of projects definitions as `name,team_id,is_favorite,is_open`'
          encoding:
            projects:
              contentType: text/csv
            tasks:
              contentType: text/csv
  schemas:
    User:
      type: object
      required:
        - id
        - name
        - color
        - is_placeholder
      properties:
        id:
          $ref: '#/components/schemas/id16_readOnly'
          readOnly: true
        name:
          $ref: '#/components/schemas/name'
        color:
          type: string
          enum:
            - avatarColor1
            - avatarColor2
            - avatarColor3
            - avatarColor4
            - avatarColor5
            - avatarColor6
            - avatarColor7
            - avatarColor8
            - avatarColor9
            - avatarColor10
            - avatarColor11
            - avatarColor12
        is_placeholder:
          $ref: '#/components/schemas/bool_falsey'
        invitation_email:
          $ref: '#/components/schemas/string_nullable'
          nullable: true
        avatar_url:
          $ref: '#/components/schemas/string_nullable'
          nullable: true
        time_zone:
          $ref: '#/components/schemas/string_nullable'
          nullable: true
    Team:
      type: object
      required:
        - id
        - name
      properties:
        id:
          $ref: '#/components/schemas/id16_readOnly'
          readOnly: true
        name:
          $ref: '#/components/schemas/name'
        is_personal:
          type: boolean
          enum:
            - false
        color:
          type: string
          enum:
            - ''
            - avatarColor1
            - avatarColor2
            - avatarColor3
            - avatarColor4
            - avatarColor5
            - avatarColor6
            - avatarColor7
            - avatarColor8
            - avatarColor9
            - avatarColor10
            - avatarColor11
            - avatarColor12
        avatar_url:
          $ref: '#/components/schemas/string_nullable'
          nullable: true
        limits:
          type: string
          nullable: true
          readOnly: true
        plan_info:
          type: string
          nullable: true
          readOnly: true
        sidebar_position:
          type: number
        ai_credits_used:
          type: number
          readOnly: true
    TeamMember:
      type: object
      required:
        - id
        - team_id
        - user_id
        - role
        - status
      properties:
        id:
          $ref: '#/components/schemas/id16_readOnly'
          readOnly: true
        team_id:
          $ref: '#/components/schemas/id16'
        user_id:
          $ref: '#/components/schemas/id16'
        alias:
          type: string
          maxLength: 255
          nullable: true
        description:
          $ref: '#/components/schemas/string_nullable'
          nullable: true
        role:
          type: string
          enum:
            - owner
            - admin
            - member
        status:
          type: string
          enum:
            - active
            - pending
            - requesting_join
            - archived
            - expired
        is_favorite:
          $ref: '#/components/schemas/bool_falsey'
        sidebar_position:
          $ref: '#/components/schemas/number_nullable'
          nullable: true
        color:
          $ref: '#/components/schemas/color'
          nullable: true
        team_color:
          $ref: '#/components/schemas/color'
          nullable: true
        vacations:
          type: array
          nullable: true
          description: List of vacation ranges for the team member.
          items:
            type: object
            required:
              - vacation_from
              - vacation_to
            properties:
              id:
                $ref: '#/components/schemas/id16'
              vacation_from:
                $ref: '#/components/schemas/timestamp'
                description: Vacation range from
              vacation_to:
                description: Vacation range to
                $ref: '#/components/schemas/timestamp'
              time_zone:
                type: string
                description: The timezone ID.
                example: Europe/Warsaw
        contact_info:
          type: string
          nullable: true
          readOnly: true
    Business:
      type: object
      required:
        - id
        - name
      properties:
        id:
          $ref: '#/components/schemas/id16_readOnly'
          readOnly: true
        name:
          $ref: '#/components/schemas/name'
        color:
          type: string
          enum:
            - ''
            - avatarColor1
            - avatarColor2
            - avatarColor3
            - avatarColor4
            - avatarColor5
            - avatarColor6
            - avatarColor7
            - avatarColor8
            - avatarColor9
            - avatarColor10
            - avatarColor11
            - avatarColor12
            - purple
            - dodgerblue
            - red
            - yellow
            - pink
        avatar_url:
          $ref: '#/components/schemas/string_nullable'
          nullable: true
        plan_info:
          type: string
          nullable: true
          readOnly: true
        ai_credits_used:
          type: number
          readOnly: true
    BusinessMember:
      type: object
      required:
        - id
        - business_id
        - user_id
        - role
      properties:
        id:
          $ref: '#/components/schemas/id16_readOnly'
          readOnly: true
        business_id:
          $ref: '#/components/schemas/id16'
        user_id:
          $ref: '#/components/schemas/id16'
        role:
          type: string
          enum:
            - owner
            - admin
            - member
        vacations:
          type: array
          nullable: true
          description: List of vacation ranges for the business member.
          items:
            $ref: '#/components/schemas/TeamMember/properties/vacations/items'
    Project:
      type: object
      required:
        - name
        - team_id
        - author_id
        - created_at
        - last_event_at
        - is_open
      properties:
        id:
          $ref: '#/components/schemas/id16'
        name:
          $ref: '#/components/schemas/name_allowEmpty'
        team_id:
          $ref: '#/components/schemas/id16'
        author_id:
          $ref: '#/components/schemas/id16_readOnly'
          readOnly: true
        created_at:
          $ref: '#/components/schemas/timestamp_readOnly'
          readOnly: true
        ended_at:
          $ref: '#/components/schemas/timestamp_nullable'
          nullable: true
        last_event_at:
          $ref: '#/components/schemas/timestamp_readOnly'
          readOnly: true
        last_seen_event_at:
          $ref: '#/components/schemas/timestamp_nullable'
          nullable: true
        is_open:
          $ref: '#/components/schemas/bool_falsey'
        is_favorite:
          $ref: '#/components/schemas/bool_falsey'
        is_single_actions:
          $ref: '#/components/schemas/bool_falsey'
        is_template:
          $ref: '#/components/schemas/bool_falsey'
        color:
          $ref: '#/components/schemas/color'
          nullable: true
        team_color:
          $ref: '#/components/schemas/color'
          nullable: true
        description:
          $ref: '#/components/schemas/string_nullable'
          nullable: true
        extra:
          $ref: '#/components/schemas/string_nullable'
          nullable: true
        preferences:
          $ref: '#/components/schemas/string_nullable'
          nullable: true
        sidebar_position:
          $ref: '#/components/schemas/number_nullable'
          nullable: true
        shared_team_id:
          $ref: '#/components/schemas/id16_readOnly_nullable'
          readOnly: true
          nullable: true
    ProjectAccess:
      type: object
      required:
        - id
        - project_id
        - member_id
        - is_manager
      properties:
        id:
          $ref: '#/components/schemas/id16_readOnly'
          readOnly: true
        project_id:
          $ref: '#/components/schemas/id16'
        member_id:
          $ref: '#/components/schemas/id16'
        is_manager:
          $ref: '#/components/schemas/bool_falsey'
    ProjectSection:
      type: object
      required:
        - id
        - project_id
        - name
        - created_at
      properties:
        id:
          $ref: '#/components/schemas/id16_readOnly'
          readOnly: true
        project_id:
          $ref: '#/components/schemas/id16'
        name:
          $ref: '#/components/schemas/name'
        created_at:
          $ref: '#/components/schemas/timestamp_readOnly'
          readOnly: true
        archived_at:
          $ref: '#/components/schemas/timestamp_nullable'
          nullable: true
        position:
          type: number
    Task:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/id16'
        name:
          $ref: '#/components/schemas/name'
        project_id:
          $ref: '#/components/schemas/project_id'
        project_section_id:
          $ref: '#/components/schemas/id16_nullable'
          nullable: true
        author_id:
          $ref: '#/components/schemas/id16_readOnly'
          readOnly: true
        responsible_id:
          nullable: true
          type: string
          minLength: 6
          maxLength: 16
          pattern: '^([a-zA-Z0-9]{16}|author)$'
        recurrence_id:
          $ref: '#/components/schemas/id16_nullable'
          nullable: true
        created_at:
          $ref: '#/components/schemas/timestamp_readOnly'
          readOnly: true
        last_modified:
          $ref: '#/components/schemas/timestamp_readOnly'
          readOnly: true
        due_at:
          type: integer
          nullable: true
        ended_at:
          $ref: '#/components/schemas/timestamp_nullable'
          nullable: true
        last_activity_at:
          $ref: '#/components/schemas/timestamp_readOnly'
          readOnly: true
        last_seen_activity_at:
          $ref: '#/components/schemas/timestamp_nullable'
          nullable: true
        last_reviewed_at:
          $ref: '#/components/schemas/timestamp_nullable'
          nullable: true
        review_triggered_at:
          $ref: '#/components/schemas/timestamp_nullable'
          nullable: true
        review_reason:
          type: string
          enum:
            - null
            - due_date
            - reminder
            - delegated
            - mention
            - newly_added
            - overdue
          nullable: true
        is_followed:
          $ref: '#/components/schemas/bool_falsey'
        is_abandoned:
          $ref: '#/components/schemas/bool_falsey'
        is_all_day:
          $ref: '#/components/schemas/bool_falsey'
        project_position:
          type: number
        priority_position:
          $ref: '#/components/schemas/number_nullable'
          nullable: true
        missed_repeats:
          type: integer
          minimum: 0
        time_needed:
          $ref: '#/components/schemas/timestamp_nullable'
          nullable: true
        time_spent:
          $ref: '#/components/schemas/timestamp_nullable'
          nullable: true
        type:
          type: string
          enum:
            - null
            - thread
          nullable: true
        extra:
          $ref: '#/components/schemas/string_nullable'
          nullable: true
    TaskEvent:
      type: object
      required:
        - change
        - author_id
        - created_at
        - task_id
      properties:
        id:
          $ref: '#/components/schemas/id16'
        integration:
          type: string
          readOnly: true
          nullable: true
          enum:
            - api
            - email
            - evernote
            - gcal
            - mcal
            - zapier
            - make
        task_id:
          $ref: '#/components/schemas/id16'
        author_id:
          $ref: '#/components/schemas/id16_readOnly'
          readOnly: true
        created_at:
          $ref: '#/components/schemas/timestamp_readOnly'
          readOnly: true
        last_modified:
          $ref: '#/components/schemas/timestamp_readOnly'
          readOnly: true
        change:
          type: string
          minLength: 1
    Comment:
      type: object
      required:
        - body
        - task_id
        - author_id
        - created_at
      properties:
        id:
          $ref: '#/components/schemas/id16'
        body:
          type: string
        task_id:
          $ref: '#/components/schemas/id16'
        author_id:
          $ref: '#/components/schemas/id16_readOnly'
          readOnly: true
        created_at:
          $ref: '#/components/schemas/timestamp_readOnly'
          readOnly: true
        edited_at:
          $ref: '#/components/schemas/timestamp_nullable'
          nullable: true
        is_deleted:
          $ref: '#/components/schemas/bool_falsey'
        is_pinned:
          $ref: '#/components/schemas/bool_falsey'
        is_team:
          $ref: '#/components/schemas/bool_falsey'
        extra:
          $ref: '#/components/schemas/string_nullable'
          nullable: true
        reactions:
          $ref: '#/components/schemas/string_nullable'
          nullable: true
    Attachment:
      type: object
      required:
        - name
      properties:
        id:
          $ref: '#/components/schemas/id16'
        author_id:
          $ref: '#/components/schemas/id16'
        status:
          type: string
        name:
          type: string
        mime_type:
          type: string
        created_at:
          $ref: '#/components/schemas/timestamp_readOnly'
          readOnly: true
        size:
          type: integer
    Tag:
      type: object
      required:
        - id
        - name
      properties:
        id:
          $ref: '#/components/schemas/id16_readOnly'
          readOnly: true
        team_id:
          $ref: '#/components/schemas/id16_nullable'
          nullable: true
        color:
          $ref: '#/components/schemas/color'
          nullable: true
        team_color:
          $ref: '#/components/schemas/color'
          nullable: true
        icon:
          type: string
          enum:
            - null
            - cart
            - errands
            - phone
            - home
            - bulb
            - dollar
            - coffee
            - timer
            - book
            - car
            - battery
            - wrench
            - camera
            - heart
            - plane
            - baby
            - map-marker
            - rocket
            - music
            - blob
            - hardware
            - accessibility
            - apple-tag
            - buy
            - cards
            - clothes
            - computer
            - delivery
            - down
            - electricity
            - food
            - forklift
            - gift
            - image-tag
            - measure
            - mic
            - movie
            - nok
            - note
            - ok
            - play
            - promo
            - saw
            - up
            - pet
            - hourglass
            - gamepad
            - shield_x
            - shield
            - hammer
            - palette
            - student
            - puzzle
            - layers
            - crown
            - volume
            - folder
            - qr-code
            - user
          nullable: true
        name:
          $ref: '#/components/schemas/name'
        is_favorite:
          $ref: '#/components/schemas/bool_falsey'
        sidebar_position:
          $ref: '#/components/schemas/number_nullable'
          nullable: true
        archived_at:
          $ref: '#/components/schemas/timestamp_nullable'
          nullable: true
        preferences:
          $ref: '#/components/schemas/string_nullable'
          nullable: true
    TagAssignment:
      type: object
      required:
        - id
        - tag_id
        - task_id
      properties:
        id:
          $ref: '#/components/schemas/id16_readOnly'
          readOnly: true
        tag_id:
          $ref: '#/components/schemas/id16'
        task_id:
          $ref: '#/components/schemas/id16'
    ProjectGroup:
      type: object
      required:
        - name
        - team_id
        - is_private
      properties:
        id:
          $ref: '#/components/schemas/id16_nullable'
          nullable: true
        team_id:
          $ref: '#/components/schemas/id16'
        name:
          $ref: '#/components/schemas/name'
        is_private:
          $ref: '#/components/schemas/bool_falsey'
    GroupAssignment:
      type: object
      required:
        - object_id
        - group_id
        - group_type
      properties:
        id:
          $ref: '#/components/schemas/id16_nullable'
          nullable: true
        group_id:
          $ref: '#/components/schemas/id16'
        object_id:
          $ref: '#/components/schemas/id16'
        group_type:
          type: string
          enum:
            - project
            - member
    Reminder:
      type: object
      required:
        - id
        - task_id
        - remind_at
        - is_relative
        - is_all_day
      properties:
        id:
          $ref: '#/components/schemas/id16_readOnly'
          readOnly: true
        task_id:
          $ref: '#/components/schemas/id16'
        remind_at:
          type: integer
        is_relative:
          $ref: '#/components/schemas/bool_falsey'
        is_all_day:
          $ref: '#/components/schemas/bool_falsey'
        is_urgent:
          $ref: '#/components/schemas/bool_falsey'
    TaskRecurrence:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/id16'
        project_id:
          $ref: '#/components/schemas/project_id'
        current_task_id:
          $ref: '#/components/schemas/id16'
        pattern:
          type: string
          minLength: 1
    id16:
      type: string
      minLength: 16
      maxLength: 16
      pattern: '^[a-zA-Z0-9]{16}$'
    id16_nullable:
      type: string
      minLength: 16
      maxLength: 16
      pattern: '^[a-zA-Z0-9]{16}$'
      nullable: true
    id16_readOnly:
      type: string
      minLength: 16
      maxLength: 16
      pattern: '^[a-zA-Z0-9]{16}$'
      readOnly: true
    id16_readOnly_nullable:
      type: string
      minLength: 16
      maxLength: 16
      pattern: '^[a-zA-Z0-9]{16}$'
      readOnly: true
      nullable: true
    project_id:
      type: string
      minLength: 0
      maxLength: 16
      pattern: '^([a-zA-Z0-9]{16}|task_me)?$'
    name:
      type: string
      minLength: 1
      maxLength: 255
    name_allowEmpty:
      type: string
      minLength: 0
      maxLength: 255
    timestamp:
      type: integer
      minimum: 0
    timestamp_nullable:
      type: integer
      minimum: 0
      nullable: true
    timestamp_readOnly:
      type: integer
      minimum: 0
      readOnly: true
    timestamp_readOnly_nullable:
      type: integer
      minimum: 0
      readOnly: true
      nullable: true
    bool_falsey:
      type: boolean
      default: false
    color:
      type: string
      enum:
        - null
        - elwis
        - felus
        - fluffy
        - luna
        - maja
        - pedro
        - rufus
        - toto
        - aquamarine
        - aubergine
        - blue
        - brown
        - burntsienna
        - darkgreen
        - deeppurple
        - dustpink
        - green
        - heather
        - indigo
        - karmin
        - lightblue
        - lightpink
        - mauve
        - midnight
        - navy
        - ocean
        - ocher
        - olive
        - orange
        - pink
        - purple
        - red
        - sand
        - stone
        - taupe
        - teal
        - ultramarine
        - yellow
      nullable: true
    number_nullable:
      type: number
      nullable: true
    string_nullable:
      type: string
      nullable: true
  responses:
    NotFoundError:
      description: Not found
    NotImplemented:
      description: Not implemented
    Unauthorized:
      description: Unauthorized error
    UnprocessableEntity:
      description: Unprocessable entity
    BadRequestError:
      description: Bad request
    UnknownError:
      description: Unknown error
