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

# Triage Emails

> Classify a batch of emails into triage buckets.



## OpenAPI

````yaml /openapi.json post /api/v1/teams/cos/triage/email
openapi: 3.1.0
info:
  title: AITasker
  version: 0.1.0
servers: []
security: []
paths:
  /api/v1/teams/cos/triage/email:
    post:
      tags:
        - Chief of Staff
      summary: Triage Emails
      description: Classify a batch of emails into triage buckets.
      operationId: triage_emails_api_v1_teams_cos_triage_email_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TriageEmailRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/TriageItemResponse'
                type: array
                title: Response Triage Emails Api V1 Teams Cos Triage Email Post
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    TriageEmailRequest:
      properties:
        emails:
          items:
            $ref: '#/components/schemas/EmailInput'
          type: array
          title: Emails
      type: object
      required:
        - emails
      title: TriageEmailRequest
    TriageItemResponse:
      properties:
        id:
          type: string
          title: Id
        source:
          type: string
          title: Source
        title:
          type: string
          title: Title
        summary:
          type: string
          title: Summary
        action:
          type: string
          title: Action
        reason:
          type: string
          title: Reason
        priority:
          type: integer
          title: Priority
        agent_slug:
          anyOf:
            - type: string
            - type: 'null'
          title: Agent Slug
        proposed_output:
          anyOf:
            - type: string
            - type: 'null'
          title: Proposed Output
      type: object
      required:
        - id
        - source
        - title
        - summary
        - action
        - reason
        - priority
      title: TriageItemResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    EmailInput:
      properties:
        id:
          type: string
          title: Id
        from:
          type: string
          title: From
        subject:
          type: string
          title: Subject
        snippet:
          type: string
          title: Snippet
          default: ''
        date:
          type: string
          title: Date
          default: ''
        labels:
          items:
            type: string
          type: array
          title: Labels
          default: []
      type: object
      required:
        - id
        - from
        - subject
      title: EmailInput
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````