curl --request POST \
--url https://www.immersivecommons.com/api/resources/book \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"resource_id": "<string>",
"start_iso": "2023-11-07T05:31:56Z",
"end_iso": "2023-11-07T05:31:56Z",
"purpose": "<string>",
"email": "<string>"
}
'import requests
url = "https://www.immersivecommons.com/api/resources/book"
payload = {
"resource_id": "<string>",
"start_iso": "2023-11-07T05:31:56Z",
"end_iso": "2023-11-07T05:31:56Z",
"purpose": "<string>",
"email": "<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({
resource_id: '<string>',
start_iso: '2023-11-07T05:31:56Z',
end_iso: '2023-11-07T05:31:56Z',
purpose: '<string>',
email: '<string>'
})
};
fetch('https://www.immersivecommons.com/api/resources/book', 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://www.immersivecommons.com/api/resources/book",
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([
'resource_id' => '<string>',
'start_iso' => '2023-11-07T05:31:56Z',
'end_iso' => '2023-11-07T05:31:56Z',
'purpose' => '<string>',
'email' => '<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://www.immersivecommons.com/api/resources/book"
payload := strings.NewReader("{\n \"resource_id\": \"<string>\",\n \"start_iso\": \"2023-11-07T05:31:56Z\",\n \"end_iso\": \"2023-11-07T05:31:56Z\",\n \"purpose\": \"<string>\",\n \"email\": \"<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://www.immersivecommons.com/api/resources/book")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"resource_id\": \"<string>\",\n \"start_iso\": \"2023-11-07T05:31:56Z\",\n \"end_iso\": \"2023-11-07T05:31:56Z\",\n \"purpose\": \"<string>\",\n \"email\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.immersivecommons.com/api/resources/book")
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 \"resource_id\": \"<string>\",\n \"start_iso\": \"2023-11-07T05:31:56Z\",\n \"end_iso\": \"2023-11-07T05:31:56Z\",\n \"purpose\": \"<string>\",\n \"email\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"ok": true,
"queued": true,
"was_dup": true,
"rate": {
"current": 123,
"remaining": 123,
"limit": 123
},
"note": "<string>"
}{
"error": "<string>",
"ok": false,
"error_kind": "<string>",
"message": "<string>",
"rate": {
"current": 123,
"remaining": 123,
"limit": 123
},
"retry_after_seconds": 123,
"tier": "<string>",
"current_tier": "<string>",
"detail": "<string>"
}{
"error": "<string>",
"ok": false,
"error_kind": "<string>",
"message": "<string>",
"rate": {
"current": 123,
"remaining": 123,
"limit": 123
},
"retry_after_seconds": 123,
"tier": "<string>",
"current_tier": "<string>",
"detail": "<string>"
}{
"error": "<string>",
"ok": false,
"error_kind": "<string>",
"message": "<string>",
"rate": {
"current": 123,
"remaining": 123,
"limit": 123
},
"retry_after_seconds": 123,
"tier": "<string>",
"current_tier": "<string>",
"detail": "<string>"
}{
"error": "<string>",
"ok": false,
"error_kind": "<string>",
"message": "<string>",
"rate": {
"current": 123,
"remaining": 123,
"limit": 123
},
"retry_after_seconds": 123,
"tier": "<string>",
"current_tier": "<string>",
"detail": "<string>"
}{
"error": "<string>",
"ok": false,
"error_kind": "<string>",
"message": "<string>",
"rate": {
"current": 123,
"remaining": 123,
"limit": 123
},
"retry_after_seconds": 123,
"tier": "<string>",
"current_tier": "<string>",
"detail": "<string>"
}{
"error": "<string>",
"ok": false,
"error_kind": "<string>",
"message": "<string>",
"rate": {
"current": 123,
"remaining": 123,
"limit": 123
},
"retry_after_seconds": 123,
"tier": "<string>",
"current_tier": "<string>",
"detail": "<string>"
}{
"error": "<string>",
"ok": false,
"error_kind": "<string>",
"message": "<string>",
"rate": {
"current": 123,
"remaining": 123,
"limit": 123
},
"retry_after_seconds": 123,
"tier": "<string>",
"current_tier": "<string>",
"detail": "<string>"
}Queue a resource booking
Clerk session or agt_ token with resources:book. Queues a booking envelope (returns queued, not confirmed). IDEMPOTENT: a repeat within 30 days for the exact same start time is recognized (was_dup: true); an Idempotency-Key additionally replays the first result. Agent callers MUST supply email.
curl --request POST \
--url https://www.immersivecommons.com/api/resources/book \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"resource_id": "<string>",
"start_iso": "2023-11-07T05:31:56Z",
"end_iso": "2023-11-07T05:31:56Z",
"purpose": "<string>",
"email": "<string>"
}
'import requests
url = "https://www.immersivecommons.com/api/resources/book"
payload = {
"resource_id": "<string>",
"start_iso": "2023-11-07T05:31:56Z",
"end_iso": "2023-11-07T05:31:56Z",
"purpose": "<string>",
"email": "<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({
resource_id: '<string>',
start_iso: '2023-11-07T05:31:56Z',
end_iso: '2023-11-07T05:31:56Z',
purpose: '<string>',
email: '<string>'
})
};
fetch('https://www.immersivecommons.com/api/resources/book', 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://www.immersivecommons.com/api/resources/book",
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([
'resource_id' => '<string>',
'start_iso' => '2023-11-07T05:31:56Z',
'end_iso' => '2023-11-07T05:31:56Z',
'purpose' => '<string>',
'email' => '<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://www.immersivecommons.com/api/resources/book"
payload := strings.NewReader("{\n \"resource_id\": \"<string>\",\n \"start_iso\": \"2023-11-07T05:31:56Z\",\n \"end_iso\": \"2023-11-07T05:31:56Z\",\n \"purpose\": \"<string>\",\n \"email\": \"<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://www.immersivecommons.com/api/resources/book")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"resource_id\": \"<string>\",\n \"start_iso\": \"2023-11-07T05:31:56Z\",\n \"end_iso\": \"2023-11-07T05:31:56Z\",\n \"purpose\": \"<string>\",\n \"email\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.immersivecommons.com/api/resources/book")
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 \"resource_id\": \"<string>\",\n \"start_iso\": \"2023-11-07T05:31:56Z\",\n \"end_iso\": \"2023-11-07T05:31:56Z\",\n \"purpose\": \"<string>\",\n \"email\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"ok": true,
"queued": true,
"was_dup": true,
"rate": {
"current": 123,
"remaining": 123,
"limit": 123
},
"note": "<string>"
}{
"error": "<string>",
"ok": false,
"error_kind": "<string>",
"message": "<string>",
"rate": {
"current": 123,
"remaining": 123,
"limit": 123
},
"retry_after_seconds": 123,
"tier": "<string>",
"current_tier": "<string>",
"detail": "<string>"
}{
"error": "<string>",
"ok": false,
"error_kind": "<string>",
"message": "<string>",
"rate": {
"current": 123,
"remaining": 123,
"limit": 123
},
"retry_after_seconds": 123,
"tier": "<string>",
"current_tier": "<string>",
"detail": "<string>"
}{
"error": "<string>",
"ok": false,
"error_kind": "<string>",
"message": "<string>",
"rate": {
"current": 123,
"remaining": 123,
"limit": 123
},
"retry_after_seconds": 123,
"tier": "<string>",
"current_tier": "<string>",
"detail": "<string>"
}{
"error": "<string>",
"ok": false,
"error_kind": "<string>",
"message": "<string>",
"rate": {
"current": 123,
"remaining": 123,
"limit": 123
},
"retry_after_seconds": 123,
"tier": "<string>",
"current_tier": "<string>",
"detail": "<string>"
}{
"error": "<string>",
"ok": false,
"error_kind": "<string>",
"message": "<string>",
"rate": {
"current": 123,
"remaining": 123,
"limit": 123
},
"retry_after_seconds": 123,
"tier": "<string>",
"current_tier": "<string>",
"detail": "<string>"
}{
"error": "<string>",
"ok": false,
"error_kind": "<string>",
"message": "<string>",
"rate": {
"current": 123,
"remaining": 123,
"limit": 123
},
"retry_after_seconds": 123,
"tier": "<string>",
"current_tier": "<string>",
"detail": "<string>"
}{
"error": "<string>",
"ok": false,
"error_kind": "<string>",
"message": "<string>",
"rate": {
"current": 123,
"remaining": 123,
"limit": 123
},
"retry_after_seconds": 123,
"tier": "<string>",
"current_tier": "<string>",
"detail": "<string>"
}Authorizations
Per-member, individually-revocable agent token minted via the device-code flow. Send as Authorization: Bearer agt_.... The scope array in each operation's security requirement names the IC scope the handler enforces.
Headers
Optional. A retry carrying the same key replays the first successful result verbatim instead of creating a second side effect (honored by lib/idempotency.ts, 24h window). Complementary to each endpoint's own semantic dedupe. Absent = no replay.
255Body
Response
Booking queued (or recognized as a duplicate).
Shared shape for the queue-and-forget writes (rsvp, book).