Update an event
curl --request PATCH \
--url https://youragentcal.com/v1/calendars/{calendarId}/events/{eventId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"date": "2023-12-25",
"recur": {},
"start_time": "<string>",
"end_time": "<string>",
"notes": "<string>",
"category": "<string>",
"art": "<string>"
}
'import requests
url = "https://youragentcal.com/v1/calendars/{calendarId}/events/{eventId}"
payload = {
"name": "<string>",
"date": "2023-12-25",
"recur": {},
"start_time": "<string>",
"end_time": "<string>",
"notes": "<string>",
"category": "<string>",
"art": "<string>"
}
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>',
date: '2023-12-25',
recur: {},
start_time: '<string>',
end_time: '<string>',
notes: '<string>',
category: '<string>',
art: '<string>'
})
};
fetch('https://youragentcal.com/v1/calendars/{calendarId}/events/{eventId}', 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://youragentcal.com/v1/calendars/{calendarId}/events/{eventId}",
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>',
'date' => '2023-12-25',
'recur' => [
],
'start_time' => '<string>',
'end_time' => '<string>',
'notes' => '<string>',
'category' => '<string>',
'art' => '<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://youragentcal.com/v1/calendars/{calendarId}/events/{eventId}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"date\": \"2023-12-25\",\n \"recur\": {},\n \"start_time\": \"<string>\",\n \"end_time\": \"<string>\",\n \"notes\": \"<string>\",\n \"category\": \"<string>\",\n \"art\": \"<string>\"\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://youragentcal.com/v1/calendars/{calendarId}/events/{eventId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"date\": \"2023-12-25\",\n \"recur\": {},\n \"start_time\": \"<string>\",\n \"end_time\": \"<string>\",\n \"notes\": \"<string>\",\n \"category\": \"<string>\",\n \"art\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://youragentcal.com/v1/calendars/{calendarId}/events/{eventId}")
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 \"date\": \"2023-12-25\",\n \"recur\": {},\n \"start_time\": \"<string>\",\n \"end_time\": \"<string>\",\n \"notes\": \"<string>\",\n \"category\": \"<string>\",\n \"art\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"date": "2023-12-25",
"recur": {},
"start_time": "<string>",
"end_time": "<string>",
"notes": "<string>",
"category": "<string>",
"art": "<string>",
"created_by": "<string>",
"created_by_name": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}Events
Update an event
Partial update; JSON null clears a field (date, recur, start_time clears both times, notes, category, art). Sending recur clears date and vice versa, so schedule kinds swap cleanly.
PATCH
/
v1
/
calendars
/
{calendarId}
/
events
/
{eventId}
Update an event
curl --request PATCH \
--url https://youragentcal.com/v1/calendars/{calendarId}/events/{eventId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"date": "2023-12-25",
"recur": {},
"start_time": "<string>",
"end_time": "<string>",
"notes": "<string>",
"category": "<string>",
"art": "<string>"
}
'import requests
url = "https://youragentcal.com/v1/calendars/{calendarId}/events/{eventId}"
payload = {
"name": "<string>",
"date": "2023-12-25",
"recur": {},
"start_time": "<string>",
"end_time": "<string>",
"notes": "<string>",
"category": "<string>",
"art": "<string>"
}
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>',
date: '2023-12-25',
recur: {},
start_time: '<string>',
end_time: '<string>',
notes: '<string>',
category: '<string>',
art: '<string>'
})
};
fetch('https://youragentcal.com/v1/calendars/{calendarId}/events/{eventId}', 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://youragentcal.com/v1/calendars/{calendarId}/events/{eventId}",
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>',
'date' => '2023-12-25',
'recur' => [
],
'start_time' => '<string>',
'end_time' => '<string>',
'notes' => '<string>',
'category' => '<string>',
'art' => '<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://youragentcal.com/v1/calendars/{calendarId}/events/{eventId}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"date\": \"2023-12-25\",\n \"recur\": {},\n \"start_time\": \"<string>\",\n \"end_time\": \"<string>\",\n \"notes\": \"<string>\",\n \"category\": \"<string>\",\n \"art\": \"<string>\"\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://youragentcal.com/v1/calendars/{calendarId}/events/{eventId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"date\": \"2023-12-25\",\n \"recur\": {},\n \"start_time\": \"<string>\",\n \"end_time\": \"<string>\",\n \"notes\": \"<string>\",\n \"category\": \"<string>\",\n \"art\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://youragentcal.com/v1/calendars/{calendarId}/events/{eventId}")
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 \"date\": \"2023-12-25\",\n \"recur\": {},\n \"start_time\": \"<string>\",\n \"end_time\": \"<string>\",\n \"notes\": \"<string>\",\n \"category\": \"<string>\",\n \"art\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"date": "2023-12-25",
"recur": {},
"start_time": "<string>",
"end_time": "<string>",
"notes": "<string>",
"category": "<string>",
"art": "<string>",
"created_by": "<string>",
"created_by_name": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}Authorizations
Agent token from POST /v1/mint (format ac_agent_…). Scopes: agent:read, calendar:read, calendar:write, grants:manage.
Body
application/json
⌘I