> Calendly developer docs. For page Markdown, append .md to any URL.
> Index: https://developer.calendly.com/llms.txt
> API catalog: https://developer.calendly.com/.well-known/api-catalog
> OpenAPI: https://developer.calendly.com/openapi/calendly-api.yaml
> OAuth authorization server: https://calendly.com/.well-known/oauth-authorization-server
> MCP protected resource: https://mcp.calendly.com/.well-known/oauth-protected-resource
> Scheduling MCP endpoint: https://mcp.calendly.com
> Docs search MCP: https://developer.calendly.com/_mcp/server

# Create One-Off Event Type

POST https://api.calendly.com/one_off_event_types
Content-Type: application/json

Creates One-Off Event Type

> `event_types:write`

Reference: https://developer.calendly.com/api-docs/calendly-api/event-types/create-one-off-event-type

## Authentication

- `Authorization` header (bearer token, required) — OAuth 2.0
- `Authorization` header (bearer token, required) — Personal Access Token

## Request

### Body (application/json)

This endpoint expects an object.

- `name` (string, required) — Event type name
- `host` (string, required) — Host user uri
- `duration` (double, required) — Duration of meeting in minutes
- `date_setting` (OneOffEventTypesPostRequestBodyContentApplicationJsonSchemaDateSetting, required)
- `co_hosts` (list of string, optional) — Collection of meeting co-host(s) user URIs
- `timezone` (string, optional) — Time zone used for meeting. Defaults to host's time zone.
- `location` (OneOffEventTypesPostRequestBodyContentApplicationJsonSchemaLocation, optional)

## Response

### 201

Created

- `resource` (EventType, required) — A configuration for an Event Type

## Errors

### 400 Bad Request Error

Request is not valid

- `title` (enum, required)
  - Allowed values: `Internal Server Error`
- `message` (enum, required)
  - Allowed values: `The server encountered an unexpected condition that prevented it from fulfilling the request.`
- `details` (list of ErrorResponseDetailsItem, optional)

### 401 Unauthorized Error

Cannot authenticate caller

- `title` (enum, required)
  - Allowed values: `Internal Server Error`
- `message` (enum, required)
  - Allowed values: `The server encountered an unexpected condition that prevented it from fulfilling the request.`
- `details` (list of ErrorResponseDetailsItem, optional)

### 403 Forbidden Error

Permission Denied or insufficient scope

- `Create-one-off-event-typeRequestForbiddenError`

### 404 Not Found Error

Requested resource not found

- `title` (enum, required)
  - Allowed values: `Internal Server Error`
- `message` (enum, required)
  - Allowed values: `The server encountered an unexpected condition that prevented it from fulfilling the request.`
- `details` (list of ErrorResponseDetailsItem, optional)

### 500 Internal Server Error

An error has occurred on the server

- `title` (enum, required)
  - Allowed values: `Internal Server Error`
- `message` (enum, required)
  - Allowed values: `The server encountered an unexpected condition that prevented it from fulfilling the request.`
- `details` (list of ErrorResponseDetailsItem, optional)

## Types

### OneOffEventTypesPostRequestBodyContentApplicationJsonSchemaDateSetting

### OneOffEventTypesPostRequestBodyContentApplicationJsonSchemaLocation

### EventType

A configuration for an Event Type

- `active` (boolean, required) — Indicates if the event is active or not.
- `admin_managed` (boolean, required) — Indicates if this event type is managed by an organization admin
- `booking_method` (enum, required) — Indicates if the event type is for a poll or an instant booking
  - Allowed values: `instant`, `poll`
- `color` (string, required) — The hexadecimal color value of the event type's scheduling page
- `created_at` (string, required) — The moment the event type was created (e.g. "2020-01-02T03:04:05.678123Z")
- `custom_questions` (list of EventTypeCustomQuestion, required)
- `deleted_at` (string, required, nullable) — The moment the event type was deleted (e.g. "2020-01-02T03:04:05.678123Z"). Since event types can be deleted but their scheduled events remain it's useful to fetch a deleted event type when you still require event type data for a scheduled event.
- `description_html` (string, required, nullable) — The event type's description (formatted with HTML)
- `description_plain` (string, required, nullable) — The event type's description (in non formatted text)
- `duration` (double, required) — The length of sessions booked with this event type
- `duration_options` (list of integer, required, nullable) — Array of duration options. Always null for adhoc event types.
- `internal_note` (string, required, nullable) — Contents of a note that may be associated with the event type
- `is_paid` (boolean, required)
- `kind` (enum, required) — Indicates if the event type is "solo" (belongs to an individual user) or "group"
  - Allowed values: `solo`, `group`
- `locale` (enum, required) — The locale on the event type, used to determine the language of the event type's scheduling page
  - Allowed values: `en`, `fr`, `es`, `de`, `nl`, `pt`, `it`, `uk`
- `locations` (list of LocationConfiguration, required, nullable) — Configuration information for each possible location for this Event Type
- `name` (string, required, nullable) — The event type name (in human-readable format)
- `pooling_type` (enum, required, nullable) — Indicates if the event type is "round robin" (alternates between hosts) or "collective" (invitees pick a time when all participants are available) or “multi-pool” (considers availability delineated by pools of participants) or "null" (the event type doesn’t consider the availability of a group participants)
  - Allowed values: `round_robin`, `collective`, `multi_pool`
- `position` (integer, required) — Position order of Event Type, starting with 0 (for display purposes)
- `profile` (Profile, required) — The publicly visible profile of a User or a Team that's associated with the Event Type (note: some Event Types don't have profiles)
- `scheduling_url` (string, required) — The URL of the user’s scheduling site where invitees book this event type
- `secret` (boolean, required) — Indicates if the event type is hidden on the owner's main scheduling page
- `slug` (string, required, nullable) — The portion of the event type's URL that identifies a specific web page (in a human-readable format)
- `type` (enum, required) — Indicates if the event type is "AdhocEventType" (ad hoc event) or "StandardEventType" (standard event type)
  - Allowed values: `StandardEventType`, `AdhocEventType`
- `updated_at` (string, required) — The moment the event type was last updated (e.g. "2020-01-02T03:04:05.678123Z")
- `uri` (string, required) — Canonical reference (unique identifier) for the event type

### ErrorResponseDetailsItem

- `message` (string, required)
- `parameter` (string, optional)
- `code` (string, optional)

### OneOffEventsError

Permission Denied

- `title` (enum, optional)
  - Allowed values: `Permission Denied`
- `message` (enum, optional)
  - Allowed values: `This user is not in your organization`, `You do not have permission`, `You do not have permission to access this resource.`
- `details` (list of OneOffEventsErrorDetailsItems, optional)

### InsufficientScopeError

Caller does not have required oauth scopes

- `title` (enum, required)
  - Allowed values: `Insufficient scope`
- `message` (enum, required)
  - Allowed values: `This operation requires the scopes listed in the 'required_scopes' array.`
- `required_scopes` (list of string, required)

### DateRange

Only allow scheduling within a specified date range

- `type` (enum, required)
  - Allowed values: `date_range`
- `start_date` (string, required) — Availability start - Must be before end_date. Format: YYYY-MM-DD
- `end_date` (string, required) — Availability end - Must be a date in the future and less than 365 days in the future from start_date. Format: YYYY-MM-DD

### DaysInFuture

Only allow scheduling for N days into the future from now

- `type` (enum, required)
  - Allowed values: `days_in_future`
- `days` (integer, required)
- `only_weekdays` (boolean, required) — Excludes weekends and only counts Monday - Friday

### Spots

Only allow scheduling with dedicated time spots

- `type` (enum, required)
  - Allowed values: `spots`
- `spots` (list of SpotsSpotsItems, required)

### AdhocCustomLocation

Information for a Custom Location

- `kind` (enum, required)
  - Allowed values: `custom`
- `location` (string, optional)

### AdhocGoogleConference

Information for a Google Conference

- `kind` (enum, required)
  - Allowed values: `google_conference`

### AdhocGotoMeetingConference

Information for a GotoMeeting Conference

- `kind` (enum, required)
  - Allowed values: `gotomeeting_conference`

### AdhocInPersonMeeting

Information for an In Person Meeting

- `kind` (enum, required)
  - Allowed values: `physical`
- `location` (string, optional)
- `additional_info` (string, optional)

### AdhocInboundCall

Information for an Inbound Call

- `kind` (enum, required)
  - Allowed values: `inbound_call`
- `phone_number` (string, required)
- `additional_info` (string, optional)

### AdhocInviteeSpecifiedLocation

Information for an Invitee Specified Location

- `kind` (enum, required)
  - Allowed values: `ask_invitee`
- `location` (string, optional)

### AdhocMicrosoftTeamsConference

Information for a Microsoft Teams Conference

- `kind` (enum, required)
  - Allowed values: `microsoft_teams_conference`

### AdhocOutboundCall

Information about an Outbound Call

- `kind` (enum, required)
  - Allowed values: `outbound_call`

### AdhocWebExConference

Information about a WebEx Conference

- `kind` (enum, required)
  - Allowed values: `webex_conference`

### AdhocZoomConference

Information about a Zoom Conference

- `kind` (enum, required)
  - Allowed values: `zoom_conference`

### EventTypeCustomQuestion

- `name` (string, required) — The custom question that the host created for the event type.
- `type` (enum, required) — The type of response that the invitee provides to the custom question; can be one or multiple lines of text, a phone number, or single- or multiple-select.
  - Allowed values: `string`, `text`, `phone_number`, `single_select`, `multi_select`
- `position` (integer, required) — The numerical position of the question on the event booking page after the name and email address fields.
- `enabled` (boolean, required) — true if the question created by the host is turned ON and visible on the event booking page; false if turned OFF and invisible on the event booking page.
- `required` (boolean, required) — true if a response to the question created by the host is required for invitees to book the event type; false if not required.
- `answer_choices` (list of string, required) — The invitee’s option(s) for single_select or multi_select type of responses.
- `include_other` (boolean, required) — true if the custom question lets invitees record a written response in addition to single-select or multiple-select type of responses; false if it doesn’t.

### LocationConfiguration

A configuration for an EventType's location

- `kind` (enum, optional)
  - Allowed values: `ask_invitee`, `custom`, `google_conference`, `gotomeeting_conference`, `inbound_call`, `microsoft_teams_conference`, `outbound_call`, `physical`, `webex_conference`, `zoom_conference`
- `location` (string, optional)
- `additional_info` (string, optional)
- `phone_number` (string, optional)

### Profile

The publicly visible profile of a User or a Team that's associated with the Event Type (note: some Event Types don't have profiles)

- `type` (enum, required) — Indicates if the profile belongs to a "user" (individual) or "team"
  - Allowed values: `User`, `Team`
- `name` (string, required) — Human-readable name for the profile of the user that's associated with the event type
- `owner` (string, required) — The unique reference to the user associated with the profile

### OneOffEventsErrorDetailsItems

- `parameter` (string, optional)
- `message` (string, optional)

### SpotsSpotsItems

- `start_time` (string, required) — The first time a spot can be scheduled
- `end_time` (string, required) — The last time a spot can be scheduled

## Examples

### Date range

**Request**

```json
{
  "name": "My Meeting",
  "host": "https://api.calendly.com/users/AAAAAAAAAAAAAAAA",
  "duration": 30,
  "date_setting": {
    "end_date": "2020-01-09",
    "start_date": "2020-01-07",
    "type": "date_range"
  },
  "co_hosts": [
    "https://api.calendly.com/users/BBBBBBBBBBBBBBBB",
    "https://api.calendly.com/users/CCCCCCCCCCCCCCCC"
  ],
  "timezone": "America/New_York",
  "location": {
    "additional_info": "Please check in at the front desk.",
    "kind": "physical",
    "location": "Main Office"
  }
}
```

**Response**

```json
{
  "resource": {
    "active": true,
    "admin_managed": false,
    "booking_method": "instant",
    "color": "#fff200",
    "created_at": "2019-01-02T03:04:05.678123Z",
    "custom_questions": [],
    "deleted_at": null,
    "description_html": "<p>Event type description</p>",
    "description_plain": "Event type description",
    "duration": 30,
    "duration_options": null,
    "internal_note": "Event type note",
    "is_paid": false,
    "kind": "solo",
    "locale": "en",
    "locations": [
      {
        "kind": "physical",
        "location": "Main Office",
        "additional_info": "Please check in at the front desk."
      }
    ],
    "name": "My Meeting",
    "pooling_type": "collective",
    "position": 0,
    "profile": {
      "type": "User",
      "name": "Tamara Jones",
      "owner": "https://api.calendly.com/users/AAAAAAAAAAAAAAAA"
    },
    "scheduling_url": "https://calendly.com/acmesales",
    "secret": true,
    "slug": "acmesales",
    "type": "AdhocEventType",
    "updated_at": "2019-08-07T06:05:04.321123Z",
    "uri": "https://api.calendly.com/event_types/AAAAAAAAAAAAAAAA"
  }
}
```

**SDK Code**

```python Date range
import requests

url = "https://api.calendly.com/one_off_event_types"

payload = {
    "name": "My Meeting",
    "host": "https://api.calendly.com/users/AAAAAAAAAAAAAAAA",
    "duration": 30,
    "date_setting": {
        "end_date": "2020-01-09",
        "start_date": "2020-01-07",
        "type": "date_range"
    },
    "co_hosts": ["https://api.calendly.com/users/BBBBBBBBBBBBBBBB", "https://api.calendly.com/users/CCCCCCCCCCCCCCCC"],
    "timezone": "America/New_York",
    "location": {
        "additional_info": "Please check in at the front desk.",
        "kind": "physical",
        "location": "Main Office"
    }
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Date range
const url = 'https://api.calendly.com/one_off_event_types';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"name":"My Meeting","host":"https://api.calendly.com/users/AAAAAAAAAAAAAAAA","duration":30,"date_setting":{"end_date":"2020-01-09","start_date":"2020-01-07","type":"date_range"},"co_hosts":["https://api.calendly.com/users/BBBBBBBBBBBBBBBB","https://api.calendly.com/users/CCCCCCCCCCCCCCCC"],"timezone":"America/New_York","location":{"additional_info":"Please check in at the front desk.","kind":"physical","location":"Main Office"}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Date range
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.calendly.com/one_off_event_types"

	payload := strings.NewReader("{\n  \"name\": \"My Meeting\",\n  \"host\": \"https://api.calendly.com/users/AAAAAAAAAAAAAAAA\",\n  \"duration\": 30,\n  \"date_setting\": {\n    \"end_date\": \"2020-01-09\",\n    \"start_date\": \"2020-01-07\",\n    \"type\": \"date_range\"\n  },\n  \"co_hosts\": [\n    \"https://api.calendly.com/users/BBBBBBBBBBBBBBBB\",\n    \"https://api.calendly.com/users/CCCCCCCCCCCCCCCC\"\n  ],\n  \"timezone\": \"America/New_York\",\n  \"location\": {\n    \"additional_info\": \"Please check in at the front desk.\",\n    \"kind\": \"physical\",\n    \"location\": \"Main Office\"\n  }\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Date range
require 'uri'
require 'net/http'

url = URI("https://api.calendly.com/one_off_event_types")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"name\": \"My Meeting\",\n  \"host\": \"https://api.calendly.com/users/AAAAAAAAAAAAAAAA\",\n  \"duration\": 30,\n  \"date_setting\": {\n    \"end_date\": \"2020-01-09\",\n    \"start_date\": \"2020-01-07\",\n    \"type\": \"date_range\"\n  },\n  \"co_hosts\": [\n    \"https://api.calendly.com/users/BBBBBBBBBBBBBBBB\",\n    \"https://api.calendly.com/users/CCCCCCCCCCCCCCCC\"\n  ],\n  \"timezone\": \"America/New_York\",\n  \"location\": {\n    \"additional_info\": \"Please check in at the front desk.\",\n    \"kind\": \"physical\",\n    \"location\": \"Main Office\"\n  }\n}"

response = http.request(request)
puts response.read_body
```

```java Date range
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.calendly.com/one_off_event_types")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"name\": \"My Meeting\",\n  \"host\": \"https://api.calendly.com/users/AAAAAAAAAAAAAAAA\",\n  \"duration\": 30,\n  \"date_setting\": {\n    \"end_date\": \"2020-01-09\",\n    \"start_date\": \"2020-01-07\",\n    \"type\": \"date_range\"\n  },\n  \"co_hosts\": [\n    \"https://api.calendly.com/users/BBBBBBBBBBBBBBBB\",\n    \"https://api.calendly.com/users/CCCCCCCCCCCCCCCC\"\n  ],\n  \"timezone\": \"America/New_York\",\n  \"location\": {\n    \"additional_info\": \"Please check in at the front desk.\",\n    \"kind\": \"physical\",\n    \"location\": \"Main Office\"\n  }\n}")
  .asString();
```

```php Date range
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.calendly.com/one_off_event_types', [
  'body' => '{
  "name": "My Meeting",
  "host": "https://api.calendly.com/users/AAAAAAAAAAAAAAAA",
  "duration": 30,
  "date_setting": {
    "end_date": "2020-01-09",
    "start_date": "2020-01-07",
    "type": "date_range"
  },
  "co_hosts": [
    "https://api.calendly.com/users/BBBBBBBBBBBBBBBB",
    "https://api.calendly.com/users/CCCCCCCCCCCCCCCC"
  ],
  "timezone": "America/New_York",
  "location": {
    "additional_info": "Please check in at the front desk.",
    "kind": "physical",
    "location": "Main Office"
  }
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp Date range
using RestSharp;

var client = new RestClient("https://api.calendly.com/one_off_event_types");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"name\": \"My Meeting\",\n  \"host\": \"https://api.calendly.com/users/AAAAAAAAAAAAAAAA\",\n  \"duration\": 30,\n  \"date_setting\": {\n    \"end_date\": \"2020-01-09\",\n    \"start_date\": \"2020-01-07\",\n    \"type\": \"date_range\"\n  },\n  \"co_hosts\": [\n    \"https://api.calendly.com/users/BBBBBBBBBBBBBBBB\",\n    \"https://api.calendly.com/users/CCCCCCCCCCCCCCCC\"\n  ],\n  \"timezone\": \"America/New_York\",\n  \"location\": {\n    \"additional_info\": \"Please check in at the front desk.\",\n    \"kind\": \"physical\",\n    \"location\": \"Main Office\"\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Date range
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "name": "My Meeting",
  "host": "https://api.calendly.com/users/AAAAAAAAAAAAAAAA",
  "duration": 30,
  "date_setting": [
    "end_date": "2020-01-09",
    "start_date": "2020-01-07",
    "type": "date_range"
  ],
  "co_hosts": ["https://api.calendly.com/users/BBBBBBBBBBBBBBBB", "https://api.calendly.com/users/CCCCCCCCCCCCCCCC"],
  "timezone": "America/New_York",
  "location": [
    "additional_info": "Please check in at the front desk.",
    "kind": "physical",
    "location": "Main Office"
  ]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.calendly.com/one_off_event_types")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Days in future

**Request**

```json
{
  "name": "My Meeting",
  "host": "https://api.calendly.com/users/AAAAAAAAAAAAAAAA",
  "duration": 30,
  "date_setting": {
    "days": 60,
    "only_weekdays": false,
    "type": "days_in_future"
  },
  "co_hosts": [
    "https://api.calendly.com/users/BBBBBBBBBBBBBBBB",
    "https://api.calendly.com/users/CCCCCCCCCCCCCCCC"
  ],
  "timezone": "America/New_York",
  "location": {
    "additional_info": "Please check in at the front desk.",
    "kind": "physical",
    "location": "Main Office"
  }
}
```

**Response**

```json
{
  "resource": {
    "active": true,
    "admin_managed": false,
    "booking_method": "instant",
    "color": "#fff200",
    "created_at": "2019-01-02T03:04:05.678123Z",
    "custom_questions": [],
    "deleted_at": null,
    "description_html": "<p>Event type description</p>",
    "description_plain": "Event type description",
    "duration": 30,
    "duration_options": null,
    "internal_note": "Event type note",
    "is_paid": false,
    "kind": "solo",
    "locale": "en",
    "locations": [
      {
        "kind": "physical",
        "location": "Main Office",
        "additional_info": "Please check in at the front desk."
      }
    ],
    "name": "My Meeting",
    "pooling_type": "collective",
    "position": 0,
    "profile": {
      "type": "User",
      "name": "Tamara Jones",
      "owner": "https://api.calendly.com/users/AAAAAAAAAAAAAAAA"
    },
    "scheduling_url": "https://calendly.com/acmesales",
    "secret": true,
    "slug": "acmesales",
    "type": "AdhocEventType",
    "updated_at": "2019-08-07T06:05:04.321123Z",
    "uri": "https://api.calendly.com/event_types/AAAAAAAAAAAAAAAA"
  }
}
```

**SDK Code**

```python Days in future
import requests

url = "https://api.calendly.com/one_off_event_types"

payload = {
    "name": "My Meeting",
    "host": "https://api.calendly.com/users/AAAAAAAAAAAAAAAA",
    "duration": 30,
    "date_setting": {
        "days": 60,
        "only_weekdays": False,
        "type": "days_in_future"
    },
    "co_hosts": ["https://api.calendly.com/users/BBBBBBBBBBBBBBBB", "https://api.calendly.com/users/CCCCCCCCCCCCCCCC"],
    "timezone": "America/New_York",
    "location": {
        "additional_info": "Please check in at the front desk.",
        "kind": "physical",
        "location": "Main Office"
    }
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Days in future
const url = 'https://api.calendly.com/one_off_event_types';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"name":"My Meeting","host":"https://api.calendly.com/users/AAAAAAAAAAAAAAAA","duration":30,"date_setting":{"days":60,"only_weekdays":false,"type":"days_in_future"},"co_hosts":["https://api.calendly.com/users/BBBBBBBBBBBBBBBB","https://api.calendly.com/users/CCCCCCCCCCCCCCCC"],"timezone":"America/New_York","location":{"additional_info":"Please check in at the front desk.","kind":"physical","location":"Main Office"}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Days in future
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.calendly.com/one_off_event_types"

	payload := strings.NewReader("{\n  \"name\": \"My Meeting\",\n  \"host\": \"https://api.calendly.com/users/AAAAAAAAAAAAAAAA\",\n  \"duration\": 30,\n  \"date_setting\": {\n    \"days\": 60,\n    \"only_weekdays\": false,\n    \"type\": \"days_in_future\"\n  },\n  \"co_hosts\": [\n    \"https://api.calendly.com/users/BBBBBBBBBBBBBBBB\",\n    \"https://api.calendly.com/users/CCCCCCCCCCCCCCCC\"\n  ],\n  \"timezone\": \"America/New_York\",\n  \"location\": {\n    \"additional_info\": \"Please check in at the front desk.\",\n    \"kind\": \"physical\",\n    \"location\": \"Main Office\"\n  }\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Days in future
require 'uri'
require 'net/http'

url = URI("https://api.calendly.com/one_off_event_types")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"name\": \"My Meeting\",\n  \"host\": \"https://api.calendly.com/users/AAAAAAAAAAAAAAAA\",\n  \"duration\": 30,\n  \"date_setting\": {\n    \"days\": 60,\n    \"only_weekdays\": false,\n    \"type\": \"days_in_future\"\n  },\n  \"co_hosts\": [\n    \"https://api.calendly.com/users/BBBBBBBBBBBBBBBB\",\n    \"https://api.calendly.com/users/CCCCCCCCCCCCCCCC\"\n  ],\n  \"timezone\": \"America/New_York\",\n  \"location\": {\n    \"additional_info\": \"Please check in at the front desk.\",\n    \"kind\": \"physical\",\n    \"location\": \"Main Office\"\n  }\n}"

response = http.request(request)
puts response.read_body
```

```java Days in future
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.calendly.com/one_off_event_types")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"name\": \"My Meeting\",\n  \"host\": \"https://api.calendly.com/users/AAAAAAAAAAAAAAAA\",\n  \"duration\": 30,\n  \"date_setting\": {\n    \"days\": 60,\n    \"only_weekdays\": false,\n    \"type\": \"days_in_future\"\n  },\n  \"co_hosts\": [\n    \"https://api.calendly.com/users/BBBBBBBBBBBBBBBB\",\n    \"https://api.calendly.com/users/CCCCCCCCCCCCCCCC\"\n  ],\n  \"timezone\": \"America/New_York\",\n  \"location\": {\n    \"additional_info\": \"Please check in at the front desk.\",\n    \"kind\": \"physical\",\n    \"location\": \"Main Office\"\n  }\n}")
  .asString();
```

```php Days in future
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.calendly.com/one_off_event_types', [
  'body' => '{
  "name": "My Meeting",
  "host": "https://api.calendly.com/users/AAAAAAAAAAAAAAAA",
  "duration": 30,
  "date_setting": {
    "days": 60,
    "only_weekdays": false,
    "type": "days_in_future"
  },
  "co_hosts": [
    "https://api.calendly.com/users/BBBBBBBBBBBBBBBB",
    "https://api.calendly.com/users/CCCCCCCCCCCCCCCC"
  ],
  "timezone": "America/New_York",
  "location": {
    "additional_info": "Please check in at the front desk.",
    "kind": "physical",
    "location": "Main Office"
  }
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp Days in future
using RestSharp;

var client = new RestClient("https://api.calendly.com/one_off_event_types");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"name\": \"My Meeting\",\n  \"host\": \"https://api.calendly.com/users/AAAAAAAAAAAAAAAA\",\n  \"duration\": 30,\n  \"date_setting\": {\n    \"days\": 60,\n    \"only_weekdays\": false,\n    \"type\": \"days_in_future\"\n  },\n  \"co_hosts\": [\n    \"https://api.calendly.com/users/BBBBBBBBBBBBBBBB\",\n    \"https://api.calendly.com/users/CCCCCCCCCCCCCCCC\"\n  ],\n  \"timezone\": \"America/New_York\",\n  \"location\": {\n    \"additional_info\": \"Please check in at the front desk.\",\n    \"kind\": \"physical\",\n    \"location\": \"Main Office\"\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Days in future
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "name": "My Meeting",
  "host": "https://api.calendly.com/users/AAAAAAAAAAAAAAAA",
  "duration": 30,
  "date_setting": [
    "days": 60,
    "only_weekdays": false,
    "type": "days_in_future"
  ],
  "co_hosts": ["https://api.calendly.com/users/BBBBBBBBBBBBBBBB", "https://api.calendly.com/users/CCCCCCCCCCCCCCCC"],
  "timezone": "America/New_York",
  "location": [
    "additional_info": "Please check in at the front desk.",
    "kind": "physical",
    "location": "Main Office"
  ]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.calendly.com/one_off_event_types")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Spots

**Request**

```json
{
  "name": "My Meeting",
  "host": "https://api.calendly.com/users/AAAAAAAAAAAAAAAA",
  "duration": 720,
  "date_setting": {
    "spots": [
      {
        "end_time": "2020-01-02T12:00:00.000000Z",
        "start_time": "2020-01-02T11:30:00.000000Z"
      }
    ],
    "type": "spots"
  },
  "co_hosts": [
    "http://example.com"
  ],
  "timezone": "America/New_York",
  "location": {
    "kind": "custom",
    "location": "Details will be provided upon booking."
  }
}
```

**Response**

```json
{
  "resource": {
    "active": true,
    "admin_managed": false,
    "booking_method": "instant",
    "color": "#fff200",
    "created_at": "2019-01-02T03:04:05.678123Z",
    "custom_questions": [],
    "deleted_at": null,
    "description_html": "<p>Event type description</p>",
    "description_plain": "Event type description",
    "duration": 720,
    "duration_options": null,
    "internal_note": "Event type note",
    "is_paid": false,
    "kind": "solo",
    "locale": "en",
    "locations": [
      {
        "kind": "custom",
        "location": "Details will be provided upon booking."
      }
    ],
    "name": "My Meeting",
    "pooling_type": "collective",
    "position": 0,
    "profile": {
      "type": "User",
      "name": "Tamara Jones",
      "owner": "https://api.calendly.com/users/AAAAAAAAAAAAAAAA"
    },
    "scheduling_url": "https://calendly.com/acmesales",
    "secret": true,
    "slug": "acmesales",
    "type": "AdhocEventType",
    "updated_at": "2019-08-07T06:05:04.321123Z",
    "uri": "https://api.calendly.com/event_types/AAAAAAAAAAAAAAAA"
  }
}
```

**SDK Code**

```python Spots
import requests

url = "https://api.calendly.com/one_off_event_types"

payload = {
    "name": "My Meeting",
    "host": "https://api.calendly.com/users/AAAAAAAAAAAAAAAA",
    "duration": 720,
    "date_setting": {
        "spots": [
            {
                "end_time": "2020-01-02T12:00:00.000000Z",
                "start_time": "2020-01-02T11:30:00.000000Z"
            }
        ],
        "type": "spots"
    },
    "co_hosts": ["http://example.com"],
    "timezone": "America/New_York",
    "location": {
        "kind": "custom",
        "location": "Details will be provided upon booking."
    }
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Spots
const url = 'https://api.calendly.com/one_off_event_types';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"name":"My Meeting","host":"https://api.calendly.com/users/AAAAAAAAAAAAAAAA","duration":720,"date_setting":{"spots":[{"end_time":"2020-01-02T12:00:00.000000Z","start_time":"2020-01-02T11:30:00.000000Z"}],"type":"spots"},"co_hosts":["http://example.com"],"timezone":"America/New_York","location":{"kind":"custom","location":"Details will be provided upon booking."}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Spots
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.calendly.com/one_off_event_types"

	payload := strings.NewReader("{\n  \"name\": \"My Meeting\",\n  \"host\": \"https://api.calendly.com/users/AAAAAAAAAAAAAAAA\",\n  \"duration\": 720,\n  \"date_setting\": {\n    \"spots\": [\n      {\n        \"end_time\": \"2020-01-02T12:00:00.000000Z\",\n        \"start_time\": \"2020-01-02T11:30:00.000000Z\"\n      }\n    ],\n    \"type\": \"spots\"\n  },\n  \"co_hosts\": [\n    \"http://example.com\"\n  ],\n  \"timezone\": \"America/New_York\",\n  \"location\": {\n    \"kind\": \"custom\",\n    \"location\": \"Details will be provided upon booking.\"\n  }\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Spots
require 'uri'
require 'net/http'

url = URI("https://api.calendly.com/one_off_event_types")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"name\": \"My Meeting\",\n  \"host\": \"https://api.calendly.com/users/AAAAAAAAAAAAAAAA\",\n  \"duration\": 720,\n  \"date_setting\": {\n    \"spots\": [\n      {\n        \"end_time\": \"2020-01-02T12:00:00.000000Z\",\n        \"start_time\": \"2020-01-02T11:30:00.000000Z\"\n      }\n    ],\n    \"type\": \"spots\"\n  },\n  \"co_hosts\": [\n    \"http://example.com\"\n  ],\n  \"timezone\": \"America/New_York\",\n  \"location\": {\n    \"kind\": \"custom\",\n    \"location\": \"Details will be provided upon booking.\"\n  }\n}"

response = http.request(request)
puts response.read_body
```

```java Spots
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.calendly.com/one_off_event_types")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"name\": \"My Meeting\",\n  \"host\": \"https://api.calendly.com/users/AAAAAAAAAAAAAAAA\",\n  \"duration\": 720,\n  \"date_setting\": {\n    \"spots\": [\n      {\n        \"end_time\": \"2020-01-02T12:00:00.000000Z\",\n        \"start_time\": \"2020-01-02T11:30:00.000000Z\"\n      }\n    ],\n    \"type\": \"spots\"\n  },\n  \"co_hosts\": [\n    \"http://example.com\"\n  ],\n  \"timezone\": \"America/New_York\",\n  \"location\": {\n    \"kind\": \"custom\",\n    \"location\": \"Details will be provided upon booking.\"\n  }\n}")
  .asString();
```

```php Spots
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.calendly.com/one_off_event_types', [
  'body' => '{
  "name": "My Meeting",
  "host": "https://api.calendly.com/users/AAAAAAAAAAAAAAAA",
  "duration": 720,
  "date_setting": {
    "spots": [
      {
        "end_time": "2020-01-02T12:00:00.000000Z",
        "start_time": "2020-01-02T11:30:00.000000Z"
      }
    ],
    "type": "spots"
  },
  "co_hosts": [
    "http://example.com"
  ],
  "timezone": "America/New_York",
  "location": {
    "kind": "custom",
    "location": "Details will be provided upon booking."
  }
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp Spots
using RestSharp;

var client = new RestClient("https://api.calendly.com/one_off_event_types");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"name\": \"My Meeting\",\n  \"host\": \"https://api.calendly.com/users/AAAAAAAAAAAAAAAA\",\n  \"duration\": 720,\n  \"date_setting\": {\n    \"spots\": [\n      {\n        \"end_time\": \"2020-01-02T12:00:00.000000Z\",\n        \"start_time\": \"2020-01-02T11:30:00.000000Z\"\n      }\n    ],\n    \"type\": \"spots\"\n  },\n  \"co_hosts\": [\n    \"http://example.com\"\n  ],\n  \"timezone\": \"America/New_York\",\n  \"location\": {\n    \"kind\": \"custom\",\n    \"location\": \"Details will be provided upon booking.\"\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Spots
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "name": "My Meeting",
  "host": "https://api.calendly.com/users/AAAAAAAAAAAAAAAA",
  "duration": 720,
  "date_setting": [
    "spots": [
      [
        "end_time": "2020-01-02T12:00:00.000000Z",
        "start_time": "2020-01-02T11:30:00.000000Z"
      ]
    ],
    "type": "spots"
  ],
  "co_hosts": ["http://example.com"],
  "timezone": "America/New_York",
  "location": [
    "kind": "custom",
    "location": "Details will be provided upon booking."
  ]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.calendly.com/one_off_event_types")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```