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

# 创建任务

> 创建任务。



## OpenAPI

````yaml openapi/zh/apollo.json POST /apollo/tasks
openapi: 3.0.3
info:
  title: Apollo API
  version: 1.0.0
  description: 通过 AIsa 统一网关公开的 Apollo API 端点。
servers:
  - url: https://api.aisa.one/apis/v1
security:
  - BearerAuth: []
paths:
  /apollo/tasks:
    post:
      summary: 创建任务
      description: 创建任务。需要主 API 密钥。
      operationId: post_apollo_tasks
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                user_id:
                  type: string
                  description: 任务所有者的用户 ID。
                contact_id:
                  type: string
                  description: 联系人 ID。
                type:
                  type: string
                  description: 任务类型。
                priority:
                  type: string
                  description: 任务优先级（默认：medium）。
                status:
                  type: string
                  description: 任务状态。
                due_at:
                  type: string
                  description: ISO 8601 格式的截止日期时间。
                title:
                  type: string
                  description: 可选标题。
              required:
                - user_id
                - contact_id
                - type
                - status
                - due_at
      responses:
        '200':
          description: 成功响应
          content:
            application/json:
              schema:
                type: object
                properties:
                  task:
                    type: object
                    description: 已创建的任务（返回时）。
        '400':
          description: 错误请求
        '401':
          description: 未授权
        '429':
          description: 超出速率限制
        '500':
          description: 内部服务器错误
components:
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````