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

# Hand Back Task

> Report on a task given to your external AI agent and return it to the team.

The report is posted as a comment signed by that agent. Returns 409 `task_not_held_by_external_agent` when
the task was taken back or is not with an external AI agent.



## OpenAPI

````yaml /openapi-v1.json post /api/v1/tasks/{task_id}/hand-back
openapi: 3.1.0
info:
  title: AGO Public API
  version: 1.0.0
  description: Programmatic access to your AGO workspace.
servers:
  - url: https://{tenant_id}.api.useago.com
    description: AGO Public API v1
    variables:
      tenant_id:
        default: your-tenant-id
        description: Your AGO tenant identifier
security: []
paths:
  /api/v1/tasks/{task_id}/hand-back:
    post:
      tags:
        - Tasks
      summary: Hand Back Task
      description: >-
        Report on a task given to your external AI agent and return it to the
        team.


        The report is posted as a comment signed by that agent. Returns 409
        `task_not_held_by_external_agent` when

        the task was taken back or is not with an external AI agent.
      operationId: hand_back_task
      parameters:
        - in: path
          name: task_id
          schema:
            description: Task UUID or identifier such as TASK-12
            title: Task Id
            type: string
          required: true
          description: Task UUID or identifier such as TASK-12
        - in: header
          name: Idempotency-Key
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Idempotency-Key
          required: false
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TaskHandBackIn'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskOut'
      security:
        - ScopedAPIKeyAuth: []
components:
  schemas:
    TaskHandBackIn:
      properties:
        result:
          description: >-
            Your report: what you did, what you found and what is left. Posted
            as a comment signed by the agent the task was given to.
          maxLength: 10000
          minLength: 1
          title: Result
          type: string
        outcome:
          default: completed
          description: >-
            `completed` or `incomplete` (open points left) move the task to the
            review status; `failed` leaves its status as is.
          enum:
            - completed
            - incomplete
            - failed
          title: Outcome
          type: string
      required:
        - result
      title: TaskHandBackIn
      type: object
    TaskOut:
      properties:
        id:
          title: Id
          type: string
        board_id:
          title: Board Id
          type: string
        identifier:
          anyOf:
            - type: string
            - type: 'null'
          description: Short handle such as TASK-12, accepted wherever a task id is.
          title: Identifier
        title:
          title: Title
          type: string
        description:
          default: ''
          title: Description
          type: string
        status:
          $ref: '#/components/schemas/TaskStatusRef'
        priority:
          title: Priority
          type: string
        deadline:
          anyOf:
            - format: date
              type: string
            - type: 'null'
          title: Deadline
        owner:
          anyOf:
            - $ref: '#/components/schemas/TaskUserRef'
            - type: 'null'
        holder:
          default: human
          description: >-
            Who is working on the task now: `ai` while an AI agent has it,
            `human` otherwise.
          enum:
            - human
            - ai
          title: Holder
          type: string
        agent:
          anyOf:
            - $ref: '#/components/schemas/TaskAgentRef'
            - type: 'null'
          description: The AI agent the task was last given to.
        labels:
          items:
            $ref: '#/components/schemas/TaskLabelOut'
          title: Labels
          type: array
        links:
          items:
            $ref: '#/components/schemas/TaskLinkOut'
          title: Links
          type: array
        source:
          title: Source
          type: string
        created_by:
          anyOf:
            - $ref: '#/components/schemas/TaskUserRef'
            - type: 'null'
        revision:
          title: Revision
          type: integer
        created_at:
          format: date-time
          title: Created At
          type: string
        updated_at:
          format: date-time
          title: Updated At
          type: string
        finished_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: Finished At
        archived_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: Archived At
        admin_url:
          title: Admin Url
          type: string
      required:
        - id
        - board_id
        - title
        - status
        - priority
        - labels
        - links
        - source
        - revision
        - created_at
        - updated_at
        - admin_url
      title: TaskOut
      type: object
    TaskStatusRef:
      properties:
        key:
          title: Key
          type: string
        label:
          title: Label
          type: string
        category:
          description: todo, in_progress, done, or canceled
          title: Category
          type: string
        role:
          anyOf:
            - type: string
            - type: 'null'
          description: '"review" for the review column'
          title: Role
      required:
        - key
        - label
        - category
      title: TaskStatusRef
      type: object
    TaskUserRef:
      properties:
        id:
          title: Id
          type: string
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        email:
          anyOf:
            - type: string
            - type: 'null'
          title: Email
      required:
        - id
      title: TaskUserRef
      type: object
    TaskAgentRef:
      properties:
        id:
          title: Id
          type: string
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        kind:
          default: ago
          description: '`ago` for an AGO agent, `external` for an AI outside AGO.'
          enum:
            - ago
            - external
          title: Kind
          type: string
      required:
        - id
      title: TaskAgentRef
      type: object
    TaskLabelOut:
      properties:
        id:
          title: Id
          type: string
        name:
          title: Name
          type: string
        color:
          title: Color
          type: string
      required:
        - id
        - name
        - color
      title: TaskLabelOut
      type: object
    TaskLinkOut:
      properties:
        id:
          title: Id
          type: string
        target_type:
          title: Target Type
          type: string
        target_id:
          title: Target Id
          type: string
        context:
          $ref: '#/components/schemas/TaskLinkContext'
        deleted:
          description: True when the linked record was deleted; the link stays as history.
          title: Deleted
          type: boolean
        admin_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Admin Url
      required:
        - id
        - target_type
        - target_id
        - context
        - deleted
      title: TaskLinkOut
      type: object
    TaskLinkContext:
      properties:
        conversation_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Conversation Id
        message_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Message Id
      title: TaskLinkContext
      type: object
  securitySchemes:
    ScopedAPIKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key

````

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