Create a calendar event in a community
curl --request POST \
--url https://api.cope.com/v1/community/communities/{id}/events \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"end_time": "2023-11-07T05:31:56Z",
"start_time": "2023-11-07T05:31:56Z",
"title": "<string>",
"allow_guests": true,
"cover_image_url": "<string>",
"currency": "<string>",
"description": "<string>",
"enable_waitlist": true,
"event_url": "<string>",
"is_recurring": true,
"location": "<string>",
"max_capacity": 123,
"price_minor": 123,
"recurring_end_date": "2023-11-07T05:31:56Z",
"recurring_pattern": "<string>",
"rsvp_deadline": "2023-11-07T05:31:56Z",
"timezone": "<string>"
}
'import requests
url = "https://api.cope.com/v1/community/communities/{id}/events"
payload = {
"end_time": "2023-11-07T05:31:56Z",
"start_time": "2023-11-07T05:31:56Z",
"title": "<string>",
"allow_guests": True,
"cover_image_url": "<string>",
"currency": "<string>",
"description": "<string>",
"enable_waitlist": True,
"event_url": "<string>",
"is_recurring": True,
"location": "<string>",
"max_capacity": 123,
"price_minor": 123,
"recurring_end_date": "2023-11-07T05:31:56Z",
"recurring_pattern": "<string>",
"rsvp_deadline": "2023-11-07T05:31:56Z",
"timezone": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
end_time: '2023-11-07T05:31:56Z',
start_time: '2023-11-07T05:31:56Z',
title: '<string>',
allow_guests: true,
cover_image_url: '<string>',
currency: '<string>',
description: '<string>',
enable_waitlist: true,
event_url: '<string>',
is_recurring: true,
location: '<string>',
max_capacity: 123,
price_minor: 123,
recurring_end_date: '2023-11-07T05:31:56Z',
recurring_pattern: '<string>',
rsvp_deadline: '2023-11-07T05:31:56Z',
timezone: '<string>'
})
};
fetch('https://api.cope.com/v1/community/communities/{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://api.cope.com/v1/community/communities/{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([
'end_time' => '2023-11-07T05:31:56Z',
'start_time' => '2023-11-07T05:31:56Z',
'title' => '<string>',
'allow_guests' => true,
'cover_image_url' => '<string>',
'currency' => '<string>',
'description' => '<string>',
'enable_waitlist' => true,
'event_url' => '<string>',
'is_recurring' => true,
'location' => '<string>',
'max_capacity' => 123,
'price_minor' => 123,
'recurring_end_date' => '2023-11-07T05:31:56Z',
'recurring_pattern' => '<string>',
'rsvp_deadline' => '2023-11-07T05:31:56Z',
'timezone' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://api.cope.com/v1/community/communities/{id}/events"
payload := strings.NewReader("{\n \"end_time\": \"2023-11-07T05:31:56Z\",\n \"start_time\": \"2023-11-07T05:31:56Z\",\n \"title\": \"<string>\",\n \"allow_guests\": true,\n \"cover_image_url\": \"<string>\",\n \"currency\": \"<string>\",\n \"description\": \"<string>\",\n \"enable_waitlist\": true,\n \"event_url\": \"<string>\",\n \"is_recurring\": true,\n \"location\": \"<string>\",\n \"max_capacity\": 123,\n \"price_minor\": 123,\n \"recurring_end_date\": \"2023-11-07T05:31:56Z\",\n \"recurring_pattern\": \"<string>\",\n \"rsvp_deadline\": \"2023-11-07T05:31:56Z\",\n \"timezone\": \"<string>\"\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(string(body))
}HttpResponse<String> response = Unirest.post("https://api.cope.com/v1/community/communities/{id}/events")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"end_time\": \"2023-11-07T05:31:56Z\",\n \"start_time\": \"2023-11-07T05:31:56Z\",\n \"title\": \"<string>\",\n \"allow_guests\": true,\n \"cover_image_url\": \"<string>\",\n \"currency\": \"<string>\",\n \"description\": \"<string>\",\n \"enable_waitlist\": true,\n \"event_url\": \"<string>\",\n \"is_recurring\": true,\n \"location\": \"<string>\",\n \"max_capacity\": 123,\n \"price_minor\": 123,\n \"recurring_end_date\": \"2023-11-07T05:31:56Z\",\n \"recurring_pattern\": \"<string>\",\n \"rsvp_deadline\": \"2023-11-07T05:31:56Z\",\n \"timezone\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cope.com/v1/community/communities/{id}/events")
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 \"end_time\": \"2023-11-07T05:31:56Z\",\n \"start_time\": \"2023-11-07T05:31:56Z\",\n \"title\": \"<string>\",\n \"allow_guests\": true,\n \"cover_image_url\": \"<string>\",\n \"currency\": \"<string>\",\n \"description\": \"<string>\",\n \"enable_waitlist\": true,\n \"event_url\": \"<string>\",\n \"is_recurring\": true,\n \"location\": \"<string>\",\n \"max_capacity\": 123,\n \"price_minor\": 123,\n \"recurring_end_date\": \"2023-11-07T05:31:56Z\",\n \"recurring_pattern\": \"<string>\",\n \"rsvp_deadline\": \"2023-11-07T05:31:56Z\",\n \"timezone\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {}
}{
"code": "<string>",
"errors": [
{
"code": "<string>",
"detail": "<string>",
"field": "<string>"
}
],
"status": 123,
"title": "<string>",
"type": "<string>",
"detail": "<string>",
"request_id": "<string>"
}{
"code": "<string>",
"errors": [
{
"code": "<string>",
"detail": "<string>",
"field": "<string>"
}
],
"status": 123,
"title": "<string>",
"type": "<string>",
"detail": "<string>",
"request_id": "<string>"
}{
"code": "<string>",
"errors": [
{
"code": "<string>",
"detail": "<string>",
"field": "<string>"
}
],
"status": 123,
"title": "<string>",
"type": "<string>",
"detail": "<string>",
"request_id": "<string>"
}{
"code": "<string>",
"errors": [
{
"code": "<string>",
"detail": "<string>",
"field": "<string>"
}
],
"status": 123,
"title": "<string>",
"type": "<string>",
"detail": "<string>",
"request_id": "<string>"
}{
"code": "<string>",
"errors": [
{
"code": "<string>",
"detail": "<string>",
"field": "<string>"
}
],
"status": 123,
"title": "<string>",
"type": "<string>",
"detail": "<string>",
"request_id": "<string>"
}Create a calendar event in a community
POST
/
v1
/
community
/
communities
/
{id}
/
events
Create a calendar event in a community
curl --request POST \
--url https://api.cope.com/v1/community/communities/{id}/events \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"end_time": "2023-11-07T05:31:56Z",
"start_time": "2023-11-07T05:31:56Z",
"title": "<string>",
"allow_guests": true,
"cover_image_url": "<string>",
"currency": "<string>",
"description": "<string>",
"enable_waitlist": true,
"event_url": "<string>",
"is_recurring": true,
"location": "<string>",
"max_capacity": 123,
"price_minor": 123,
"recurring_end_date": "2023-11-07T05:31:56Z",
"recurring_pattern": "<string>",
"rsvp_deadline": "2023-11-07T05:31:56Z",
"timezone": "<string>"
}
'import requests
url = "https://api.cope.com/v1/community/communities/{id}/events"
payload = {
"end_time": "2023-11-07T05:31:56Z",
"start_time": "2023-11-07T05:31:56Z",
"title": "<string>",
"allow_guests": True,
"cover_image_url": "<string>",
"currency": "<string>",
"description": "<string>",
"enable_waitlist": True,
"event_url": "<string>",
"is_recurring": True,
"location": "<string>",
"max_capacity": 123,
"price_minor": 123,
"recurring_end_date": "2023-11-07T05:31:56Z",
"recurring_pattern": "<string>",
"rsvp_deadline": "2023-11-07T05:31:56Z",
"timezone": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
end_time: '2023-11-07T05:31:56Z',
start_time: '2023-11-07T05:31:56Z',
title: '<string>',
allow_guests: true,
cover_image_url: '<string>',
currency: '<string>',
description: '<string>',
enable_waitlist: true,
event_url: '<string>',
is_recurring: true,
location: '<string>',
max_capacity: 123,
price_minor: 123,
recurring_end_date: '2023-11-07T05:31:56Z',
recurring_pattern: '<string>',
rsvp_deadline: '2023-11-07T05:31:56Z',
timezone: '<string>'
})
};
fetch('https://api.cope.com/v1/community/communities/{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://api.cope.com/v1/community/communities/{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([
'end_time' => '2023-11-07T05:31:56Z',
'start_time' => '2023-11-07T05:31:56Z',
'title' => '<string>',
'allow_guests' => true,
'cover_image_url' => '<string>',
'currency' => '<string>',
'description' => '<string>',
'enable_waitlist' => true,
'event_url' => '<string>',
'is_recurring' => true,
'location' => '<string>',
'max_capacity' => 123,
'price_minor' => 123,
'recurring_end_date' => '2023-11-07T05:31:56Z',
'recurring_pattern' => '<string>',
'rsvp_deadline' => '2023-11-07T05:31:56Z',
'timezone' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://api.cope.com/v1/community/communities/{id}/events"
payload := strings.NewReader("{\n \"end_time\": \"2023-11-07T05:31:56Z\",\n \"start_time\": \"2023-11-07T05:31:56Z\",\n \"title\": \"<string>\",\n \"allow_guests\": true,\n \"cover_image_url\": \"<string>\",\n \"currency\": \"<string>\",\n \"description\": \"<string>\",\n \"enable_waitlist\": true,\n \"event_url\": \"<string>\",\n \"is_recurring\": true,\n \"location\": \"<string>\",\n \"max_capacity\": 123,\n \"price_minor\": 123,\n \"recurring_end_date\": \"2023-11-07T05:31:56Z\",\n \"recurring_pattern\": \"<string>\",\n \"rsvp_deadline\": \"2023-11-07T05:31:56Z\",\n \"timezone\": \"<string>\"\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(string(body))
}HttpResponse<String> response = Unirest.post("https://api.cope.com/v1/community/communities/{id}/events")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"end_time\": \"2023-11-07T05:31:56Z\",\n \"start_time\": \"2023-11-07T05:31:56Z\",\n \"title\": \"<string>\",\n \"allow_guests\": true,\n \"cover_image_url\": \"<string>\",\n \"currency\": \"<string>\",\n \"description\": \"<string>\",\n \"enable_waitlist\": true,\n \"event_url\": \"<string>\",\n \"is_recurring\": true,\n \"location\": \"<string>\",\n \"max_capacity\": 123,\n \"price_minor\": 123,\n \"recurring_end_date\": \"2023-11-07T05:31:56Z\",\n \"recurring_pattern\": \"<string>\",\n \"rsvp_deadline\": \"2023-11-07T05:31:56Z\",\n \"timezone\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cope.com/v1/community/communities/{id}/events")
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 \"end_time\": \"2023-11-07T05:31:56Z\",\n \"start_time\": \"2023-11-07T05:31:56Z\",\n \"title\": \"<string>\",\n \"allow_guests\": true,\n \"cover_image_url\": \"<string>\",\n \"currency\": \"<string>\",\n \"description\": \"<string>\",\n \"enable_waitlist\": true,\n \"event_url\": \"<string>\",\n \"is_recurring\": true,\n \"location\": \"<string>\",\n \"max_capacity\": 123,\n \"price_minor\": 123,\n \"recurring_end_date\": \"2023-11-07T05:31:56Z\",\n \"recurring_pattern\": \"<string>\",\n \"rsvp_deadline\": \"2023-11-07T05:31:56Z\",\n \"timezone\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {}
}{
"code": "<string>",
"errors": [
{
"code": "<string>",
"detail": "<string>",
"field": "<string>"
}
],
"status": 123,
"title": "<string>",
"type": "<string>",
"detail": "<string>",
"request_id": "<string>"
}{
"code": "<string>",
"errors": [
{
"code": "<string>",
"detail": "<string>",
"field": "<string>"
}
],
"status": 123,
"title": "<string>",
"type": "<string>",
"detail": "<string>",
"request_id": "<string>"
}{
"code": "<string>",
"errors": [
{
"code": "<string>",
"detail": "<string>",
"field": "<string>"
}
],
"status": 123,
"title": "<string>",
"type": "<string>",
"detail": "<string>",
"request_id": "<string>"
}{
"code": "<string>",
"errors": [
{
"code": "<string>",
"detail": "<string>",
"field": "<string>"
}
],
"status": 123,
"title": "<string>",
"type": "<string>",
"detail": "<string>",
"request_id": "<string>"
}{
"code": "<string>",
"errors": [
{
"code": "<string>",
"detail": "<string>",
"field": "<string>"
}
],
"status": 123,
"title": "<string>",
"type": "<string>",
"detail": "<string>",
"request_id": "<string>"
}Authorizations
Bearer credential for the public API. Send a live COPE API key (cope_sk_live_*), or a Clerk session token when acting as a signed-in user. Community operations are scoped to the authenticated user; include X-Cope-Business-Id to act on behalf of a specific business you own.
Path Parameters
Pattern:
^[A-Za-z0-9_-]+$Body
application/json
Minimum string length:
1Pattern:
^[A-Z]{3}$Available options:
meeting, workshop, webinar, q_and_a, social, deadline, office_hours, other Response
Created event
Was this page helpful?
⌘I