---
updatedAt: 2026-08-12T01:17:13.000Z
agentTools:
  projectIndex: https://developers.activecampaign.com/llms.txt
---

# Create a task

Create a new task

```json POST /dealTasks (Example REQUEST)
{
  "dealTask": {
    "title":null,
    "ownerType":"contact",
    "relid":"7",
    "status":0,
    "note":"Testing Task",
    "duedate":"2017-02-25T12:00:00-06:00",
    "edate":"2017-02-25T12:15:00-06:00",
    "dealTasktype":"1",
    "assignee": 2,
    "triggerAutomationOnCreate": 100,
    "doneAutomation": 101      
  }
}
```
```json POST /dealTasks (Example RESPONSE)
{
  "dealTask": {
    "id":"1",
    "duedate":"2017-02-25T12:00:00-06:00",
    "edate":"2017-02-25T12:15:00-06:00",
    "status":0,
    "title":null,
    "note":"Testing Task",
    "relid":"7",
    "reltype":"Subscriber",
    "dealTasktype":"1",
    "cdate":"2017-02-24T13:21:56-06:00",
    "udate":"2017-02-24T13:21:56-06:00",
    "automation":null,
    "doneAutomation":null,
    "user":"1",
    "assignee":"2",
    "owner":{
      "type":"contact",
      "id":"7"
    },
    "outcomeId": null,
		"outcomeInfo": null,
    "links": {
      "activities":"/1/activities",
      "automation":"/1/automation",
      "dealTasktype":"/1/dealTasktype",
      "doneAutomation":"/1/doneAutomation",
      "notes":"/1/notes",
      "owner":"/1/owner",
      "taskNotifications":"/1/taskNotifications",
      "user":"/1/user",
      "assignee": "/1/assignee",
    }
  }
}
```

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "v3",
    "version": "3"
  },
  "servers": [
    {
      "url": "https://{youraccountname}.api-us1.com/api/3",
      "variables": {
        "youraccountname": {
          "default": "youraccountname"
        }
      }
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "name": "Api-Token",
        "in": "header",
        "x-default": ""
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/dealTasks": {
      "post": {
        "summary": "Create a task",
        "description": "Create a new task",
        "operationId": "create-task",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "dealTask": {
                    "properties": {
                      "title": {
                        "type": "string",
                        "description": "The title to be assigned to the task"
                      },
                      "ownerType": {
                        "type": "string",
                        "description": "The name of the relating object. Valid values are `contact` or `deal`. (see relationships table)",
                        "default": "deal"
                      },
                      "relid": {
                        "type": "integer",
                        "description": "The id of the relational object for this task",
                        "format": "int32"
                      },
                      "status": {
                        "type": "integer",
                        "description": "Task status means complete or incomplete. 1 is complete and 0 is incomplete.",
                        "format": "int32"
                      },
                      "note": {
                        "type": "string",
                        "description": "The content describing the task"
                      },
                      "duedate": {
                        "type": "string",
                        "description": "Due date of the task",
                        "format": "date"
                      },
                      "edate": {
                        "type": "string",
                        "description": "End date of the task. Must not be earlier than `duedate`. When the task has no `edate`, it is set to `duedate` plus 15 minutes.",
                        "examples": [
                          "2017-02-25T12:15:00-06:00"
                        ]
                      },
                      "dealTasktype": {
                        "type": "integer",
                        "description": "The type of the task based on the available Task Types in the account",
                        "format": "int32"
                      },
                      "assignee": {
                        "type": "integer",
                        "description": "The id of an user the task will be assigned to",
                        "format": "int32"
                      },
                      "triggerAutomationOnCreate": {
                        "type": "integer",
                        "description": "Id of an automation that will be triggered when the task is created.",
                        "format": "int32"
                      },
                      "doneAutomation": {
                        "type": "integer",
                        "description": "Id of an automation that will be triggered when the task is completed.",
                        "format": "int32"
                      },
                      "outcomeId": {
                        "type": "integer",
                        "description": "ID of a task outcome associated with the task's task type."
                      },
                      "outcomeInfo": {
                        "type": "string",
                        "maxLength": 4096
                      },
                      "automation": {
                        "type": "integer"
                      },
                      "owner": {
                        "type": "integer",
                        "description": "ID of the record the task belongs to; replaces relid when present."
                      },
                      "reltype": {
                        "type": "string",
                        "description": "Owner class name, Deal or Subscriber (CustomerAccount when account tasks are enabled). Replaced by ownerType when ownerType is deal, contact or account, and set to Deal when ownerType is absent."
                      }
                    },
                    "required": [
                      "relid",
                      "duedate",
                      "dealTasktype"
                    ],
                    "type": "object"
                  },
                  "shouldValidateAssignee": {
                    "type": "boolean",
                    "description": "When true, the assignee must be an existing user."
                  }
                }
              },
              "examples": {
                "Request Example": {
                  "value": {
                    "dealTask": {
                      "title": null,
                      "ownerType": "contact",
                      "relid": "7",
                      "status": 0,
                      "note": "Testing Task",
                      "duedate": "2017-02-25T12:00:00-06:00",
                      "edate": "2017-02-25T12:15:00-06:00",
                      "dealTasktype": "1",
                      "assignee": 2,
                      "triggerAutomationOnCreate": 100,
                      "doneAutomation": 101
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "201",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "dealTask": {
                      "type": "object",
                      "properties": {
                        "relid": {
                          "type": "string",
                          "examples": [
                            "5"
                          ]
                        },
                        "reltype": {
                          "type": "string",
                          "examples": [
                            "Deal"
                          ]
                        },
                        "dealTasktype": {
                          "type": [
                            "integer",
                            "string"
                          ],
                          "examples": [
                            "1"
                          ]
                        },
                        "user": {
                          "type": "string",
                          "examples": [
                            "1"
                          ]
                        },
                        "assignee": {
                          "type": [
                            "integer",
                            "string",
                            "null"
                          ],
                          "examples": [
                            "2"
                          ]
                        },
                        "automation": {},
                        "cdate": {
                          "type": "string",
                          "examples": [
                            "2017-02-24T15:01:37-06:00"
                          ]
                        },
                        "duedate": {
                          "type": "string",
                          "examples": [
                            "2017-02-28T12:00:00-06:00"
                          ]
                        },
                        "edate": {
                          "type": "string",
                          "examples": [
                            "2017-02-28T12:15:00-06:00"
                          ]
                        },
                        "duration": {
                          "type": "string",
                          "examples": [
                            "0"
                          ]
                        },
                        "status": {
                          "type": [
                            "integer",
                            "string"
                          ],
                          "examples": [
                            "0"
                          ]
                        },
                        "title": {
                          "type": "string",
                          "examples": [
                            ""
                          ]
                        },
                        "note": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "examples": [
                            "Deal task title!"
                          ]
                        },
                        "donedate": {},
                        "doneAutomation": {},
                        "udate": {
                          "type": "string",
                          "examples": [
                            "2017-02-24T15:01:37-06:00"
                          ]
                        },
                        "owner": {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "examples": [
                                "deal"
                              ]
                            },
                            "id": {
                              "type": "string",
                              "examples": [
                                "5"
                              ]
                            }
                          }
                        },
                        "id": {
                          "type": "string",
                          "examples": [
                            "1"
                          ]
                        },
                        "outcomeId": {
                          "type": [
                            "integer",
                            "string",
                            "null"
                          ],
                          "examples": [
                            91
                          ]
                        },
                        "outcomeInfo": {
                          "type": "string",
                          "examples": [
                            "More details about the outcome"
                          ]
                        },
                        "links": {
                          "type": "object",
                          "properties": {
                            "activities": {
                              "type": "string",
                              "examples": [
                                "https://yourAccountName.api-us1.com/api/3/dealTasks/1/activities"
                              ]
                            },
                            "automation": {
                              "type": "string",
                              "examples": [
                                "https://yourAccountName.api-us1.com/api/3/dealTasks/1/automation"
                              ]
                            },
                            "dealTasktype": {
                              "type": "string",
                              "examples": [
                                "https://yourAccountName.api-us1.com/api/3/dealTasks/1/dealTasktype"
                              ]
                            },
                            "doneAutomation": {
                              "type": "string",
                              "examples": [
                                "https://yourAccountName.api-us1.com/api/3/dealTasks/1/doneAutomation"
                              ]
                            },
                            "notes": {
                              "type": "string",
                              "examples": [
                                "https://yourAccountName.api-us1.com/api/3/dealTasks/1/notes"
                              ]
                            },
                            "owner": {
                              "type": "string",
                              "examples": [
                                "https://yourAccountName.api-us1.com/api/3/dealTasks/1/owner"
                              ]
                            },
                            "taskNotifications": {
                              "type": "string",
                              "examples": [
                                "https://yourAccountName.api-us1.com/api/3/dealTasks/1/taskNotifications"
                              ]
                            },
                            "user": {
                              "type": "string",
                              "examples": [
                                "https://yourAccountName.api-us1.com/api/3/dealTasks/1/user"
                              ]
                            },
                            "assignee": {
                              "type": "string",
                              "examples": [
                                "https://yourAccountName.api-us1.com/api/3/dealTasks/1/assignee"
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": false,
    "proxy-enabled": false
  },
  "x-readme-fauxas": true
}
```