---
updatedAt: 2026-04-28T08:04:37.000Z
agentTools:
  projectIndex: https://developers.wrike.com/llms.txt
---

# Create Dependency (Task)

Add dependency between tasks. If a dependency already exists, attempting to recreate will result in an error.

<b>Scopes:</b> Default, wsReadWrite

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "title": "Wrike API",
    "version": "4.0"
  },
  "servers": [
    {
      "url": "https://www.wrike.com/api/v4"
    },
    {
      "url": "https://app-eu.wrike.com/api/v4"
    },
    {
      "url": "https://app-us2.wrike.com/api/v4"
    }
  ],
  "paths": {
    "/tasks/{taskId}/dependencies": {
      "post": {
        "tags": [
          "Dependencies"
        ],
        "summary": "Create Dependency (Task)",
        "description": "Add dependency between tasks. If a dependency already exists, attempting to recreate will result in an error.\n\n<b>Scopes:</b> Default, wsReadWrite",
        "operationId": "POST:/tasks/single/dependencies",
        "parameters": [
          {
            "name": "taskId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/TaskId"
            }
          },
          {
            "name": "predecessorId",
            "in": "query",
            "description": "Add predecessor, only one of predecessorId/successorId fields can be specified. The ID kind must match the one in the URL: a task ID under the tasks prefix, the ID of an existing project under the folders prefix",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/TaskId"
            }
          },
          {
            "name": "successorId",
            "in": "query",
            "description": "Add successor, only one of predecessorId/successorId fields can be specified. The ID kind must match the one in the URL: a task ID under the tasks prefix, the ID of an existing project under the folders prefix",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/TaskId"
            }
          },
          {
            "name": "relationType",
            "in": "query",
            "description": "Relation between Predecessor and Successor. The scheduling restrictions apply to task dependencies only, a project dependency accepts every relation type regardless of the projects' dates\n* `FinishToFinish` - Finish to finish. For task dependencies allowed only when predecessor and successor are Planned or Milestone tasks\n* `StartToStart` - Start to start. For task dependencies allowed only when both predecessor and successor are Planned tasks\n* `StartToFinish` - Start to finish. For task dependencies allowed only when predecessor is Planned, and successor is Planned or Milestone task\n* `FinishToStart` - Finish to start. For task dependencies allowed only when predecessor is Planned or Milestone, and successor is Planned task",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/DependencyRelationType"
            }
          },
          {
            "name": "lagTime",
            "in": "query",
            "description": "Always in minutes, positive numbers are lag time and negative numbers are lead time. For project dependencies the lag is stored in whole work days of 480 minutes, so any partial day is rounded up to the next whole day, keeping the sign: 1 to 480 minutes become 1 day, 481 to 960 minutes become 2 days, -1 to -480 minutes become -1 day. A project dependency's lag must be within ±2147483520 minutes",
            "required": false,
            "schema": {
              "type": "number",
              "description": "Always in minutes, positive numbers are lag time and negative numbers are lead time. For project dependencies the lag is stored in whole work days of 480 minutes, so any partial day is rounded up to the next whole day, keeping the sign: 1 to 480 minutes become 1 day, 481 to 960 minutes become 2 days, -1 to -480 minutes become -1 day. A project dependency's lag must be within ±2147483520 minutes",
              "default": "0"
            }
          }
        ],
        "responses": {
          "2XX": {
            "description": "success response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "$ref": "#/components/schemas/ResponseKind"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Dependency"
                      }
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "client-side error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "server-side error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "HTTP": []
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "ResponseKind": {
        "type": "string",
        "enum": [
          "accounts",
          "users",
          "contacts",
          "assets",
          "eDiscoveryReport",
          "folders",
          "folderTree",
          "tasks",
          "taskIds",
          "timelogs",
          "timelogCategories",
          "timelogLockPeriods",
          "timetrackerTimers",
          "comments",
          "attachments",
          "url",
          "version",
          "dataExport",
          "dataExportSchema",
          "auditLog",
          "accessRoles",
          "stream",
          "changes",
          "posts",
          "mailSettings",
          "integrationInfo",
          "gmailIntegrationSettings",
          "workTypesForIntegrations",
          "ids",
          "backups",
          "domains",
          "dependencies",
          "workflows",
          "workschedules",
          "workscheduleExclusions",
          "workscheduleUserExclusions",
          "customfields",
          "customfieldIds",
          "customstatuses",
          "invitations",
          "notifications",
          "jobroles",
          "placeholders",
          "groups",
          "session",
          "dashboards",
          "widgets",
          "taskCreationSettings",
          "colors",
          "experiments",
          "topics",
          "topicComments",
          "webhooks",
          "reviews",
          "boards",
          "textSearch",
          "chatChannels",
          "chatMessages",
          "forms",
          "requestForms",
          "request",
          "report",
          "platformWidgets",
          "platformWidgetInstances",
          "spaces",
          "pdf",
          "customerSatisfaction",
          "asyncJob",
          "approvals",
          "highlights",
          "highlightsList",
          "highlightsSettings",
          "highlightsCard",
          "timesheet",
          "timesheetRow",
          "timesheetSubmissionRule",
          "mobileFeatures",
          "mobileSettings",
          "folderBlueprintTree",
          "taskBlueprintTree",
          "blueprintSearch",
          "feedback",
          "timeline_snapshot",
          "contactIds",
          "bookings",
          "integrateThreshold",
          "hourlyRatesProvision",
          "hourlyRates",
          "projectTeamMembers",
          "contactsHistory",
          "tasksHistory",
          "foldersHistory",
          "activityDigest",
          "workItemTemplates",
          "workTemplates",
          "workItemMetadata",
          "workItem",
          "customItemTypes",
          "verificationCode",
          "views",
          "listView",
          "tableView",
          "userTypes",
          "reactions",
          "externalRequesters",
          "workscheduleCapacityOverrides",
          "userCapacityOverrides",
          "userCapacityExclusions",
          "rollups",
          "requestFormPrefill",
          "mcpFeatures",
          "attachmentUploadUrl",
          "userAggregatedCapacity",
          "cascadingFieldSettings",
          "recommendResources",
          "aggregatedAllocatedEffort",
          "aggregatedTotalUserEffort",
          "aggregatedTimeSpent",
          "folderBlueprint",
          "taskBlueprint"
        ]
      },
      "Dependency": {
        "type": "object",
        "properties": {
          "relationType": {
            "$ref": "#/components/schemas/DependencyRelationType"
          },
          "successorId": {
            "$ref": "#/components/schemas/TaskId"
          },
          "lagTime": {
            "type": "number",
            "description": "Always in minutes, positive numbers are lag time and negative numbers are lead time. For project dependencies the lag is kept in whole work days of 480 minutes, so the value is always a multiple of 480"
          },
          "id": {
            "$ref": "#/components/schemas/DependencyId"
          },
          "predecessorId": {
            "$ref": "#/components/schemas/TaskId"
          }
        }
      },
      "DependencyId": {
        "pattern": "^([a-zA-Z0-9-_:\\.=]){1,256}$",
        "type": "string"
      },
      "ErrorType": {
        "type": "string",
        "enum": [
          "invalid_request",
          "invalid_parameter",
          "parameter_required",
          "not_authorized",
          "access_forbidden",
          "not_allowed",
          "resource_not_found",
          "method_not_found",
          "too_many_requests",
          "rate_limit_exceeded",
          "server_error"
        ]
      },
      "ErrorResponse": {
        "type": "object",
        "properties": {
          "error": {
            "$ref": "#/components/schemas/ErrorType"
          },
          "errorDescription": {
            "type": "string"
          }
        }
      },
      "TaskId": {
        "pattern": "^([a-zA-Z0-9-_:\\.=]){1,256}$",
        "type": "string"
      },
      "DependencyRelationType": {
        "type": "string",
        "description": "* `FinishToFinish` - Finish to finish. For task dependencies allowed only when predecessor and successor are Planned or Milestone tasks\n* `StartToStart` - Start to start. For task dependencies allowed only when both predecessor and successor are Planned tasks\n* `StartToFinish` - Start to finish. For task dependencies allowed only when predecessor is Planned, and successor is Planned or Milestone task\n* `FinishToStart` - Finish to start. For task dependencies allowed only when predecessor is Planned or Milestone, and successor is Planned task",
        "enum": [
          "FinishToFinish",
          "StartToStart",
          "StartToFinish",
          "FinishToStart"
        ]
      }
    },
    "securitySchemes": {
      "HTTP": {
        "type": "http",
        "description": "Use OAuth 2.0 access token or permanent access token for authorization.",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    }
  }
}
```