{"openapi":"3.0.3","info":{"title":"Caesura API","version":"2.11.0","description":"The public REST API. Every endpoint takes an account API token as\n`Authorization: Bearer tc_...`, minted in Account settings, or an OAuth access token.\nThe endpoints marked with an empty security requirement are public reads, which a Personal Agent\nmay also call signed out, with a `Poppy-Session` header and no token, including one nobody has\nallowed. Past its per-address share of lookups the answer is 429 with `Retry-After`, not a refused Session.\n\nScopes:\n- `trips:read` — See your trips, their days and stops, costs, history, and existing share links. Reading or listing your trips needs this scope, though current:read also reads the trips under way now or starting within three days; without either, your trips stay hidden, though public Discover playbooks can still be browsed.\n- `trips:write` — Create, change and delete trips, days and stops; undo, redo and revert. Creating or changing a trip needs this scope, though current:write also changes the days and stops of a trip under way now or starting within three days; without either, trips can only be read.\n- `notebook:read` — Read the Notebook pages on a trip. Opening a Notebook page needs this scope, though current:read also opens the pages on a trip under way now or starting within three days; without either, trip tasks still work but Notebook content stays hidden.\n- `notebook:write` — Create, change and delete the Notebook pages on a trip. Writing a Notebook page needs this scope; without it, Notebook pages can only be read.\n- `library:read` — Read your saved-days library and your Playbooks (a Playbook is a view over saved days), and browse published Playbooks. Reading your saved days or your Playbooks needs this scope or current:read; without either, trip tasks still work, and only published Playbooks can be browsed.\n- `library:write` — Create, edit, import and delete saved days and Playbooks, and publish or unpublish them to Discover. Changing the library needs this scope; without it, saved days and Playbooks can only be read.\n- `sharing:write` — Invite people to a trip and revoke invites, and create or revoke share links. Inviting someone or sharing a trip needs this scope; without it, trips can be managed but not shared.\n- `account:read` — See who you are and what plan you hold. Checking your account or plan needs this scope or current:read; without either, trip and library tasks still work.\n- `places:read` — Look up real places by name, outside any trip. Every search counts against your daily geocoding allowance (the one the app's own place search uses) and a daily budget shared by every account; one token may make at most 100 a day. Finding a place by name outside a trip needs this scope, while a trip's own place search takes trips:write instead; without either, stops can still be added with coordinates, but not found by name.\n- `current:read` — See the trips under way now or starting within three days, with their days and stops, costs, history and share links, and the Notebook pages on those trips, plus your saved-days library, Playbooks and account. Reading a current trip needs this scope or trips:read; without either, your trips stay hidden, though public Discover playbooks can still be browsed.\n- `current:write` — Change the days and stops of the trips under way now or starting within three days, and undo, redo or revert those changes. Those changes need this scope or trips:write, while editing the trip itself (its name, dates or cover, or deleting or restoring it) still needs trips:write; without either, current trips can only be read."},"servers":[{"url":"https://caesura.today/api"}],"paths":{"/v1/account":{"get":{"summary":"Show who this token acts as: your user id, plan and entitlements","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://caesura.today/api/v1/account' \\\n  -H 'Authorization: Bearer tc_YOUR_TOKEN'"},{"lang":"JavaScript","label":"JavaScript (fetch)","source":"const response = await fetch(\"https://caesura.today/api/v1/account\", {\n  method: \"GET\",\n  headers: {\n    Authorization: \"Bearer tc_YOUR_TOKEN\",\n  },\n});\nconst data = await response.json();"},{"lang":"Python","label":"Python (requests)","source":"import requests\n\nresponse = requests.request(\n    \"GET\",\n    \"https://caesura.today/api/v1/account\",\n    headers={\"Authorization\": \"Bearer tc_YOUR_TOKEN\"},\n)\ndata = response.json()"}],"description":"Requires the `account:read` scope, or `current:read`.","security":[{"bearerAuth":["account:read"]},{"bearerAuth":["current:read"]}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"userId":{"type":"string"},"planVersionRef":{"type":"string"},"entitlements":{"type":"array","items":{"type":"string"}}},"required":["userId","planVersionRef","entitlements"],"additionalProperties":false}}}},"4XX":{"description":"One envelope for every failure: `{ error: { code, message, details? } }`. 401 carries `WWW-Authenticate: Bearer`; 429 carries `Retry-After`."}}}},"/v1/cities":{"get":{"summary":"Search city names in the public saved-day library by prefix, with how many published days touch each","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://caesura.today/api/v1/cities?q=string' \\\n  -H 'Authorization: Bearer tc_YOUR_TOKEN'"},{"lang":"JavaScript","label":"JavaScript (fetch)","source":"const response = await fetch(\"https://caesura.today/api/v1/cities?q=string\", {\n  method: \"GET\",\n  headers: {\n    Authorization: \"Bearer tc_YOUR_TOKEN\",\n  },\n});\nconst data = await response.json();"},{"lang":"Python","label":"Python (requests)","source":"import requests\n\nresponse = requests.request(\n    \"GET\",\n    \"https://caesura.today/api/v1/cities?q=string\",\n    headers={\"Authorization\": \"Bearer tc_YOUR_TOKEN\"},\n)\ndata = response.json()"}],"description":"Requires the `trips:read` scope.","security":[{"bearerAuth":["trips:read"]}],"parameters":[{"name":"limit","in":"query","required":false,"description":"1 to 200. A value outside that range is refused, never clamped.","schema":{"type":"integer","minimum":1,"maximum":200}},{"name":"cursor","in":"query","required":false,"description":"Opaque. Pass back the `nextCursor` of the previous page.","schema":{"type":"string"}},{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":200}}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","required":["items","nextCursor"],"properties":{"items":{"type":"array","items":{"type":"object","properties":{"city":{"type":"string","minLength":1},"days":{"type":"integer","minimum":0}},"required":["city","days"],"additionalProperties":false}},"nextCursor":{"type":"string","nullable":true}}}}}},"4XX":{"description":"One envelope for every failure: `{ error: { code, message, details? } }`. 401 carries `WWW-Authenticate: Bearer`; 429 carries `Retry-After`."}}}},"/v1/discover/playbooks":{"get":{"summary":"Discover published Playbooks from everyone — filter by place, length and rating, ranked as the app ranks them","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://caesura.today/api/v1/discover/playbooks' \\\n  -H 'Authorization: Bearer tc_YOUR_TOKEN'"},{"lang":"JavaScript","label":"JavaScript (fetch)","source":"const response = await fetch(\"https://caesura.today/api/v1/discover/playbooks\", {\n  method: \"GET\",\n  headers: {\n    Authorization: \"Bearer tc_YOUR_TOKEN\",\n  },\n});\nconst data = await response.json();"},{"lang":"Python","label":"Python (requests)","source":"import requests\n\nresponse = requests.request(\n    \"GET\",\n    \"https://caesura.today/api/v1/discover/playbooks\",\n    headers={\"Authorization\": \"Bearer tc_YOUR_TOKEN\"},\n)\ndata = response.json()"}],"description":"Requires the `library:read` scope, or `current:read` when called with a token; a Personal Agent's Poppy Session alone, with no token, may also read it.","security":[{},{"bearerAuth":["library:read"]},{"bearerAuth":["current:read"]}],"parameters":[{"name":"limit","in":"query","required":false,"description":"1 to 200. A value outside that range is refused, never clamped.","schema":{"type":"integer","minimum":1,"maximum":200}},{"name":"cursor","in":"query","required":false,"description":"Opaque. Pass back the `nextCursor` of the previous page.","schema":{"type":"string"}},{"name":"city","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":200,"description":"Playbooks that touch this city, spelled as stored (see GET /v1/cities)."}},{"name":"country","in":"query","required":false,"schema":{"type":"string","pattern":"^[A-Z]{2}$","description":"Playbooks that touch this country, as an ISO 3166-1 alpha-2 code. With `city`, either matches."}},{"name":"length","in":"query","required":false,"schema":{"type":"string","enum":["any","one","two-three","four-six","seven-plus"],"description":"How many days: one, two-three, four-six or seven-plus. Default any."}},{"name":"rating","in":"query","required":false,"schema":{"type":"string","enum":["3","4","any","4.5"],"description":"Minimum average rating; any floor drops unrated Playbooks. Default any."}},{"name":"sort","in":"query","required":false,"schema":{"type":"string","enum":["top","most-added","highest-rated","most-reviewed","newest"],"description":"Default most-added; `top` is the app's own Discover order. Places matched always rank first. `newest` is the only sort whose order does not move as people add and review."}}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","required":["items","nextCursor"],"properties":{"items":{"type":"array","items":{"type":"object","properties":{"savedDayId":{"type":"string","format":"uuid"},"ownerId":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"cities":{"type":"array","items":{"type":"string","minLength":1}},"matchedCities":{"type":"array","items":{"type":"string","minLength":1}},"stopCount":{"type":"integer","minimum":0},"dayCount":{"type":"integer","minimum":1},"window":{"type":"object","properties":{"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["start","end"],"additionalProperties":false,"nullable":true},"preview":{"maxItems":12,"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"start":{"type":"string","nullable":true}},"required":["title","start"],"additionalProperties":false}},"totalCost":{"type":"object","properties":{"amountMinor":{"type":"integer","minimum":0},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"],"additionalProperties":false,"nullable":true},"adds":{"type":"integer","minimum":0},"rating":{"type":"number","minimum":1,"maximum":5,"nullable":true},"reviewCount":{"type":"integer","minimum":0},"visibility":{"type":"string","enum":["private","public"]},"authorKind":{"type":"string","enum":["human","ai"]},"sourceTripName":{"type":"string","minLength":1},"createdAt":{"type":"string"},"publishedAt":{"type":"string","nullable":true},"isMine":{"type":"boolean"},"cover":{"anyOf":[{"type":"object","properties":{"source":{"type":"string","enum":["unsplash"]},"unsplashId":{"type":"string","minLength":1},"urls":{"type":"object","properties":{"raw":{"type":"string","minLength":1,"maxLength":2048},"regular":{"type":"string","minLength":1,"maxLength":2048},"small":{"type":"string","minLength":1,"maxLength":2048}},"required":["raw","regular","small"],"additionalProperties":false},"alt":{"type":"string","nullable":true,"default":null},"photographerName":{"type":"string","minLength":1},"photographerUrl":{"type":"string","minLength":1,"maxLength":2048},"photoPageUrl":{"type":"string","minLength":1,"maxLength":2048},"position":{"type":"integer","minimum":0,"maximum":100,"default":50}},"required":["source","unsplashId","urls","photographerName","photographerUrl","photoPageUrl"],"additionalProperties":false},{"type":"object","properties":{"source":{"type":"string","enum":["url"]},"url":{"type":"string","minLength":1,"maxLength":2048},"alt":{"type":"string","maxLength":1000,"nullable":true,"default":null},"credit":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"url":{"type":"string","minLength":1,"maxLength":2048,"nullable":true,"default":null}},"required":["name"],"additionalProperties":false,"nullable":true,"default":null},"position":{"type":"integer","minimum":0,"maximum":100,"default":50},"proxySrc":{"type":"string","minLength":1,"maxLength":2048}},"required":["source","url"],"additionalProperties":false}],"nullable":true},"tags":{"type":"array","items":{"type":"string","enum":["meal","lodging","ticketed","outdoors","drinks","nightlife","museum","sight","beach","shopping","show","tour","wellness","sports"]},"default":[]},"description":{"type":"string","nullable":true,"default":null}},"required":["savedDayId","ownerId","name","cities","matchedCities","stopCount","dayCount","window","preview","totalCost","adds","rating","reviewCount","visibility","authorKind","sourceTripName","createdAt","publishedAt","isMine","cover"],"additionalProperties":false}},"nextCursor":{"type":"string","nullable":true}}}}}},"4XX":{"description":"One envelope for every failure: `{ error: { code, message, details? } }`. 401 carries `WWW-Authenticate: Bearer`; 429 carries `Retry-After`."}}}},"/v1/geocode":{"get":{"summary":"Search for a real place by name, outside any trip, returning up to five locations ready to use on a stop (spends geocode quota; 100 a day per token)","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://caesura.today/api/v1/geocode?q=string' \\\n  -H 'Authorization: Bearer tc_YOUR_TOKEN'"},{"lang":"JavaScript","label":"JavaScript (fetch)","source":"const response = await fetch(\"https://caesura.today/api/v1/geocode?q=string\", {\n  method: \"GET\",\n  headers: {\n    Authorization: \"Bearer tc_YOUR_TOKEN\",\n  },\n});\nconst data = await response.json();"},{"lang":"Python","label":"Python (requests)","source":"import requests\n\nresponse = requests.request(\n    \"GET\",\n    \"https://caesura.today/api/v1/geocode?q=string\",\n    headers={\"Authorization\": \"Bearer tc_YOUR_TOKEN\"},\n)\ndata = response.json()"}],"description":"Requires the `places:read` scope.","security":[{"bearerAuth":["places:read"]}],"parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","maxLength":200}},{"name":"countryCode","in":"query","required":false,"schema":{"type":"string","pattern":"^[A-Z]{2}$"}}],"responses":{"200":{"description":"Success.","headers":{"Retry-After":{"description":"On a 429: seconds until the exhausted daily allowance (this token's, or the account's) resets.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"lat":{"type":"number","minimum":-90,"maximum":90,"description":"Send with lng, or omit both. When omitted on a v1 write, the server geocodes `address`, then `name`."},"lng":{"type":"number","minimum":-180,"maximum":180,"description":"Send with lat, or omit both."},"countryCode":{"type":"string","pattern":"^[A-Z]{2}$"},"city":{"type":"string","minLength":1,"maxLength":200},"area":{"type":"string","minLength":1,"maxLength":200},"precision":{"type":"string","enum":["venue","area","city"],"description":"What the coordinates describe: a `venue`, an `area` or a `city`. Requires `lat` and `lng` — sent without them it is refused (\"precision requires coordinates\")."},"verified":{"type":"boolean","enum":[false],"description":"`false` when no geocoder confirmed the coordinates (an assistant's guess). Absent = unknown. Requires `lat` and `lng`."},"address":{"type":"object","properties":{"countryCode":{"type":"string","pattern":"^[A-Z]{2}$","description":"ISO 3166-1 alpha-2, uppercase. Decides how the other fields are read."},"lines":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"description":"Street-level part, in the country's own order, e.g. [\"Hauptstraße 5\"] or [\"1-2-3 Nishi-Azabu\"]."},"dependentLocality":{"type":"string","minLength":1,"maxLength":200,"description":"District, neighbourhood or suburb when it is part of the postal address."},"locality":{"type":"string","minLength":1,"maxLength":200,"description":"City, town or post town."},"administrativeArea":{"type":"string","minLength":1,"maxLength":200,"description":"State, province, prefecture or region."},"postalCode":{"type":"string","minLength":1,"maxLength":20,"description":"A string: keeps leading zeros and letters."}},"required":["countryCode","lines"],"additionalProperties":false}},"required":["name"],"additionalProperties":false}}},"required":["results"],"additionalProperties":false}}}},"4XX":{"description":"One envelope for every failure: `{ error: { code, message, details? } }`. 401 carries `WWW-Authenticate: Bearer`; 429 carries `Retry-After`."}}}},"/v1/library/{savedDayId}":{"get":{"summary":"Get one of your saved days","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://caesura.today/api/v1/library/YOUR_SAVED_DAY_ID' \\\n  -H 'Authorization: Bearer tc_YOUR_TOKEN'"},{"lang":"JavaScript","label":"JavaScript (fetch)","source":"const response = await fetch(\"https://caesura.today/api/v1/library/YOUR_SAVED_DAY_ID\", {\n  method: \"GET\",\n  headers: {\n    Authorization: \"Bearer tc_YOUR_TOKEN\",\n  },\n});\nconst data = await response.json();"},{"lang":"Python","label":"Python (requests)","source":"import requests\n\nresponse = requests.request(\n    \"GET\",\n    \"https://caesura.today/api/v1/library/YOUR_SAVED_DAY_ID\",\n    headers={\"Authorization\": \"Bearer tc_YOUR_TOKEN\"},\n)\ndata = response.json()"}],"description":"Requires the `library:read` scope, or `current:read`.","security":[{"bearerAuth":["library:read"]},{"bearerAuth":["current:read"]}],"parameters":[{"name":"savedDayId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"savedDayId":{"type":"string","format":"uuid"},"ownerId":{"type":"string","minLength":1},"name":{"type":"string","minLength":1,"maxLength":200},"stops":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"timeWindow":{"type":"object","properties":{"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["start","end"],"additionalProperties":false,"nullable":true},"location":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"lat":{"type":"number","minimum":-90,"maximum":90,"description":"Send with lng, or omit both. When omitted on a v1 write, the server geocodes `address`, then `name`."},"lng":{"type":"number","minimum":-180,"maximum":180,"description":"Send with lat, or omit both."},"countryCode":{"type":"string","pattern":"^[A-Z]{2}$"},"city":{"type":"string","minLength":1,"maxLength":200},"area":{"type":"string","minLength":1,"maxLength":200},"precision":{"type":"string","enum":["venue","area","city"],"description":"What the coordinates describe: a `venue`, an `area` or a `city`. Requires `lat` and `lng` — sent without them it is refused (\"precision requires coordinates\")."},"verified":{"type":"boolean","enum":[false],"description":"`false` when no geocoder confirmed the coordinates (an assistant's guess). Absent = unknown. Requires `lat` and `lng`."},"address":{"type":"object","properties":{"countryCode":{"type":"string","pattern":"^[A-Z]{2}$","description":"ISO 3166-1 alpha-2, uppercase. Decides how the other fields are read."},"lines":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"description":"Street-level part, in the country's own order, e.g. [\"Hauptstraße 5\"] or [\"1-2-3 Nishi-Azabu\"]."},"dependentLocality":{"type":"string","minLength":1,"maxLength":200,"description":"District, neighbourhood or suburb when it is part of the postal address."},"locality":{"type":"string","minLength":1,"maxLength":200,"description":"City, town or post town."},"administrativeArea":{"type":"string","minLength":1,"maxLength":200,"description":"State, province, prefecture or region."},"postalCode":{"type":"string","minLength":1,"maxLength":20,"description":"A string: keeps leading zeros and letters."}},"required":["countryCode","lines"],"additionalProperties":false}},"required":["name"],"additionalProperties":false,"nullable":true},"notes":{"type":"string","nullable":true},"anchors":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["dayOfWeek"]},"days":{"minItems":1,"type":"array","items":{"type":"string","enum":["mon","tue","wed","thu","fri","sat","sun"]}}},"required":["kind","days"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["dateRange"]},"from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["kind","from","to"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["timeOfDay"]},"window":{"type":"object","properties":{"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["start","end"],"additionalProperties":false}},"required":["kind","window"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["publicHoliday"]},"country":{"type":"string","pattern":"^[A-Z]{2}$"}},"required":["kind","country"],"additionalProperties":false}]}},"kind":{"type":"string","enum":["planned","pending","transit"]},"tags":{"type":"array","items":{"type":"string","enum":["meal","lodging","ticketed","outdoors","drinks","nightlife","museum","sight","beach","shopping","show","tour","wellness","sports"]}},"cost":{"type":"object","properties":{"amountMinor":{"type":"integer","minimum":0},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"],"additionalProperties":false,"nullable":true},"dayIndex":{"type":"integer","minimum":0,"default":0},"mode":{"type":"string","enum":["walk","bus","train","flight","ferry","car","bike"],"nullable":true,"default":null},"endLocation":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"lat":{"type":"number","minimum":-90,"maximum":90,"description":"Send with lng, or omit both. When omitted on a v1 write, the server geocodes `address`, then `name`."},"lng":{"type":"number","minimum":-180,"maximum":180,"description":"Send with lat, or omit both."},"countryCode":{"type":"string","pattern":"^[A-Z]{2}$"},"city":{"type":"string","minLength":1,"maxLength":200},"area":{"type":"string","minLength":1,"maxLength":200},"precision":{"type":"string","enum":["venue","area","city"],"description":"What the coordinates describe: a `venue`, an `area` or a `city`. Requires `lat` and `lng` — sent without them it is refused (\"precision requires coordinates\")."},"verified":{"type":"boolean","enum":[false],"description":"`false` when no geocoder confirmed the coordinates (an assistant's guess). Absent = unknown. Requires `lat` and `lng`."},"address":{"type":"object","properties":{"countryCode":{"type":"string","pattern":"^[A-Z]{2}$","description":"ISO 3166-1 alpha-2, uppercase. Decides how the other fields are read."},"lines":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"description":"Street-level part, in the country's own order, e.g. [\"Hauptstraße 5\"] or [\"1-2-3 Nishi-Azabu\"]."},"dependentLocality":{"type":"string","minLength":1,"maxLength":200,"description":"District, neighbourhood or suburb when it is part of the postal address."},"locality":{"type":"string","minLength":1,"maxLength":200,"description":"City, town or post town."},"administrativeArea":{"type":"string","minLength":1,"maxLength":200,"description":"State, province, prefecture or region."},"postalCode":{"type":"string","minLength":1,"maxLength":20,"description":"A string: keeps leading zeros and letters."}},"required":["countryCode","lines"],"additionalProperties":false}},"required":["name"],"additionalProperties":false,"nullable":true,"default":null},"pendingReason":{"type":"string","enum":["book","maybe"],"nullable":true,"default":null},"flightNumber":{"type":"string","nullable":true,"default":null},"booking":{"type":"object","properties":{"provider":{"type":"string","nullable":true}},"required":["provider"],"additionalProperties":false,"nullable":true,"default":null}},"required":["title","timeWindow","location","notes","anchors","kind","tags","cost"],"additionalProperties":false}},"dayCount":{"type":"integer","minimum":1,"default":1},"cities":{"type":"array","items":{"type":"string","minLength":1}},"visibility":{"type":"string","enum":["private","public"]},"authorKind":{"type":"string","enum":["human","ai"],"default":"human"},"adds":{"type":"integer","minimum":0},"sourceTripId":{"type":"string","format":"uuid"},"sourceTripName":{"type":"string","minLength":1,"maxLength":200},"createdAt":{"type":"string"}},"required":["savedDayId","ownerId","name","stops","cities","visibility","adds","sourceTripId","sourceTripName","createdAt"],"additionalProperties":false}}}},"4XX":{"description":"One envelope for every failure: `{ error: { code, message, details? } }`. 401 carries `WWW-Authenticate: Bearer`; 429 carries `Retry-After`."}}},"patch":{"summary":"Publish a saved day to Discover, or make it private again","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X PATCH 'https://caesura.today/api/v1/library/YOUR_SAVED_DAY_ID' \\\n  -H 'Authorization: Bearer tc_YOUR_TOKEN' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n  \"visibility\": \"private\"\n}'"},{"lang":"JavaScript","label":"JavaScript (fetch)","source":"const response = await fetch(\"https://caesura.today/api/v1/library/YOUR_SAVED_DAY_ID\", {\n  method: \"PATCH\",\n  headers: {\n    Authorization: \"Bearer tc_YOUR_TOKEN\",\n    \"Content-Type\": \"application/json\",\n  },\n  body: JSON.stringify({\n    \"visibility\": \"private\"\n  }),\n});\nconst data = await response.json();"},{"lang":"Python","label":"Python (requests)","source":"import requests\n\nresponse = requests.request(\n    \"PATCH\",\n    \"https://caesura.today/api/v1/library/YOUR_SAVED_DAY_ID\",\n    headers={\"Authorization\": \"Bearer tc_YOUR_TOKEN\"},\n    json={\"visibility\": \"private\"},\n)\ndata = response.json()"}],"description":"Requires the `library:write` scope.","security":[{"bearerAuth":["library:write"]}],"parameters":[{"name":"savedDayId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"visibility":{"type":"string","enum":["private","public"]}},"required":["visibility"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"savedDayId":{"type":"string","format":"uuid"},"ownerId":{"type":"string","minLength":1},"name":{"type":"string","minLength":1,"maxLength":200},"stops":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"timeWindow":{"type":"object","properties":{"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["start","end"],"additionalProperties":false,"nullable":true},"location":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"lat":{"type":"number","minimum":-90,"maximum":90,"description":"Send with lng, or omit both. When omitted on a v1 write, the server geocodes `address`, then `name`."},"lng":{"type":"number","minimum":-180,"maximum":180,"description":"Send with lat, or omit both."},"countryCode":{"type":"string","pattern":"^[A-Z]{2}$"},"city":{"type":"string","minLength":1,"maxLength":200},"area":{"type":"string","minLength":1,"maxLength":200},"precision":{"type":"string","enum":["venue","area","city"],"description":"What the coordinates describe: a `venue`, an `area` or a `city`. Requires `lat` and `lng` — sent without them it is refused (\"precision requires coordinates\")."},"verified":{"type":"boolean","enum":[false],"description":"`false` when no geocoder confirmed the coordinates (an assistant's guess). Absent = unknown. Requires `lat` and `lng`."},"address":{"type":"object","properties":{"countryCode":{"type":"string","pattern":"^[A-Z]{2}$","description":"ISO 3166-1 alpha-2, uppercase. Decides how the other fields are read."},"lines":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"description":"Street-level part, in the country's own order, e.g. [\"Hauptstraße 5\"] or [\"1-2-3 Nishi-Azabu\"]."},"dependentLocality":{"type":"string","minLength":1,"maxLength":200,"description":"District, neighbourhood or suburb when it is part of the postal address."},"locality":{"type":"string","minLength":1,"maxLength":200,"description":"City, town or post town."},"administrativeArea":{"type":"string","minLength":1,"maxLength":200,"description":"State, province, prefecture or region."},"postalCode":{"type":"string","minLength":1,"maxLength":20,"description":"A string: keeps leading zeros and letters."}},"required":["countryCode","lines"],"additionalProperties":false}},"required":["name"],"additionalProperties":false,"nullable":true},"notes":{"type":"string","nullable":true},"anchors":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["dayOfWeek"]},"days":{"minItems":1,"type":"array","items":{"type":"string","enum":["mon","tue","wed","thu","fri","sat","sun"]}}},"required":["kind","days"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["dateRange"]},"from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["kind","from","to"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["timeOfDay"]},"window":{"type":"object","properties":{"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["start","end"],"additionalProperties":false}},"required":["kind","window"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["publicHoliday"]},"country":{"type":"string","pattern":"^[A-Z]{2}$"}},"required":["kind","country"],"additionalProperties":false}]}},"kind":{"type":"string","enum":["planned","pending","transit"]},"tags":{"type":"array","items":{"type":"string","enum":["meal","lodging","ticketed","outdoors","drinks","nightlife","museum","sight","beach","shopping","show","tour","wellness","sports"]}},"cost":{"type":"object","properties":{"amountMinor":{"type":"integer","minimum":0},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"],"additionalProperties":false,"nullable":true},"dayIndex":{"type":"integer","minimum":0,"default":0},"mode":{"type":"string","enum":["walk","bus","train","flight","ferry","car","bike"],"nullable":true,"default":null},"endLocation":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"lat":{"type":"number","minimum":-90,"maximum":90,"description":"Send with lng, or omit both. When omitted on a v1 write, the server geocodes `address`, then `name`."},"lng":{"type":"number","minimum":-180,"maximum":180,"description":"Send with lat, or omit both."},"countryCode":{"type":"string","pattern":"^[A-Z]{2}$"},"city":{"type":"string","minLength":1,"maxLength":200},"area":{"type":"string","minLength":1,"maxLength":200},"precision":{"type":"string","enum":["venue","area","city"],"description":"What the coordinates describe: a `venue`, an `area` or a `city`. Requires `lat` and `lng` — sent without them it is refused (\"precision requires coordinates\")."},"verified":{"type":"boolean","enum":[false],"description":"`false` when no geocoder confirmed the coordinates (an assistant's guess). Absent = unknown. Requires `lat` and `lng`."},"address":{"type":"object","properties":{"countryCode":{"type":"string","pattern":"^[A-Z]{2}$","description":"ISO 3166-1 alpha-2, uppercase. Decides how the other fields are read."},"lines":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"description":"Street-level part, in the country's own order, e.g. [\"Hauptstraße 5\"] or [\"1-2-3 Nishi-Azabu\"]."},"dependentLocality":{"type":"string","minLength":1,"maxLength":200,"description":"District, neighbourhood or suburb when it is part of the postal address."},"locality":{"type":"string","minLength":1,"maxLength":200,"description":"City, town or post town."},"administrativeArea":{"type":"string","minLength":1,"maxLength":200,"description":"State, province, prefecture or region."},"postalCode":{"type":"string","minLength":1,"maxLength":20,"description":"A string: keeps leading zeros and letters."}},"required":["countryCode","lines"],"additionalProperties":false}},"required":["name"],"additionalProperties":false,"nullable":true,"default":null},"pendingReason":{"type":"string","enum":["book","maybe"],"nullable":true,"default":null},"flightNumber":{"type":"string","nullable":true,"default":null},"booking":{"type":"object","properties":{"provider":{"type":"string","nullable":true}},"required":["provider"],"additionalProperties":false,"nullable":true,"default":null}},"required":["title","timeWindow","location","notes","anchors","kind","tags","cost"],"additionalProperties":false}},"dayCount":{"type":"integer","minimum":1,"default":1},"cities":{"type":"array","items":{"type":"string","minLength":1}},"visibility":{"type":"string","enum":["private","public"]},"authorKind":{"type":"string","enum":["human","ai"],"default":"human"},"adds":{"type":"integer","minimum":0},"sourceTripId":{"type":"string","format":"uuid"},"sourceTripName":{"type":"string","minLength":1,"maxLength":200},"createdAt":{"type":"string"}},"required":["savedDayId","ownerId","name","stops","cities","visibility","adds","sourceTripId","sourceTripName","createdAt"],"additionalProperties":false}}}},"4XX":{"description":"One envelope for every failure: `{ error: { code, message, details? } }`. 401 carries `WWW-Authenticate: Bearer`; 429 carries `Retry-After`."}}},"delete":{"summary":"Delete one of your saved days (a published day must be unpublished first)","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X DELETE 'https://caesura.today/api/v1/library/YOUR_SAVED_DAY_ID' \\\n  -H 'Authorization: Bearer tc_YOUR_TOKEN'"},{"lang":"JavaScript","label":"JavaScript (fetch)","source":"const response = await fetch(\"https://caesura.today/api/v1/library/YOUR_SAVED_DAY_ID\", {\n  method: \"DELETE\",\n  headers: {\n    Authorization: \"Bearer tc_YOUR_TOKEN\",\n  },\n});\nconst data = await response.json();"},{"lang":"Python","label":"Python (requests)","source":"import requests\n\nresponse = requests.request(\n    \"DELETE\",\n    \"https://caesura.today/api/v1/library/YOUR_SAVED_DAY_ID\",\n    headers={\"Authorization\": \"Bearer tc_YOUR_TOKEN\"},\n)\ndata = response.json()"}],"description":"Requires the `library:write` scope.","security":[{"bearerAuth":["library:write"]}],"parameters":[{"name":"savedDayId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"savedDayId":{"type":"string"},"deleted":{"type":"boolean","enum":[true]}},"required":["savedDayId","deleted"],"additionalProperties":false}}}},"4XX":{"description":"One envelope for every failure: `{ error: { code, message, details? } }`. 401 carries `WWW-Authenticate: Bearer`; 429 carries `Retry-After`."}}}},"/v1/library":{"get":{"summary":"List the days you have saved to your library, newest first","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://caesura.today/api/v1/library' \\\n  -H 'Authorization: Bearer tc_YOUR_TOKEN'"},{"lang":"JavaScript","label":"JavaScript (fetch)","source":"const response = await fetch(\"https://caesura.today/api/v1/library\", {\n  method: \"GET\",\n  headers: {\n    Authorization: \"Bearer tc_YOUR_TOKEN\",\n  },\n});\nconst data = await response.json();"},{"lang":"Python","label":"Python (requests)","source":"import requests\n\nresponse = requests.request(\n    \"GET\",\n    \"https://caesura.today/api/v1/library\",\n    headers={\"Authorization\": \"Bearer tc_YOUR_TOKEN\"},\n)\ndata = response.json()"}],"description":"Requires the `library:read` scope, or `current:read`.","security":[{"bearerAuth":["library:read"]},{"bearerAuth":["current:read"]}],"parameters":[{"name":"limit","in":"query","required":false,"description":"1 to 200. A value outside that range is refused, never clamped.","schema":{"type":"integer","minimum":1,"maximum":200}},{"name":"cursor","in":"query","required":false,"description":"Opaque. Pass back the `nextCursor` of the previous page.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","required":["items","nextCursor"],"properties":{"items":{"type":"array","items":{"type":"object","properties":{"savedDayId":{"type":"string","format":"uuid"},"ownerId":{"type":"string","minLength":1},"name":{"type":"string","minLength":1,"maxLength":200},"stops":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"timeWindow":{"type":"object","properties":{"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["start","end"],"additionalProperties":false,"nullable":true},"location":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"lat":{"type":"number","minimum":-90,"maximum":90,"description":"Send with lng, or omit both. When omitted on a v1 write, the server geocodes `address`, then `name`."},"lng":{"type":"number","minimum":-180,"maximum":180,"description":"Send with lat, or omit both."},"countryCode":{"type":"string","pattern":"^[A-Z]{2}$"},"city":{"type":"string","minLength":1,"maxLength":200},"area":{"type":"string","minLength":1,"maxLength":200},"precision":{"type":"string","enum":["venue","area","city"],"description":"What the coordinates describe: a `venue`, an `area` or a `city`. Requires `lat` and `lng` — sent without them it is refused (\"precision requires coordinates\")."},"verified":{"type":"boolean","enum":[false],"description":"`false` when no geocoder confirmed the coordinates (an assistant's guess). Absent = unknown. Requires `lat` and `lng`."},"address":{"type":"object","properties":{"countryCode":{"type":"string","pattern":"^[A-Z]{2}$","description":"ISO 3166-1 alpha-2, uppercase. Decides how the other fields are read."},"lines":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"description":"Street-level part, in the country's own order, e.g. [\"Hauptstraße 5\"] or [\"1-2-3 Nishi-Azabu\"]."},"dependentLocality":{"type":"string","minLength":1,"maxLength":200,"description":"District, neighbourhood or suburb when it is part of the postal address."},"locality":{"type":"string","minLength":1,"maxLength":200,"description":"City, town or post town."},"administrativeArea":{"type":"string","minLength":1,"maxLength":200,"description":"State, province, prefecture or region."},"postalCode":{"type":"string","minLength":1,"maxLength":20,"description":"A string: keeps leading zeros and letters."}},"required":["countryCode","lines"],"additionalProperties":false}},"required":["name"],"additionalProperties":false,"nullable":true},"notes":{"type":"string","nullable":true},"anchors":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["dayOfWeek"]},"days":{"minItems":1,"type":"array","items":{"type":"string","enum":["mon","tue","wed","thu","fri","sat","sun"]}}},"required":["kind","days"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["dateRange"]},"from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["kind","from","to"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["timeOfDay"]},"window":{"type":"object","properties":{"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["start","end"],"additionalProperties":false}},"required":["kind","window"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["publicHoliday"]},"country":{"type":"string","pattern":"^[A-Z]{2}$"}},"required":["kind","country"],"additionalProperties":false}]}},"kind":{"type":"string","enum":["planned","pending","transit"]},"tags":{"type":"array","items":{"type":"string","enum":["meal","lodging","ticketed","outdoors","drinks","nightlife","museum","sight","beach","shopping","show","tour","wellness","sports"]}},"cost":{"type":"object","properties":{"amountMinor":{"type":"integer","minimum":0},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"],"additionalProperties":false,"nullable":true},"dayIndex":{"type":"integer","minimum":0,"default":0},"mode":{"type":"string","enum":["walk","bus","train","flight","ferry","car","bike"],"nullable":true,"default":null},"endLocation":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"lat":{"type":"number","minimum":-90,"maximum":90,"description":"Send with lng, or omit both. When omitted on a v1 write, the server geocodes `address`, then `name`."},"lng":{"type":"number","minimum":-180,"maximum":180,"description":"Send with lat, or omit both."},"countryCode":{"type":"string","pattern":"^[A-Z]{2}$"},"city":{"type":"string","minLength":1,"maxLength":200},"area":{"type":"string","minLength":1,"maxLength":200},"precision":{"type":"string","enum":["venue","area","city"],"description":"What the coordinates describe: a `venue`, an `area` or a `city`. Requires `lat` and `lng` — sent without them it is refused (\"precision requires coordinates\")."},"verified":{"type":"boolean","enum":[false],"description":"`false` when no geocoder confirmed the coordinates (an assistant's guess). Absent = unknown. Requires `lat` and `lng`."},"address":{"type":"object","properties":{"countryCode":{"type":"string","pattern":"^[A-Z]{2}$","description":"ISO 3166-1 alpha-2, uppercase. Decides how the other fields are read."},"lines":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"description":"Street-level part, in the country's own order, e.g. [\"Hauptstraße 5\"] or [\"1-2-3 Nishi-Azabu\"]."},"dependentLocality":{"type":"string","minLength":1,"maxLength":200,"description":"District, neighbourhood or suburb when it is part of the postal address."},"locality":{"type":"string","minLength":1,"maxLength":200,"description":"City, town or post town."},"administrativeArea":{"type":"string","minLength":1,"maxLength":200,"description":"State, province, prefecture or region."},"postalCode":{"type":"string","minLength":1,"maxLength":20,"description":"A string: keeps leading zeros and letters."}},"required":["countryCode","lines"],"additionalProperties":false}},"required":["name"],"additionalProperties":false,"nullable":true,"default":null},"pendingReason":{"type":"string","enum":["book","maybe"],"nullable":true,"default":null},"flightNumber":{"type":"string","nullable":true,"default":null},"booking":{"type":"object","properties":{"provider":{"type":"string","nullable":true}},"required":["provider"],"additionalProperties":false,"nullable":true,"default":null}},"required":["title","timeWindow","location","notes","anchors","kind","tags","cost"],"additionalProperties":false}},"dayCount":{"type":"integer","minimum":1,"default":1},"cities":{"type":"array","items":{"type":"string","minLength":1}},"visibility":{"type":"string","enum":["private","public"]},"authorKind":{"type":"string","enum":["human","ai"],"default":"human"},"adds":{"type":"integer","minimum":0},"sourceTripId":{"type":"string","format":"uuid"},"sourceTripName":{"type":"string","minLength":1,"maxLength":200},"createdAt":{"type":"string"}},"required":["savedDayId","ownerId","name","stops","cities","visibility","adds","sourceTripId","sourceTripName","createdAt"],"additionalProperties":false}},"nextCursor":{"type":"string","nullable":true}}}}}},"4XX":{"description":"One envelope for every failure: `{ error: { code, message, details? } }`. 401 carries `WWW-Authenticate: Bearer`; 429 carries `Retry-After`."}}},"post":{"summary":"Save one day of a trip you can see into your library","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://caesura.today/api/v1/library' \\\n  -H 'Authorization: Bearer tc_YOUR_TOKEN' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n  \"tripId\": \"00000000-0000-4000-8000-000000000000\",\n  \"dayId\": \"00000000-0000-4000-8000-000000000000\",\n  \"name\": \"string\"\n}'"},{"lang":"JavaScript","label":"JavaScript (fetch)","source":"const response = await fetch(\"https://caesura.today/api/v1/library\", {\n  method: \"POST\",\n  headers: {\n    Authorization: \"Bearer tc_YOUR_TOKEN\",\n    \"Content-Type\": \"application/json\",\n  },\n  body: JSON.stringify({\n    \"tripId\": \"00000000-0000-4000-8000-000000000000\",\n    \"dayId\": \"00000000-0000-4000-8000-000000000000\",\n    \"name\": \"string\"\n  }),\n});\nconst data = await response.json();"},{"lang":"Python","label":"Python (requests)","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://caesura.today/api/v1/library\",\n    headers={\"Authorization\": \"Bearer tc_YOUR_TOKEN\"},\n    json={\"tripId\": \"00000000-0000-4000-8000-000000000000\", \"dayId\": \"00000000-0000-4000-8000-000000000000\", \"name\": \"string\"},\n)\ndata = response.json()"}],"description":"Requires the `library:write` scope. Requires at least the `viewer` role on the trip the body names, if it names one. A saved day has no dates, so a stop's calendar-date (`dateRange`) anchor is removed on the way in and named in `warnings` (`date-anchor-removed`), as `POST /v1/playbooks` does. Weekday, time-of-day and public-holiday anchors are kept. `warnings` is on this answer only; the stored day does not carry it.","security":[{"bearerAuth":["library:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"tripId":{"type":"string","format":"uuid"},"dayId":{"type":"string","format":"uuid"},"name":{"type":"string","minLength":1,"maxLength":200}},"required":["tripId","dayId","name"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"savedDayId":{"type":"string","format":"uuid"},"ownerId":{"type":"string","minLength":1},"name":{"type":"string","minLength":1,"maxLength":200},"stops":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"timeWindow":{"type":"object","properties":{"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["start","end"],"additionalProperties":false,"nullable":true},"location":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"lat":{"type":"number","minimum":-90,"maximum":90,"description":"Send with lng, or omit both. When omitted on a v1 write, the server geocodes `address`, then `name`."},"lng":{"type":"number","minimum":-180,"maximum":180,"description":"Send with lat, or omit both."},"countryCode":{"type":"string","pattern":"^[A-Z]{2}$"},"city":{"type":"string","minLength":1,"maxLength":200},"area":{"type":"string","minLength":1,"maxLength":200},"precision":{"type":"string","enum":["venue","area","city"],"description":"What the coordinates describe: a `venue`, an `area` or a `city`. Requires `lat` and `lng` — sent without them it is refused (\"precision requires coordinates\")."},"verified":{"type":"boolean","enum":[false],"description":"`false` when no geocoder confirmed the coordinates (an assistant's guess). Absent = unknown. Requires `lat` and `lng`."},"address":{"type":"object","properties":{"countryCode":{"type":"string","pattern":"^[A-Z]{2}$","description":"ISO 3166-1 alpha-2, uppercase. Decides how the other fields are read."},"lines":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"description":"Street-level part, in the country's own order, e.g. [\"Hauptstraße 5\"] or [\"1-2-3 Nishi-Azabu\"]."},"dependentLocality":{"type":"string","minLength":1,"maxLength":200,"description":"District, neighbourhood or suburb when it is part of the postal address."},"locality":{"type":"string","minLength":1,"maxLength":200,"description":"City, town or post town."},"administrativeArea":{"type":"string","minLength":1,"maxLength":200,"description":"State, province, prefecture or region."},"postalCode":{"type":"string","minLength":1,"maxLength":20,"description":"A string: keeps leading zeros and letters."}},"required":["countryCode","lines"],"additionalProperties":false}},"required":["name"],"additionalProperties":false,"nullable":true},"notes":{"type":"string","nullable":true},"anchors":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["dayOfWeek"]},"days":{"minItems":1,"type":"array","items":{"type":"string","enum":["mon","tue","wed","thu","fri","sat","sun"]}}},"required":["kind","days"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["dateRange"]},"from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["kind","from","to"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["timeOfDay"]},"window":{"type":"object","properties":{"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["start","end"],"additionalProperties":false}},"required":["kind","window"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["publicHoliday"]},"country":{"type":"string","pattern":"^[A-Z]{2}$"}},"required":["kind","country"],"additionalProperties":false}]}},"kind":{"type":"string","enum":["planned","pending","transit"]},"tags":{"type":"array","items":{"type":"string","enum":["meal","lodging","ticketed","outdoors","drinks","nightlife","museum","sight","beach","shopping","show","tour","wellness","sports"]}},"cost":{"type":"object","properties":{"amountMinor":{"type":"integer","minimum":0},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"],"additionalProperties":false,"nullable":true},"dayIndex":{"type":"integer","minimum":0,"default":0},"mode":{"type":"string","enum":["walk","bus","train","flight","ferry","car","bike"],"nullable":true,"default":null},"endLocation":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"lat":{"type":"number","minimum":-90,"maximum":90,"description":"Send with lng, or omit both. When omitted on a v1 write, the server geocodes `address`, then `name`."},"lng":{"type":"number","minimum":-180,"maximum":180,"description":"Send with lat, or omit both."},"countryCode":{"type":"string","pattern":"^[A-Z]{2}$"},"city":{"type":"string","minLength":1,"maxLength":200},"area":{"type":"string","minLength":1,"maxLength":200},"precision":{"type":"string","enum":["venue","area","city"],"description":"What the coordinates describe: a `venue`, an `area` or a `city`. Requires `lat` and `lng` — sent without them it is refused (\"precision requires coordinates\")."},"verified":{"type":"boolean","enum":[false],"description":"`false` when no geocoder confirmed the coordinates (an assistant's guess). Absent = unknown. Requires `lat` and `lng`."},"address":{"type":"object","properties":{"countryCode":{"type":"string","pattern":"^[A-Z]{2}$","description":"ISO 3166-1 alpha-2, uppercase. Decides how the other fields are read."},"lines":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"description":"Street-level part, in the country's own order, e.g. [\"Hauptstraße 5\"] or [\"1-2-3 Nishi-Azabu\"]."},"dependentLocality":{"type":"string","minLength":1,"maxLength":200,"description":"District, neighbourhood or suburb when it is part of the postal address."},"locality":{"type":"string","minLength":1,"maxLength":200,"description":"City, town or post town."},"administrativeArea":{"type":"string","minLength":1,"maxLength":200,"description":"State, province, prefecture or region."},"postalCode":{"type":"string","minLength":1,"maxLength":20,"description":"A string: keeps leading zeros and letters."}},"required":["countryCode","lines"],"additionalProperties":false}},"required":["name"],"additionalProperties":false,"nullable":true,"default":null},"pendingReason":{"type":"string","enum":["book","maybe"],"nullable":true,"default":null},"flightNumber":{"type":"string","nullable":true,"default":null},"booking":{"type":"object","properties":{"provider":{"type":"string","nullable":true}},"required":["provider"],"additionalProperties":false,"nullable":true,"default":null}},"required":["title","timeWindow","location","notes","anchors","kind","tags","cost"],"additionalProperties":false}},"dayCount":{"type":"integer","minimum":1,"default":1},"cities":{"type":"array","items":{"type":"string","minLength":1}},"visibility":{"type":"string","enum":["private","public"]},"authorKind":{"type":"string","enum":["human","ai"],"default":"human"},"adds":{"type":"integer","minimum":0},"sourceTripId":{"type":"string","format":"uuid"},"sourceTripName":{"type":"string","minLength":1,"maxLength":200},"createdAt":{"type":"string"},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","enum":["date-anchor-removed"]},"stopIndex":{"type":"integer","minimum":0},"title":{"type":"string"},"message":{"type":"string"}},"required":["code","stopIndex","title","message"],"additionalProperties":false}}},"required":["savedDayId","ownerId","name","stops","cities","visibility","adds","sourceTripId","sourceTripName","createdAt","warnings"],"additionalProperties":false}}}},"4XX":{"description":"One envelope for every failure: `{ error: { code, message, details? } }`. 401 carries `WWW-Authenticate: Bearer`; 429 carries `Retry-After`."}}}},"/v1/playbooks/{playbookId}/cover":{"get":{"summary":"Get a playbook's cover image, or null when it has none","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://caesura.today/api/v1/playbooks/YOUR_PLAYBOOK_ID/cover' \\\n  -H 'Authorization: Bearer tc_YOUR_TOKEN'"},{"lang":"JavaScript","label":"JavaScript (fetch)","source":"const response = await fetch(\"https://caesura.today/api/v1/playbooks/YOUR_PLAYBOOK_ID/cover\", {\n  method: \"GET\",\n  headers: {\n    Authorization: \"Bearer tc_YOUR_TOKEN\",\n  },\n});\nconst data = await response.json();"},{"lang":"Python","label":"Python (requests)","source":"import requests\n\nresponse = requests.request(\n    \"GET\",\n    \"https://caesura.today/api/v1/playbooks/YOUR_PLAYBOOK_ID/cover\",\n    headers={\"Authorization\": \"Bearer tc_YOUR_TOKEN\"},\n)\ndata = response.json()"}],"description":"Requires the `library:read` scope, or `current:read`.","security":[{"bearerAuth":["library:read"]},{"bearerAuth":["current:read"]}],"parameters":[{"name":"playbookId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"cover":{"anyOf":[{"type":"object","properties":{"source":{"type":"string","enum":["unsplash"]},"unsplashId":{"type":"string","minLength":1},"urls":{"type":"object","properties":{"raw":{"type":"string","minLength":1,"maxLength":2048},"regular":{"type":"string","minLength":1,"maxLength":2048},"small":{"type":"string","minLength":1,"maxLength":2048}},"required":["raw","regular","small"],"additionalProperties":false},"alt":{"type":"string","nullable":true,"default":null},"photographerName":{"type":"string","minLength":1},"photographerUrl":{"type":"string","minLength":1,"maxLength":2048},"photoPageUrl":{"type":"string","minLength":1,"maxLength":2048},"position":{"type":"integer","minimum":0,"maximum":100,"default":50}},"required":["source","unsplashId","urls","photographerName","photographerUrl","photoPageUrl"],"additionalProperties":false},{"type":"object","properties":{"source":{"type":"string","enum":["url"]},"url":{"type":"string","minLength":1,"maxLength":2048},"alt":{"type":"string","maxLength":1000,"nullable":true,"default":null},"credit":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"url":{"type":"string","minLength":1,"maxLength":2048,"nullable":true,"default":null}},"required":["name"],"additionalProperties":false,"nullable":true,"default":null},"position":{"type":"integer","minimum":0,"maximum":100,"default":50},"proxySrc":{"type":"string","minLength":1,"maxLength":2048}},"required":["source","url"],"additionalProperties":false}],"nullable":true}},"required":["cover"],"additionalProperties":false}}}},"4XX":{"description":"One envelope for every failure: `{ error: { code, message, details? } }`. 401 carries `WWW-Authenticate: Bearer`; 429 carries `Retry-After`."}}},"put":{"summary":"Set a playbook's cover to the image at a URL","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X PUT 'https://caesura.today/api/v1/playbooks/YOUR_PLAYBOOK_ID/cover' \\\n  -H 'Authorization: Bearer tc_YOUR_TOKEN' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n  \"url\": \"string\"\n}'"},{"lang":"JavaScript","label":"JavaScript (fetch)","source":"const response = await fetch(\"https://caesura.today/api/v1/playbooks/YOUR_PLAYBOOK_ID/cover\", {\n  method: \"PUT\",\n  headers: {\n    Authorization: \"Bearer tc_YOUR_TOKEN\",\n    \"Content-Type\": \"application/json\",\n  },\n  body: JSON.stringify({\n    \"url\": \"string\"\n  }),\n});\nconst data = await response.json();"},{"lang":"Python","label":"Python (requests)","source":"import requests\n\nresponse = requests.request(\n    \"PUT\",\n    \"https://caesura.today/api/v1/playbooks/YOUR_PLAYBOOK_ID/cover\",\n    headers={\"Authorization\": \"Bearer tc_YOUR_TOKEN\"},\n    json={\"url\": \"string\"},\n)\ndata = response.json()"}],"description":"Requires the `library:write` scope.","security":[{"bearerAuth":["library:write"]}],"parameters":[{"name":"playbookId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","minLength":1,"maxLength":2048},"alt":{"type":"string","maxLength":1000,"nullable":true,"default":null},"credit":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"url":{"type":"string","minLength":1,"maxLength":2048,"nullable":true,"default":null}},"required":["name"],"additionalProperties":false,"nullable":true,"default":null},"position":{"type":"integer","minimum":0,"maximum":100,"default":50}},"required":["url"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"cover":{"anyOf":[{"type":"object","properties":{"source":{"type":"string","enum":["unsplash"]},"unsplashId":{"type":"string","minLength":1},"urls":{"type":"object","properties":{"raw":{"type":"string","minLength":1,"maxLength":2048},"regular":{"type":"string","minLength":1,"maxLength":2048},"small":{"type":"string","minLength":1,"maxLength":2048}},"required":["raw","regular","small"],"additionalProperties":false},"alt":{"type":"string","nullable":true,"default":null},"photographerName":{"type":"string","minLength":1},"photographerUrl":{"type":"string","minLength":1,"maxLength":2048},"photoPageUrl":{"type":"string","minLength":1,"maxLength":2048},"position":{"type":"integer","minimum":0,"maximum":100,"default":50}},"required":["source","unsplashId","urls","photographerName","photographerUrl","photoPageUrl"],"additionalProperties":false},{"type":"object","properties":{"source":{"type":"string","enum":["url"]},"url":{"type":"string","minLength":1,"maxLength":2048},"alt":{"type":"string","maxLength":1000,"nullable":true,"default":null},"credit":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"url":{"type":"string","minLength":1,"maxLength":2048,"nullable":true,"default":null}},"required":["name"],"additionalProperties":false,"nullable":true,"default":null},"position":{"type":"integer","minimum":0,"maximum":100,"default":50},"proxySrc":{"type":"string","minLength":1,"maxLength":2048}},"required":["source","url"],"additionalProperties":false}],"nullable":true}},"required":["cover"],"additionalProperties":false}}}},"4XX":{"description":"One envelope for every failure: `{ error: { code, message, details? } }`. 401 carries `WWW-Authenticate: Bearer`; 429 carries `Retry-After`."}}},"patch":{"summary":"Move where a playbook's cover is framed, from 0 (top) to 100 (bottom)","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X PATCH 'https://caesura.today/api/v1/playbooks/YOUR_PLAYBOOK_ID/cover' \\\n  -H 'Authorization: Bearer tc_YOUR_TOKEN' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n  \"position\": 0\n}'"},{"lang":"JavaScript","label":"JavaScript (fetch)","source":"const response = await fetch(\"https://caesura.today/api/v1/playbooks/YOUR_PLAYBOOK_ID/cover\", {\n  method: \"PATCH\",\n  headers: {\n    Authorization: \"Bearer tc_YOUR_TOKEN\",\n    \"Content-Type\": \"application/json\",\n  },\n  body: JSON.stringify({\n    \"position\": 0\n  }),\n});\nconst data = await response.json();"},{"lang":"Python","label":"Python (requests)","source":"import requests\n\nresponse = requests.request(\n    \"PATCH\",\n    \"https://caesura.today/api/v1/playbooks/YOUR_PLAYBOOK_ID/cover\",\n    headers={\"Authorization\": \"Bearer tc_YOUR_TOKEN\"},\n    json={\"position\": 0},\n)\ndata = response.json()"}],"description":"Requires the `library:write` scope.","security":[{"bearerAuth":["library:write"]}],"parameters":[{"name":"playbookId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"position":{"type":"integer","minimum":0,"maximum":100}},"required":["position"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"cover":{"anyOf":[{"type":"object","properties":{"source":{"type":"string","enum":["unsplash"]},"unsplashId":{"type":"string","minLength":1},"urls":{"type":"object","properties":{"raw":{"type":"string","minLength":1,"maxLength":2048},"regular":{"type":"string","minLength":1,"maxLength":2048},"small":{"type":"string","minLength":1,"maxLength":2048}},"required":["raw","regular","small"],"additionalProperties":false},"alt":{"type":"string","nullable":true,"default":null},"photographerName":{"type":"string","minLength":1},"photographerUrl":{"type":"string","minLength":1,"maxLength":2048},"photoPageUrl":{"type":"string","minLength":1,"maxLength":2048},"position":{"type":"integer","minimum":0,"maximum":100,"default":50}},"required":["source","unsplashId","urls","photographerName","photographerUrl","photoPageUrl"],"additionalProperties":false},{"type":"object","properties":{"source":{"type":"string","enum":["url"]},"url":{"type":"string","minLength":1,"maxLength":2048},"alt":{"type":"string","maxLength":1000,"nullable":true,"default":null},"credit":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"url":{"type":"string","minLength":1,"maxLength":2048,"nullable":true,"default":null}},"required":["name"],"additionalProperties":false,"nullable":true,"default":null},"position":{"type":"integer","minimum":0,"maximum":100,"default":50},"proxySrc":{"type":"string","minLength":1,"maxLength":2048}},"required":["source","url"],"additionalProperties":false}],"nullable":true}},"required":["cover"],"additionalProperties":false}}}},"4XX":{"description":"One envelope for every failure: `{ error: { code, message, details? } }`. 401 carries `WWW-Authenticate: Bearer`; 429 carries `Retry-After`."}}},"delete":{"summary":"Remove a playbook's cover","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X DELETE 'https://caesura.today/api/v1/playbooks/YOUR_PLAYBOOK_ID/cover' \\\n  -H 'Authorization: Bearer tc_YOUR_TOKEN'"},{"lang":"JavaScript","label":"JavaScript (fetch)","source":"const response = await fetch(\"https://caesura.today/api/v1/playbooks/YOUR_PLAYBOOK_ID/cover\", {\n  method: \"DELETE\",\n  headers: {\n    Authorization: \"Bearer tc_YOUR_TOKEN\",\n  },\n});\nconst data = await response.json();"},{"lang":"Python","label":"Python (requests)","source":"import requests\n\nresponse = requests.request(\n    \"DELETE\",\n    \"https://caesura.today/api/v1/playbooks/YOUR_PLAYBOOK_ID/cover\",\n    headers={\"Authorization\": \"Bearer tc_YOUR_TOKEN\"},\n)\ndata = response.json()"}],"description":"Requires the `library:write` scope.","security":[{"bearerAuth":["library:write"]}],"parameters":[{"name":"playbookId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"cover":{"anyOf":[{"type":"object","properties":{"source":{"type":"string","enum":["unsplash"]},"unsplashId":{"type":"string","minLength":1},"urls":{"type":"object","properties":{"raw":{"type":"string","minLength":1,"maxLength":2048},"regular":{"type":"string","minLength":1,"maxLength":2048},"small":{"type":"string","minLength":1,"maxLength":2048}},"required":["raw","regular","small"],"additionalProperties":false},"alt":{"type":"string","nullable":true,"default":null},"photographerName":{"type":"string","minLength":1},"photographerUrl":{"type":"string","minLength":1,"maxLength":2048},"photoPageUrl":{"type":"string","minLength":1,"maxLength":2048},"position":{"type":"integer","minimum":0,"maximum":100,"default":50}},"required":["source","unsplashId","urls","photographerName","photographerUrl","photoPageUrl"],"additionalProperties":false},{"type":"object","properties":{"source":{"type":"string","enum":["url"]},"url":{"type":"string","minLength":1,"maxLength":2048},"alt":{"type":"string","maxLength":1000,"nullable":true,"default":null},"credit":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"url":{"type":"string","minLength":1,"maxLength":2048,"nullable":true,"default":null}},"required":["name"],"additionalProperties":false,"nullable":true,"default":null},"position":{"type":"integer","minimum":0,"maximum":100,"default":50},"proxySrc":{"type":"string","minLength":1,"maxLength":2048}},"required":["source","url"],"additionalProperties":false}],"nullable":true}},"required":["cover"],"additionalProperties":false}}}},"4XX":{"description":"One envelope for every failure: `{ error: { code, message, details? } }`. 401 carries `WWW-Authenticate: Bearer`; 429 carries `Retry-After`."}}}},"/v1/playbooks/{playbookId}/export":{"get":{"summary":"Download a Playbook — yours, or anyone's published one — as a content-bundle file you can re-import","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://caesura.today/api/v1/playbooks/YOUR_PLAYBOOK_ID/export' \\\n  -H 'Authorization: Bearer tc_YOUR_TOKEN'"},{"lang":"JavaScript","label":"JavaScript (fetch)","source":"const response = await fetch(\"https://caesura.today/api/v1/playbooks/YOUR_PLAYBOOK_ID/export\", {\n  method: \"GET\",\n  headers: {\n    Authorization: \"Bearer tc_YOUR_TOKEN\",\n  },\n});\nconst data = await response.json();"},{"lang":"Python","label":"Python (requests)","source":"import requests\n\nresponse = requests.request(\n    \"GET\",\n    \"https://caesura.today/api/v1/playbooks/YOUR_PLAYBOOK_ID/export\",\n    headers={\"Authorization\": \"Bearer tc_YOUR_TOKEN\"},\n)\ndata = response.json()"}],"description":"Requires the `library:read` scope, or `current:read`.","security":[{"bearerAuth":["library:read"]},{"bearerAuth":["current:read"]}],"parameters":[{"name":"playbookId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success.","headers":{"Content-Disposition":{"description":"Names the download. The filename is the Playbook's name, slugified.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"$schema":{"type":"string","enum":["travel-collab/content-bundle/v1"]},"bundle":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[a-z0-9-]+$"},"name":{"type":"string","minLength":1,"maxLength":200},"origin":{"type":"string","enum":["human","ai"]},"sources":{"type":"array","items":{"type":"string"},"default":[]},"generatedAt":{"type":"string"},"description":{"type":"string","maxLength":1000}},"required":["id","name","origin"],"additionalProperties":false},"trips":{"type":"array","items":{},"maxItems":0,"minItems":0,"default":[]},"playbooks":{"minItems":1,"maxItems":1,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[a-z0-9-]+$"},"name":{"type":"string","minLength":1,"maxLength":200},"summary":{"type":"string","maxLength":500},"ownerId":{"type":"string","minLength":1},"visibility":{"type":"string","enum":["private","public"],"default":"private"},"origin":{"type":"string","enum":["human","ai"]},"keptOn":{"type":"string"},"sourceTrip":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string","minLength":1,"maxLength":200}},"required":["name"],"additionalProperties":false},"addedBy":{"type":"array","items":{"type":"object","properties":{"tripId":{"type":"string","format":"uuid"},"addedBy":{"type":"string","minLength":1}},"required":["addedBy"],"additionalProperties":false},"default":[]},"version":{"type":"integer","minimum":1},"stops":{"minItems":1,"type":"array","items":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"timeWindow":{"type":"object","properties":{"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["start","end"],"additionalProperties":false},"location":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"lat":{"type":"number","minimum":-90,"maximum":90,"description":"Send with lng, or omit both. When omitted on a v1 write, the server geocodes `address`, then `name`."},"lng":{"type":"number","minimum":-180,"maximum":180,"description":"Send with lat, or omit both."},"countryCode":{"type":"string","pattern":"^[A-Z]{2}$"},"city":{"type":"string","minLength":1,"maxLength":200},"area":{"type":"string","minLength":1,"maxLength":200},"precision":{"type":"string","enum":["venue","area","city"],"description":"What the coordinates describe: a `venue`, an `area` or a `city`. Requires `lat` and `lng` — sent without them it is refused (\"precision requires coordinates\")."},"verified":{"type":"boolean","enum":[false],"description":"`false` when no geocoder confirmed the coordinates (an assistant's guess). Absent = unknown. Requires `lat` and `lng`."},"address":{"type":"object","properties":{"countryCode":{"type":"string","pattern":"^[A-Z]{2}$","description":"ISO 3166-1 alpha-2, uppercase. Decides how the other fields are read."},"lines":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"description":"Street-level part, in the country's own order, e.g. [\"Hauptstraße 5\"] or [\"1-2-3 Nishi-Azabu\"]."},"dependentLocality":{"type":"string","minLength":1,"maxLength":200,"description":"District, neighbourhood or suburb when it is part of the postal address."},"locality":{"type":"string","minLength":1,"maxLength":200,"description":"City, town or post town."},"administrativeArea":{"type":"string","minLength":1,"maxLength":200,"description":"State, province, prefecture or region."},"postalCode":{"type":"string","minLength":1,"maxLength":20,"description":"A string: keeps leading zeros and letters."}},"required":["countryCode","lines"],"additionalProperties":false}},"required":["name"],"additionalProperties":false},"notes":{"type":"string","maxLength":2000},"anchors":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["dayOfWeek"]},"days":{"minItems":1,"type":"array","items":{"type":"string","enum":["mon","tue","wed","thu","fri","sat","sun"]}}},"required":["kind","days"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["dateRange"]},"from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["kind","from","to"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["timeOfDay"]},"window":{"type":"object","properties":{"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["start","end"],"additionalProperties":false}},"required":["kind","window"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["publicHoliday"]},"country":{"type":"string","pattern":"^[A-Z]{2}$"}},"required":["kind","country"],"additionalProperties":false}]}},"kind":{"type":"string","enum":["planned","pending","transit"]},"tags":{"type":"array","items":{"type":"string","enum":["meal","lodging","ticketed","outdoors","drinks","nightlife","museum","sight","beach","shopping","show","tour","wellness","sports"]}},"cost":{"type":"object","properties":{"amountMinor":{"type":"integer","minimum":0},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"],"additionalProperties":false},"mode":{"type":"string","enum":["walk","bus","train","flight","ferry","car","bike"]},"endLocation":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"lat":{"type":"number","minimum":-90,"maximum":90,"description":"Send with lng, or omit both. When omitted on a v1 write, the server geocodes `address`, then `name`."},"lng":{"type":"number","minimum":-180,"maximum":180,"description":"Send with lat, or omit both."},"countryCode":{"type":"string","pattern":"^[A-Z]{2}$"},"city":{"type":"string","minLength":1,"maxLength":200},"area":{"type":"string","minLength":1,"maxLength":200},"precision":{"type":"string","enum":["venue","area","city"],"description":"What the coordinates describe: a `venue`, an `area` or a `city`. Requires `lat` and `lng` — sent without them it is refused (\"precision requires coordinates\")."},"verified":{"type":"boolean","enum":[false],"description":"`false` when no geocoder confirmed the coordinates (an assistant's guess). Absent = unknown. Requires `lat` and `lng`."},"address":{"type":"object","properties":{"countryCode":{"type":"string","pattern":"^[A-Z]{2}$","description":"ISO 3166-1 alpha-2, uppercase. Decides how the other fields are read."},"lines":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"description":"Street-level part, in the country's own order, e.g. [\"Hauptstraße 5\"] or [\"1-2-3 Nishi-Azabu\"]."},"dependentLocality":{"type":"string","minLength":1,"maxLength":200,"description":"District, neighbourhood or suburb when it is part of the postal address."},"locality":{"type":"string","minLength":1,"maxLength":200,"description":"City, town or post town."},"administrativeArea":{"type":"string","minLength":1,"maxLength":200,"description":"State, province, prefecture or region."},"postalCode":{"type":"string","minLength":1,"maxLength":20,"description":"A string: keeps leading zeros and letters."}},"required":["countryCode","lines"],"additionalProperties":false}},"required":["name"],"additionalProperties":false},"pendingReason":{"type":"string","enum":["book","maybe"]},"flightNumber":{"type":"string","minLength":1,"maxLength":20},"booking":{"type":"object","properties":{"confirmation":{"type":"string","minLength":1,"maxLength":100},"provider":{"type":"string","minLength":1,"maxLength":100},"url":{"type":"string","maxLength":2000,"format":"uri"}},"additionalProperties":false}},"required":["title"],"additionalProperties":false}},"days":{"minItems":1,"type":"array","items":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":200},"stops":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"timeWindow":{"type":"object","properties":{"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["start","end"],"additionalProperties":false},"location":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"lat":{"type":"number","minimum":-90,"maximum":90,"description":"Send with lng, or omit both. When omitted on a v1 write, the server geocodes `address`, then `name`."},"lng":{"type":"number","minimum":-180,"maximum":180,"description":"Send with lat, or omit both."},"countryCode":{"type":"string","pattern":"^[A-Z]{2}$"},"city":{"type":"string","minLength":1,"maxLength":200},"area":{"type":"string","minLength":1,"maxLength":200},"precision":{"type":"string","enum":["venue","area","city"],"description":"What the coordinates describe: a `venue`, an `area` or a `city`. Requires `lat` and `lng` — sent without them it is refused (\"precision requires coordinates\")."},"verified":{"type":"boolean","enum":[false],"description":"`false` when no geocoder confirmed the coordinates (an assistant's guess). Absent = unknown. Requires `lat` and `lng`."},"address":{"type":"object","properties":{"countryCode":{"type":"string","pattern":"^[A-Z]{2}$","description":"ISO 3166-1 alpha-2, uppercase. Decides how the other fields are read."},"lines":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"description":"Street-level part, in the country's own order, e.g. [\"Hauptstraße 5\"] or [\"1-2-3 Nishi-Azabu\"]."},"dependentLocality":{"type":"string","minLength":1,"maxLength":200,"description":"District, neighbourhood or suburb when it is part of the postal address."},"locality":{"type":"string","minLength":1,"maxLength":200,"description":"City, town or post town."},"administrativeArea":{"type":"string","minLength":1,"maxLength":200,"description":"State, province, prefecture or region."},"postalCode":{"type":"string","minLength":1,"maxLength":20,"description":"A string: keeps leading zeros and letters."}},"required":["countryCode","lines"],"additionalProperties":false}},"required":["name"],"additionalProperties":false},"notes":{"type":"string","maxLength":2000},"anchors":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["dayOfWeek"]},"days":{"minItems":1,"type":"array","items":{"type":"string","enum":["mon","tue","wed","thu","fri","sat","sun"]}}},"required":["kind","days"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["dateRange"]},"from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["kind","from","to"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["timeOfDay"]},"window":{"type":"object","properties":{"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["start","end"],"additionalProperties":false}},"required":["kind","window"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["publicHoliday"]},"country":{"type":"string","pattern":"^[A-Z]{2}$"}},"required":["kind","country"],"additionalProperties":false}]}},"kind":{"type":"string","enum":["planned","pending","transit"]},"tags":{"type":"array","items":{"type":"string","enum":["meal","lodging","ticketed","outdoors","drinks","nightlife","museum","sight","beach","shopping","show","tour","wellness","sports"]}},"cost":{"type":"object","properties":{"amountMinor":{"type":"integer","minimum":0},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"],"additionalProperties":false},"mode":{"type":"string","enum":["walk","bus","train","flight","ferry","car","bike"]},"endLocation":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"lat":{"type":"number","minimum":-90,"maximum":90,"description":"Send with lng, or omit both. When omitted on a v1 write, the server geocodes `address`, then `name`."},"lng":{"type":"number","minimum":-180,"maximum":180,"description":"Send with lat, or omit both."},"countryCode":{"type":"string","pattern":"^[A-Z]{2}$"},"city":{"type":"string","minLength":1,"maxLength":200},"area":{"type":"string","minLength":1,"maxLength":200},"precision":{"type":"string","enum":["venue","area","city"],"description":"What the coordinates describe: a `venue`, an `area` or a `city`. Requires `lat` and `lng` — sent without them it is refused (\"precision requires coordinates\")."},"verified":{"type":"boolean","enum":[false],"description":"`false` when no geocoder confirmed the coordinates (an assistant's guess). Absent = unknown. Requires `lat` and `lng`."},"address":{"type":"object","properties":{"countryCode":{"type":"string","pattern":"^[A-Z]{2}$","description":"ISO 3166-1 alpha-2, uppercase. Decides how the other fields are read."},"lines":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"description":"Street-level part, in the country's own order, e.g. [\"Hauptstraße 5\"] or [\"1-2-3 Nishi-Azabu\"]."},"dependentLocality":{"type":"string","minLength":1,"maxLength":200,"description":"District, neighbourhood or suburb when it is part of the postal address."},"locality":{"type":"string","minLength":1,"maxLength":200,"description":"City, town or post town."},"administrativeArea":{"type":"string","minLength":1,"maxLength":200,"description":"State, province, prefecture or region."},"postalCode":{"type":"string","minLength":1,"maxLength":20,"description":"A string: keeps leading zeros and letters."}},"required":["countryCode","lines"],"additionalProperties":false}},"required":["name"],"additionalProperties":false},"pendingReason":{"type":"string","enum":["book","maybe"]},"flightNumber":{"type":"string","minLength":1,"maxLength":20},"booking":{"type":"object","properties":{"confirmation":{"type":"string","minLength":1,"maxLength":100},"provider":{"type":"string","minLength":1,"maxLength":100},"url":{"type":"string","maxLength":2000,"format":"uri"}},"additionalProperties":false}},"required":["title"],"additionalProperties":false}}},"required":["stops"],"additionalProperties":false}}},"required":["key","name","ownerId","sourceTrip"],"additionalProperties":false}},"notebooks":{"type":"array","items":{},"maxItems":0,"minItems":0,"default":[]},"activities":{"type":"array","items":{},"maxItems":0,"minItems":0,"default":[]}},"required":["$schema","bundle","playbooks"],"additionalProperties":false}}}},"4XX":{"description":"One envelope for every failure: `{ error: { code, message, details? } }`. 401 carries `WWW-Authenticate: Bearer`; 429 carries `Retry-After`."}}}},"/v1/playbooks/{playbookId}":{"get":{"summary":"Get a Playbook — yours, or anyone's published one — every day and stop in order","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://caesura.today/api/v1/playbooks/YOUR_PLAYBOOK_ID' \\\n  -H 'Authorization: Bearer tc_YOUR_TOKEN'"},{"lang":"JavaScript","label":"JavaScript (fetch)","source":"const response = await fetch(\"https://caesura.today/api/v1/playbooks/YOUR_PLAYBOOK_ID\", {\n  method: \"GET\",\n  headers: {\n    Authorization: \"Bearer tc_YOUR_TOKEN\",\n  },\n});\nconst data = await response.json();"},{"lang":"Python","label":"Python (requests)","source":"import requests\n\nresponse = requests.request(\n    \"GET\",\n    \"https://caesura.today/api/v1/playbooks/YOUR_PLAYBOOK_ID\",\n    headers={\"Authorization\": \"Bearer tc_YOUR_TOKEN\"},\n)\ndata = response.json()"}],"description":"Requires the `library:read` scope, or `current:read`. A Playbook is a view over saved days: the record is the same one `/v1/library` serves, and its id key is `savedDayId` (that value is the `playbookId` in these paths). Every Playbook record here also carries `playbookId`, the same value, so either key works. Writes take stops grouped by day, `days[].stops[]`; reads return them flat, `stops[]` in order with a 0-based `dayIndex` on each, plus `dayCount` — deliberately (ADR-048, ADR-050). Group by `dayIndex` to get days back.","security":[{"bearerAuth":["library:read"]},{"bearerAuth":["current:read"]}],"parameters":[{"name":"playbookId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"savedDayId":{"type":"string","format":"uuid"},"ownerId":{"type":"string","minLength":1},"name":{"type":"string","minLength":1,"maxLength":200},"stops":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"timeWindow":{"type":"object","properties":{"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["start","end"],"additionalProperties":false,"nullable":true},"location":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"lat":{"type":"number","minimum":-90,"maximum":90,"description":"Send with lng, or omit both. When omitted on a v1 write, the server geocodes `address`, then `name`."},"lng":{"type":"number","minimum":-180,"maximum":180,"description":"Send with lat, or omit both."},"countryCode":{"type":"string","pattern":"^[A-Z]{2}$"},"city":{"type":"string","minLength":1,"maxLength":200},"area":{"type":"string","minLength":1,"maxLength":200},"precision":{"type":"string","enum":["venue","area","city"],"description":"What the coordinates describe: a `venue`, an `area` or a `city`. Requires `lat` and `lng` — sent without them it is refused (\"precision requires coordinates\")."},"verified":{"type":"boolean","enum":[false],"description":"`false` when no geocoder confirmed the coordinates (an assistant's guess). Absent = unknown. Requires `lat` and `lng`."},"address":{"type":"object","properties":{"countryCode":{"type":"string","pattern":"^[A-Z]{2}$","description":"ISO 3166-1 alpha-2, uppercase. Decides how the other fields are read."},"lines":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"description":"Street-level part, in the country's own order, e.g. [\"Hauptstraße 5\"] or [\"1-2-3 Nishi-Azabu\"]."},"dependentLocality":{"type":"string","minLength":1,"maxLength":200,"description":"District, neighbourhood or suburb when it is part of the postal address."},"locality":{"type":"string","minLength":1,"maxLength":200,"description":"City, town or post town."},"administrativeArea":{"type":"string","minLength":1,"maxLength":200,"description":"State, province, prefecture or region."},"postalCode":{"type":"string","minLength":1,"maxLength":20,"description":"A string: keeps leading zeros and letters."}},"required":["countryCode","lines"],"additionalProperties":false}},"required":["name"],"additionalProperties":false,"nullable":true},"notes":{"type":"string","nullable":true},"anchors":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["dayOfWeek"]},"days":{"minItems":1,"type":"array","items":{"type":"string","enum":["mon","tue","wed","thu","fri","sat","sun"]}}},"required":["kind","days"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["dateRange"]},"from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["kind","from","to"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["timeOfDay"]},"window":{"type":"object","properties":{"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["start","end"],"additionalProperties":false}},"required":["kind","window"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["publicHoliday"]},"country":{"type":"string","pattern":"^[A-Z]{2}$"}},"required":["kind","country"],"additionalProperties":false}]}},"kind":{"type":"string","enum":["planned","pending","transit"]},"tags":{"type":"array","items":{"type":"string","enum":["meal","lodging","ticketed","outdoors","drinks","nightlife","museum","sight","beach","shopping","show","tour","wellness","sports"]}},"cost":{"type":"object","properties":{"amountMinor":{"type":"integer","minimum":0},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"],"additionalProperties":false,"nullable":true},"dayIndex":{"type":"integer","minimum":0,"default":0},"mode":{"type":"string","enum":["walk","bus","train","flight","ferry","car","bike"],"nullable":true,"default":null},"endLocation":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"lat":{"type":"number","minimum":-90,"maximum":90,"description":"Send with lng, or omit both. When omitted on a v1 write, the server geocodes `address`, then `name`."},"lng":{"type":"number","minimum":-180,"maximum":180,"description":"Send with lat, or omit both."},"countryCode":{"type":"string","pattern":"^[A-Z]{2}$"},"city":{"type":"string","minLength":1,"maxLength":200},"area":{"type":"string","minLength":1,"maxLength":200},"precision":{"type":"string","enum":["venue","area","city"],"description":"What the coordinates describe: a `venue`, an `area` or a `city`. Requires `lat` and `lng` — sent without them it is refused (\"precision requires coordinates\")."},"verified":{"type":"boolean","enum":[false],"description":"`false` when no geocoder confirmed the coordinates (an assistant's guess). Absent = unknown. Requires `lat` and `lng`."},"address":{"type":"object","properties":{"countryCode":{"type":"string","pattern":"^[A-Z]{2}$","description":"ISO 3166-1 alpha-2, uppercase. Decides how the other fields are read."},"lines":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"description":"Street-level part, in the country's own order, e.g. [\"Hauptstraße 5\"] or [\"1-2-3 Nishi-Azabu\"]."},"dependentLocality":{"type":"string","minLength":1,"maxLength":200,"description":"District, neighbourhood or suburb when it is part of the postal address."},"locality":{"type":"string","minLength":1,"maxLength":200,"description":"City, town or post town."},"administrativeArea":{"type":"string","minLength":1,"maxLength":200,"description":"State, province, prefecture or region."},"postalCode":{"type":"string","minLength":1,"maxLength":20,"description":"A string: keeps leading zeros and letters."}},"required":["countryCode","lines"],"additionalProperties":false}},"required":["name"],"additionalProperties":false,"nullable":true,"default":null},"pendingReason":{"type":"string","enum":["book","maybe"],"nullable":true,"default":null},"flightNumber":{"type":"string","nullable":true,"default":null},"booking":{"type":"object","properties":{"provider":{"type":"string","nullable":true}},"required":["provider"],"additionalProperties":false,"nullable":true,"default":null}},"required":["title","timeWindow","location","notes","anchors","kind","tags","cost"],"additionalProperties":false}},"dayCount":{"type":"integer","minimum":1,"default":1},"cities":{"type":"array","items":{"type":"string","minLength":1}},"visibility":{"type":"string","enum":["private","public"]},"authorKind":{"type":"string","enum":["human","ai"],"default":"human"},"adds":{"type":"integer","minimum":0},"sourceTripId":{"type":"string","format":"uuid"},"sourceTripName":{"type":"string","minLength":1,"maxLength":200},"createdAt":{"type":"string"},"version":{"type":"integer","minimum":1,"default":1},"summary":{"type":"string","maxLength":500,"nullable":true,"default":null},"playbookId":{"type":"string","format":"uuid","description":"The same value as `savedDayId`: the id in `/v1/playbooks/{playbookId}`."}},"required":["savedDayId","ownerId","name","stops","cities","visibility","adds","sourceTripId","sourceTripName","createdAt","playbookId"],"additionalProperties":false}}}},"4XX":{"description":"One envelope for every failure: `{ error: { code, message, details? } }`. 401 carries `WWW-Authenticate: Bearer`; 429 carries `Retry-After`."}}},"patch":{"summary":"Edit one of your Playbooks — rename it, summarise it, replace its days, or publish it","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X PATCH 'https://caesura.today/api/v1/playbooks/YOUR_PLAYBOOK_ID' \\\n  -H 'Authorization: Bearer tc_YOUR_TOKEN' \\\n  -H 'Content-Type: application/json' \\\n  -d '{}'"},{"lang":"JavaScript","label":"JavaScript (fetch)","source":"const response = await fetch(\"https://caesura.today/api/v1/playbooks/YOUR_PLAYBOOK_ID\", {\n  method: \"PATCH\",\n  headers: {\n    Authorization: \"Bearer tc_YOUR_TOKEN\",\n    \"Content-Type\": \"application/json\",\n  },\n  body: JSON.stringify({}),\n});\nconst data = await response.json();"},{"lang":"Python","label":"Python (requests)","source":"import requests\n\nresponse = requests.request(\n    \"PATCH\",\n    \"https://caesura.today/api/v1/playbooks/YOUR_PLAYBOOK_ID\",\n    headers={\"Authorization\": \"Bearer tc_YOUR_TOKEN\"},\n    json={},\n)\ndata = response.json()"}],"description":"Requires the `library:write` scope. A Playbook is a view over saved days: the record is the same one `/v1/library` serves, and its id key is `savedDayId` (that value is the `playbookId` in these paths). Every Playbook record here also carries `playbookId`, the same value, so either key works. Writes take stops grouped by day, `days[].stops[]`; reads return them flat, `stops[]` in order with a 0-based `dayIndex` on each, plus `dayCount` — deliberately (ADR-048, ADR-050). Group by `dayIndex` to get days back.","security":[{"bearerAuth":["library:write"]}],"parameters":[{"name":"playbookId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"summary":{"type":"string","maxLength":500,"nullable":true,"description":"null clears it."},"visibility":{"type":"string","enum":["private","public"]},"days":{"minItems":1,"maxItems":366,"type":"array","items":{"type":"object","properties":{"stops":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"timeWindow":{"type":"object","properties":{"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["start","end"],"additionalProperties":false,"nullable":true},"location":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"lat":{"type":"number","minimum":-90,"maximum":90,"description":"Send with lng, or omit both. When omitted on a v1 write, the server geocodes `address`, then `name`."},"lng":{"type":"number","minimum":-180,"maximum":180,"description":"Send with lat, or omit both."},"countryCode":{"type":"string","pattern":"^[A-Z]{2}$"},"city":{"type":"string","minLength":1,"maxLength":200},"area":{"type":"string","minLength":1,"maxLength":200},"precision":{"type":"string","enum":["venue","area","city"],"description":"What the coordinates describe: a `venue`, an `area` or a `city`. Requires `lat` and `lng` — sent without them it is refused (\"precision requires coordinates\")."},"verified":{"type":"boolean","enum":[false],"description":"`false` when no geocoder confirmed the coordinates (an assistant's guess). Absent = unknown. Requires `lat` and `lng`."},"address":{"type":"object","properties":{"countryCode":{"type":"string","pattern":"^[A-Z]{2}$","description":"ISO 3166-1 alpha-2, uppercase. Decides how the other fields are read."},"lines":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"description":"Street-level part, in the country's own order, e.g. [\"Hauptstraße 5\"] or [\"1-2-3 Nishi-Azabu\"]."},"dependentLocality":{"type":"string","minLength":1,"maxLength":200,"description":"District, neighbourhood or suburb when it is part of the postal address."},"locality":{"type":"string","minLength":1,"maxLength":200,"description":"City, town or post town."},"administrativeArea":{"type":"string","minLength":1,"maxLength":200,"description":"State, province, prefecture or region."},"postalCode":{"type":"string","minLength":1,"maxLength":20,"description":"A string: keeps leading zeros and letters."}},"required":["countryCode","lines"],"additionalProperties":false}},"required":["name"],"additionalProperties":false,"nullable":true},"notes":{"type":"string","maxLength":2000,"nullable":true},"anchors":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["dayOfWeek"]},"days":{"minItems":1,"type":"array","items":{"type":"string","enum":["mon","tue","wed","thu","fri","sat","sun"]}}},"required":["kind","days"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["dateRange"]},"from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["kind","from","to"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["timeOfDay"]},"window":{"type":"object","properties":{"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["start","end"],"additionalProperties":false}},"required":["kind","window"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["publicHoliday"]},"country":{"type":"string","pattern":"^[A-Z]{2}$"}},"required":["kind","country"],"additionalProperties":false}]}},"kind":{"type":"string","enum":["planned","pending","transit"]},"tags":{"type":"array","items":{"type":"string","enum":["meal","lodging","ticketed","outdoors","drinks","nightlife","museum","sight","beach","shopping","show","tour","wellness","sports"]}},"cost":{"type":"object","properties":{"amountMinor":{"type":"integer","minimum":0},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"],"additionalProperties":false,"nullable":true},"mode":{"type":"string","enum":["walk","bus","train","flight","ferry","car","bike"],"nullable":true,"default":null},"endLocation":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"lat":{"type":"number","minimum":-90,"maximum":90,"description":"Send with lng, or omit both. When omitted on a v1 write, the server geocodes `address`, then `name`."},"lng":{"type":"number","minimum":-180,"maximum":180,"description":"Send with lat, or omit both."},"countryCode":{"type":"string","pattern":"^[A-Z]{2}$"},"city":{"type":"string","minLength":1,"maxLength":200},"area":{"type":"string","minLength":1,"maxLength":200},"precision":{"type":"string","enum":["venue","area","city"],"description":"What the coordinates describe: a `venue`, an `area` or a `city`. Requires `lat` and `lng` — sent without them it is refused (\"precision requires coordinates\")."},"verified":{"type":"boolean","enum":[false],"description":"`false` when no geocoder confirmed the coordinates (an assistant's guess). Absent = unknown. Requires `lat` and `lng`."},"address":{"type":"object","properties":{"countryCode":{"type":"string","pattern":"^[A-Z]{2}$","description":"ISO 3166-1 alpha-2, uppercase. Decides how the other fields are read."},"lines":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"description":"Street-level part, in the country's own order, e.g. [\"Hauptstraße 5\"] or [\"1-2-3 Nishi-Azabu\"]."},"dependentLocality":{"type":"string","minLength":1,"maxLength":200,"description":"District, neighbourhood or suburb when it is part of the postal address."},"locality":{"type":"string","minLength":1,"maxLength":200,"description":"City, town or post town."},"administrativeArea":{"type":"string","minLength":1,"maxLength":200,"description":"State, province, prefecture or region."},"postalCode":{"type":"string","minLength":1,"maxLength":20,"description":"A string: keeps leading zeros and letters."}},"required":["countryCode","lines"],"additionalProperties":false}},"required":["name"],"additionalProperties":false,"nullable":true,"default":null},"pendingReason":{"type":"string","enum":["book","maybe"],"nullable":true,"default":null},"flightNumber":{"type":"string","nullable":true,"default":null},"booking":{"type":"object","properties":{"provider":{"type":"string","nullable":true}},"required":["provider"],"additionalProperties":false,"nullable":true,"default":null}},"required":["title","timeWindow","location","notes","anchors","kind","tags","cost"],"additionalProperties":false}}},"required":["stops"],"additionalProperties":false},"description":"Replaces every day and stop. Only while the Playbook is private."},"expectedVersion":{"type":"integer","minimum":1,"description":"The `version` you read. Required to change `name`, `summary` or `days`."}},"additionalProperties":false}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"playbook":{"type":"object","properties":{"savedDayId":{"type":"string","format":"uuid"},"ownerId":{"type":"string","minLength":1},"name":{"type":"string","minLength":1,"maxLength":200},"stops":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"timeWindow":{"type":"object","properties":{"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["start","end"],"additionalProperties":false,"nullable":true},"location":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"lat":{"type":"number","minimum":-90,"maximum":90,"description":"Send with lng, or omit both. When omitted on a v1 write, the server geocodes `address`, then `name`."},"lng":{"type":"number","minimum":-180,"maximum":180,"description":"Send with lat, or omit both."},"countryCode":{"type":"string","pattern":"^[A-Z]{2}$"},"city":{"type":"string","minLength":1,"maxLength":200},"area":{"type":"string","minLength":1,"maxLength":200},"precision":{"type":"string","enum":["venue","area","city"],"description":"What the coordinates describe: a `venue`, an `area` or a `city`. Requires `lat` and `lng` — sent without them it is refused (\"precision requires coordinates\")."},"verified":{"type":"boolean","enum":[false],"description":"`false` when no geocoder confirmed the coordinates (an assistant's guess). Absent = unknown. Requires `lat` and `lng`."},"address":{"type":"object","properties":{"countryCode":{"type":"string","pattern":"^[A-Z]{2}$","description":"ISO 3166-1 alpha-2, uppercase. Decides how the other fields are read."},"lines":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"description":"Street-level part, in the country's own order, e.g. [\"Hauptstraße 5\"] or [\"1-2-3 Nishi-Azabu\"]."},"dependentLocality":{"type":"string","minLength":1,"maxLength":200,"description":"District, neighbourhood or suburb when it is part of the postal address."},"locality":{"type":"string","minLength":1,"maxLength":200,"description":"City, town or post town."},"administrativeArea":{"type":"string","minLength":1,"maxLength":200,"description":"State, province, prefecture or region."},"postalCode":{"type":"string","minLength":1,"maxLength":20,"description":"A string: keeps leading zeros and letters."}},"required":["countryCode","lines"],"additionalProperties":false}},"required":["name"],"additionalProperties":false,"nullable":true},"notes":{"type":"string","nullable":true},"anchors":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["dayOfWeek"]},"days":{"minItems":1,"type":"array","items":{"type":"string","enum":["mon","tue","wed","thu","fri","sat","sun"]}}},"required":["kind","days"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["dateRange"]},"from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["kind","from","to"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["timeOfDay"]},"window":{"type":"object","properties":{"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["start","end"],"additionalProperties":false}},"required":["kind","window"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["publicHoliday"]},"country":{"type":"string","pattern":"^[A-Z]{2}$"}},"required":["kind","country"],"additionalProperties":false}]}},"kind":{"type":"string","enum":["planned","pending","transit"]},"tags":{"type":"array","items":{"type":"string","enum":["meal","lodging","ticketed","outdoors","drinks","nightlife","museum","sight","beach","shopping","show","tour","wellness","sports"]}},"cost":{"type":"object","properties":{"amountMinor":{"type":"integer","minimum":0},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"],"additionalProperties":false,"nullable":true},"dayIndex":{"type":"integer","minimum":0,"default":0},"mode":{"type":"string","enum":["walk","bus","train","flight","ferry","car","bike"],"nullable":true,"default":null},"endLocation":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"lat":{"type":"number","minimum":-90,"maximum":90,"description":"Send with lng, or omit both. When omitted on a v1 write, the server geocodes `address`, then `name`."},"lng":{"type":"number","minimum":-180,"maximum":180,"description":"Send with lat, or omit both."},"countryCode":{"type":"string","pattern":"^[A-Z]{2}$"},"city":{"type":"string","minLength":1,"maxLength":200},"area":{"type":"string","minLength":1,"maxLength":200},"precision":{"type":"string","enum":["venue","area","city"],"description":"What the coordinates describe: a `venue`, an `area` or a `city`. Requires `lat` and `lng` — sent without them it is refused (\"precision requires coordinates\")."},"verified":{"type":"boolean","enum":[false],"description":"`false` when no geocoder confirmed the coordinates (an assistant's guess). Absent = unknown. Requires `lat` and `lng`."},"address":{"type":"object","properties":{"countryCode":{"type":"string","pattern":"^[A-Z]{2}$","description":"ISO 3166-1 alpha-2, uppercase. Decides how the other fields are read."},"lines":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"description":"Street-level part, in the country's own order, e.g. [\"Hauptstraße 5\"] or [\"1-2-3 Nishi-Azabu\"]."},"dependentLocality":{"type":"string","minLength":1,"maxLength":200,"description":"District, neighbourhood or suburb when it is part of the postal address."},"locality":{"type":"string","minLength":1,"maxLength":200,"description":"City, town or post town."},"administrativeArea":{"type":"string","minLength":1,"maxLength":200,"description":"State, province, prefecture or region."},"postalCode":{"type":"string","minLength":1,"maxLength":20,"description":"A string: keeps leading zeros and letters."}},"required":["countryCode","lines"],"additionalProperties":false}},"required":["name"],"additionalProperties":false,"nullable":true,"default":null},"pendingReason":{"type":"string","enum":["book","maybe"],"nullable":true,"default":null},"flightNumber":{"type":"string","nullable":true,"default":null},"booking":{"type":"object","properties":{"provider":{"type":"string","nullable":true}},"required":["provider"],"additionalProperties":false,"nullable":true,"default":null}},"required":["title","timeWindow","location","notes","anchors","kind","tags","cost"],"additionalProperties":false}},"dayCount":{"type":"integer","minimum":1,"default":1},"cities":{"type":"array","items":{"type":"string","minLength":1}},"visibility":{"type":"string","enum":["private","public"]},"authorKind":{"type":"string","enum":["human","ai"],"default":"human"},"adds":{"type":"integer","minimum":0},"sourceTripId":{"type":"string","format":"uuid"},"sourceTripName":{"type":"string","minLength":1,"maxLength":200},"createdAt":{"type":"string"},"version":{"type":"integer","minimum":1,"default":1},"summary":{"type":"string","maxLength":500,"nullable":true,"default":null},"playbookId":{"type":"string","format":"uuid","description":"The same value as `savedDayId`: the id in `/v1/playbooks/{playbookId}`."}},"required":["savedDayId","ownerId","name","stops","cities","visibility","adds","sourceTripId","sourceTripName","createdAt","playbookId"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","enum":["date-anchor-removed"]},"stopIndex":{"type":"integer","minimum":0},"title":{"type":"string"},"message":{"type":"string"}},"required":["code","stopIndex","title","message"],"additionalProperties":false}}},"required":["playbook","warnings"],"additionalProperties":false}}}},"4XX":{"description":"One envelope for every failure: `{ error: { code, message, details? } }`. 401 carries `WWW-Authenticate: Bearer`; 429 carries `Retry-After`."}}},"delete":{"summary":"Delete one of your Playbooks (a published Playbook must be unpublished first)","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X DELETE 'https://caesura.today/api/v1/playbooks/YOUR_PLAYBOOK_ID' \\\n  -H 'Authorization: Bearer tc_YOUR_TOKEN'"},{"lang":"JavaScript","label":"JavaScript (fetch)","source":"const response = await fetch(\"https://caesura.today/api/v1/playbooks/YOUR_PLAYBOOK_ID\", {\n  method: \"DELETE\",\n  headers: {\n    Authorization: \"Bearer tc_YOUR_TOKEN\",\n  },\n});\nconst data = await response.json();"},{"lang":"Python","label":"Python (requests)","source":"import requests\n\nresponse = requests.request(\n    \"DELETE\",\n    \"https://caesura.today/api/v1/playbooks/YOUR_PLAYBOOK_ID\",\n    headers={\"Authorization\": \"Bearer tc_YOUR_TOKEN\"},\n)\ndata = response.json()"}],"description":"Requires the `library:write` scope.","security":[{"bearerAuth":["library:write"]}],"parameters":[{"name":"playbookId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"savedDayId":{"type":"string"},"deleted":{"type":"boolean","enum":[true]}},"required":["savedDayId","deleted"],"additionalProperties":false}}}},"4XX":{"description":"One envelope for every failure: `{ error: { code, message, details? } }`. 401 carries `WWW-Authenticate: Bearer`; 429 carries `Retry-After`."}}}},"/v1/playbooks/import":{"post":{"summary":"Create a Playbook of yours from a content-bundle file with one playbook in it (the format export produces)","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://caesura.today/api/v1/playbooks/import' \\\n  -H 'Authorization: Bearer tc_YOUR_TOKEN' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n  \"$schema\": \"travel-collab/content-bundle/v1\",\n  \"bundle\": {\n    \"id\": \"string\",\n    \"name\": \"string\",\n    \"origin\": \"human\"\n  }\n}'"},{"lang":"JavaScript","label":"JavaScript (fetch)","source":"const response = await fetch(\"https://caesura.today/api/v1/playbooks/import\", {\n  method: \"POST\",\n  headers: {\n    Authorization: \"Bearer tc_YOUR_TOKEN\",\n    \"Content-Type\": \"application/json\",\n  },\n  body: JSON.stringify({\n    \"$schema\": \"travel-collab/content-bundle/v1\",\n    \"bundle\": {\n      \"id\": \"string\",\n      \"name\": \"string\",\n      \"origin\": \"human\"\n    }\n  }),\n});\nconst data = await response.json();"},{"lang":"Python","label":"Python (requests)","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://caesura.today/api/v1/playbooks/import\",\n    headers={\"Authorization\": \"Bearer tc_YOUR_TOKEN\"},\n    json={\"$schema\": \"travel-collab/content-bundle/v1\", \"bundle\": {\"id\": \"string\", \"name\": \"string\", \"origin\": \"human\"}},\n)\ndata = response.json()"}],"description":"Requires the `library:write` scope.","security":[{"bearerAuth":["library:write"]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional. A retry with the same key and the same request replays the first answer instead of running again; the same key with a different request is a 400, and one still in progress is a 409. Kept for 24 hours, per account. A 5xx is not kept.","schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"$schema":{"type":"string","enum":["travel-collab/content-bundle/v1"]},"bundle":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[a-z0-9-]+$"},"name":{"type":"string","minLength":1,"maxLength":200},"origin":{"type":"string","enum":["human","ai"]},"sources":{"type":"array","items":{"type":"string"},"default":[]},"generatedAt":{"type":"string"},"description":{"type":"string","maxLength":1000}},"required":["id","name","origin"],"additionalProperties":false},"trips":{"type":"array","items":{},"default":[],"description":"Must be empty: a playbook file carries no trip. Import trips at POST /v1/trips/import."},"playbooks":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[a-z0-9-]+$"},"name":{"type":"string","minLength":1,"maxLength":200},"summary":{"type":"string","maxLength":500},"ownerId":{"type":"string","minLength":1},"visibility":{"type":"string","enum":["private","public"],"default":"private"},"origin":{"type":"string","enum":["human","ai"]},"keptOn":{"type":"string"},"sourceTrip":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string","minLength":1,"maxLength":200}},"required":["name"],"additionalProperties":false},"addedBy":{"type":"array","items":{"type":"object","properties":{"tripId":{"type":"string","format":"uuid"},"addedBy":{"type":"string","minLength":1}},"required":["addedBy"],"additionalProperties":false},"default":[]},"version":{"type":"integer","minimum":1},"stops":{"minItems":1,"type":"array","items":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"timeWindow":{"type":"object","properties":{"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["start","end"],"additionalProperties":false},"location":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"lat":{"type":"number","minimum":-90,"maximum":90,"description":"Send with lng, or omit both. When omitted on a v1 write, the server geocodes `address`, then `name`."},"lng":{"type":"number","minimum":-180,"maximum":180,"description":"Send with lat, or omit both."},"countryCode":{"type":"string","pattern":"^[A-Z]{2}$"},"city":{"type":"string","minLength":1,"maxLength":200},"area":{"type":"string","minLength":1,"maxLength":200},"precision":{"type":"string","enum":["venue","area","city"],"description":"What the coordinates describe: a `venue`, an `area` or a `city`. Requires `lat` and `lng` — sent without them it is refused (\"precision requires coordinates\")."},"verified":{"type":"boolean","enum":[false],"description":"`false` when no geocoder confirmed the coordinates (an assistant's guess). Absent = unknown. Requires `lat` and `lng`."},"address":{"type":"object","properties":{"countryCode":{"type":"string","pattern":"^[A-Z]{2}$","description":"ISO 3166-1 alpha-2, uppercase. Decides how the other fields are read."},"lines":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"description":"Street-level part, in the country's own order, e.g. [\"Hauptstraße 5\"] or [\"1-2-3 Nishi-Azabu\"]."},"dependentLocality":{"type":"string","minLength":1,"maxLength":200,"description":"District, neighbourhood or suburb when it is part of the postal address."},"locality":{"type":"string","minLength":1,"maxLength":200,"description":"City, town or post town."},"administrativeArea":{"type":"string","minLength":1,"maxLength":200,"description":"State, province, prefecture or region."},"postalCode":{"type":"string","minLength":1,"maxLength":20,"description":"A string: keeps leading zeros and letters."}},"required":["countryCode","lines"],"additionalProperties":false}},"required":["name"],"additionalProperties":false},"notes":{"type":"string","maxLength":2000},"anchors":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["dayOfWeek"]},"days":{"minItems":1,"type":"array","items":{"type":"string","enum":["mon","tue","wed","thu","fri","sat","sun"]}}},"required":["kind","days"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["dateRange"]},"from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["kind","from","to"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["timeOfDay"]},"window":{"type":"object","properties":{"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["start","end"],"additionalProperties":false}},"required":["kind","window"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["publicHoliday"]},"country":{"type":"string","pattern":"^[A-Z]{2}$"}},"required":["kind","country"],"additionalProperties":false}]}},"kind":{"type":"string","enum":["planned","pending","transit"]},"tags":{"type":"array","items":{"type":"string","enum":["meal","lodging","ticketed","outdoors","drinks","nightlife","museum","sight","beach","shopping","show","tour","wellness","sports"]}},"cost":{"type":"object","properties":{"amountMinor":{"type":"integer","minimum":0},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"],"additionalProperties":false},"mode":{"type":"string","enum":["walk","bus","train","flight","ferry","car","bike"]},"endLocation":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"lat":{"type":"number","minimum":-90,"maximum":90,"description":"Send with lng, or omit both. When omitted on a v1 write, the server geocodes `address`, then `name`."},"lng":{"type":"number","minimum":-180,"maximum":180,"description":"Send with lat, or omit both."},"countryCode":{"type":"string","pattern":"^[A-Z]{2}$"},"city":{"type":"string","minLength":1,"maxLength":200},"area":{"type":"string","minLength":1,"maxLength":200},"precision":{"type":"string","enum":["venue","area","city"],"description":"What the coordinates describe: a `venue`, an `area` or a `city`. Requires `lat` and `lng` — sent without them it is refused (\"precision requires coordinates\")."},"verified":{"type":"boolean","enum":[false],"description":"`false` when no geocoder confirmed the coordinates (an assistant's guess). Absent = unknown. Requires `lat` and `lng`."},"address":{"type":"object","properties":{"countryCode":{"type":"string","pattern":"^[A-Z]{2}$","description":"ISO 3166-1 alpha-2, uppercase. Decides how the other fields are read."},"lines":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"description":"Street-level part, in the country's own order, e.g. [\"Hauptstraße 5\"] or [\"1-2-3 Nishi-Azabu\"]."},"dependentLocality":{"type":"string","minLength":1,"maxLength":200,"description":"District, neighbourhood or suburb when it is part of the postal address."},"locality":{"type":"string","minLength":1,"maxLength":200,"description":"City, town or post town."},"administrativeArea":{"type":"string","minLength":1,"maxLength":200,"description":"State, province, prefecture or region."},"postalCode":{"type":"string","minLength":1,"maxLength":20,"description":"A string: keeps leading zeros and letters."}},"required":["countryCode","lines"],"additionalProperties":false}},"required":["name"],"additionalProperties":false},"pendingReason":{"type":"string","enum":["book","maybe"]},"flightNumber":{"type":"string","minLength":1,"maxLength":20},"booking":{"type":"object","properties":{"confirmation":{"type":"string","minLength":1,"maxLength":100},"provider":{"type":"string","minLength":1,"maxLength":100},"url":{"type":"string","maxLength":2000,"format":"uri"}},"additionalProperties":false}},"required":["title"],"additionalProperties":false}},"days":{"minItems":1,"type":"array","items":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":200},"stops":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"timeWindow":{"type":"object","properties":{"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["start","end"],"additionalProperties":false},"location":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"lat":{"type":"number","minimum":-90,"maximum":90,"description":"Send with lng, or omit both. When omitted on a v1 write, the server geocodes `address`, then `name`."},"lng":{"type":"number","minimum":-180,"maximum":180,"description":"Send with lat, or omit both."},"countryCode":{"type":"string","pattern":"^[A-Z]{2}$"},"city":{"type":"string","minLength":1,"maxLength":200},"area":{"type":"string","minLength":1,"maxLength":200},"precision":{"type":"string","enum":["venue","area","city"],"description":"What the coordinates describe: a `venue`, an `area` or a `city`. Requires `lat` and `lng` — sent without them it is refused (\"precision requires coordinates\")."},"verified":{"type":"boolean","enum":[false],"description":"`false` when no geocoder confirmed the coordinates (an assistant's guess). Absent = unknown. Requires `lat` and `lng`."},"address":{"type":"object","properties":{"countryCode":{"type":"string","pattern":"^[A-Z]{2}$","description":"ISO 3166-1 alpha-2, uppercase. Decides how the other fields are read."},"lines":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"description":"Street-level part, in the country's own order, e.g. [\"Hauptstraße 5\"] or [\"1-2-3 Nishi-Azabu\"]."},"dependentLocality":{"type":"string","minLength":1,"maxLength":200,"description":"District, neighbourhood or suburb when it is part of the postal address."},"locality":{"type":"string","minLength":1,"maxLength":200,"description":"City, town or post town."},"administrativeArea":{"type":"string","minLength":1,"maxLength":200,"description":"State, province, prefecture or region."},"postalCode":{"type":"string","minLength":1,"maxLength":20,"description":"A string: keeps leading zeros and letters."}},"required":["countryCode","lines"],"additionalProperties":false}},"required":["name"],"additionalProperties":false},"notes":{"type":"string","maxLength":2000},"anchors":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["dayOfWeek"]},"days":{"minItems":1,"type":"array","items":{"type":"string","enum":["mon","tue","wed","thu","fri","sat","sun"]}}},"required":["kind","days"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["dateRange"]},"from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["kind","from","to"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["timeOfDay"]},"window":{"type":"object","properties":{"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["start","end"],"additionalProperties":false}},"required":["kind","window"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["publicHoliday"]},"country":{"type":"string","pattern":"^[A-Z]{2}$"}},"required":["kind","country"],"additionalProperties":false}]}},"kind":{"type":"string","enum":["planned","pending","transit"]},"tags":{"type":"array","items":{"type":"string","enum":["meal","lodging","ticketed","outdoors","drinks","nightlife","museum","sight","beach","shopping","show","tour","wellness","sports"]}},"cost":{"type":"object","properties":{"amountMinor":{"type":"integer","minimum":0},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"],"additionalProperties":false},"mode":{"type":"string","enum":["walk","bus","train","flight","ferry","car","bike"]},"endLocation":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"lat":{"type":"number","minimum":-90,"maximum":90,"description":"Send with lng, or omit both. When omitted on a v1 write, the server geocodes `address`, then `name`."},"lng":{"type":"number","minimum":-180,"maximum":180,"description":"Send with lat, or omit both."},"countryCode":{"type":"string","pattern":"^[A-Z]{2}$"},"city":{"type":"string","minLength":1,"maxLength":200},"area":{"type":"string","minLength":1,"maxLength":200},"precision":{"type":"string","enum":["venue","area","city"],"description":"What the coordinates describe: a `venue`, an `area` or a `city`. Requires `lat` and `lng` — sent without them it is refused (\"precision requires coordinates\")."},"verified":{"type":"boolean","enum":[false],"description":"`false` when no geocoder confirmed the coordinates (an assistant's guess). Absent = unknown. Requires `lat` and `lng`."},"address":{"type":"object","properties":{"countryCode":{"type":"string","pattern":"^[A-Z]{2}$","description":"ISO 3166-1 alpha-2, uppercase. Decides how the other fields are read."},"lines":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"description":"Street-level part, in the country's own order, e.g. [\"Hauptstraße 5\"] or [\"1-2-3 Nishi-Azabu\"]."},"dependentLocality":{"type":"string","minLength":1,"maxLength":200,"description":"District, neighbourhood or suburb when it is part of the postal address."},"locality":{"type":"string","minLength":1,"maxLength":200,"description":"City, town or post town."},"administrativeArea":{"type":"string","minLength":1,"maxLength":200,"description":"State, province, prefecture or region."},"postalCode":{"type":"string","minLength":1,"maxLength":20,"description":"A string: keeps leading zeros and letters."}},"required":["countryCode","lines"],"additionalProperties":false}},"required":["name"],"additionalProperties":false},"pendingReason":{"type":"string","enum":["book","maybe"]},"flightNumber":{"type":"string","minLength":1,"maxLength":20},"booking":{"type":"object","properties":{"confirmation":{"type":"string","minLength":1,"maxLength":100},"provider":{"type":"string","minLength":1,"maxLength":100},"url":{"type":"string","maxLength":2000,"format":"uri"}},"additionalProperties":false}},"required":["title"],"additionalProperties":false}}},"required":["stops"],"additionalProperties":false}}},"required":["key","name","ownerId","sourceTrip"],"additionalProperties":false},"default":[]}},"required":["$schema","bundle"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success.","headers":{"Idempotent-Replayed":{"description":"`true` when this answer is a replay of an earlier request with the same Idempotency-Key.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"playbook":{"type":"object","properties":{"savedDayId":{"type":"string","format":"uuid"},"ownerId":{"type":"string","minLength":1},"name":{"type":"string","minLength":1,"maxLength":200},"stops":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"timeWindow":{"type":"object","properties":{"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["start","end"],"additionalProperties":false,"nullable":true},"location":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"lat":{"type":"number","minimum":-90,"maximum":90,"description":"Send with lng, or omit both. When omitted on a v1 write, the server geocodes `address`, then `name`."},"lng":{"type":"number","minimum":-180,"maximum":180,"description":"Send with lat, or omit both."},"countryCode":{"type":"string","pattern":"^[A-Z]{2}$"},"city":{"type":"string","minLength":1,"maxLength":200},"area":{"type":"string","minLength":1,"maxLength":200},"precision":{"type":"string","enum":["venue","area","city"],"description":"What the coordinates describe: a `venue`, an `area` or a `city`. Requires `lat` and `lng` — sent without them it is refused (\"precision requires coordinates\")."},"verified":{"type":"boolean","enum":[false],"description":"`false` when no geocoder confirmed the coordinates (an assistant's guess). Absent = unknown. Requires `lat` and `lng`."},"address":{"type":"object","properties":{"countryCode":{"type":"string","pattern":"^[A-Z]{2}$","description":"ISO 3166-1 alpha-2, uppercase. Decides how the other fields are read."},"lines":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"description":"Street-level part, in the country's own order, e.g. [\"Hauptstraße 5\"] or [\"1-2-3 Nishi-Azabu\"]."},"dependentLocality":{"type":"string","minLength":1,"maxLength":200,"description":"District, neighbourhood or suburb when it is part of the postal address."},"locality":{"type":"string","minLength":1,"maxLength":200,"description":"City, town or post town."},"administrativeArea":{"type":"string","minLength":1,"maxLength":200,"description":"State, province, prefecture or region."},"postalCode":{"type":"string","minLength":1,"maxLength":20,"description":"A string: keeps leading zeros and letters."}},"required":["countryCode","lines"],"additionalProperties":false}},"required":["name"],"additionalProperties":false,"nullable":true},"notes":{"type":"string","nullable":true},"anchors":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["dayOfWeek"]},"days":{"minItems":1,"type":"array","items":{"type":"string","enum":["mon","tue","wed","thu","fri","sat","sun"]}}},"required":["kind","days"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["dateRange"]},"from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["kind","from","to"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["timeOfDay"]},"window":{"type":"object","properties":{"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["start","end"],"additionalProperties":false}},"required":["kind","window"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["publicHoliday"]},"country":{"type":"string","pattern":"^[A-Z]{2}$"}},"required":["kind","country"],"additionalProperties":false}]}},"kind":{"type":"string","enum":["planned","pending","transit"]},"tags":{"type":"array","items":{"type":"string","enum":["meal","lodging","ticketed","outdoors","drinks","nightlife","museum","sight","beach","shopping","show","tour","wellness","sports"]}},"cost":{"type":"object","properties":{"amountMinor":{"type":"integer","minimum":0},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"],"additionalProperties":false,"nullable":true},"dayIndex":{"type":"integer","minimum":0,"default":0},"mode":{"type":"string","enum":["walk","bus","train","flight","ferry","car","bike"],"nullable":true,"default":null},"endLocation":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"lat":{"type":"number","minimum":-90,"maximum":90,"description":"Send with lng, or omit both. When omitted on a v1 write, the server geocodes `address`, then `name`."},"lng":{"type":"number","minimum":-180,"maximum":180,"description":"Send with lat, or omit both."},"countryCode":{"type":"string","pattern":"^[A-Z]{2}$"},"city":{"type":"string","minLength":1,"maxLength":200},"area":{"type":"string","minLength":1,"maxLength":200},"precision":{"type":"string","enum":["venue","area","city"],"description":"What the coordinates describe: a `venue`, an `area` or a `city`. Requires `lat` and `lng` — sent without them it is refused (\"precision requires coordinates\")."},"verified":{"type":"boolean","enum":[false],"description":"`false` when no geocoder confirmed the coordinates (an assistant's guess). Absent = unknown. Requires `lat` and `lng`."},"address":{"type":"object","properties":{"countryCode":{"type":"string","pattern":"^[A-Z]{2}$","description":"ISO 3166-1 alpha-2, uppercase. Decides how the other fields are read."},"lines":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"description":"Street-level part, in the country's own order, e.g. [\"Hauptstraße 5\"] or [\"1-2-3 Nishi-Azabu\"]."},"dependentLocality":{"type":"string","minLength":1,"maxLength":200,"description":"District, neighbourhood or suburb when it is part of the postal address."},"locality":{"type":"string","minLength":1,"maxLength":200,"description":"City, town or post town."},"administrativeArea":{"type":"string","minLength":1,"maxLength":200,"description":"State, province, prefecture or region."},"postalCode":{"type":"string","minLength":1,"maxLength":20,"description":"A string: keeps leading zeros and letters."}},"required":["countryCode","lines"],"additionalProperties":false}},"required":["name"],"additionalProperties":false,"nullable":true,"default":null},"pendingReason":{"type":"string","enum":["book","maybe"],"nullable":true,"default":null},"flightNumber":{"type":"string","nullable":true,"default":null},"booking":{"type":"object","properties":{"provider":{"type":"string","nullable":true}},"required":["provider"],"additionalProperties":false,"nullable":true,"default":null}},"required":["title","timeWindow","location","notes","anchors","kind","tags","cost"],"additionalProperties":false}},"dayCount":{"type":"integer","minimum":1,"default":1},"cities":{"type":"array","items":{"type":"string","minLength":1}},"visibility":{"type":"string","enum":["private","public"]},"authorKind":{"type":"string","enum":["human","ai"],"default":"human"},"adds":{"type":"integer","minimum":0},"sourceTripId":{"type":"string","format":"uuid"},"sourceTripName":{"type":"string","minLength":1,"maxLength":200},"createdAt":{"type":"string"},"version":{"type":"integer","minimum":1,"default":1},"summary":{"type":"string","maxLength":500,"nullable":true,"default":null},"playbookId":{"type":"string","format":"uuid","description":"The same value as `savedDayId`: the id in `/v1/playbooks/{playbookId}`."}},"required":["savedDayId","ownerId","name","stops","cities","visibility","adds","sourceTripId","sourceTripName","createdAt","playbookId"],"additionalProperties":false},"warnings":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string","enum":["date-anchor-removed"]},"stopIndex":{"type":"integer","minimum":0},"title":{"type":"string"},"message":{"type":"string"}},"required":["code","stopIndex","title","message"],"additionalProperties":false},{"type":"object","properties":{"code":{"type":"string","enum":["visibility-reset"]},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}]}},"sourceVersion":{"type":"integer","minimum":1,"nullable":true,"description":"The `version` the file said it was at, echoed and not trusted: the new Playbook is version 1."}},"required":["playbook","warnings","sourceVersion"],"additionalProperties":false}}}},"4XX":{"description":"One envelope for every failure: `{ error: { code, message, details? } }`. 401 carries `WWW-Authenticate: Bearer`; 429 carries `Retry-After`."}}}},"/v1/playbooks":{"get":{"summary":"List the Playbooks you have kept, newest first","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://caesura.today/api/v1/playbooks' \\\n  -H 'Authorization: Bearer tc_YOUR_TOKEN'"},{"lang":"JavaScript","label":"JavaScript (fetch)","source":"const response = await fetch(\"https://caesura.today/api/v1/playbooks\", {\n  method: \"GET\",\n  headers: {\n    Authorization: \"Bearer tc_YOUR_TOKEN\",\n  },\n});\nconst data = await response.json();"},{"lang":"Python","label":"Python (requests)","source":"import requests\n\nresponse = requests.request(\n    \"GET\",\n    \"https://caesura.today/api/v1/playbooks\",\n    headers={\"Authorization\": \"Bearer tc_YOUR_TOKEN\"},\n)\ndata = response.json()"}],"description":"Requires the `library:read` scope, or `current:read`. A Playbook is a view over saved days: the record is the same one `/v1/library` serves, and its id key is `savedDayId` (that value is the `playbookId` in these paths). Every Playbook record here also carries `playbookId`, the same value, so either key works. Writes take stops grouped by day, `days[].stops[]`; reads return them flat, `stops[]` in order with a 0-based `dayIndex` on each, plus `dayCount` — deliberately (ADR-048, ADR-050). Group by `dayIndex` to get days back.","security":[{"bearerAuth":["library:read"]},{"bearerAuth":["current:read"]}],"parameters":[{"name":"limit","in":"query","required":false,"description":"1 to 200. A value outside that range is refused, never clamped.","schema":{"type":"integer","minimum":1,"maximum":200}},{"name":"cursor","in":"query","required":false,"description":"Opaque. Pass back the `nextCursor` of the previous page.","schema":{"type":"string"}},{"name":"visibility","in":"query","required":false,"schema":{"type":"string","enum":["private","public"]}}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","required":["items","nextCursor"],"properties":{"items":{"type":"array","items":{"type":"object","properties":{"savedDayId":{"type":"string","format":"uuid"},"ownerId":{"type":"string","minLength":1},"name":{"type":"string","minLength":1,"maxLength":200},"stops":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"timeWindow":{"type":"object","properties":{"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["start","end"],"additionalProperties":false,"nullable":true},"location":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"lat":{"type":"number","minimum":-90,"maximum":90,"description":"Send with lng, or omit both. When omitted on a v1 write, the server geocodes `address`, then `name`."},"lng":{"type":"number","minimum":-180,"maximum":180,"description":"Send with lat, or omit both."},"countryCode":{"type":"string","pattern":"^[A-Z]{2}$"},"city":{"type":"string","minLength":1,"maxLength":200},"area":{"type":"string","minLength":1,"maxLength":200},"precision":{"type":"string","enum":["venue","area","city"],"description":"What the coordinates describe: a `venue`, an `area` or a `city`. Requires `lat` and `lng` — sent without them it is refused (\"precision requires coordinates\")."},"verified":{"type":"boolean","enum":[false],"description":"`false` when no geocoder confirmed the coordinates (an assistant's guess). Absent = unknown. Requires `lat` and `lng`."},"address":{"type":"object","properties":{"countryCode":{"type":"string","pattern":"^[A-Z]{2}$","description":"ISO 3166-1 alpha-2, uppercase. Decides how the other fields are read."},"lines":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"description":"Street-level part, in the country's own order, e.g. [\"Hauptstraße 5\"] or [\"1-2-3 Nishi-Azabu\"]."},"dependentLocality":{"type":"string","minLength":1,"maxLength":200,"description":"District, neighbourhood or suburb when it is part of the postal address."},"locality":{"type":"string","minLength":1,"maxLength":200,"description":"City, town or post town."},"administrativeArea":{"type":"string","minLength":1,"maxLength":200,"description":"State, province, prefecture or region."},"postalCode":{"type":"string","minLength":1,"maxLength":20,"description":"A string: keeps leading zeros and letters."}},"required":["countryCode","lines"],"additionalProperties":false}},"required":["name"],"additionalProperties":false,"nullable":true},"notes":{"type":"string","nullable":true},"anchors":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["dayOfWeek"]},"days":{"minItems":1,"type":"array","items":{"type":"string","enum":["mon","tue","wed","thu","fri","sat","sun"]}}},"required":["kind","days"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["dateRange"]},"from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["kind","from","to"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["timeOfDay"]},"window":{"type":"object","properties":{"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["start","end"],"additionalProperties":false}},"required":["kind","window"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["publicHoliday"]},"country":{"type":"string","pattern":"^[A-Z]{2}$"}},"required":["kind","country"],"additionalProperties":false}]}},"kind":{"type":"string","enum":["planned","pending","transit"]},"tags":{"type":"array","items":{"type":"string","enum":["meal","lodging","ticketed","outdoors","drinks","nightlife","museum","sight","beach","shopping","show","tour","wellness","sports"]}},"cost":{"type":"object","properties":{"amountMinor":{"type":"integer","minimum":0},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"],"additionalProperties":false,"nullable":true},"dayIndex":{"type":"integer","minimum":0,"default":0},"mode":{"type":"string","enum":["walk","bus","train","flight","ferry","car","bike"],"nullable":true,"default":null},"endLocation":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"lat":{"type":"number","minimum":-90,"maximum":90,"description":"Send with lng, or omit both. When omitted on a v1 write, the server geocodes `address`, then `name`."},"lng":{"type":"number","minimum":-180,"maximum":180,"description":"Send with lat, or omit both."},"countryCode":{"type":"string","pattern":"^[A-Z]{2}$"},"city":{"type":"string","minLength":1,"maxLength":200},"area":{"type":"string","minLength":1,"maxLength":200},"precision":{"type":"string","enum":["venue","area","city"],"description":"What the coordinates describe: a `venue`, an `area` or a `city`. Requires `lat` and `lng` — sent without them it is refused (\"precision requires coordinates\")."},"verified":{"type":"boolean","enum":[false],"description":"`false` when no geocoder confirmed the coordinates (an assistant's guess). Absent = unknown. Requires `lat` and `lng`."},"address":{"type":"object","properties":{"countryCode":{"type":"string","pattern":"^[A-Z]{2}$","description":"ISO 3166-1 alpha-2, uppercase. Decides how the other fields are read."},"lines":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"description":"Street-level part, in the country's own order, e.g. [\"Hauptstraße 5\"] or [\"1-2-3 Nishi-Azabu\"]."},"dependentLocality":{"type":"string","minLength":1,"maxLength":200,"description":"District, neighbourhood or suburb when it is part of the postal address."},"locality":{"type":"string","minLength":1,"maxLength":200,"description":"City, town or post town."},"administrativeArea":{"type":"string","minLength":1,"maxLength":200,"description":"State, province, prefecture or region."},"postalCode":{"type":"string","minLength":1,"maxLength":20,"description":"A string: keeps leading zeros and letters."}},"required":["countryCode","lines"],"additionalProperties":false}},"required":["name"],"additionalProperties":false,"nullable":true,"default":null},"pendingReason":{"type":"string","enum":["book","maybe"],"nullable":true,"default":null},"flightNumber":{"type":"string","nullable":true,"default":null},"booking":{"type":"object","properties":{"provider":{"type":"string","nullable":true}},"required":["provider"],"additionalProperties":false,"nullable":true,"default":null}},"required":["title","timeWindow","location","notes","anchors","kind","tags","cost"],"additionalProperties":false}},"dayCount":{"type":"integer","minimum":1,"default":1},"cities":{"type":"array","items":{"type":"string","minLength":1}},"visibility":{"type":"string","enum":["private","public"]},"authorKind":{"type":"string","enum":["human","ai"],"default":"human"},"adds":{"type":"integer","minimum":0},"sourceTripId":{"type":"string","format":"uuid"},"sourceTripName":{"type":"string","minLength":1,"maxLength":200},"createdAt":{"type":"string"},"version":{"type":"integer","minimum":1,"default":1},"summary":{"type":"string","maxLength":500,"nullable":true,"default":null},"playbookId":{"type":"string","format":"uuid","description":"The same value as `savedDayId`: the id in `/v1/playbooks/{playbookId}`."}},"required":["savedDayId","ownerId","name","stops","cities","visibility","adds","sourceTripId","sourceTripName","createdAt","playbookId"],"additionalProperties":false}},"nextCursor":{"type":"string","nullable":true}}}}}},"4XX":{"description":"One envelope for every failure: `{ error: { code, message, details? } }`. 401 carries `WWW-Authenticate: Bearer`; 429 carries `Retry-After`."}}},"post":{"summary":"Create a Playbook — from days (or some activities) of a trip you can see, or written inline","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://caesura.today/api/v1/playbooks' \\\n  -H 'Authorization: Bearer tc_YOUR_TOKEN' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n  \"name\": \"string\",\n  \"source\": {\n    \"tripId\": \"00000000-0000-4000-8000-000000000000\",\n    \"days\": []\n  }\n}'"},{"lang":"JavaScript","label":"JavaScript (fetch)","source":"const response = await fetch(\"https://caesura.today/api/v1/playbooks\", {\n  method: \"POST\",\n  headers: {\n    Authorization: \"Bearer tc_YOUR_TOKEN\",\n    \"Content-Type\": \"application/json\",\n  },\n  body: JSON.stringify({\n    \"name\": \"string\",\n    \"source\": {\n      \"tripId\": \"00000000-0000-4000-8000-000000000000\",\n      \"days\": []\n    }\n  }),\n});\nconst data = await response.json();"},{"lang":"Python","label":"Python (requests)","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://caesura.today/api/v1/playbooks\",\n    headers={\"Authorization\": \"Bearer tc_YOUR_TOKEN\"},\n    json={\"name\": \"string\", \"source\": {\"tripId\": \"00000000-0000-4000-8000-000000000000\", \"days\": []}},\n)\ndata = response.json()"}],"description":"Requires the `library:write` scope. Requires at least the `viewer` role on the trip the body names, if it names one. A Playbook is a view over saved days: the record is the same one `/v1/library` serves, and its id key is `savedDayId` (that value is the `playbookId` in these paths). Every Playbook record here also carries `playbookId`, the same value, so either key works. Writes take stops grouped by day, `days[].stops[]`; reads return them flat, `stops[]` in order with a 0-based `dayIndex` on each, plus `dayCount` — deliberately (ADR-048, ADR-050). Group by `dayIndex` to get days back.","security":[{"bearerAuth":["library:write"]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional. A retry with the same key and the same request replays the first answer instead of running again; the same key with a different request is a 400, and one still in progress is a 409. Kept for 24 hours, per account. A 5xx is not kept.","schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"summary":{"type":"string","maxLength":500,"nullable":true},"source":{"type":"object","properties":{"tripId":{"type":"string","format":"uuid"},"days":{"minItems":1,"maxItems":366,"type":"array","items":{"type":"object","properties":{"dayId":{"type":"string","format":"uuid"},"activityIds":{"type":"array","items":{"type":"string","format":"uuid"},"description":"Keep only these activities of the day, in the trip's order (not this list's). Omitted = the whole day; [] = keep the day, empty."}},"required":["dayId"],"additionalProperties":false},"description":"The days to keep, in the order the Playbook will run them."}},"required":["tripId","days"],"additionalProperties":false}},"required":["name","source"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"summary":{"type":"string","maxLength":500,"nullable":true},"sourceName":{"type":"string","minLength":1,"maxLength":200,"description":"Credited as the Playbook's source. Defaults to `name`."},"days":{"minItems":1,"maxItems":366,"type":"array","items":{"type":"object","properties":{"stops":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"timeWindow":{"type":"object","properties":{"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["start","end"],"additionalProperties":false,"nullable":true},"location":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"lat":{"type":"number","minimum":-90,"maximum":90,"description":"Send with lng, or omit both. When omitted on a v1 write, the server geocodes `address`, then `name`."},"lng":{"type":"number","minimum":-180,"maximum":180,"description":"Send with lat, or omit both."},"countryCode":{"type":"string","pattern":"^[A-Z]{2}$"},"city":{"type":"string","minLength":1,"maxLength":200},"area":{"type":"string","minLength":1,"maxLength":200},"precision":{"type":"string","enum":["venue","area","city"],"description":"What the coordinates describe: a `venue`, an `area` or a `city`. Requires `lat` and `lng` — sent without them it is refused (\"precision requires coordinates\")."},"verified":{"type":"boolean","enum":[false],"description":"`false` when no geocoder confirmed the coordinates (an assistant's guess). Absent = unknown. Requires `lat` and `lng`."},"address":{"type":"object","properties":{"countryCode":{"type":"string","pattern":"^[A-Z]{2}$","description":"ISO 3166-1 alpha-2, uppercase. Decides how the other fields are read."},"lines":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"description":"Street-level part, in the country's own order, e.g. [\"Hauptstraße 5\"] or [\"1-2-3 Nishi-Azabu\"]."},"dependentLocality":{"type":"string","minLength":1,"maxLength":200,"description":"District, neighbourhood or suburb when it is part of the postal address."},"locality":{"type":"string","minLength":1,"maxLength":200,"description":"City, town or post town."},"administrativeArea":{"type":"string","minLength":1,"maxLength":200,"description":"State, province, prefecture or region."},"postalCode":{"type":"string","minLength":1,"maxLength":20,"description":"A string: keeps leading zeros and letters."}},"required":["countryCode","lines"],"additionalProperties":false}},"required":["name"],"additionalProperties":false,"nullable":true},"notes":{"type":"string","maxLength":2000,"nullable":true},"anchors":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["dayOfWeek"]},"days":{"minItems":1,"type":"array","items":{"type":"string","enum":["mon","tue","wed","thu","fri","sat","sun"]}}},"required":["kind","days"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["dateRange"]},"from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["kind","from","to"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["timeOfDay"]},"window":{"type":"object","properties":{"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["start","end"],"additionalProperties":false}},"required":["kind","window"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["publicHoliday"]},"country":{"type":"string","pattern":"^[A-Z]{2}$"}},"required":["kind","country"],"additionalProperties":false}]}},"kind":{"type":"string","enum":["planned","pending","transit"]},"tags":{"type":"array","items":{"type":"string","enum":["meal","lodging","ticketed","outdoors","drinks","nightlife","museum","sight","beach","shopping","show","tour","wellness","sports"]}},"cost":{"type":"object","properties":{"amountMinor":{"type":"integer","minimum":0},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"],"additionalProperties":false,"nullable":true},"mode":{"type":"string","enum":["walk","bus","train","flight","ferry","car","bike"],"nullable":true,"default":null},"endLocation":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"lat":{"type":"number","minimum":-90,"maximum":90,"description":"Send with lng, or omit both. When omitted on a v1 write, the server geocodes `address`, then `name`."},"lng":{"type":"number","minimum":-180,"maximum":180,"description":"Send with lat, or omit both."},"countryCode":{"type":"string","pattern":"^[A-Z]{2}$"},"city":{"type":"string","minLength":1,"maxLength":200},"area":{"type":"string","minLength":1,"maxLength":200},"precision":{"type":"string","enum":["venue","area","city"],"description":"What the coordinates describe: a `venue`, an `area` or a `city`. Requires `lat` and `lng` — sent without them it is refused (\"precision requires coordinates\")."},"verified":{"type":"boolean","enum":[false],"description":"`false` when no geocoder confirmed the coordinates (an assistant's guess). Absent = unknown. Requires `lat` and `lng`."},"address":{"type":"object","properties":{"countryCode":{"type":"string","pattern":"^[A-Z]{2}$","description":"ISO 3166-1 alpha-2, uppercase. Decides how the other fields are read."},"lines":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"description":"Street-level part, in the country's own order, e.g. [\"Hauptstraße 5\"] or [\"1-2-3 Nishi-Azabu\"]."},"dependentLocality":{"type":"string","minLength":1,"maxLength":200,"description":"District, neighbourhood or suburb when it is part of the postal address."},"locality":{"type":"string","minLength":1,"maxLength":200,"description":"City, town or post town."},"administrativeArea":{"type":"string","minLength":1,"maxLength":200,"description":"State, province, prefecture or region."},"postalCode":{"type":"string","minLength":1,"maxLength":20,"description":"A string: keeps leading zeros and letters."}},"required":["countryCode","lines"],"additionalProperties":false}},"required":["name"],"additionalProperties":false,"nullable":true,"default":null},"pendingReason":{"type":"string","enum":["book","maybe"],"nullable":true,"default":null},"flightNumber":{"type":"string","nullable":true,"default":null},"booking":{"type":"object","properties":{"provider":{"type":"string","nullable":true}},"required":["provider"],"additionalProperties":false,"nullable":true,"default":null}},"required":["title","timeWindow","location","notes","anchors","kind","tags","cost"],"additionalProperties":false}}},"required":["stops"],"additionalProperties":false}}},"required":["name","days"],"additionalProperties":false}],"description":"Exactly one of: `{ name, summary?, source: { tripId, days } }` to keep days (or some of their activities) of a trip you can see, or `{ name, summary?, sourceName?, days: [{ stops }] }` to write one inline. Unknown fields are refused, so a body matching both shapes matches neither."}}}},"responses":{"201":{"description":"Success.","headers":{"Idempotent-Replayed":{"description":"`true` when this answer is a replay of an earlier request with the same Idempotency-Key.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"playbook":{"type":"object","properties":{"savedDayId":{"type":"string","format":"uuid"},"ownerId":{"type":"string","minLength":1},"name":{"type":"string","minLength":1,"maxLength":200},"stops":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"timeWindow":{"type":"object","properties":{"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["start","end"],"additionalProperties":false,"nullable":true},"location":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"lat":{"type":"number","minimum":-90,"maximum":90,"description":"Send with lng, or omit both. When omitted on a v1 write, the server geocodes `address`, then `name`."},"lng":{"type":"number","minimum":-180,"maximum":180,"description":"Send with lat, or omit both."},"countryCode":{"type":"string","pattern":"^[A-Z]{2}$"},"city":{"type":"string","minLength":1,"maxLength":200},"area":{"type":"string","minLength":1,"maxLength":200},"precision":{"type":"string","enum":["venue","area","city"],"description":"What the coordinates describe: a `venue`, an `area` or a `city`. Requires `lat` and `lng` — sent without them it is refused (\"precision requires coordinates\")."},"verified":{"type":"boolean","enum":[false],"description":"`false` when no geocoder confirmed the coordinates (an assistant's guess). Absent = unknown. Requires `lat` and `lng`."},"address":{"type":"object","properties":{"countryCode":{"type":"string","pattern":"^[A-Z]{2}$","description":"ISO 3166-1 alpha-2, uppercase. Decides how the other fields are read."},"lines":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"description":"Street-level part, in the country's own order, e.g. [\"Hauptstraße 5\"] or [\"1-2-3 Nishi-Azabu\"]."},"dependentLocality":{"type":"string","minLength":1,"maxLength":200,"description":"District, neighbourhood or suburb when it is part of the postal address."},"locality":{"type":"string","minLength":1,"maxLength":200,"description":"City, town or post town."},"administrativeArea":{"type":"string","minLength":1,"maxLength":200,"description":"State, province, prefecture or region."},"postalCode":{"type":"string","minLength":1,"maxLength":20,"description":"A string: keeps leading zeros and letters."}},"required":["countryCode","lines"],"additionalProperties":false}},"required":["name"],"additionalProperties":false,"nullable":true},"notes":{"type":"string","nullable":true},"anchors":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["dayOfWeek"]},"days":{"minItems":1,"type":"array","items":{"type":"string","enum":["mon","tue","wed","thu","fri","sat","sun"]}}},"required":["kind","days"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["dateRange"]},"from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["kind","from","to"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["timeOfDay"]},"window":{"type":"object","properties":{"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["start","end"],"additionalProperties":false}},"required":["kind","window"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["publicHoliday"]},"country":{"type":"string","pattern":"^[A-Z]{2}$"}},"required":["kind","country"],"additionalProperties":false}]}},"kind":{"type":"string","enum":["planned","pending","transit"]},"tags":{"type":"array","items":{"type":"string","enum":["meal","lodging","ticketed","outdoors","drinks","nightlife","museum","sight","beach","shopping","show","tour","wellness","sports"]}},"cost":{"type":"object","properties":{"amountMinor":{"type":"integer","minimum":0},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"],"additionalProperties":false,"nullable":true},"dayIndex":{"type":"integer","minimum":0,"default":0},"mode":{"type":"string","enum":["walk","bus","train","flight","ferry","car","bike"],"nullable":true,"default":null},"endLocation":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"lat":{"type":"number","minimum":-90,"maximum":90,"description":"Send with lng, or omit both. When omitted on a v1 write, the server geocodes `address`, then `name`."},"lng":{"type":"number","minimum":-180,"maximum":180,"description":"Send with lat, or omit both."},"countryCode":{"type":"string","pattern":"^[A-Z]{2}$"},"city":{"type":"string","minLength":1,"maxLength":200},"area":{"type":"string","minLength":1,"maxLength":200},"precision":{"type":"string","enum":["venue","area","city"],"description":"What the coordinates describe: a `venue`, an `area` or a `city`. Requires `lat` and `lng` — sent without them it is refused (\"precision requires coordinates\")."},"verified":{"type":"boolean","enum":[false],"description":"`false` when no geocoder confirmed the coordinates (an assistant's guess). Absent = unknown. Requires `lat` and `lng`."},"address":{"type":"object","properties":{"countryCode":{"type":"string","pattern":"^[A-Z]{2}$","description":"ISO 3166-1 alpha-2, uppercase. Decides how the other fields are read."},"lines":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"description":"Street-level part, in the country's own order, e.g. [\"Hauptstraße 5\"] or [\"1-2-3 Nishi-Azabu\"]."},"dependentLocality":{"type":"string","minLength":1,"maxLength":200,"description":"District, neighbourhood or suburb when it is part of the postal address."},"locality":{"type":"string","minLength":1,"maxLength":200,"description":"City, town or post town."},"administrativeArea":{"type":"string","minLength":1,"maxLength":200,"description":"State, province, prefecture or region."},"postalCode":{"type":"string","minLength":1,"maxLength":20,"description":"A string: keeps leading zeros and letters."}},"required":["countryCode","lines"],"additionalProperties":false}},"required":["name"],"additionalProperties":false,"nullable":true,"default":null},"pendingReason":{"type":"string","enum":["book","maybe"],"nullable":true,"default":null},"flightNumber":{"type":"string","nullable":true,"default":null},"booking":{"type":"object","properties":{"provider":{"type":"string","nullable":true}},"required":["provider"],"additionalProperties":false,"nullable":true,"default":null}},"required":["title","timeWindow","location","notes","anchors","kind","tags","cost"],"additionalProperties":false}},"dayCount":{"type":"integer","minimum":1,"default":1},"cities":{"type":"array","items":{"type":"string","minLength":1}},"visibility":{"type":"string","enum":["private","public"]},"authorKind":{"type":"string","enum":["human","ai"],"default":"human"},"adds":{"type":"integer","minimum":0},"sourceTripId":{"type":"string","format":"uuid"},"sourceTripName":{"type":"string","minLength":1,"maxLength":200},"createdAt":{"type":"string"},"version":{"type":"integer","minimum":1,"default":1},"summary":{"type":"string","maxLength":500,"nullable":true,"default":null},"playbookId":{"type":"string","format":"uuid","description":"The same value as `savedDayId`: the id in `/v1/playbooks/{playbookId}`."}},"required":["savedDayId","ownerId","name","stops","cities","visibility","adds","sourceTripId","sourceTripName","createdAt","playbookId"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","enum":["date-anchor-removed"]},"stopIndex":{"type":"integer","minimum":0},"title":{"type":"string"},"message":{"type":"string"}},"required":["code","stopIndex","title","message"],"additionalProperties":false}}},"required":["playbook","warnings"],"additionalProperties":false}}}},"4XX":{"description":"One envelope for every failure: `{ error: { code, message, details? } }`. 401 carries `WWW-Authenticate: Bearer`; 429 carries `Retry-After`."}}}},"/v1/trips/{tripId}/activities/{activityId}":{"patch":{"summary":"Edit a stop's details, or move it to another day, position or the backlog","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X PATCH 'https://caesura.today/api/v1/trips/YOUR_TRIP_ID/activities/YOUR_ACTIVITY_ID' \\\n  -H 'Authorization: Bearer tc_YOUR_TOKEN' \\\n  -H 'Content-Type: application/json' \\\n  -d '{}'"},{"lang":"JavaScript","label":"JavaScript (fetch)","source":"const response = await fetch(\"https://caesura.today/api/v1/trips/YOUR_TRIP_ID/activities/YOUR_ACTIVITY_ID\", {\n  method: \"PATCH\",\n  headers: {\n    Authorization: \"Bearer tc_YOUR_TOKEN\",\n    \"Content-Type\": \"application/json\",\n  },\n  body: JSON.stringify({}),\n});\nconst data = await response.json();"},{"lang":"Python","label":"Python (requests)","source":"import requests\n\nresponse = requests.request(\n    \"PATCH\",\n    \"https://caesura.today/api/v1/trips/YOUR_TRIP_ID/activities/YOUR_ACTIVITY_ID\",\n    headers={\"Authorization\": \"Bearer tc_YOUR_TOKEN\"},\n    json={},\n)\ndata = response.json()"}],"description":"Requires the `trips:write` scope, or `current:write`. Requires at least the `editor` role on the trip.","security":[{"bearerAuth":["trips:write"]},{"bearerAuth":["current:write"]}],"parameters":[{"name":"tripId","in":"path","required":true,"schema":{"type":"string"}},{"name":"activityId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"bookedBy":{"type":"string","nullable":true},"participants":{"type":"array","items":{"type":"string"}},"title":{"type":"string","minLength":1,"maxLength":200},"timeWindow":{"type":"object","properties":{"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["start","end"],"additionalProperties":false,"nullable":true},"location":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"lat":{"type":"number","minimum":-90,"maximum":90,"description":"Send with lng, or omit both. When omitted on a v1 write, the server geocodes `address`, then `name`."},"lng":{"type":"number","minimum":-180,"maximum":180,"description":"Send with lat, or omit both."},"countryCode":{"type":"string","pattern":"^[A-Z]{2}$"},"city":{"type":"string","minLength":1,"maxLength":200},"area":{"type":"string","minLength":1,"maxLength":200},"precision":{"type":"string","enum":["venue","area","city"],"description":"What the coordinates describe: a `venue`, an `area` or a `city`. Requires `lat` and `lng` — sent without them it is refused (\"precision requires coordinates\")."},"verified":{"type":"boolean","enum":[false],"description":"`false` when no geocoder confirmed the coordinates (an assistant's guess). Absent = unknown. Requires `lat` and `lng`."},"address":{"type":"object","properties":{"countryCode":{"type":"string","pattern":"^[A-Z]{2}$","description":"ISO 3166-1 alpha-2, uppercase. Decides how the other fields are read."},"lines":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"description":"Street-level part, in the country's own order, e.g. [\"Hauptstraße 5\"] or [\"1-2-3 Nishi-Azabu\"]."},"dependentLocality":{"type":"string","minLength":1,"maxLength":200,"description":"District, neighbourhood or suburb when it is part of the postal address."},"locality":{"type":"string","minLength":1,"maxLength":200,"description":"City, town or post town."},"administrativeArea":{"type":"string","minLength":1,"maxLength":200,"description":"State, province, prefecture or region."},"postalCode":{"type":"string","minLength":1,"maxLength":20,"description":"A string: keeps leading zeros and letters."}},"required":["countryCode","lines"],"additionalProperties":false}},"required":["name"],"additionalProperties":false,"nullable":true},"notes":{"type":"string","maxLength":2000,"nullable":true},"anchors":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["dayOfWeek"]},"days":{"minItems":1,"type":"array","items":{"type":"string","enum":["mon","tue","wed","thu","fri","sat","sun"]}}},"required":["kind","days"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["dateRange"]},"from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["kind","from","to"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["timeOfDay"]},"window":{"type":"object","properties":{"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["start","end"],"additionalProperties":false}},"required":["kind","window"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["publicHoliday"]},"country":{"type":"string","pattern":"^[A-Z]{2}$"}},"required":["kind","country"],"additionalProperties":false}]}},"kind":{"type":"string","enum":["planned","pending","transit"],"description":"`planned`, `pending` (not settled yet; see `pendingReason`) or `transit` (a travel leg; see `mode`, `endLocation` and `flightNumber`). There is no `travel` kind — travel is `kind: \"transit\"` plus `mode`. The kinds retired in M28 — `idea`, `hold`, `booked` — are refused on write: send `pending` for the first two and `planned` for `booked`. Omitted = unchanged; no null (send `planned`). Changing `kind` clears the fields the new kind cannot carry — `mode`, `endLocation` and `flightNumber` off `transit`, `pendingReason` off `pending` — unless the patch names them."},"tags":{"type":"array","items":{"type":"string","enum":["meal","lodging","ticketed","outdoors","drinks","nightlife","museum","sight","beach","shopping","show","tour","wellness","sports"]}},"cost":{"type":"object","properties":{"amountMinor":{"type":"integer","minimum":0,"maximum":100000000000},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"],"additionalProperties":false,"nullable":true,"description":"Price for one person, in the trip's currency. A stop's total is this times its headcount: the people in `participants`, or every traveller on the trip when `participants` is empty. A `pending` stop's cost is an estimate; a `planned` or `transit` stop's is committed. Omitted = unchanged; null = cleared."},"mode":{"type":"string","enum":["walk","bus","train","flight","ferry","car","bike"],"nullable":true,"description":"Omitted = unchanged, null = cleared. Only allowed while the stop is (or this patch makes it) `transit`; otherwise a 400. A patch that changes `kind` away from `transit` clears it for you."},"endLocation":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"lat":{"type":"number","minimum":-90,"maximum":90,"description":"Send with lng, or omit both. When omitted on a v1 write, the server geocodes `address`, then `name`."},"lng":{"type":"number","minimum":-180,"maximum":180,"description":"Send with lat, or omit both."},"countryCode":{"type":"string","pattern":"^[A-Z]{2}$"},"city":{"type":"string","minLength":1,"maxLength":200},"area":{"type":"string","minLength":1,"maxLength":200},"precision":{"type":"string","enum":["venue","area","city"],"description":"What the coordinates describe: a `venue`, an `area` or a `city`. Requires `lat` and `lng` — sent without them it is refused (\"precision requires coordinates\")."},"verified":{"type":"boolean","enum":[false],"description":"`false` when no geocoder confirmed the coordinates (an assistant's guess). Absent = unknown. Requires `lat` and `lng`."},"address":{"type":"object","properties":{"countryCode":{"type":"string","pattern":"^[A-Z]{2}$","description":"ISO 3166-1 alpha-2, uppercase. Decides how the other fields are read."},"lines":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"description":"Street-level part, in the country's own order, e.g. [\"Hauptstraße 5\"] or [\"1-2-3 Nishi-Azabu\"]."},"dependentLocality":{"type":"string","minLength":1,"maxLength":200,"description":"District, neighbourhood or suburb when it is part of the postal address."},"locality":{"type":"string","minLength":1,"maxLength":200,"description":"City, town or post town."},"administrativeArea":{"type":"string","minLength":1,"maxLength":200,"description":"State, province, prefecture or region."},"postalCode":{"type":"string","minLength":1,"maxLength":20,"description":"A string: keeps leading zeros and letters."}},"required":["countryCode","lines"],"additionalProperties":false}},"required":["name"],"additionalProperties":false,"nullable":true,"description":"Where a travel leg ends. Omitted = unchanged, null = cleared. Only allowed while the stop is (or this patch makes it) `transit`; otherwise a 400. A patch that changes `kind` away from `transit` clears it for you."},"pendingReason":{"type":"string","enum":["book","maybe"],"nullable":true,"description":"Omitted = unchanged, null = cleared. Only allowed while the stop is (or this patch makes it) `pending`; otherwise a 400. A patch that changes `kind` away from `pending` clears it for you."},"flightNumber":{"type":"string","minLength":1,"maxLength":20,"nullable":true,"description":"A flight leg's flight number. Omitted = unchanged, null = cleared. Only allowed while the stop is (or this patch makes it) `transit`; otherwise a 400. A patch that changes `kind` away from `transit` clears it for you."},"booking":{"type":"object","properties":{"confirmation":{"type":"string","minLength":1,"maxLength":100},"provider":{"type":"string","minLength":1,"maxLength":100},"url":{"type":"string","maxLength":2000,"format":"uri"}},"additionalProperties":false,"nullable":true,"description":"Omitted = unchanged, null = cleared. The whole booking is replaced, so send every part to keep. A booking with none of its three parts is stored as cleared. Any kind of stop."},"dayId":{"type":"string","format":"uuid","nullable":true},"position":{"type":"integer","minimum":0}},"additionalProperties":false}}}},"responses":{"200":{"description":"Success.","headers":{"Geocode-Outcome":{"description":"Present when the body carried a `location`. One of: provided (you sent lat/lng), address, name (coordinates were geocoded from that field), city (the name lookup's answer was refused, and the stop is pinned at the centre of its `city` with `precision: \"city\"`), rejected, no-match, quota-exhausted, unavailable (the stop was saved without coordinates — send lat/lng, or look them up with GET /v1/trips/{tripId}/geocode). `rejected` means the lookup answered with a place whose name is a different place's, or one outside the area of the trip's other stops (unless you sent a `countryCode` the trip has no other stop in).","schema":{"type":"string"}},"Geocode-Outcome-End":{"description":"Present when the body carried an `endLocation`. The same values as Geocode-Outcome, for that place.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"tripId":{"type":"string","format":"uuid"},"name":{"type":"string"},"status":{"type":"string","enum":["active","deleted"]},"startDate":{"type":"string","nullable":true},"currency":{"type":"string"},"budget":{"type":"object","properties":{"amountMinor":{"type":"integer","minimum":0},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"],"additionalProperties":false,"nullable":true},"members":{"minItems":1,"type":"array","items":{"type":"object","properties":{"userId":{"type":"string","minLength":1},"role":{"type":"string","enum":["viewer","suggester","editor","owner"]},"travelling":{"type":"boolean"}},"required":["userId","role"],"additionalProperties":false}},"forkedFrom":{"type":"object","properties":{"tripId":{"type":"string","format":"uuid"},"atSeq":{"type":"integer","minimum":1},"name":{"type":"string","minLength":1,"maxLength":200}},"required":["tripId","atSeq","name"],"additionalProperties":false,"nullable":true,"default":null},"pace":{"type":"string","enum":["slow","balanced","packed"],"nullable":true,"default":null},"tags":{"type":"array","items":{"type":"string","enum":["meal","outdoors","drinks","nightlife","museum","sight","beach","shopping","show","tour","wellness","sports"]},"default":[]},"days":{"type":"array","items":{"type":"object","properties":{"dayId":{"type":"string","format":"uuid"},"activityIds":{"type":"array","items":{"type":"string","format":"uuid"}},"date":{"type":"string","nullable":true},"costSubtotal":{"type":"integer"}},"required":["dayId","activityIds","date","costSubtotal"],"additionalProperties":false}},"backlog":{"type":"array","items":{"type":"string","format":"uuid"}},"parkedFrom":{"type":"object","additionalProperties":{"type":"string","format":"uuid"}},"activities":{"type":"object","additionalProperties":{"type":"object","properties":{"activityId":{"type":"string","format":"uuid"},"title":{"type":"string"},"timeWindow":{"type":"object","properties":{"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["start","end"],"additionalProperties":false,"nullable":true},"location":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"lat":{"type":"number","minimum":-90,"maximum":90,"description":"Send with lng, or omit both. When omitted on a v1 write, the server geocodes `address`, then `name`."},"lng":{"type":"number","minimum":-180,"maximum":180,"description":"Send with lat, or omit both."},"countryCode":{"type":"string","pattern":"^[A-Z]{2}$"},"city":{"type":"string","minLength":1,"maxLength":200},"area":{"type":"string","minLength":1,"maxLength":200},"precision":{"type":"string","enum":["venue","area","city"],"description":"What the coordinates describe: a `venue`, an `area` or a `city`. Requires `lat` and `lng` — sent without them it is refused (\"precision requires coordinates\")."},"verified":{"type":"boolean","enum":[false],"description":"`false` when no geocoder confirmed the coordinates (an assistant's guess). Absent = unknown. Requires `lat` and `lng`."},"address":{"type":"object","properties":{"countryCode":{"type":"string","pattern":"^[A-Z]{2}$","description":"ISO 3166-1 alpha-2, uppercase. Decides how the other fields are read."},"lines":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"description":"Street-level part, in the country's own order, e.g. [\"Hauptstraße 5\"] or [\"1-2-3 Nishi-Azabu\"]."},"dependentLocality":{"type":"string","minLength":1,"maxLength":200,"description":"District, neighbourhood or suburb when it is part of the postal address."},"locality":{"type":"string","minLength":1,"maxLength":200,"description":"City, town or post town."},"administrativeArea":{"type":"string","minLength":1,"maxLength":200,"description":"State, province, prefecture or region."},"postalCode":{"type":"string","minLength":1,"maxLength":20,"description":"A string: keeps leading zeros and letters."}},"required":["countryCode","lines"],"additionalProperties":false}},"required":["name"],"additionalProperties":false,"nullable":true},"notes":{"type":"string","nullable":true},"anchors":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["dayOfWeek"]},"days":{"minItems":1,"type":"array","items":{"type":"string","enum":["mon","tue","wed","thu","fri","sat","sun"]}}},"required":["kind","days"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["dateRange"]},"from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["kind","from","to"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["timeOfDay"]},"window":{"type":"object","properties":{"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["start","end"],"additionalProperties":false}},"required":["kind","window"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["publicHoliday"]},"country":{"type":"string","pattern":"^[A-Z]{2}$"}},"required":["kind","country"],"additionalProperties":false}]}},"kind":{"type":"string","enum":["planned","pending","transit"],"default":"planned"},"tags":{"type":"array","items":{"type":"string","enum":["meal","lodging","ticketed","outdoors","drinks","nightlife","museum","sight","beach","shopping","show","tour","wellness","sports"]},"default":[]},"cost":{"type":"object","properties":{"amountMinor":{"type":"integer","minimum":0},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"],"additionalProperties":false,"nullable":true,"description":"Price for one person, in the trip's currency. A stop's total is this times its headcount: the people in `participants`, or every traveller on the trip when `participants` is empty. A `pending` stop's cost is an estimate; a `planned` or `transit` stop's is committed."},"bookedBy":{"type":"string","nullable":true,"default":null},"participants":{"type":"array","items":{"type":"string"},"default":[]},"addedBy":{"type":"string","nullable":true,"default":null},"mode":{"type":"string","enum":["walk","bus","train","flight","ferry","car","bike"],"nullable":true,"default":null},"endLocation":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"lat":{"type":"number","minimum":-90,"maximum":90,"description":"Send with lng, or omit both. When omitted on a v1 write, the server geocodes `address`, then `name`."},"lng":{"type":"number","minimum":-180,"maximum":180,"description":"Send with lat, or omit both."},"countryCode":{"type":"string","pattern":"^[A-Z]{2}$"},"city":{"type":"string","minLength":1,"maxLength":200},"area":{"type":"string","minLength":1,"maxLength":200},"precision":{"type":"string","enum":["venue","area","city"],"description":"What the coordinates describe: a `venue`, an `area` or a `city`. Requires `lat` and `lng` — sent without them it is refused (\"precision requires coordinates\")."},"verified":{"type":"boolean","enum":[false],"description":"`false` when no geocoder confirmed the coordinates (an assistant's guess). Absent = unknown. Requires `lat` and `lng`."},"address":{"type":"object","properties":{"countryCode":{"type":"string","pattern":"^[A-Z]{2}$","description":"ISO 3166-1 alpha-2, uppercase. Decides how the other fields are read."},"lines":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"description":"Street-level part, in the country's own order, e.g. [\"Hauptstraße 5\"] or [\"1-2-3 Nishi-Azabu\"]."},"dependentLocality":{"type":"string","minLength":1,"maxLength":200,"description":"District, neighbourhood or suburb when it is part of the postal address."},"locality":{"type":"string","minLength":1,"maxLength":200,"description":"City, town or post town."},"administrativeArea":{"type":"string","minLength":1,"maxLength":200,"description":"State, province, prefecture or region."},"postalCode":{"type":"string","minLength":1,"maxLength":20,"description":"A string: keeps leading zeros and letters."}},"required":["countryCode","lines"],"additionalProperties":false}},"required":["name"],"additionalProperties":false,"nullable":true,"default":null},"pendingReason":{"type":"string","enum":["book","maybe"],"nullable":true,"default":null},"flightNumber":{"type":"string","nullable":true,"default":null},"booking":{"type":"object","properties":{"confirmation":{"type":"string"},"provider":{"type":"string","nullable":true},"url":{"type":"string"}},"additionalProperties":false,"nullable":true,"default":null}},"required":["activityId","title","timeWindow","location","notes","anchors","cost"],"additionalProperties":false}},"conflicts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"severity":{"type":"string","enum":["info","warn","error"]},"subjects":{"type":"array","items":{"type":"string"}},"resolutions":{"type":"array","items":{"type":"string"}},"description":{"type":"string"}},"required":["id","kind","severity","subjects","description","resolutions"],"additionalProperties":false}},"dismissedConflictIds":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string"},"unscheduledCostSubtotal":{"type":"integer"},"tripCostTotal":{"type":"integer"},"budgetRemaining":{"type":"integer","nullable":true}},"required":["tripId","name","status","startDate","currency","budget","members","days","backlog","activities","conflicts","dismissedConflictIds","createdAt","unscheduledCostSubtotal","tripCostTotal","budgetRemaining"],"additionalProperties":false}}}},"4XX":{"description":"One envelope for every failure: `{ error: { code, message, details? } }`. 401 carries `WWW-Authenticate: Bearer`; 429 carries `Retry-After`."}}},"delete":{"summary":"Remove a stop from a trip","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X DELETE 'https://caesura.today/api/v1/trips/YOUR_TRIP_ID/activities/YOUR_ACTIVITY_ID' \\\n  -H 'Authorization: Bearer tc_YOUR_TOKEN'"},{"lang":"JavaScript","label":"JavaScript (fetch)","source":"const response = await fetch(\"https://caesura.today/api/v1/trips/YOUR_TRIP_ID/activities/YOUR_ACTIVITY_ID\", {\n  method: \"DELETE\",\n  headers: {\n    Authorization: \"Bearer tc_YOUR_TOKEN\",\n  },\n});\nconst data = await response.json();"},{"lang":"Python","label":"Python (requests)","source":"import requests\n\nresponse = requests.request(\n    \"DELETE\",\n    \"https://caesura.today/api/v1/trips/YOUR_TRIP_ID/activities/YOUR_ACTIVITY_ID\",\n    headers={\"Authorization\": \"Bearer tc_YOUR_TOKEN\"},\n)\ndata = response.json()"}],"description":"Requires the `trips:write` scope, or `current:write`. Requires at least the `editor` role on the trip.","security":[{"bearerAuth":["trips:write"]},{"bearerAuth":["current:write"]}],"parameters":[{"name":"tripId","in":"path","required":true,"schema":{"type":"string"}},{"name":"activityId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"tripId":{"type":"string","format":"uuid"},"name":{"type":"string"},"status":{"type":"string","enum":["active","deleted"]},"startDate":{"type":"string","nullable":true},"currency":{"type":"string"},"budget":{"type":"object","properties":{"amountMinor":{"type":"integer","minimum":0},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"],"additionalProperties":false,"nullable":true},"members":{"minItems":1,"type":"array","items":{"type":"object","properties":{"userId":{"type":"string","minLength":1},"role":{"type":"string","enum":["viewer","suggester","editor","owner"]},"travelling":{"type":"boolean"}},"required":["userId","role"],"additionalProperties":false}},"forkedFrom":{"type":"object","properties":{"tripId":{"type":"string","format":"uuid"},"atSeq":{"type":"integer","minimum":1},"name":{"type":"string","minLength":1,"maxLength":200}},"required":["tripId","atSeq","name"],"additionalProperties":false,"nullable":true,"default":null},"pace":{"type":"string","enum":["slow","balanced","packed"],"nullable":true,"default":null},"tags":{"type":"array","items":{"type":"string","enum":["meal","outdoors","drinks","nightlife","museum","sight","beach","shopping","show","tour","wellness","sports"]},"default":[]},"days":{"type":"array","items":{"type":"object","properties":{"dayId":{"type":"string","format":"uuid"},"activityIds":{"type":"array","items":{"type":"string","format":"uuid"}},"date":{"type":"string","nullable":true},"costSubtotal":{"type":"integer"}},"required":["dayId","activityIds","date","costSubtotal"],"additionalProperties":false}},"backlog":{"type":"array","items":{"type":"string","format":"uuid"}},"parkedFrom":{"type":"object","additionalProperties":{"type":"string","format":"uuid"}},"activities":{"type":"object","additionalProperties":{"type":"object","properties":{"activityId":{"type":"string","format":"uuid"},"title":{"type":"string"},"timeWindow":{"type":"object","properties":{"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["start","end"],"additionalProperties":false,"nullable":true},"location":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"lat":{"type":"number","minimum":-90,"maximum":90,"description":"Send with lng, or omit both. When omitted on a v1 write, the server geocodes `address`, then `name`."},"lng":{"type":"number","minimum":-180,"maximum":180,"description":"Send with lat, or omit both."},"countryCode":{"type":"string","pattern":"^[A-Z]{2}$"},"city":{"type":"string","minLength":1,"maxLength":200},"area":{"type":"string","minLength":1,"maxLength":200},"precision":{"type":"string","enum":["venue","area","city"],"description":"What the coordinates describe: a `venue`, an `area` or a `city`. Requires `lat` and `lng` — sent without them it is refused (\"precision requires coordinates\")."},"verified":{"type":"boolean","enum":[false],"description":"`false` when no geocoder confirmed the coordinates (an assistant's guess). Absent = unknown. Requires `lat` and `lng`."},"address":{"type":"object","properties":{"countryCode":{"type":"string","pattern":"^[A-Z]{2}$","description":"ISO 3166-1 alpha-2, uppercase. Decides how the other fields are read."},"lines":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"description":"Street-level part, in the country's own order, e.g. [\"Hauptstraße 5\"] or [\"1-2-3 Nishi-Azabu\"]."},"dependentLocality":{"type":"string","minLength":1,"maxLength":200,"description":"District, neighbourhood or suburb when it is part of the postal address."},"locality":{"type":"string","minLength":1,"maxLength":200,"description":"City, town or post town."},"administrativeArea":{"type":"string","minLength":1,"maxLength":200,"description":"State, province, prefecture or region."},"postalCode":{"type":"string","minLength":1,"maxLength":20,"description":"A string: keeps leading zeros and letters."}},"required":["countryCode","lines"],"additionalProperties":false}},"required":["name"],"additionalProperties":false,"nullable":true},"notes":{"type":"string","nullable":true},"anchors":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["dayOfWeek"]},"days":{"minItems":1,"type":"array","items":{"type":"string","enum":["mon","tue","wed","thu","fri","sat","sun"]}}},"required":["kind","days"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["dateRange"]},"from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["kind","from","to"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["timeOfDay"]},"window":{"type":"object","properties":{"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["start","end"],"additionalProperties":false}},"required":["kind","window"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["publicHoliday"]},"country":{"type":"string","pattern":"^[A-Z]{2}$"}},"required":["kind","country"],"additionalProperties":false}]}},"kind":{"type":"string","enum":["planned","pending","transit"],"default":"planned"},"tags":{"type":"array","items":{"type":"string","enum":["meal","lodging","ticketed","outdoors","drinks","nightlife","museum","sight","beach","shopping","show","tour","wellness","sports"]},"default":[]},"cost":{"type":"object","properties":{"amountMinor":{"type":"integer","minimum":0},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"],"additionalProperties":false,"nullable":true,"description":"Price for one person, in the trip's currency. A stop's total is this times its headcount: the people in `participants`, or every traveller on the trip when `participants` is empty. A `pending` stop's cost is an estimate; a `planned` or `transit` stop's is committed."},"bookedBy":{"type":"string","nullable":true,"default":null},"participants":{"type":"array","items":{"type":"string"},"default":[]},"addedBy":{"type":"string","nullable":true,"default":null},"mode":{"type":"string","enum":["walk","bus","train","flight","ferry","car","bike"],"nullable":true,"default":null},"endLocation":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"lat":{"type":"number","minimum":-90,"maximum":90,"description":"Send with lng, or omit both. When omitted on a v1 write, the server geocodes `address`, then `name`."},"lng":{"type":"number","minimum":-180,"maximum":180,"description":"Send with lat, or omit both."},"countryCode":{"type":"string","pattern":"^[A-Z]{2}$"},"city":{"type":"string","minLength":1,"maxLength":200},"area":{"type":"string","minLength":1,"maxLength":200},"precision":{"type":"string","enum":["venue","area","city"],"description":"What the coordinates describe: a `venue`, an `area` or a `city`. Requires `lat` and `lng` — sent without them it is refused (\"precision requires coordinates\")."},"verified":{"type":"boolean","enum":[false],"description":"`false` when no geocoder confirmed the coordinates (an assistant's guess). Absent = unknown. Requires `lat` and `lng`."},"address":{"type":"object","properties":{"countryCode":{"type":"string","pattern":"^[A-Z]{2}$","description":"ISO 3166-1 alpha-2, uppercase. Decides how the other fields are read."},"lines":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"description":"Street-level part, in the country's own order, e.g. [\"Hauptstraße 5\"] or [\"1-2-3 Nishi-Azabu\"]."},"dependentLocality":{"type":"string","minLength":1,"maxLength":200,"description":"District, neighbourhood or suburb when it is part of the postal address."},"locality":{"type":"string","minLength":1,"maxLength":200,"description":"City, town or post town."},"administrativeArea":{"type":"string","minLength":1,"maxLength":200,"description":"State, province, prefecture or region."},"postalCode":{"type":"string","minLength":1,"maxLength":20,"description":"A string: keeps leading zeros and letters."}},"required":["countryCode","lines"],"additionalProperties":false}},"required":["name"],"additionalProperties":false,"nullable":true,"default":null},"pendingReason":{"type":"string","enum":["book","maybe"],"nullable":true,"default":null},"flightNumber":{"type":"string","nullable":true,"default":null},"booking":{"type":"object","properties":{"confirmation":{"type":"string"},"provider":{"type":"string","nullable":true},"url":{"type":"string"}},"additionalProperties":false,"nullable":true,"default":null}},"required":["activityId","title","timeWindow","location","notes","anchors","cost"],"additionalProperties":false}},"conflicts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"severity":{"type":"string","enum":["info","warn","error"]},"subjects":{"type":"array","items":{"type":"string"}},"resolutions":{"type":"array","items":{"type":"string"}},"description":{"type":"string"}},"required":["id","kind","severity","subjects","description","resolutions"],"additionalProperties":false}},"dismissedConflictIds":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string"},"unscheduledCostSubtotal":{"type":"integer"},"tripCostTotal":{"type":"integer"},"budgetRemaining":{"type":"integer","nullable":true}},"required":["tripId","name","status","startDate","currency","budget","members","days","backlog","activities","conflicts","dismissedConflictIds","createdAt","unscheduledCostSubtotal","tripCostTotal","budgetRemaining"],"additionalProperties":false}}}},"4XX":{"description":"One envelope for every failure: `{ error: { code, message, details? } }`. 401 carries `WWW-Authenticate: Bearer`; 429 carries `Retry-After`."}}}},"/v1/trips/{tripId}/activities":{"post":{"summary":"Add a stop to a trip, on a day or in the unscheduled backlog (geocodes its location if needed)","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://caesura.today/api/v1/trips/YOUR_TRIP_ID/activities' \\\n  -H 'Authorization: Bearer tc_YOUR_TOKEN' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n  \"title\": \"string\"\n}'"},{"lang":"JavaScript","label":"JavaScript (fetch)","source":"const response = await fetch(\"https://caesura.today/api/v1/trips/YOUR_TRIP_ID/activities\", {\n  method: \"POST\",\n  headers: {\n    Authorization: \"Bearer tc_YOUR_TOKEN\",\n    \"Content-Type\": \"application/json\",\n  },\n  body: JSON.stringify({\n    \"title\": \"string\"\n  }),\n});\nconst data = await response.json();"},{"lang":"Python","label":"Python (requests)","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://caesura.today/api/v1/trips/YOUR_TRIP_ID/activities\",\n    headers={\"Authorization\": \"Bearer tc_YOUR_TOKEN\"},\n    json={\"title\": \"string\"},\n)\ndata = response.json()"}],"description":"Requires the `trips:write` scope, or `current:write`. Requires at least the `editor` role on the trip.","security":[{"bearerAuth":["trips:write"]},{"bearerAuth":["current:write"]}],"parameters":[{"name":"tripId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"bookedBy":{"type":"string","nullable":true},"participants":{"type":"array","items":{"type":"string"}},"dayId":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":1,"maxLength":200},"timeWindow":{"type":"object","properties":{"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["start","end"],"additionalProperties":false},"location":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"lat":{"type":"number","minimum":-90,"maximum":90,"description":"Send with lng, or omit both. When omitted on a v1 write, the server geocodes `address`, then `name`."},"lng":{"type":"number","minimum":-180,"maximum":180,"description":"Send with lat, or omit both."},"countryCode":{"type":"string","pattern":"^[A-Z]{2}$"},"city":{"type":"string","minLength":1,"maxLength":200},"area":{"type":"string","minLength":1,"maxLength":200},"precision":{"type":"string","enum":["venue","area","city"],"description":"What the coordinates describe: a `venue`, an `area` or a `city`. Requires `lat` and `lng` — sent without them it is refused (\"precision requires coordinates\")."},"verified":{"type":"boolean","enum":[false],"description":"`false` when no geocoder confirmed the coordinates (an assistant's guess). Absent = unknown. Requires `lat` and `lng`."},"address":{"type":"object","properties":{"countryCode":{"type":"string","pattern":"^[A-Z]{2}$","description":"ISO 3166-1 alpha-2, uppercase. Decides how the other fields are read."},"lines":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"description":"Street-level part, in the country's own order, e.g. [\"Hauptstraße 5\"] or [\"1-2-3 Nishi-Azabu\"]."},"dependentLocality":{"type":"string","minLength":1,"maxLength":200,"description":"District, neighbourhood or suburb when it is part of the postal address."},"locality":{"type":"string","minLength":1,"maxLength":200,"description":"City, town or post town."},"administrativeArea":{"type":"string","minLength":1,"maxLength":200,"description":"State, province, prefecture or region."},"postalCode":{"type":"string","minLength":1,"maxLength":20,"description":"A string: keeps leading zeros and letters."}},"required":["countryCode","lines"],"additionalProperties":false}},"required":["name"],"additionalProperties":false},"notes":{"type":"string","maxLength":2000},"anchors":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["dayOfWeek"]},"days":{"minItems":1,"type":"array","items":{"type":"string","enum":["mon","tue","wed","thu","fri","sat","sun"]}}},"required":["kind","days"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["dateRange"]},"from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["kind","from","to"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["timeOfDay"]},"window":{"type":"object","properties":{"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["start","end"],"additionalProperties":false}},"required":["kind","window"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["publicHoliday"]},"country":{"type":"string","pattern":"^[A-Z]{2}$"}},"required":["kind","country"],"additionalProperties":false}]}},"kind":{"type":"string","enum":["planned","pending","transit"],"description":"`planned`, `pending` (not settled yet; see `pendingReason`) or `transit` (a travel leg; see `mode`, `endLocation` and `flightNumber`). There is no `travel` kind — travel is `kind: \"transit\"` plus `mode`. The kinds retired in M28 — `idea`, `hold`, `booked` — are refused on write: send `pending` for the first two and `planned` for `booked`. Omitted = `planned`."},"tags":{"type":"array","items":{"type":"string","enum":["meal","lodging","ticketed","outdoors","drinks","nightlife","museum","sight","beach","shopping","show","tour","wellness","sports"]}},"cost":{"type":"object","properties":{"amountMinor":{"type":"integer","minimum":0,"maximum":100000000000},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"],"additionalProperties":false,"description":"Price for one person, in the trip's currency. A stop's total is this times its headcount: the people in `participants`, or every traveller on the trip when `participants` is empty. A `pending` stop's cost is an estimate; a `planned` or `transit` stop's is committed. Omitted = no cost."},"mode":{"type":"string","enum":["walk","bus","train","flight","ferry","car","bike"],"description":"How a travel leg travels. Only allowed when `kind` is `transit` — an omitted `kind` is `planned`, so send `kind: \"transit\"` with it; otherwise a 400."},"endLocation":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"lat":{"type":"number","minimum":-90,"maximum":90,"description":"Send with lng, or omit both. When omitted on a v1 write, the server geocodes `address`, then `name`."},"lng":{"type":"number","minimum":-180,"maximum":180,"description":"Send with lat, or omit both."},"countryCode":{"type":"string","pattern":"^[A-Z]{2}$"},"city":{"type":"string","minLength":1,"maxLength":200},"area":{"type":"string","minLength":1,"maxLength":200},"precision":{"type":"string","enum":["venue","area","city"],"description":"What the coordinates describe: a `venue`, an `area` or a `city`. Requires `lat` and `lng` — sent without them it is refused (\"precision requires coordinates\")."},"verified":{"type":"boolean","enum":[false],"description":"`false` when no geocoder confirmed the coordinates (an assistant's guess). Absent = unknown. Requires `lat` and `lng`."},"address":{"type":"object","properties":{"countryCode":{"type":"string","pattern":"^[A-Z]{2}$","description":"ISO 3166-1 alpha-2, uppercase. Decides how the other fields are read."},"lines":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"description":"Street-level part, in the country's own order, e.g. [\"Hauptstraße 5\"] or [\"1-2-3 Nishi-Azabu\"]."},"dependentLocality":{"type":"string","minLength":1,"maxLength":200,"description":"District, neighbourhood or suburb when it is part of the postal address."},"locality":{"type":"string","minLength":1,"maxLength":200,"description":"City, town or post town."},"administrativeArea":{"type":"string","minLength":1,"maxLength":200,"description":"State, province, prefecture or region."},"postalCode":{"type":"string","minLength":1,"maxLength":20,"description":"A string: keeps leading zeros and letters."}},"required":["countryCode","lines"],"additionalProperties":false}},"required":["name"],"additionalProperties":false,"description":"Where a travel leg ends; `location` is where it starts. Only allowed when `kind` is `transit`; otherwise a 400."},"pendingReason":{"type":"string","enum":["book","maybe"],"description":"Why a stop is not settled: `book` (still has to be booked) or `maybe` (may not happen at all). Only allowed when `kind` is `pending`; otherwise a 400."},"flightNumber":{"type":"string","minLength":1,"maxLength":20,"description":"A flight leg's flight number, such as `TP 1234`. Only allowed when `kind` is `transit`; otherwise a 400."},"booking":{"type":"object","properties":{"confirmation":{"type":"string","minLength":1,"maxLength":100},"provider":{"type":"string","minLength":1,"maxLength":100},"url":{"type":"string","maxLength":2000,"format":"uri"}},"additionalProperties":false,"description":"What was booked for this stop: `confirmation` code, `provider` and a manage-it `url` (http or https). Any kind of stop. Omitted = none."}},"required":["title"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success.","headers":{"Geocode-Outcome":{"description":"Present when the body carried a `location`. One of: provided (you sent lat/lng), address, name (coordinates were geocoded from that field), city (the name lookup's answer was refused, and the stop is pinned at the centre of its `city` with `precision: \"city\"`), rejected, no-match, quota-exhausted, unavailable (the stop was saved without coordinates — send lat/lng, or look them up with GET /v1/trips/{tripId}/geocode). `rejected` means the lookup answered with a place whose name is a different place's, or one outside the area of the trip's other stops (unless you sent a `countryCode` the trip has no other stop in).","schema":{"type":"string"}},"Geocode-Outcome-End":{"description":"Present when the body carried an `endLocation`. The same values as Geocode-Outcome, for that place.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"tripId":{"type":"string","format":"uuid"},"name":{"type":"string"},"status":{"type":"string","enum":["active","deleted"]},"startDate":{"type":"string","nullable":true},"currency":{"type":"string"},"budget":{"type":"object","properties":{"amountMinor":{"type":"integer","minimum":0},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"],"additionalProperties":false,"nullable":true},"members":{"minItems":1,"type":"array","items":{"type":"object","properties":{"userId":{"type":"string","minLength":1},"role":{"type":"string","enum":["viewer","suggester","editor","owner"]},"travelling":{"type":"boolean"}},"required":["userId","role"],"additionalProperties":false}},"forkedFrom":{"type":"object","properties":{"tripId":{"type":"string","format":"uuid"},"atSeq":{"type":"integer","minimum":1},"name":{"type":"string","minLength":1,"maxLength":200}},"required":["tripId","atSeq","name"],"additionalProperties":false,"nullable":true,"default":null},"pace":{"type":"string","enum":["slow","balanced","packed"],"nullable":true,"default":null},"tags":{"type":"array","items":{"type":"string","enum":["meal","outdoors","drinks","nightlife","museum","sight","beach","shopping","show","tour","wellness","sports"]},"default":[]},"days":{"type":"array","items":{"type":"object","properties":{"dayId":{"type":"string","format":"uuid"},"activityIds":{"type":"array","items":{"type":"string","format":"uuid"}},"date":{"type":"string","nullable":true},"costSubtotal":{"type":"integer"}},"required":["dayId","activityIds","date","costSubtotal"],"additionalProperties":false}},"backlog":{"type":"array","items":{"type":"string","format":"uuid"}},"parkedFrom":{"type":"object","additionalProperties":{"type":"string","format":"uuid"}},"activities":{"type":"object","additionalProperties":{"type":"object","properties":{"activityId":{"type":"string","format":"uuid"},"title":{"type":"string"},"timeWindow":{"type":"object","properties":{"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["start","end"],"additionalProperties":false,"nullable":true},"location":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"lat":{"type":"number","minimum":-90,"maximum":90,"description":"Send with lng, or omit both. When omitted on a v1 write, the server geocodes `address`, then `name`."},"lng":{"type":"number","minimum":-180,"maximum":180,"description":"Send with lat, or omit both."},"countryCode":{"type":"string","pattern":"^[A-Z]{2}$"},"city":{"type":"string","minLength":1,"maxLength":200},"area":{"type":"string","minLength":1,"maxLength":200},"precision":{"type":"string","enum":["venue","area","city"],"description":"What the coordinates describe: a `venue`, an `area` or a `city`. Requires `lat` and `lng` — sent without them it is refused (\"precision requires coordinates\")."},"verified":{"type":"boolean","enum":[false],"description":"`false` when no geocoder confirmed the coordinates (an assistant's guess). Absent = unknown. Requires `lat` and `lng`."},"address":{"type":"object","properties":{"countryCode":{"type":"string","pattern":"^[A-Z]{2}$","description":"ISO 3166-1 alpha-2, uppercase. Decides how the other fields are read."},"lines":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"description":"Street-level part, in the country's own order, e.g. [\"Hauptstraße 5\"] or [\"1-2-3 Nishi-Azabu\"]."},"dependentLocality":{"type":"string","minLength":1,"maxLength":200,"description":"District, neighbourhood or suburb when it is part of the postal address."},"locality":{"type":"string","minLength":1,"maxLength":200,"description":"City, town or post town."},"administrativeArea":{"type":"string","minLength":1,"maxLength":200,"description":"State, province, prefecture or region."},"postalCode":{"type":"string","minLength":1,"maxLength":20,"description":"A string: keeps leading zeros and letters."}},"required":["countryCode","lines"],"additionalProperties":false}},"required":["name"],"additionalProperties":false,"nullable":true},"notes":{"type":"string","nullable":true},"anchors":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["dayOfWeek"]},"days":{"minItems":1,"type":"array","items":{"type":"string","enum":["mon","tue","wed","thu","fri","sat","sun"]}}},"required":["kind","days"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["dateRange"]},"from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["kind","from","to"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["timeOfDay"]},"window":{"type":"object","properties":{"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["start","end"],"additionalProperties":false}},"required":["kind","window"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["publicHoliday"]},"country":{"type":"string","pattern":"^[A-Z]{2}$"}},"required":["kind","country"],"additionalProperties":false}]}},"kind":{"type":"string","enum":["planned","pending","transit"],"default":"planned"},"tags":{"type":"array","items":{"type":"string","enum":["meal","lodging","ticketed","outdoors","drinks","nightlife","museum","sight","beach","shopping","show","tour","wellness","sports"]},"default":[]},"cost":{"type":"object","properties":{"amountMinor":{"type":"integer","minimum":0},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"],"additionalProperties":false,"nullable":true,"description":"Price for one person, in the trip's currency. A stop's total is this times its headcount: the people in `participants`, or every traveller on the trip when `participants` is empty. A `pending` stop's cost is an estimate; a `planned` or `transit` stop's is committed."},"bookedBy":{"type":"string","nullable":true,"default":null},"participants":{"type":"array","items":{"type":"string"},"default":[]},"addedBy":{"type":"string","nullable":true,"default":null},"mode":{"type":"string","enum":["walk","bus","train","flight","ferry","car","bike"],"nullable":true,"default":null},"endLocation":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"lat":{"type":"number","minimum":-90,"maximum":90,"description":"Send with lng, or omit both. When omitted on a v1 write, the server geocodes `address`, then `name`."},"lng":{"type":"number","minimum":-180,"maximum":180,"description":"Send with lat, or omit both."},"countryCode":{"type":"string","pattern":"^[A-Z]{2}$"},"city":{"type":"string","minLength":1,"maxLength":200},"area":{"type":"string","minLength":1,"maxLength":200},"precision":{"type":"string","enum":["venue","area","city"],"description":"What the coordinates describe: a `venue`, an `area` or a `city`. Requires `lat` and `lng` — sent without them it is refused (\"precision requires coordinates\")."},"verified":{"type":"boolean","enum":[false],"description":"`false` when no geocoder confirmed the coordinates (an assistant's guess). Absent = unknown. Requires `lat` and `lng`."},"address":{"type":"object","properties":{"countryCode":{"type":"string","pattern":"^[A-Z]{2}$","description":"ISO 3166-1 alpha-2, uppercase. Decides how the other fields are read."},"lines":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"description":"Street-level part, in the country's own order, e.g. [\"Hauptstraße 5\"] or [\"1-2-3 Nishi-Azabu\"]."},"dependentLocality":{"type":"string","minLength":1,"maxLength":200,"description":"District, neighbourhood or suburb when it is part of the postal address."},"locality":{"type":"string","minLength":1,"maxLength":200,"description":"City, town or post town."},"administrativeArea":{"type":"string","minLength":1,"maxLength":200,"description":"State, province, prefecture or region."},"postalCode":{"type":"string","minLength":1,"maxLength":20,"description":"A string: keeps leading zeros and letters."}},"required":["countryCode","lines"],"additionalProperties":false}},"required":["name"],"additionalProperties":false,"nullable":true,"default":null},"pendingReason":{"type":"string","enum":["book","maybe"],"nullable":true,"default":null},"flightNumber":{"type":"string","nullable":true,"default":null},"booking":{"type":"object","properties":{"confirmation":{"type":"string"},"provider":{"type":"string","nullable":true},"url":{"type":"string"}},"additionalProperties":false,"nullable":true,"default":null}},"required":["activityId","title","timeWindow","location","notes","anchors","cost"],"additionalProperties":false}},"conflicts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"severity":{"type":"string","enum":["info","warn","error"]},"subjects":{"type":"array","items":{"type":"string"}},"resolutions":{"type":"array","items":{"type":"string"}},"description":{"type":"string"}},"required":["id","kind","severity","subjects","description","resolutions"],"additionalProperties":false}},"dismissedConflictIds":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string"},"unscheduledCostSubtotal":{"type":"integer"},"tripCostTotal":{"type":"integer"},"budgetRemaining":{"type":"integer","nullable":true}},"required":["tripId","name","status","startDate","currency","budget","members","days","backlog","activities","conflicts","dismissedConflictIds","createdAt","unscheduledCostSubtotal","tripCostTotal","budgetRemaining"],"additionalProperties":false}}}},"4XX":{"description":"One envelope for every failure: `{ error: { code, message, details? } }`. 401 carries `WWW-Authenticate: Bearer`; 429 carries `Retry-After`."}}}},"/v1/trips/{tripId}/conflicts/{conflictId}":{"delete":{"summary":"Dismiss a scheduling conflict warning on a trip","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X DELETE 'https://caesura.today/api/v1/trips/YOUR_TRIP_ID/conflicts/YOUR_CONFLICT_ID' \\\n  -H 'Authorization: Bearer tc_YOUR_TOKEN'"},{"lang":"JavaScript","label":"JavaScript (fetch)","source":"const response = await fetch(\"https://caesura.today/api/v1/trips/YOUR_TRIP_ID/conflicts/YOUR_CONFLICT_ID\", {\n  method: \"DELETE\",\n  headers: {\n    Authorization: \"Bearer tc_YOUR_TOKEN\",\n  },\n});\nconst data = await response.json();"},{"lang":"Python","label":"Python (requests)","source":"import requests\n\nresponse = requests.request(\n    \"DELETE\",\n    \"https://caesura.today/api/v1/trips/YOUR_TRIP_ID/conflicts/YOUR_CONFLICT_ID\",\n    headers={\"Authorization\": \"Bearer tc_YOUR_TOKEN\"},\n)\ndata = response.json()"}],"description":"Requires the `trips:write` scope. Requires at least the `editor` role on the trip.","security":[{"bearerAuth":["trips:write"]}],"parameters":[{"name":"tripId","in":"path","required":true,"schema":{"type":"string"}},{"name":"conflictId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"tripId":{"type":"string","format":"uuid"},"name":{"type":"string"},"status":{"type":"string","enum":["active","deleted"]},"startDate":{"type":"string","nullable":true},"currency":{"type":"string"},"budget":{"type":"object","properties":{"amountMinor":{"type":"integer","minimum":0},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"],"additionalProperties":false,"nullable":true},"members":{"minItems":1,"type":"array","items":{"type":"object","properties":{"userId":{"type":"string","minLength":1},"role":{"type":"string","enum":["viewer","suggester","editor","owner"]},"travelling":{"type":"boolean"}},"required":["userId","role"],"additionalProperties":false}},"forkedFrom":{"type":"object","properties":{"tripId":{"type":"string","format":"uuid"},"atSeq":{"type":"integer","minimum":1},"name":{"type":"string","minLength":1,"maxLength":200}},"required":["tripId","atSeq","name"],"additionalProperties":false,"nullable":true,"default":null},"pace":{"type":"string","enum":["slow","balanced","packed"],"nullable":true,"default":null},"tags":{"type":"array","items":{"type":"string","enum":["meal","outdoors","drinks","nightlife","museum","sight","beach","shopping","show","tour","wellness","sports"]},"default":[]},"days":{"type":"array","items":{"type":"object","properties":{"dayId":{"type":"string","format":"uuid"},"activityIds":{"type":"array","items":{"type":"string","format":"uuid"}},"date":{"type":"string","nullable":true},"costSubtotal":{"type":"integer"}},"required":["dayId","activityIds","date","costSubtotal"],"additionalProperties":false}},"backlog":{"type":"array","items":{"type":"string","format":"uuid"}},"parkedFrom":{"type":"object","additionalProperties":{"type":"string","format":"uuid"}},"activities":{"type":"object","additionalProperties":{"type":"object","properties":{"activityId":{"type":"string","format":"uuid"},"title":{"type":"string"},"timeWindow":{"type":"object","properties":{"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["start","end"],"additionalProperties":false,"nullable":true},"location":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"lat":{"type":"number","minimum":-90,"maximum":90,"description":"Send with lng, or omit both. When omitted on a v1 write, the server geocodes `address`, then `name`."},"lng":{"type":"number","minimum":-180,"maximum":180,"description":"Send with lat, or omit both."},"countryCode":{"type":"string","pattern":"^[A-Z]{2}$"},"city":{"type":"string","minLength":1,"maxLength":200},"area":{"type":"string","minLength":1,"maxLength":200},"precision":{"type":"string","enum":["venue","area","city"],"description":"What the coordinates describe: a `venue`, an `area` or a `city`. Requires `lat` and `lng` — sent without them it is refused (\"precision requires coordinates\")."},"verified":{"type":"boolean","enum":[false],"description":"`false` when no geocoder confirmed the coordinates (an assistant's guess). Absent = unknown. Requires `lat` and `lng`."},"address":{"type":"object","properties":{"countryCode":{"type":"string","pattern":"^[A-Z]{2}$","description":"ISO 3166-1 alpha-2, uppercase. Decides how the other fields are read."},"lines":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"description":"Street-level part, in the country's own order, e.g. [\"Hauptstraße 5\"] or [\"1-2-3 Nishi-Azabu\"]."},"dependentLocality":{"type":"string","minLength":1,"maxLength":200,"description":"District, neighbourhood or suburb when it is part of the postal address."},"locality":{"type":"string","minLength":1,"maxLength":200,"description":"City, town or post town."},"administrativeArea":{"type":"string","minLength":1,"maxLength":200,"description":"State, province, prefecture or region."},"postalCode":{"type":"string","minLength":1,"maxLength":20,"description":"A string: keeps leading zeros and letters."}},"required":["countryCode","lines"],"additionalProperties":false}},"required":["name"],"additionalProperties":false,"nullable":true},"notes":{"type":"string","nullable":true},"anchors":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["dayOfWeek"]},"days":{"minItems":1,"type":"array","items":{"type":"string","enum":["mon","tue","wed","thu","fri","sat","sun"]}}},"required":["kind","days"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["dateRange"]},"from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["kind","from","to"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["timeOfDay"]},"window":{"type":"object","properties":{"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["start","end"],"additionalProperties":false}},"required":["kind","window"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["publicHoliday"]},"country":{"type":"string","pattern":"^[A-Z]{2}$"}},"required":["kind","country"],"additionalProperties":false}]}},"kind":{"type":"string","enum":["planned","pending","transit"],"default":"planned"},"tags":{"type":"array","items":{"type":"string","enum":["meal","lodging","ticketed","outdoors","drinks","nightlife","museum","sight","beach","shopping","show","tour","wellness","sports"]},"default":[]},"cost":{"type":"object","properties":{"amountMinor":{"type":"integer","minimum":0},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"],"additionalProperties":false,"nullable":true,"description":"Price for one person, in the trip's currency. A stop's total is this times its headcount: the people in `participants`, or every traveller on the trip when `participants` is empty. A `pending` stop's cost is an estimate; a `planned` or `transit` stop's is committed."},"bookedBy":{"type":"string","nullable":true,"default":null},"participants":{"type":"array","items":{"type":"string"},"default":[]},"addedBy":{"type":"string","nullable":true,"default":null},"mode":{"type":"string","enum":["walk","bus","train","flight","ferry","car","bike"],"nullable":true,"default":null},"endLocation":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"lat":{"type":"number","minimum":-90,"maximum":90,"description":"Send with lng, or omit both. When omitted on a v1 write, the server geocodes `address`, then `name`."},"lng":{"type":"number","minimum":-180,"maximum":180,"description":"Send with lat, or omit both."},"countryCode":{"type":"string","pattern":"^[A-Z]{2}$"},"city":{"type":"string","minLength":1,"maxLength":200},"area":{"type":"string","minLength":1,"maxLength":200},"precision":{"type":"string","enum":["venue","area","city"],"description":"What the coordinates describe: a `venue`, an `area` or a `city`. Requires `lat` and `lng` — sent without them it is refused (\"precision requires coordinates\")."},"verified":{"type":"boolean","enum":[false],"description":"`false` when no geocoder confirmed the coordinates (an assistant's guess). Absent = unknown. Requires `lat` and `lng`."},"address":{"type":"object","properties":{"countryCode":{"type":"string","pattern":"^[A-Z]{2}$","description":"ISO 3166-1 alpha-2, uppercase. Decides how the other fields are read."},"lines":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"description":"Street-level part, in the country's own order, e.g. [\"Hauptstraße 5\"] or [\"1-2-3 Nishi-Azabu\"]."},"dependentLocality":{"type":"string","minLength":1,"maxLength":200,"description":"District, neighbourhood or suburb when it is part of the postal address."},"locality":{"type":"string","minLength":1,"maxLength":200,"description":"City, town or post town."},"administrativeArea":{"type":"string","minLength":1,"maxLength":200,"description":"State, province, prefecture or region."},"postalCode":{"type":"string","minLength":1,"maxLength":20,"description":"A string: keeps leading zeros and letters."}},"required":["countryCode","lines"],"additionalProperties":false}},"required":["name"],"additionalProperties":false,"nullable":true,"default":null},"pendingReason":{"type":"string","enum":["book","maybe"],"nullable":true,"default":null},"flightNumber":{"type":"string","nullable":true,"default":null},"booking":{"type":"object","properties":{"confirmation":{"type":"string"},"provider":{"type":"string","nullable":true},"url":{"type":"string"}},"additionalProperties":false,"nullable":true,"default":null}},"required":["activityId","title","timeWindow","location","notes","anchors","cost"],"additionalProperties":false}},"conflicts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"severity":{"type":"string","enum":["info","warn","error"]},"subjects":{"type":"array","items":{"type":"string"}},"resolutions":{"type":"array","items":{"type":"string"}},"description":{"type":"string"}},"required":["id","kind","severity","subjects","description","resolutions"],"additionalProperties":false}},"dismissedConflictIds":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string"},"unscheduledCostSubtotal":{"type":"integer"},"tripCostTotal":{"type":"integer"},"budgetRemaining":{"type":"integer","nullable":true}},"required":["tripId","name","status","startDate","currency","budget","members","days","backlog","activities","conflicts","dismissedConflictIds","createdAt","unscheduledCostSubtotal","tripCostTotal","budgetRemaining"],"additionalProperties":false}}}},"4XX":{"description":"One envelope for every failure: `{ error: { code, message, details? } }`. 401 carries `WWW-Authenticate: Bearer`; 429 carries `Retry-After`."}}}},"/v1/trips/{tripId}/cover":{"get":{"summary":"Get a trip's cover image, or null when it has none","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://caesura.today/api/v1/trips/YOUR_TRIP_ID/cover' \\\n  -H 'Authorization: Bearer tc_YOUR_TOKEN'"},{"lang":"JavaScript","label":"JavaScript (fetch)","source":"const response = await fetch(\"https://caesura.today/api/v1/trips/YOUR_TRIP_ID/cover\", {\n  method: \"GET\",\n  headers: {\n    Authorization: \"Bearer tc_YOUR_TOKEN\",\n  },\n});\nconst data = await response.json();"},{"lang":"Python","label":"Python (requests)","source":"import requests\n\nresponse = requests.request(\n    \"GET\",\n    \"https://caesura.today/api/v1/trips/YOUR_TRIP_ID/cover\",\n    headers={\"Authorization\": \"Bearer tc_YOUR_TOKEN\"},\n)\ndata = response.json()"}],"description":"Requires the `trips:read` scope. Requires at least the `viewer` role on the trip.","security":[{"bearerAuth":["trips:read"]}],"parameters":[{"name":"tripId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"cover":{"anyOf":[{"type":"object","properties":{"source":{"type":"string","enum":["unsplash"]},"unsplashId":{"type":"string","minLength":1},"urls":{"type":"object","properties":{"raw":{"type":"string","minLength":1,"maxLength":2048},"regular":{"type":"string","minLength":1,"maxLength":2048},"small":{"type":"string","minLength":1,"maxLength":2048}},"required":["raw","regular","small"],"additionalProperties":false},"alt":{"type":"string","nullable":true,"default":null},"photographerName":{"type":"string","minLength":1},"photographerUrl":{"type":"string","minLength":1,"maxLength":2048},"photoPageUrl":{"type":"string","minLength":1,"maxLength":2048},"position":{"type":"integer","minimum":0,"maximum":100,"default":50}},"required":["source","unsplashId","urls","photographerName","photographerUrl","photoPageUrl"],"additionalProperties":false},{"type":"object","properties":{"source":{"type":"string","enum":["url"]},"url":{"type":"string","minLength":1,"maxLength":2048},"alt":{"type":"string","maxLength":1000,"nullable":true,"default":null},"credit":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"url":{"type":"string","minLength":1,"maxLength":2048,"nullable":true,"default":null}},"required":["name"],"additionalProperties":false,"nullable":true,"default":null},"position":{"type":"integer","minimum":0,"maximum":100,"default":50},"proxySrc":{"type":"string","minLength":1,"maxLength":2048}},"required":["source","url"],"additionalProperties":false}],"nullable":true}},"required":["cover"],"additionalProperties":false}}}},"4XX":{"description":"One envelope for every failure: `{ error: { code, message, details? } }`. 401 carries `WWW-Authenticate: Bearer`; 429 carries `Retry-After`."}}},"put":{"summary":"Set a trip's cover to the image at a URL","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X PUT 'https://caesura.today/api/v1/trips/YOUR_TRIP_ID/cover' \\\n  -H 'Authorization: Bearer tc_YOUR_TOKEN' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n  \"url\": \"string\"\n}'"},{"lang":"JavaScript","label":"JavaScript (fetch)","source":"const response = await fetch(\"https://caesura.today/api/v1/trips/YOUR_TRIP_ID/cover\", {\n  method: \"PUT\",\n  headers: {\n    Authorization: \"Bearer tc_YOUR_TOKEN\",\n    \"Content-Type\": \"application/json\",\n  },\n  body: JSON.stringify({\n    \"url\": \"string\"\n  }),\n});\nconst data = await response.json();"},{"lang":"Python","label":"Python (requests)","source":"import requests\n\nresponse = requests.request(\n    \"PUT\",\n    \"https://caesura.today/api/v1/trips/YOUR_TRIP_ID/cover\",\n    headers={\"Authorization\": \"Bearer tc_YOUR_TOKEN\"},\n    json={\"url\": \"string\"},\n)\ndata = response.json()"}],"description":"Requires the `trips:write` scope. Requires at least the `editor` role on the trip.","security":[{"bearerAuth":["trips:write"]}],"parameters":[{"name":"tripId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","minLength":1,"maxLength":2048},"alt":{"type":"string","maxLength":1000,"nullable":true,"default":null},"credit":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"url":{"type":"string","minLength":1,"maxLength":2048,"nullable":true,"default":null}},"required":["name"],"additionalProperties":false,"nullable":true,"default":null},"position":{"type":"integer","minimum":0,"maximum":100,"default":50}},"required":["url"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"cover":{"anyOf":[{"type":"object","properties":{"source":{"type":"string","enum":["unsplash"]},"unsplashId":{"type":"string","minLength":1},"urls":{"type":"object","properties":{"raw":{"type":"string","minLength":1,"maxLength":2048},"regular":{"type":"string","minLength":1,"maxLength":2048},"small":{"type":"string","minLength":1,"maxLength":2048}},"required":["raw","regular","small"],"additionalProperties":false},"alt":{"type":"string","nullable":true,"default":null},"photographerName":{"type":"string","minLength":1},"photographerUrl":{"type":"string","minLength":1,"maxLength":2048},"photoPageUrl":{"type":"string","minLength":1,"maxLength":2048},"position":{"type":"integer","minimum":0,"maximum":100,"default":50}},"required":["source","unsplashId","urls","photographerName","photographerUrl","photoPageUrl"],"additionalProperties":false},{"type":"object","properties":{"source":{"type":"string","enum":["url"]},"url":{"type":"string","minLength":1,"maxLength":2048},"alt":{"type":"string","maxLength":1000,"nullable":true,"default":null},"credit":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"url":{"type":"string","minLength":1,"maxLength":2048,"nullable":true,"default":null}},"required":["name"],"additionalProperties":false,"nullable":true,"default":null},"position":{"type":"integer","minimum":0,"maximum":100,"default":50},"proxySrc":{"type":"string","minLength":1,"maxLength":2048}},"required":["source","url"],"additionalProperties":false}],"nullable":true}},"required":["cover"],"additionalProperties":false}}}},"4XX":{"description":"One envelope for every failure: `{ error: { code, message, details? } }`. 401 carries `WWW-Authenticate: Bearer`; 429 carries `Retry-After`."}}},"patch":{"summary":"Move where a trip's cover is framed, from 0 (top) to 100 (bottom)","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X PATCH 'https://caesura.today/api/v1/trips/YOUR_TRIP_ID/cover' \\\n  -H 'Authorization: Bearer tc_YOUR_TOKEN' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n  \"position\": 0\n}'"},{"lang":"JavaScript","label":"JavaScript (fetch)","source":"const response = await fetch(\"https://caesura.today/api/v1/trips/YOUR_TRIP_ID/cover\", {\n  method: \"PATCH\",\n  headers: {\n    Authorization: \"Bearer tc_YOUR_TOKEN\",\n    \"Content-Type\": \"application/json\",\n  },\n  body: JSON.stringify({\n    \"position\": 0\n  }),\n});\nconst data = await response.json();"},{"lang":"Python","label":"Python (requests)","source":"import requests\n\nresponse = requests.request(\n    \"PATCH\",\n    \"https://caesura.today/api/v1/trips/YOUR_TRIP_ID/cover\",\n    headers={\"Authorization\": \"Bearer tc_YOUR_TOKEN\"},\n    json={\"position\": 0},\n)\ndata = response.json()"}],"description":"Requires the `trips:write` scope. Requires at least the `editor` role on the trip.","security":[{"bearerAuth":["trips:write"]}],"parameters":[{"name":"tripId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"position":{"type":"integer","minimum":0,"maximum":100}},"required":["position"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"cover":{"anyOf":[{"type":"object","properties":{"source":{"type":"string","enum":["unsplash"]},"unsplashId":{"type":"string","minLength":1},"urls":{"type":"object","properties":{"raw":{"type":"string","minLength":1,"maxLength":2048},"regular":{"type":"string","minLength":1,"maxLength":2048},"small":{"type":"string","minLength":1,"maxLength":2048}},"required":["raw","regular","small"],"additionalProperties":false},"alt":{"type":"string","nullable":true,"default":null},"photographerName":{"type":"string","minLength":1},"photographerUrl":{"type":"string","minLength":1,"maxLength":2048},"photoPageUrl":{"type":"string","minLength":1,"maxLength":2048},"position":{"type":"integer","minimum":0,"maximum":100,"default":50}},"required":["source","unsplashId","urls","photographerName","photographerUrl","photoPageUrl"],"additionalProperties":false},{"type":"object","properties":{"source":{"type":"string","enum":["url"]},"url":{"type":"string","minLength":1,"maxLength":2048},"alt":{"type":"string","maxLength":1000,"nullable":true,"default":null},"credit":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"url":{"type":"string","minLength":1,"maxLength":2048,"nullable":true,"default":null}},"required":["name"],"additionalProperties":false,"nullable":true,"default":null},"position":{"type":"integer","minimum":0,"maximum":100,"default":50},"proxySrc":{"type":"string","minLength":1,"maxLength":2048}},"required":["source","url"],"additionalProperties":false}],"nullable":true}},"required":["cover"],"additionalProperties":false}}}},"4XX":{"description":"One envelope for every failure: `{ error: { code, message, details? } }`. 401 carries `WWW-Authenticate: Bearer`; 429 carries `Retry-After`."}}},"delete":{"summary":"Remove a trip's cover","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X DELETE 'https://caesura.today/api/v1/trips/YOUR_TRIP_ID/cover' \\\n  -H 'Authorization: Bearer tc_YOUR_TOKEN'"},{"lang":"JavaScript","label":"JavaScript (fetch)","source":"const response = await fetch(\"https://caesura.today/api/v1/trips/YOUR_TRIP_ID/cover\", {\n  method: \"DELETE\",\n  headers: {\n    Authorization: \"Bearer tc_YOUR_TOKEN\",\n  },\n});\nconst data = await response.json();"},{"lang":"Python","label":"Python (requests)","source":"import requests\n\nresponse = requests.request(\n    \"DELETE\",\n    \"https://caesura.today/api/v1/trips/YOUR_TRIP_ID/cover\",\n    headers={\"Authorization\": \"Bearer tc_YOUR_TOKEN\"},\n)\ndata = response.json()"}],"description":"Requires the `trips:write` scope. Requires at least the `editor` role on the trip.","security":[{"bearerAuth":["trips:write"]}],"parameters":[{"name":"tripId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"cover":{"anyOf":[{"type":"object","properties":{"source":{"type":"string","enum":["unsplash"]},"unsplashId":{"type":"string","minLength":1},"urls":{"type":"object","properties":{"raw":{"type":"string","minLength":1,"maxLength":2048},"regular":{"type":"string","minLength":1,"maxLength":2048},"small":{"type":"string","minLength":1,"maxLength":2048}},"required":["raw","regular","small"],"additionalProperties":false},"alt":{"type":"string","nullable":true,"default":null},"photographerName":{"type":"string","minLength":1},"photographerUrl":{"type":"string","minLength":1,"maxLength":2048},"photoPageUrl":{"type":"string","minLength":1,"maxLength":2048},"position":{"type":"integer","minimum":0,"maximum":100,"default":50}},"required":["source","unsplashId","urls","photographerName","photographerUrl","photoPageUrl"],"additionalProperties":false},{"type":"object","properties":{"source":{"type":"string","enum":["url"]},"url":{"type":"string","minLength":1,"maxLength":2048},"alt":{"type":"string","maxLength":1000,"nullable":true,"default":null},"credit":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"url":{"type":"string","minLength":1,"maxLength":2048,"nullable":true,"default":null}},"required":["name"],"additionalProperties":false,"nullable":true,"default":null},"position":{"type":"integer","minimum":0,"maximum":100,"default":50},"proxySrc":{"type":"string","minLength":1,"maxLength":2048}},"required":["source","url"],"additionalProperties":false}],"nullable":true}},"required":["cover"],"additionalProperties":false}}}},"4XX":{"description":"One envelope for every failure: `{ error: { code, message, details? } }`. 401 carries `WWW-Authenticate: Bearer`; 429 carries `Retry-After`."}}}},"/v1/trips/{tripId}/days/{dayId}":{"delete":{"summary":"Remove a day from a trip; its stops move to the unscheduled backlog","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X DELETE 'https://caesura.today/api/v1/trips/YOUR_TRIP_ID/days/YOUR_DAY_ID' \\\n  -H 'Authorization: Bearer tc_YOUR_TOKEN'"},{"lang":"JavaScript","label":"JavaScript (fetch)","source":"const response = await fetch(\"https://caesura.today/api/v1/trips/YOUR_TRIP_ID/days/YOUR_DAY_ID\", {\n  method: \"DELETE\",\n  headers: {\n    Authorization: \"Bearer tc_YOUR_TOKEN\",\n  },\n});\nconst data = await response.json();"},{"lang":"Python","label":"Python (requests)","source":"import requests\n\nresponse = requests.request(\n    \"DELETE\",\n    \"https://caesura.today/api/v1/trips/YOUR_TRIP_ID/days/YOUR_DAY_ID\",\n    headers={\"Authorization\": \"Bearer tc_YOUR_TOKEN\"},\n)\ndata = response.json()"}],"description":"Requires the `trips:write` scope, or `current:write`. Requires at least the `editor` role on the trip.","security":[{"bearerAuth":["trips:write"]},{"bearerAuth":["current:write"]}],"parameters":[{"name":"tripId","in":"path","required":true,"schema":{"type":"string"}},{"name":"dayId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"tripId":{"type":"string","format":"uuid"},"name":{"type":"string"},"status":{"type":"string","enum":["active","deleted"]},"startDate":{"type":"string","nullable":true},"currency":{"type":"string"},"budget":{"type":"object","properties":{"amountMinor":{"type":"integer","minimum":0},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"],"additionalProperties":false,"nullable":true},"members":{"minItems":1,"type":"array","items":{"type":"object","properties":{"userId":{"type":"string","minLength":1},"role":{"type":"string","enum":["viewer","suggester","editor","owner"]},"travelling":{"type":"boolean"}},"required":["userId","role"],"additionalProperties":false}},"forkedFrom":{"type":"object","properties":{"tripId":{"type":"string","format":"uuid"},"atSeq":{"type":"integer","minimum":1},"name":{"type":"string","minLength":1,"maxLength":200}},"required":["tripId","atSeq","name"],"additionalProperties":false,"nullable":true,"default":null},"pace":{"type":"string","enum":["slow","balanced","packed"],"nullable":true,"default":null},"tags":{"type":"array","items":{"type":"string","enum":["meal","outdoors","drinks","nightlife","museum","sight","beach","shopping","show","tour","wellness","sports"]},"default":[]},"days":{"type":"array","items":{"type":"object","properties":{"dayId":{"type":"string","format":"uuid"},"activityIds":{"type":"array","items":{"type":"string","format":"uuid"}},"date":{"type":"string","nullable":true},"costSubtotal":{"type":"integer"}},"required":["dayId","activityIds","date","costSubtotal"],"additionalProperties":false}},"backlog":{"type":"array","items":{"type":"string","format":"uuid"}},"parkedFrom":{"type":"object","additionalProperties":{"type":"string","format":"uuid"}},"activities":{"type":"object","additionalProperties":{"type":"object","properties":{"activityId":{"type":"string","format":"uuid"},"title":{"type":"string"},"timeWindow":{"type":"object","properties":{"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["start","end"],"additionalProperties":false,"nullable":true},"location":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"lat":{"type":"number","minimum":-90,"maximum":90,"description":"Send with lng, or omit both. When omitted on a v1 write, the server geocodes `address`, then `name`."},"lng":{"type":"number","minimum":-180,"maximum":180,"description":"Send with lat, or omit both."},"countryCode":{"type":"string","pattern":"^[A-Z]{2}$"},"city":{"type":"string","minLength":1,"maxLength":200},"area":{"type":"string","minLength":1,"maxLength":200},"precision":{"type":"string","enum":["venue","area","city"],"description":"What the coordinates describe: a `venue`, an `area` or a `city`. Requires `lat` and `lng` — sent without them it is refused (\"precision requires coordinates\")."},"verified":{"type":"boolean","enum":[false],"description":"`false` when no geocoder confirmed the coordinates (an assistant's guess). Absent = unknown. Requires `lat` and `lng`."},"address":{"type":"object","properties":{"countryCode":{"type":"string","pattern":"^[A-Z]{2}$","description":"ISO 3166-1 alpha-2, uppercase. Decides how the other fields are read."},"lines":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"description":"Street-level part, in the country's own order, e.g. [\"Hauptstraße 5\"] or [\"1-2-3 Nishi-Azabu\"]."},"dependentLocality":{"type":"string","minLength":1,"maxLength":200,"description":"District, neighbourhood or suburb when it is part of the postal address."},"locality":{"type":"string","minLength":1,"maxLength":200,"description":"City, town or post town."},"administrativeArea":{"type":"string","minLength":1,"maxLength":200,"description":"State, province, prefecture or region."},"postalCode":{"type":"string","minLength":1,"maxLength":20,"description":"A string: keeps leading zeros and letters."}},"required":["countryCode","lines"],"additionalProperties":false}},"required":["name"],"additionalProperties":false,"nullable":true},"notes":{"type":"string","nullable":true},"anchors":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["dayOfWeek"]},"days":{"minItems":1,"type":"array","items":{"type":"string","enum":["mon","tue","wed","thu","fri","sat","sun"]}}},"required":["kind","days"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["dateRange"]},"from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["kind","from","to"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["timeOfDay"]},"window":{"type":"object","properties":{"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["start","end"],"additionalProperties":false}},"required":["kind","window"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["publicHoliday"]},"country":{"type":"string","pattern":"^[A-Z]{2}$"}},"required":["kind","country"],"additionalProperties":false}]}},"kind":{"type":"string","enum":["planned","pending","transit"],"default":"planned"},"tags":{"type":"array","items":{"type":"string","enum":["meal","lodging","ticketed","outdoors","drinks","nightlife","museum","sight","beach","shopping","show","tour","wellness","sports"]},"default":[]},"cost":{"type":"object","properties":{"amountMinor":{"type":"integer","minimum":0},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"],"additionalProperties":false,"nullable":true,"description":"Price for one person, in the trip's currency. A stop's total is this times its headcount: the people in `participants`, or every traveller on the trip when `participants` is empty. A `pending` stop's cost is an estimate; a `planned` or `transit` stop's is committed."},"bookedBy":{"type":"string","nullable":true,"default":null},"participants":{"type":"array","items":{"type":"string"},"default":[]},"addedBy":{"type":"string","nullable":true,"default":null},"mode":{"type":"string","enum":["walk","bus","train","flight","ferry","car","bike"],"nullable":true,"default":null},"endLocation":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"lat":{"type":"number","minimum":-90,"maximum":90,"description":"Send with lng, or omit both. When omitted on a v1 write, the server geocodes `address`, then `name`."},"lng":{"type":"number","minimum":-180,"maximum":180,"description":"Send with lat, or omit both."},"countryCode":{"type":"string","pattern":"^[A-Z]{2}$"},"city":{"type":"string","minLength":1,"maxLength":200},"area":{"type":"string","minLength":1,"maxLength":200},"precision":{"type":"string","enum":["venue","area","city"],"description":"What the coordinates describe: a `venue`, an `area` or a `city`. Requires `lat` and `lng` — sent without them it is refused (\"precision requires coordinates\")."},"verified":{"type":"boolean","enum":[false],"description":"`false` when no geocoder confirmed the coordinates (an assistant's guess). Absent = unknown. Requires `lat` and `lng`."},"address":{"type":"object","properties":{"countryCode":{"type":"string","pattern":"^[A-Z]{2}$","description":"ISO 3166-1 alpha-2, uppercase. Decides how the other fields are read."},"lines":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"description":"Street-level part, in the country's own order, e.g. [\"Hauptstraße 5\"] or [\"1-2-3 Nishi-Azabu\"]."},"dependentLocality":{"type":"string","minLength":1,"maxLength":200,"description":"District, neighbourhood or suburb when it is part of the postal address."},"locality":{"type":"string","minLength":1,"maxLength":200,"description":"City, town or post town."},"administrativeArea":{"type":"string","minLength":1,"maxLength":200,"description":"State, province, prefecture or region."},"postalCode":{"type":"string","minLength":1,"maxLength":20,"description":"A string: keeps leading zeros and letters."}},"required":["countryCode","lines"],"additionalProperties":false}},"required":["name"],"additionalProperties":false,"nullable":true,"default":null},"pendingReason":{"type":"string","enum":["book","maybe"],"nullable":true,"default":null},"flightNumber":{"type":"string","nullable":true,"default":null},"booking":{"type":"object","properties":{"confirmation":{"type":"string"},"provider":{"type":"string","nullable":true},"url":{"type":"string"}},"additionalProperties":false,"nullable":true,"default":null}},"required":["activityId","title","timeWindow","location","notes","anchors","cost"],"additionalProperties":false}},"conflicts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"severity":{"type":"string","enum":["info","warn","error"]},"subjects":{"type":"array","items":{"type":"string"}},"resolutions":{"type":"array","items":{"type":"string"}},"description":{"type":"string"}},"required":["id","kind","severity","subjects","description","resolutions"],"additionalProperties":false}},"dismissedConflictIds":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string"},"unscheduledCostSubtotal":{"type":"integer"},"tripCostTotal":{"type":"integer"},"budgetRemaining":{"type":"integer","nullable":true}},"required":["tripId","name","status","startDate","currency","budget","members","days","backlog","activities","conflicts","dismissedConflictIds","createdAt","unscheduledCostSubtotal","tripCostTotal","budgetRemaining"],"additionalProperties":false}}}},"4XX":{"description":"One envelope for every failure: `{ error: { code, message, details? } }`. 401 carries `WWW-Authenticate: Bearer`; 429 carries `Retry-After`."}}}},"/v1/trips/{tripId}/days":{"post":{"summary":"Add an empty day to the end of a trip","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://caesura.today/api/v1/trips/YOUR_TRIP_ID/days' \\\n  -H 'Authorization: Bearer tc_YOUR_TOKEN'"},{"lang":"JavaScript","label":"JavaScript (fetch)","source":"const response = await fetch(\"https://caesura.today/api/v1/trips/YOUR_TRIP_ID/days\", {\n  method: \"POST\",\n  headers: {\n    Authorization: \"Bearer tc_YOUR_TOKEN\",\n  },\n});\nconst data = await response.json();"},{"lang":"Python","label":"Python (requests)","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://caesura.today/api/v1/trips/YOUR_TRIP_ID/days\",\n    headers={\"Authorization\": \"Bearer tc_YOUR_TOKEN\"},\n)\ndata = response.json()"}],"description":"Requires the `trips:write` scope, or `current:write`. Requires at least the `editor` role on the trip.","security":[{"bearerAuth":["trips:write"]},{"bearerAuth":["current:write"]}],"parameters":[{"name":"tripId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"tripId":{"type":"string","format":"uuid"},"name":{"type":"string"},"status":{"type":"string","enum":["active","deleted"]},"startDate":{"type":"string","nullable":true},"currency":{"type":"string"},"budget":{"type":"object","properties":{"amountMinor":{"type":"integer","minimum":0},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"],"additionalProperties":false,"nullable":true},"members":{"minItems":1,"type":"array","items":{"type":"object","properties":{"userId":{"type":"string","minLength":1},"role":{"type":"string","enum":["viewer","suggester","editor","owner"]},"travelling":{"type":"boolean"}},"required":["userId","role"],"additionalProperties":false}},"forkedFrom":{"type":"object","properties":{"tripId":{"type":"string","format":"uuid"},"atSeq":{"type":"integer","minimum":1},"name":{"type":"string","minLength":1,"maxLength":200}},"required":["tripId","atSeq","name"],"additionalProperties":false,"nullable":true,"default":null},"pace":{"type":"string","enum":["slow","balanced","packed"],"nullable":true,"default":null},"tags":{"type":"array","items":{"type":"string","enum":["meal","outdoors","drinks","nightlife","museum","sight","beach","shopping","show","tour","wellness","sports"]},"default":[]},"days":{"type":"array","items":{"type":"object","properties":{"dayId":{"type":"string","format":"uuid"},"activityIds":{"type":"array","items":{"type":"string","format":"uuid"}},"date":{"type":"string","nullable":true},"costSubtotal":{"type":"integer"}},"required":["dayId","activityIds","date","costSubtotal"],"additionalProperties":false}},"backlog":{"type":"array","items":{"type":"string","format":"uuid"}},"parkedFrom":{"type":"object","additionalProperties":{"type":"string","format":"uuid"}},"activities":{"type":"object","additionalProperties":{"type":"object","properties":{"activityId":{"type":"string","format":"uuid"},"title":{"type":"string"},"timeWindow":{"type":"object","properties":{"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["start","end"],"additionalProperties":false,"nullable":true},"location":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"lat":{"type":"number","minimum":-90,"maximum":90,"description":"Send with lng, or omit both. When omitted on a v1 write, the server geocodes `address`, then `name`."},"lng":{"type":"number","minimum":-180,"maximum":180,"description":"Send with lat, or omit both."},"countryCode":{"type":"string","pattern":"^[A-Z]{2}$"},"city":{"type":"string","minLength":1,"maxLength":200},"area":{"type":"string","minLength":1,"maxLength":200},"precision":{"type":"string","enum":["venue","area","city"],"description":"What the coordinates describe: a `venue`, an `area` or a `city`. Requires `lat` and `lng` — sent without them it is refused (\"precision requires coordinates\")."},"verified":{"type":"boolean","enum":[false],"description":"`false` when no geocoder confirmed the coordinates (an assistant's guess). Absent = unknown. Requires `lat` and `lng`."},"address":{"type":"object","properties":{"countryCode":{"type":"string","pattern":"^[A-Z]{2}$","description":"ISO 3166-1 alpha-2, uppercase. Decides how the other fields are read."},"lines":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"description":"Street-level part, in the country's own order, e.g. [\"Hauptstraße 5\"] or [\"1-2-3 Nishi-Azabu\"]."},"dependentLocality":{"type":"string","minLength":1,"maxLength":200,"description":"District, neighbourhood or suburb when it is part of the postal address."},"locality":{"type":"string","minLength":1,"maxLength":200,"description":"City, town or post town."},"administrativeArea":{"type":"string","minLength":1,"maxLength":200,"description":"State, province, prefecture or region."},"postalCode":{"type":"string","minLength":1,"maxLength":20,"description":"A string: keeps leading zeros and letters."}},"required":["countryCode","lines"],"additionalProperties":false}},"required":["name"],"additionalProperties":false,"nullable":true},"notes":{"type":"string","nullable":true},"anchors":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["dayOfWeek"]},"days":{"minItems":1,"type":"array","items":{"type":"string","enum":["mon","tue","wed","thu","fri","sat","sun"]}}},"required":["kind","days"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["dateRange"]},"from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["kind","from","to"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["timeOfDay"]},"window":{"type":"object","properties":{"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["start","end"],"additionalProperties":false}},"required":["kind","window"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["publicHoliday"]},"country":{"type":"string","pattern":"^[A-Z]{2}$"}},"required":["kind","country"],"additionalProperties":false}]}},"kind":{"type":"string","enum":["planned","pending","transit"],"default":"planned"},"tags":{"type":"array","items":{"type":"string","enum":["meal","lodging","ticketed","outdoors","drinks","nightlife","museum","sight","beach","shopping","show","tour","wellness","sports"]},"default":[]},"cost":{"type":"object","properties":{"amountMinor":{"type":"integer","minimum":0},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"],"additionalProperties":false,"nullable":true,"description":"Price for one person, in the trip's currency. A stop's total is this times its headcount: the people in `participants`, or every traveller on the trip when `participants` is empty. A `pending` stop's cost is an estimate; a `planned` or `transit` stop's is committed."},"bookedBy":{"type":"string","nullable":true,"default":null},"participants":{"type":"array","items":{"type":"string"},"default":[]},"addedBy":{"type":"string","nullable":true,"default":null},"mode":{"type":"string","enum":["walk","bus","train","flight","ferry","car","bike"],"nullable":true,"default":null},"endLocation":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"lat":{"type":"number","minimum":-90,"maximum":90,"description":"Send with lng, or omit both. When omitted on a v1 write, the server geocodes `address`, then `name`."},"lng":{"type":"number","minimum":-180,"maximum":180,"description":"Send with lat, or omit both."},"countryCode":{"type":"string","pattern":"^[A-Z]{2}$"},"city":{"type":"string","minLength":1,"maxLength":200},"area":{"type":"string","minLength":1,"maxLength":200},"precision":{"type":"string","enum":["venue","area","city"],"description":"What the coordinates describe: a `venue`, an `area` or a `city`. Requires `lat` and `lng` — sent without them it is refused (\"precision requires coordinates\")."},"verified":{"type":"boolean","enum":[false],"description":"`false` when no geocoder confirmed the coordinates (an assistant's guess). Absent = unknown. Requires `lat` and `lng`."},"address":{"type":"object","properties":{"countryCode":{"type":"string","pattern":"^[A-Z]{2}$","description":"ISO 3166-1 alpha-2, uppercase. Decides how the other fields are read."},"lines":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"description":"Street-level part, in the country's own order, e.g. [\"Hauptstraße 5\"] or [\"1-2-3 Nishi-Azabu\"]."},"dependentLocality":{"type":"string","minLength":1,"maxLength":200,"description":"District, neighbourhood or suburb when it is part of the postal address."},"locality":{"type":"string","minLength":1,"maxLength":200,"description":"City, town or post town."},"administrativeArea":{"type":"string","minLength":1,"maxLength":200,"description":"State, province, prefecture or region."},"postalCode":{"type":"string","minLength":1,"maxLength":20,"description":"A string: keeps leading zeros and letters."}},"required":["countryCode","lines"],"additionalProperties":false}},"required":["name"],"additionalProperties":false,"nullable":true,"default":null},"pendingReason":{"type":"string","enum":["book","maybe"],"nullable":true,"default":null},"flightNumber":{"type":"string","nullable":true,"default":null},"booking":{"type":"object","properties":{"confirmation":{"type":"string"},"provider":{"type":"string","nullable":true},"url":{"type":"string"}},"additionalProperties":false,"nullable":true,"default":null}},"required":["activityId","title","timeWindow","location","notes","anchors","cost"],"additionalProperties":false}},"conflicts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"severity":{"type":"string","enum":["info","warn","error"]},"subjects":{"type":"array","items":{"type":"string"}},"resolutions":{"type":"array","items":{"type":"string"}},"description":{"type":"string"}},"required":["id","kind","severity","subjects","description","resolutions"],"additionalProperties":false}},"dismissedConflictIds":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string"},"unscheduledCostSubtotal":{"type":"integer"},"tripCostTotal":{"type":"integer"},"budgetRemaining":{"type":"integer","nullable":true}},"required":["tripId","name","status","startDate","currency","budget","members","days","backlog","activities","conflicts","dismissedConflictIds","createdAt","unscheduledCostSubtotal","tripCostTotal","budgetRemaining"],"additionalProperties":false}}}},"4XX":{"description":"One envelope for every failure: `{ error: { code, message, details? } }`. 401 carries `WWW-Authenticate: Bearer`; 429 carries `Retry-After`."}}}},"/v1/trips/{tripId}/export":{"get":{"summary":"Download a trip's days and stops as a content-bundle file you can re-import","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://caesura.today/api/v1/trips/YOUR_TRIP_ID/export' \\\n  -H 'Authorization: Bearer tc_YOUR_TOKEN'"},{"lang":"JavaScript","label":"JavaScript (fetch)","source":"const response = await fetch(\"https://caesura.today/api/v1/trips/YOUR_TRIP_ID/export\", {\n  method: \"GET\",\n  headers: {\n    Authorization: \"Bearer tc_YOUR_TOKEN\",\n  },\n});\nconst data = await response.json();"},{"lang":"Python","label":"Python (requests)","source":"import requests\n\nresponse = requests.request(\n    \"GET\",\n    \"https://caesura.today/api/v1/trips/YOUR_TRIP_ID/export\",\n    headers={\"Authorization\": \"Bearer tc_YOUR_TOKEN\"},\n)\ndata = response.json()"}],"description":"Requires the `trips:read` scope. Requires at least the `viewer` role on the trip.","security":[{"bearerAuth":["trips:read"]}],"parameters":[{"name":"tripId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success.","headers":{"Content-Disposition":{"description":"Names the download. The filename is the trip's name, slugified.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"$schema":{"type":"string","enum":["travel-collab/content-bundle/v1"]},"bundle":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[a-z0-9-]+$"},"name":{"type":"string","minLength":1,"maxLength":200},"origin":{"type":"string","enum":["human","ai"]},"sources":{"type":"array","items":{"type":"string"},"default":[]},"generatedAt":{"type":"string"},"description":{"type":"string","maxLength":1000}},"required":["id","name","origin"],"additionalProperties":false},"trips":{"minItems":1,"maxItems":1,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[a-z0-9-]+$"},"name":{"type":"string","minLength":1,"maxLength":200},"summary":{"type":"string","maxLength":500},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"budget":{"type":"object","properties":{"amountMinor":{"type":"integer","minimum":0},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"],"additionalProperties":false},"startsInDays":{"type":"integer","minimum":-36500,"maximum":36500},"startDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"days":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":200},"stops":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"timeWindow":{"type":"object","properties":{"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["start","end"],"additionalProperties":false},"location":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"lat":{"type":"number","minimum":-90,"maximum":90,"description":"Send with lng, or omit both. When omitted on a v1 write, the server geocodes `address`, then `name`."},"lng":{"type":"number","minimum":-180,"maximum":180,"description":"Send with lat, or omit both."},"countryCode":{"type":"string","pattern":"^[A-Z]{2}$"},"city":{"type":"string","minLength":1,"maxLength":200},"area":{"type":"string","minLength":1,"maxLength":200},"precision":{"type":"string","enum":["venue","area","city"],"description":"What the coordinates describe: a `venue`, an `area` or a `city`. Requires `lat` and `lng` — sent without them it is refused (\"precision requires coordinates\")."},"verified":{"type":"boolean","enum":[false],"description":"`false` when no geocoder confirmed the coordinates (an assistant's guess). Absent = unknown. Requires `lat` and `lng`."},"address":{"type":"object","properties":{"countryCode":{"type":"string","pattern":"^[A-Z]{2}$","description":"ISO 3166-1 alpha-2, uppercase. Decides how the other fields are read."},"lines":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"description":"Street-level part, in the country's own order, e.g. [\"Hauptstraße 5\"] or [\"1-2-3 Nishi-Azabu\"]."},"dependentLocality":{"type":"string","minLength":1,"maxLength":200,"description":"District, neighbourhood or suburb when it is part of the postal address."},"locality":{"type":"string","minLength":1,"maxLength":200,"description":"City, town or post town."},"administrativeArea":{"type":"string","minLength":1,"maxLength":200,"description":"State, province, prefecture or region."},"postalCode":{"type":"string","minLength":1,"maxLength":20,"description":"A string: keeps leading zeros and letters."}},"required":["countryCode","lines"],"additionalProperties":false}},"required":["name"],"additionalProperties":false},"notes":{"type":"string","maxLength":2000},"anchors":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["dayOfWeek"]},"days":{"minItems":1,"type":"array","items":{"type":"string","enum":["mon","tue","wed","thu","fri","sat","sun"]}}},"required":["kind","days"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["dateRange"]},"from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["kind","from","to"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["timeOfDay"]},"window":{"type":"object","properties":{"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["start","end"],"additionalProperties":false}},"required":["kind","window"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["publicHoliday"]},"country":{"type":"string","pattern":"^[A-Z]{2}$"}},"required":["kind","country"],"additionalProperties":false}]}},"kind":{"type":"string","enum":["planned","pending","transit"]},"tags":{"type":"array","items":{"type":"string","enum":["meal","lodging","ticketed","outdoors","drinks","nightlife","museum","sight","beach","shopping","show","tour","wellness","sports"]}},"cost":{"type":"object","properties":{"amountMinor":{"type":"integer","minimum":0},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"],"additionalProperties":false},"mode":{"type":"string","enum":["walk","bus","train","flight","ferry","car","bike"]},"endLocation":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"lat":{"type":"number","minimum":-90,"maximum":90,"description":"Send with lng, or omit both. When omitted on a v1 write, the server geocodes `address`, then `name`."},"lng":{"type":"number","minimum":-180,"maximum":180,"description":"Send with lat, or omit both."},"countryCode":{"type":"string","pattern":"^[A-Z]{2}$"},"city":{"type":"string","minLength":1,"maxLength":200},"area":{"type":"string","minLength":1,"maxLength":200},"precision":{"type":"string","enum":["venue","area","city"],"description":"What the coordinates describe: a `venue`, an `area` or a `city`. Requires `lat` and `lng` — sent without them it is refused (\"precision requires coordinates\")."},"verified":{"type":"boolean","enum":[false],"description":"`false` when no geocoder confirmed the coordinates (an assistant's guess). Absent = unknown. Requires `lat` and `lng`."},"address":{"type":"object","properties":{"countryCode":{"type":"string","pattern":"^[A-Z]{2}$","description":"ISO 3166-1 alpha-2, uppercase. Decides how the other fields are read."},"lines":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"description":"Street-level part, in the country's own order, e.g. [\"Hauptstraße 5\"] or [\"1-2-3 Nishi-Azabu\"]."},"dependentLocality":{"type":"string","minLength":1,"maxLength":200,"description":"District, neighbourhood or suburb when it is part of the postal address."},"locality":{"type":"string","minLength":1,"maxLength":200,"description":"City, town or post town."},"administrativeArea":{"type":"string","minLength":1,"maxLength":200,"description":"State, province, prefecture or region."},"postalCode":{"type":"string","minLength":1,"maxLength":20,"description":"A string: keeps leading zeros and letters."}},"required":["countryCode","lines"],"additionalProperties":false}},"required":["name"],"additionalProperties":false},"pendingReason":{"type":"string","enum":["book","maybe"]},"flightNumber":{"type":"string","minLength":1,"maxLength":20},"booking":{"type":"object","properties":{"confirmation":{"type":"string","minLength":1,"maxLength":100},"provider":{"type":"string","minLength":1,"maxLength":100},"url":{"type":"string","maxLength":2000,"format":"uri"}},"additionalProperties":false}},"required":["title"],"additionalProperties":false}}},"required":["stops"],"additionalProperties":false}},"backlog":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"timeWindow":{"type":"object","properties":{"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["start","end"],"additionalProperties":false},"location":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"lat":{"type":"number","minimum":-90,"maximum":90,"description":"Send with lng, or omit both. When omitted on a v1 write, the server geocodes `address`, then `name`."},"lng":{"type":"number","minimum":-180,"maximum":180,"description":"Send with lat, or omit both."},"countryCode":{"type":"string","pattern":"^[A-Z]{2}$"},"city":{"type":"string","minLength":1,"maxLength":200},"area":{"type":"string","minLength":1,"maxLength":200},"precision":{"type":"string","enum":["venue","area","city"],"description":"What the coordinates describe: a `venue`, an `area` or a `city`. Requires `lat` and `lng` — sent without them it is refused (\"precision requires coordinates\")."},"verified":{"type":"boolean","enum":[false],"description":"`false` when no geocoder confirmed the coordinates (an assistant's guess). Absent = unknown. Requires `lat` and `lng`."},"address":{"type":"object","properties":{"countryCode":{"type":"string","pattern":"^[A-Z]{2}$","description":"ISO 3166-1 alpha-2, uppercase. Decides how the other fields are read."},"lines":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"description":"Street-level part, in the country's own order, e.g. [\"Hauptstraße 5\"] or [\"1-2-3 Nishi-Azabu\"]."},"dependentLocality":{"type":"string","minLength":1,"maxLength":200,"description":"District, neighbourhood or suburb when it is part of the postal address."},"locality":{"type":"string","minLength":1,"maxLength":200,"description":"City, town or post town."},"administrativeArea":{"type":"string","minLength":1,"maxLength":200,"description":"State, province, prefecture or region."},"postalCode":{"type":"string","minLength":1,"maxLength":20,"description":"A string: keeps leading zeros and letters."}},"required":["countryCode","lines"],"additionalProperties":false}},"required":["name"],"additionalProperties":false},"notes":{"type":"string","maxLength":2000},"anchors":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["dayOfWeek"]},"days":{"minItems":1,"type":"array","items":{"type":"string","enum":["mon","tue","wed","thu","fri","sat","sun"]}}},"required":["kind","days"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["dateRange"]},"from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["kind","from","to"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["timeOfDay"]},"window":{"type":"object","properties":{"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["start","end"],"additionalProperties":false}},"required":["kind","window"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["publicHoliday"]},"country":{"type":"string","pattern":"^[A-Z]{2}$"}},"required":["kind","country"],"additionalProperties":false}]}},"kind":{"type":"string","enum":["planned","pending","transit"]},"tags":{"type":"array","items":{"type":"string","enum":["meal","lodging","ticketed","outdoors","drinks","nightlife","museum","sight","beach","shopping","show","tour","wellness","sports"]}},"cost":{"type":"object","properties":{"amountMinor":{"type":"integer","minimum":0},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"],"additionalProperties":false},"mode":{"type":"string","enum":["walk","bus","train","flight","ferry","car","bike"]},"endLocation":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"lat":{"type":"number","minimum":-90,"maximum":90,"description":"Send with lng, or omit both. When omitted on a v1 write, the server geocodes `address`, then `name`."},"lng":{"type":"number","minimum":-180,"maximum":180,"description":"Send with lat, or omit both."},"countryCode":{"type":"string","pattern":"^[A-Z]{2}$"},"city":{"type":"string","minLength":1,"maxLength":200},"area":{"type":"string","minLength":1,"maxLength":200},"precision":{"type":"string","enum":["venue","area","city"],"description":"What the coordinates describe: a `venue`, an `area` or a `city`. Requires `lat` and `lng` — sent without them it is refused (\"precision requires coordinates\")."},"verified":{"type":"boolean","enum":[false],"description":"`false` when no geocoder confirmed the coordinates (an assistant's guess). Absent = unknown. Requires `lat` and `lng`."},"address":{"type":"object","properties":{"countryCode":{"type":"string","pattern":"^[A-Z]{2}$","description":"ISO 3166-1 alpha-2, uppercase. Decides how the other fields are read."},"lines":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"description":"Street-level part, in the country's own order, e.g. [\"Hauptstraße 5\"] or [\"1-2-3 Nishi-Azabu\"]."},"dependentLocality":{"type":"string","minLength":1,"maxLength":200,"description":"District, neighbourhood or suburb when it is part of the postal address."},"locality":{"type":"string","minLength":1,"maxLength":200,"description":"City, town or post town."},"administrativeArea":{"type":"string","minLength":1,"maxLength":200,"description":"State, province, prefecture or region."},"postalCode":{"type":"string","minLength":1,"maxLength":20,"description":"A string: keeps leading zeros and letters."}},"required":["countryCode","lines"],"additionalProperties":false}},"required":["name"],"additionalProperties":false},"pendingReason":{"type":"string","enum":["book","maybe"]},"flightNumber":{"type":"string","minLength":1,"maxLength":20},"booking":{"type":"object","properties":{"confirmation":{"type":"string","minLength":1,"maxLength":100},"provider":{"type":"string","minLength":1,"maxLength":100},"url":{"type":"string","maxLength":2000,"format":"uri"}},"additionalProperties":false}},"required":["title"],"additionalProperties":false},"default":[]}},"required":["key","name","days"],"additionalProperties":false}},"playbooks":{"type":"array","items":{},"maxItems":0,"minItems":0,"default":[]},"notebooks":{"type":"array","items":{},"maxItems":0,"minItems":0,"default":[]},"activities":{"type":"array","items":{},"maxItems":0,"minItems":0,"default":[]}},"required":["$schema","bundle","trips"],"additionalProperties":false}}}},"4XX":{"description":"One envelope for every failure: `{ error: { code, message, details? } }`. 401 carries `WWW-Authenticate: Bearer`; 429 carries `Retry-After`."}}}},"/v1/trips/{tripId}/geocode":{"get":{"summary":"Search for a real place by name near this trip's stops, returning up to five locations ready to use on a stop (spends geocode quota)","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://caesura.today/api/v1/trips/YOUR_TRIP_ID/geocode?q=string' \\\n  -H 'Authorization: Bearer tc_YOUR_TOKEN'"},{"lang":"JavaScript","label":"JavaScript (fetch)","source":"const response = await fetch(\"https://caesura.today/api/v1/trips/YOUR_TRIP_ID/geocode?q=string\", {\n  method: \"GET\",\n  headers: {\n    Authorization: \"Bearer tc_YOUR_TOKEN\",\n  },\n});\nconst data = await response.json();"},{"lang":"Python","label":"Python (requests)","source":"import requests\n\nresponse = requests.request(\n    \"GET\",\n    \"https://caesura.today/api/v1/trips/YOUR_TRIP_ID/geocode?q=string\",\n    headers={\"Authorization\": \"Bearer tc_YOUR_TOKEN\"},\n)\ndata = response.json()"}],"description":"Requires the `trips:write` scope. Requires at least the `editor` role on the trip.","security":[{"bearerAuth":["trips:write"]}],"parameters":[{"name":"tripId","in":"path","required":true,"schema":{"type":"string"}},{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":200}},{"name":"countryCode","in":"query","required":false,"schema":{"type":"string","pattern":"^[A-Z]{2}$"}}],"responses":{"200":{"description":"Success.","headers":{"Retry-After":{"description":"On a 429: seconds until the daily geocode allowance resets.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"lat":{"type":"number","minimum":-90,"maximum":90,"description":"Send with lng, or omit both. When omitted on a v1 write, the server geocodes `address`, then `name`."},"lng":{"type":"number","minimum":-180,"maximum":180,"description":"Send with lat, or omit both."},"countryCode":{"type":"string","pattern":"^[A-Z]{2}$"},"city":{"type":"string","minLength":1,"maxLength":200},"area":{"type":"string","minLength":1,"maxLength":200},"precision":{"type":"string","enum":["venue","area","city"],"description":"What the coordinates describe: a `venue`, an `area` or a `city`. Requires `lat` and `lng` — sent without them it is refused (\"precision requires coordinates\")."},"verified":{"type":"boolean","enum":[false],"description":"`false` when no geocoder confirmed the coordinates (an assistant's guess). Absent = unknown. Requires `lat` and `lng`."},"address":{"type":"object","properties":{"countryCode":{"type":"string","pattern":"^[A-Z]{2}$","description":"ISO 3166-1 alpha-2, uppercase. Decides how the other fields are read."},"lines":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"description":"Street-level part, in the country's own order, e.g. [\"Hauptstraße 5\"] or [\"1-2-3 Nishi-Azabu\"]."},"dependentLocality":{"type":"string","minLength":1,"maxLength":200,"description":"District, neighbourhood or suburb when it is part of the postal address."},"locality":{"type":"string","minLength":1,"maxLength":200,"description":"City, town or post town."},"administrativeArea":{"type":"string","minLength":1,"maxLength":200,"description":"State, province, prefecture or region."},"postalCode":{"type":"string","minLength":1,"maxLength":20,"description":"A string: keeps leading zeros and letters."}},"required":["countryCode","lines"],"additionalProperties":false}},"required":["name"],"additionalProperties":false}}},"required":["results"],"additionalProperties":false}}}},"4XX":{"description":"One envelope for every failure: `{ error: { code, message, details? } }`. 401 carries `WWW-Authenticate: Bearer`; 429 carries `Retry-After`."}}}},"/v1/trips/{tripId}/globals":{"get":{"summary":"Summarise a trip: its days and their time zones, and the cities and tags it uses","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://caesura.today/api/v1/trips/YOUR_TRIP_ID/globals' \\\n  -H 'Authorization: Bearer tc_YOUR_TOKEN'"},{"lang":"JavaScript","label":"JavaScript (fetch)","source":"const response = await fetch(\"https://caesura.today/api/v1/trips/YOUR_TRIP_ID/globals\", {\n  method: \"GET\",\n  headers: {\n    Authorization: \"Bearer tc_YOUR_TOKEN\",\n  },\n});\nconst data = await response.json();"},{"lang":"Python","label":"Python (requests)","source":"import requests\n\nresponse = requests.request(\n    \"GET\",\n    \"https://caesura.today/api/v1/trips/YOUR_TRIP_ID/globals\",\n    headers={\"Authorization\": \"Bearer tc_YOUR_TOKEN\"},\n)\ndata = response.json()"}],"description":"Requires the `trips:read` scope. Requires at least the `viewer` role on the trip.","security":[{"bearerAuth":["trips:read"]}],"parameters":[{"name":"tripId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"days":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer","minimum":0,"description":"Day number, counting from 0"},"date":{"type":"string","nullable":true,"description":"The day's date, or nothing if the trip has no start date"},"cities":{"type":"array","items":{"type":"string"},"description":"The cities this day touches, in arrival order"},"activityCount":{"type":"integer","minimum":0,"description":"How many stops are on this day"},"costSubtotal":{"type":"integer","description":"What this day costs"},"place":{"type":"object","properties":{"lat":{"type":"number","minimum":-90,"maximum":90},"lng":{"type":"number","minimum":-180,"maximum":180},"city":{"type":"string","nullable":true,"default":null,"description":"The city of the stop that gives the day its place, if it has one"}},"required":["lat","lng"],"additionalProperties":false,"nullable":true,"default":null,"description":"Where the day is: its earliest stop with coordinates. Null when no stop on the day has any."},"timeZone":{"type":"string","minLength":1,"nullable":true,"default":null,"description":"The day's time zone"},"weatherPlace":{"type":"object","properties":{"lat":{"type":"number","minimum":-90,"maximum":90},"lng":{"type":"number","minimum":-180,"maximum":180},"city":{"type":"string","nullable":true,"default":null,"description":"The city of the stop the weather is read at, if it has one"},"timeZone":{"type":"string","minLength":1,"description":"The IANA time zone at that stop"}},"required":["lat","lng","timeZone"],"additionalProperties":false,"nullable":true,"default":null,"description":"Where the day's weather and sunrise are read: the earliest stop with coordinates in its first city, or its earliest stop with coordinates when none names a city. Null when no stop on the day has any."}},"required":["index","date","cities","activityCount","costSubtotal"],"additionalProperties":false},"description":"Every day of the trip"},"cities":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"The city's name"},"dayIndexes":{"type":"array","items":{"type":"integer","minimum":0},"description":"Which days touch this city"},"activityCount":{"type":"integer","minimum":0,"description":"How many stops are in this city"}},"required":["name","dayIndexes","activityCount"],"additionalProperties":false},"description":"Every city the trip touches"},"tags":{"type":"array","items":{"type":"object","properties":{"tag":{"type":"string","enum":["meal","lodging","ticketed","outdoors","drinks","nightlife","museum","sight","beach","shopping","show","tour","wellness","sports"],"description":"The tag"},"activityCount":{"type":"integer","minimum":0,"description":"How many stops carry this tag"}},"required":["tag","activityCount"],"additionalProperties":false},"description":"Every tag in use on this trip"},"homeTimeZone":{"type":"string","minLength":1,"nullable":true,"default":null,"description":"The caller's IANA time zone, from their account's home airport. Null when that is unset or unknown, and for an API token without `account:read` or restricted to specific trips."},"description":{"type":"object","properties":{"text":{"type":"string","minLength":1,"description":"What kind of trip it is: \"Outdoorsy\", \"Beach & outdoors\", \"A bit of everything\""},"counted":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"How many activities the description counted: those with a category other than Lodging, travel left out"},"tags":{"type":"array","items":{"type":"object","properties":{"tag":{"type":"string","enum":["meal","lodging","ticketed","outdoors","drinks","nightlife","museum","sight","beach","shopping","show","tour","wellness","sports"],"description":"The tag"},"activityCount":{"type":"integer","minimum":0,"description":"How many stops carry this tag"}},"required":["tag","activityCount"],"additionalProperties":false},"description":"Every category the description counted, the most activities first, with how many carry it"}},"required":["text","counted","tags"],"additionalProperties":false,"nullable":true,"default":null,"description":"What kind of trip it is, from its activities' tags. Null when too few carry a category to say."}},"required":["days","cities","tags"],"additionalProperties":false}}}},"4XX":{"description":"One envelope for every failure: `{ error: { code, message, details? } }`. 401 carries `WWW-Authenticate: Bearer`; 429 carries `Retry-After`."}}}},"/v1/trips/{tripId}/guests/{guestId}/link":{"post":{"summary":"Claim a guest record for a trip member","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://caesura.today/api/v1/trips/YOUR_TRIP_ID/guests/YOUR_GUEST_ID/link' \\\n  -H 'Authorization: Bearer tc_YOUR_TOKEN' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n  \"userId\": \"string\"\n}'"},{"lang":"JavaScript","label":"JavaScript (fetch)","source":"const response = await fetch(\"https://caesura.today/api/v1/trips/YOUR_TRIP_ID/guests/YOUR_GUEST_ID/link\", {\n  method: \"POST\",\n  headers: {\n    Authorization: \"Bearer tc_YOUR_TOKEN\",\n    \"Content-Type\": \"application/json\",\n  },\n  body: JSON.stringify({\n    \"userId\": \"string\"\n  }),\n});\nconst data = await response.json();"},{"lang":"Python","label":"Python (requests)","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://caesura.today/api/v1/trips/YOUR_TRIP_ID/guests/YOUR_GUEST_ID/link\",\n    headers={\"Authorization\": \"Bearer tc_YOUR_TOKEN\"},\n    json={\"userId\": \"string\"},\n)\ndata = response.json()"}],"description":"Requires the `sharing:write` scope. Requires at least the `viewer` role on the trip.","security":[{"bearerAuth":["sharing:write"]}],"parameters":[{"name":"tripId","in":"path","required":true,"schema":{"type":"string"}},{"name":"guestId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","minLength":1}},"required":["userId"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"guestId":{"type":"string","pattern":"^guest_"},"tripId":{"type":"string","format":"uuid"},"name":{"type":"string","minLength":1,"maxLength":120},"travelling":{"type":"boolean"},"linkedUserId":{"type":"string","minLength":1,"nullable":true},"createdBy":{"type":"string","minLength":1},"createdAt":{"type":"string"}},"required":["guestId","tripId","name","travelling","linkedUserId","createdBy","createdAt"],"additionalProperties":false}}}},"4XX":{"description":"One envelope for every failure: `{ error: { code, message, details? } }`. 401 carries `WWW-Authenticate: Bearer`; 429 carries `Retry-After`."}}}},"/v1/trips/{tripId}/guests/{guestId}":{"patch":{"summary":"Rename a guest, or change whether they are travelling","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X PATCH 'https://caesura.today/api/v1/trips/YOUR_TRIP_ID/guests/YOUR_GUEST_ID' \\\n  -H 'Authorization: Bearer tc_YOUR_TOKEN' \\\n  -H 'Content-Type: application/json' \\\n  -d '{}'"},{"lang":"JavaScript","label":"JavaScript (fetch)","source":"const response = await fetch(\"https://caesura.today/api/v1/trips/YOUR_TRIP_ID/guests/YOUR_GUEST_ID\", {\n  method: \"PATCH\",\n  headers: {\n    Authorization: \"Bearer tc_YOUR_TOKEN\",\n    \"Content-Type\": \"application/json\",\n  },\n  body: JSON.stringify({}),\n});\nconst data = await response.json();"},{"lang":"Python","label":"Python (requests)","source":"import requests\n\nresponse = requests.request(\n    \"PATCH\",\n    \"https://caesura.today/api/v1/trips/YOUR_TRIP_ID/guests/YOUR_GUEST_ID\",\n    headers={\"Authorization\": \"Bearer tc_YOUR_TOKEN\"},\n    json={},\n)\ndata = response.json()"}],"description":"Requires the `sharing:write` scope. Requires at least the `editor` role on the trip.","security":[{"bearerAuth":["sharing:write"]}],"parameters":[{"name":"tripId","in":"path","required":true,"schema":{"type":"string"}},{"name":"guestId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"travelling":{"type":"boolean"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"guestId":{"type":"string","pattern":"^guest_"},"tripId":{"type":"string","format":"uuid"},"name":{"type":"string","minLength":1,"maxLength":120},"travelling":{"type":"boolean"},"linkedUserId":{"type":"string","minLength":1,"nullable":true},"createdBy":{"type":"string","minLength":1},"createdAt":{"type":"string"}},"required":["guestId","tripId","name","travelling","linkedUserId","createdBy","createdAt"],"additionalProperties":false}}}},"4XX":{"description":"One envelope for every failure: `{ error: { code, message, details? } }`. 401 carries `WWW-Authenticate: Bearer`; 429 carries `Retry-After`."}}},"delete":{"summary":"Remove a guest from a trip","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X DELETE 'https://caesura.today/api/v1/trips/YOUR_TRIP_ID/guests/YOUR_GUEST_ID' \\\n  -H 'Authorization: Bearer tc_YOUR_TOKEN'"},{"lang":"JavaScript","label":"JavaScript (fetch)","source":"const response = await fetch(\"https://caesura.today/api/v1/trips/YOUR_TRIP_ID/guests/YOUR_GUEST_ID\", {\n  method: \"DELETE\",\n  headers: {\n    Authorization: \"Bearer tc_YOUR_TOKEN\",\n  },\n});\nconst data = await response.json();"},{"lang":"Python","label":"Python (requests)","source":"import requests\n\nresponse = requests.request(\n    \"DELETE\",\n    \"https://caesura.today/api/v1/trips/YOUR_TRIP_ID/guests/YOUR_GUEST_ID\",\n    headers={\"Authorization\": \"Bearer tc_YOUR_TOKEN\"},\n)\ndata = response.json()"}],"description":"Requires the `sharing:write` scope. Requires at least the `editor` role on the trip.","security":[{"bearerAuth":["sharing:write"]}],"parameters":[{"name":"tripId","in":"path","required":true,"schema":{"type":"string"}},{"name":"guestId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"guestId":{"type":"string","pattern":"^guest_"},"tripId":{"type":"string","format":"uuid"},"name":{"type":"string","minLength":1,"maxLength":120},"travelling":{"type":"boolean"},"linkedUserId":{"type":"string","minLength":1,"nullable":true},"createdBy":{"type":"string","minLength":1},"createdAt":{"type":"string"}},"required":["guestId","tripId","name","travelling","linkedUserId","createdBy","createdAt"],"additionalProperties":false}}}},"4XX":{"description":"One envelope for every failure: `{ error: { code, message, details? } }`. 401 carries `WWW-Authenticate: Bearer`; 429 carries `Retry-After`."}}}},"/v1/trips/{tripId}/guests/{guestId}/unlink":{"post":{"summary":"Unclaim a guest record","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://caesura.today/api/v1/trips/YOUR_TRIP_ID/guests/YOUR_GUEST_ID/unlink' \\\n  -H 'Authorization: Bearer tc_YOUR_TOKEN'"},{"lang":"JavaScript","label":"JavaScript (fetch)","source":"const response = await fetch(\"https://caesura.today/api/v1/trips/YOUR_TRIP_ID/guests/YOUR_GUEST_ID/unlink\", {\n  method: \"POST\",\n  headers: {\n    Authorization: \"Bearer tc_YOUR_TOKEN\",\n  },\n});\nconst data = await response.json();"},{"lang":"Python","label":"Python (requests)","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://caesura.today/api/v1/trips/YOUR_TRIP_ID/guests/YOUR_GUEST_ID/unlink\",\n    headers={\"Authorization\": \"Bearer tc_YOUR_TOKEN\"},\n)\ndata = response.json()"}],"description":"Requires the `sharing:write` scope. Requires at least the `owner` role on the trip.","security":[{"bearerAuth":["sharing:write"]}],"parameters":[{"name":"tripId","in":"path","required":true,"schema":{"type":"string"}},{"name":"guestId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"guestId":{"type":"string","pattern":"^guest_"},"tripId":{"type":"string","format":"uuid"},"name":{"type":"string","minLength":1,"maxLength":120},"travelling":{"type":"boolean"},"linkedUserId":{"type":"string","minLength":1,"nullable":true},"createdBy":{"type":"string","minLength":1},"createdAt":{"type":"string"}},"required":["guestId","tripId","name","travelling","linkedUserId","createdBy","createdAt"],"additionalProperties":false}}}},"4XX":{"description":"One envelope for every failure: `{ error: { code, message, details? } }`. 401 carries `WWW-Authenticate: Bearer`; 429 carries `Retry-After`."}}}},"/v1/trips/{tripId}/guests":{"get":{"summary":"List the trip's named guests (travellers with no account)","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://caesura.today/api/v1/trips/YOUR_TRIP_ID/guests' \\\n  -H 'Authorization: Bearer tc_YOUR_TOKEN'"},{"lang":"JavaScript","label":"JavaScript (fetch)","source":"const response = await fetch(\"https://caesura.today/api/v1/trips/YOUR_TRIP_ID/guests\", {\n  method: \"GET\",\n  headers: {\n    Authorization: \"Bearer tc_YOUR_TOKEN\",\n  },\n});\nconst data = await response.json();"},{"lang":"Python","label":"Python (requests)","source":"import requests\n\nresponse = requests.request(\n    \"GET\",\n    \"https://caesura.today/api/v1/trips/YOUR_TRIP_ID/guests\",\n    headers={\"Authorization\": \"Bearer tc_YOUR_TOKEN\"},\n)\ndata = response.json()"}],"description":"Requires the `trips:read` scope. Requires at least the `viewer` role on the trip.","security":[{"bearerAuth":["trips:read"]}],"parameters":[{"name":"tripId","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"description":"1 to 200. A value outside that range is refused, never clamped.","schema":{"type":"integer","minimum":1,"maximum":200}},{"name":"cursor","in":"query","required":false,"description":"Opaque. Pass back the `nextCursor` of the previous page.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","required":["items","nextCursor"],"properties":{"items":{"type":"array","items":{"type":"object","properties":{"guestId":{"type":"string","pattern":"^guest_"},"tripId":{"type":"string","format":"uuid"},"name":{"type":"string","minLength":1,"maxLength":120},"travelling":{"type":"boolean"},"linkedUserId":{"type":"string","minLength":1,"nullable":true},"createdBy":{"type":"string","minLength":1},"createdAt":{"type":"string"}},"required":["guestId","tripId","name","travelling","linkedUserId","createdBy","createdAt"],"additionalProperties":false}},"nextCursor":{"type":"string","nullable":true}}}}}},"4XX":{"description":"One envelope for every failure: `{ error: { code, message, details? } }`. 401 carries `WWW-Authenticate: Bearer`; 429 carries `Retry-After`."}}},"post":{"summary":"Name a guest on a trip","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://caesura.today/api/v1/trips/YOUR_TRIP_ID/guests' \\\n  -H 'Authorization: Bearer tc_YOUR_TOKEN' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n  \"name\": \"string\"\n}'"},{"lang":"JavaScript","label":"JavaScript (fetch)","source":"const response = await fetch(\"https://caesura.today/api/v1/trips/YOUR_TRIP_ID/guests\", {\n  method: \"POST\",\n  headers: {\n    Authorization: \"Bearer tc_YOUR_TOKEN\",\n    \"Content-Type\": \"application/json\",\n  },\n  body: JSON.stringify({\n    \"name\": \"string\"\n  }),\n});\nconst data = await response.json();"},{"lang":"Python","label":"Python (requests)","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://caesura.today/api/v1/trips/YOUR_TRIP_ID/guests\",\n    headers={\"Authorization\": \"Bearer tc_YOUR_TOKEN\"},\n    json={\"name\": \"string\"},\n)\ndata = response.json()"}],"description":"Requires the `sharing:write` scope. Requires at least the `editor` role on the trip.","security":[{"bearerAuth":["sharing:write"]}],"parameters":[{"name":"tripId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120}},"required":["name"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"guestId":{"type":"string","pattern":"^guest_"},"tripId":{"type":"string","format":"uuid"},"name":{"type":"string","minLength":1,"maxLength":120},"travelling":{"type":"boolean"},"linkedUserId":{"type":"string","minLength":1,"nullable":true},"createdBy":{"type":"string","minLength":1},"createdAt":{"type":"string"}},"required":["guestId","tripId","name","travelling","linkedUserId","createdBy","createdAt"],"additionalProperties":false}}}},"4XX":{"description":"One envelope for every failure: `{ error: { code, message, details? } }`. 401 carries `WWW-Authenticate: Bearer`; 429 carries `Retry-After`."}}}},"/v1/trips/{tripId}/history/{seq}":{"get":{"summary":"Get a trip as it stood at a past revision, without changing it","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://caesura.today/api/v1/trips/YOUR_TRIP_ID/history/YOUR_SEQ' \\\n  -H 'Authorization: Bearer tc_YOUR_TOKEN'"},{"lang":"JavaScript","label":"JavaScript (fetch)","source":"const response = await fetch(\"https://caesura.today/api/v1/trips/YOUR_TRIP_ID/history/YOUR_SEQ\", {\n  method: \"GET\",\n  headers: {\n    Authorization: \"Bearer tc_YOUR_TOKEN\",\n  },\n});\nconst data = await response.json();"},{"lang":"Python","label":"Python (requests)","source":"import requests\n\nresponse = requests.request(\n    \"GET\",\n    \"https://caesura.today/api/v1/trips/YOUR_TRIP_ID/history/YOUR_SEQ\",\n    headers={\"Authorization\": \"Bearer tc_YOUR_TOKEN\"},\n)\ndata = response.json()"}],"description":"Requires the `trips:read` scope, or `current:read`. Requires at least the `viewer` role on the trip.","security":[{"bearerAuth":["trips:read"]},{"bearerAuth":["current:read"]}],"parameters":[{"name":"tripId","in":"path","required":true,"schema":{"type":"string"}},{"name":"seq","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"tripId":{"type":"string","format":"uuid"},"name":{"type":"string"},"status":{"type":"string","enum":["active","deleted"]},"startDate":{"type":"string","nullable":true},"currency":{"type":"string"},"budget":{"type":"object","properties":{"amountMinor":{"type":"integer","minimum":0},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"],"additionalProperties":false,"nullable":true},"members":{"minItems":1,"type":"array","items":{"type":"object","properties":{"userId":{"type":"string","minLength":1},"role":{"type":"string","enum":["viewer","suggester","editor","owner"]},"travelling":{"type":"boolean"}},"required":["userId","role"],"additionalProperties":false}},"forkedFrom":{"type":"object","properties":{"tripId":{"type":"string","format":"uuid"},"atSeq":{"type":"integer","minimum":1},"name":{"type":"string","minLength":1,"maxLength":200}},"required":["tripId","atSeq","name"],"additionalProperties":false,"nullable":true,"default":null},"pace":{"type":"string","enum":["slow","balanced","packed"],"nullable":true,"default":null},"tags":{"type":"array","items":{"type":"string","enum":["meal","outdoors","drinks","nightlife","museum","sight","beach","shopping","show","tour","wellness","sports"]},"default":[]},"days":{"type":"array","items":{"type":"object","properties":{"dayId":{"type":"string","format":"uuid"},"activityIds":{"type":"array","items":{"type":"string","format":"uuid"}},"date":{"type":"string","nullable":true},"costSubtotal":{"type":"integer"}},"required":["dayId","activityIds","date","costSubtotal"],"additionalProperties":false}},"backlog":{"type":"array","items":{"type":"string","format":"uuid"}},"parkedFrom":{"type":"object","additionalProperties":{"type":"string","format":"uuid"}},"activities":{"type":"object","additionalProperties":{"type":"object","properties":{"activityId":{"type":"string","format":"uuid"},"title":{"type":"string"},"timeWindow":{"type":"object","properties":{"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["start","end"],"additionalProperties":false,"nullable":true},"location":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"lat":{"type":"number","minimum":-90,"maximum":90,"description":"Send with lng, or omit both. When omitted on a v1 write, the server geocodes `address`, then `name`."},"lng":{"type":"number","minimum":-180,"maximum":180,"description":"Send with lat, or omit both."},"countryCode":{"type":"string","pattern":"^[A-Z]{2}$"},"city":{"type":"string","minLength":1,"maxLength":200},"area":{"type":"string","minLength":1,"maxLength":200},"precision":{"type":"string","enum":["venue","area","city"],"description":"What the coordinates describe: a `venue`, an `area` or a `city`. Requires `lat` and `lng` — sent without them it is refused (\"precision requires coordinates\")."},"verified":{"type":"boolean","enum":[false],"description":"`false` when no geocoder confirmed the coordinates (an assistant's guess). Absent = unknown. Requires `lat` and `lng`."},"address":{"type":"object","properties":{"countryCode":{"type":"string","pattern":"^[A-Z]{2}$","description":"ISO 3166-1 alpha-2, uppercase. Decides how the other fields are read."},"lines":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"description":"Street-level part, in the country's own order, e.g. [\"Hauptstraße 5\"] or [\"1-2-3 Nishi-Azabu\"]."},"dependentLocality":{"type":"string","minLength":1,"maxLength":200,"description":"District, neighbourhood or suburb when it is part of the postal address."},"locality":{"type":"string","minLength":1,"maxLength":200,"description":"City, town or post town."},"administrativeArea":{"type":"string","minLength":1,"maxLength":200,"description":"State, province, prefecture or region."},"postalCode":{"type":"string","minLength":1,"maxLength":20,"description":"A string: keeps leading zeros and letters."}},"required":["countryCode","lines"],"additionalProperties":false}},"required":["name"],"additionalProperties":false,"nullable":true},"notes":{"type":"string","nullable":true},"anchors":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["dayOfWeek"]},"days":{"minItems":1,"type":"array","items":{"type":"string","enum":["mon","tue","wed","thu","fri","sat","sun"]}}},"required":["kind","days"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["dateRange"]},"from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["kind","from","to"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["timeOfDay"]},"window":{"type":"object","properties":{"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["start","end"],"additionalProperties":false}},"required":["kind","window"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["publicHoliday"]},"country":{"type":"string","pattern":"^[A-Z]{2}$"}},"required":["kind","country"],"additionalProperties":false}]}},"kind":{"type":"string","enum":["planned","pending","transit"],"default":"planned"},"tags":{"type":"array","items":{"type":"string","enum":["meal","lodging","ticketed","outdoors","drinks","nightlife","museum","sight","beach","shopping","show","tour","wellness","sports"]},"default":[]},"cost":{"type":"object","properties":{"amountMinor":{"type":"integer","minimum":0},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"],"additionalProperties":false,"nullable":true,"description":"Price for one person, in the trip's currency. A stop's total is this times its headcount: the people in `participants`, or every traveller on the trip when `participants` is empty. A `pending` stop's cost is an estimate; a `planned` or `transit` stop's is committed."},"bookedBy":{"type":"string","nullable":true,"default":null},"participants":{"type":"array","items":{"type":"string"},"default":[]},"addedBy":{"type":"string","nullable":true,"default":null},"mode":{"type":"string","enum":["walk","bus","train","flight","ferry","car","bike"],"nullable":true,"default":null},"endLocation":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"lat":{"type":"number","minimum":-90,"maximum":90,"description":"Send with lng, or omit both. When omitted on a v1 write, the server geocodes `address`, then `name`."},"lng":{"type":"number","minimum":-180,"maximum":180,"description":"Send with lat, or omit both."},"countryCode":{"type":"string","pattern":"^[A-Z]{2}$"},"city":{"type":"string","minLength":1,"maxLength":200},"area":{"type":"string","minLength":1,"maxLength":200},"precision":{"type":"string","enum":["venue","area","city"],"description":"What the coordinates describe: a `venue`, an `area` or a `city`. Requires `lat` and `lng` — sent without them it is refused (\"precision requires coordinates\")."},"verified":{"type":"boolean","enum":[false],"description":"`false` when no geocoder confirmed the coordinates (an assistant's guess). Absent = unknown. Requires `lat` and `lng`."},"address":{"type":"object","properties":{"countryCode":{"type":"string","pattern":"^[A-Z]{2}$","description":"ISO 3166-1 alpha-2, uppercase. Decides how the other fields are read."},"lines":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"description":"Street-level part, in the country's own order, e.g. [\"Hauptstraße 5\"] or [\"1-2-3 Nishi-Azabu\"]."},"dependentLocality":{"type":"string","minLength":1,"maxLength":200,"description":"District, neighbourhood or suburb when it is part of the postal address."},"locality":{"type":"string","minLength":1,"maxLength":200,"description":"City, town or post town."},"administrativeArea":{"type":"string","minLength":1,"maxLength":200,"description":"State, province, prefecture or region."},"postalCode":{"type":"string","minLength":1,"maxLength":20,"description":"A string: keeps leading zeros and letters."}},"required":["countryCode","lines"],"additionalProperties":false}},"required":["name"],"additionalProperties":false,"nullable":true,"default":null},"pendingReason":{"type":"string","enum":["book","maybe"],"nullable":true,"default":null},"flightNumber":{"type":"string","nullable":true,"default":null},"booking":{"type":"object","properties":{"confirmation":{"type":"string"},"provider":{"type":"string","nullable":true},"url":{"type":"string"}},"additionalProperties":false,"nullable":true,"default":null}},"required":["activityId","title","timeWindow","location","notes","anchors","cost"],"additionalProperties":false}},"conflicts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"severity":{"type":"string","enum":["info","warn","error"]},"subjects":{"type":"array","items":{"type":"string"}},"resolutions":{"type":"array","items":{"type":"string"}},"description":{"type":"string"}},"required":["id","kind","severity","subjects","description","resolutions"],"additionalProperties":false}},"dismissedConflictIds":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string"},"unscheduledCostSubtotal":{"type":"integer"},"tripCostTotal":{"type":"integer"},"budgetRemaining":{"type":"integer","nullable":true}},"required":["tripId","name","status","startDate","currency","budget","members","days","backlog","activities","conflicts","dismissedConflictIds","createdAt","unscheduledCostSubtotal","tripCostTotal","budgetRemaining"],"additionalProperties":false}}}},"4XX":{"description":"One envelope for every failure: `{ error: { code, message, details? } }`. 401 carries `WWW-Authenticate: Bearer`; 429 carries `Retry-After`."}}}},"/v1/trips/{tripId}/history/redo":{"post":{"summary":"Redo the change most recently undone on a trip","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://caesura.today/api/v1/trips/YOUR_TRIP_ID/history/redo' \\\n  -H 'Authorization: Bearer tc_YOUR_TOKEN'"},{"lang":"JavaScript","label":"JavaScript (fetch)","source":"const response = await fetch(\"https://caesura.today/api/v1/trips/YOUR_TRIP_ID/history/redo\", {\n  method: \"POST\",\n  headers: {\n    Authorization: \"Bearer tc_YOUR_TOKEN\",\n  },\n});\nconst data = await response.json();"},{"lang":"Python","label":"Python (requests)","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://caesura.today/api/v1/trips/YOUR_TRIP_ID/history/redo\",\n    headers={\"Authorization\": \"Bearer tc_YOUR_TOKEN\"},\n)\ndata = response.json()"}],"description":"Requires the `trips:write` scope, or `current:write`. Requires at least the `editor` role on the trip.","security":[{"bearerAuth":["trips:write"]},{"bearerAuth":["current:write"]}],"parameters":[{"name":"tripId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"tripId":{"type":"string","format":"uuid"},"name":{"type":"string"},"status":{"type":"string","enum":["active","deleted"]},"startDate":{"type":"string","nullable":true},"currency":{"type":"string"},"budget":{"type":"object","properties":{"amountMinor":{"type":"integer","minimum":0},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"],"additionalProperties":false,"nullable":true},"members":{"minItems":1,"type":"array","items":{"type":"object","properties":{"userId":{"type":"string","minLength":1},"role":{"type":"string","enum":["viewer","suggester","editor","owner"]},"travelling":{"type":"boolean"}},"required":["userId","role"],"additionalProperties":false}},"forkedFrom":{"type":"object","properties":{"tripId":{"type":"string","format":"uuid"},"atSeq":{"type":"integer","minimum":1},"name":{"type":"string","minLength":1,"maxLength":200}},"required":["tripId","atSeq","name"],"additionalProperties":false,"nullable":true,"default":null},"pace":{"type":"string","enum":["slow","balanced","packed"],"nullable":true,"default":null},"tags":{"type":"array","items":{"type":"string","enum":["meal","outdoors","drinks","nightlife","museum","sight","beach","shopping","show","tour","wellness","sports"]},"default":[]},"days":{"type":"array","items":{"type":"object","properties":{"dayId":{"type":"string","format":"uuid"},"activityIds":{"type":"array","items":{"type":"string","format":"uuid"}},"date":{"type":"string","nullable":true},"costSubtotal":{"type":"integer"}},"required":["dayId","activityIds","date","costSubtotal"],"additionalProperties":false}},"backlog":{"type":"array","items":{"type":"string","format":"uuid"}},"parkedFrom":{"type":"object","additionalProperties":{"type":"string","format":"uuid"}},"activities":{"type":"object","additionalProperties":{"type":"object","properties":{"activityId":{"type":"string","format":"uuid"},"title":{"type":"string"},"timeWindow":{"type":"object","properties":{"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["start","end"],"additionalProperties":false,"nullable":true},"location":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"lat":{"type":"number","minimum":-90,"maximum":90,"description":"Send with lng, or omit both. When omitted on a v1 write, the server geocodes `address`, then `name`."},"lng":{"type":"number","minimum":-180,"maximum":180,"description":"Send with lat, or omit both."},"countryCode":{"type":"string","pattern":"^[A-Z]{2}$"},"city":{"type":"string","minLength":1,"maxLength":200},"area":{"type":"string","minLength":1,"maxLength":200},"precision":{"type":"string","enum":["venue","area","city"],"description":"What the coordinates describe: a `venue`, an `area` or a `city`. Requires `lat` and `lng` — sent without them it is refused (\"precision requires coordinates\")."},"verified":{"type":"boolean","enum":[false],"description":"`false` when no geocoder confirmed the coordinates (an assistant's guess). Absent = unknown. Requires `lat` and `lng`."},"address":{"type":"object","properties":{"countryCode":{"type":"string","pattern":"^[A-Z]{2}$","description":"ISO 3166-1 alpha-2, uppercase. Decides how the other fields are read."},"lines":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"description":"Street-level part, in the country's own order, e.g. [\"Hauptstraße 5\"] or [\"1-2-3 Nishi-Azabu\"]."},"dependentLocality":{"type":"string","minLength":1,"maxLength":200,"description":"District, neighbourhood or suburb when it is part of the postal address."},"locality":{"type":"string","minLength":1,"maxLength":200,"description":"City, town or post town."},"administrativeArea":{"type":"string","minLength":1,"maxLength":200,"description":"State, province, prefecture or region."},"postalCode":{"type":"string","minLength":1,"maxLength":20,"description":"A string: keeps leading zeros and letters."}},"required":["countryCode","lines"],"additionalProperties":false}},"required":["name"],"additionalProperties":false,"nullable":true},"notes":{"type":"string","nullable":true},"anchors":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["dayOfWeek"]},"days":{"minItems":1,"type":"array","items":{"type":"string","enum":["mon","tue","wed","thu","fri","sat","sun"]}}},"required":["kind","days"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["dateRange"]},"from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["kind","from","to"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["timeOfDay"]},"window":{"type":"object","properties":{"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["start","end"],"additionalProperties":false}},"required":["kind","window"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["publicHoliday"]},"country":{"type":"string","pattern":"^[A-Z]{2}$"}},"required":["kind","country"],"additionalProperties":false}]}},"kind":{"type":"string","enum":["planned","pending","transit"],"default":"planned"},"tags":{"type":"array","items":{"type":"string","enum":["meal","lodging","ticketed","outdoors","drinks","nightlife","museum","sight","beach","shopping","show","tour","wellness","sports"]},"default":[]},"cost":{"type":"object","properties":{"amountMinor":{"type":"integer","minimum":0},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"],"additionalProperties":false,"nullable":true,"description":"Price for one person, in the trip's currency. A stop's total is this times its headcount: the people in `participants`, or every traveller on the trip when `participants` is empty. A `pending` stop's cost is an estimate; a `planned` or `transit` stop's is committed."},"bookedBy":{"type":"string","nullable":true,"default":null},"participants":{"type":"array","items":{"type":"string"},"default":[]},"addedBy":{"type":"string","nullable":true,"default":null},"mode":{"type":"string","enum":["walk","bus","train","flight","ferry","car","bike"],"nullable":true,"default":null},"endLocation":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"lat":{"type":"number","minimum":-90,"maximum":90,"description":"Send with lng, or omit both. When omitted on a v1 write, the server geocodes `address`, then `name`."},"lng":{"type":"number","minimum":-180,"maximum":180,"description":"Send with lat, or omit both."},"countryCode":{"type":"string","pattern":"^[A-Z]{2}$"},"city":{"type":"string","minLength":1,"maxLength":200},"area":{"type":"string","minLength":1,"maxLength":200},"precision":{"type":"string","enum":["venue","area","city"],"description":"What the coordinates describe: a `venue`, an `area` or a `city`. Requires `lat` and `lng` — sent without them it is refused (\"precision requires coordinates\")."},"verified":{"type":"boolean","enum":[false],"description":"`false` when no geocoder confirmed the coordinates (an assistant's guess). Absent = unknown. Requires `lat` and `lng`."},"address":{"type":"object","properties":{"countryCode":{"type":"string","pattern":"^[A-Z]{2}$","description":"ISO 3166-1 alpha-2, uppercase. Decides how the other fields are read."},"lines":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"description":"Street-level part, in the country's own order, e.g. [\"Hauptstraße 5\"] or [\"1-2-3 Nishi-Azabu\"]."},"dependentLocality":{"type":"string","minLength":1,"maxLength":200,"description":"District, neighbourhood or suburb when it is part of the postal address."},"locality":{"type":"string","minLength":1,"maxLength":200,"description":"City, town or post town."},"administrativeArea":{"type":"string","minLength":1,"maxLength":200,"description":"State, province, prefecture or region."},"postalCode":{"type":"string","minLength":1,"maxLength":20,"description":"A string: keeps leading zeros and letters."}},"required":["countryCode","lines"],"additionalProperties":false}},"required":["name"],"additionalProperties":false,"nullable":true,"default":null},"pendingReason":{"type":"string","enum":["book","maybe"],"nullable":true,"default":null},"flightNumber":{"type":"string","nullable":true,"default":null},"booking":{"type":"object","properties":{"confirmation":{"type":"string"},"provider":{"type":"string","nullable":true},"url":{"type":"string"}},"additionalProperties":false,"nullable":true,"default":null}},"required":["activityId","title","timeWindow","location","notes","anchors","cost"],"additionalProperties":false}},"conflicts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"severity":{"type":"string","enum":["info","warn","error"]},"subjects":{"type":"array","items":{"type":"string"}},"resolutions":{"type":"array","items":{"type":"string"}},"description":{"type":"string"}},"required":["id","kind","severity","subjects","description","resolutions"],"additionalProperties":false}},"dismissedConflictIds":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string"},"unscheduledCostSubtotal":{"type":"integer"},"tripCostTotal":{"type":"integer"},"budgetRemaining":{"type":"integer","nullable":true}},"required":["tripId","name","status","startDate","currency","budget","members","days","backlog","activities","conflicts","dismissedConflictIds","createdAt","unscheduledCostSubtotal","tripCostTotal","budgetRemaining"],"additionalProperties":false}}}},"4XX":{"description":"One envelope for every failure: `{ error: { code, message, details? } }`. 401 carries `WWW-Authenticate: Bearer`; 429 carries `Retry-After`."}}}},"/v1/trips/{tripId}/history/revert":{"post":{"summary":"Return a trip to how it stood at a past revision, recorded as a new change","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://caesura.today/api/v1/trips/YOUR_TRIP_ID/history/revert' \\\n  -H 'Authorization: Bearer tc_YOUR_TOKEN' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n  \"toSeq\": 0\n}'"},{"lang":"JavaScript","label":"JavaScript (fetch)","source":"const response = await fetch(\"https://caesura.today/api/v1/trips/YOUR_TRIP_ID/history/revert\", {\n  method: \"POST\",\n  headers: {\n    Authorization: \"Bearer tc_YOUR_TOKEN\",\n    \"Content-Type\": \"application/json\",\n  },\n  body: JSON.stringify({\n    \"toSeq\": 0\n  }),\n});\nconst data = await response.json();"},{"lang":"Python","label":"Python (requests)","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://caesura.today/api/v1/trips/YOUR_TRIP_ID/history/revert\",\n    headers={\"Authorization\": \"Bearer tc_YOUR_TOKEN\"},\n    json={\"toSeq\": 0},\n)\ndata = response.json()"}],"description":"Requires the `trips:write` scope, or `current:write`. Requires at least the `editor` role on the trip.","security":[{"bearerAuth":["trips:write"]},{"bearerAuth":["current:write"]}],"parameters":[{"name":"tripId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"toSeq":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"required":["toSeq"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"tripId":{"type":"string","format":"uuid"},"name":{"type":"string"},"status":{"type":"string","enum":["active","deleted"]},"startDate":{"type":"string","nullable":true},"currency":{"type":"string"},"budget":{"type":"object","properties":{"amountMinor":{"type":"integer","minimum":0},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"],"additionalProperties":false,"nullable":true},"members":{"minItems":1,"type":"array","items":{"type":"object","properties":{"userId":{"type":"string","minLength":1},"role":{"type":"string","enum":["viewer","suggester","editor","owner"]},"travelling":{"type":"boolean"}},"required":["userId","role"],"additionalProperties":false}},"forkedFrom":{"type":"object","properties":{"tripId":{"type":"string","format":"uuid"},"atSeq":{"type":"integer","minimum":1},"name":{"type":"string","minLength":1,"maxLength":200}},"required":["tripId","atSeq","name"],"additionalProperties":false,"nullable":true,"default":null},"pace":{"type":"string","enum":["slow","balanced","packed"],"nullable":true,"default":null},"tags":{"type":"array","items":{"type":"string","enum":["meal","outdoors","drinks","nightlife","museum","sight","beach","shopping","show","tour","wellness","sports"]},"default":[]},"days":{"type":"array","items":{"type":"object","properties":{"dayId":{"type":"string","format":"uuid"},"activityIds":{"type":"array","items":{"type":"string","format":"uuid"}},"date":{"type":"string","nullable":true},"costSubtotal":{"type":"integer"}},"required":["dayId","activityIds","date","costSubtotal"],"additionalProperties":false}},"backlog":{"type":"array","items":{"type":"string","format":"uuid"}},"parkedFrom":{"type":"object","additionalProperties":{"type":"string","format":"uuid"}},"activities":{"type":"object","additionalProperties":{"type":"object","properties":{"activityId":{"type":"string","format":"uuid"},"title":{"type":"string"},"timeWindow":{"type":"object","properties":{"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["start","end"],"additionalProperties":false,"nullable":true},"location":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"lat":{"type":"number","minimum":-90,"maximum":90,"description":"Send with lng, or omit both. When omitted on a v1 write, the server geocodes `address`, then `name`."},"lng":{"type":"number","minimum":-180,"maximum":180,"description":"Send with lat, or omit both."},"countryCode":{"type":"string","pattern":"^[A-Z]{2}$"},"city":{"type":"string","minLength":1,"maxLength":200},"area":{"type":"string","minLength":1,"maxLength":200},"precision":{"type":"string","enum":["venue","area","city"],"description":"What the coordinates describe: a `venue`, an `area` or a `city`. Requires `lat` and `lng` — sent without them it is refused (\"precision requires coordinates\")."},"verified":{"type":"boolean","enum":[false],"description":"`false` when no geocoder confirmed the coordinates (an assistant's guess). Absent = unknown. Requires `lat` and `lng`."},"address":{"type":"object","properties":{"countryCode":{"type":"string","pattern":"^[A-Z]{2}$","description":"ISO 3166-1 alpha-2, uppercase. Decides how the other fields are read."},"lines":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"description":"Street-level part, in the country's own order, e.g. [\"Hauptstraße 5\"] or [\"1-2-3 Nishi-Azabu\"]."},"dependentLocality":{"type":"string","minLength":1,"maxLength":200,"description":"District, neighbourhood or suburb when it is part of the postal address."},"locality":{"type":"string","minLength":1,"maxLength":200,"description":"City, town or post town."},"administrativeArea":{"type":"string","minLength":1,"maxLength":200,"description":"State, province, prefecture or region."},"postalCode":{"type":"string","minLength":1,"maxLength":20,"description":"A string: keeps leading zeros and letters."}},"required":["countryCode","lines"],"additionalProperties":false}},"required":["name"],"additionalProperties":false,"nullable":true},"notes":{"type":"string","nullable":true},"anchors":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["dayOfWeek"]},"days":{"minItems":1,"type":"array","items":{"type":"string","enum":["mon","tue","wed","thu","fri","sat","sun"]}}},"required":["kind","days"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["dateRange"]},"from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["kind","from","to"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["timeOfDay"]},"window":{"type":"object","properties":{"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["start","end"],"additionalProperties":false}},"required":["kind","window"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["publicHoliday"]},"country":{"type":"string","pattern":"^[A-Z]{2}$"}},"required":["kind","country"],"additionalProperties":false}]}},"kind":{"type":"string","enum":["planned","pending","transit"],"default":"planned"},"tags":{"type":"array","items":{"type":"string","enum":["meal","lodging","ticketed","outdoors","drinks","nightlife","museum","sight","beach","shopping","show","tour","wellness","sports"]},"default":[]},"cost":{"type":"object","properties":{"amountMinor":{"type":"integer","minimum":0},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"],"additionalProperties":false,"nullable":true,"description":"Price for one person, in the trip's currency. A stop's total is this times its headcount: the people in `participants`, or every traveller on the trip when `participants` is empty. A `pending` stop's cost is an estimate; a `planned` or `transit` stop's is committed."},"bookedBy":{"type":"string","nullable":true,"default":null},"participants":{"type":"array","items":{"type":"string"},"default":[]},"addedBy":{"type":"string","nullable":true,"default":null},"mode":{"type":"string","enum":["walk","bus","train","flight","ferry","car","bike"],"nullable":true,"default":null},"endLocation":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"lat":{"type":"number","minimum":-90,"maximum":90,"description":"Send with lng, or omit both. When omitted on a v1 write, the server geocodes `address`, then `name`."},"lng":{"type":"number","minimum":-180,"maximum":180,"description":"Send with lat, or omit both."},"countryCode":{"type":"string","pattern":"^[A-Z]{2}$"},"city":{"type":"string","minLength":1,"maxLength":200},"area":{"type":"string","minLength":1,"maxLength":200},"precision":{"type":"string","enum":["venue","area","city"],"description":"What the coordinates describe: a `venue`, an `area` or a `city`. Requires `lat` and `lng` — sent without them it is refused (\"precision requires coordinates\")."},"verified":{"type":"boolean","enum":[false],"description":"`false` when no geocoder confirmed the coordinates (an assistant's guess). Absent = unknown. Requires `lat` and `lng`."},"address":{"type":"object","properties":{"countryCode":{"type":"string","pattern":"^[A-Z]{2}$","description":"ISO 3166-1 alpha-2, uppercase. Decides how the other fields are read."},"lines":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"description":"Street-level part, in the country's own order, e.g. [\"Hauptstraße 5\"] or [\"1-2-3 Nishi-Azabu\"]."},"dependentLocality":{"type":"string","minLength":1,"maxLength":200,"description":"District, neighbourhood or suburb when it is part of the postal address."},"locality":{"type":"string","minLength":1,"maxLength":200,"description":"City, town or post town."},"administrativeArea":{"type":"string","minLength":1,"maxLength":200,"description":"State, province, prefecture or region."},"postalCode":{"type":"string","minLength":1,"maxLength":20,"description":"A string: keeps leading zeros and letters."}},"required":["countryCode","lines"],"additionalProperties":false}},"required":["name"],"additionalProperties":false,"nullable":true,"default":null},"pendingReason":{"type":"string","enum":["book","maybe"],"nullable":true,"default":null},"flightNumber":{"type":"string","nullable":true,"default":null},"booking":{"type":"object","properties":{"confirmation":{"type":"string"},"provider":{"type":"string","nullable":true},"url":{"type":"string"}},"additionalProperties":false,"nullable":true,"default":null}},"required":["activityId","title","timeWindow","location","notes","anchors","cost"],"additionalProperties":false}},"conflicts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"severity":{"type":"string","enum":["info","warn","error"]},"subjects":{"type":"array","items":{"type":"string"}},"resolutions":{"type":"array","items":{"type":"string"}},"description":{"type":"string"}},"required":["id","kind","severity","subjects","description","resolutions"],"additionalProperties":false}},"dismissedConflictIds":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string"},"unscheduledCostSubtotal":{"type":"integer"},"tripCostTotal":{"type":"integer"},"budgetRemaining":{"type":"integer","nullable":true}},"required":["tripId","name","status","startDate","currency","budget","members","days","backlog","activities","conflicts","dismissedConflictIds","createdAt","unscheduledCostSubtotal","tripCostTotal","budgetRemaining"],"additionalProperties":false}}}},"4XX":{"description":"One envelope for every failure: `{ error: { code, message, details? } }`. 401 carries `WWW-Authenticate: Bearer`; 429 carries `Retry-After`."}}}},"/v1/trips/{tripId}/history":{"get":{"summary":"List a trip's change history, newest first, and whether undo or redo is possible","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://caesura.today/api/v1/trips/YOUR_TRIP_ID/history' \\\n  -H 'Authorization: Bearer tc_YOUR_TOKEN'"},{"lang":"JavaScript","label":"JavaScript (fetch)","source":"const response = await fetch(\"https://caesura.today/api/v1/trips/YOUR_TRIP_ID/history\", {\n  method: \"GET\",\n  headers: {\n    Authorization: \"Bearer tc_YOUR_TOKEN\",\n  },\n});\nconst data = await response.json();"},{"lang":"Python","label":"Python (requests)","source":"import requests\n\nresponse = requests.request(\n    \"GET\",\n    \"https://caesura.today/api/v1/trips/YOUR_TRIP_ID/history\",\n    headers={\"Authorization\": \"Bearer tc_YOUR_TOKEN\"},\n)\ndata = response.json()"}],"description":"Requires the `trips:read` scope, or `current:read`. Requires at least the `viewer` role on the trip.","security":[{"bearerAuth":["trips:read"]},{"bearerAuth":["current:read"]}],"parameters":[{"name":"tripId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"tripId":{"type":"string","format":"uuid"},"entries":{"type":"array","items":{"type":"object","properties":{"batchId":{"type":"string","format":"uuid"},"fromSeq":{"type":"integer","minimum":0,"exclusiveMinimum":true},"toSeq":{"type":"integer","minimum":0,"exclusiveMinimum":true},"actorId":{"type":"string","minLength":1},"occurredAt":{"type":"string"},"origin":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["user"]}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["undo"]},"undoesBatchId":{"type":"string","format":"uuid"}},"required":["kind","undoesBatchId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["redo"]},"redoesBatchId":{"type":"string","format":"uuid"}},"required":["kind","redoesBatchId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["revert"]},"toSeq":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"required":["kind","toSeq"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["suggestion"]},"suggestionId":{"type":"string","format":"uuid"},"changeId":{"type":"string","format":"uuid"},"authorId":{"type":"string","minLength":1},"via":{"type":"string","enum":["assistant"]}},"required":["kind","suggestionId","changeId","authorId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["suggestions"]},"changes":{"minItems":1,"type":"array","items":{"type":"object","properties":{"suggestionId":{"type":"string","format":"uuid"},"changeId":{"type":"string","format":"uuid"}},"required":["suggestionId","changeId"],"additionalProperties":false}},"authorIds":{"minItems":1,"type":"array","items":{"type":"string","minLength":1}},"via":{"type":"string","enum":["assistant"]}},"required":["kind","changes","authorIds"],"additionalProperties":false}]},"undone":{"type":"boolean"},"pageId":{"type":"string","format":"uuid"},"pageOnly":{"type":"boolean","enum":[true]},"description":{"type":"string"}},"required":["batchId","fromSeq","toSeq","actorId","occurredAt","origin","description","undone"],"additionalProperties":false}},"canUndo":{"type":"boolean"},"canRedo":{"type":"boolean"}},"required":["tripId","entries","canUndo","canRedo"],"additionalProperties":false}}}},"4XX":{"description":"One envelope for every failure: `{ error: { code, message, details? } }`. 401 carries `WWW-Authenticate: Bearer`; 429 carries `Retry-After`."}}}},"/v1/trips/{tripId}/history/undo":{"post":{"summary":"Undo the most recent change to a trip","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://caesura.today/api/v1/trips/YOUR_TRIP_ID/history/undo' \\\n  -H 'Authorization: Bearer tc_YOUR_TOKEN'"},{"lang":"JavaScript","label":"JavaScript (fetch)","source":"const response = await fetch(\"https://caesura.today/api/v1/trips/YOUR_TRIP_ID/history/undo\", {\n  method: \"POST\",\n  headers: {\n    Authorization: \"Bearer tc_YOUR_TOKEN\",\n  },\n});\nconst data = await response.json();"},{"lang":"Python","label":"Python (requests)","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://caesura.today/api/v1/trips/YOUR_TRIP_ID/history/undo\",\n    headers={\"Authorization\": \"Bearer tc_YOUR_TOKEN\"},\n)\ndata = response.json()"}],"description":"Requires the `trips:write` scope, or `current:write`. Requires at least the `editor` role on the trip.","security":[{"bearerAuth":["trips:write"]},{"bearerAuth":["current:write"]}],"parameters":[{"name":"tripId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"tripId":{"type":"string","format":"uuid"},"name":{"type":"string"},"status":{"type":"string","enum":["active","deleted"]},"startDate":{"type":"string","nullable":true},"currency":{"type":"string"},"budget":{"type":"object","properties":{"amountMinor":{"type":"integer","minimum":0},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"],"additionalProperties":false,"nullable":true},"members":{"minItems":1,"type":"array","items":{"type":"object","properties":{"userId":{"type":"string","minLength":1},"role":{"type":"string","enum":["viewer","suggester","editor","owner"]},"travelling":{"type":"boolean"}},"required":["userId","role"],"additionalProperties":false}},"forkedFrom":{"type":"object","properties":{"tripId":{"type":"string","format":"uuid"},"atSeq":{"type":"integer","minimum":1},"name":{"type":"string","minLength":1,"maxLength":200}},"required":["tripId","atSeq","name"],"additionalProperties":false,"nullable":true,"default":null},"pace":{"type":"string","enum":["slow","balanced","packed"],"nullable":true,"default":null},"tags":{"type":"array","items":{"type":"string","enum":["meal","outdoors","drinks","nightlife","museum","sight","beach","shopping","show","tour","wellness","sports"]},"default":[]},"days":{"type":"array","items":{"type":"object","properties":{"dayId":{"type":"string","format":"uuid"},"activityIds":{"type":"array","items":{"type":"string","format":"uuid"}},"date":{"type":"string","nullable":true},"costSubtotal":{"type":"integer"}},"required":["dayId","activityIds","date","costSubtotal"],"additionalProperties":false}},"backlog":{"type":"array","items":{"type":"string","format":"uuid"}},"parkedFrom":{"type":"object","additionalProperties":{"type":"string","format":"uuid"}},"activities":{"type":"object","additionalProperties":{"type":"object","properties":{"activityId":{"type":"string","format":"uuid"},"title":{"type":"string"},"timeWindow":{"type":"object","properties":{"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["start","end"],"additionalProperties":false,"nullable":true},"location":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"lat":{"type":"number","minimum":-90,"maximum":90,"description":"Send with lng, or omit both. When omitted on a v1 write, the server geocodes `address`, then `name`."},"lng":{"type":"number","minimum":-180,"maximum":180,"description":"Send with lat, or omit both."},"countryCode":{"type":"string","pattern":"^[A-Z]{2}$"},"city":{"type":"string","minLength":1,"maxLength":200},"area":{"type":"string","minLength":1,"maxLength":200},"precision":{"type":"string","enum":["venue","area","city"],"description":"What the coordinates describe: a `venue`, an `area` or a `city`. Requires `lat` and `lng` — sent without them it is refused (\"precision requires coordinates\")."},"verified":{"type":"boolean","enum":[false],"description":"`false` when no geocoder confirmed the coordinates (an assistant's guess). Absent = unknown. Requires `lat` and `lng`."},"address":{"type":"object","properties":{"countryCode":{"type":"string","pattern":"^[A-Z]{2}$","description":"ISO 3166-1 alpha-2, uppercase. Decides how the other fields are read."},"lines":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"description":"Street-level part, in the country's own order, e.g. [\"Hauptstraße 5\"] or [\"1-2-3 Nishi-Azabu\"]."},"dependentLocality":{"type":"string","minLength":1,"maxLength":200,"description":"District, neighbourhood or suburb when it is part of the postal address."},"locality":{"type":"string","minLength":1,"maxLength":200,"description":"City, town or post town."},"administrativeArea":{"type":"string","minLength":1,"maxLength":200,"description":"State, province, prefecture or region."},"postalCode":{"type":"string","minLength":1,"maxLength":20,"description":"A string: keeps leading zeros and letters."}},"required":["countryCode","lines"],"additionalProperties":false}},"required":["name"],"additionalProperties":false,"nullable":true},"notes":{"type":"string","nullable":true},"anchors":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["dayOfWeek"]},"days":{"minItems":1,"type":"array","items":{"type":"string","enum":["mon","tue","wed","thu","fri","sat","sun"]}}},"required":["kind","days"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["dateRange"]},"from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["kind","from","to"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["timeOfDay"]},"window":{"type":"object","properties":{"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["start","end"],"additionalProperties":false}},"required":["kind","window"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["publicHoliday"]},"country":{"type":"string","pattern":"^[A-Z]{2}$"}},"required":["kind","country"],"additionalProperties":false}]}},"kind":{"type":"string","enum":["planned","pending","transit"],"default":"planned"},"tags":{"type":"array","items":{"type":"string","enum":["meal","lodging","ticketed","outdoors","drinks","nightlife","museum","sight","beach","shopping","show","tour","wellness","sports"]},"default":[]},"cost":{"type":"object","properties":{"amountMinor":{"type":"integer","minimum":0},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"],"additionalProperties":false,"nullable":true,"description":"Price for one person, in the trip's currency. A stop's total is this times its headcount: the people in `participants`, or every traveller on the trip when `participants` is empty. A `pending` stop's cost is an estimate; a `planned` or `transit` stop's is committed."},"bookedBy":{"type":"string","nullable":true,"default":null},"participants":{"type":"array","items":{"type":"string"},"default":[]},"addedBy":{"type":"string","nullable":true,"default":null},"mode":{"type":"string","enum":["walk","bus","train","flight","ferry","car","bike"],"nullable":true,"default":null},"endLocation":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"lat":{"type":"number","minimum":-90,"maximum":90,"description":"Send with lng, or omit both. When omitted on a v1 write, the server geocodes `address`, then `name`."},"lng":{"type":"number","minimum":-180,"maximum":180,"description":"Send with lat, or omit both."},"countryCode":{"type":"string","pattern":"^[A-Z]{2}$"},"city":{"type":"string","minLength":1,"maxLength":200},"area":{"type":"string","minLength":1,"maxLength":200},"precision":{"type":"string","enum":["venue","area","city"],"description":"What the coordinates describe: a `venue`, an `area` or a `city`. Requires `lat` and `lng` — sent without them it is refused (\"precision requires coordinates\")."},"verified":{"type":"boolean","enum":[false],"description":"`false` when no geocoder confirmed the coordinates (an assistant's guess). Absent = unknown. Requires `lat` and `lng`."},"address":{"type":"object","properties":{"countryCode":{"type":"string","pattern":"^[A-Z]{2}$","description":"ISO 3166-1 alpha-2, uppercase. Decides how the other fields are read."},"lines":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"description":"Street-level part, in the country's own order, e.g. [\"Hauptstraße 5\"] or [\"1-2-3 Nishi-Azabu\"]."},"dependentLocality":{"type":"string","minLength":1,"maxLength":200,"description":"District, neighbourhood or suburb when it is part of the postal address."},"locality":{"type":"string","minLength":1,"maxLength":200,"description":"City, town or post town."},"administrativeArea":{"type":"string","minLength":1,"maxLength":200,"description":"State, province, prefecture or region."},"postalCode":{"type":"string","minLength":1,"maxLength":20,"description":"A string: keeps leading zeros and letters."}},"required":["countryCode","lines"],"additionalProperties":false}},"required":["name"],"additionalProperties":false,"nullable":true,"default":null},"pendingReason":{"type":"string","enum":["book","maybe"],"nullable":true,"default":null},"flightNumber":{"type":"string","nullable":true,"default":null},"booking":{"type":"object","properties":{"confirmation":{"type":"string"},"provider":{"type":"string","nullable":true},"url":{"type":"string"}},"additionalProperties":false,"nullable":true,"default":null}},"required":["activityId","title","timeWindow","location","notes","anchors","cost"],"additionalProperties":false}},"conflicts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"severity":{"type":"string","enum":["info","warn","error"]},"subjects":{"type":"array","items":{"type":"string"}},"resolutions":{"type":"array","items":{"type":"string"}},"description":{"type":"string"}},"required":["id","kind","severity","subjects","description","resolutions"],"additionalProperties":false}},"dismissedConflictIds":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string"},"unscheduledCostSubtotal":{"type":"integer"},"tripCostTotal":{"type":"integer"},"budgetRemaining":{"type":"integer","nullable":true}},"required":["tripId","name","status","startDate","currency","budget","members","days","backlog","activities","conflicts","dismissedConflictIds","createdAt","unscheduledCostSubtotal","tripCostTotal","budgetRemaining"],"additionalProperties":false}}}},"4XX":{"description":"One envelope for every failure: `{ error: { code, message, details? } }`. 401 carries `WWW-Authenticate: Bearer`; 429 carries `Retry-After`."}}}},"/v1/trips/{tripId}/invites/{inviteId}":{"delete":{"summary":"Revoke an invite to a trip","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X DELETE 'https://caesura.today/api/v1/trips/YOUR_TRIP_ID/invites/YOUR_INVITE_ID' \\\n  -H 'Authorization: Bearer tc_YOUR_TOKEN'"},{"lang":"JavaScript","label":"JavaScript (fetch)","source":"const response = await fetch(\"https://caesura.today/api/v1/trips/YOUR_TRIP_ID/invites/YOUR_INVITE_ID\", {\n  method: \"DELETE\",\n  headers: {\n    Authorization: \"Bearer tc_YOUR_TOKEN\",\n  },\n});\nconst data = await response.json();"},{"lang":"Python","label":"Python (requests)","source":"import requests\n\nresponse = requests.request(\n    \"DELETE\",\n    \"https://caesura.today/api/v1/trips/YOUR_TRIP_ID/invites/YOUR_INVITE_ID\",\n    headers={\"Authorization\": \"Bearer tc_YOUR_TOKEN\"},\n)\ndata = response.json()"}],"description":"Requires the `sharing:write` scope. Requires at least the `owner` role on the trip.","security":[{"bearerAuth":["sharing:write"]}],"parameters":[{"name":"tripId","in":"path","required":true,"schema":{"type":"string"}},{"name":"inviteId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"inviteId":{"type":"string","format":"uuid"},"tripId":{"type":"string","format":"uuid"},"email":{"type":"string","format":"email","nullable":true},"role":{"type":"string","enum":["viewer","suggester","editor"]},"status":{"type":"string","enum":["pending","accepted","revoked"]},"token":{"type":"string","minLength":1},"invitedBy":{"type":"string","minLength":1},"createdAt":{"type":"string"},"acceptedBy":{"type":"string","minLength":1,"nullable":true},"acceptedAt":{"type":"string","nullable":true},"revokedAt":{"type":"string","nullable":true},"travelling":{"type":"boolean","default":true}},"required":["inviteId","tripId","email","role","status","token","invitedBy","createdAt","acceptedBy","acceptedAt","revokedAt"],"additionalProperties":false}}}},"4XX":{"description":"One envelope for every failure: `{ error: { code, message, details? } }`. 401 carries `WWW-Authenticate: Bearer`; 429 carries `Retry-After`."}}}},"/v1/trips/{tripId}/invites":{"get":{"summary":"List the invites sent for a trip","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://caesura.today/api/v1/trips/YOUR_TRIP_ID/invites' \\\n  -H 'Authorization: Bearer tc_YOUR_TOKEN'"},{"lang":"JavaScript","label":"JavaScript (fetch)","source":"const response = await fetch(\"https://caesura.today/api/v1/trips/YOUR_TRIP_ID/invites\", {\n  method: \"GET\",\n  headers: {\n    Authorization: \"Bearer tc_YOUR_TOKEN\",\n  },\n});\nconst data = await response.json();"},{"lang":"Python","label":"Python (requests)","source":"import requests\n\nresponse = requests.request(\n    \"GET\",\n    \"https://caesura.today/api/v1/trips/YOUR_TRIP_ID/invites\",\n    headers={\"Authorization\": \"Bearer tc_YOUR_TOKEN\"},\n)\ndata = response.json()"}],"description":"Requires the `trips:read` scope. Requires at least the `owner` role on the trip.","security":[{"bearerAuth":["trips:read"]}],"parameters":[{"name":"tripId","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"description":"1 to 200. A value outside that range is refused, never clamped.","schema":{"type":"integer","minimum":1,"maximum":200}},{"name":"cursor","in":"query","required":false,"description":"Opaque. Pass back the `nextCursor` of the previous page.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","required":["items","nextCursor"],"properties":{"items":{"type":"array","items":{"type":"object","properties":{"inviteId":{"type":"string","format":"uuid"},"tripId":{"type":"string","format":"uuid"},"email":{"type":"string","format":"email","nullable":true},"role":{"type":"string","enum":["viewer","suggester","editor"]},"status":{"type":"string","enum":["pending","accepted","revoked"]},"token":{"type":"string","minLength":1},"invitedBy":{"type":"string","minLength":1},"createdAt":{"type":"string"},"acceptedBy":{"type":"string","minLength":1,"nullable":true},"acceptedAt":{"type":"string","nullable":true},"revokedAt":{"type":"string","nullable":true},"travelling":{"type":"boolean","default":true}},"required":["inviteId","tripId","email","role","status","token","invitedBy","createdAt","acceptedBy","acceptedAt","revokedAt"],"additionalProperties":false}},"nextCursor":{"type":"string","nullable":true}}}}}},"4XX":{"description":"One envelope for every failure: `{ error: { code, message, details? } }`. 401 carries `WWW-Authenticate: Bearer`; 429 carries `Retry-After`."}}},"post":{"summary":"Create an invite to a trip for a given role, optionally addressed to an email","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://caesura.today/api/v1/trips/YOUR_TRIP_ID/invites' \\\n  -H 'Authorization: Bearer tc_YOUR_TOKEN' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n  \"email\": \"string\",\n  \"role\": \"viewer\"\n}'"},{"lang":"JavaScript","label":"JavaScript (fetch)","source":"const response = await fetch(\"https://caesura.today/api/v1/trips/YOUR_TRIP_ID/invites\", {\n  method: \"POST\",\n  headers: {\n    Authorization: \"Bearer tc_YOUR_TOKEN\",\n    \"Content-Type\": \"application/json\",\n  },\n  body: JSON.stringify({\n    \"email\": \"string\",\n    \"role\": \"viewer\"\n  }),\n});\nconst data = await response.json();"},{"lang":"Python","label":"Python (requests)","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://caesura.today/api/v1/trips/YOUR_TRIP_ID/invites\",\n    headers={\"Authorization\": \"Bearer tc_YOUR_TOKEN\"},\n    json={\"email\": \"string\", \"role\": \"viewer\"},\n)\ndata = response.json()"}],"description":"Requires the `sharing:write` scope. Requires at least the `owner` role on the trip.","security":[{"bearerAuth":["sharing:write"]}],"parameters":[{"name":"tripId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","maxLength":320,"format":"email","nullable":true},"role":{"type":"string","enum":["viewer","suggester","editor"]},"travelling":{"type":"boolean"}},"required":["email","role"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"inviteId":{"type":"string","format":"uuid"},"tripId":{"type":"string","format":"uuid"},"email":{"type":"string","format":"email","nullable":true},"role":{"type":"string","enum":["viewer","suggester","editor"]},"status":{"type":"string","enum":["pending","accepted","revoked"]},"token":{"type":"string","minLength":1},"invitedBy":{"type":"string","minLength":1},"createdAt":{"type":"string"},"acceptedBy":{"type":"string","minLength":1,"nullable":true},"acceptedAt":{"type":"string","nullable":true},"revokedAt":{"type":"string","nullable":true},"travelling":{"type":"boolean","default":true}},"required":["inviteId","tripId","email","role","status","token","invitedBy","createdAt","acceptedBy","acceptedAt","revokedAt"],"additionalProperties":false}}}},"4XX":{"description":"One envelope for every failure: `{ error: { code, message, details? } }`. 401 carries `WWW-Authenticate: Bearer`; 429 carries `Retry-After`."}}}},"/v1/trips/{tripId}/members":{"get":{"summary":"List the people on a trip and their roles","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://caesura.today/api/v1/trips/YOUR_TRIP_ID/members' \\\n  -H 'Authorization: Bearer tc_YOUR_TOKEN'"},{"lang":"JavaScript","label":"JavaScript (fetch)","source":"const response = await fetch(\"https://caesura.today/api/v1/trips/YOUR_TRIP_ID/members\", {\n  method: \"GET\",\n  headers: {\n    Authorization: \"Bearer tc_YOUR_TOKEN\",\n  },\n});\nconst data = await response.json();"},{"lang":"Python","label":"Python (requests)","source":"import requests\n\nresponse = requests.request(\n    \"GET\",\n    \"https://caesura.today/api/v1/trips/YOUR_TRIP_ID/members\",\n    headers={\"Authorization\": \"Bearer tc_YOUR_TOKEN\"},\n)\ndata = response.json()"}],"description":"Requires the `trips:read` scope. Requires at least the `viewer` role on the trip.","security":[{"bearerAuth":["trips:read"]}],"parameters":[{"name":"tripId","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"description":"1 to 200. A value outside that range is refused, never clamped.","schema":{"type":"integer","minimum":1,"maximum":200}},{"name":"cursor","in":"query","required":false,"description":"Opaque. Pass back the `nextCursor` of the previous page.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","required":["items","nextCursor"],"properties":{"items":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string","minLength":1},"role":{"type":"string","enum":["viewer","suggester","editor","owner"]},"travelling":{"type":"boolean"}},"required":["userId","role"],"additionalProperties":false}},"nextCursor":{"type":"string","nullable":true}}}}}},"4XX":{"description":"One envelope for every failure: `{ error: { code, message, details? } }`. 401 carries `WWW-Authenticate: Bearer`; 429 carries `Retry-After`."}}}},"/v1/trips/{tripId}/pages/{pageId}":{"get":{"summary":"Get one Notebook page on a trip","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://caesura.today/api/v1/trips/YOUR_TRIP_ID/pages/YOUR_PAGE_ID' \\\n  -H 'Authorization: Bearer tc_YOUR_TOKEN'"},{"lang":"JavaScript","label":"JavaScript (fetch)","source":"const response = await fetch(\"https://caesura.today/api/v1/trips/YOUR_TRIP_ID/pages/YOUR_PAGE_ID\", {\n  method: \"GET\",\n  headers: {\n    Authorization: \"Bearer tc_YOUR_TOKEN\",\n  },\n});\nconst data = await response.json();"},{"lang":"Python","label":"Python (requests)","source":"import requests\n\nresponse = requests.request(\n    \"GET\",\n    \"https://caesura.today/api/v1/trips/YOUR_TRIP_ID/pages/YOUR_PAGE_ID\",\n    headers={\"Authorization\": \"Bearer tc_YOUR_TOKEN\"},\n)\ndata = response.json()"}],"description":"Requires the `notebook:read` scope, or `current:read`. Requires at least the `viewer` role on the trip.","security":[{"bearerAuth":["notebook:read"]},{"bearerAuth":["current:read"]}],"parameters":[{"name":"tripId","in":"path","required":true,"schema":{"type":"string"}},{"name":"pageId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"tripId":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":1},"context":{"type":"object","properties":{"tripId":{"type":"string","format":"uuid"},"dateScope":{"anyOf":[{"type":"string","enum":["all"]},{"type":"string","enum":["today"]},{"type":"object","properties":{"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["date"],"additionalProperties":false}]}},"required":["tripId"],"additionalProperties":false},"content":{"type":"object","properties":{"type":{"type":"string","enum":["doc"]},"content":{"type":"array","items":{},"default":[]}},"required":["type"],"additionalProperties":true},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"actorId":{"type":"string","minLength":1},"seedKey":{"type":"string","minLength":1,"maxLength":100},"kind":{"type":"string","enum":["overview"]}},"required":["id","tripId","title","context","content","createdAt","updatedAt","actorId"],"additionalProperties":false}}}},"4XX":{"description":"One envelope for every failure: `{ error: { code, message, details? } }`. 401 carries `WWW-Authenticate: Bearer`; 429 carries `Retry-After`."}}},"patch":{"summary":"Edit a Notebook page on a trip","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X PATCH 'https://caesura.today/api/v1/trips/YOUR_TRIP_ID/pages/YOUR_PAGE_ID' \\\n  -H 'Authorization: Bearer tc_YOUR_TOKEN' \\\n  -H 'Content-Type: application/json' \\\n  -d '{}'"},{"lang":"JavaScript","label":"JavaScript (fetch)","source":"const response = await fetch(\"https://caesura.today/api/v1/trips/YOUR_TRIP_ID/pages/YOUR_PAGE_ID\", {\n  method: \"PATCH\",\n  headers: {\n    Authorization: \"Bearer tc_YOUR_TOKEN\",\n    \"Content-Type\": \"application/json\",\n  },\n  body: JSON.stringify({}),\n});\nconst data = await response.json();"},{"lang":"Python","label":"Python (requests)","source":"import requests\n\nresponse = requests.request(\n    \"PATCH\",\n    \"https://caesura.today/api/v1/trips/YOUR_TRIP_ID/pages/YOUR_PAGE_ID\",\n    headers={\"Authorization\": \"Bearer tc_YOUR_TOKEN\"},\n    json={},\n)\ndata = response.json()"}],"description":"Requires the `notebook:write` scope. Requires at least the `editor` role on the trip.","security":[{"bearerAuth":["notebook:write"]}],"parameters":[{"name":"tripId","in":"path","required":true,"schema":{"type":"string"}},{"name":"pageId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"context":{"type":"object","properties":{"tripId":{"type":"string","format":"uuid"},"dateScope":{"anyOf":[{"type":"string","enum":["all"]},{"type":"string","enum":["today"]},{"type":"object","properties":{"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["date"],"additionalProperties":false}]}},"required":["tripId"],"additionalProperties":false},"content":{"type":"object","properties":{"v":{"type":"integer","minimum":0,"exclusiveMinimum":true,"default":1},"type":{"type":"string","enum":["doc"]},"content":{"type":"array","items":{"$ref":"#/components/schemas/PageNode"},"default":[]}},"required":["type"],"additionalProperties":false}},"additionalProperties":false}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"tripId":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":1},"context":{"type":"object","properties":{"tripId":{"type":"string","format":"uuid"},"dateScope":{"anyOf":[{"type":"string","enum":["all"]},{"type":"string","enum":["today"]},{"type":"object","properties":{"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["date"],"additionalProperties":false}]}},"required":["tripId"],"additionalProperties":false},"content":{"type":"object","properties":{"type":{"type":"string","enum":["doc"]},"content":{"type":"array","items":{},"default":[]}},"required":["type"],"additionalProperties":true},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"actorId":{"type":"string","minLength":1},"seedKey":{"type":"string","minLength":1,"maxLength":100},"kind":{"type":"string","enum":["overview"]}},"required":["id","tripId","title","context","content","createdAt","updatedAt","actorId"],"additionalProperties":false}}}},"4XX":{"description":"One envelope for every failure: `{ error: { code, message, details? } }`. 401 carries `WWW-Authenticate: Bearer`; 429 carries `Retry-After`."}}},"delete":{"summary":"Delete a Notebook page from a trip","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X DELETE 'https://caesura.today/api/v1/trips/YOUR_TRIP_ID/pages/YOUR_PAGE_ID' \\\n  -H 'Authorization: Bearer tc_YOUR_TOKEN'"},{"lang":"JavaScript","label":"JavaScript (fetch)","source":"const response = await fetch(\"https://caesura.today/api/v1/trips/YOUR_TRIP_ID/pages/YOUR_PAGE_ID\", {\n  method: \"DELETE\",\n  headers: {\n    Authorization: \"Bearer tc_YOUR_TOKEN\",\n  },\n});\nconst data = await response.json();"},{"lang":"Python","label":"Python (requests)","source":"import requests\n\nresponse = requests.request(\n    \"DELETE\",\n    \"https://caesura.today/api/v1/trips/YOUR_TRIP_ID/pages/YOUR_PAGE_ID\",\n    headers={\"Authorization\": \"Bearer tc_YOUR_TOKEN\"},\n)\ndata = response.json()"}],"description":"Requires the `notebook:write` scope. Requires at least the `editor` role on the trip.","security":[{"bearerAuth":["notebook:write"]}],"parameters":[{"name":"tripId","in":"path","required":true,"schema":{"type":"string"}},{"name":"pageId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"pageId":{"type":"string"},"deleted":{"type":"boolean","enum":[true]}},"required":["pageId","deleted"],"additionalProperties":false}}}},"4XX":{"description":"One envelope for every failure: `{ error: { code, message, details? } }`. 401 carries `WWW-Authenticate: Bearer`; 429 carries `Retry-After`."}}}},"/v1/trips/{tripId}/pages/{pageId}/shares/{shareId}":{"delete":{"summary":"Make a Notebook page private again by revoking one of its public links","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X DELETE 'https://caesura.today/api/v1/trips/YOUR_TRIP_ID/pages/YOUR_PAGE_ID/shares/YOUR_SHARE_ID' \\\n  -H 'Authorization: Bearer tc_YOUR_TOKEN'"},{"lang":"JavaScript","label":"JavaScript (fetch)","source":"const response = await fetch(\"https://caesura.today/api/v1/trips/YOUR_TRIP_ID/pages/YOUR_PAGE_ID/shares/YOUR_SHARE_ID\", {\n  method: \"DELETE\",\n  headers: {\n    Authorization: \"Bearer tc_YOUR_TOKEN\",\n  },\n});\nconst data = await response.json();"},{"lang":"Python","label":"Python (requests)","source":"import requests\n\nresponse = requests.request(\n    \"DELETE\",\n    \"https://caesura.today/api/v1/trips/YOUR_TRIP_ID/pages/YOUR_PAGE_ID/shares/YOUR_SHARE_ID\",\n    headers={\"Authorization\": \"Bearer tc_YOUR_TOKEN\"},\n)\ndata = response.json()"}],"description":"Requires the `sharing:write` scope. Requires at least the `editor` role on the trip.","security":[{"bearerAuth":["sharing:write"]}],"parameters":[{"name":"tripId","in":"path","required":true,"schema":{"type":"string"}},{"name":"pageId","in":"path","required":true,"schema":{"type":"string"}},{"name":"shareId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"shareId":{"type":"string","format":"uuid"},"tripId":{"type":"string","format":"uuid"},"pageId":{"type":"string","format":"uuid"},"token":{"type":"string","minLength":1},"createdBy":{"type":"string","minLength":1},"createdAt":{"type":"string"},"revokedAt":{"type":"string","nullable":true}},"required":["shareId","tripId","pageId","token","createdBy","createdAt","revokedAt"],"additionalProperties":false}}}},"4XX":{"description":"One envelope for every failure: `{ error: { code, message, details? } }`. 401 carries `WWW-Authenticate: Bearer`; 429 carries `Retry-After`."}}}},"/v1/trips/{tripId}/pages/{pageId}/shares":{"get":{"summary":"List a Notebook page's public links, newest first, revoked ones included","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://caesura.today/api/v1/trips/YOUR_TRIP_ID/pages/YOUR_PAGE_ID/shares' \\\n  -H 'Authorization: Bearer tc_YOUR_TOKEN'"},{"lang":"JavaScript","label":"JavaScript (fetch)","source":"const response = await fetch(\"https://caesura.today/api/v1/trips/YOUR_TRIP_ID/pages/YOUR_PAGE_ID/shares\", {\n  method: \"GET\",\n  headers: {\n    Authorization: \"Bearer tc_YOUR_TOKEN\",\n  },\n});\nconst data = await response.json();"},{"lang":"Python","label":"Python (requests)","source":"import requests\n\nresponse = requests.request(\n    \"GET\",\n    \"https://caesura.today/api/v1/trips/YOUR_TRIP_ID/pages/YOUR_PAGE_ID/shares\",\n    headers={\"Authorization\": \"Bearer tc_YOUR_TOKEN\"},\n)\ndata = response.json()"}],"description":"Requires the `trips:read` scope. Requires at least the `editor` role on the trip.","security":[{"bearerAuth":["trips:read"]}],"parameters":[{"name":"tripId","in":"path","required":true,"schema":{"type":"string"}},{"name":"pageId","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"description":"1 to 200. A value outside that range is refused, never clamped.","schema":{"type":"integer","minimum":1,"maximum":200}},{"name":"cursor","in":"query","required":false,"description":"Opaque. Pass back the `nextCursor` of the previous page.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","required":["items","nextCursor"],"properties":{"items":{"type":"array","items":{"type":"object","properties":{"shareId":{"type":"string","format":"uuid"},"tripId":{"type":"string","format":"uuid"},"pageId":{"type":"string","format":"uuid"},"token":{"type":"string","minLength":1},"createdBy":{"type":"string","minLength":1},"createdAt":{"type":"string"},"revokedAt":{"type":"string","nullable":true}},"required":["shareId","tripId","pageId","token","createdBy","createdAt","revokedAt"],"additionalProperties":false}},"nextCursor":{"type":"string","nullable":true}}}}}},"4XX":{"description":"One envelope for every failure: `{ error: { code, message, details? } }`. 401 carries `WWW-Authenticate: Bearer`; 429 carries `Retry-After`."}}},"post":{"summary":"Make a Notebook page public: a link anyone can read, showing the page as it stands","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://caesura.today/api/v1/trips/YOUR_TRIP_ID/pages/YOUR_PAGE_ID/shares' \\\n  -H 'Authorization: Bearer tc_YOUR_TOKEN'"},{"lang":"JavaScript","label":"JavaScript (fetch)","source":"const response = await fetch(\"https://caesura.today/api/v1/trips/YOUR_TRIP_ID/pages/YOUR_PAGE_ID/shares\", {\n  method: \"POST\",\n  headers: {\n    Authorization: \"Bearer tc_YOUR_TOKEN\",\n  },\n});\nconst data = await response.json();"},{"lang":"Python","label":"Python (requests)","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://caesura.today/api/v1/trips/YOUR_TRIP_ID/pages/YOUR_PAGE_ID/shares\",\n    headers={\"Authorization\": \"Bearer tc_YOUR_TOKEN\"},\n)\ndata = response.json()"}],"description":"Requires the `sharing:write` scope. Requires at least the `editor` role on the trip. Answers 422 for the seeded Bookings & confirmations, Money and During-the-trip notebooks, and for a deleted trip. A page that is already public is answered with its live link.","security":[{"bearerAuth":["sharing:write"]}],"parameters":[{"name":"tripId","in":"path","required":true,"schema":{"type":"string"}},{"name":"pageId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"shareId":{"type":"string","format":"uuid"},"tripId":{"type":"string","format":"uuid"},"pageId":{"type":"string","format":"uuid"},"token":{"type":"string","minLength":1},"createdBy":{"type":"string","minLength":1},"createdAt":{"type":"string"},"revokedAt":{"type":"string","nullable":true}},"required":["shareId","tripId","pageId","token","createdBy","createdAt","revokedAt"],"additionalProperties":false}}}},"4XX":{"description":"One envelope for every failure: `{ error: { code, message, details? } }`. 401 carries `WWW-Authenticate: Bearer`; 429 carries `Retry-After`."}}}},"/v1/trips/{tripId}/pages":{"get":{"summary":"List the Notebook pages on a trip","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://caesura.today/api/v1/trips/YOUR_TRIP_ID/pages' \\\n  -H 'Authorization: Bearer tc_YOUR_TOKEN'"},{"lang":"JavaScript","label":"JavaScript (fetch)","source":"const response = await fetch(\"https://caesura.today/api/v1/trips/YOUR_TRIP_ID/pages\", {\n  method: \"GET\",\n  headers: {\n    Authorization: \"Bearer tc_YOUR_TOKEN\",\n  },\n});\nconst data = await response.json();"},{"lang":"Python","label":"Python (requests)","source":"import requests\n\nresponse = requests.request(\n    \"GET\",\n    \"https://caesura.today/api/v1/trips/YOUR_TRIP_ID/pages\",\n    headers={\"Authorization\": \"Bearer tc_YOUR_TOKEN\"},\n)\ndata = response.json()"}],"description":"Requires the `notebook:read` scope, or `current:read`. Requires at least the `viewer` role on the trip.","security":[{"bearerAuth":["notebook:read"]},{"bearerAuth":["current:read"]}],"parameters":[{"name":"tripId","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"description":"1 to 200. A value outside that range is refused, never clamped.","schema":{"type":"integer","minimum":1,"maximum":200}},{"name":"cursor","in":"query","required":false,"description":"Opaque. Pass back the `nextCursor` of the previous page.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","required":["items","nextCursor"],"properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"tripId":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":1},"context":{"type":"object","properties":{"tripId":{"type":"string","format":"uuid"},"dateScope":{"anyOf":[{"type":"string","enum":["all"]},{"type":"string","enum":["today"]},{"type":"object","properties":{"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["date"],"additionalProperties":false}]}},"required":["tripId"],"additionalProperties":false},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"actorId":{"type":"string","minLength":1},"seedKey":{"type":"string","minLength":1,"maxLength":100},"kind":{"type":"string","enum":["overview"]}},"required":["id","tripId","title","context","createdAt","updatedAt","actorId"],"additionalProperties":false}},"nextCursor":{"type":"string","nullable":true}}}}}},"4XX":{"description":"One envelope for every failure: `{ error: { code, message, details? } }`. 401 carries `WWW-Authenticate: Bearer`; 429 carries `Retry-After`."}}},"post":{"summary":"Create a Notebook page on a trip","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://caesura.today/api/v1/trips/YOUR_TRIP_ID/pages' \\\n  -H 'Authorization: Bearer tc_YOUR_TOKEN' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n  \"title\": \"string\",\n  \"context\": {\n    \"tripId\": \"00000000-0000-4000-8000-000000000000\"\n  },\n  \"content\": {\n    \"type\": \"doc\"\n  }\n}'"},{"lang":"JavaScript","label":"JavaScript (fetch)","source":"const response = await fetch(\"https://caesura.today/api/v1/trips/YOUR_TRIP_ID/pages\", {\n  method: \"POST\",\n  headers: {\n    Authorization: \"Bearer tc_YOUR_TOKEN\",\n    \"Content-Type\": \"application/json\",\n  },\n  body: JSON.stringify({\n    \"title\": \"string\",\n    \"context\": {\n      \"tripId\": \"00000000-0000-4000-8000-000000000000\"\n    },\n    \"content\": {\n      \"type\": \"doc\"\n    }\n  }),\n});\nconst data = await response.json();"},{"lang":"Python","label":"Python (requests)","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://caesura.today/api/v1/trips/YOUR_TRIP_ID/pages\",\n    headers={\"Authorization\": \"Bearer tc_YOUR_TOKEN\"},\n    json={\"title\": \"string\", \"context\": {\"tripId\": \"00000000-0000-4000-8000-000000000000\"}, \"content\": {\"type\": \"doc\"}},\n)\ndata = response.json()"}],"description":"Requires the `notebook:write` scope. Requires at least the `editor` role on the trip.","security":[{"bearerAuth":["notebook:write"]}],"parameters":[{"name":"tripId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"context":{"type":"object","properties":{"tripId":{"type":"string","format":"uuid"},"dateScope":{"anyOf":[{"type":"string","enum":["all"]},{"type":"string","enum":["today"]},{"type":"object","properties":{"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["date"],"additionalProperties":false}]}},"required":["tripId"],"additionalProperties":false},"content":{"type":"object","properties":{"v":{"type":"integer","minimum":0,"exclusiveMinimum":true,"default":1},"type":{"type":"string","enum":["doc"]},"content":{"type":"array","items":{"$ref":"#/components/schemas/PageNode"},"default":[]}},"required":["type"],"additionalProperties":false}},"required":["title","context","content"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"tripId":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":1},"context":{"type":"object","properties":{"tripId":{"type":"string","format":"uuid"},"dateScope":{"anyOf":[{"type":"string","enum":["all"]},{"type":"string","enum":["today"]},{"type":"object","properties":{"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["date"],"additionalProperties":false}]}},"required":["tripId"],"additionalProperties":false},"content":{"type":"object","properties":{"type":{"type":"string","enum":["doc"]},"content":{"type":"array","items":{},"default":[]}},"required":["type"],"additionalProperties":true},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"actorId":{"type":"string","minLength":1},"seedKey":{"type":"string","minLength":1,"maxLength":100},"kind":{"type":"string","enum":["overview"]}},"required":["id","tripId","title","context","content","createdAt","updatedAt","actorId"],"additionalProperties":false}}}},"4XX":{"description":"One envelope for every failure: `{ error: { code, message, details? } }`. 401 carries `WWW-Authenticate: Bearer`; 429 carries `Retry-After`."}}}},"/v1/trips/{tripId}/playbook-applications":{"post":{"summary":"Apply a Playbook's days and stops to a trip, appended or merged, as one undoable change","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://caesura.today/api/v1/trips/YOUR_TRIP_ID/playbook-applications' \\\n  -H 'Authorization: Bearer tc_YOUR_TOKEN' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n  \"playbookId\": \"00000000-0000-4000-8000-000000000000\"\n}'"},{"lang":"JavaScript","label":"JavaScript (fetch)","source":"const response = await fetch(\"https://caesura.today/api/v1/trips/YOUR_TRIP_ID/playbook-applications\", {\n  method: \"POST\",\n  headers: {\n    Authorization: \"Bearer tc_YOUR_TOKEN\",\n    \"Content-Type\": \"application/json\",\n  },\n  body: JSON.stringify({\n    \"playbookId\": \"00000000-0000-4000-8000-000000000000\"\n  }),\n});\nconst data = await response.json();"},{"lang":"Python","label":"Python (requests)","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://caesura.today/api/v1/trips/YOUR_TRIP_ID/playbook-applications\",\n    headers={\"Authorization\": \"Bearer tc_YOUR_TOKEN\"},\n    json={\"playbookId\": \"00000000-0000-4000-8000-000000000000\"},\n)\ndata = response.json()"}],"description":"Requires the `trips:write` scope. Requires at least the `editor` role on the trip. With `placement: { mode: \"startingAt\" }`, a Playbook day that lands on an existing trip day is merged into it by start time: each timed Playbook stop goes before the first stop there that starts later (or at the end), and untimed Playbook stops go last, in the Playbook's order. The trip's existing stops never move. A day the application adds keeps the Playbook's order.","security":[{"bearerAuth":["trips:write"]}],"parameters":[{"name":"tripId","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional. A retry with the same key and the same request replays the first answer instead of running again; the same key with a different request is a 400, and one still in progress is a 409. Kept for 24 hours, per account. A 5xx is not kept.","schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"playbookId":{"type":"string","format":"uuid"},"version":{"type":"integer","minimum":1,"description":"Apply only if the Playbook is still at this `version`; otherwise 409 with `details.currentVersion`."},"placement":{"anyOf":[{"type":"object","properties":{"mode":{"type":"string","enum":["append"]}},"required":["mode"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","enum":["startingAt"]},"dayId":{"type":"string","format":"uuid","description":"A day already in the trip. The Playbook's day 0 goes onto it, day 1 onto the next, and so on."}},"required":["mode","dayId"],"additionalProperties":false}],"description":"`append` (the default) adds every Playbook day at the end of the trip. `startingAt` merges: Playbook day k goes onto the trip day k places after `dayId`, and only the days that run past the end of the trip are added. On a merged day the trip's existing stops stay first and the Playbook's stops for that day are appended after them, in the Playbook's order — never sorted by time."},"expectedTripSeq":{"type":"integer","minimum":0,"description":"Apply only if the trip still stands at this revision (the `historySeq` a previous write answered, or the newest history entry's `toSeq`); otherwise 409 with `details.currentSeq`. Checked in the same transaction as the write."}},"required":["playbookId"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success.","headers":{"Idempotent-Replayed":{"description":"`true` when this answer is a replay of an earlier request with the same Idempotency-Key.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"tripId":{"type":"string","format":"uuid"},"playbookId":{"type":"string","format":"uuid"},"playbookVersion":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"The Playbook `version` that was applied."},"dayIds":{"type":"array","items":{"type":"string","format":"uuid"},"description":"Per Playbook day, in order, the trip day it landed on — new days on an append; existing days, then any new ones, on a `startingAt` merge. Empty days included."},"createdDayIds":{"type":"array","items":{"type":"string","format":"uuid"},"description":"Only the days this application added, in order. Equal to `dayIds` on an append."},"activityIds":{"type":"array","items":{"type":"string","format":"uuid"},"description":"The new stops' ids, in the same order as the Playbook's `stops`."},"historySeq":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"The revision the trip stands at after this application (its history entry's `toSeq`). The whole application is that one entry, so one undo removes all of it."},"warnings":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"code":{"type":"string","enum":["conflict"]},"conflictId":{"type":"string"},"activityIds":{"type":"array","items":{"type":"string","format":"uuid"}},"message":{"type":"string"}},"required":["code","conflictId","activityIds","message"],"additionalProperties":false},{"type":"object","properties":{"code":{"type":"string","enum":["weekday-mismatch"]},"activityId":{"type":"string","format":"uuid"},"message":{"type":"string"}},"required":["code","activityId","message"],"additionalProperties":false}]},"description":"Advice, never a refusal: nothing is dropped because of one. `conflict` is a conflict this application introduced that involves a new stop; `weekday-mismatch` is a stop anchored to weekdays that landed on a dated day that is none of them."}},"required":["tripId","playbookId","playbookVersion","dayIds","createdDayIds","activityIds","historySeq","warnings"],"additionalProperties":false}}}},"4XX":{"description":"One envelope for every failure: `{ error: { code, message, details? } }`. 401 carries `WWW-Authenticate: Bearer`; 429 carries `Retry-After`."}}}},"/v1/trips/{tripId}/restore":{"post":{"summary":"Bring back a trip you deleted","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://caesura.today/api/v1/trips/YOUR_TRIP_ID/restore' \\\n  -H 'Authorization: Bearer tc_YOUR_TOKEN'"},{"lang":"JavaScript","label":"JavaScript (fetch)","source":"const response = await fetch(\"https://caesura.today/api/v1/trips/YOUR_TRIP_ID/restore\", {\n  method: \"POST\",\n  headers: {\n    Authorization: \"Bearer tc_YOUR_TOKEN\",\n  },\n});\nconst data = await response.json();"},{"lang":"Python","label":"Python (requests)","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://caesura.today/api/v1/trips/YOUR_TRIP_ID/restore\",\n    headers={\"Authorization\": \"Bearer tc_YOUR_TOKEN\"},\n)\ndata = response.json()"}],"description":"Requires the `trips:write` scope. Requires at least the `owner` role on the trip.","security":[{"bearerAuth":["trips:write"]}],"parameters":[{"name":"tripId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"tripId":{"type":"string","format":"uuid"},"name":{"type":"string"},"status":{"type":"string","enum":["active","deleted"]},"startDate":{"type":"string","nullable":true},"currency":{"type":"string"},"budget":{"type":"object","properties":{"amountMinor":{"type":"integer","minimum":0},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"],"additionalProperties":false,"nullable":true},"members":{"minItems":1,"type":"array","items":{"type":"object","properties":{"userId":{"type":"string","minLength":1},"role":{"type":"string","enum":["viewer","suggester","editor","owner"]},"travelling":{"type":"boolean"}},"required":["userId","role"],"additionalProperties":false}},"forkedFrom":{"type":"object","properties":{"tripId":{"type":"string","format":"uuid"},"atSeq":{"type":"integer","minimum":1},"name":{"type":"string","minLength":1,"maxLength":200}},"required":["tripId","atSeq","name"],"additionalProperties":false,"nullable":true,"default":null},"pace":{"type":"string","enum":["slow","balanced","packed"],"nullable":true,"default":null},"tags":{"type":"array","items":{"type":"string","enum":["meal","outdoors","drinks","nightlife","museum","sight","beach","shopping","show","tour","wellness","sports"]},"default":[]},"days":{"type":"array","items":{"type":"object","properties":{"dayId":{"type":"string","format":"uuid"},"activityIds":{"type":"array","items":{"type":"string","format":"uuid"}},"date":{"type":"string","nullable":true},"costSubtotal":{"type":"integer"}},"required":["dayId","activityIds","date","costSubtotal"],"additionalProperties":false}},"backlog":{"type":"array","items":{"type":"string","format":"uuid"}},"parkedFrom":{"type":"object","additionalProperties":{"type":"string","format":"uuid"}},"activities":{"type":"object","additionalProperties":{"type":"object","properties":{"activityId":{"type":"string","format":"uuid"},"title":{"type":"string"},"timeWindow":{"type":"object","properties":{"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["start","end"],"additionalProperties":false,"nullable":true},"location":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"lat":{"type":"number","minimum":-90,"maximum":90,"description":"Send with lng, or omit both. When omitted on a v1 write, the server geocodes `address`, then `name`."},"lng":{"type":"number","minimum":-180,"maximum":180,"description":"Send with lat, or omit both."},"countryCode":{"type":"string","pattern":"^[A-Z]{2}$"},"city":{"type":"string","minLength":1,"maxLength":200},"area":{"type":"string","minLength":1,"maxLength":200},"precision":{"type":"string","enum":["venue","area","city"],"description":"What the coordinates describe: a `venue`, an `area` or a `city`. Requires `lat` and `lng` — sent without them it is refused (\"precision requires coordinates\")."},"verified":{"type":"boolean","enum":[false],"description":"`false` when no geocoder confirmed the coordinates (an assistant's guess). Absent = unknown. Requires `lat` and `lng`."},"address":{"type":"object","properties":{"countryCode":{"type":"string","pattern":"^[A-Z]{2}$","description":"ISO 3166-1 alpha-2, uppercase. Decides how the other fields are read."},"lines":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"description":"Street-level part, in the country's own order, e.g. [\"Hauptstraße 5\"] or [\"1-2-3 Nishi-Azabu\"]."},"dependentLocality":{"type":"string","minLength":1,"maxLength":200,"description":"District, neighbourhood or suburb when it is part of the postal address."},"locality":{"type":"string","minLength":1,"maxLength":200,"description":"City, town or post town."},"administrativeArea":{"type":"string","minLength":1,"maxLength":200,"description":"State, province, prefecture or region."},"postalCode":{"type":"string","minLength":1,"maxLength":20,"description":"A string: keeps leading zeros and letters."}},"required":["countryCode","lines"],"additionalProperties":false}},"required":["name"],"additionalProperties":false,"nullable":true},"notes":{"type":"string","nullable":true},"anchors":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["dayOfWeek"]},"days":{"minItems":1,"type":"array","items":{"type":"string","enum":["mon","tue","wed","thu","fri","sat","sun"]}}},"required":["kind","days"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["dateRange"]},"from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["kind","from","to"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["timeOfDay"]},"window":{"type":"object","properties":{"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["start","end"],"additionalProperties":false}},"required":["kind","window"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["publicHoliday"]},"country":{"type":"string","pattern":"^[A-Z]{2}$"}},"required":["kind","country"],"additionalProperties":false}]}},"kind":{"type":"string","enum":["planned","pending","transit"],"default":"planned"},"tags":{"type":"array","items":{"type":"string","enum":["meal","lodging","ticketed","outdoors","drinks","nightlife","museum","sight","beach","shopping","show","tour","wellness","sports"]},"default":[]},"cost":{"type":"object","properties":{"amountMinor":{"type":"integer","minimum":0},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"],"additionalProperties":false,"nullable":true,"description":"Price for one person, in the trip's currency. A stop's total is this times its headcount: the people in `participants`, or every traveller on the trip when `participants` is empty. A `pending` stop's cost is an estimate; a `planned` or `transit` stop's is committed."},"bookedBy":{"type":"string","nullable":true,"default":null},"participants":{"type":"array","items":{"type":"string"},"default":[]},"addedBy":{"type":"string","nullable":true,"default":null},"mode":{"type":"string","enum":["walk","bus","train","flight","ferry","car","bike"],"nullable":true,"default":null},"endLocation":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"lat":{"type":"number","minimum":-90,"maximum":90,"description":"Send with lng, or omit both. When omitted on a v1 write, the server geocodes `address`, then `name`."},"lng":{"type":"number","minimum":-180,"maximum":180,"description":"Send with lat, or omit both."},"countryCode":{"type":"string","pattern":"^[A-Z]{2}$"},"city":{"type":"string","minLength":1,"maxLength":200},"area":{"type":"string","minLength":1,"maxLength":200},"precision":{"type":"string","enum":["venue","area","city"],"description":"What the coordinates describe: a `venue`, an `area` or a `city`. Requires `lat` and `lng` — sent without them it is refused (\"precision requires coordinates\")."},"verified":{"type":"boolean","enum":[false],"description":"`false` when no geocoder confirmed the coordinates (an assistant's guess). Absent = unknown. Requires `lat` and `lng`."},"address":{"type":"object","properties":{"countryCode":{"type":"string","pattern":"^[A-Z]{2}$","description":"ISO 3166-1 alpha-2, uppercase. Decides how the other fields are read."},"lines":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"description":"Street-level part, in the country's own order, e.g. [\"Hauptstraße 5\"] or [\"1-2-3 Nishi-Azabu\"]."},"dependentLocality":{"type":"string","minLength":1,"maxLength":200,"description":"District, neighbourhood or suburb when it is part of the postal address."},"locality":{"type":"string","minLength":1,"maxLength":200,"description":"City, town or post town."},"administrativeArea":{"type":"string","minLength":1,"maxLength":200,"description":"State, province, prefecture or region."},"postalCode":{"type":"string","minLength":1,"maxLength":20,"description":"A string: keeps leading zeros and letters."}},"required":["countryCode","lines"],"additionalProperties":false}},"required":["name"],"additionalProperties":false,"nullable":true,"default":null},"pendingReason":{"type":"string","enum":["book","maybe"],"nullable":true,"default":null},"flightNumber":{"type":"string","nullable":true,"default":null},"booking":{"type":"object","properties":{"confirmation":{"type":"string"},"provider":{"type":"string","nullable":true},"url":{"type":"string"}},"additionalProperties":false,"nullable":true,"default":null}},"required":["activityId","title","timeWindow","location","notes","anchors","cost"],"additionalProperties":false}},"conflicts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"severity":{"type":"string","enum":["info","warn","error"]},"subjects":{"type":"array","items":{"type":"string"}},"resolutions":{"type":"array","items":{"type":"string"}},"description":{"type":"string"}},"required":["id","kind","severity","subjects","description","resolutions"],"additionalProperties":false}},"dismissedConflictIds":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string"},"unscheduledCostSubtotal":{"type":"integer"},"tripCostTotal":{"type":"integer"},"budgetRemaining":{"type":"integer","nullable":true}},"required":["tripId","name","status","startDate","currency","budget","members","days","backlog","activities","conflicts","dismissedConflictIds","createdAt","unscheduledCostSubtotal","tripCostTotal","budgetRemaining"],"additionalProperties":false}}}},"4XX":{"description":"One envelope for every failure: `{ error: { code, message, details? } }`. 401 carries `WWW-Authenticate: Bearer`; 429 carries `Retry-After`."}}}},"/v1/trips/{tripId}":{"get":{"summary":"Get a trip with its days, stops, members and conflicts","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://caesura.today/api/v1/trips/YOUR_TRIP_ID' \\\n  -H 'Authorization: Bearer tc_YOUR_TOKEN'"},{"lang":"JavaScript","label":"JavaScript (fetch)","source":"const response = await fetch(\"https://caesura.today/api/v1/trips/YOUR_TRIP_ID\", {\n  method: \"GET\",\n  headers: {\n    Authorization: \"Bearer tc_YOUR_TOKEN\",\n  },\n});\nconst data = await response.json();"},{"lang":"Python","label":"Python (requests)","source":"import requests\n\nresponse = requests.request(\n    \"GET\",\n    \"https://caesura.today/api/v1/trips/YOUR_TRIP_ID\",\n    headers={\"Authorization\": \"Bearer tc_YOUR_TOKEN\"},\n)\ndata = response.json()"}],"description":"Requires the `trips:read` scope, or `current:read`. Requires at least the `viewer` role on the trip.","security":[{"bearerAuth":["trips:read"]},{"bearerAuth":["current:read"]}],"parameters":[{"name":"tripId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"tripId":{"type":"string","format":"uuid"},"name":{"type":"string"},"status":{"type":"string","enum":["active","deleted"]},"startDate":{"type":"string","nullable":true},"currency":{"type":"string"},"budget":{"type":"object","properties":{"amountMinor":{"type":"integer","minimum":0},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"],"additionalProperties":false,"nullable":true},"members":{"minItems":1,"type":"array","items":{"type":"object","properties":{"userId":{"type":"string","minLength":1},"role":{"type":"string","enum":["viewer","suggester","editor","owner"]},"travelling":{"type":"boolean"}},"required":["userId","role"],"additionalProperties":false}},"forkedFrom":{"type":"object","properties":{"tripId":{"type":"string","format":"uuid"},"atSeq":{"type":"integer","minimum":1},"name":{"type":"string","minLength":1,"maxLength":200}},"required":["tripId","atSeq","name"],"additionalProperties":false,"nullable":true,"default":null},"pace":{"type":"string","enum":["slow","balanced","packed"],"nullable":true,"default":null},"tags":{"type":"array","items":{"type":"string","enum":["meal","outdoors","drinks","nightlife","museum","sight","beach","shopping","show","tour","wellness","sports"]},"default":[]},"days":{"type":"array","items":{"type":"object","properties":{"dayId":{"type":"string","format":"uuid"},"activityIds":{"type":"array","items":{"type":"string","format":"uuid"}},"date":{"type":"string","nullable":true},"costSubtotal":{"type":"integer"}},"required":["dayId","activityIds","date","costSubtotal"],"additionalProperties":false}},"backlog":{"type":"array","items":{"type":"string","format":"uuid"}},"parkedFrom":{"type":"object","additionalProperties":{"type":"string","format":"uuid"}},"activities":{"type":"object","additionalProperties":{"type":"object","properties":{"activityId":{"type":"string","format":"uuid"},"title":{"type":"string"},"timeWindow":{"type":"object","properties":{"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["start","end"],"additionalProperties":false,"nullable":true},"location":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"lat":{"type":"number","minimum":-90,"maximum":90,"description":"Send with lng, or omit both. When omitted on a v1 write, the server geocodes `address`, then `name`."},"lng":{"type":"number","minimum":-180,"maximum":180,"description":"Send with lat, or omit both."},"countryCode":{"type":"string","pattern":"^[A-Z]{2}$"},"city":{"type":"string","minLength":1,"maxLength":200},"area":{"type":"string","minLength":1,"maxLength":200},"precision":{"type":"string","enum":["venue","area","city"],"description":"What the coordinates describe: a `venue`, an `area` or a `city`. Requires `lat` and `lng` — sent without them it is refused (\"precision requires coordinates\")."},"verified":{"type":"boolean","enum":[false],"description":"`false` when no geocoder confirmed the coordinates (an assistant's guess). Absent = unknown. Requires `lat` and `lng`."},"address":{"type":"object","properties":{"countryCode":{"type":"string","pattern":"^[A-Z]{2}$","description":"ISO 3166-1 alpha-2, uppercase. Decides how the other fields are read."},"lines":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"description":"Street-level part, in the country's own order, e.g. [\"Hauptstraße 5\"] or [\"1-2-3 Nishi-Azabu\"]."},"dependentLocality":{"type":"string","minLength":1,"maxLength":200,"description":"District, neighbourhood or suburb when it is part of the postal address."},"locality":{"type":"string","minLength":1,"maxLength":200,"description":"City, town or post town."},"administrativeArea":{"type":"string","minLength":1,"maxLength":200,"description":"State, province, prefecture or region."},"postalCode":{"type":"string","minLength":1,"maxLength":20,"description":"A string: keeps leading zeros and letters."}},"required":["countryCode","lines"],"additionalProperties":false}},"required":["name"],"additionalProperties":false,"nullable":true},"notes":{"type":"string","nullable":true},"anchors":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["dayOfWeek"]},"days":{"minItems":1,"type":"array","items":{"type":"string","enum":["mon","tue","wed","thu","fri","sat","sun"]}}},"required":["kind","days"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["dateRange"]},"from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["kind","from","to"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["timeOfDay"]},"window":{"type":"object","properties":{"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["start","end"],"additionalProperties":false}},"required":["kind","window"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["publicHoliday"]},"country":{"type":"string","pattern":"^[A-Z]{2}$"}},"required":["kind","country"],"additionalProperties":false}]}},"kind":{"type":"string","enum":["planned","pending","transit"],"default":"planned"},"tags":{"type":"array","items":{"type":"string","enum":["meal","lodging","ticketed","outdoors","drinks","nightlife","museum","sight","beach","shopping","show","tour","wellness","sports"]},"default":[]},"cost":{"type":"object","properties":{"amountMinor":{"type":"integer","minimum":0},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"],"additionalProperties":false,"nullable":true,"description":"Price for one person, in the trip's currency. A stop's total is this times its headcount: the people in `participants`, or every traveller on the trip when `participants` is empty. A `pending` stop's cost is an estimate; a `planned` or `transit` stop's is committed."},"bookedBy":{"type":"string","nullable":true,"default":null},"participants":{"type":"array","items":{"type":"string"},"default":[]},"addedBy":{"type":"string","nullable":true,"default":null},"mode":{"type":"string","enum":["walk","bus","train","flight","ferry","car","bike"],"nullable":true,"default":null},"endLocation":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"lat":{"type":"number","minimum":-90,"maximum":90,"description":"Send with lng, or omit both. When omitted on a v1 write, the server geocodes `address`, then `name`."},"lng":{"type":"number","minimum":-180,"maximum":180,"description":"Send with lat, or omit both."},"countryCode":{"type":"string","pattern":"^[A-Z]{2}$"},"city":{"type":"string","minLength":1,"maxLength":200},"area":{"type":"string","minLength":1,"maxLength":200},"precision":{"type":"string","enum":["venue","area","city"],"description":"What the coordinates describe: a `venue`, an `area` or a `city`. Requires `lat` and `lng` — sent without them it is refused (\"precision requires coordinates\")."},"verified":{"type":"boolean","enum":[false],"description":"`false` when no geocoder confirmed the coordinates (an assistant's guess). Absent = unknown. Requires `lat` and `lng`."},"address":{"type":"object","properties":{"countryCode":{"type":"string","pattern":"^[A-Z]{2}$","description":"ISO 3166-1 alpha-2, uppercase. Decides how the other fields are read."},"lines":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"description":"Street-level part, in the country's own order, e.g. [\"Hauptstraße 5\"] or [\"1-2-3 Nishi-Azabu\"]."},"dependentLocality":{"type":"string","minLength":1,"maxLength":200,"description":"District, neighbourhood or suburb when it is part of the postal address."},"locality":{"type":"string","minLength":1,"maxLength":200,"description":"City, town or post town."},"administrativeArea":{"type":"string","minLength":1,"maxLength":200,"description":"State, province, prefecture or region."},"postalCode":{"type":"string","minLength":1,"maxLength":20,"description":"A string: keeps leading zeros and letters."}},"required":["countryCode","lines"],"additionalProperties":false}},"required":["name"],"additionalProperties":false,"nullable":true,"default":null},"pendingReason":{"type":"string","enum":["book","maybe"],"nullable":true,"default":null},"flightNumber":{"type":"string","nullable":true,"default":null},"booking":{"type":"object","properties":{"confirmation":{"type":"string"},"provider":{"type":"string","nullable":true},"url":{"type":"string"}},"additionalProperties":false,"nullable":true,"default":null}},"required":["activityId","title","timeWindow","location","notes","anchors","cost"],"additionalProperties":false}},"conflicts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"severity":{"type":"string","enum":["info","warn","error"]},"subjects":{"type":"array","items":{"type":"string"}},"resolutions":{"type":"array","items":{"type":"string"}},"description":{"type":"string"}},"required":["id","kind","severity","subjects","description","resolutions"],"additionalProperties":false}},"dismissedConflictIds":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string"},"unscheduledCostSubtotal":{"type":"integer"},"tripCostTotal":{"type":"integer"},"budgetRemaining":{"type":"integer","nullable":true}},"required":["tripId","name","status","startDate","currency","budget","members","days","backlog","activities","conflicts","dismissedConflictIds","createdAt","unscheduledCostSubtotal","tripCostTotal","budgetRemaining"],"additionalProperties":false}}}},"4XX":{"description":"One envelope for every failure: `{ error: { code, message, details? } }`. 401 carries `WWW-Authenticate: Bearer`; 429 carries `Retry-After`."}}},"patch":{"summary":"Change a trip's name, dates, currency or budget, in any combination, as one change","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X PATCH 'https://caesura.today/api/v1/trips/YOUR_TRIP_ID' \\\n  -H 'Authorization: Bearer tc_YOUR_TOKEN' \\\n  -H 'Content-Type: application/json' \\\n  -d '{}'"},{"lang":"JavaScript","label":"JavaScript (fetch)","source":"const response = await fetch(\"https://caesura.today/api/v1/trips/YOUR_TRIP_ID\", {\n  method: \"PATCH\",\n  headers: {\n    Authorization: \"Bearer tc_YOUR_TOKEN\",\n    \"Content-Type\": \"application/json\",\n  },\n  body: JSON.stringify({}),\n});\nconst data = await response.json();"},{"lang":"Python","label":"Python (requests)","source":"import requests\n\nresponse = requests.request(\n    \"PATCH\",\n    \"https://caesura.today/api/v1/trips/YOUR_TRIP_ID\",\n    headers={\"Authorization\": \"Bearer tc_YOUR_TOKEN\"},\n    json={},\n)\ndata = response.json()"}],"description":"Requires the `trips:write` scope. Requires at least the `editor` role on the trip.","security":[{"bearerAuth":["trips:write"]}],"parameters":[{"name":"tripId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"startDate":{"type":"string","nullable":true},"endDate":{"type":"string","nullable":true},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"budget":{"type":"object","properties":{"amountMinor":{"type":"integer","minimum":0,"maximum":100000000000},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"],"additionalProperties":false,"nullable":true}},"additionalProperties":false}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"tripId":{"type":"string","format":"uuid"},"name":{"type":"string"},"status":{"type":"string","enum":["active","deleted"]},"startDate":{"type":"string","nullable":true},"currency":{"type":"string"},"budget":{"type":"object","properties":{"amountMinor":{"type":"integer","minimum":0},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"],"additionalProperties":false,"nullable":true},"members":{"minItems":1,"type":"array","items":{"type":"object","properties":{"userId":{"type":"string","minLength":1},"role":{"type":"string","enum":["viewer","suggester","editor","owner"]},"travelling":{"type":"boolean"}},"required":["userId","role"],"additionalProperties":false}},"forkedFrom":{"type":"object","properties":{"tripId":{"type":"string","format":"uuid"},"atSeq":{"type":"integer","minimum":1},"name":{"type":"string","minLength":1,"maxLength":200}},"required":["tripId","atSeq","name"],"additionalProperties":false,"nullable":true,"default":null},"pace":{"type":"string","enum":["slow","balanced","packed"],"nullable":true,"default":null},"tags":{"type":"array","items":{"type":"string","enum":["meal","outdoors","drinks","nightlife","museum","sight","beach","shopping","show","tour","wellness","sports"]},"default":[]},"days":{"type":"array","items":{"type":"object","properties":{"dayId":{"type":"string","format":"uuid"},"activityIds":{"type":"array","items":{"type":"string","format":"uuid"}},"date":{"type":"string","nullable":true},"costSubtotal":{"type":"integer"}},"required":["dayId","activityIds","date","costSubtotal"],"additionalProperties":false}},"backlog":{"type":"array","items":{"type":"string","format":"uuid"}},"parkedFrom":{"type":"object","additionalProperties":{"type":"string","format":"uuid"}},"activities":{"type":"object","additionalProperties":{"type":"object","properties":{"activityId":{"type":"string","format":"uuid"},"title":{"type":"string"},"timeWindow":{"type":"object","properties":{"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["start","end"],"additionalProperties":false,"nullable":true},"location":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"lat":{"type":"number","minimum":-90,"maximum":90,"description":"Send with lng, or omit both. When omitted on a v1 write, the server geocodes `address`, then `name`."},"lng":{"type":"number","minimum":-180,"maximum":180,"description":"Send with lat, or omit both."},"countryCode":{"type":"string","pattern":"^[A-Z]{2}$"},"city":{"type":"string","minLength":1,"maxLength":200},"area":{"type":"string","minLength":1,"maxLength":200},"precision":{"type":"string","enum":["venue","area","city"],"description":"What the coordinates describe: a `venue`, an `area` or a `city`. Requires `lat` and `lng` — sent without them it is refused (\"precision requires coordinates\")."},"verified":{"type":"boolean","enum":[false],"description":"`false` when no geocoder confirmed the coordinates (an assistant's guess). Absent = unknown. Requires `lat` and `lng`."},"address":{"type":"object","properties":{"countryCode":{"type":"string","pattern":"^[A-Z]{2}$","description":"ISO 3166-1 alpha-2, uppercase. Decides how the other fields are read."},"lines":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"description":"Street-level part, in the country's own order, e.g. [\"Hauptstraße 5\"] or [\"1-2-3 Nishi-Azabu\"]."},"dependentLocality":{"type":"string","minLength":1,"maxLength":200,"description":"District, neighbourhood or suburb when it is part of the postal address."},"locality":{"type":"string","minLength":1,"maxLength":200,"description":"City, town or post town."},"administrativeArea":{"type":"string","minLength":1,"maxLength":200,"description":"State, province, prefecture or region."},"postalCode":{"type":"string","minLength":1,"maxLength":20,"description":"A string: keeps leading zeros and letters."}},"required":["countryCode","lines"],"additionalProperties":false}},"required":["name"],"additionalProperties":false,"nullable":true},"notes":{"type":"string","nullable":true},"anchors":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["dayOfWeek"]},"days":{"minItems":1,"type":"array","items":{"type":"string","enum":["mon","tue","wed","thu","fri","sat","sun"]}}},"required":["kind","days"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["dateRange"]},"from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["kind","from","to"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["timeOfDay"]},"window":{"type":"object","properties":{"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["start","end"],"additionalProperties":false}},"required":["kind","window"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["publicHoliday"]},"country":{"type":"string","pattern":"^[A-Z]{2}$"}},"required":["kind","country"],"additionalProperties":false}]}},"kind":{"type":"string","enum":["planned","pending","transit"],"default":"planned"},"tags":{"type":"array","items":{"type":"string","enum":["meal","lodging","ticketed","outdoors","drinks","nightlife","museum","sight","beach","shopping","show","tour","wellness","sports"]},"default":[]},"cost":{"type":"object","properties":{"amountMinor":{"type":"integer","minimum":0},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"],"additionalProperties":false,"nullable":true,"description":"Price for one person, in the trip's currency. A stop's total is this times its headcount: the people in `participants`, or every traveller on the trip when `participants` is empty. A `pending` stop's cost is an estimate; a `planned` or `transit` stop's is committed."},"bookedBy":{"type":"string","nullable":true,"default":null},"participants":{"type":"array","items":{"type":"string"},"default":[]},"addedBy":{"type":"string","nullable":true,"default":null},"mode":{"type":"string","enum":["walk","bus","train","flight","ferry","car","bike"],"nullable":true,"default":null},"endLocation":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"lat":{"type":"number","minimum":-90,"maximum":90,"description":"Send with lng, or omit both. When omitted on a v1 write, the server geocodes `address`, then `name`."},"lng":{"type":"number","minimum":-180,"maximum":180,"description":"Send with lat, or omit both."},"countryCode":{"type":"string","pattern":"^[A-Z]{2}$"},"city":{"type":"string","minLength":1,"maxLength":200},"area":{"type":"string","minLength":1,"maxLength":200},"precision":{"type":"string","enum":["venue","area","city"],"description":"What the coordinates describe: a `venue`, an `area` or a `city`. Requires `lat` and `lng` — sent without them it is refused (\"precision requires coordinates\")."},"verified":{"type":"boolean","enum":[false],"description":"`false` when no geocoder confirmed the coordinates (an assistant's guess). Absent = unknown. Requires `lat` and `lng`."},"address":{"type":"object","properties":{"countryCode":{"type":"string","pattern":"^[A-Z]{2}$","description":"ISO 3166-1 alpha-2, uppercase. Decides how the other fields are read."},"lines":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"description":"Street-level part, in the country's own order, e.g. [\"Hauptstraße 5\"] or [\"1-2-3 Nishi-Azabu\"]."},"dependentLocality":{"type":"string","minLength":1,"maxLength":200,"description":"District, neighbourhood or suburb when it is part of the postal address."},"locality":{"type":"string","minLength":1,"maxLength":200,"description":"City, town or post town."},"administrativeArea":{"type":"string","minLength":1,"maxLength":200,"description":"State, province, prefecture or region."},"postalCode":{"type":"string","minLength":1,"maxLength":20,"description":"A string: keeps leading zeros and letters."}},"required":["countryCode","lines"],"additionalProperties":false}},"required":["name"],"additionalProperties":false,"nullable":true,"default":null},"pendingReason":{"type":"string","enum":["book","maybe"],"nullable":true,"default":null},"flightNumber":{"type":"string","nullable":true,"default":null},"booking":{"type":"object","properties":{"confirmation":{"type":"string"},"provider":{"type":"string","nullable":true},"url":{"type":"string"}},"additionalProperties":false,"nullable":true,"default":null}},"required":["activityId","title","timeWindow","location","notes","anchors","cost"],"additionalProperties":false}},"conflicts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"severity":{"type":"string","enum":["info","warn","error"]},"subjects":{"type":"array","items":{"type":"string"}},"resolutions":{"type":"array","items":{"type":"string"}},"description":{"type":"string"}},"required":["id","kind","severity","subjects","description","resolutions"],"additionalProperties":false}},"dismissedConflictIds":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string"},"unscheduledCostSubtotal":{"type":"integer"},"tripCostTotal":{"type":"integer"},"budgetRemaining":{"type":"integer","nullable":true}},"required":["tripId","name","status","startDate","currency","budget","members","days","backlog","activities","conflicts","dismissedConflictIds","createdAt","unscheduledCostSubtotal","tripCostTotal","budgetRemaining"],"additionalProperties":false}}}},"4XX":{"description":"One envelope for every failure: `{ error: { code, message, details? } }`. 401 carries `WWW-Authenticate: Bearer`; 429 carries `Retry-After`."}}},"delete":{"summary":"Delete a trip (a soft delete; the owner can undo it with restore)","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X DELETE 'https://caesura.today/api/v1/trips/YOUR_TRIP_ID' \\\n  -H 'Authorization: Bearer tc_YOUR_TOKEN'"},{"lang":"JavaScript","label":"JavaScript (fetch)","source":"const response = await fetch(\"https://caesura.today/api/v1/trips/YOUR_TRIP_ID\", {\n  method: \"DELETE\",\n  headers: {\n    Authorization: \"Bearer tc_YOUR_TOKEN\",\n  },\n});\nconst data = await response.json();"},{"lang":"Python","label":"Python (requests)","source":"import requests\n\nresponse = requests.request(\n    \"DELETE\",\n    \"https://caesura.today/api/v1/trips/YOUR_TRIP_ID\",\n    headers={\"Authorization\": \"Bearer tc_YOUR_TOKEN\"},\n)\ndata = response.json()"}],"description":"Requires the `trips:write` scope. Requires at least the `owner` role on the trip.","security":[{"bearerAuth":["trips:write"]}],"parameters":[{"name":"tripId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"tripId":{"type":"string","format":"uuid"},"name":{"type":"string"},"status":{"type":"string","enum":["active","deleted"]},"startDate":{"type":"string","nullable":true},"currency":{"type":"string"},"budget":{"type":"object","properties":{"amountMinor":{"type":"integer","minimum":0},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"],"additionalProperties":false,"nullable":true},"members":{"minItems":1,"type":"array","items":{"type":"object","properties":{"userId":{"type":"string","minLength":1},"role":{"type":"string","enum":["viewer","suggester","editor","owner"]},"travelling":{"type":"boolean"}},"required":["userId","role"],"additionalProperties":false}},"forkedFrom":{"type":"object","properties":{"tripId":{"type":"string","format":"uuid"},"atSeq":{"type":"integer","minimum":1},"name":{"type":"string","minLength":1,"maxLength":200}},"required":["tripId","atSeq","name"],"additionalProperties":false,"nullable":true,"default":null},"pace":{"type":"string","enum":["slow","balanced","packed"],"nullable":true,"default":null},"tags":{"type":"array","items":{"type":"string","enum":["meal","outdoors","drinks","nightlife","museum","sight","beach","shopping","show","tour","wellness","sports"]},"default":[]},"days":{"type":"array","items":{"type":"object","properties":{"dayId":{"type":"string","format":"uuid"},"activityIds":{"type":"array","items":{"type":"string","format":"uuid"}},"date":{"type":"string","nullable":true},"costSubtotal":{"type":"integer"}},"required":["dayId","activityIds","date","costSubtotal"],"additionalProperties":false}},"backlog":{"type":"array","items":{"type":"string","format":"uuid"}},"parkedFrom":{"type":"object","additionalProperties":{"type":"string","format":"uuid"}},"activities":{"type":"object","additionalProperties":{"type":"object","properties":{"activityId":{"type":"string","format":"uuid"},"title":{"type":"string"},"timeWindow":{"type":"object","properties":{"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["start","end"],"additionalProperties":false,"nullable":true},"location":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"lat":{"type":"number","minimum":-90,"maximum":90,"description":"Send with lng, or omit both. When omitted on a v1 write, the server geocodes `address`, then `name`."},"lng":{"type":"number","minimum":-180,"maximum":180,"description":"Send with lat, or omit both."},"countryCode":{"type":"string","pattern":"^[A-Z]{2}$"},"city":{"type":"string","minLength":1,"maxLength":200},"area":{"type":"string","minLength":1,"maxLength":200},"precision":{"type":"string","enum":["venue","area","city"],"description":"What the coordinates describe: a `venue`, an `area` or a `city`. Requires `lat` and `lng` — sent without them it is refused (\"precision requires coordinates\")."},"verified":{"type":"boolean","enum":[false],"description":"`false` when no geocoder confirmed the coordinates (an assistant's guess). Absent = unknown. Requires `lat` and `lng`."},"address":{"type":"object","properties":{"countryCode":{"type":"string","pattern":"^[A-Z]{2}$","description":"ISO 3166-1 alpha-2, uppercase. Decides how the other fields are read."},"lines":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"description":"Street-level part, in the country's own order, e.g. [\"Hauptstraße 5\"] or [\"1-2-3 Nishi-Azabu\"]."},"dependentLocality":{"type":"string","minLength":1,"maxLength":200,"description":"District, neighbourhood or suburb when it is part of the postal address."},"locality":{"type":"string","minLength":1,"maxLength":200,"description":"City, town or post town."},"administrativeArea":{"type":"string","minLength":1,"maxLength":200,"description":"State, province, prefecture or region."},"postalCode":{"type":"string","minLength":1,"maxLength":20,"description":"A string: keeps leading zeros and letters."}},"required":["countryCode","lines"],"additionalProperties":false}},"required":["name"],"additionalProperties":false,"nullable":true},"notes":{"type":"string","nullable":true},"anchors":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["dayOfWeek"]},"days":{"minItems":1,"type":"array","items":{"type":"string","enum":["mon","tue","wed","thu","fri","sat","sun"]}}},"required":["kind","days"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["dateRange"]},"from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["kind","from","to"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["timeOfDay"]},"window":{"type":"object","properties":{"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["start","end"],"additionalProperties":false}},"required":["kind","window"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["publicHoliday"]},"country":{"type":"string","pattern":"^[A-Z]{2}$"}},"required":["kind","country"],"additionalProperties":false}]}},"kind":{"type":"string","enum":["planned","pending","transit"],"default":"planned"},"tags":{"type":"array","items":{"type":"string","enum":["meal","lodging","ticketed","outdoors","drinks","nightlife","museum","sight","beach","shopping","show","tour","wellness","sports"]},"default":[]},"cost":{"type":"object","properties":{"amountMinor":{"type":"integer","minimum":0},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"],"additionalProperties":false,"nullable":true,"description":"Price for one person, in the trip's currency. A stop's total is this times its headcount: the people in `participants`, or every traveller on the trip when `participants` is empty. A `pending` stop's cost is an estimate; a `planned` or `transit` stop's is committed."},"bookedBy":{"type":"string","nullable":true,"default":null},"participants":{"type":"array","items":{"type":"string"},"default":[]},"addedBy":{"type":"string","nullable":true,"default":null},"mode":{"type":"string","enum":["walk","bus","train","flight","ferry","car","bike"],"nullable":true,"default":null},"endLocation":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"lat":{"type":"number","minimum":-90,"maximum":90,"description":"Send with lng, or omit both. When omitted on a v1 write, the server geocodes `address`, then `name`."},"lng":{"type":"number","minimum":-180,"maximum":180,"description":"Send with lat, or omit both."},"countryCode":{"type":"string","pattern":"^[A-Z]{2}$"},"city":{"type":"string","minLength":1,"maxLength":200},"area":{"type":"string","minLength":1,"maxLength":200},"precision":{"type":"string","enum":["venue","area","city"],"description":"What the coordinates describe: a `venue`, an `area` or a `city`. Requires `lat` and `lng` — sent without them it is refused (\"precision requires coordinates\")."},"verified":{"type":"boolean","enum":[false],"description":"`false` when no geocoder confirmed the coordinates (an assistant's guess). Absent = unknown. Requires `lat` and `lng`."},"address":{"type":"object","properties":{"countryCode":{"type":"string","pattern":"^[A-Z]{2}$","description":"ISO 3166-1 alpha-2, uppercase. Decides how the other fields are read."},"lines":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"description":"Street-level part, in the country's own order, e.g. [\"Hauptstraße 5\"] or [\"1-2-3 Nishi-Azabu\"]."},"dependentLocality":{"type":"string","minLength":1,"maxLength":200,"description":"District, neighbourhood or suburb when it is part of the postal address."},"locality":{"type":"string","minLength":1,"maxLength":200,"description":"City, town or post town."},"administrativeArea":{"type":"string","minLength":1,"maxLength":200,"description":"State, province, prefecture or region."},"postalCode":{"type":"string","minLength":1,"maxLength":20,"description":"A string: keeps leading zeros and letters."}},"required":["countryCode","lines"],"additionalProperties":false}},"required":["name"],"additionalProperties":false,"nullable":true,"default":null},"pendingReason":{"type":"string","enum":["book","maybe"],"nullable":true,"default":null},"flightNumber":{"type":"string","nullable":true,"default":null},"booking":{"type":"object","properties":{"confirmation":{"type":"string"},"provider":{"type":"string","nullable":true},"url":{"type":"string"}},"additionalProperties":false,"nullable":true,"default":null}},"required":["activityId","title","timeWindow","location","notes","anchors","cost"],"additionalProperties":false}},"conflicts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"severity":{"type":"string","enum":["info","warn","error"]},"subjects":{"type":"array","items":{"type":"string"}},"resolutions":{"type":"array","items":{"type":"string"}},"description":{"type":"string"}},"required":["id","kind","severity","subjects","description","resolutions"],"additionalProperties":false}},"dismissedConflictIds":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string"},"unscheduledCostSubtotal":{"type":"integer"},"tripCostTotal":{"type":"integer"},"budgetRemaining":{"type":"integer","nullable":true}},"required":["tripId","name","status","startDate","currency","budget","members","days","backlog","activities","conflicts","dismissedConflictIds","createdAt","unscheduledCostSubtotal","tripCostTotal","budgetRemaining"],"additionalProperties":false}}}},"4XX":{"description":"One envelope for every failure: `{ error: { code, message, details? } }`. 401 carries `WWW-Authenticate: Bearer`; 429 carries `Retry-After`."}}}},"/v1/trips/{tripId}/shares/{shareId}":{"delete":{"summary":"Revoke a trip's share link","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X DELETE 'https://caesura.today/api/v1/trips/YOUR_TRIP_ID/shares/YOUR_SHARE_ID' \\\n  -H 'Authorization: Bearer tc_YOUR_TOKEN'"},{"lang":"JavaScript","label":"JavaScript (fetch)","source":"const response = await fetch(\"https://caesura.today/api/v1/trips/YOUR_TRIP_ID/shares/YOUR_SHARE_ID\", {\n  method: \"DELETE\",\n  headers: {\n    Authorization: \"Bearer tc_YOUR_TOKEN\",\n  },\n});\nconst data = await response.json();"},{"lang":"Python","label":"Python (requests)","source":"import requests\n\nresponse = requests.request(\n    \"DELETE\",\n    \"https://caesura.today/api/v1/trips/YOUR_TRIP_ID/shares/YOUR_SHARE_ID\",\n    headers={\"Authorization\": \"Bearer tc_YOUR_TOKEN\"},\n)\ndata = response.json()"}],"description":"Requires the `sharing:write` scope. Requires at least the `owner` role on the trip.","security":[{"bearerAuth":["sharing:write"]}],"parameters":[{"name":"tripId","in":"path","required":true,"schema":{"type":"string"}},{"name":"shareId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"shareId":{"type":"string","format":"uuid"},"tripId":{"type":"string","format":"uuid"},"token":{"type":"string","minLength":1},"seq":{"type":"integer","minimum":1},"createdBy":{"type":"string","minLength":1},"createdAt":{"type":"string"},"revokedAt":{"type":"string","nullable":true}},"required":["shareId","tripId","token","seq","createdBy","createdAt","revokedAt"],"additionalProperties":false}}}},"4XX":{"description":"One envelope for every failure: `{ error: { code, message, details? } }`. 401 carries `WWW-Authenticate: Bearer`; 429 carries `Retry-After`."}}}},"/v1/trips/{tripId}/shares":{"get":{"summary":"List the read-only share links created for a trip","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://caesura.today/api/v1/trips/YOUR_TRIP_ID/shares' \\\n  -H 'Authorization: Bearer tc_YOUR_TOKEN'"},{"lang":"JavaScript","label":"JavaScript (fetch)","source":"const response = await fetch(\"https://caesura.today/api/v1/trips/YOUR_TRIP_ID/shares\", {\n  method: \"GET\",\n  headers: {\n    Authorization: \"Bearer tc_YOUR_TOKEN\",\n  },\n});\nconst data = await response.json();"},{"lang":"Python","label":"Python (requests)","source":"import requests\n\nresponse = requests.request(\n    \"GET\",\n    \"https://caesura.today/api/v1/trips/YOUR_TRIP_ID/shares\",\n    headers={\"Authorization\": \"Bearer tc_YOUR_TOKEN\"},\n)\ndata = response.json()"}],"description":"Requires the `trips:read` scope, or `current:read`. Requires at least the `owner` role on the trip.","security":[{"bearerAuth":["trips:read"]},{"bearerAuth":["current:read"]}],"parameters":[{"name":"tripId","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"description":"1 to 200. A value outside that range is refused, never clamped.","schema":{"type":"integer","minimum":1,"maximum":200}},{"name":"cursor","in":"query","required":false,"description":"Opaque. Pass back the `nextCursor` of the previous page.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","required":["items","nextCursor"],"properties":{"items":{"type":"array","items":{"type":"object","properties":{"shareId":{"type":"string","format":"uuid"},"tripId":{"type":"string","format":"uuid"},"token":{"type":"string","minLength":1},"seq":{"type":"integer","minimum":1},"createdBy":{"type":"string","minLength":1},"createdAt":{"type":"string"},"revokedAt":{"type":"string","nullable":true}},"required":["shareId","tripId","token","seq","createdBy","createdAt","revokedAt"],"additionalProperties":false}},"nextCursor":{"type":"string","nullable":true}}}}}},"4XX":{"description":"One envelope for every failure: `{ error: { code, message, details? } }`. 401 carries `WWW-Authenticate: Bearer`; 429 carries `Retry-After`."}}},"post":{"summary":"Create a read-only share link showing the trip as it stands right now","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://caesura.today/api/v1/trips/YOUR_TRIP_ID/shares' \\\n  -H 'Authorization: Bearer tc_YOUR_TOKEN'"},{"lang":"JavaScript","label":"JavaScript (fetch)","source":"const response = await fetch(\"https://caesura.today/api/v1/trips/YOUR_TRIP_ID/shares\", {\n  method: \"POST\",\n  headers: {\n    Authorization: \"Bearer tc_YOUR_TOKEN\",\n  },\n});\nconst data = await response.json();"},{"lang":"Python","label":"Python (requests)","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://caesura.today/api/v1/trips/YOUR_TRIP_ID/shares\",\n    headers={\"Authorization\": \"Bearer tc_YOUR_TOKEN\"},\n)\ndata = response.json()"}],"description":"Requires the `sharing:write` scope. Requires at least the `owner` role on the trip.","security":[{"bearerAuth":["sharing:write"]}],"parameters":[{"name":"tripId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"shareId":{"type":"string","format":"uuid"},"tripId":{"type":"string","format":"uuid"},"token":{"type":"string","minLength":1},"seq":{"type":"integer","minimum":1},"createdBy":{"type":"string","minLength":1},"createdAt":{"type":"string"},"revokedAt":{"type":"string","nullable":true}},"required":["shareId","tripId","token","seq","createdBy","createdAt","revokedAt"],"additionalProperties":false}}}},"4XX":{"description":"One envelope for every failure: `{ error: { code, message, details? } }`. 401 carries `WWW-Authenticate: Bearer`; 429 carries `Retry-After`."}}}},"/v1/trips/{tripId}/today":{"get":{"summary":"Get where a trip is today: its phase, today's stops, and the stop under way and the next one","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://caesura.today/api/v1/trips/YOUR_TRIP_ID/today' \\\n  -H 'Authorization: Bearer tc_YOUR_TOKEN'"},{"lang":"JavaScript","label":"JavaScript (fetch)","source":"const response = await fetch(\"https://caesura.today/api/v1/trips/YOUR_TRIP_ID/today\", {\n  method: \"GET\",\n  headers: {\n    Authorization: \"Bearer tc_YOUR_TOKEN\",\n  },\n});\nconst data = await response.json();"},{"lang":"Python","label":"Python (requests)","source":"import requests\n\nresponse = requests.request(\n    \"GET\",\n    \"https://caesura.today/api/v1/trips/YOUR_TRIP_ID/today\",\n    headers={\"Authorization\": \"Bearer tc_YOUR_TOKEN\"},\n)\ndata = response.json()"}],"description":"Requires the `trips:read` scope, or `current:read`. Requires at least the `viewer` role on the trip.","security":[{"bearerAuth":["trips:read"]},{"bearerAuth":["current:read"]}],"parameters":[{"name":"tripId","in":"path","required":true,"schema":{"type":"string"}},{"name":"timeZone","in":"query","required":false,"schema":{"type":"string","description":"Your IANA zone, for a day whose stops have no place yet. Read for this answer only, never stored."}}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"date":{"type":"string","description":"Today's date (`YYYY-MM-DD`) on the trip's clock."},"timeZone":{"type":"string","description":"The IANA zone `date` is read in: the day's own (the first day's off the trip), else the asker's, else the trip's, else UTC."},"phase":{"type":"string","enum":["planning","soon","underway","ended"]},"dayId":{"type":"string","format":"uuid","nullable":true,"description":"Today's day while the trip is under way; null otherwise."},"stops":{"type":"array","items":{"type":"object","properties":{"activityId":{"type":"string","format":"uuid"},"title":{"type":"string"},"timeWindow":{"type":"object","properties":{"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["start","end"],"additionalProperties":false,"nullable":true},"location":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"lat":{"type":"number","minimum":-90,"maximum":90,"description":"Send with lng, or omit both. When omitted on a v1 write, the server geocodes `address`, then `name`."},"lng":{"type":"number","minimum":-180,"maximum":180,"description":"Send with lat, or omit both."},"countryCode":{"type":"string","pattern":"^[A-Z]{2}$"},"city":{"type":"string","minLength":1,"maxLength":200},"area":{"type":"string","minLength":1,"maxLength":200},"precision":{"type":"string","enum":["venue","area","city"],"description":"What the coordinates describe: a `venue`, an `area` or a `city`. Requires `lat` and `lng` — sent without them it is refused (\"precision requires coordinates\")."},"verified":{"type":"boolean","enum":[false],"description":"`false` when no geocoder confirmed the coordinates (an assistant's guess). Absent = unknown. Requires `lat` and `lng`."},"address":{"type":"object","properties":{"countryCode":{"type":"string","pattern":"^[A-Z]{2}$","description":"ISO 3166-1 alpha-2, uppercase. Decides how the other fields are read."},"lines":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"description":"Street-level part, in the country's own order, e.g. [\"Hauptstraße 5\"] or [\"1-2-3 Nishi-Azabu\"]."},"dependentLocality":{"type":"string","minLength":1,"maxLength":200,"description":"District, neighbourhood or suburb when it is part of the postal address."},"locality":{"type":"string","minLength":1,"maxLength":200,"description":"City, town or post town."},"administrativeArea":{"type":"string","minLength":1,"maxLength":200,"description":"State, province, prefecture or region."},"postalCode":{"type":"string","minLength":1,"maxLength":20,"description":"A string: keeps leading zeros and letters."}},"required":["countryCode","lines"],"additionalProperties":false}},"required":["name"],"additionalProperties":false,"nullable":true},"notes":{"type":"string","nullable":true},"anchors":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["dayOfWeek"]},"days":{"minItems":1,"type":"array","items":{"type":"string","enum":["mon","tue","wed","thu","fri","sat","sun"]}}},"required":["kind","days"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["dateRange"]},"from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["kind","from","to"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["timeOfDay"]},"window":{"type":"object","properties":{"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["start","end"],"additionalProperties":false}},"required":["kind","window"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["publicHoliday"]},"country":{"type":"string","pattern":"^[A-Z]{2}$"}},"required":["kind","country"],"additionalProperties":false}]}},"kind":{"type":"string","enum":["planned","pending","transit"],"default":"planned"},"tags":{"type":"array","items":{"type":"string","enum":["meal","lodging","ticketed","outdoors","drinks","nightlife","museum","sight","beach","shopping","show","tour","wellness","sports"]},"default":[]},"cost":{"type":"object","properties":{"amountMinor":{"type":"integer","minimum":0},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"],"additionalProperties":false,"nullable":true,"description":"Price for one person, in the trip's currency. A stop's total is this times its headcount: the people in `participants`, or every traveller on the trip when `participants` is empty. A `pending` stop's cost is an estimate; a `planned` or `transit` stop's is committed."},"bookedBy":{"type":"string","nullable":true,"default":null},"participants":{"type":"array","items":{"type":"string"},"default":[]},"addedBy":{"type":"string","nullable":true,"default":null},"mode":{"type":"string","enum":["walk","bus","train","flight","ferry","car","bike"],"nullable":true,"default":null},"endLocation":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"lat":{"type":"number","minimum":-90,"maximum":90,"description":"Send with lng, or omit both. When omitted on a v1 write, the server geocodes `address`, then `name`."},"lng":{"type":"number","minimum":-180,"maximum":180,"description":"Send with lat, or omit both."},"countryCode":{"type":"string","pattern":"^[A-Z]{2}$"},"city":{"type":"string","minLength":1,"maxLength":200},"area":{"type":"string","minLength":1,"maxLength":200},"precision":{"type":"string","enum":["venue","area","city"],"description":"What the coordinates describe: a `venue`, an `area` or a `city`. Requires `lat` and `lng` — sent without them it is refused (\"precision requires coordinates\")."},"verified":{"type":"boolean","enum":[false],"description":"`false` when no geocoder confirmed the coordinates (an assistant's guess). Absent = unknown. Requires `lat` and `lng`."},"address":{"type":"object","properties":{"countryCode":{"type":"string","pattern":"^[A-Z]{2}$","description":"ISO 3166-1 alpha-2, uppercase. Decides how the other fields are read."},"lines":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"description":"Street-level part, in the country's own order, e.g. [\"Hauptstraße 5\"] or [\"1-2-3 Nishi-Azabu\"]."},"dependentLocality":{"type":"string","minLength":1,"maxLength":200,"description":"District, neighbourhood or suburb when it is part of the postal address."},"locality":{"type":"string","minLength":1,"maxLength":200,"description":"City, town or post town."},"administrativeArea":{"type":"string","minLength":1,"maxLength":200,"description":"State, province, prefecture or region."},"postalCode":{"type":"string","minLength":1,"maxLength":20,"description":"A string: keeps leading zeros and letters."}},"required":["countryCode","lines"],"additionalProperties":false}},"required":["name"],"additionalProperties":false,"nullable":true,"default":null},"pendingReason":{"type":"string","enum":["book","maybe"],"nullable":true,"default":null},"flightNumber":{"type":"string","nullable":true,"default":null},"booking":{"type":"object","properties":{"confirmation":{"type":"string"},"provider":{"type":"string","nullable":true},"url":{"type":"string"}},"additionalProperties":false,"nullable":true,"default":null}},"required":["activityId","title","timeWindow","location","notes","anchors","cost"],"additionalProperties":false},"description":"Today's stops in the day's order; empty off the trip's days."},"now":{"type":"string","format":"uuid","nullable":true,"description":"The stop under way, while the trip is."},"next":{"type":"string","format":"uuid","nullable":true,"description":"The next stop to begin, while the trip is under way."}},"required":["date","timeZone","phase","dayId","stops","now","next"],"additionalProperties":false}}}},"4XX":{"description":"One envelope for every failure: `{ error: { code, message, details? } }`. 401 carries `WWW-Authenticate: Bearer`; 429 carries `Retry-After`."}}}},"/v1/trips/import":{"post":{"summary":"Create a new trip from a content-bundle file (the format export produces)","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://caesura.today/api/v1/trips/import' \\\n  -H 'Authorization: Bearer tc_YOUR_TOKEN' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n  \"$schema\": \"travel-collab/content-bundle/v1\",\n  \"bundle\": {\n    \"id\": \"string\",\n    \"name\": \"string\",\n    \"origin\": \"human\"\n  }\n}'"},{"lang":"JavaScript","label":"JavaScript (fetch)","source":"const response = await fetch(\"https://caesura.today/api/v1/trips/import\", {\n  method: \"POST\",\n  headers: {\n    Authorization: \"Bearer tc_YOUR_TOKEN\",\n    \"Content-Type\": \"application/json\",\n  },\n  body: JSON.stringify({\n    \"$schema\": \"travel-collab/content-bundle/v1\",\n    \"bundle\": {\n      \"id\": \"string\",\n      \"name\": \"string\",\n      \"origin\": \"human\"\n    }\n  }),\n});\nconst data = await response.json();"},{"lang":"Python","label":"Python (requests)","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://caesura.today/api/v1/trips/import\",\n    headers={\"Authorization\": \"Bearer tc_YOUR_TOKEN\"},\n    json={\"$schema\": \"travel-collab/content-bundle/v1\", \"bundle\": {\"id\": \"string\", \"name\": \"string\", \"origin\": \"human\"}},\n)\ndata = response.json()"}],"description":"Requires the `trips:write` scope.","security":[{"bearerAuth":["trips:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"$schema":{"type":"string","enum":["travel-collab/content-bundle/v1"]},"bundle":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[a-z0-9-]+$"},"name":{"type":"string","minLength":1,"maxLength":200},"origin":{"type":"string","enum":["human","ai"]},"sources":{"type":"array","items":{"type":"string"},"default":[]},"generatedAt":{"type":"string"},"description":{"type":"string","maxLength":1000}},"required":["id","name","origin"],"additionalProperties":false},"trips":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[a-z0-9-]+$"},"name":{"type":"string","minLength":1,"maxLength":200},"summary":{"type":"string","maxLength":500},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"budget":{"type":"object","properties":{"amountMinor":{"type":"integer","minimum":0},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"],"additionalProperties":false},"startsInDays":{"type":"integer","minimum":-36500,"maximum":36500},"startDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"days":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":200},"stops":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"timeWindow":{"type":"object","properties":{"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["start","end"],"additionalProperties":false},"location":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"lat":{"type":"number","minimum":-90,"maximum":90,"description":"Send with lng, or omit both. When omitted on a v1 write, the server geocodes `address`, then `name`."},"lng":{"type":"number","minimum":-180,"maximum":180,"description":"Send with lat, or omit both."},"countryCode":{"type":"string","pattern":"^[A-Z]{2}$"},"city":{"type":"string","minLength":1,"maxLength":200},"area":{"type":"string","minLength":1,"maxLength":200},"precision":{"type":"string","enum":["venue","area","city"],"description":"What the coordinates describe: a `venue`, an `area` or a `city`. Requires `lat` and `lng` — sent without them it is refused (\"precision requires coordinates\")."},"verified":{"type":"boolean","enum":[false],"description":"`false` when no geocoder confirmed the coordinates (an assistant's guess). Absent = unknown. Requires `lat` and `lng`."},"address":{"type":"object","properties":{"countryCode":{"type":"string","pattern":"^[A-Z]{2}$","description":"ISO 3166-1 alpha-2, uppercase. Decides how the other fields are read."},"lines":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"description":"Street-level part, in the country's own order, e.g. [\"Hauptstraße 5\"] or [\"1-2-3 Nishi-Azabu\"]."},"dependentLocality":{"type":"string","minLength":1,"maxLength":200,"description":"District, neighbourhood or suburb when it is part of the postal address."},"locality":{"type":"string","minLength":1,"maxLength":200,"description":"City, town or post town."},"administrativeArea":{"type":"string","minLength":1,"maxLength":200,"description":"State, province, prefecture or region."},"postalCode":{"type":"string","minLength":1,"maxLength":20,"description":"A string: keeps leading zeros and letters."}},"required":["countryCode","lines"],"additionalProperties":false}},"required":["name"],"additionalProperties":false},"notes":{"type":"string","maxLength":2000},"anchors":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["dayOfWeek"]},"days":{"minItems":1,"type":"array","items":{"type":"string","enum":["mon","tue","wed","thu","fri","sat","sun"]}}},"required":["kind","days"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["dateRange"]},"from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["kind","from","to"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["timeOfDay"]},"window":{"type":"object","properties":{"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["start","end"],"additionalProperties":false}},"required":["kind","window"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["publicHoliday"]},"country":{"type":"string","pattern":"^[A-Z]{2}$"}},"required":["kind","country"],"additionalProperties":false}]}},"kind":{"type":"string","enum":["planned","pending","transit"]},"tags":{"type":"array","items":{"type":"string","enum":["meal","lodging","ticketed","outdoors","drinks","nightlife","museum","sight","beach","shopping","show","tour","wellness","sports"]}},"cost":{"type":"object","properties":{"amountMinor":{"type":"integer","minimum":0},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"],"additionalProperties":false},"mode":{"type":"string","enum":["walk","bus","train","flight","ferry","car","bike"]},"endLocation":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"lat":{"type":"number","minimum":-90,"maximum":90,"description":"Send with lng, or omit both. When omitted on a v1 write, the server geocodes `address`, then `name`."},"lng":{"type":"number","minimum":-180,"maximum":180,"description":"Send with lat, or omit both."},"countryCode":{"type":"string","pattern":"^[A-Z]{2}$"},"city":{"type":"string","minLength":1,"maxLength":200},"area":{"type":"string","minLength":1,"maxLength":200},"precision":{"type":"string","enum":["venue","area","city"],"description":"What the coordinates describe: a `venue`, an `area` or a `city`. Requires `lat` and `lng` — sent without them it is refused (\"precision requires coordinates\")."},"verified":{"type":"boolean","enum":[false],"description":"`false` when no geocoder confirmed the coordinates (an assistant's guess). Absent = unknown. Requires `lat` and `lng`."},"address":{"type":"object","properties":{"countryCode":{"type":"string","pattern":"^[A-Z]{2}$","description":"ISO 3166-1 alpha-2, uppercase. Decides how the other fields are read."},"lines":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"description":"Street-level part, in the country's own order, e.g. [\"Hauptstraße 5\"] or [\"1-2-3 Nishi-Azabu\"]."},"dependentLocality":{"type":"string","minLength":1,"maxLength":200,"description":"District, neighbourhood or suburb when it is part of the postal address."},"locality":{"type":"string","minLength":1,"maxLength":200,"description":"City, town or post town."},"administrativeArea":{"type":"string","minLength":1,"maxLength":200,"description":"State, province, prefecture or region."},"postalCode":{"type":"string","minLength":1,"maxLength":20,"description":"A string: keeps leading zeros and letters."}},"required":["countryCode","lines"],"additionalProperties":false}},"required":["name"],"additionalProperties":false},"pendingReason":{"type":"string","enum":["book","maybe"]},"flightNumber":{"type":"string","minLength":1,"maxLength":20},"booking":{"type":"object","properties":{"confirmation":{"type":"string","minLength":1,"maxLength":100},"provider":{"type":"string","minLength":1,"maxLength":100},"url":{"type":"string","maxLength":2000,"format":"uri"}},"additionalProperties":false}},"required":["title"],"additionalProperties":false}}},"required":["stops"],"additionalProperties":false}},"backlog":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"timeWindow":{"type":"object","properties":{"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["start","end"],"additionalProperties":false},"location":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"lat":{"type":"number","minimum":-90,"maximum":90,"description":"Send with lng, or omit both. When omitted on a v1 write, the server geocodes `address`, then `name`."},"lng":{"type":"number","minimum":-180,"maximum":180,"description":"Send with lat, or omit both."},"countryCode":{"type":"string","pattern":"^[A-Z]{2}$"},"city":{"type":"string","minLength":1,"maxLength":200},"area":{"type":"string","minLength":1,"maxLength":200},"precision":{"type":"string","enum":["venue","area","city"],"description":"What the coordinates describe: a `venue`, an `area` or a `city`. Requires `lat` and `lng` — sent without them it is refused (\"precision requires coordinates\")."},"verified":{"type":"boolean","enum":[false],"description":"`false` when no geocoder confirmed the coordinates (an assistant's guess). Absent = unknown. Requires `lat` and `lng`."},"address":{"type":"object","properties":{"countryCode":{"type":"string","pattern":"^[A-Z]{2}$","description":"ISO 3166-1 alpha-2, uppercase. Decides how the other fields are read."},"lines":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"description":"Street-level part, in the country's own order, e.g. [\"Hauptstraße 5\"] or [\"1-2-3 Nishi-Azabu\"]."},"dependentLocality":{"type":"string","minLength":1,"maxLength":200,"description":"District, neighbourhood or suburb when it is part of the postal address."},"locality":{"type":"string","minLength":1,"maxLength":200,"description":"City, town or post town."},"administrativeArea":{"type":"string","minLength":1,"maxLength":200,"description":"State, province, prefecture or region."},"postalCode":{"type":"string","minLength":1,"maxLength":20,"description":"A string: keeps leading zeros and letters."}},"required":["countryCode","lines"],"additionalProperties":false}},"required":["name"],"additionalProperties":false},"notes":{"type":"string","maxLength":2000},"anchors":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["dayOfWeek"]},"days":{"minItems":1,"type":"array","items":{"type":"string","enum":["mon","tue","wed","thu","fri","sat","sun"]}}},"required":["kind","days"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["dateRange"]},"from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["kind","from","to"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["timeOfDay"]},"window":{"type":"object","properties":{"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["start","end"],"additionalProperties":false}},"required":["kind","window"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["publicHoliday"]},"country":{"type":"string","pattern":"^[A-Z]{2}$"}},"required":["kind","country"],"additionalProperties":false}]}},"kind":{"type":"string","enum":["planned","pending","transit"]},"tags":{"type":"array","items":{"type":"string","enum":["meal","lodging","ticketed","outdoors","drinks","nightlife","museum","sight","beach","shopping","show","tour","wellness","sports"]}},"cost":{"type":"object","properties":{"amountMinor":{"type":"integer","minimum":0},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"],"additionalProperties":false},"mode":{"type":"string","enum":["walk","bus","train","flight","ferry","car","bike"]},"endLocation":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"lat":{"type":"number","minimum":-90,"maximum":90,"description":"Send with lng, or omit both. When omitted on a v1 write, the server geocodes `address`, then `name`."},"lng":{"type":"number","minimum":-180,"maximum":180,"description":"Send with lat, or omit both."},"countryCode":{"type":"string","pattern":"^[A-Z]{2}$"},"city":{"type":"string","minLength":1,"maxLength":200},"area":{"type":"string","minLength":1,"maxLength":200},"precision":{"type":"string","enum":["venue","area","city"],"description":"What the coordinates describe: a `venue`, an `area` or a `city`. Requires `lat` and `lng` — sent without them it is refused (\"precision requires coordinates\")."},"verified":{"type":"boolean","enum":[false],"description":"`false` when no geocoder confirmed the coordinates (an assistant's guess). Absent = unknown. Requires `lat` and `lng`."},"address":{"type":"object","properties":{"countryCode":{"type":"string","pattern":"^[A-Z]{2}$","description":"ISO 3166-1 alpha-2, uppercase. Decides how the other fields are read."},"lines":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"description":"Street-level part, in the country's own order, e.g. [\"Hauptstraße 5\"] or [\"1-2-3 Nishi-Azabu\"]."},"dependentLocality":{"type":"string","minLength":1,"maxLength":200,"description":"District, neighbourhood or suburb when it is part of the postal address."},"locality":{"type":"string","minLength":1,"maxLength":200,"description":"City, town or post town."},"administrativeArea":{"type":"string","minLength":1,"maxLength":200,"description":"State, province, prefecture or region."},"postalCode":{"type":"string","minLength":1,"maxLength":20,"description":"A string: keeps leading zeros and letters."}},"required":["countryCode","lines"],"additionalProperties":false}},"required":["name"],"additionalProperties":false},"pendingReason":{"type":"string","enum":["book","maybe"]},"flightNumber":{"type":"string","minLength":1,"maxLength":20},"booking":{"type":"object","properties":{"confirmation":{"type":"string","minLength":1,"maxLength":100},"provider":{"type":"string","minLength":1,"maxLength":100},"url":{"type":"string","maxLength":2000,"format":"uri"}},"additionalProperties":false}},"required":["title"],"additionalProperties":false},"default":[]}},"required":["key","name","days"],"additionalProperties":false},"default":[]}},"required":["$schema","bundle"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"tripId":{"type":"string","format":"uuid"},"name":{"type":"string"},"status":{"type":"string","enum":["active","deleted"]},"startDate":{"type":"string","nullable":true},"currency":{"type":"string"},"budget":{"type":"object","properties":{"amountMinor":{"type":"integer","minimum":0},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"],"additionalProperties":false,"nullable":true},"members":{"minItems":1,"type":"array","items":{"type":"object","properties":{"userId":{"type":"string","minLength":1},"role":{"type":"string","enum":["viewer","suggester","editor","owner"]},"travelling":{"type":"boolean"}},"required":["userId","role"],"additionalProperties":false}},"forkedFrom":{"type":"object","properties":{"tripId":{"type":"string","format":"uuid"},"atSeq":{"type":"integer","minimum":1},"name":{"type":"string","minLength":1,"maxLength":200}},"required":["tripId","atSeq","name"],"additionalProperties":false,"nullable":true,"default":null},"pace":{"type":"string","enum":["slow","balanced","packed"],"nullable":true,"default":null},"tags":{"type":"array","items":{"type":"string","enum":["meal","outdoors","drinks","nightlife","museum","sight","beach","shopping","show","tour","wellness","sports"]},"default":[]},"days":{"type":"array","items":{"type":"object","properties":{"dayId":{"type":"string","format":"uuid"},"activityIds":{"type":"array","items":{"type":"string","format":"uuid"}},"date":{"type":"string","nullable":true},"costSubtotal":{"type":"integer"}},"required":["dayId","activityIds","date","costSubtotal"],"additionalProperties":false}},"backlog":{"type":"array","items":{"type":"string","format":"uuid"}},"parkedFrom":{"type":"object","additionalProperties":{"type":"string","format":"uuid"}},"activities":{"type":"object","additionalProperties":{"type":"object","properties":{"activityId":{"type":"string","format":"uuid"},"title":{"type":"string"},"timeWindow":{"type":"object","properties":{"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["start","end"],"additionalProperties":false,"nullable":true},"location":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"lat":{"type":"number","minimum":-90,"maximum":90,"description":"Send with lng, or omit both. When omitted on a v1 write, the server geocodes `address`, then `name`."},"lng":{"type":"number","minimum":-180,"maximum":180,"description":"Send with lat, or omit both."},"countryCode":{"type":"string","pattern":"^[A-Z]{2}$"},"city":{"type":"string","minLength":1,"maxLength":200},"area":{"type":"string","minLength":1,"maxLength":200},"precision":{"type":"string","enum":["venue","area","city"],"description":"What the coordinates describe: a `venue`, an `area` or a `city`. Requires `lat` and `lng` — sent without them it is refused (\"precision requires coordinates\")."},"verified":{"type":"boolean","enum":[false],"description":"`false` when no geocoder confirmed the coordinates (an assistant's guess). Absent = unknown. Requires `lat` and `lng`."},"address":{"type":"object","properties":{"countryCode":{"type":"string","pattern":"^[A-Z]{2}$","description":"ISO 3166-1 alpha-2, uppercase. Decides how the other fields are read."},"lines":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"description":"Street-level part, in the country's own order, e.g. [\"Hauptstraße 5\"] or [\"1-2-3 Nishi-Azabu\"]."},"dependentLocality":{"type":"string","minLength":1,"maxLength":200,"description":"District, neighbourhood or suburb when it is part of the postal address."},"locality":{"type":"string","minLength":1,"maxLength":200,"description":"City, town or post town."},"administrativeArea":{"type":"string","minLength":1,"maxLength":200,"description":"State, province, prefecture or region."},"postalCode":{"type":"string","minLength":1,"maxLength":20,"description":"A string: keeps leading zeros and letters."}},"required":["countryCode","lines"],"additionalProperties":false}},"required":["name"],"additionalProperties":false,"nullable":true},"notes":{"type":"string","nullable":true},"anchors":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["dayOfWeek"]},"days":{"minItems":1,"type":"array","items":{"type":"string","enum":["mon","tue","wed","thu","fri","sat","sun"]}}},"required":["kind","days"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["dateRange"]},"from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["kind","from","to"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["timeOfDay"]},"window":{"type":"object","properties":{"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["start","end"],"additionalProperties":false}},"required":["kind","window"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["publicHoliday"]},"country":{"type":"string","pattern":"^[A-Z]{2}$"}},"required":["kind","country"],"additionalProperties":false}]}},"kind":{"type":"string","enum":["planned","pending","transit"],"default":"planned"},"tags":{"type":"array","items":{"type":"string","enum":["meal","lodging","ticketed","outdoors","drinks","nightlife","museum","sight","beach","shopping","show","tour","wellness","sports"]},"default":[]},"cost":{"type":"object","properties":{"amountMinor":{"type":"integer","minimum":0},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"],"additionalProperties":false,"nullable":true,"description":"Price for one person, in the trip's currency. A stop's total is this times its headcount: the people in `participants`, or every traveller on the trip when `participants` is empty. A `pending` stop's cost is an estimate; a `planned` or `transit` stop's is committed."},"bookedBy":{"type":"string","nullable":true,"default":null},"participants":{"type":"array","items":{"type":"string"},"default":[]},"addedBy":{"type":"string","nullable":true,"default":null},"mode":{"type":"string","enum":["walk","bus","train","flight","ferry","car","bike"],"nullable":true,"default":null},"endLocation":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"lat":{"type":"number","minimum":-90,"maximum":90,"description":"Send with lng, or omit both. When omitted on a v1 write, the server geocodes `address`, then `name`."},"lng":{"type":"number","minimum":-180,"maximum":180,"description":"Send with lat, or omit both."},"countryCode":{"type":"string","pattern":"^[A-Z]{2}$"},"city":{"type":"string","minLength":1,"maxLength":200},"area":{"type":"string","minLength":1,"maxLength":200},"precision":{"type":"string","enum":["venue","area","city"],"description":"What the coordinates describe: a `venue`, an `area` or a `city`. Requires `lat` and `lng` — sent without them it is refused (\"precision requires coordinates\")."},"verified":{"type":"boolean","enum":[false],"description":"`false` when no geocoder confirmed the coordinates (an assistant's guess). Absent = unknown. Requires `lat` and `lng`."},"address":{"type":"object","properties":{"countryCode":{"type":"string","pattern":"^[A-Z]{2}$","description":"ISO 3166-1 alpha-2, uppercase. Decides how the other fields are read."},"lines":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"description":"Street-level part, in the country's own order, e.g. [\"Hauptstraße 5\"] or [\"1-2-3 Nishi-Azabu\"]."},"dependentLocality":{"type":"string","minLength":1,"maxLength":200,"description":"District, neighbourhood or suburb when it is part of the postal address."},"locality":{"type":"string","minLength":1,"maxLength":200,"description":"City, town or post town."},"administrativeArea":{"type":"string","minLength":1,"maxLength":200,"description":"State, province, prefecture or region."},"postalCode":{"type":"string","minLength":1,"maxLength":20,"description":"A string: keeps leading zeros and letters."}},"required":["countryCode","lines"],"additionalProperties":false}},"required":["name"],"additionalProperties":false,"nullable":true,"default":null},"pendingReason":{"type":"string","enum":["book","maybe"],"nullable":true,"default":null},"flightNumber":{"type":"string","nullable":true,"default":null},"booking":{"type":"object","properties":{"confirmation":{"type":"string"},"provider":{"type":"string","nullable":true},"url":{"type":"string"}},"additionalProperties":false,"nullable":true,"default":null}},"required":["activityId","title","timeWindow","location","notes","anchors","cost"],"additionalProperties":false}},"conflicts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"severity":{"type":"string","enum":["info","warn","error"]},"subjects":{"type":"array","items":{"type":"string"}},"resolutions":{"type":"array","items":{"type":"string"}},"description":{"type":"string"}},"required":["id","kind","severity","subjects","description","resolutions"],"additionalProperties":false}},"dismissedConflictIds":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string"},"unscheduledCostSubtotal":{"type":"integer"},"tripCostTotal":{"type":"integer"},"budgetRemaining":{"type":"integer","nullable":true}},"required":["tripId","name","status","startDate","currency","budget","members","days","backlog","activities","conflicts","dismissedConflictIds","createdAt","unscheduledCostSubtotal","tripCostTotal","budgetRemaining"],"additionalProperties":false}}}},"4XX":{"description":"One envelope for every failure: `{ error: { code, message, details? } }`. 401 carries `WWW-Authenticate: Bearer`; 429 carries `Retry-After`."}}}},"/v1/trips":{"get":{"summary":"List the trips you own or are a member of","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X GET 'https://caesura.today/api/v1/trips' \\\n  -H 'Authorization: Bearer tc_YOUR_TOKEN'"},{"lang":"JavaScript","label":"JavaScript (fetch)","source":"const response = await fetch(\"https://caesura.today/api/v1/trips\", {\n  method: \"GET\",\n  headers: {\n    Authorization: \"Bearer tc_YOUR_TOKEN\",\n  },\n});\nconst data = await response.json();"},{"lang":"Python","label":"Python (requests)","source":"import requests\n\nresponse = requests.request(\n    \"GET\",\n    \"https://caesura.today/api/v1/trips\",\n    headers={\"Authorization\": \"Bearer tc_YOUR_TOKEN\"},\n)\ndata = response.json()"}],"description":"Requires the `trips:read` scope, or `current:read`.","security":[{"bearerAuth":["trips:read"]},{"bearerAuth":["current:read"]}],"parameters":[{"name":"limit","in":"query","required":false,"description":"1 to 200. A value outside that range is refused, never clamped.","schema":{"type":"integer","minimum":1,"maximum":200}},{"name":"cursor","in":"query","required":false,"description":"Opaque. Pass back the `nextCursor` of the previous page.","schema":{"type":"string"}},{"name":"active","in":"query","required":false,"schema":{"type":"string","enum":["true","false"],"description":"`true` lists only the trips under way today, by each trip's own zone. An undated trip is never under way. A page may be short, or empty, and still give a cursor to the next one: the scan stops after a fixed number of rows. Keep paging until the cursor is null. A token holding only `current:read` always lists the current trips — under way now or starting soon — with or without this."}}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","required":["items","nextCursor"],"properties":{"items":{"type":"array","items":{"type":"object","properties":{"tripId":{"type":"string","format":"uuid"},"name":{"type":"string"},"status":{"type":"string","enum":["active","deleted"]},"members":{"minItems":1,"type":"array","items":{"type":"object","properties":{"userId":{"type":"string","minLength":1},"role":{"type":"string","enum":["viewer","suggester","editor","owner"]},"travelling":{"type":"boolean"}},"required":["userId","role"],"additionalProperties":false}},"createdAt":{"type":"string"},"startDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true,"default":null},"endDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true,"default":null},"dayCount":{"type":"integer","minimum":0,"default":0},"stopCount":{"type":"integer","minimum":0,"default":0},"ideaCount":{"type":"integer","minimum":0,"default":0},"cover":{"anyOf":[{"type":"object","properties":{"source":{"type":"string","enum":["unsplash"]},"unsplashId":{"type":"string","minLength":1},"urls":{"type":"object","properties":{"raw":{"type":"string","minLength":1,"maxLength":2048},"regular":{"type":"string","minLength":1,"maxLength":2048},"small":{"type":"string","minLength":1,"maxLength":2048}},"required":["raw","regular","small"],"additionalProperties":false},"alt":{"type":"string","nullable":true,"default":null},"photographerName":{"type":"string","minLength":1},"photographerUrl":{"type":"string","minLength":1,"maxLength":2048},"photoPageUrl":{"type":"string","minLength":1,"maxLength":2048},"position":{"type":"integer","minimum":0,"maximum":100,"default":50}},"required":["source","unsplashId","urls","photographerName","photographerUrl","photoPageUrl"],"additionalProperties":false},{"type":"object","properties":{"source":{"type":"string","enum":["url"]},"url":{"type":"string","minLength":1,"maxLength":2048},"alt":{"type":"string","maxLength":1000,"nullable":true,"default":null},"credit":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"url":{"type":"string","minLength":1,"maxLength":2048,"nullable":true,"default":null}},"required":["name"],"additionalProperties":false,"nullable":true,"default":null},"position":{"type":"integer","minimum":0,"maximum":100,"default":50},"proxySrc":{"type":"string","minLength":1,"maxLength":2048}},"required":["source","url"],"additionalProperties":false}],"nullable":true,"default":null},"description":{"type":"string","nullable":true,"default":null}},"required":["tripId","name","status","members","createdAt"],"additionalProperties":false}},"nextCursor":{"type":"string","nullable":true}}}}}},"4XX":{"description":"One envelope for every failure: `{ error: { code, message, details? } }`. 401 carries `WWW-Authenticate: Bearer`; 429 carries `Retry-After`."}}},"post":{"summary":"Create a new trip that you own, optionally with a start date or a start and end date","x-codeSamples":[{"lang":"Shell","label":"curl","source":"curl -X POST 'https://caesura.today/api/v1/trips' \\\n  -H 'Authorization: Bearer tc_YOUR_TOKEN' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n  \"name\": \"string\"\n}'"},{"lang":"JavaScript","label":"JavaScript (fetch)","source":"const response = await fetch(\"https://caesura.today/api/v1/trips\", {\n  method: \"POST\",\n  headers: {\n    Authorization: \"Bearer tc_YOUR_TOKEN\",\n    \"Content-Type\": \"application/json\",\n  },\n  body: JSON.stringify({\n    \"name\": \"string\"\n  }),\n});\nconst data = await response.json();"},{"lang":"Python","label":"Python (requests)","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://caesura.today/api/v1/trips\",\n    headers={\"Authorization\": \"Bearer tc_YOUR_TOKEN\"},\n    json={\"name\": \"string\"},\n)\ndata = response.json()"}],"description":"Requires the `trips:write` scope.","security":[{"bearerAuth":["trips:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"startDate":{"type":"string"},"endDate":{"type":"string"}},"required":["name"],"additionalProperties":false}}}},"responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"tripId":{"type":"string","format":"uuid"},"name":{"type":"string"},"status":{"type":"string","enum":["active","deleted"]},"startDate":{"type":"string","nullable":true},"currency":{"type":"string"},"budget":{"type":"object","properties":{"amountMinor":{"type":"integer","minimum":0},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"],"additionalProperties":false,"nullable":true},"members":{"minItems":1,"type":"array","items":{"type":"object","properties":{"userId":{"type":"string","minLength":1},"role":{"type":"string","enum":["viewer","suggester","editor","owner"]},"travelling":{"type":"boolean"}},"required":["userId","role"],"additionalProperties":false}},"forkedFrom":{"type":"object","properties":{"tripId":{"type":"string","format":"uuid"},"atSeq":{"type":"integer","minimum":1},"name":{"type":"string","minLength":1,"maxLength":200}},"required":["tripId","atSeq","name"],"additionalProperties":false,"nullable":true,"default":null},"pace":{"type":"string","enum":["slow","balanced","packed"],"nullable":true,"default":null},"tags":{"type":"array","items":{"type":"string","enum":["meal","outdoors","drinks","nightlife","museum","sight","beach","shopping","show","tour","wellness","sports"]},"default":[]},"days":{"type":"array","items":{"type":"object","properties":{"dayId":{"type":"string","format":"uuid"},"activityIds":{"type":"array","items":{"type":"string","format":"uuid"}},"date":{"type":"string","nullable":true},"costSubtotal":{"type":"integer"}},"required":["dayId","activityIds","date","costSubtotal"],"additionalProperties":false}},"backlog":{"type":"array","items":{"type":"string","format":"uuid"}},"parkedFrom":{"type":"object","additionalProperties":{"type":"string","format":"uuid"}},"activities":{"type":"object","additionalProperties":{"type":"object","properties":{"activityId":{"type":"string","format":"uuid"},"title":{"type":"string"},"timeWindow":{"type":"object","properties":{"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["start","end"],"additionalProperties":false,"nullable":true},"location":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"lat":{"type":"number","minimum":-90,"maximum":90,"description":"Send with lng, or omit both. When omitted on a v1 write, the server geocodes `address`, then `name`."},"lng":{"type":"number","minimum":-180,"maximum":180,"description":"Send with lat, or omit both."},"countryCode":{"type":"string","pattern":"^[A-Z]{2}$"},"city":{"type":"string","minLength":1,"maxLength":200},"area":{"type":"string","minLength":1,"maxLength":200},"precision":{"type":"string","enum":["venue","area","city"],"description":"What the coordinates describe: a `venue`, an `area` or a `city`. Requires `lat` and `lng` — sent without them it is refused (\"precision requires coordinates\")."},"verified":{"type":"boolean","enum":[false],"description":"`false` when no geocoder confirmed the coordinates (an assistant's guess). Absent = unknown. Requires `lat` and `lng`."},"address":{"type":"object","properties":{"countryCode":{"type":"string","pattern":"^[A-Z]{2}$","description":"ISO 3166-1 alpha-2, uppercase. Decides how the other fields are read."},"lines":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"description":"Street-level part, in the country's own order, e.g. [\"Hauptstraße 5\"] or [\"1-2-3 Nishi-Azabu\"]."},"dependentLocality":{"type":"string","minLength":1,"maxLength":200,"description":"District, neighbourhood or suburb when it is part of the postal address."},"locality":{"type":"string","minLength":1,"maxLength":200,"description":"City, town or post town."},"administrativeArea":{"type":"string","minLength":1,"maxLength":200,"description":"State, province, prefecture or region."},"postalCode":{"type":"string","minLength":1,"maxLength":20,"description":"A string: keeps leading zeros and letters."}},"required":["countryCode","lines"],"additionalProperties":false}},"required":["name"],"additionalProperties":false,"nullable":true},"notes":{"type":"string","nullable":true},"anchors":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["dayOfWeek"]},"days":{"minItems":1,"type":"array","items":{"type":"string","enum":["mon","tue","wed","thu","fri","sat","sun"]}}},"required":["kind","days"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["dateRange"]},"from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["kind","from","to"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["timeOfDay"]},"window":{"type":"object","properties":{"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["start","end"],"additionalProperties":false}},"required":["kind","window"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["publicHoliday"]},"country":{"type":"string","pattern":"^[A-Z]{2}$"}},"required":["kind","country"],"additionalProperties":false}]}},"kind":{"type":"string","enum":["planned","pending","transit"],"default":"planned"},"tags":{"type":"array","items":{"type":"string","enum":["meal","lodging","ticketed","outdoors","drinks","nightlife","museum","sight","beach","shopping","show","tour","wellness","sports"]},"default":[]},"cost":{"type":"object","properties":{"amountMinor":{"type":"integer","minimum":0},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amountMinor","currency"],"additionalProperties":false,"nullable":true,"description":"Price for one person, in the trip's currency. A stop's total is this times its headcount: the people in `participants`, or every traveller on the trip when `participants` is empty. A `pending` stop's cost is an estimate; a `planned` or `transit` stop's is committed."},"bookedBy":{"type":"string","nullable":true,"default":null},"participants":{"type":"array","items":{"type":"string"},"default":[]},"addedBy":{"type":"string","nullable":true,"default":null},"mode":{"type":"string","enum":["walk","bus","train","flight","ferry","car","bike"],"nullable":true,"default":null},"endLocation":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"lat":{"type":"number","minimum":-90,"maximum":90,"description":"Send with lng, or omit both. When omitted on a v1 write, the server geocodes `address`, then `name`."},"lng":{"type":"number","minimum":-180,"maximum":180,"description":"Send with lat, or omit both."},"countryCode":{"type":"string","pattern":"^[A-Z]{2}$"},"city":{"type":"string","minLength":1,"maxLength":200},"area":{"type":"string","minLength":1,"maxLength":200},"precision":{"type":"string","enum":["venue","area","city"],"description":"What the coordinates describe: a `venue`, an `area` or a `city`. Requires `lat` and `lng` — sent without them it is refused (\"precision requires coordinates\")."},"verified":{"type":"boolean","enum":[false],"description":"`false` when no geocoder confirmed the coordinates (an assistant's guess). Absent = unknown. Requires `lat` and `lng`."},"address":{"type":"object","properties":{"countryCode":{"type":"string","pattern":"^[A-Z]{2}$","description":"ISO 3166-1 alpha-2, uppercase. Decides how the other fields are read."},"lines":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"description":"Street-level part, in the country's own order, e.g. [\"Hauptstraße 5\"] or [\"1-2-3 Nishi-Azabu\"]."},"dependentLocality":{"type":"string","minLength":1,"maxLength":200,"description":"District, neighbourhood or suburb when it is part of the postal address."},"locality":{"type":"string","minLength":1,"maxLength":200,"description":"City, town or post town."},"administrativeArea":{"type":"string","minLength":1,"maxLength":200,"description":"State, province, prefecture or region."},"postalCode":{"type":"string","minLength":1,"maxLength":20,"description":"A string: keeps leading zeros and letters."}},"required":["countryCode","lines"],"additionalProperties":false}},"required":["name"],"additionalProperties":false,"nullable":true,"default":null},"pendingReason":{"type":"string","enum":["book","maybe"],"nullable":true,"default":null},"flightNumber":{"type":"string","nullable":true,"default":null},"booking":{"type":"object","properties":{"confirmation":{"type":"string"},"provider":{"type":"string","nullable":true},"url":{"type":"string"}},"additionalProperties":false,"nullable":true,"default":null}},"required":["activityId","title","timeWindow","location","notes","anchors","cost"],"additionalProperties":false}},"conflicts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"severity":{"type":"string","enum":["info","warn","error"]},"subjects":{"type":"array","items":{"type":"string"}},"resolutions":{"type":"array","items":{"type":"string"}},"description":{"type":"string"}},"required":["id","kind","severity","subjects","description","resolutions"],"additionalProperties":false}},"dismissedConflictIds":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string"},"unscheduledCostSubtotal":{"type":"integer"},"tripCostTotal":{"type":"integer"},"budgetRemaining":{"type":"integer","nullable":true}},"required":["tripId","name","status","startDate","currency","budget","members","days","backlog","activities","conflicts","dismissedConflictIds","createdAt","unscheduledCostSubtotal","tripCostTotal","budgetRemaining"],"additionalProperties":false}}}},"4XX":{"description":"One envelope for every failure: `{ error: { code, message, details? } }`. 401 carries `WWW-Authenticate: Bearer`; 429 carries `Retry-After`."}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"tc_<base64url>"}},"schemas":{"PageNode":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["paragraph"]},"content":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"marks":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","minLength":1},"attrs":{"type":"object","additionalProperties":{}}},"required":["type"],"additionalProperties":false}}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["macro"]},"attrs":{"type":"object","properties":{"name":{"type":"string","minLength":1},"params":{"type":"object","additionalProperties":{},"default":{}},"hideWhenPublic":{"type":"boolean"}},"required":["name"],"additionalProperties":false}},"required":["type","attrs"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["hardBreak"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["unknown"]},"raw":{}},"required":["type"],"additionalProperties":false}]},"default":[]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["heading"]},"attrs":{"type":"object","properties":{"level":{"anyOf":[{"type":"number","enum":[1]},{"type":"number","enum":[2]},{"type":"number","enum":[3]},{"type":"number","enum":[4]},{"type":"number","enum":[5]},{"type":"number","enum":[6]}]}},"required":["level"],"additionalProperties":false},"content":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"marks":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","minLength":1},"attrs":{"type":"object","additionalProperties":{}}},"required":["type"],"additionalProperties":false}}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["macro"]},"attrs":{"type":"object","properties":{"name":{"type":"string","minLength":1},"params":{"type":"object","additionalProperties":{},"default":{}},"hideWhenPublic":{"type":"boolean"}},"required":["name"],"additionalProperties":false}},"required":["type","attrs"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["hardBreak"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["unknown"]},"raw":{}},"required":["type"],"additionalProperties":false}]},"default":[]}},"required":["type","attrs"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["macro"]},"attrs":{"type":"object","properties":{"name":{"type":"string","minLength":1},"params":{"type":"object","additionalProperties":{},"default":{}},"hideWhenPublic":{"type":"boolean"}},"required":["name"],"additionalProperties":false}},"required":["type","attrs"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["repeat"]},"attrs":{"type":"object","properties":{"name":{"type":"string","minLength":1},"params":{"type":"object","additionalProperties":{},"default":{}},"hideWhenPublic":{"type":"boolean"}},"required":["name"],"additionalProperties":false},"content":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"marks":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","minLength":1},"attrs":{"type":"object","additionalProperties":{}}},"required":["type"],"additionalProperties":false}}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["macro"]},"attrs":{"type":"object","properties":{"name":{"type":"string","minLength":1},"params":{"type":"object","additionalProperties":{},"default":{}},"hideWhenPublic":{"type":"boolean"}},"required":["name"],"additionalProperties":false}},"required":["type","attrs"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["hardBreak"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["unknown"]},"raw":{}},"required":["type"],"additionalProperties":false}]},"default":[]}},"required":["type","attrs"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["codeBlock"]},"attrs":{"type":"object","properties":{"language":{"type":"string","nullable":true}},"required":["language"],"additionalProperties":false,"default":{"language":null}},"content":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["unknown"]},"raw":{}},"required":["type"],"additionalProperties":false}]},"default":[]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["horizontalRule"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["blockquote"]},"content":{"type":"array","items":{"$ref":"#/components/schemas/PageNode"},"default":[]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["bulletList"]},"content":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["listItem"]},"content":{"type":"array","items":{"$ref":"#/components/schemas/PageNode"},"default":[]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["unknown"]},"raw":{}},"required":["type"],"additionalProperties":false}]},"default":[]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["orderedList"]},"attrs":{"type":"object","properties":{"start":{"type":"integer"},"type":{"type":"string","nullable":true}},"required":["start","type"],"additionalProperties":false,"default":{"start":1,"type":null}},"content":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["listItem"]},"content":{"type":"array","items":{"$ref":"#/components/schemas/PageNode"},"default":[]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["unknown"]},"raw":{}},"required":["type"],"additionalProperties":false}]},"default":[]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["unknown"]},"raw":{}},"required":["type"],"additionalProperties":false}]}}},"security":[{"bearerAuth":[]}]}