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

# Approve or reject a task



## OpenAPI

````yaml /openapi/workspace.yaml post /workspaces/{workspaceId}/approve-task/{taskId}
openapi: 3.1.0
info:
  title: Connie Workspace API
  version: 1.0.0
  description: >
    API for workspace management, members, invitations, files, preferences, tool
    accounts, and approval tasks. Billing endpoints are documented separately in
    the Billing API spec.
servers:
  - url: https://connie.ai/api
    description: Production
security:
  - cookieAuth: []
tags:
  - name: Workspace
    description: Workspace lifecycle management
  - name: Members
    description: Workspace member management
  - name: Invitations
    description: Workspace invitation flow
  - name: Page Invites
    description: Page invitation flow
  - name: Files
    description: Workspace file storage
  - name: Settings
    description: Workspace settings and branding
  - name: Preferences
    description: User preferences per workspace
  - name: Notifications
    description: User notification preferences
  - name: Profile
    description: User profile management
  - name: Tool Accounts
    description: Connected integration accounts (Slack, GitHub, LinkedIn, etc.)
  - name: Approvals
    description: Workflow approval task management
  - name: Internal
    description: Internal monitoring and metrics endpoints
paths:
  /workspaces/{workspaceId}/approve-task/{taskId}:
    post:
      tags:
        - Approvals
      summary: Approve or reject a task
      operationId: actOnApprovalTask
      parameters:
        - $ref: '#/components/parameters/workspaceId'
        - name: taskId
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - action
              properties:
                action:
                  type: string
                  enum:
                    - approve
                    - reject
                reason:
                  type: string
                  description: Optional reason (shown in workflow logs)
      responses:
        '200':
          description: Task actioned
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  task:
                    $ref: '#/components/schemas/ApprovalTask'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          description: Not an assigned approver for this task
        '404':
          $ref: '#/components/responses/NotFound'
components:
  parameters:
    workspaceId:
      name: workspaceId
      in: path
      required: true
      schema:
        type: string
        format: uuid
  schemas:
    ApprovalTask:
      type: object
      properties:
        id:
          type: string
        status:
          type: string
          enum:
            - pending
            - approved
            - rejected
            - cancelled
        required_approvers:
          type: integer
        actual_approvers:
          type: integer
        user_can_approve:
          type: boolean
        user_has_acted:
          type: boolean
        comment:
          type: string
          nullable: true
        stats:
          type: object
    Error:
      type: object
      properties:
        error:
          type: string
  responses:
    Unauthorized:
      description: Not authenticated
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    cookieAuth:
      type: apiKey
      in: cookie
      name: session

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.