Create Events
curl --request POST \
--url https://{primary_domain}/api/public/v2.0/calendars/{calendar_id}/events \
--header 'Content-Type: application/json' \
--header 'X-Access-Key-Id: <api-key>' \
--header 'X-Access-Key-Secret: <api-key>' \
--data '
{
"title": "<string>",
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z",
"attendees": [
{
"email": "jsmith@example.com",
"name": "<string>"
}
],
"body": "<string>",
"location": "<string>"
}
'import requests
url = "https://{primary_domain}/api/public/v2.0/calendars/{calendar_id}/events"
payload = {
"title": "<string>",
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z",
"attendees": [
{
"email": "jsmith@example.com",
"name": "<string>"
}
],
"body": "<string>",
"location": "<string>"
}
headers = {
"X-Access-Key-Id": "<api-key>",
"X-Access-Key-Secret": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Access-Key-Id': '<api-key>',
'X-Access-Key-Secret': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
title: '<string>',
start: '2023-11-07T05:31:56Z',
end: '2023-11-07T05:31:56Z',
attendees: [{email: 'jsmith@example.com', name: '<string>'}],
body: JSON.stringify('<string>'),
location: '<string>'
})
};
fetch('https://{primary_domain}/api/public/v2.0/calendars/{calendar_id}/events', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{primary_domain}/api/public/v2.0/calendars/{calendar_id}/events",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'title' => '<string>',
'start' => '2023-11-07T05:31:56Z',
'end' => '2023-11-07T05:31:56Z',
'attendees' => [
[
'email' => 'jsmith@example.com',
'name' => '<string>'
]
],
'body' => '<string>',
'location' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Access-Key-Id: <api-key>",
"X-Access-Key-Secret: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{primary_domain}/api/public/v2.0/calendars/{calendar_id}/events"
payload := strings.NewReader("{\n \"title\": \"<string>\",\n \"start\": \"2023-11-07T05:31:56Z\",\n \"end\": \"2023-11-07T05:31:56Z\",\n \"attendees\": [\n {\n \"email\": \"jsmith@example.com\",\n \"name\": \"<string>\"\n }\n ],\n \"body\": \"<string>\",\n \"location\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Access-Key-Id", "<api-key>")
req.Header.Add("X-Access-Key-Secret", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{primary_domain}/api/public/v2.0/calendars/{calendar_id}/events")
.header("X-Access-Key-Id", "<api-key>")
.header("X-Access-Key-Secret", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"<string>\",\n \"start\": \"2023-11-07T05:31:56Z\",\n \"end\": \"2023-11-07T05:31:56Z\",\n \"attendees\": [\n {\n \"email\": \"jsmith@example.com\",\n \"name\": \"<string>\"\n }\n ],\n \"body\": \"<string>\",\n \"location\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{primary_domain}/api/public/v2.0/calendars/{calendar_id}/events")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Access-Key-Id"] = '<api-key>'
request["X-Access-Key-Secret"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"title\": \"<string>\",\n \"start\": \"2023-11-07T05:31:56Z\",\n \"end\": \"2023-11-07T05:31:56Z\",\n \"attendees\": [\n {\n \"email\": \"jsmith@example.com\",\n \"name\": \"<string>\"\n }\n ],\n \"body\": \"<string>\",\n \"location\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"message": "<string>",
"data": {
"id": 123,
"calendar_id": 123,
"title": "<string>",
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z",
"attendees": [
{
"email": "jsmith@example.com",
"name": "<string>",
"is_organizer": true,
"customer_id": 123,
"calendar_id": 123
}
],
"body": "<string>",
"location": "<string>",
"cancel_note": "<string>",
"canceled_by_id": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z",
"public_id": "<string>",
"provider_event_id": "<string>",
"customer_id": 123,
"meeting_link_id": 123,
"online_conference": {
"id": 123,
"online_conference_account_id": 123,
"public_id": "<string>",
"title": "<string>",
"is_public": true,
"deleted_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"backer_event_id": 123,
"is_occurred": true,
"started_at": "2023-11-07T05:31:56Z",
"ended_at": "2023-11-07T05:31:56Z"
}
}
}{
"message": "<string>",
"errors": {
"attribute": [
"The {attribute} field is required."
]
}
}"Invalid or missing access key.""Too many requests.""An unexpected error occurred."Events
Create Events
Required permissions: events.create.*
POST
/
calendars
/
{calendar_id}
/
events
Create Events
curl --request POST \
--url https://{primary_domain}/api/public/v2.0/calendars/{calendar_id}/events \
--header 'Content-Type: application/json' \
--header 'X-Access-Key-Id: <api-key>' \
--header 'X-Access-Key-Secret: <api-key>' \
--data '
{
"title": "<string>",
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z",
"attendees": [
{
"email": "jsmith@example.com",
"name": "<string>"
}
],
"body": "<string>",
"location": "<string>"
}
'import requests
url = "https://{primary_domain}/api/public/v2.0/calendars/{calendar_id}/events"
payload = {
"title": "<string>",
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z",
"attendees": [
{
"email": "jsmith@example.com",
"name": "<string>"
}
],
"body": "<string>",
"location": "<string>"
}
headers = {
"X-Access-Key-Id": "<api-key>",
"X-Access-Key-Secret": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Access-Key-Id': '<api-key>',
'X-Access-Key-Secret': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
title: '<string>',
start: '2023-11-07T05:31:56Z',
end: '2023-11-07T05:31:56Z',
attendees: [{email: 'jsmith@example.com', name: '<string>'}],
body: JSON.stringify('<string>'),
location: '<string>'
})
};
fetch('https://{primary_domain}/api/public/v2.0/calendars/{calendar_id}/events', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{primary_domain}/api/public/v2.0/calendars/{calendar_id}/events",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'title' => '<string>',
'start' => '2023-11-07T05:31:56Z',
'end' => '2023-11-07T05:31:56Z',
'attendees' => [
[
'email' => 'jsmith@example.com',
'name' => '<string>'
]
],
'body' => '<string>',
'location' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Access-Key-Id: <api-key>",
"X-Access-Key-Secret: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{primary_domain}/api/public/v2.0/calendars/{calendar_id}/events"
payload := strings.NewReader("{\n \"title\": \"<string>\",\n \"start\": \"2023-11-07T05:31:56Z\",\n \"end\": \"2023-11-07T05:31:56Z\",\n \"attendees\": [\n {\n \"email\": \"jsmith@example.com\",\n \"name\": \"<string>\"\n }\n ],\n \"body\": \"<string>\",\n \"location\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Access-Key-Id", "<api-key>")
req.Header.Add("X-Access-Key-Secret", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{primary_domain}/api/public/v2.0/calendars/{calendar_id}/events")
.header("X-Access-Key-Id", "<api-key>")
.header("X-Access-Key-Secret", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"<string>\",\n \"start\": \"2023-11-07T05:31:56Z\",\n \"end\": \"2023-11-07T05:31:56Z\",\n \"attendees\": [\n {\n \"email\": \"jsmith@example.com\",\n \"name\": \"<string>\"\n }\n ],\n \"body\": \"<string>\",\n \"location\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{primary_domain}/api/public/v2.0/calendars/{calendar_id}/events")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Access-Key-Id"] = '<api-key>'
request["X-Access-Key-Secret"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"title\": \"<string>\",\n \"start\": \"2023-11-07T05:31:56Z\",\n \"end\": \"2023-11-07T05:31:56Z\",\n \"attendees\": [\n {\n \"email\": \"jsmith@example.com\",\n \"name\": \"<string>\"\n }\n ],\n \"body\": \"<string>\",\n \"location\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"message": "<string>",
"data": {
"id": 123,
"calendar_id": 123,
"title": "<string>",
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z",
"attendees": [
{
"email": "jsmith@example.com",
"name": "<string>",
"is_organizer": true,
"customer_id": 123,
"calendar_id": 123
}
],
"body": "<string>",
"location": "<string>",
"cancel_note": "<string>",
"canceled_by_id": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z",
"public_id": "<string>",
"provider_event_id": "<string>",
"customer_id": 123,
"meeting_link_id": 123,
"online_conference": {
"id": 123,
"online_conference_account_id": 123,
"public_id": "<string>",
"title": "<string>",
"is_public": true,
"deleted_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"backer_event_id": 123,
"is_occurred": true,
"started_at": "2023-11-07T05:31:56Z",
"ended_at": "2023-11-07T05:31:56Z"
}
}
}{
"message": "<string>",
"errors": {
"attribute": [
"The {attribute} field is required."
]
}
}"Invalid or missing access key.""Too many requests.""An unexpected error occurred."Body
application/json
⌘I