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

# Create Task Relation

> Create a relation between two tasks



## OpenAPI

````yaml https://cloud.kaneo.app/api/openapi post /task-relation
openapi: 3.0.3
info:
  title: Kaneo API
  description: Kaneo Project Management API - Manage projects, tasks, labels, and more
  version: 1.0.0
servers:
  - url: https://cloud.kaneo.app/api
    description: Kaneo API Server
security:
  - bearerAuth: []
tags:
  - name: Organization Management
paths:
  /task-relation:
    post:
      tags:
        - Task Relations
      summary: Create Task Relation
      description: Create a relation between two tasks
      operationId: createTaskRelation
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                sourceTaskId:
                  type: string
                targetTaskId:
                  type: string
                relationType:
                  enum:
                    - subtask
                    - blocks
                    - related
                  type: string
              required:
                - sourceTaskId
                - targetTaskId
                - relationType
      responses:
        '200':
          description: Task relation created successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  sourceTaskId:
                    type: string
                  targetTaskId:
                    type: string
                  relationType:
                    type: string
                  createdAt:
                    type: string
                    format: date-time
                required:
                  - id
                  - sourceTaskId
                  - targetTaskId
                  - relationType
                  - createdAt
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Bearer token authentication

````