Update event
curl --request PATCH \
--url https://api.perscom.io/{version}/events/{event} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"calendar_id": 123,
"all_day": false,
"starts": "2023-11-07T05:31:56Z",
"ends": "2023-11-07T05:31:56Z",
"repeats": false,
"registration_enabled": true,
"notifications_enabled": true,
"description": "<string>",
"content": "<string>",
"location": "<string>",
"url": "<string>",
"author_id": 123,
"registration_deadline": "2023-11-07T05:31:56Z",
"notifications_interval": [],
"notifications_channels": []
}
'import requests
url = "https://api.perscom.io/{version}/events/{event}"
payload = {
"name": "<string>",
"calendar_id": 123,
"all_day": False,
"starts": "2023-11-07T05:31:56Z",
"ends": "2023-11-07T05:31:56Z",
"repeats": False,
"registration_enabled": True,
"notifications_enabled": True,
"description": "<string>",
"content": "<string>",
"location": "<string>",
"url": "<string>",
"author_id": 123,
"registration_deadline": "2023-11-07T05:31:56Z",
"notifications_interval": [],
"notifications_channels": []
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
calendar_id: 123,
all_day: false,
starts: '2023-11-07T05:31:56Z',
ends: '2023-11-07T05:31:56Z',
repeats: false,
registration_enabled: true,
notifications_enabled: true,
description: '<string>',
content: '<string>',
location: '<string>',
url: '<string>',
author_id: 123,
registration_deadline: '2023-11-07T05:31:56Z',
notifications_interval: [],
notifications_channels: []
})
};
fetch('https://api.perscom.io/{version}/events/{event}', 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.perscom.io/{version}/events/{event}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'calendar_id' => 123,
'all_day' => false,
'starts' => '2023-11-07T05:31:56Z',
'ends' => '2023-11-07T05:31:56Z',
'repeats' => false,
'registration_enabled' => true,
'notifications_enabled' => true,
'description' => '<string>',
'content' => '<string>',
'location' => '<string>',
'url' => '<string>',
'author_id' => 123,
'registration_deadline' => '2023-11-07T05:31:56Z',
'notifications_interval' => [
],
'notifications_channels' => [
]
]),
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.perscom.io/{version}/events/{event}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"calendar_id\": 123,\n \"all_day\": false,\n \"starts\": \"2023-11-07T05:31:56Z\",\n \"ends\": \"2023-11-07T05:31:56Z\",\n \"repeats\": false,\n \"registration_enabled\": true,\n \"notifications_enabled\": true,\n \"description\": \"<string>\",\n \"content\": \"<string>\",\n \"location\": \"<string>\",\n \"url\": \"<string>\",\n \"author_id\": 123,\n \"registration_deadline\": \"2023-11-07T05:31:56Z\",\n \"notifications_interval\": [],\n \"notifications_channels\": []\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.perscom.io/{version}/events/{event}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"calendar_id\": 123,\n \"all_day\": false,\n \"starts\": \"2023-11-07T05:31:56Z\",\n \"ends\": \"2023-11-07T05:31:56Z\",\n \"repeats\": false,\n \"registration_enabled\": true,\n \"notifications_enabled\": true,\n \"description\": \"<string>\",\n \"content\": \"<string>\",\n \"location\": \"<string>\",\n \"url\": \"<string>\",\n \"author_id\": 123,\n \"registration_deadline\": \"2023-11-07T05:31:56Z\",\n \"notifications_interval\": [],\n \"notifications_channels\": []\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.perscom.io/{version}/events/{event}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"calendar_id\": 123,\n \"all_day\": false,\n \"starts\": \"2023-11-07T05:31:56Z\",\n \"ends\": \"2023-11-07T05:31:56Z\",\n \"repeats\": false,\n \"registration_enabled\": true,\n \"notifications_enabled\": true,\n \"description\": \"<string>\",\n \"content\": \"<string>\",\n \"location\": \"<string>\",\n \"url\": \"<string>\",\n \"author_id\": 123,\n \"registration_deadline\": \"2023-11-07T05:31:56Z\",\n \"notifications_interval\": [],\n \"notifications_channels\": []\n}"
response = http.request(request)
puts response.read_body{
"data": {
"name": "<string>",
"calendar_id": 123,
"all_day": false,
"starts": "2023-11-07T05:31:56Z",
"ends": "2023-11-07T05:31:56Z",
"repeats": false,
"registration_enabled": true,
"notifications_enabled": true,
"id": 123,
"description": "<string>",
"content": "<string>",
"location": "<string>",
"url": "<string>",
"author_id": 123,
"registration_deadline": "2023-11-07T05:31:56Z",
"notifications_interval": [],
"notifications_channels": [],
"label": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"error": {
"message": "You are not authenticated. Please provide a valid API key that contains your PERSCOM ID to continue.",
"type": "AuthenticationException",
"request_id": "550e8400-e29b-41d4-a716-446655440000",
"trace_id": "6ba7b810-9dad-11d1-80b4-00c04fd430c8"
}
}{
"error": {
"message": "A valid subscription is required to complete this request.",
"type": "HttpException",
"request_id": "550e8400-e29b-41d4-a716-446655440000",
"trace_id": "6ba7b810-9dad-11d1-80b4-00c04fd430c8"
}
}{
"error": {
"message": "The API key provided does not have the correct permissions and/or scopes to perform the requested action.",
"type": "HttpException",
"request_id": "550e8400-e29b-41d4-a716-446655440000",
"trace_id": "6ba7b810-9dad-11d1-80b4-00c04fd430c8"
}
}{
"error": {
"message": "The requested resource or endpoint could not be found.",
"type": "NotFoundHttpException",
"request_id": "550e8400-e29b-41d4-a716-446655440000",
"trace_id": "6ba7b810-9dad-11d1-80b4-00c04fd430c8"
}
}{
"error": {
"message": "The [field] is [required|invalid|etc].",
"type": "ValidationException",
"errors": {
"email": [
"The email field is required.",
"The email must be a valid email address."
],
"password": [
"The password must be at least 8 characters.",
"The password must contain at least one uppercase letter."
]
},
"request_id": "550e8400-e29b-41d4-a716-446655440000",
"trace_id": "6ba7b810-9dad-11d1-80b4-00c04fd430c8"
}
}{
"error": {
"message": "You have exceeded the API rate limit. Please wait a minute before trying again.",
"type": "ThrottleRequestsException",
"request_id": "550e8400-e29b-41d4-a716-446655440000",
"trace_id": "6ba7b810-9dad-11d1-80b4-00c04fd430c8"
}
}{
"error": {
"message": "The API is currently down for maintenance. Please check back later.",
"type": "HttpException",
"request_id": "550e8400-e29b-41d4-a716-446655440000",
"trace_id": "6ba7b810-9dad-11d1-80b4-00c04fd430c8"
}
}Events
Update event
PATCH
/
{version}
/
events
/
{event}
Update event
curl --request PATCH \
--url https://api.perscom.io/{version}/events/{event} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"calendar_id": 123,
"all_day": false,
"starts": "2023-11-07T05:31:56Z",
"ends": "2023-11-07T05:31:56Z",
"repeats": false,
"registration_enabled": true,
"notifications_enabled": true,
"description": "<string>",
"content": "<string>",
"location": "<string>",
"url": "<string>",
"author_id": 123,
"registration_deadline": "2023-11-07T05:31:56Z",
"notifications_interval": [],
"notifications_channels": []
}
'import requests
url = "https://api.perscom.io/{version}/events/{event}"
payload = {
"name": "<string>",
"calendar_id": 123,
"all_day": False,
"starts": "2023-11-07T05:31:56Z",
"ends": "2023-11-07T05:31:56Z",
"repeats": False,
"registration_enabled": True,
"notifications_enabled": True,
"description": "<string>",
"content": "<string>",
"location": "<string>",
"url": "<string>",
"author_id": 123,
"registration_deadline": "2023-11-07T05:31:56Z",
"notifications_interval": [],
"notifications_channels": []
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
calendar_id: 123,
all_day: false,
starts: '2023-11-07T05:31:56Z',
ends: '2023-11-07T05:31:56Z',
repeats: false,
registration_enabled: true,
notifications_enabled: true,
description: '<string>',
content: '<string>',
location: '<string>',
url: '<string>',
author_id: 123,
registration_deadline: '2023-11-07T05:31:56Z',
notifications_interval: [],
notifications_channels: []
})
};
fetch('https://api.perscom.io/{version}/events/{event}', 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.perscom.io/{version}/events/{event}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'calendar_id' => 123,
'all_day' => false,
'starts' => '2023-11-07T05:31:56Z',
'ends' => '2023-11-07T05:31:56Z',
'repeats' => false,
'registration_enabled' => true,
'notifications_enabled' => true,
'description' => '<string>',
'content' => '<string>',
'location' => '<string>',
'url' => '<string>',
'author_id' => 123,
'registration_deadline' => '2023-11-07T05:31:56Z',
'notifications_interval' => [
],
'notifications_channels' => [
]
]),
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.perscom.io/{version}/events/{event}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"calendar_id\": 123,\n \"all_day\": false,\n \"starts\": \"2023-11-07T05:31:56Z\",\n \"ends\": \"2023-11-07T05:31:56Z\",\n \"repeats\": false,\n \"registration_enabled\": true,\n \"notifications_enabled\": true,\n \"description\": \"<string>\",\n \"content\": \"<string>\",\n \"location\": \"<string>\",\n \"url\": \"<string>\",\n \"author_id\": 123,\n \"registration_deadline\": \"2023-11-07T05:31:56Z\",\n \"notifications_interval\": [],\n \"notifications_channels\": []\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.perscom.io/{version}/events/{event}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"calendar_id\": 123,\n \"all_day\": false,\n \"starts\": \"2023-11-07T05:31:56Z\",\n \"ends\": \"2023-11-07T05:31:56Z\",\n \"repeats\": false,\n \"registration_enabled\": true,\n \"notifications_enabled\": true,\n \"description\": \"<string>\",\n \"content\": \"<string>\",\n \"location\": \"<string>\",\n \"url\": \"<string>\",\n \"author_id\": 123,\n \"registration_deadline\": \"2023-11-07T05:31:56Z\",\n \"notifications_interval\": [],\n \"notifications_channels\": []\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.perscom.io/{version}/events/{event}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"calendar_id\": 123,\n \"all_day\": false,\n \"starts\": \"2023-11-07T05:31:56Z\",\n \"ends\": \"2023-11-07T05:31:56Z\",\n \"repeats\": false,\n \"registration_enabled\": true,\n \"notifications_enabled\": true,\n \"description\": \"<string>\",\n \"content\": \"<string>\",\n \"location\": \"<string>\",\n \"url\": \"<string>\",\n \"author_id\": 123,\n \"registration_deadline\": \"2023-11-07T05:31:56Z\",\n \"notifications_interval\": [],\n \"notifications_channels\": []\n}"
response = http.request(request)
puts response.read_body{
"data": {
"name": "<string>",
"calendar_id": 123,
"all_day": false,
"starts": "2023-11-07T05:31:56Z",
"ends": "2023-11-07T05:31:56Z",
"repeats": false,
"registration_enabled": true,
"notifications_enabled": true,
"id": 123,
"description": "<string>",
"content": "<string>",
"location": "<string>",
"url": "<string>",
"author_id": 123,
"registration_deadline": "2023-11-07T05:31:56Z",
"notifications_interval": [],
"notifications_channels": [],
"label": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"error": {
"message": "You are not authenticated. Please provide a valid API key that contains your PERSCOM ID to continue.",
"type": "AuthenticationException",
"request_id": "550e8400-e29b-41d4-a716-446655440000",
"trace_id": "6ba7b810-9dad-11d1-80b4-00c04fd430c8"
}
}{
"error": {
"message": "A valid subscription is required to complete this request.",
"type": "HttpException",
"request_id": "550e8400-e29b-41d4-a716-446655440000",
"trace_id": "6ba7b810-9dad-11d1-80b4-00c04fd430c8"
}
}{
"error": {
"message": "The API key provided does not have the correct permissions and/or scopes to perform the requested action.",
"type": "HttpException",
"request_id": "550e8400-e29b-41d4-a716-446655440000",
"trace_id": "6ba7b810-9dad-11d1-80b4-00c04fd430c8"
}
}{
"error": {
"message": "The requested resource or endpoint could not be found.",
"type": "NotFoundHttpException",
"request_id": "550e8400-e29b-41d4-a716-446655440000",
"trace_id": "6ba7b810-9dad-11d1-80b4-00c04fd430c8"
}
}{
"error": {
"message": "The [field] is [required|invalid|etc].",
"type": "ValidationException",
"errors": {
"email": [
"The email field is required.",
"The email must be a valid email address."
],
"password": [
"The password must be at least 8 characters.",
"The password must contain at least one uppercase letter."
]
},
"request_id": "550e8400-e29b-41d4-a716-446655440000",
"trace_id": "6ba7b810-9dad-11d1-80b4-00c04fd430c8"
}
}{
"error": {
"message": "You have exceeded the API rate limit. Please wait a minute before trying again.",
"type": "ThrottleRequestsException",
"request_id": "550e8400-e29b-41d4-a716-446655440000",
"trace_id": "6ba7b810-9dad-11d1-80b4-00c04fd430c8"
}
}{
"error": {
"message": "The API is currently down for maintenance. Please check back later.",
"type": "HttpException",
"request_id": "550e8400-e29b-41d4-a716-446655440000",
"trace_id": "6ba7b810-9dad-11d1-80b4-00c04fd430c8"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The API version to use.
Available options:
v1, v2 Query Parameters
Available options:
attachments, author, author.*, calendar, calendar.*, comments, comments.*, image, schedule, tags Body
application/json
Supports HTML.
Supports HTML.
Available options:
pt0m, pt15m, pt1h, p1d, p1w Available options:
broadcast, database, discord_private, discord_public, mail, sms Response
OK
Show child attributes
Show child attributes
Was this page helpful?
⌘I