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

# Create a new task

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "Nutshell API",
    "description": "The most powerful API in the world",
    "version": "2.0.0"
  },
  "servers": [
    {
      "url": "app.nutshell.com/rest"
    }
  ],
  "paths": {
    "/tasks": {
      "post": {
        "tags": [
          "Tasks"
        ],
        "summary": "Create a new task",
        "operationId": "6558005d25c656d862228999ac70bcc2",
        "requestBody": {
          "description": "Task to create",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "title": {
                    "description": "The title of the task",
                    "type": "string"
                  },
                  "description": {
                    "description": "The description of the task",
                    "type": "string"
                  },
                  "dueTime": {
                    "description": "The due time of the task. Formatted as a Unix timestamp",
                    "type": "string"
                  },
                  "recurrenceRule": {
                    "$ref": "#/components/schemas/RecurrenceRule"
                  },
                  "links": {
                    "description": "Entities that are related to the task",
                    "properties": {
                      "relatedEntity": {
                        "description": "The entity to attach the task to",
                        "type": "string",
                        "example": "3-contacts"
                      },
                      "assignee": {
                        "description": "The user to assign the task to",
                        "type": "string",
                        "example": "1-users"
                      }
                    },
                    "type": "object",
                    "example": "3-contacts"
                  }
                },
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "A list of tasks"
          }
        },
        "security": [
          {
            "basicAuth": []
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "RecurrenceRule": {
        "description": "An RRULE-based recurrence pattern for a task.",
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/HtmlLinkable"
          },
          {
            "properties": {
              "rule": {
                "description": "An RRULE-compatible string defining the recurrence pattern. See https://datatracker.ietf.org/doc/html/rfc5545#section-3.3.10 and https://icalendar.org/iCalendar-RFC-5545/3-3-10-recurrence-rule.html",
                "type": "string",
                "example": "FREQ=WEEKLY;BYDAY=MO"
              },
              "mode": {
                "description": "How the next due date is calculated. 'dueDate' follows the recurrence sequence regardless of completion; 'completion' schedules the next task relative to when the prior one was completed.",
                "type": "string",
                "enum": [
                  "dueDate",
                  "completion"
                ],
                "example": "dueDate"
              },
              "id": {
                "description": "The API ID of this entity, formatted {integer}-{entityType}",
                "type": "string",
                "example": "3-contacts"
              }
            },
            "type": "object"
          }
        ]
      },
      "HtmlLinkable": {
        "description": "Adds an htmlUrl string attribute that represents a URL of an HTML representation of the\nresponse model.",
        "properties": {
          "htmlUrl": {
            "description": "The link to the entity within the app.",
            "type": "string",
            "example": "https://app.nutshell.com/lead/1006"
          },
          "htmlUrlPath": {
            "description": "The path to the entity within the app.",
            "type": "string",
            "example": "/lead/1006"
          }
        },
        "type": "object"
      }
    },
    "securitySchemes": {
      "basicAuth": {
        "type": "http",
        "scheme": "basic"
      }
    }
  },
  "tags": [
    {
      "name": "Tasks",
      "description": "Tasks"
    }
  ]
}
```