# Create

> **DEPRECATED**

> **WARNING:** **Deprecated**

Please note that the `scheduler_requests/create` API is has been replaced with `scheduling_requests/create`.

This is for consistency in the names and attributes used, and to add support for more than just internal applications.
The new endpoint supports the same body to make it easy to migrate to.

You can find the docs for the [new endpoints here](https://docs.cronofy.com/developers/api/scheduling-requests/index.md).

#### Description
Creates a Scheduler Request using a Cronofy Account.

Authentication is with a `client_secret` of an [Internal Application](https://docs.cronofy.com/developers/application-management/internal-applications/index.md) linked to the Organizational Unit.

Also supports the `sub` of an Account connected to the Organizational Unit in the  `Cronofy-Impersonate` header.

The `host` for the resulting meeting is decided in one of two ways.

- Specify `host` in the payload.

```json
{
  "host": {
    "sub": "acc_5ba21743f408617d1269ea1e"
  },
  ...
}
```

This creates a request using the hosts default personal scheduling preferences.

<ol start="2">
- Use the `Cronofy-Impersonate` header.

Instead of specifying the `host` in the payload you can authenticate as specific Account and that will be used as the `host` of the resulting meeting.

#### URL format
```
{data_center_url}/v1/scheduler_requests
```

#### Example Request
```http
POST /v1/scheduler_requests HTTP/1.1
Host: {data_center_url}
Authorization: Bearer {API_KEY}
Content-Type: application/json; charset=utf-8

{
  "host": {
    "sub": "acc_5ba21743f408617d1269ea1e"
  },
  "recipients": [
    {
      "email": "marty@evenitron.com",
      "display_name": "Marty McFly"
    }
  ],
  "collaborator_groups": [
    {
      "name": "Technical Assistant Pool",
      "members": [
        { "sub": "acc_61815034636bd5c5ce4fwd" },
        { "sub": "acc_61815034636bd5c5ce48a4" },
        { "sub": "acc_61815034636bd5c5ce29c7" },
      ],
      "required": 1
    }
  ],
  "event": {
    "summary": "Driving lessons - Marty & Doc",
    "description": "Don't forget your video camera",
    "location": {
      "description": "Hill Valley"
    },
    "duration": {
      "minutes": 60
    },
    "locale": "en"
  },
  "tags": [
    { "value": "Urgent" },
    { "value": "In-person" }
  ]
}
```

#### Example Response
```http
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

{
  "scheduler_request": {
    "scheduler_request_id": "srq_64b17b558090ea21640c914a",
    "primary_select_url": "https://app.cronofy.com/r/234ebnd",
    "recipients": [
      {
        "email": "marty@evenitron.com",
        "display_name": "Marty McFly",
        "select_url": "https://app.cronofy.com/r/234ebnd"
      }
    ]
  }
}
```

#### Request Parameters
##### `data_center_url` *(required)*

The URL for the data center you want to communicate with. Possible choices are:

- `api-au.cronofy.com` - Australia
- `api-ca.cronofy.com` - Canada
- `api-de.cronofy.com` - Germany
- `api-sg.cronofy.com` - Singapore
- `api-uk.cronofy.com` - United Kingdom
- `api.cronofy.com` - United States

Find out more about [Cronofy's data centers](https://docs.cronofy.com/developers/data-centers/index.md).
##### `host.sub` *(optional)*

A [`String`](https://docs.cronofy.com/developers/api/data-types/index.md) value representing the `sub` for the Cronofy Account hosting the resulting event.

The value must represent a member of the Organizational Unit that the Application is linked to.

##### `recipients` *(required)*

An Array of recipients. Only one recipient is supported currently.

##### `recipients.email` *(required)*

A [`String`](https://docs.cronofy.com/developers/api/data-types/index.md) email address of the recipient of the Scheduler Request.

##### `recipients.display_name` *(optional)*

A [`String`](https://docs.cronofy.com/developers/api/data-types/index.md) value representing the name of the recipient.

##### `collaborator_groups` *(optional)*

One or more participants (people or resources) who's availability should be considered alongside the `host` and invited to the resulting calendar event.

The parameters marked **required** are only required if a group is specified.

##### `collaborator_groups.name` *(required)*

A name for the group that will be used when viewing the request in the Scheduler app.

##### `collaborator_groups.members.sub` *(required)*

The internal Cronofy ID for the group member, as an ASCII-only [`String`](https://docs.cronofy.com/developers/api/data-types/index.md).

Available from the [Organizational Unit Members](https://docs.cronofy.com/developers/api/organizations/organizational-unit-members/index.md) and [Organizational Unit Resources](https://docs.cronofy.com/developers/api/organizations/organizational-unit-resources/index.md) endpoints.

##### `collaborator_groups.required` *(required)*

Either a [`String`](https://docs.cronofy.com/developers/api/data-types/index.md) of `all` to specify that all `members` of the group need to be available for a period to be viable, or an [`Integer`](https://docs.cronofy.com/developers/api/data-types/index.md) to specify the minimum number of the group that must be available.

When selecting members to be included in the resulting calendar event, the system will respect the order of members as presented in the `collaborator_groups.members` parameter. So, in the case of `1` being required, the first available member for the time chosen will be used.

##### `event` *(required)*

An object with the details of the event you wish to push into the user’s selected calendar.

##### `event.summary` *(required)*

A [`String`](https://docs.cronofy.com/developers/api/data-types/index.md) of up to 1024 characters to use as the summary, sometimes referred to as the name, of the event.

##### `event.description` *(optional)*

A [`String`](https://docs.cronofy.com/developers/api/data-types/index.md) of up to 4096 characters to use as the description of the event that will get created in the calendar.

##### `event.location.description` *(optional)*

The plain text [`String`](https://docs.cronofy.com/developers/api/data-types/index.md) of up to 1024 characters describing the event's location.

##### `event.duration` *(optional)*

A [`Duration`](https://docs.cronofy.com/developers/api/data-types/index.md) value representing the duration of the event.

##### `event.locale` *(optional)*

A [`String`](https://docs.cronofy.com/developers/api/data-types/index.md) value for the locale to use when creating the event. This impacts the localization of generated or templated content added to the event, such as the "Reschedule or decline here:" footer link.

Supported locales are:

- `ar` Arabic

- `cs` Czech

- `cy` Welsh

- `de` German

- `en` US English (default)

- `es` Spanish

- `fr` French

- `fr-CA` Canadian French

- `he` Hebrew

- `it` Italian

- `ja` Japanese

- `nl` Dutch

- `pl` Polish

- `pt-BR` Brazilian Portuguese

- `ru` Russian

- `sv` Swedish

- `tr` Turkish

- `zh-CN` Simplified Chinese

##### `tags` *(optional)*

Array containing one or more tags to associate with the event.

Tags can be used for filtering Requests when viewing the Cronofy dashboard, and when marking events for counting towards [availability constraints](https://docs.cronofy.com/schedule/scheduling-and-booking/booking-limits/index.md).

`tags` is an array of objects, each [`Tag`](https://docs.cronofy.com/developers/api/data-types/index.md) has a `value`.
If a [`Tag`](https://docs.cronofy.com/developers/api/data-types/index.md) matching the provided `value` does not already exist, it will be created.

Tags have the following restrictions:

- no more than 32 tags

- tag value character limit is 64

- restricted characters currently include `;`

#### Response parameters
##### `scheduler_request_id`

Cronofy's unique identifier for the Scheduler Request [`String`](https://docs.cronofy.com/developers/api/data-types/index.md).

##### `recipients`

An Array of recipients. Only one recipient is supported currently.

##### `recipients.email`

A [`String`](https://docs.cronofy.com/developers/api/data-types/index.md) email address of the recipient of the Scheduler Request.

##### `recipients.display_name`

A [`String`](https://docs.cronofy.com/developers/api/data-types/index.md) value representing the name of the recipient.

##### `recipients.select_url`

A [`String`](https://docs.cronofy.com/developers/api/data-types/index.md) URL value for the recipient to visit in order to select a slot.


---
[Read in HTML](https://docs.cronofy.com/developers/api-alpha/scheduler-requests/create/)
