Create task

Use this API to create a new task.

Prerequisites

One of the following scopes is required to execute this API:

Group.ReadWrite.All

HTTP request

POST /tasks

Request headers

Name Type Description
Authorization string Value should be set to "Bearer (access-token)"

Request body

In the request body, supply a JSON representation of task object.

Response

If successful, this method returns 201, Created response code and task object in the response body.

Example

Request

Here is an example of the request.

POST https://graph.microsoft.com/beta/tasks
Content-type: application/json
Content-length: 192

{
  "assignedTo": "assignedTo-value",
  "planId": "planId-value",
  "bucketId": "bucketId-value",
  "title": "title-value",
  "orderHint": "orderHint-value"
}

In the request body, supply a JSON representation of task object.

Response

Here is an example of the response.

HTTP/1.1 201 Created
Content-type: application/json
Content-length: 663

{
  "@odata.etag": "W/\"JzEtMDAwMDAwMDAwMDAwMDAwOC8yMDE1LTEwLTIyVDE4OjExOjU2LjExMzU1NDYrMDA6MDAn\"",
  "createdBy": "createdBy-value",
  "assignedTo": "assignedTo-value",
  "planId": "planId-value",
  "bucketId": "bucketId-value",
  "title": "title-value",
  "orderHint": "orderHint-value",
  "assigneePriority": "assigneePriority-value",
  "percentComplete": 99,
  "startDateTime": "2016-10-19T10:37:00Z",
  "assignedDateTime": "2016-10-19T10:37:00Z",
  "createdDateTime": "2016-10-19T10:37:00Z",
  "assignedBy": "assignedBy-value",
  "dueDateTime": "2016-10-19T10:37:00Z",
  "hasDescription": true,
  "previewType": "previewType-value",
  "completedDateTime": "2016-10-19T10:37:00Z",
  "appliedCategories": {
  },
  "conversationThreadId": "conversationThreadId-value",
  "id": "id-value"
}