> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pland.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Complete Task

> Mark a task as completed with optional email notification. Optionally sends a completion email to a specified recipient.



## OpenAPI

````yaml POST /tasks/{id}/complete
openapi: 3.0.0
info:
  title: PlanD API
  description: PlanD Public API
  version: '2'
servers:
  - url: http:localhost:3000/v2
    description: Local Server
  - url: https://beta-api.pland.app/v2
    description: Sandbox Server
  - url: https://cloud-api.pland.app/v2
    description: Production Server
security: []
tags:
  - name: Absences
    description: >-
      Absence management endpoints for creating, updating, and managing user
      absences
  - name: Activity Types
    description: Activity type management operations
  - name: API Keys
    description: API key management operations for programmatic access to the API
  - name: Assignments
    description: Assignment management operations
  - name: Chat (Legacy)
    description: >-
      Legacy chat operations using Stream Chat service (deprecated - use Entity
      Chat v2 instead)
  - name: Client
    description: Unauthenticated client-facing operations
  - name: Company
    description: Company information and settings management operations
  - name: Complaints
    description: Customer complaint and ticket management operations
  - name: Contacts
    description: Contact person management operations
  - name: Customers
    description: Customer management operations
  - name: Customer Objects
    description: >-
      Customer object management operations - locations and buildings where
      services are performed
  - name: Documents
    description: >-
      Document management operations for uploading, retrieving, and managing
      files
  - name: Logbuch
    description: >-
      Operations for sending, retrieving, updating, and deleting Logbuch in
      entity chats.
  - name: Push Notifications
    description: Operations for listing, reading, and deleting user notifications.
  - name: Equipment
    description: Equipment management operations
  - name: Equipment Types
    description: Equipment type management operations
  - name: Assignment Confirmations
    description: Assignment confirmation management operations
  - name: Credit
    description: >-
      Credit note management operations for creating and handling credit
      documents
  - name: Invoice
    description: >-
      Invoice management operations for creating, managing, and processing
      customer invoices
  - name: Invoice Reminders
    description: >-
      Invoice reminder management operations for creating and handling payment
      reminder documents
  - name: Invoice Reminder Templates
    description: >-
      Invoice reminder template management operations for creating and handling
      reminder document templates
  - name: Invoice Storno
    description: Invoice storno (cancellation) document management operations
  - name: Invoice Templates
    description: >-
      Invoice template management operations for creating and handling invoice
      document templates
  - name: Offers
    description: Offer management operations
  - name: ServiceReport
    description: >-
      Service report management operations for creating and handling service
      documentation
  - name: Holiday
    description: Holidays management
  - name: Implementation
    description: User implementation progress tracking and onboarding management
  - name: Jobs
    description: >-
      Endpoints for managing jobs, including creation, listing, updating, and
      job-specific actions.
  - name: Material Orders
    description: Operations for listing, viewing, updating, and managing material orders.
  - name: Notifications
    description: User notification management operations
  - name: Payment Methods
    description: >-
      Payment method management operations for configuring available payment
      options
  - name: Payment Terms
    description: Operations for managing payment terms
  - name: Payments
    description: Payment management operations
  - name: Articles
    description: >-
      Operations for creating, listing, viewing, updating, and deleting
      articles.
  - name: Suppliers
    description: Supplier management operations
  - name: Service Products
    description: >-
      Operations for creating, listing, viewing, updating, and deleting service
      products.
  - name: Quality Control
    description: Quality control and assessment management operations
  - name: Pay Types
    description: Pay type management operations for salary and absence types
  - name: Salary
    description: >-
      Salary management operations for tracking and managing employee
      compensation
  - name: Surcharges
    description: Surcharge management operations for pay types and salary calculations
  - name: Search
    description: Search for entities in PlanD
  - name: Signing
    description: Endpoints for creating and listing signings (digital signatures).
  - name: Tasks
    description: Task management operations
  - name: Task Types
    description: Task type management operations
  - name: Tax Rates
    description: >-
      Tax rate management operations for handling VAT, zero rates, exemptions,
      and reverse charge scenarios
  - name: Time Tracking
    description: >-
      Time tracking management endpoints for recording, monitoring, and managing
      work time entries
  - name: Assets
    description: Asset URL management operations for secure access to uploaded files
  - name: Upload
    description: >-
      CSV and file uploads for various entities (articles, material, users,
      customers, objects, contacts, equipment, images)
  - name: Users
    description: >-
      User management endpoints for creating, updating, and managing system
      users
  - name: Authentication
    description: User authentication and password management operations
  - name: Banking Transactions
    description: Banking transaction management operations
  - name: Webhooks
  - name: SMS
    description: Endpoints for SMS status updates and link tracking.
paths:
  /tasks/{id}/complete:
    post:
      tags:
        - Tasks
      summary: Complete task
      description: >-
        Mark a task as completed with optional email notification. Optionally
        sends a completion email to a specified recipient.
      operationId: completeTask
      parameters:
        - name: id
          in: path
          description: Task ID to complete
          required: true
          schema:
            type: string
            format: objectid
      requestBody:
        description: Task completion data
        required: false
        content:
          application/json:
            schema:
              properties:
                sendEmail:
                  description: Whether to send completion email
                  type: boolean
                  default: false
                emailText:
                  description: Custom completion message to send in email
                  type: string
                  example: The task has been completed successfully.
                recipientEmail:
                  description: Email address to send completion notification to
                  type: string
                  format: email
                  example: customer@example.com
              type: object
      responses:
        '200':
          description: Task completed successfully
          content:
            application/json:
              schema:
                properties:
                  completed:
                    description: Completion success indicator
                    type: boolean
                    example: true
                type: object
        '400':
          description: Task already completed or cancelled
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Task not found

````