Create bucket

Use this API to create a new bucket.

Prerequisites

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

Group.ReadWrite.All

HTTP request

POST /buckets

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 bucket object.

Response

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

Example

Request

Here is an example of the request.

POST https://graph.microsoft.com/beta/buckets
Content-type: application/json
Content-length: 88

{
  "name": "name-value",
  "planId": "planId-value",
  "orderHint": "orderHint-value"
}

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

Response

Here is an example of the response.

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

{
  "name": "name-value",
  "planId": "planId-value",
  "orderHint": "orderHint-value",
  "id": "id-value"
}