{"openapi":"3.2.0","info":{"title":"Retainer REST API","version":"v1","description":"The workspace REST API for Retainer. Object names and field shapes depend on the workspace schema."},"servers":[{"url":"https://retainer.tamloot.cc","description":"Hosted Retainer"},{"url":"http://localhost:8787","description":"Local Docker Compose"}],"security":[{"bearerAuth":[]}],"paths":{"/health":{"get":{"tags":["Workspace"],"operationId":"health","summary":"Check server health","description":"Check the server version and database connectivity.","security":[],"parameters":[],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Health"},"example":{"status":"ok","version":"0.1.0","database":"ok"}}}},"503":{"description":"The database is unreachable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Health"},"example":{"status":"error","version":"0.1.0","database":"unreachable"}}}}}}},"/v1/me":{"get":{"tags":["Workspace"],"operationId":"get-caller","summary":"Verify the caller and workspace","description":"Read the workspace, actor, scopes, and capabilities associated with this credential. Requires a workspace API key.","parameters":[],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Session"},"example":{"workspace":{"id":"d2c0648c-2994-4f16-bdf1-a0136be6037d","name":"Acme","slug":"acme"},"actor":{"type":"agent","id":"inbox","name":"Inbox agent"},"scopes":["read","write"],"person":false}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"default":{"$ref":"#/components/responses/ApiError"}}}},"/v1/schema":{"get":{"tags":["Schema"],"operationId":"get-schema","summary":"Read the workspace schema","description":"Find object and field API names, value formats, and built-in memory tools. Requires the `read` scope.","x-retainer-scope":"read","parameters":[],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SchemaDescription"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"default":{"$ref":"#/components/responses/ApiError"}}}},"/v1/objects/{object}/records":{"post":{"tags":["Records"],"operationId":"create-record","summary":"Create a record","description":"Requires the `write` scope.","x-retainer-scope":"write","parameters":[{"in":"path","name":"object","required":true,"description":"Object API name.","example":"company","schema":{"type":"string"}},{"in":"header","name":"Idempotency-Key","schema":{"type":"string","minLength":1,"maxLength":200},"description":"Reuse the same key with the same request to retry."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"values":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"source":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"bindings":{"type":"object","properties":{"bindings_revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"objectId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"fieldIds":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":100},"additionalProperties":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["bindings_revision","objectId","fieldIds"],"additionalProperties":false}},"required":["values"],"additionalProperties":false},"example":{"values":{"name":"Acme"}}}}},"responses":{"201":{"description":"Successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WriteResult"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"default":{"$ref":"#/components/responses/ApiError"}}}},"/v1/records/{id}":{"get":{"tags":["Records"],"operationId":"get-record","summary":"Read a record","description":"Requires the `read` scope.","x-retainer-scope":"read","parameters":[{"in":"path","name":"id","required":true,"description":"Retainer identifier.","example":"d2c0648c-2994-4f16-bdf1-a0136be6037d","schema":{"type":"string","format":"uuid"}},{"name":"include","in":"query","schema":{"type":"string"},"description":"Comma-separated provenance, relationReferences, or counts."}],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Record"},"example":{"id":"d2c0648c-2994-4f16-bdf1-a0136be6037d","object":"company","label":"Acme","fields":{"name":"Acme"},"createdAt":"2026-11-18T10:00:00Z","updatedAt":"2026-11-18T10:00:00Z","createdBy":{"type":"agent","id":"inbox"},"updatedBy":{"type":"agent","id":"inbox"}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"default":{"$ref":"#/components/responses/ApiError"}}},"patch":{"tags":["Records"],"operationId":"update-record","summary":"Update a record","description":"Set fields by API name. Supply expectedUpdatedAt to reject changes if the record has changed. Requires the `write` scope.","x-retainer-scope":"write","parameters":[{"in":"path","name":"id","required":true,"description":"Retainer identifier.","example":"d2c0648c-2994-4f16-bdf1-a0136be6037d","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"values":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"bindings":{"type":"object","properties":{"bindings_revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"objectId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"fieldIds":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":100},"additionalProperties":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["bindings_revision","objectId","fieldIds"],"additionalProperties":false},"expectedUpdatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"source":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["values"],"additionalProperties":false},"example":{"values":{"name":"Acme Ltd"},"source":"0f3a026b-dd58-4cb2-a871-98a8edabec97"}}}},"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WriteResult"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"default":{"$ref":"#/components/responses/ApiError"}}},"delete":{"tags":["Records"],"operationId":"delete-record","summary":"Soft-delete a record","description":"For events, also retracts facts and field claims that depended on the event. Requires the `write` scope.","x-retainer-scope":"write","parameters":[{"in":"path","name":"id","required":true,"description":"Retainer identifier.","example":"d2c0648c-2994-4f16-bdf1-a0136be6037d","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"bindings":{"type":"object","properties":{"bindings_revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"objectId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"fieldIds":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":100},"additionalProperties":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["bindings_revision","objectId","fieldIds"],"additionalProperties":false}},"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteRecord"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"default":{"$ref":"#/components/responses/ApiError"}}}},"/v1/objects/{object}/query":{"post":{"tags":["Records"],"operationId":"query-records","summary":"Query records","description":"Filter, sort, and page one object by its workspace field names. The reserved object names event and events use the shared event columns and return an event page. Use POST /v1/events/query for the cross-type query schema. Requires the `read` scope.","x-retainer-scope":"read","parameters":[{"in":"path","name":"object","required":true,"description":"Object API name.","example":"company","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"search":{"description":"Keywords within this object only, matched by Postgres full-text search over its label and searchable fields. Every word must match, as a whole word or the start of one (\"Dan\" finds \"Dana\"); accents are ignored.","type":"string","minLength":1,"maxLength":500},"filter":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"sort":{"maxItems":3,"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"direction":{"default":"asc","type":"string","enum":["asc","desc"]}},"required":["field"],"additionalProperties":false}},"limit":{"default":50,"type":"integer","minimum":1,"maximum":200},"cursor":{"type":"string"},"include":{"type":"array","items":{"type":"string","enum":["relationReferences"]}},"linked":{"description":"Event types only: events directly attached to this record, as a participant, about it, or through one of the event's own relation fields (link: field).","type":"object","properties":{"record":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"link":{"type":"string","enum":["participant","about","field"]}},"required":["record"],"additionalProperties":false}},"additionalProperties":false},"example":{"filter":{"name":"Acme"},"limit":10}}}},"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/RecordPage"},{"$ref":"#/components/schemas/EventPage"}]},"example":{"records":[],"nextCursor":null}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"default":{"$ref":"#/components/responses/ApiError"}}}},"/v1/objects/{object}/upsert":{"post":{"tags":["Records"],"operationId":"upsert-record","summary":"Update or create a matching record","description":"Identify the record by ID or one unique field. Set ifMissing to create to add a record when there is no match. Requires the `write` scope.","x-retainer-scope":"write","parameters":[{"in":"path","name":"object","required":true,"description":"Object API name.","example":"company","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"bindings":{"type":"object","properties":{"bindings_revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"objectId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"fieldIds":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":100},"additionalProperties":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["bindings_revision","objectId","fieldIds"],"additionalProperties":false},"match":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"minProperties":1,"maxProperties":1,"description":"Match one unique field."},"values":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"ifMissing":{"default":"fail","type":"string","enum":["fail","create"]},"expectedUpdatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"source":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"additionalProperties":false,"not":{"required":["id","match"]}},"example":{"id":"d2c0648c-2994-4f16-bdf1-a0136be6037d","values":{"name":"Acme Ltd"},"ifMissing":"fail"}}}},"responses":{"200":{"description":"An existing record was found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WriteResult"}}}},"201":{"description":"A record was created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WriteResult"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"default":{"$ref":"#/components/responses/ApiError"}}}},"/v1/records/upsert":{"post":{"tags":["Records"],"operationId":"upsert-records","summary":"Write multiple records","description":"Process records in order. Each item returns its own result or error. Requires the `write` scope.","x-retainer-scope":"write","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"items":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"object","properties":{"object":{"type":"string","minLength":1,"description":"Singular API name of the object, e.g. \"person\", as describe_schema lists it."},"id":{"description":"Update this record.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"bindings":{"type":"object","properties":{"bindings_revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"objectId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"fieldIds":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":100},"additionalProperties":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["bindings_revision","objectId","fieldIds"],"additionalProperties":false},"match":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"minProperties":1,"maxProperties":1,"description":"Match one unique field."},"values":{"default":{},"description":"Field name to value, in its type's format from describe_schema's valueFormats. Composite fields (emails, phones, links, money, full_name, address) are replaced whole, so include the values to keep. null clears a field. A many_to_many relation takes the whole list of record IDs ([] clears it): read the record first and send every member to keep. Fields marked readOnly are not yours to write: an inverse relation (isInverse) is written from the other side, and any other is written only by the app that added it.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"ifMissing":{"default":"fail","description":"When id or match finds nothing: \"fail\" (default) or \"create\". Use \"create\" only when you mean to add a new record.","type":"string","enum":["fail","create"]},"expectedUpdatedAt":{"description":"Reject the write if the record changed since this updatedAt.","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"source":{"description":"The event id (from log_event) these values come from. Values then carry the event's date, so an older email cannot overwrite a newer claim. Omit only for values that come from no conversation.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"idempotencyKey":{"description":"Only for creates without id or match: retrying with the same key returns the first result instead of creating a second record.","type":"string","minLength":1,"maxLength":200}},"required":["object"],"additionalProperties":false,"not":{"anyOf":[{"required":["id","match"]},{"required":["id","idempotencyKey"]},{"required":["match","idempotencyKey"]}]}}}},"required":["items"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"anyOf":[{"$ref":"#/components/schemas/WriteResult"},{"$ref":"#/components/schemas/Error"}]}}},"required":["results"]}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"default":{"$ref":"#/components/responses/ApiError"}}}},"/v1/objects/{object}/aggregate":{"post":{"tags":["Records"],"operationId":"aggregate-records","summary":"Aggregate matching records","description":"Requires the `read` scope.","x-retainer-scope":"read","parameters":[{"in":"path","name":"object","required":true,"description":"Object API name.","example":"company","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"search":{"description":"Keywords within this object only, matched by Postgres full-text search over its label and searchable fields. Every word must match, as a whole word or the start of one (\"Dan\" finds \"Dana\"); accents are ignored.","type":"string","minLength":1,"maxLength":500},"filter":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"aggregates":{"default":[],"maxItems":50,"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"op":{"type":"string","enum":["countEmpty","countNotEmpty","percentEmpty","percentNotEmpty","countUnique","sum","avg","min","max"]}},"required":["field","op"],"additionalProperties":false}},"groupBy":{"description":"A filterable select field: also compute the total and aggregates per option.","type":"string"}},"additionalProperties":false},"example":{"aggregates":[{"field":"amount","op":"sum"}]}}}},"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AggregateResult"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"default":{"$ref":"#/components/responses/ApiError"}}}},"/v1/events":{"post":{"tags":["Events"],"operationId":"log-event","summary":"Log an event","description":"Log a conversation using an event type from your workspace. Reusing a channel and externalId returns the existing event and adds any new links. Requires the `write` scope.","x-retainer-scope":"write","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","minLength":1,"maxLength":100},"channel":{"type":"string","minLength":1,"maxLength":100},"externalId":{"type":"string","minLength":1,"maxLength":500},"occurredAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"title":{"type":"string","maxLength":500},"summary":{"type":"string","maxLength":20000},"fields":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"bindings":{"type":"object","properties":{"bindings_revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"objectId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"fieldIds":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":100},"additionalProperties":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["bindings_revision","objectId","fieldIds"],"additionalProperties":false},"participants":{"default":[],"maxItems":200,"type":"array","items":{"type":"object","properties":{"handle":{"type":"string","minLength":1,"maxLength":320},"recordId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"role":{"type":"string","minLength":1,"maxLength":100}},"additionalProperties":false}},"about":{"default":[],"maxItems":200,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["type","channel","occurredAt"],"additionalProperties":false},"example":{"type":"conversation","channel":"calendar","externalId":"acme-renewal","occurredAt":"2026-11-18T10:00:00Z","title":"Acme renewal review","fields":{"medium":"meeting"},"about":["d2c0648c-2994-4f16-bdf1-a0136be6037d"]}}}},"responses":{"200":{"description":"The event was already logged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoggedEvent"}}}},"201":{"description":"A new event was logged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoggedEvent"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"409":{"description":"The identity belongs to a conflicting or retracted event.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"$ref":"#/components/responses/ApiError"}}}},"/v1/events/query":{"post":{"tags":["Events"],"operationId":"query-events","summary":"Query across event types","description":"Filter by shared event columns or event type, and page the results. Requires the `read` scope.","x-retainer-scope":"read","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"search":{"description":"Keywords within this object only, matched by Postgres full-text search over its label and searchable fields. Every word must match, as a whole word or the start of one (\"Dan\" finds \"Dana\"); accents are ignored.","type":"string","minLength":1,"maxLength":500},"filter":{"description":"Filter by a shared event column or by type. The type filter supports eq, neq, and in.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"sort":{"maxItems":3,"type":"array","items":{"type":"object","properties":{"field":{"type":"string","enum":["occurredAt","channel","externalId","id","createdAt","updatedAt"]},"direction":{"default":"asc","type":"string","enum":["asc","desc"]}},"required":["field"],"additionalProperties":false}},"limit":{"default":50,"type":"integer","minimum":1,"maximum":200},"cursor":{"type":"string"},"include":{"type":"array","items":{"type":"string","enum":["relationReferences"]}},"linked":{"description":"Event types only: events directly attached to this record, as a participant, about it, or through one of the event's own relation fields (link: field).","type":"object","properties":{"record":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"link":{"type":"string","enum":["participant","about","field"]}},"required":["record"],"additionalProperties":false}},"additionalProperties":false},"example":{"filter":{"type":"conversation"},"limit":10}}}},"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventPage"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"default":{"$ref":"#/components/responses/ApiError"}}}},"/v1/events/{id}":{"get":{"tags":["Events"],"operationId":"get-event","summary":"Read an event","description":"Requires the `read` scope.","x-retainer-scope":"read","parameters":[{"in":"path","name":"id","required":true,"description":"Retainer identifier.","example":"d2c0648c-2994-4f16-bdf1-a0136be6037d","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventRead"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"default":{"$ref":"#/components/responses/ApiError"}}},"delete":{"tags":["Events"],"operationId":"delete-event","summary":"Delete an event and retract its claims","description":"Requires the `write` scope.","x-retainer-scope":"write","parameters":[{"in":"path","name":"id","required":true,"description":"Retainer identifier.","example":"d2c0648c-2994-4f16-bdf1-a0136be6037d","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"bindings":{"type":"object","properties":{"bindings_revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"objectId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"fieldIds":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":100},"additionalProperties":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["bindings_revision","objectId","fieldIds"],"additionalProperties":false}},"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RetractEvent"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"default":{"$ref":"#/components/responses/ApiError"}}}},"/v1/events/{id}/links":{"post":{"tags":["Events"],"operationId":"link-event","summary":"Link an event to records","description":"Add participants or records the event is about. Existing links are preserved. Requires the `write` scope.","x-retainer-scope":"write","parameters":[{"in":"path","name":"id","required":true,"description":"Retainer identifier.","example":"d2c0648c-2994-4f16-bdf1-a0136be6037d","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"participants":{"default":[],"maxItems":200,"type":"array","items":{"type":"object","properties":{"handle":{"type":"string","minLength":1,"maxLength":320},"recordId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"role":{"type":"string","minLength":1,"maxLength":100}},"additionalProperties":false}},"about":{"default":[],"maxItems":200,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"bindings":{"type":"object","properties":{"bindings_revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"objectId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"fieldIds":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":100},"additionalProperties":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["bindings_revision","objectId","fieldIds"],"additionalProperties":false}},"additionalProperties":false,"anyOf":[{"required":["participants"],"properties":{"participants":{"minItems":1}}},{"required":["about"],"properties":{"about":{"minItems":1}}}]},"example":{"about":["d2c0648c-2994-4f16-bdf1-a0136be6037d"]}}}},"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/EventRead"},{"type":"object","properties":{"added":{"$ref":"#/components/schemas/AddedLinks"}},"required":["added"]}]}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"default":{"$ref":"#/components/responses/ApiError"}}}},"/v1/records/{id}/facts":{"post":{"tags":["Facts"],"operationId":"remember-fact","summary":"Remember a fact","description":"Cite the event a fact came from when it is available. The ID can also be workspace or me for a memory profile. Requires the `write` scope.","x-retainer-scope":"write","parameters":[{"in":"path","name":"id","required":true,"description":"Retainer identifier.","example":"d2c0648c-2994-4f16-bdf1-a0136be6037d","schema":{"type":"string"}},{"in":"header","name":"Idempotency-Key","schema":{"type":"string","minLength":1,"maxLength":200},"description":"Reuse the same key with the same request to retry."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":5000},"source":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"quote":{"type":"string","minLength":1,"maxLength":5000},"supersedes":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["text"],"additionalProperties":false},"example":{"text":"Acme needs legal review before renewal.","source":"0f3a026b-dd58-4cb2-a871-98a8edabec97"}}}},"responses":{"201":{"description":"Successful response.","content":{"application/json":{"schema":{"type":"object","properties":{"fact":{"$ref":"#/components/schemas/Fact"}},"required":["fact"]}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"default":{"$ref":"#/components/responses/ApiError"}}},"get":{"tags":["Facts"],"operationId":"list-facts","summary":"List facts","description":"List facts about a record, the workspace profile, or the personal profile. Requires the `read` scope.","x-retainer-scope":"read","parameters":[{"in":"path","name":"id","required":true,"description":"Retainer identifier.","example":"d2c0648c-2994-4f16-bdf1-a0136be6037d","schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":500,"default":100},"description":"Maximum items in this page."},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"The opaque nextCursor from the previous page."}],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FactsPage"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"default":{"$ref":"#/components/responses/ApiError"}}}},"/v1/facts/{id}":{"delete":{"tags":["Facts"],"operationId":"retract-fact","summary":"Retract a fact","description":"Shared facts also require write. A signed-in person may retract their own personal fact. Requires the `read` scope.","x-retainer-scope":"read","parameters":[{"in":"path","name":"id","required":true,"description":"Retainer identifier.","example":"d2c0648c-2994-4f16-bdf1-a0136be6037d","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Deleted"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"default":{"$ref":"#/components/responses/ApiError"}}}},"/v1/search":{"post":{"tags":["Retrieval"],"operationId":"search","summary":"Search records, facts, and events","description":"Search workspace text. The limit applies separately to each result category. Requires the `read` scope.","x-retainer-scope":"read","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"query":{"type":"string","minLength":1,"maxLength":500},"limit":{"default":10,"type":"integer","minimum":1,"maximum":50},"includeContext":{"type":"boolean"}},"required":["query"],"additionalProperties":false},"example":{"query":"Acme renewal","limit":10}}}},"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchResult"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"default":{"$ref":"#/components/responses/ApiError"}}}},"/v1/schema/changes":{"post":{"tags":["Schema"],"operationId":"request-schema-change","summary":"Request a schema change","description":"Submit schema operations. Changes that need review are proposed for a workspace administrator. Requires the `schema:write` scope.","x-retainer-scope":"schema:write","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"operations":{"minItems":1,"maxItems":100,"type":"array","items":{"oneOf":[{"type":"object","properties":{"op":{"type":"string","const":"create_object"},"object":{"type":"object","properties":{"universalId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"class":{"type":"string","enum":["entity","event"]},"nameSingular":{"type":"string","minLength":1},"namePlural":{"type":"string","minLength":1},"labelSingular":{"type":"string","minLength":1,"maxLength":200},"labelPlural":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","maxLength":2000},"labelField":{"type":"string","minLength":1},"fields":{"default":[],"type":"array","items":{"type":"object","properties":{"universalId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string","minLength":1},"label":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","maxLength":2000},"type":{"type":"string","enum":["text","number","boolean","date","date_time","select","multi_select","money","emails","phones","links","full_name","address","relation","json","files"]},"settings":{"type":"object","properties":{"options":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string","minLength":1,"maxLength":100},"label":{"type":"string","minLength":1,"maxLength":200}},"required":["value","label"],"additionalProperties":false}},"targetObject":{"type":"string","minLength":1},"targetObjects":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","minLength":1}},"inverseField":{"type":"string","minLength":1},"relationCardinality":{"type":"string","enum":["many_to_one","many_to_many"]},"onDelete":{"type":"string","enum":["set_null","cascade"]},"rollUpEvents":{"type":"boolean"},"maxValues":{"type":"integer","exclusiveMinimum":0,"maximum":100}},"additionalProperties":false},"isNullable":{"type":"boolean"},"isUnique":{"type":"boolean"},"isFilterable":{"type":"boolean"},"isSearchable":{"type":"boolean"}},"required":["name","label","type"],"additionalProperties":false}}},"required":["nameSingular","namePlural","labelSingular","labelPlural"],"additionalProperties":false}},"required":["op","object"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"update_object"},"object":{"type":"string","minLength":1},"labelSingular":{"type":"string","minLength":1,"maxLength":200},"labelPlural":{"type":"string","minLength":1,"maxLength":200},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"labelField":{"type":"string","minLength":1}},"required":["op","object"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"rename_object"},"object":{"type":"string","minLength":1},"nameSingular":{"type":"string","minLength":1},"namePlural":{"type":"string","minLength":1}},"required":["op","object","nameSingular","namePlural"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"delete_object"},"object":{"type":"string","minLength":1}},"required":["op","object"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"create_field"},"object":{"type":"string","minLength":1},"field":{"type":"object","properties":{"universalId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string","minLength":1},"label":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","maxLength":2000},"type":{"type":"string","enum":["text","number","boolean","date","date_time","select","multi_select","money","emails","phones","links","full_name","address","relation","json","files"]},"settings":{"type":"object","properties":{"options":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string","minLength":1,"maxLength":100},"label":{"type":"string","minLength":1,"maxLength":200}},"required":["value","label"],"additionalProperties":false}},"targetObject":{"type":"string","minLength":1},"targetObjects":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","minLength":1}},"inverseField":{"type":"string","minLength":1},"relationCardinality":{"type":"string","enum":["many_to_one","many_to_many"]},"onDelete":{"type":"string","enum":["set_null","cascade"]},"rollUpEvents":{"type":"boolean"},"maxValues":{"type":"integer","exclusiveMinimum":0,"maximum":100}},"additionalProperties":false},"isNullable":{"type":"boolean"},"isUnique":{"type":"boolean"},"isFilterable":{"type":"boolean"},"isSearchable":{"type":"boolean"}},"required":["name","label","type"],"additionalProperties":false}},"required":["op","object","field"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"update_field"},"object":{"type":"string","minLength":1},"field":{"type":"string","minLength":1},"label":{"type":"string","minLength":1,"maxLength":200},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"isNullable":{"type":"boolean"},"isUnique":{"type":"boolean"},"isFilterable":{"type":"boolean"},"isSearchable":{"type":"boolean"},"rollUpEvents":{"type":"boolean"},"type":{"type":"string","enum":["text","number","boolean","date","date_time","select","multi_select","money","emails","phones","links","full_name","address","relation","json","files"]}},"required":["op","object","field"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"rename_field"},"object":{"type":"string","minLength":1},"field":{"type":"string","minLength":1},"name":{"type":"string","minLength":1}},"required":["op","object","field","name"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"delete_field"},"object":{"type":"string","minLength":1},"field":{"type":"string","minLength":1}},"required":["op","object","field"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"add_option"},"object":{"type":"string","minLength":1},"field":{"type":"string","minLength":1},"option":{"type":"object","properties":{"value":{"type":"string","minLength":1,"maxLength":100},"label":{"type":"string","minLength":1,"maxLength":200}},"required":["value","label"],"additionalProperties":false}},"required":["op","object","field","option"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"update_option"},"object":{"type":"string","minLength":1},"field":{"type":"string","minLength":1},"value":{"type":"string","minLength":1},"label":{"type":"string","minLength":1,"maxLength":200}},"required":["op","object","field","value","label"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"remove_option"},"object":{"type":"string","minLength":1},"field":{"type":"string","minLength":1},"value":{"type":"string","minLength":1}},"required":["op","object","field","value"],"additionalProperties":false}]}},"reason":{"type":"string","maxLength":2000}},"required":["operations"],"additionalProperties":false}}}},"responses":{"200":{"description":"The schema change was applied or made no changes.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SchemaChangeResult"}}}},"202":{"description":"The proposal is pending review.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SchemaChangeResult"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"409":{"description":"The change failed to apply.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SchemaChangeResult"}}}},"default":{"$ref":"#/components/responses/ApiError"}}},"get":{"tags":["Schema"],"operationId":"list-schema-changes","summary":"List schema changes","description":"Requires the `read` scope.","x-retainer-scope":"read","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"description":"Maximum items in this page."},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"The opaque nextCursor from the previous page."},{"name":"status","in":"query","schema":{"type":"string","enum":["applied","proposed","rejected","failed"]},"description":"Filter by change status."}],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"type":"object","properties":{"changes":{"type":"array","items":{"$ref":"#/components/schemas/SchemaChange"}},"total":{"type":"integer"},"nextCursor":{"type":["string","null"]}},"required":["changes","total","nextCursor"]}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"default":{"$ref":"#/components/responses/ApiError"}}}},"/v1/schema/changes/{id}":{"get":{"tags":["Schema"],"operationId":"get-schema-change","summary":"Read a schema change","description":"Requires the `read` scope.","x-retainer-scope":"read","parameters":[{"in":"path","name":"id","required":true,"description":"Retainer identifier.","example":"d2c0648c-2994-4f16-bdf1-a0136be6037d","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SchemaChange"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"default":{"$ref":"#/components/responses/ApiError"}}}},"/v1/schema/changes/{id}/approve":{"post":{"tags":["Schema"],"operationId":"approve-schema-change","summary":"Approve a schema change","description":"The caller must act as a user. Requires the `admin` scope.","x-retainer-scope":"admin","parameters":[{"in":"path","name":"id","required":true,"description":"Retainer identifier.","example":"d2c0648c-2994-4f16-bdf1-a0136be6037d","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SchemaChangeResult"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"409":{"description":"The change failed to apply.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SchemaChangeResult"}}}},"default":{"$ref":"#/components/responses/ApiError"}}}},"/v1/schema/changes/{id}/reject":{"post":{"tags":["Schema"],"operationId":"reject-schema-change","summary":"Reject a schema change","description":"The caller must act as a user. Requires the `admin` scope.","x-retainer-scope":"admin","parameters":[{"in":"path","name":"id","required":true,"description":"Retainer identifier.","example":"d2c0648c-2994-4f16-bdf1-a0136be6037d","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SchemaChangeResult"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"409":{"description":"The change failed to apply.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SchemaChangeResult"}}}},"default":{"$ref":"#/components/responses/ApiError"}}}},"/v1/templates":{"get":{"tags":["Schema"],"operationId":"list-templates","summary":"List workspace templates","description":"Requires the `read` scope.","x-retainer-scope":"read","parameters":[],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"type":"object","properties":{"templates":{"type":"array","items":{"$ref":"#/components/schemas/TemplateView"}}},"required":["templates"]}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"default":{"$ref":"#/components/responses/ApiError"}}}},"/v1/templates/{name}/apply":{"post":{"tags":["Schema"],"operationId":"apply-template","summary":"Apply a workspace template","description":"Requires the `schema:write` scope.","x-retainer-scope":"schema:write","parameters":[{"in":"path","name":"name","required":true,"description":"Template API name.","example":"starter","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SchemaChangeResult"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"default":{"$ref":"#/components/responses/ApiError"}}}},"/v1/records/{id}/delete-impact":{"get":{"tags":["Records"],"operationId":"get-delete-impact","summary":"Preview the impact of a record deletion","description":"Requires the `read` scope.","x-retainer-scope":"read","parameters":[{"in":"path","name":"id","required":true,"description":"Retainer identifier.","example":"d2c0648c-2994-4f16-bdf1-a0136be6037d","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteImpact"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"default":{"$ref":"#/components/responses/ApiError"}}}},"/v1/records/delete-impact":{"post":{"tags":["Records"],"operationId":"get-bulk-delete-impact","summary":"Preview the impact of several record deletions","description":"Requires the `read` scope.","x-retainer-scope":"read","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"minItems":1,"maxItems":200,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["ids"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeleteImpact"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"default":{"$ref":"#/components/responses/ApiError"}}}},"/v1/records/{id}/merge":{"post":{"tags":["Records"],"operationId":"merge-record","summary":"Merge two records","description":"The caller must act as a user. The ID in the URL identifies the survivor. Requires the `write` scope.","x-retainer-scope":"write","parameters":[{"in":"path","name":"id","required":true,"description":"Retainer identifier.","example":"d2c0648c-2994-4f16-bdf1-a0136be6037d","schema":{"type":"string","format":"uuid"}},{"in":"header","name":"Idempotency-Key","schema":{"type":"string","minLength":1,"maxLength":200},"description":"Reuse the same key with the same request to retry."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"bindings":{"type":"object","properties":{"bindings_revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"objectId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"fieldIds":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":100},"additionalProperties":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["bindings_revision","objectId","fieldIds"],"additionalProperties":false},"recordId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"values":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["recordId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MergeResult"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"default":{"$ref":"#/components/responses/ApiError"}}}},"/v1/records/me/forget":{"post":{"tags":["Records"],"operationId":"clear-personal-memory","summary":"Clear your personal memory","description":"The person must be signed in to the web app. Clears personal memory in the current workspace. If supplied, Origin must match the deployment origin. Requires the `read` scope.","x-retainer-scope":"read","security":[{"secureSession":[]},{"localSession":[]}],"parameters":[{"in":"header","name":"X-Retainer-Client","required":true,"schema":{"type":"string","const":"web"},"example":"web"},{"in":"header","name":"X-Retainer-Workspace","required":true,"schema":{"type":"string","format":"uuid"},"example":"d2c0648c-2994-4f16-bdf1-a0136be6037d","description":"ID of the workspace whose personal memory is cleared."}],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClearPersonalMemory"}}}},"401":{"description":"The sign-in session is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"$ref":"#/components/responses/ApiError"}}}},"/v1/records/{id}/forget":{"post":{"tags":["Records"],"operationId":"forget-person","summary":"Erase a person","description":"A user with admin scope can permanently erase a person for a privacy request. Requires the `admin` scope.","x-retainer-scope":"admin","parameters":[{"in":"path","name":"id","required":true,"description":"Retainer identifier.","example":"d2c0648c-2994-4f16-bdf1-a0136be6037d","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForgetResult"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"default":{"$ref":"#/components/responses/ApiError"}}}},"/v1/records/{id}/linked":{"get":{"tags":["Records"],"operationId":"list-linked-records","summary":"List records linked to a record","description":"Requires the `read` scope.","x-retainer-scope":"read","parameters":[{"in":"path","name":"id","required":true,"description":"Retainer identifier.","example":"d2c0648c-2994-4f16-bdf1-a0136be6037d","schema":{"type":"string","format":"uuid"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"description":"Maximum items in this page."},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"The opaque nextCursor from the previous page."},{"name":"object","in":"query","schema":{"type":"string"},"description":"Filter by the linked record object API name."}],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkedRecordPage"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"default":{"$ref":"#/components/responses/ApiError"}}}},"/v1/records/{id}/events":{"get":{"tags":["Events"],"operationId":"list-record-events","summary":"List events linked to a record","description":"Requires the `read` scope.","x-retainer-scope":"read","parameters":[{"in":"path","name":"id","required":true,"description":"Retainer identifier.","example":"d2c0648c-2994-4f16-bdf1-a0136be6037d","schema":{"type":"string","format":"uuid"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"description":"Maximum items in this page."},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"The opaque nextCursor from the previous page."},{"name":"link","in":"query","schema":{"type":"string","enum":["participant","about","field"]},"description":"Filter by how the event is attached."}],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttachedEventPage"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"default":{"$ref":"#/components/responses/ApiError"}}}},"/v1/events/move":{"post":{"tags":["Events"],"operationId":"move-events","summary":"Move events to a different type","description":"Use dryRun to preview the change. Applying a move requires a user with admin scope. Requires the `schema:write` scope.","x-retainer-scope":"schema:write","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"from":{"type":"string","minLength":1,"maxLength":100,"description":"The event type the events have now (API name), e.g. \"meeting\"."},"to":{"type":"string","minLength":1,"maxLength":100,"description":"The event type they move to (API name), e.g. \"conversation\"."},"events":{"description":"Only these events, all of type from (at most 1000). Without it, every live event of from moves.","minItems":1,"maxItems":1000,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"fields":{"default":{},"description":"Source field name to target field name, for fields named differently, e.g. { \"agenda\": \"topic\" }. Other fields map by name; title and summary always map to the target's own.","type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":100},"additionalProperties":{"type":"string","minLength":1,"maxLength":100}},"drop":{"default":[],"description":"Source fields whose values you agree to delete because the target has no field for them. Without it, a move that would lose values is refused with the list.","maxItems":200,"type":"array","items":{"type":"string","minLength":1,"maxLength":100}},"defaults":{"default":{},"description":"Target field values for moved events that have no value for that field, written as if logged with the event, e.g. { \"medium\": \"meeting\" } when moving meetings to conversation.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"dryRun":{"default":false,"description":"Check the move and report what it would do, changing nothing.","type":"boolean"}},"required":["from","to"],"additionalProperties":false},"example":{"from":"meeting","to":"conversation","defaults":{"medium":"meeting"},"dryRun":true}}}},"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MoveEventsResult"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"default":{"$ref":"#/components/responses/ApiError"}}}},"/v1/events/{id}/participants/{participantId}":{"delete":{"tags":["Events"],"operationId":"remove-event-participant","summary":"Remove an event participant","description":"The caller must act as a user. Requires the `write` scope.","x-retainer-scope":"write","parameters":[{"in":"path","name":"id","required":true,"description":"Retainer identifier.","example":"d2c0648c-2994-4f16-bdf1-a0136be6037d","schema":{"type":"string","format":"uuid"}},{"in":"path","name":"participantId","required":true,"description":"Retainer identifier.","example":"d2c0648c-2994-4f16-bdf1-a0136be6037d","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventRead"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"default":{"$ref":"#/components/responses/ApiError"}}}},"/v1/events/{id}/about/{recordId}":{"delete":{"tags":["Events"],"operationId":"remove-event-about","summary":"Unlink a record from an event","description":"The caller must act as a user. Requires the `write` scope.","x-retainer-scope":"write","parameters":[{"in":"path","name":"id","required":true,"description":"Retainer identifier.","example":"d2c0648c-2994-4f16-bdf1-a0136be6037d","schema":{"type":"string","format":"uuid"}},{"in":"path","name":"recordId","required":true,"description":"Retainer identifier.","example":"d2c0648c-2994-4f16-bdf1-a0136be6037d","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventRead"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"default":{"$ref":"#/components/responses/ApiError"}}}},"/v1/events/{id}/content":{"get":{"tags":["Events"],"operationId":"get-event-content","summary":"Read full event content","description":"Requires the `read` scope.","x-retainer-scope":"read","parameters":[{"in":"path","name":"id","required":true,"description":"Retainer identifier.","example":"d2c0648c-2994-4f16-bdf1-a0136be6037d","schema":{"type":"string","format":"uuid"}},{"name":"after","in":"query","schema":{"type":"string"},"description":"The opaque nextAfter from the previous page."}],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventContentPage"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"default":{"$ref":"#/components/responses/ApiError"}}}},"/v1/events/{id}/claims":{"get":{"tags":["Events"],"operationId":"get-event-claims","summary":"Read assertions and facts that cite an event","description":"Requires the `read` scope.","x-retainer-scope":"read","parameters":[{"in":"path","name":"id","required":true,"description":"Retainer identifier.","example":"d2c0648c-2994-4f16-bdf1-a0136be6037d","schema":{"type":"string","format":"uuid"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"description":"Maximum items per collection."},{"name":"assertionsCursor","in":"query","schema":{"type":"string"},"description":"Assertions page cursor."},{"name":"factsCursor","in":"query","schema":{"type":"string"},"description":"Facts page cursor."},{"name":"own","in":"query","schema":{"type":"boolean"},"description":"Set false to omit assertions on the event itself."}],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"type":"object","properties":{"assertions":{"type":"array","items":{"$ref":"#/components/schemas/Assertion"}},"facts":{"type":"array","items":{"$ref":"#/components/schemas/HistoricalFact"}},"nextCursors":{"type":"object","properties":{"assertions":{"type":["string","null"]},"facts":{"type":["string","null"]}},"required":["assertions","facts"]}},"required":["assertions","facts","nextCursors"]}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"default":{"$ref":"#/components/responses/ApiError"}}}},"/v1/records/{id}/context":{"get":{"tags":["Retrieval"],"operationId":"get-context","summary":"Read a context pack","description":"Get selected fields, facts, and related information for a record or supported memory alias. Requires the `read` scope.","x-retainer-scope":"read","parameters":[{"in":"path","name":"id","required":true,"description":"Retainer identifier.","example":"d2c0648c-2994-4f16-bdf1-a0136be6037d","schema":{"type":"string"}},{"name":"tokenBudget","in":"query","schema":{"type":"integer","minimum":1,"maximum":16000,"default":2000},"description":"Approximate size budget for the context pack."}],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ContextPack"},{"$ref":"#/components/schemas/ProfileContextPack"}]}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"default":{"$ref":"#/components/responses/ApiError"}}}},"/v1/records/{id}/timeline":{"get":{"tags":["Retrieval"],"operationId":"get-timeline","summary":"Read a record timeline","description":"Requires the `read` scope.","x-retainer-scope":"read","parameters":[{"in":"path","name":"id","required":true,"description":"Retainer identifier.","example":"d2c0648c-2994-4f16-bdf1-a0136be6037d","schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"description":"Maximum items in this page."},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"The opaque nextCursor from the previous page."},{"name":"types","in":"query","schema":{"type":"string"},"description":"Comma-separated timeline item types."},{"name":"fields","in":"query","schema":{"type":"string"},"description":"Comma-separated field API names."},{"name":"eventTypes","in":"query","schema":{"type":"string"},"description":"Comma-separated event type API names."},{"name":"from","in":"query","schema":{"type":"string","format":"date-time"},"description":"Start of the time range."},{"name":"to","in":"query","schema":{"type":"string","format":"date-time"},"description":"End of the time range."}],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TimelinePage"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"default":{"$ref":"#/components/responses/ApiError"}}}},"/v1/objects/{object}/views":{"get":{"tags":["Views"],"operationId":"list-views","summary":"List saved views","description":"Requires the `read` scope.","x-retainer-scope":"read","parameters":[{"in":"path","name":"object","required":true,"description":"Object API name.","example":"company","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"type":"object","properties":{"views":{"type":"array","items":{"$ref":"#/components/schemas/SavedView"}}},"required":["views"]}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"default":{"$ref":"#/components/responses/ApiError"}}},"post":{"tags":["Views"],"operationId":"create-view","summary":"Create a saved view","description":"Requires the `write` scope.","x-retainer-scope":"write","parameters":[{"in":"path","name":"object","required":true,"description":"Object API name.","example":"company","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"kind":{"type":"string","enum":["table","board","calendar"]},"visibility":{"default":"workspace","type":"string","enum":["workspace","private"]},"position":{"type":"number"},"filter":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"sort":{"anyOf":[{"maxItems":3,"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"direction":{"default":"asc","type":"string","enum":["asc","desc"]}},"required":["field"],"additionalProperties":false}},{"type":"null"}]},"columns":{"anyOf":[{"type":"object","properties":{"order":{"maxItems":200,"type":"array","items":{"type":"string"}},"widths":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"integer","minimum":40,"maximum":2000}},"aggregates":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","enum":["countEmpty","countNotEmpty","percentEmpty","percentNotEmpty","countUnique","sum","avg","min","max"]}}},"required":["order"],"additionalProperties":false},{"type":"null"}]},"groupBy":{"type":["string","null"]},"hiddenGroups":{"anyOf":[{"maxItems":200,"type":"array","items":{"type":["string","null"]}},{"type":"null"}]},"groupAggregate":{"anyOf":[{"type":"object","properties":{"field":{"type":"string"},"op":{"type":"string","enum":["countEmpty","countNotEmpty","percentEmpty","percentNotEmpty","countUnique","sum","avg","min","max"]}},"required":["field","op"],"additionalProperties":false},{"type":"null"}]},"dateField":{"type":["string","null"]}},"required":["name","kind"],"additionalProperties":false},"example":{"name":"Pipeline","kind":"table","visibility":"workspace"}}}},"responses":{"201":{"description":"Successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedView"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"default":{"$ref":"#/components/responses/ApiError"}}}},"/v1/views/{id}":{"get":{"tags":["Views"],"operationId":"get-view","summary":"Read a saved view","description":"Requires the `read` scope.","x-retainer-scope":"read","parameters":[{"in":"path","name":"id","required":true,"description":"Retainer identifier.","example":"d2c0648c-2994-4f16-bdf1-a0136be6037d","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedView"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"default":{"$ref":"#/components/responses/ApiError"}}},"patch":{"tags":["Views"],"operationId":"update-view","summary":"Update a saved view","description":"Only fields included in the request are changed. Requires the `write` scope.","x-retainer-scope":"write","parameters":[{"in":"path","name":"id","required":true,"description":"Retainer identifier.","example":"d2c0648c-2994-4f16-bdf1-a0136be6037d","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"kind":{"type":"string","enum":["table","board","calendar"]},"visibility":{"type":"string","enum":["workspace","private"]},"position":{"type":"number"},"filter":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"sort":{"anyOf":[{"maxItems":3,"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"direction":{"default":"asc","type":"string","enum":["asc","desc"]}},"required":["field"],"additionalProperties":false}},{"type":"null"}]},"columns":{"anyOf":[{"type":"object","properties":{"order":{"maxItems":200,"type":"array","items":{"type":"string"}},"widths":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"integer","minimum":40,"maximum":2000}},"aggregates":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","enum":["countEmpty","countNotEmpty","percentEmpty","percentNotEmpty","countUnique","sum","avg","min","max"]}}},"required":["order"],"additionalProperties":false},{"type":"null"}]},"groupBy":{"type":["string","null"]},"hiddenGroups":{"anyOf":[{"maxItems":200,"type":"array","items":{"type":["string","null"]}},{"type":"null"}]},"groupAggregate":{"anyOf":[{"type":"object","properties":{"field":{"type":"string"},"op":{"type":"string","enum":["countEmpty","countNotEmpty","percentEmpty","percentNotEmpty","countUnique","sum","avg","min","max"]}},"required":["field","op"],"additionalProperties":false},{"type":"null"}]},"dateField":{"type":["string","null"]}},"additionalProperties":false},"example":{"name":"Open deals"}}}},"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedView"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"default":{"$ref":"#/components/responses/ApiError"}}},"delete":{"tags":["Views"],"operationId":"delete-view","summary":"Delete a saved view","description":"Requires the `write` scope.","x-retainer-scope":"write","parameters":[{"in":"path","name":"id","required":true,"description":"Retainer identifier.","example":"d2c0648c-2994-4f16-bdf1-a0136be6037d","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Deleted"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"default":{"$ref":"#/components/responses/ApiError"}}}},"/v1/records/{id}/comments":{"get":{"tags":["Comments"],"operationId":"list-comments","summary":"List comments","description":"Requires the `read` scope.","x-retainer-scope":"read","parameters":[{"in":"path","name":"id","required":true,"description":"Retainer identifier.","example":"d2c0648c-2994-4f16-bdf1-a0136be6037d","schema":{"type":"string","format":"uuid"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"description":"Maximum items in this page."},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"The opaque nextCursor from the previous page."}],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommentPage"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"default":{"$ref":"#/components/responses/ApiError"}}},"post":{"tags":["Comments"],"operationId":"create-comment","summary":"Add a comment","description":"The caller must act as a user. Requires the `write` scope.","x-retainer-scope":"write","parameters":[{"in":"path","name":"id","required":true,"description":"Retainer identifier.","example":"d2c0648c-2994-4f16-bdf1-a0136be6037d","schema":{"type":"string","format":"uuid"}},{"in":"header","name":"Idempotency-Key","schema":{"type":"string","minLength":1,"maxLength":200},"description":"Reuse the same key with the same request to retry."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"body":{"type":"string","minLength":1,"maxLength":10000}},"required":["body"],"additionalProperties":false},"example":{"body":"Loop in legal before renewal."}}}},"responses":{"201":{"description":"Successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Comment"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"default":{"$ref":"#/components/responses/ApiError"}}}},"/v1/comments/{id}":{"patch":{"tags":["Comments"],"operationId":"update-comment","summary":"Edit a comment","description":"Only the original author can edit a comment. Requires the `write` scope.","x-retainer-scope":"write","parameters":[{"in":"path","name":"id","required":true,"description":"Retainer identifier.","example":"d2c0648c-2994-4f16-bdf1-a0136be6037d","schema":{"type":"string","format":"uuid"}},{"in":"header","name":"Idempotency-Key","schema":{"type":"string","minLength":1,"maxLength":200},"description":"Reuse the same key with the same request to retry."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"body":{"type":"string","minLength":1,"maxLength":10000}},"required":["body"],"additionalProperties":false},"example":{"body":"Loop in legal before renewal."}}}},"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Comment"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"default":{"$ref":"#/components/responses/ApiError"}}},"delete":{"tags":["Comments"],"operationId":"delete-comment","summary":"Delete a comment","description":"The author or a user with admin scope can delete it. Requires the `write` scope.","x-retainer-scope":"write","parameters":[{"in":"path","name":"id","required":true,"description":"Retainer identifier.","example":"d2c0648c-2994-4f16-bdf1-a0136be6037d","schema":{"type":"string","format":"uuid"}},{"in":"header","name":"Idempotency-Key","schema":{"type":"string","minLength":1,"maxLength":200},"description":"Reuse the same key with the same request to retry."}],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Deleted"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"default":{"$ref":"#/components/responses/ApiError"}}}},"/v1/review":{"get":{"tags":["Review"],"operationId":"get-review-queue","summary":"Read the review queue","description":"Requires the `read` scope.","x-retainer-scope":"read","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":500,"default":100},"description":"Maximum items per collection."},{"name":"pendingAssertionsCursor","in":"query","schema":{"type":"string"},"description":"Page cursor for pendingAssertions."},{"name":"unresolvedParticipantsCursor","in":"query","schema":{"type":"string"},"description":"Page cursor for unresolvedParticipants."},{"name":"mergeSuggestionsCursor","in":"query","schema":{"type":"string"},"description":"Page cursor for mergeSuggestions."}],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewQueue"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"default":{"$ref":"#/components/responses/ApiError"}}}},"/v1/records/{id}/assertions":{"get":{"tags":["Review"],"operationId":"list-assertions","summary":"List field assertions for a record","description":"Requires the `read` scope.","x-retainer-scope":"read","parameters":[{"in":"path","name":"id","required":true,"description":"Retainer identifier.","example":"d2c0648c-2994-4f16-bdf1-a0136be6037d","schema":{"type":"string","format":"uuid"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"description":"Maximum items in this page."},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"The opaque nextCursor from the previous page."},{"name":"field","in":"query","schema":{"type":"string"},"description":"Filter by field API name."}],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Assertion"}},"nextCursor":{"type":["string","null"]}},"required":["items","nextCursor"]}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"default":{"$ref":"#/components/responses/ApiError"}}}},"/v1/assertions/{id}":{"get":{"tags":["Review"],"operationId":"get-assertion","summary":"Read an assertion","description":"Requires the `read` scope.","x-retainer-scope":"read","parameters":[{"in":"path","name":"id","required":true,"description":"Retainer identifier.","example":"d2c0648c-2994-4f16-bdf1-a0136be6037d","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Assertion"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"default":{"$ref":"#/components/responses/ApiError"}}}},"/v1/assertions/{id}/accept":{"post":{"tags":["Review"],"operationId":"accept-assertion","summary":"Accept a proposed field value","description":"The caller must act as a user. Requires the `write` scope.","x-retainer-scope":"write","parameters":[{"in":"path","name":"id","required":true,"description":"Retainer identifier.","example":"d2c0648c-2994-4f16-bdf1-a0136be6037d","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"type":"object","properties":{"assertionId":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["accepted","rejected"]},"fields":{"type":"object","additionalProperties":{"type":"string","enum":["applied","pending_review","superseded"]}},"record":{"$ref":"#/components/schemas/Record"}},"required":["assertionId","status","record"]}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"default":{"$ref":"#/components/responses/ApiError"}}}},"/v1/assertions/{id}/reject":{"post":{"tags":["Review"],"operationId":"reject-assertion","summary":"Reject a proposed field value","description":"The caller must act as a user. Requires the `write` scope.","x-retainer-scope":"write","parameters":[{"in":"path","name":"id","required":true,"description":"Retainer identifier.","example":"d2c0648c-2994-4f16-bdf1-a0136be6037d","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"type":"object","properties":{"assertionId":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["accepted","rejected"]},"fields":{"type":"object","additionalProperties":{"type":"string","enum":["applied","pending_review","superseded"]}},"record":{"$ref":"#/components/schemas/Record"}},"required":["assertionId","status","record"]}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"default":{"$ref":"#/components/responses/ApiError"}}}},"/v1/review/merges/{id}/merge":{"post":{"tags":["Review"],"operationId":"accept-merge","summary":"Accept a merge suggestion","description":"The caller must act as a user. Set keep to the record ID that should survive. Requires the `write` scope.","x-retainer-scope":"write","parameters":[{"in":"path","name":"id","required":true,"description":"Retainer identifier.","example":"d2c0648c-2994-4f16-bdf1-a0136be6037d","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"keep":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["keep"],"additionalProperties":false},"example":{"keep":"d2c0648c-2994-4f16-bdf1-a0136be6037d"}}}},"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MergeResult"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"default":{"$ref":"#/components/responses/ApiError"}}}},"/v1/review/merges/{id}/dismiss":{"post":{"tags":["Review"],"operationId":"dismiss-merge","summary":"Dismiss a merge suggestion","description":"The caller must act as a user. Requires the `write` scope.","x-retainer-scope":"write","parameters":[{"in":"path","name":"id","required":true,"description":"Retainer identifier.","example":"d2c0648c-2994-4f16-bdf1-a0136be6037d","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MergeSuggestionDecision"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"default":{"$ref":"#/components/responses/ApiError"}}}},"/v1/files/intents":{"post":{"tags":["Files"],"operationId":"create-file-intent","summary":"Create a file upload intent","description":"Upload the bytes to the signed transfer URL, then finalize the file before referencing it. Requires the `write` scope.","x-retainer-scope":"write","parameters":[{"in":"header","name":"Idempotency-Key","schema":{"type":"string","minLength":1,"maxLength":200},"description":"Reuse the same key with the same request to retry.","required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"mediaType":{"type":"string","maxLength":150,"pattern":"^[a-z0-9][a-z0-9!#$&^_.+-]*\\/[a-z0-9][a-z0-9!#$&^_.+-]*$"},"bytes":{"type":"integer","minimum":1,"maximum":26214400},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"sourceItemId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["name","mediaType","bytes","sha256"],"additionalProperties":false}}}},"responses":{"201":{"description":"Successful response.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"upload":{"$ref":"#/components/schemas/FileTransfer"}},"required":["id","upload"]}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"default":{"$ref":"#/components/responses/ApiError"}}}},"/v1/files/{id}/finalize":{"post":{"tags":["Files"],"operationId":"finalize-file","summary":"Finalize a file upload","description":"Requires the `write` scope.","x-retainer-scope":"write","parameters":[{"in":"path","name":"id","required":true,"description":"Retainer identifier.","example":"d2c0648c-2994-4f16-bdf1-a0136be6037d","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/FileMetadata"},{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"state":{"type":"string","enum":["ready"]}},"required":["id","state"]}]}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"default":{"$ref":"#/components/responses/ApiError"}}}},"/v1/files/{id}":{"get":{"tags":["Files"],"operationId":"get-file","summary":"Read file metadata","description":"Requires the `read` scope.","x-retainer-scope":"read","parameters":[{"in":"path","name":"id","required":true,"description":"Retainer identifier.","example":"d2c0648c-2994-4f16-bdf1-a0136be6037d","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/FileMetadata"},{"type":"object","properties":{"id":{"type":"string","format":"uuid"}},"required":["id"]}]}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"default":{"$ref":"#/components/responses/ApiError"}}}},"/v1/files/{id}/download":{"post":{"tags":["Files"],"operationId":"download-file","summary":"Request a signed download","description":"Requires the `read` scope.","x-retainer-scope":"read","parameters":[{"in":"path","name":"id","required":true,"description":"Retainer identifier.","example":"d2c0648c-2994-4f16-bdf1-a0136be6037d","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileTransfer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"default":{"$ref":"#/components/responses/ApiError"}}}},"/v1/files/erasure-status":{"post":{"tags":["Files"],"operationId":"get-file-erasure-status","summary":"Check file erasure jobs","description":"Requires the `admin` scope.","x-retainer-scope":"admin","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"minItems":1,"maxItems":10000,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["ids"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"type":"object","properties":{"pending":{"type":"integer"},"succeeded":{"type":"integer"},"jobs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"status":{"type":"string"},"code":{"type":["string","null"]}},"required":["id","status","code"]}}},"required":["pending","succeeded","jobs"]}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"default":{"$ref":"#/components/responses/ApiError"}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"A workspace API key."},"secureSession":{"type":"apiKey","in":"cookie","name":"__Secure-retainer.session_token","description":"The signed-in web session over HTTPS."},"localSession":{"type":"apiKey","in":"cookie","name":"retainer.session_token","description":"The signed-in web session for local HTTP."}},"schemas":{"Workspace":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"slug":{"type":"string"}},"required":["id","name","slug"]},"Actor":{"type":"object","properties":{"via":{"type":"string"},"type":{"type":"string","enum":["user","integration","agent","system"]},"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["type","id"]},"Session":{"type":"object","properties":{"workspace":{"$ref":"#/components/schemas/Workspace"},"actor":{"$ref":"#/components/schemas/Actor"},"scopes":{"type":"array","items":{"type":"string","enum":["read","write","schema:write","admin"]}},"person":{"type":"boolean"},"routinesAvailable":{"type":"boolean","const":true},"agentAvailable":{"type":"boolean","const":true}},"required":["workspace","actor","scopes","person"]},"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"]}},"required":["error"]},"Record":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string"},"label":{"type":["string","null"]},"fields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Keys are API field names from the workspace schema."},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"createdBy":{"$ref":"#/components/schemas/Actor"},"updatedBy":{"$ref":"#/components/schemas/Actor"},"provenance":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"pendingAssertion":{"anyOf":[{"$ref":"#/components/schemas/Assertion"},{"type":"null"}]},"assertion":{"anyOf":[{"$ref":"#/components/schemas/Assertion"},{"type":"null"}]},"pendingAssertionIds":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["assertion","pendingAssertionIds"]}},"relationReferences":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/RecordReference"}},"counts":{"type":"object","properties":{"comments":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"facts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"linked":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"claims":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["comments","facts","linked","claims"]},"event":{"$ref":"#/components/schemas/EventDetails"}},"required":["id","object","label","fields","createdAt","updatedAt","createdBy","updatedBy"]},"RecordReference":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string"},"label":{"type":["string","null"]}},"required":["id","object","label"]},"RecordPage":{"type":"object","properties":{"nextCursor":{"type":["string","null"]},"relationReferences":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/RecordReference"}},"records":{"type":"array","items":{"$ref":"#/components/schemas/Record"}}},"required":["nextCursor","records"]},"WriteResult":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"created":{"type":"boolean"},"fields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","enum":["applied","pending_review","superseded"]}},"record":{"$ref":"#/components/schemas/Record"}},"required":["id","created","fields","record"]},"MergeResult":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"mergedId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"merged":{"type":"boolean"},"recomputedRecordIds":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"record":{"$ref":"#/components/schemas/Record"}},"required":["id","mergedId","merged","recomputedRecordIds","record"]},"EventPage":{"type":"object","properties":{"nextCursor":{"type":["string","null"]},"relationReferences":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/RecordReference"}},"records":{"type":"array","items":{"$ref":"#/components/schemas/EventRecord"}}},"required":["nextCursor","records"]},"EventRecord":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string"},"label":{"type":["string","null"]},"fields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Keys are API field names from the workspace schema."},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"createdBy":{"$ref":"#/components/schemas/Actor"},"updatedBy":{"$ref":"#/components/schemas/Actor"},"provenance":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"pendingAssertion":{"anyOf":[{"$ref":"#/components/schemas/Assertion"},{"type":"null"}]},"assertion":{"anyOf":[{"$ref":"#/components/schemas/Assertion"},{"type":"null"}]},"pendingAssertionIds":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["assertion","pendingAssertionIds"]}},"relationReferences":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/RecordReference"}},"counts":{"type":"object","properties":{"comments":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"facts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"linked":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"claims":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["comments","facts","linked","claims"]},"event":{"$ref":"#/components/schemas/EventDetails"},"type":{"type":"string"}},"required":["id","object","label","fields","createdAt","updatedAt","createdBy","updatedBy","event","type"]},"EventRead":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string"},"label":{"type":["string","null"]},"fields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Keys are API field names from the workspace schema."},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"createdBy":{"$ref":"#/components/schemas/Actor"},"updatedBy":{"$ref":"#/components/schemas/Actor"},"provenance":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"pendingAssertion":{"anyOf":[{"$ref":"#/components/schemas/Assertion"},{"type":"null"}]},"assertion":{"anyOf":[{"$ref":"#/components/schemas/Assertion"},{"type":"null"}]},"pendingAssertionIds":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["assertion","pendingAssertionIds"]}},"relationReferences":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/RecordReference"}},"counts":{"type":"object","properties":{"comments":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"facts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"linked":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"claims":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["comments","facts","linked","claims"]},"event":{"$ref":"#/components/schemas/EventDetails"}},"required":["id","object","label","fields","createdAt","updatedAt","createdBy","updatedBy","event"]},"EventDetails":{"type":"object","properties":{"occurredAt":{"type":"string","format":"date-time"},"channel":{"type":["string","null"]},"externalId":{"type":["string","null"]},"title":{"type":["string","null"]},"summary":{"type":["string","null"]},"participants":{"$ref":"#/components/schemas/Participants"},"about":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"content":{"description":"Full text is available at GET /v1/events/{id}/content.","type":"boolean","const":true},"source":{"type":"object","properties":{"sourceItemId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"revisionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"current":{"type":"boolean"},"previousEventId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]}},"required":["sourceItemId","revisionId","current","previousEventId"]}},"required":["occurredAt","channel","externalId","title","summary","participants","about"]},"Participants":{"type":"object","properties":{"matched":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"handle":{"type":["string","null"]},"role":{"type":["string","null"]},"recordId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["id","handle","role","recordId"]}},"unmatched":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"handle":{"type":["string","null"]},"role":{"type":["string","null"]},"reason":{"type":"string","enum":["no_match","phone_only","deleted_record","ambiguous","suppressed"]},"candidates":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["id","handle","role","reason"]}}},"required":["matched","unmatched"]},"AddedLinks":{"type":"object","properties":{"participants":{"$ref":"#/components/schemas/Participants"},"about":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["participants","about"]},"LoggedEvent":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"type":{"type":"string"},"created":{"type":"boolean"},"participants":{"$ref":"#/components/schemas/Participants"},"about":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"added":{"$ref":"#/components/schemas/AddedLinks"}},"required":["id","type","created","participants","about"]},"SchemaDiffOperation":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"create_object"},"object":{"type":"object","properties":{"nameSingular":{"type":"string"},"namePlural":{"type":"string"},"labelSingular":{"type":"string"},"labelPlural":{"type":"string"},"description":{"type":["string","null"]},"labelField":{"type":["string","null"]},"class":{"type":"string","enum":["entity","event"]},"owner":{"type":"string","enum":["system","workspace","agent"]},"isProtected":{"type":"boolean"},"universalId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"labelFieldLabel":{"type":["string","null"]}},"required":["nameSingular","namePlural","labelSingular","labelPlural","description","labelField","class","owner","isProtected","universalId","labelFieldLabel"]}},"required":["kind","object"]},{"type":"object","properties":{"objectId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string"},"objectLabel":{"type":"string"},"objectClass":{"type":"string","enum":["entity","event"]},"kind":{"type":"string","const":"update_object"},"property":{"type":"string","enum":["labelSingular","labelPlural","description"]},"from":{"type":["string","null"]},"to":{"type":["string","null"]}},"required":["objectId","object","objectLabel","objectClass","kind","property","from","to"]},{"type":"object","properties":{"objectId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string"},"objectLabel":{"type":"string"},"objectClass":{"type":"string","enum":["entity","event"]},"kind":{"type":"string","const":"update_object"},"property":{"type":"string","const":"labelField"},"from":{"type":["string","null"]},"to":{"type":["string","null"]},"fromLabel":{"type":["string","null"]},"toLabel":{"type":["string","null"]}},"required":["objectId","object","objectLabel","objectClass","kind","property","from","to","fromLabel","toLabel"]},{"type":"object","properties":{"objectId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string"},"objectLabel":{"type":"string"},"objectClass":{"type":"string","enum":["entity","event"]},"kind":{"type":"string","const":"rename_object"},"from":{"type":"object","properties":{"nameSingular":{"type":"string"},"namePlural":{"type":"string"}},"required":["nameSingular","namePlural"]},"to":{"type":"object","properties":{"nameSingular":{"type":"string"},"namePlural":{"type":"string"}},"required":["nameSingular","namePlural"]}},"required":["objectId","object","objectLabel","objectClass","kind","from","to"]},{"type":"object","properties":{"objectId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string"},"objectLabel":{"type":"string"},"objectClass":{"type":"string","enum":["entity","event"]},"kind":{"type":"string","enum":["deprecate_object","protect_object"]}},"required":["objectId","object","objectLabel","objectClass","kind"]},{"type":"object","properties":{"objectId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string"},"objectLabel":{"type":"string"},"objectClass":{"type":"string","enum":["entity","event"]},"kind":{"type":"string","const":"create_field"},"field":{"type":"object","properties":{"universalId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string","minLength":1},"label":{"type":"string","minLength":1,"maxLength":200},"description":{"type":["string","null"]},"type":{"type":"string","enum":["text","number","boolean","date","date_time","select","multi_select","money","emails","phones","links","full_name","address","relation","json","files"]},"settings":{"type":"object","properties":{"options":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string","minLength":1,"maxLength":100},"label":{"type":"string","minLength":1,"maxLength":200}},"required":["value","label"],"additionalProperties":false}},"targetObject":{"type":"string","minLength":1},"targetObjects":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","minLength":1}},"inverseField":{"type":"string","minLength":1},"relationCardinality":{"type":"string","enum":["many_to_one","many_to_many","one_to_many"]},"onDelete":{"type":"string","enum":["set_null","cascade"]},"rollUpEvents":{"type":"boolean"},"maxValues":{"type":"integer","exclusiveMinimum":0,"maximum":100},"isInverse":{"type":"boolean"}},"additionalProperties":false},"isNullable":{"type":"boolean"},"isUnique":{"type":"boolean"},"isFilterable":{"type":"boolean"},"isSearchable":{"type":"boolean"},"owner":{"type":"string","enum":["system","workspace","agent"]},"isProtected":{"type":"boolean"},"coreRole":{"anyOf":[{"type":"string","enum":["title","summary"]},{"type":"null"}]}},"required":["universalId","name","label","description","type","settings","isNullable","isUnique","isFilterable","isSearchable","owner","isProtected","coreRole"]},"targetLabels":{"type":"array","items":{"type":"object","properties":{"singular":{"type":"string"},"plural":{"type":"string"}},"required":["singular","plural"]}}},"required":["objectId","object","objectLabel","objectClass","kind","field"]},{"type":"object","properties":{"objectId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string"},"objectLabel":{"type":"string"},"objectClass":{"type":"string","enum":["entity","event"]},"fieldId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"field":{"type":"string"},"fieldLabel":{"type":"string"},"fieldType":{"anyOf":[{"type":"string","enum":["text","number","boolean","date","date_time","select","multi_select","money","emails","phones","links","full_name","address","relation","json","files"]},{"type":"null"}]},"kind":{"type":"string","const":"update_field"},"property":{"type":"string","enum":["label","description","isNullable","isUnique","isFilterable","isSearchable","rollUpEvents"]},"from":{"type":["string","boolean","null"]},"to":{"type":["string","boolean","null"]}},"required":["objectId","object","objectLabel","objectClass","fieldId","field","fieldLabel","fieldType","kind","property","from","to"]},{"type":"object","properties":{"objectId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string"},"objectLabel":{"type":"string"},"objectClass":{"type":"string","enum":["entity","event"]},"fieldId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"field":{"type":"string"},"fieldLabel":{"type":"string"},"fieldType":{"anyOf":[{"type":"string","enum":["text","number","boolean","date","date_time","select","multi_select","money","emails","phones","links","full_name","address","relation","json","files"]},{"type":"null"}]},"kind":{"type":"string","const":"rename_field"},"from":{"type":"string"},"to":{"type":"string"}},"required":["objectId","object","objectLabel","objectClass","fieldId","field","fieldLabel","fieldType","kind","from","to"]},{"type":"object","properties":{"objectId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string"},"objectLabel":{"type":"string"},"objectClass":{"type":"string","enum":["entity","event"]},"fieldId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"field":{"type":"string"},"fieldLabel":{"type":"string"},"fieldType":{"anyOf":[{"type":"string","enum":["text","number","boolean","date","date_time","select","multi_select","money","emails","phones","links","full_name","address","relation","json","files"]},{"type":"null"}]},"kind":{"type":"string","enum":["deprecate_field","protect_field"]}},"required":["objectId","object","objectLabel","objectClass","fieldId","field","fieldLabel","fieldType","kind"]},{"type":"object","properties":{"objectId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string"},"objectLabel":{"type":"string"},"objectClass":{"type":"string","enum":["entity","event"]},"fieldId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"field":{"type":"string"},"fieldLabel":{"type":"string"},"fieldType":{"anyOf":[{"type":"string","enum":["text","number","boolean","date","date_time","select","multi_select","money","emails","phones","links","full_name","address","relation","json","files"]},{"type":"null"}]},"kind":{"type":"string","const":"add_option"},"option":{"type":"object","properties":{"value":{"type":"string"},"label":{"type":"string"}},"required":["value","label"]}},"required":["objectId","object","objectLabel","objectClass","fieldId","field","fieldLabel","fieldType","kind","option"]},{"type":"object","properties":{"objectId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string"},"objectLabel":{"type":"string"},"objectClass":{"type":"string","enum":["entity","event"]},"fieldId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"field":{"type":"string"},"fieldLabel":{"type":"string"},"fieldType":{"anyOf":[{"type":"string","enum":["text","number","boolean","date","date_time","select","multi_select","money","emails","phones","links","full_name","address","relation","json","files"]},{"type":"null"}]},"kind":{"type":"string","const":"update_option"},"value":{"type":"string"},"from":{"type":"string"},"to":{"type":"string"}},"required":["objectId","object","objectLabel","objectClass","fieldId","field","fieldLabel","fieldType","kind","value","from","to"]},{"type":"object","properties":{"objectId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string"},"objectLabel":{"type":"string"},"objectClass":{"type":"string","enum":["entity","event"]},"fieldId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"field":{"type":"string"},"fieldLabel":{"type":"string"},"fieldType":{"anyOf":[{"type":"string","enum":["text","number","boolean","date","date_time","select","multi_select","money","emails","phones","links","full_name","address","relation","json","files"]},{"type":"null"}]},"kind":{"type":"string","const":"remove_option"},"value":{"type":"string"},"optionLabel":{"type":"string"}},"required":["objectId","object","objectLabel","objectClass","fieldId","field","fieldLabel","fieldType","kind","value","optionLabel"]}]},"SchemaOperation":{"oneOf":[{"type":"object","properties":{"op":{"type":"string","const":"create_object"},"object":{"type":"object","properties":{"universalId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"class":{"type":"string","enum":["entity","event"]},"nameSingular":{"type":"string","minLength":1},"namePlural":{"type":"string","minLength":1},"labelSingular":{"type":"string","minLength":1,"maxLength":200},"labelPlural":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","maxLength":2000},"labelField":{"type":"string","minLength":1},"fields":{"default":[],"type":"array","items":{"type":"object","properties":{"universalId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string","minLength":1},"label":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","maxLength":2000},"type":{"type":"string","enum":["text","number","boolean","date","date_time","select","multi_select","money","emails","phones","links","full_name","address","relation","json","files"]},"settings":{"type":"object","properties":{"options":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string","minLength":1,"maxLength":100},"label":{"type":"string","minLength":1,"maxLength":200}},"required":["value","label"],"additionalProperties":false}},"targetObject":{"type":"string","minLength":1},"targetObjects":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","minLength":1}},"inverseField":{"type":"string","minLength":1},"relationCardinality":{"type":"string","enum":["many_to_one","many_to_many"]},"onDelete":{"type":"string","enum":["set_null","cascade"]},"rollUpEvents":{"type":"boolean"},"maxValues":{"type":"integer","exclusiveMinimum":0,"maximum":100}},"additionalProperties":false},"isNullable":{"type":"boolean"},"isUnique":{"type":"boolean"},"isFilterable":{"type":"boolean"},"isSearchable":{"type":"boolean"}},"required":["name","label","type"],"additionalProperties":false}}},"required":["nameSingular","namePlural","labelSingular","labelPlural"],"additionalProperties":false}},"required":["op","object"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"update_object"},"object":{"type":"string","minLength":1},"labelSingular":{"type":"string","minLength":1,"maxLength":200},"labelPlural":{"type":"string","minLength":1,"maxLength":200},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"labelField":{"type":"string","minLength":1}},"required":["op","object"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"rename_object"},"object":{"type":"string","minLength":1},"nameSingular":{"type":"string","minLength":1},"namePlural":{"type":"string","minLength":1}},"required":["op","object","nameSingular","namePlural"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"delete_object"},"object":{"type":"string","minLength":1}},"required":["op","object"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"create_field"},"object":{"type":"string","minLength":1},"field":{"type":"object","properties":{"universalId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string","minLength":1},"label":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","maxLength":2000},"type":{"type":"string","enum":["text","number","boolean","date","date_time","select","multi_select","money","emails","phones","links","full_name","address","relation","json","files"]},"settings":{"type":"object","properties":{"options":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string","minLength":1,"maxLength":100},"label":{"type":"string","minLength":1,"maxLength":200}},"required":["value","label"],"additionalProperties":false}},"targetObject":{"type":"string","minLength":1},"targetObjects":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","minLength":1}},"inverseField":{"type":"string","minLength":1},"relationCardinality":{"type":"string","enum":["many_to_one","many_to_many"]},"onDelete":{"type":"string","enum":["set_null","cascade"]},"rollUpEvents":{"type":"boolean"},"maxValues":{"type":"integer","exclusiveMinimum":0,"maximum":100}},"additionalProperties":false},"isNullable":{"type":"boolean"},"isUnique":{"type":"boolean"},"isFilterable":{"type":"boolean"},"isSearchable":{"type":"boolean"}},"required":["name","label","type"],"additionalProperties":false}},"required":["op","object","field"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"update_field"},"object":{"type":"string","minLength":1},"field":{"type":"string","minLength":1},"label":{"type":"string","minLength":1,"maxLength":200},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"isNullable":{"type":"boolean"},"isUnique":{"type":"boolean"},"isFilterable":{"type":"boolean"},"isSearchable":{"type":"boolean"},"rollUpEvents":{"type":"boolean"},"type":{"type":"string","enum":["text","number","boolean","date","date_time","select","multi_select","money","emails","phones","links","full_name","address","relation","json","files"]}},"required":["op","object","field"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"rename_field"},"object":{"type":"string","minLength":1},"field":{"type":"string","minLength":1},"name":{"type":"string","minLength":1}},"required":["op","object","field","name"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"delete_field"},"object":{"type":"string","minLength":1},"field":{"type":"string","minLength":1}},"required":["op","object","field"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"add_option"},"object":{"type":"string","minLength":1},"field":{"type":"string","minLength":1},"option":{"type":"object","properties":{"value":{"type":"string","minLength":1,"maxLength":100},"label":{"type":"string","minLength":1,"maxLength":200}},"required":["value","label"],"additionalProperties":false}},"required":["op","object","field","option"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"update_option"},"object":{"type":"string","minLength":1},"field":{"type":"string","minLength":1},"value":{"type":"string","minLength":1},"label":{"type":"string","minLength":1,"maxLength":200}},"required":["op","object","field","value","label"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"remove_option"},"object":{"type":"string","minLength":1},"field":{"type":"string","minLength":1},"value":{"type":"string","minLength":1}},"required":["op","object","field","value"],"additionalProperties":false}]},"SchemaChange":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"status":{"type":"string","enum":["applied","proposed","rejected","failed"]},"operations":{"type":"array","items":{"$ref":"#/components/schemas/SchemaDiffOperation"}},"request":{"type":"array","items":{"$ref":"#/components/schemas/SchemaOperation"}},"isDestructive":{"type":"boolean"},"template":{"type":"string"},"reason":{"type":["string","null"]},"requestedBy":{"$ref":"#/components/schemas/Actor"},"decidedBy":{"anyOf":[{"$ref":"#/components/schemas/Actor"},{"type":"null"}]},"appliedVersion":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"error":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"},"decidedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["id","status","operations","request","isDestructive","reason","requestedBy","decidedBy","appliedVersion","error","createdAt","decidedAt"]},"SchemaChangeResult":{"type":"object","properties":{"status":{"type":"string","enum":["applied","proposed","rejected","failed","unchanged"]},"change":{"anyOf":[{"$ref":"#/components/schemas/SchemaChange"},{"type":"null"}]},"schemaVersion":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"recordIds":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["status","change","schemaVersion"]},"SchemaDescription":{"type":"object","properties":{"workspace":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"slug":{"type":"string"},"schemaVersion":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"initialized":{"type":"boolean"},"templates":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"appliedAt":{"type":"string","format":"date-time"}},"required":["name","version","appliedAt"]}}},"required":["id","name","slug","schemaVersion","initialized","templates"]},"objects":{"type":"array","items":{"type":"object","properties":{"nameSingular":{"type":"string"},"namePlural":{"type":"string"},"labelSingular":{"type":"string"},"labelPlural":{"type":"string"},"description":{"type":["string","null"]},"labelField":{"type":["string","null"]},"class":{"type":"string","enum":["entity","event"]},"owner":{"type":"string","enum":["system","workspace","agent"]},"isProtected":{"type":"boolean"},"fields":{"type":"array","items":{"type":"object","properties":{"universalId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string","minLength":1},"label":{"type":"string","minLength":1,"maxLength":200},"description":{"type":["string","null"]},"type":{"type":"string","enum":["text","number","boolean","date","date_time","select","multi_select","money","emails","phones","links","full_name","address","relation","json","files"]},"settings":{"type":"object","properties":{"options":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string","minLength":1,"maxLength":100},"label":{"type":"string","minLength":1,"maxLength":200}},"required":["value","label"],"additionalProperties":false}},"targetObject":{"type":"string","minLength":1},"targetObjects":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","minLength":1}},"inverseField":{"type":"string","minLength":1},"relationCardinality":{"type":"string","enum":["many_to_one","many_to_many","one_to_many"]},"onDelete":{"type":"string","enum":["set_null","cascade"]},"rollUpEvents":{"type":"boolean"},"maxValues":{"type":"integer","exclusiveMinimum":0,"maximum":100},"isInverse":{"type":"boolean"}},"additionalProperties":false},"isNullable":{"type":"boolean"},"isUnique":{"type":"boolean"},"isFilterable":{"type":"boolean"},"isSearchable":{"type":"boolean"},"readOnly":{"type":"boolean"},"owner":{"type":"string","enum":["system","workspace","agent"]},"isProtected":{"type":"boolean"},"protectedOptions":{"type":"array","items":{"type":"string"}},"coreRole":{"type":"string","enum":["title","summary"]}},"required":["name","label","description","type","settings","isNullable","isUnique","isFilterable","isSearchable","readOnly","owner","isProtected"]}},"eventColumns":{"type":"array","items":{"type":"string","enum":["occurredAt","channel","externalId"]}}},"required":["nameSingular","namePlural","labelSingular","labelPlural","description","labelField","class","owner","isProtected","fields"]}},"valueFormats":{"type":"object","propertyNames":{"type":"string","enum":["text","number","boolean","date","date_time","select","multi_select","money","emails","phones","links","full_name","address","relation","json","files"]},"additionalProperties":{"type":"string"}},"builtIns":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","enum":["fact","comment","memory"]},"labelSingular":{"type":"string"},"labelPlural":{"type":"string"},"description":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"},"description":{"type":"string"}},"required":["name","type","description"]}},"writeWith":{"type":"array","items":{"type":"string"}},"readWith":{"type":"array","items":{"type":"string"}},"profiles":{"type":"array","items":{"type":"string","enum":["me","workspace"]}}},"required":["name","labelSingular","labelPlural","description","fields","writeWith","readWith"]}}},"required":["workspace","objects","valueFormats","builtIns"]},"Fact":{"allOf":[{"anyOf":[{"type":"object","properties":{"record":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["record"],"not":{"required":["profile"]}},{"type":"object","properties":{"profile":{"type":"string","enum":["me","workspace"]}},"required":["profile"],"not":{"required":["record"]}}]},{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"content":{"type":"string"},"kind":{"type":"string","enum":["stated","inferred"]},"validFrom":{"type":"string","format":"date-time"},"validTo":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"writtenBy":{"$ref":"#/components/schemas/Actor"},"sources":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"event":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"quote":{"type":["string","null"]}},"required":["event","quote"]},{"type":"object","properties":{"event":{"type":"null"},"internal":{"type":"boolean","const":true},"quote":{"type":"null"}},"required":["event","internal","quote"]}]}},"status":{"type":"string","enum":["current","retracted","superseded","ended"]}},"required":["id","content","kind","validFrom","validTo","writtenBy","sources"]}]},"FactsPage":{"allOf":[{"anyOf":[{"type":"object","properties":{"record":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["record"],"not":{"required":["profile"]}},{"type":"object","properties":{"profile":{"type":"string","enum":["me","workspace"]}},"required":["profile"],"not":{"required":["record"]}}]},{"type":"object","properties":{"facts":{"type":"array","items":{"$ref":"#/components/schemas/Fact"}},"nextCursor":{"type":["string","null"]}},"required":["facts","nextCursor"]}]},"HistoricalFact":{"allOf":[{"anyOf":[{"type":"object","properties":{"record":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["record"],"not":{"required":["profile"]}},{"type":"object","properties":{"profile":{"type":"string","enum":["me","workspace"]}},"required":["profile"],"not":{"required":["record"]}}]},{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"content":{"type":"string"},"kind":{"type":"string","enum":["stated","inferred"]},"validFrom":{"type":"string","format":"date-time"},"validTo":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"writtenBy":{"$ref":"#/components/schemas/Actor"},"sources":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"event":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"quote":{"type":["string","null"]}},"required":["event","quote"]},{"type":"object","properties":{"event":{"type":"null"},"internal":{"type":"boolean","const":true},"quote":{"type":"null"}},"required":["event","internal","quote"]}]}},"status":{"type":"string","enum":["current","retracted","superseded","ended"]}},"required":["id","content","kind","validFrom","validTo","writtenBy","sources"]},{"type":"object","properties":{"status":{"type":"string","enum":["current","retracted","superseded","ended"]}},"required":["status"]}]},"Comment":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"record":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"body":{"type":"string"},"author":{"$ref":"#/components/schemas/Actor"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"editedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["id","record","body","author","createdAt","updatedAt","editedAt"]},"CommentPage":{"type":"object","properties":{"record":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"items":{"type":"array","items":{"$ref":"#/components/schemas/Comment"}},"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"nextCursor":{"type":["string","null"]}},"required":["record","items","total","nextCursor"]},"DeleteRecord":{"type":"object","properties":{"retractedAssertions":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"recomputedRecordIds":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"hiddenFactIds":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"deleted":{"type":"boolean","const":true},"deletedRecordIds":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["id","deleted","deletedRecordIds"]},"RetractEvent":{"type":"object","properties":{"retractedAssertions":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"recomputedRecordIds":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"hiddenFactIds":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"deleted":{"type":"boolean","const":true}},"required":["retractedAssertions","recomputedRecordIds","hiddenFactIds","id","deleted"]},"ClearPersonalMemory":{"type":"object","properties":{"cleared":{"type":"boolean","const":true},"counts":{"type":"object","properties":{"profiles":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"facts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"notes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"responses":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["profiles","facts","notes","responses"]}},"required":["cleared","counts"]},"SavedView":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string"},"name":{"type":"string"},"kind":{"type":"string","enum":["table","board","calendar"]},"visibility":{"type":"string","enum":["workspace","private"]},"position":{"type":"number"},"filter":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"sort":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"direction":{"type":"string","enum":["asc","desc"]}},"required":["field","direction"]}},{"type":"null"}]},"columns":{"anyOf":[{"type":"object","properties":{"order":{"type":"array","items":{"type":"string"}},"widths":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"aggregates":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","enum":["countEmpty","countNotEmpty","percentEmpty","percentNotEmpty","countUnique","sum","avg","min","max"]}}},"required":["order"]},{"type":"null"}]},"groupBy":{"type":["string","null"]},"groupAggregate":{"anyOf":[{"type":"object","properties":{"field":{"type":"string"},"op":{"type":"string","enum":["countEmpty","countNotEmpty","percentEmpty","percentNotEmpty","countUnique","sum","avg","min","max"]}},"required":["field","op"]},{"type":"null"}]},"hiddenGroups":{"type":"array","items":{"type":["string","null"]}},"dateField":{"type":["string","null"]},"createdBy":{"$ref":"#/components/schemas/Actor"},"updatedBy":{"$ref":"#/components/schemas/Actor"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"issues":{"type":"array","items":{"type":"string"}}},"required":["id","object","name","kind","visibility","position","filter","sort","columns","groupBy","groupAggregate","hiddenGroups","dateField","createdBy","updatedBy","createdAt","updatedAt","issues"]},"Assertion":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"recordId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string"},"recordLabel":{"type":["string","null"]},"field":{"type":"string"},"value":{},"currentValue":{},"status":{"type":"string","enum":["active","superseded","pending_review","rejected","retracted"]},"reason":{"anyOf":[{"type":"string","enum":["outranked","low_confidence","unique_conflict"]},{"type":"null"}]},"actor":{"$ref":"#/components/schemas/Actor"},"confidence":{"type":"number"},"sourceRecordId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"isInitial":{"type":"boolean"},"observedAt":{"type":"string","format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"source":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"type":{"type":"string"},"title":{"type":["string","null"]},"occurredAt":{"type":"string","format":"date-time"}},"required":["id","type","title","occurredAt"]},{"type":"null"}]},"conflictingRecord":{"anyOf":[{"$ref":"#/components/schemas/RecordReference"},{"type":"null"}]},"relationReferences":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/RecordReference"}},"reviewedBy":{"anyOf":[{"$ref":"#/components/schemas/Actor"},{"type":"null"}]},"reviewedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["id","recordId","object","recordLabel","field","value","currentValue","status","reason","actor","confidence","sourceRecordId","isInitial","observedAt","createdAt","source","conflictingRecord","reviewedBy","reviewedAt"]},"AggregateResult":{"type":"object","properties":{"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"values":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"op":{"type":"string","enum":["countEmpty","countNotEmpty","percentEmpty","percentNotEmpty","countUnique","sum","avg","min","max"]},"value":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"object","properties":{"amountMicros":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"currency":{"type":"string","minLength":3,"maxLength":3}},"required":["amountMicros","currency"]},{"type":"null"}]},"mixedCurrencies":{"type":"boolean","const":true}},"required":["field","op","value"]}},"groups":{"type":"array","items":{"type":"object","properties":{"value":{"type":["string","null"]},"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"values":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"op":{"type":"string","enum":["countEmpty","countNotEmpty","percentEmpty","percentNotEmpty","countUnique","sum","avg","min","max"]},"value":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"object","properties":{"amountMicros":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"currency":{"type":"string","minLength":3,"maxLength":3}},"required":["amountMicros","currency"]},{"type":"null"}]},"mixedCurrencies":{"type":"boolean","const":true}},"required":["field","op","value"]}}},"required":["value","total","values"]}}},"required":["total","values"]},"AttachedEventPage":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string"},"label":{"type":["string","null"]},"fields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Keys are API field names from the workspace schema."},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"createdBy":{"$ref":"#/components/schemas/Actor"},"updatedBy":{"$ref":"#/components/schemas/Actor"},"provenance":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"pendingAssertion":{"anyOf":[{"$ref":"#/components/schemas/Assertion"},{"type":"null"}]},"assertion":{"anyOf":[{"$ref":"#/components/schemas/Assertion"},{"type":"null"}]},"pendingAssertionIds":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["assertion","pendingAssertionIds"]}},"relationReferences":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/RecordReference"}},"counts":{"type":"object","properties":{"comments":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"facts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"linked":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"claims":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["comments","facts","linked","claims"]},"event":{"$ref":"#/components/schemas/EventDetails"},"via":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"participant"}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","const":"about"}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","const":"field"},"field":{"type":"string"}},"required":["kind","field"]},{"type":"object","properties":{"kind":{"type":"string","const":"rollup"},"field":{"type":"string"},"record":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["kind","field","record"]}]}},"required":["id","object","label","fields","createdAt","updatedAt","createdBy","updatedBy","event","via"]}},"nextCursor":{"type":["string","null"]},"references":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/RecordReference"}}},"required":["items","nextCursor","references"]},"EventContentPage":{"type":"object","properties":{"parts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"occurredAt":{"type":"string","format":"date-time"},"originalDate":{"type":["string","null"]},"text":{"type":"string"}},"required":["id","occurredAt","originalDate","text"]}},"nextAfter":{"type":["string","null"]}},"required":["parts","nextAfter"]},"TimelineItem":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"type":{"type":"string"},"title":{"type":["string","null"]},"summary":{"type":["string","null"]},"via":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"participant"}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","const":"about"}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","const":"field"},"field":{"type":"string"}},"required":["kind","field"]},{"type":"object","properties":{"kind":{"type":"string","const":"rollup"},"field":{"type":"string"},"record":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["kind","field","record"]}]},"kind":{"type":"string","const":"event"},"at":{"type":"string","format":"date-time"}},"required":["id","type","title","summary","via","kind","at"]},{"type":"object","properties":{"kind":{"type":"string","const":"field_change"},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"at":{"type":"string","format":"date-time"},"field":{"type":"string"},"value":{},"status":{"type":"string","enum":["active","superseded"]},"current":{"type":"boolean"},"actor":{"$ref":"#/components/schemas/Actor"},"confidence":{"type":"number"},"source":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"type":{"type":"string"},"title":{"type":["string","null"]},"occurredAt":{"type":"string","format":"date-time"}},"required":["id","type","title","occurredAt"]},{"type":"null"}]},"relationReferences":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/RecordReference"}}},"required":["kind","id","at","field","value","status","current","actor","confidence","source"]},{"type":"object","properties":{"kind":{"type":"string","const":"fact"},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"at":{"type":"string","format":"date-time"},"content":{"type":"string"},"factKind":{"type":"string","enum":["stated","inferred"]},"status":{"type":"string","enum":["current","superseded","ended"]},"validTo":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"writtenBy":{"$ref":"#/components/schemas/Actor"},"sources":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"event":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"quote":{"type":["string","null"]}},"required":["event","quote"]},{"type":"object","properties":{"event":{"type":"null"},"internal":{"type":"boolean","const":true},"quote":{"type":"null"}},"required":["event","internal","quote"]}]}}},"required":["kind","id","at","content","factKind","status","validTo","writtenBy","sources"]}]},"TimelinePage":{"allOf":[{"anyOf":[{"type":"object","properties":{"record":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["record"],"not":{"required":["profile"]}},{"type":"object","properties":{"profile":{"type":"string","enum":["me","workspace"]}},"required":["profile"],"not":{"required":["record"]}}]},{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/TimelineItem"}},"nextCursor":{"type":["string","null"]}},"required":["items","nextCursor"]}]},"MergeSuggestion":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"recordIds":{"type":"array","prefixItems":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}],"items":false,"minItems":2,"maxItems":2},"records":{"type":"array","items":{"$ref":"#/components/schemas/RecordReference"}},"reason":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","recordIds","records","reason","createdAt"]},"UnresolvedParticipant":{"type":"object","properties":{"eventId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"position":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"handle":{"type":["string","null"]},"role":{"type":["string","null"]},"occurredAt":{"type":"string","format":"date-time"},"title":{"type":["string","null"]},"deletedRecordIds":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["eventId","position","handle","role","occurredAt","title","deletedRecordIds"]},"ReviewQueue":{"type":"object","properties":{"pendingAssertions":{"type":"array","items":{"$ref":"#/components/schemas/Assertion"}},"unresolvedParticipants":{"type":"array","items":{"$ref":"#/components/schemas/UnresolvedParticipant"}},"mergeSuggestions":{"type":"array","items":{"$ref":"#/components/schemas/MergeSuggestion"}},"totals":{"type":"object","propertyNames":{"type":"string","enum":["pendingAssertions","unresolvedParticipants","mergeSuggestions"]},"additionalProperties":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"required":["pendingAssertions","unresolvedParticipants","mergeSuggestions"]},"nextCursors":{"type":"object","propertyNames":{"type":"string","enum":["pendingAssertions","unresolvedParticipants","mergeSuggestions"]},"additionalProperties":{"type":["string","null"]},"required":["pendingAssertions","unresolvedParticipants","mergeSuggestions"]}},"required":["pendingAssertions","unresolvedParticipants","mergeSuggestions","totals","nextCursors"]},"LinkedRecordPage":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"title":{"type":["string","null"]},"object":{"type":"string"},"via":{"type":"object","properties":{"field":{"type":"string"},"on":{"type":"string","enum":["anchor","linked"]}},"required":["field","on"]},"selects":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["id","title","object","via","selects"]}},"nextCursor":{"type":["string","null"]},"totals":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}}},"required":["items","nextCursor","totals"]},"ContextPack":{"type":"object","properties":{"record":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string"},"label":{"type":["string","null"]},"fields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"value":{},"writtenBy":{"$ref":"#/components/schemas/Actor"},"observedAt":{"type":"string","format":"date-time"}},"required":["value","writtenBy","observedAt"]}}},"required":["id","object","label","fields"]},"linkedRecords":{"type":"array","items":{"type":"object","properties":{"object":{"type":"string"},"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"title":{"type":["string","null"]},"via":{"type":"object","properties":{"field":{"type":"string"},"on":{"type":"string","enum":["anchor","linked"]}},"required":["field","on"]},"selects":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["id","title","via","selects"]}}},"required":["object","total","items"]}},"facts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"content":{"type":"string"},"validFrom":{"type":"string","format":"date-time"},"writtenBy":{"$ref":"#/components/schemas/Actor"},"sources":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"internal":{"type":"boolean","const":true}},"required":["id","content","validFrom","writtenBy","sources"]}},"recentEvents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"type":{"type":"string"},"occurredAt":{"type":"string","format":"date-time"},"title":{"type":["string","null"]},"summary":{"type":["string","null"]},"via":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"participant"}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","const":"about"}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","const":"field"},"field":{"type":"string"}},"required":["kind","field"]},{"type":"object","properties":{"kind":{"type":"string","const":"rollup"},"field":{"type":"string"},"record":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["kind","field","record"]}]}},"required":["id","type","occurredAt","title","summary","via"]}},"omitted":{"type":"object","properties":{"linkedRecords":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"facts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"recentEvents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["linkedRecords","facts","recentEvents"]},"tokenEstimate":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["record","linkedRecords","facts","recentEvents","omitted","tokenEstimate"]},"ProfileContextPack":{"type":"object","properties":{"profile":{"type":"string","enum":["me","workspace"]},"label":{"type":["string","null"]},"facts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"content":{"type":"string"},"validFrom":{"type":"string","format":"date-time"},"writtenBy":{"$ref":"#/components/schemas/Actor"},"sources":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"internal":{"type":"boolean","const":true}},"required":["id","content","validFrom","writtenBy","sources"]}},"omitted":{"type":"object","properties":{"facts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["facts"]},"tokenEstimate":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["profile","label","facts","omitted","tokenEstimate"]},"SearchResult":{"type":"object","properties":{"records":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string"},"label":{"type":["string","null"]},"match":{"type":"string","enum":["text","similar_label"]},"detail":{"type":"string"}},"required":["id","object","label","match"]}},"facts":{"type":"array","items":{"allOf":[{"anyOf":[{"type":"object","properties":{"record":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["record"],"not":{"required":["profile"]}},{"type":"object","properties":{"profile":{"type":"string","enum":["me","workspace"]}},"required":["profile"],"not":{"required":["record"]}}]},{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"content":{"type":"string"},"validFrom":{"type":"string","format":"date-time"}},"required":["id","content","validFrom"]}]}},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"type":{"type":"string"},"occurredAt":{"type":"string","format":"date-time"},"title":{"type":["string","null"]},"summary":{"type":["string","null"]},"records":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"match":{"type":"string","const":"content"}},"required":["id","type","occurredAt","title","summary","records"]}},"references":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/RecordReference"}}},"required":["records","facts","events"]},"ForgetResult":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"forgotten":{"type":"boolean","const":true},"storage":{"type":"object","properties":{"pending":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"deletionIds":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["pending","deletionIds"]},"counts":{"type":"object","properties":{"records":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"events":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"facts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"assertions":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"inboundRelations":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"suppressedHandles":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"comments":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"files":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"sourceItems":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["records","events","facts","assertions","inboundRelations","suppressedHandles","comments"]},"recomputedRecordIds":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"reviewCandidates":{"type":"object","properties":{"records":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"facts":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"events":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["records","facts","events"]}},"required":["id","forgotten","counts","recomputedRecordIds","reviewCandidates"]},"DeleteImpact":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"records":{"type":"array","items":{"type":"object","properties":{"object":{"type":"string"},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["object","count"]}}},"required":["id","records"]},"BulkDeleteImpact":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"records":{"type":"array","items":{"type":"object","properties":{"object":{"type":"string"},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["object","count"]}}},"required":["ids","records"]},"MergeSuggestionDecision":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"status":{"type":"string","const":"dismissed"}},"required":["id","status"]},"MoveEventsResult":{"type":"object","properties":{"id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"dryRun":{"type":"boolean"},"from":{"type":"string"},"to":{"type":"string"},"eventIds":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"fields":{"type":"array","items":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"},"events":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["from","to","events"]}},"dropped":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"events":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"assertions":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["field","events","assertions"]}},"defaults":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"events":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["field","events"]}}},"required":["id","dryRun","from","to","eventIds","fields","dropped","defaults"]},"TemplateView":{"type":"object","properties":{"name":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"label":{"type":"string"},"description":{"type":"string"},"applied":{"type":"boolean"},"adds":{"type":"object","properties":{"objects":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"fields":{"type":"array","items":{"type":"string"}}},"required":["name","fields"]}},"fields":{"type":"array","items":{"type":"object","properties":{"object":{"type":"string"},"field":{"type":"string"}},"required":["object","field"]}}},"required":["objects","fields"]}},"required":["name","version","label","description","applied","adds"]},"FileMetadata":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"mediaType":{"type":"string","maxLength":150,"pattern":"^[a-z0-9][a-z0-9!#$&^_.+-]*\\/[a-z0-9][a-z0-9!#$&^_.+-]*$"},"bytes":{"type":"integer","minimum":1,"maximum":26214400},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"}},"required":["name","mediaType","bytes","sha256"]},"FileTransfer":{"type":"object","properties":{"url":{"type":"string"},"headers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"expiresAt":{"type":"string","format":"date-time"}},"required":["url","headers","expiresAt"]},"Health":{"type":"object","properties":{"status":{"type":"string","enum":["ok","error"]},"version":{"type":"string"},"database":{"type":"string","enum":["ok","unreachable"]},"restrictedServingProtocol":{"type":"integer"}},"required":["status","version","database"]},"Deleted":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"deleted":{"type":"boolean","const":true}},"required":["id","deleted"]}},"responses":{"Unauthorized":{"description":"The workspace API key is missing, invalid, or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"ApiError":{"description":"The request failed. Read error.code and error.message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}