{"openapi":"3.1.0","info":{"title":"Snoze API","version":"0.0.1","description":"The Snoze platform API. Authenticate with a workspace API key (`snoze_sk_…`) passed as a bearer token."},"paths":{"/v1/workspaces/{workspaceId}/api-keys":{"get":{"tags":["api-keys"],"operationId":"api-keys.list","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"prefix":{"type":"string"},"scopes":{"type":"array","items":{"type":"string","enum":["workspace:read","workspace:update","workspace:delete","members:read","members:invite","members:manage","workspace_changes:read","workspace_changes:propose","workspace_changes:apply","resources:read","resources:write","surfaces:read","surfaces:write","blocks:read","blocks:write","blocks:comment","canvas:read","canvas:write","files:read","files:write","databases:read","databases:write","records:read","records:write","records:comment","time_entries:read","time_entries:write","time_entries:manage","views:read","views:write","data_sources:read","data_sources:write","models:read","models:write","actions:read","actions:write","actions:run","automations:read","automations:write","api_keys:read","api_keys:write","webhooks:read","webhooks:write","integrations:read","integrations:write","ai:read","ai:write","billing:read","billing:manage"]}},"boundUserId":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"createdByUserId":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"lastUsedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"expiresAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"revokedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","name","prefix","scopes"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"post":{"tags":["api-keys"],"operationId":"api-keys.create","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"apiKey":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"prefix":{"type":"string"},"scopes":{"type":"array","items":{"type":"string","enum":["workspace:read","workspace:update","workspace:delete","members:read","members:invite","members:manage","workspace_changes:read","workspace_changes:propose","workspace_changes:apply","resources:read","resources:write","surfaces:read","surfaces:write","blocks:read","blocks:write","blocks:comment","canvas:read","canvas:write","files:read","files:write","databases:read","databases:write","records:read","records:write","records:comment","time_entries:read","time_entries:write","time_entries:manage","views:read","views:write","data_sources:read","data_sources:write","models:read","models:write","actions:read","actions:write","actions:run","automations:read","automations:write","api_keys:read","api_keys:write","webhooks:read","webhooks:write","integrations:read","integrations:write","ai:read","ai:write","billing:read","billing:manage"]}},"boundUserId":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"createdByUserId":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"lastUsedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"expiresAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"revokedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","name","prefix","scopes"],"additionalProperties":false},"token":{"type":"string"}},"required":["apiKey","token"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"scopes":{"type":"array","items":{"type":"string","enum":["workspace:read","workspace:update","workspace:delete","members:read","members:invite","members:manage","workspace_changes:read","workspace_changes:propose","workspace_changes:apply","resources:read","resources:write","surfaces:read","surfaces:write","blocks:read","blocks:write","blocks:comment","canvas:read","canvas:write","files:read","files:write","databases:read","databases:write","records:read","records:write","records:comment","time_entries:read","time_entries:write","time_entries:manage","views:read","views:write","data_sources:read","data_sources:write","models:read","models:write","actions:read","actions:write","actions:run","automations:read","automations:write","api_keys:read","api_keys:write","webhooks:read","webhooks:write","integrations:read","integrations:write","ai:read","ai:write","billing:read","billing:manage"]}},"expiresAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["name","scopes"],"additionalProperties":false}}},"required":true}}},"/v1/workspaces/{workspaceId}/api-keys/{apiKeyId}":{"delete":{"tags":["api-keys"],"operationId":"api-keys.revoke","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"apiKeyId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/workspaces/{workspaceId}/api-keys/request-logs":{"get":{"tags":["api-keys"],"operationId":"api-keys.listRequestLogs","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"limit","in":"query","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"apiKeyId":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"principalType":{"type":"string"},"principalId":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"method":{"type":"string"},"path":{"type":"string"},"status":{"type":"number"},"idempotencyKey":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"error":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"durationMs":{"anyOf":[{"anyOf":[{"type":"number"},{"type":"null"}]},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","principalType","method","path","status"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/items":{"get":{"tags":["items"],"operationId":"items.list","parameters":[{"name":"kind","in":"query","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false},{"name":"parentId","in":"query","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false},{"name":"cursor","in":"query","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false},{"name":"limit","in":"query","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","examples":["0b6f2e6a-9f2c-4e7a-8d31-2c1e7a9f2c4e"]},"workspaceId":{"type":"string","examples":["4b81aa0c-6d2f-4b19-9f0e-1a7c3d5e8b02"]},"parentItemId":{"anyOf":[{"type":"string","examples":["d3a7f1b8-5c04-4e62-9a11-7b2e6c0d4f39"]},{"type":"null"}]},"kind":{"type":"string","enum":["folder","page","note","dashboard","canvas","view","form","database","file","data_source","action","automation","external_resource"],"examples":["database"]},"targetId":{"anyOf":[{"type":"string","examples":["9f2c1e7a-3b58-4d0c-8e27-6a1f9d4b3c85"]},{"type":"null"}]},"title":{"type":"string","examples":["Launch tasks"]},"icon":{"anyOf":[{"type":"string","examples":["rocket"]},{"type":"null"}]},"color":{"anyOf":[{"type":"string","examples":["#2f6f4f"]},{"type":"null"}]},"order":{"type":"number"},"archived":{"type":"boolean","examples":[false]},"accessMode":{"type":"string","enum":["open","restricted"],"examples":["open"]},"metadata":{"type":"object"},"createdAt":{"anyOf":[{"type":"string","examples":["2026-07-01T09:12:44.000Z"]},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","examples":["2026-07-14T16:03:10.000Z"]},{"type":"null"}]}},"required":["id","workspaceId","kind","title","order","archived","accessMode","metadata"],"additionalProperties":false}},"cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"examples":["NTA"]}},"required":["items","cursor"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"post":{"tags":["items"],"operationId":"items.create","parameters":[],"security":[{"apiKey":[]}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"item":{"type":"object","properties":{"id":{"type":"string","examples":["0b6f2e6a-9f2c-4e7a-8d31-2c1e7a9f2c4e"]},"workspaceId":{"type":"string","examples":["4b81aa0c-6d2f-4b19-9f0e-1a7c3d5e8b02"]},"parentItemId":{"anyOf":[{"type":"string","examples":["d3a7f1b8-5c04-4e62-9a11-7b2e6c0d4f39"]},{"type":"null"}]},"kind":{"type":"string","enum":["folder","page","note","dashboard","canvas","view","form","database","file","data_source","action","automation","external_resource"],"examples":["database"]},"targetId":{"anyOf":[{"type":"string","examples":["9f2c1e7a-3b58-4d0c-8e27-6a1f9d4b3c85"]},{"type":"null"}]},"title":{"type":"string","examples":["Launch tasks"]},"icon":{"anyOf":[{"type":"string","examples":["rocket"]},{"type":"null"}]},"color":{"anyOf":[{"type":"string","examples":["#2f6f4f"]},{"type":"null"}]},"order":{"type":"number"},"archived":{"type":"boolean","examples":[false]},"accessMode":{"type":"string","enum":["open","restricted"],"examples":["open"]},"metadata":{"type":"object"},"createdAt":{"anyOf":[{"type":"string","examples":["2026-07-01T09:12:44.000Z"]},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","examples":["2026-07-14T16:03:10.000Z"]},{"type":"null"}]}},"required":["id","workspaceId","kind","title","order","archived","accessMode","metadata"],"additionalProperties":false},"database":{"anyOf":[{"type":"object","properties":{"fields":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"databaseId":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"kind":{"type":"string","enum":["text","long_text","number","date","select","multi_select","status","checkbox","url","email","phone","user","file","place","json","created_at","created_by","updated_at","updated_by","unique_id","formula","relation","rollup","time_tracking","button"]},"required":{"type":"boolean"},"options":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}]},"key":{"type":"string"},"name":{"type":"string"},"color":{"type":"string"},"order":{"type":"number"}},"required":["key","name","color","order"],"additionalProperties":false}},{"type":"null"}]},"settings":{"type":"object"},"order":{"type":"number"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","databaseId","key","label","kind","required","settings","order"],"additionalProperties":false}}},"required":["fields"],"additionalProperties":false},{"type":"null"}]},"file":{"anyOf":[{"type":"object","properties":{"fileId":{"type":"string","examples":["77c0d9e4-1f36-4a82-95cb-0d47e2b8a613"]},"name":{"type":"string","examples":["roadmap.pdf"]},"mimeType":{"type":"string","examples":["application/pdf"]},"byteSize":{"type":"number"},"downloadUrl":{"type":"string","examples":["/v1/assets/77c0d9e4-1f36-4a82-95cb-0d47e2b8a613/9tKq…"]},"createdAt":{"anyOf":[{"type":"string","examples":["2026-07-14T16:20:00.000Z"]},{"type":"null"}]}},"required":["fileId","name","mimeType","byteSize","downloadUrl"],"additionalProperties":false},{"type":"null"}]}},"required":["item"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["folder","page","note","dashboard","canvas","form","database","file"]},"title":{"type":"string"},"parentItemId":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"order":{"anyOf":[{"type":"number"},{"type":"null"}]},"fileId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["kind","title"],"additionalProperties":false}}},"required":true}}},"/v1/items/{itemId}":{"get":{"tags":["items"],"operationId":"items.get","parameters":[{"name":"itemId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"item":{"type":"object","properties":{"id":{"type":"string","examples":["0b6f2e6a-9f2c-4e7a-8d31-2c1e7a9f2c4e"]},"workspaceId":{"type":"string","examples":["4b81aa0c-6d2f-4b19-9f0e-1a7c3d5e8b02"]},"parentItemId":{"anyOf":[{"type":"string","examples":["d3a7f1b8-5c04-4e62-9a11-7b2e6c0d4f39"]},{"type":"null"}]},"kind":{"type":"string","enum":["folder","page","note","dashboard","canvas","view","form","database","file","data_source","action","automation","external_resource"],"examples":["database"]},"targetId":{"anyOf":[{"type":"string","examples":["9f2c1e7a-3b58-4d0c-8e27-6a1f9d4b3c85"]},{"type":"null"}]},"title":{"type":"string","examples":["Launch tasks"]},"icon":{"anyOf":[{"type":"string","examples":["rocket"]},{"type":"null"}]},"color":{"anyOf":[{"type":"string","examples":["#2f6f4f"]},{"type":"null"}]},"order":{"type":"number"},"archived":{"type":"boolean","examples":[false]},"accessMode":{"type":"string","enum":["open","restricted"],"examples":["open"]},"metadata":{"type":"object"},"createdAt":{"anyOf":[{"type":"string","examples":["2026-07-01T09:12:44.000Z"]},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","examples":["2026-07-14T16:03:10.000Z"]},{"type":"null"}]}},"required":["id","workspaceId","kind","title","order","archived","accessMode","metadata"],"additionalProperties":false},"database":{"anyOf":[{"type":"object","properties":{"fields":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"databaseId":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"kind":{"type":"string","enum":["text","long_text","number","date","select","multi_select","status","checkbox","url","email","phone","user","file","place","json","created_at","created_by","updated_at","updated_by","unique_id","formula","relation","rollup","time_tracking","button"]},"required":{"type":"boolean"},"options":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}]},"key":{"type":"string"},"name":{"type":"string"},"color":{"type":"string"},"order":{"type":"number"}},"required":["key","name","color","order"],"additionalProperties":false}},{"type":"null"}]},"settings":{"type":"object"},"order":{"type":"number"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","databaseId","key","label","kind","required","settings","order"],"additionalProperties":false}}},"required":["fields"],"additionalProperties":false},{"type":"null"}]},"file":{"anyOf":[{"type":"object","properties":{"fileId":{"type":"string","examples":["77c0d9e4-1f36-4a82-95cb-0d47e2b8a613"]},"name":{"type":"string","examples":["roadmap.pdf"]},"mimeType":{"type":"string","examples":["application/pdf"]},"byteSize":{"type":"number"},"downloadUrl":{"type":"string","examples":["/v1/assets/77c0d9e4-1f36-4a82-95cb-0d47e2b8a613/9tKq…"]},"createdAt":{"anyOf":[{"type":"string","examples":["2026-07-14T16:20:00.000Z"]},{"type":"null"}]}},"required":["fileId","name","mimeType","byteSize","downloadUrl"],"additionalProperties":false},{"type":"null"}]}},"required":["item"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"patch":{"tags":["items"],"operationId":"items.update","parameters":[{"name":"itemId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"item":{"type":"object","properties":{"id":{"type":"string","examples":["0b6f2e6a-9f2c-4e7a-8d31-2c1e7a9f2c4e"]},"workspaceId":{"type":"string","examples":["4b81aa0c-6d2f-4b19-9f0e-1a7c3d5e8b02"]},"parentItemId":{"anyOf":[{"type":"string","examples":["d3a7f1b8-5c04-4e62-9a11-7b2e6c0d4f39"]},{"type":"null"}]},"kind":{"type":"string","enum":["folder","page","note","dashboard","canvas","view","form","database","file","data_source","action","automation","external_resource"],"examples":["database"]},"targetId":{"anyOf":[{"type":"string","examples":["9f2c1e7a-3b58-4d0c-8e27-6a1f9d4b3c85"]},{"type":"null"}]},"title":{"type":"string","examples":["Launch tasks"]},"icon":{"anyOf":[{"type":"string","examples":["rocket"]},{"type":"null"}]},"color":{"anyOf":[{"type":"string","examples":["#2f6f4f"]},{"type":"null"}]},"order":{"type":"number"},"archived":{"type":"boolean","examples":[false]},"accessMode":{"type":"string","enum":["open","restricted"],"examples":["open"]},"metadata":{"type":"object"},"createdAt":{"anyOf":[{"type":"string","examples":["2026-07-01T09:12:44.000Z"]},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","examples":["2026-07-14T16:03:10.000Z"]},{"type":"null"}]}},"required":["id","workspaceId","kind","title","order","archived","accessMode","metadata"],"additionalProperties":false},"database":{"anyOf":[{"type":"object","properties":{"fields":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"databaseId":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"kind":{"type":"string","enum":["text","long_text","number","date","select","multi_select","status","checkbox","url","email","phone","user","file","place","json","created_at","created_by","updated_at","updated_by","unique_id","formula","relation","rollup","time_tracking","button"]},"required":{"type":"boolean"},"options":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}]},"key":{"type":"string"},"name":{"type":"string"},"color":{"type":"string"},"order":{"type":"number"}},"required":["key","name","color","order"],"additionalProperties":false}},{"type":"null"}]},"settings":{"type":"object"},"order":{"type":"number"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","databaseId","key","label","kind","required","settings","order"],"additionalProperties":false}}},"required":["fields"],"additionalProperties":false},{"type":"null"}]},"file":{"anyOf":[{"type":"object","properties":{"fileId":{"type":"string","examples":["77c0d9e4-1f36-4a82-95cb-0d47e2b8a613"]},"name":{"type":"string","examples":["roadmap.pdf"]},"mimeType":{"type":"string","examples":["application/pdf"]},"byteSize":{"type":"number"},"downloadUrl":{"type":"string","examples":["/v1/assets/77c0d9e4-1f36-4a82-95cb-0d47e2b8a613/9tKq…"]},"createdAt":{"anyOf":[{"type":"string","examples":["2026-07-14T16:20:00.000Z"]},{"type":"null"}]}},"required":["fileId","name","mimeType","byteSize","downloadUrl"],"additionalProperties":false},{"type":"null"}]}},"required":["item"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"parentItemId":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"icon":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"color":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"order":{"anyOf":[{"type":"number"},{"type":"null"}]},"archived":{"anyOf":[{"type":"boolean"},{"type":"null"}]}},"additionalProperties":false}}},"required":true}},"delete":{"tags":["items"],"operationId":"items.delete","parameters":[{"name":"itemId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"item":{"type":"object","properties":{"id":{"type":"string","examples":["0b6f2e6a-9f2c-4e7a-8d31-2c1e7a9f2c4e"]},"workspaceId":{"type":"string","examples":["4b81aa0c-6d2f-4b19-9f0e-1a7c3d5e8b02"]},"parentItemId":{"anyOf":[{"type":"string","examples":["d3a7f1b8-5c04-4e62-9a11-7b2e6c0d4f39"]},{"type":"null"}]},"kind":{"type":"string","enum":["folder","page","note","dashboard","canvas","view","form","database","file","data_source","action","automation","external_resource"],"examples":["database"]},"targetId":{"anyOf":[{"type":"string","examples":["9f2c1e7a-3b58-4d0c-8e27-6a1f9d4b3c85"]},{"type":"null"}]},"title":{"type":"string","examples":["Launch tasks"]},"icon":{"anyOf":[{"type":"string","examples":["rocket"]},{"type":"null"}]},"color":{"anyOf":[{"type":"string","examples":["#2f6f4f"]},{"type":"null"}]},"order":{"type":"number"},"archived":{"type":"boolean","examples":[false]},"accessMode":{"type":"string","enum":["open","restricted"],"examples":["open"]},"metadata":{"type":"object"},"createdAt":{"anyOf":[{"type":"string","examples":["2026-07-01T09:12:44.000Z"]},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","examples":["2026-07-14T16:03:10.000Z"]},{"type":"null"}]}},"required":["id","workspaceId","kind","title","order","archived","accessMode","metadata"],"additionalProperties":false},"database":{"anyOf":[{"type":"object","properties":{"fields":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"databaseId":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"kind":{"type":"string","enum":["text","long_text","number","date","select","multi_select","status","checkbox","url","email","phone","user","file","place","json","created_at","created_by","updated_at","updated_by","unique_id","formula","relation","rollup","time_tracking","button"]},"required":{"type":"boolean"},"options":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}]},"key":{"type":"string"},"name":{"type":"string"},"color":{"type":"string"},"order":{"type":"number"}},"required":["key","name","color","order"],"additionalProperties":false}},{"type":"null"}]},"settings":{"type":"object"},"order":{"type":"number"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","databaseId","key","label","kind","required","settings","order"],"additionalProperties":false}}},"required":["fields"],"additionalProperties":false},{"type":"null"}]},"file":{"anyOf":[{"type":"object","properties":{"fileId":{"type":"string","examples":["77c0d9e4-1f36-4a82-95cb-0d47e2b8a613"]},"name":{"type":"string","examples":["roadmap.pdf"]},"mimeType":{"type":"string","examples":["application/pdf"]},"byteSize":{"type":"number"},"downloadUrl":{"type":"string","examples":["/v1/assets/77c0d9e4-1f36-4a82-95cb-0d47e2b8a613/9tKq…"]},"createdAt":{"anyOf":[{"type":"string","examples":["2026-07-14T16:20:00.000Z"]},{"type":"null"}]}},"required":["fileId","name","mimeType","byteSize","downloadUrl"],"additionalProperties":false},{"type":"null"}]}},"required":["item"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/databases/{databaseId}/records":{"get":{"tags":["records"],"operationId":"records.list","parameters":[{"name":"databaseId","in":"path","schema":{"type":"string"},"required":true},{"name":"viewId","in":"query","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false},{"name":"search","in":"query","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false},{"name":"cursor","in":"query","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false},{"name":"limit","in":"query","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"records":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","examples":["1d8a44e0-7c93-4f21-b60a-3e8d2f5a9c14"]},"workspaceId":{"type":"string","examples":["4b81aa0c-6d2f-4b19-9f0e-1a7c3d5e8b02"]},"databaseId":{"type":"string","examples":["9f2c1e7a-3b58-4d0c-8e27-6a1f9d4b3c85"]},"contentSurfaceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string","examples":["Ship the desktop app"]},"data":{"type":"object","examples":[{"status":"in_progress","due":"2026-08-01"}]},"relations":{"type":"object"},"computed":{"type":"object"},"system":{"type":"object"},"related":{"anyOf":[{"type":"object"},{"type":"null"}]},"archived":{"type":"boolean","examples":[false]},"createdByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string","examples":["2026-07-10T08:00:00.000Z"]},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","examples":["2026-07-14T11:26:02.000Z"]},{"type":"null"}]}},"required":["id","workspaceId","databaseId","title","data","relations","computed","system","archived"],"additionalProperties":false}},"cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"examples":["k2|100|1d8a44e0-7c93-4f21-b60a-3e8d2f5a9c14"]},"hasMore":{"type":"boolean","examples":[true]}},"required":["records","cursor","hasMore"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"post":{"tags":["records"],"operationId":"records.create","parameters":[{"name":"databaseId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","examples":["1d8a44e0-7c93-4f21-b60a-3e8d2f5a9c14"]},"workspaceId":{"type":"string","examples":["4b81aa0c-6d2f-4b19-9f0e-1a7c3d5e8b02"]},"databaseId":{"type":"string","examples":["9f2c1e7a-3b58-4d0c-8e27-6a1f9d4b3c85"]},"contentSurfaceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string","examples":["Ship the desktop app"]},"data":{"type":"object","examples":[{"status":"in_progress","due":"2026-08-01"}]},"relations":{"type":"object"},"computed":{"type":"object"},"system":{"type":"object"},"related":{"anyOf":[{"type":"object"},{"type":"null"}]},"archived":{"type":"boolean","examples":[false]},"createdByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string","examples":["2026-07-10T08:00:00.000Z"]},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","examples":["2026-07-14T11:26:02.000Z"]},{"type":"null"}]}},"required":["id","workspaceId","databaseId","title","data","relations","computed","system","archived"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"data":{"anyOf":[{"type":"object"},{"type":"null"}]}},"additionalProperties":false}}},"required":true}}},"/v1/records/{recordId}":{"get":{"tags":["records"],"operationId":"records.get","parameters":[{"name":"recordId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","examples":["1d8a44e0-7c93-4f21-b60a-3e8d2f5a9c14"]},"workspaceId":{"type":"string","examples":["4b81aa0c-6d2f-4b19-9f0e-1a7c3d5e8b02"]},"databaseId":{"type":"string","examples":["9f2c1e7a-3b58-4d0c-8e27-6a1f9d4b3c85"]},"contentSurfaceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string","examples":["Ship the desktop app"]},"data":{"type":"object","examples":[{"status":"in_progress","due":"2026-08-01"}]},"relations":{"type":"object"},"computed":{"type":"object"},"system":{"type":"object"},"related":{"anyOf":[{"type":"object"},{"type":"null"}]},"archived":{"type":"boolean","examples":[false]},"createdByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string","examples":["2026-07-10T08:00:00.000Z"]},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","examples":["2026-07-14T11:26:02.000Z"]},{"type":"null"}]}},"required":["id","workspaceId","databaseId","title","data","relations","computed","system","archived"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"patch":{"tags":["records"],"operationId":"records.update","parameters":[{"name":"recordId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","examples":["1d8a44e0-7c93-4f21-b60a-3e8d2f5a9c14"]},"workspaceId":{"type":"string","examples":["4b81aa0c-6d2f-4b19-9f0e-1a7c3d5e8b02"]},"databaseId":{"type":"string","examples":["9f2c1e7a-3b58-4d0c-8e27-6a1f9d4b3c85"]},"contentSurfaceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string","examples":["Ship the desktop app"]},"data":{"type":"object","examples":[{"status":"in_progress","due":"2026-08-01"}]},"relations":{"type":"object"},"computed":{"type":"object"},"system":{"type":"object"},"related":{"anyOf":[{"type":"object"},{"type":"null"}]},"archived":{"type":"boolean","examples":[false]},"createdByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string","examples":["2026-07-10T08:00:00.000Z"]},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","examples":["2026-07-14T11:26:02.000Z"]},{"type":"null"}]}},"required":["id","workspaceId","databaseId","title","data","relations","computed","system","archived"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"data":{"anyOf":[{"type":"object"},{"type":"null"}]},"archived":{"anyOf":[{"type":"boolean"},{"type":"null"}]}},"additionalProperties":false}}},"required":true}},"delete":{"tags":["records"],"operationId":"records.delete","parameters":[{"name":"recordId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","examples":["1d8a44e0-7c93-4f21-b60a-3e8d2f5a9c14"]},"workspaceId":{"type":"string","examples":["4b81aa0c-6d2f-4b19-9f0e-1a7c3d5e8b02"]},"databaseId":{"type":"string","examples":["9f2c1e7a-3b58-4d0c-8e27-6a1f9d4b3c85"]},"contentSurfaceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string","examples":["Ship the desktop app"]},"data":{"type":"object","examples":[{"status":"in_progress","due":"2026-08-01"}]},"relations":{"type":"object"},"computed":{"type":"object"},"system":{"type":"object"},"related":{"anyOf":[{"type":"object"},{"type":"null"}]},"archived":{"type":"boolean","examples":[false]},"createdByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string","examples":["2026-07-10T08:00:00.000Z"]},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","examples":["2026-07-14T11:26:02.000Z"]},{"type":"null"}]}},"required":["id","workspaceId","databaseId","title","data","relations","computed","system","archived"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/files/{fileId}":{"get":{"tags":["files"],"operationId":"files.get","parameters":[{"name":"fileId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"fileId":{"type":"string","examples":["77c0d9e4-1f36-4a82-95cb-0d47e2b8a613"]},"name":{"type":"string","examples":["roadmap.pdf"]},"mimeType":{"type":"string","examples":["application/pdf"]},"byteSize":{"type":"number"},"downloadUrl":{"type":"string","examples":["/v1/assets/77c0d9e4-1f36-4a82-95cb-0d47e2b8a613/9tKq…"]},"createdAt":{"anyOf":[{"type":"string","examples":["2026-07-14T16:20:00.000Z"]},{"type":"null"}]}},"required":["fileId","name","mimeType","byteSize","downloadUrl"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/workspaces/{workspaceId}/items/{itemId}/backlinks":{"get":{"tags":["backlinks"],"operationId":"backlinks.getItemBacklinks","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"itemId","in":"path","schema":{"type":"string"},"required":true},{"name":"limit","in":"query","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"backlinks":{"type":"array","items":{"type":"object","properties":{"sourceItemId":{"type":"string"},"sourceItemTitle":{"type":"string"},"surfaceId":{"type":"string"},"blockId":{"type":"string"},"blockKind":{"type":"string","enum":["paragraph","heading_1","heading_2","heading_3","heading_4","heading_5","heading_6","bulleted_list_item","numbered_list_item","to_do","toggle","quote","callout","code","divider","image","bookmark","embed","file","video","audio","column_list","column","database_view","page_link","table_of_contents","equation","table","synced_page","footnote","metric","insight","activity_feed","button","form_embed","drive_embed"]},"snippet":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["sourceItemId","sourceItemTitle","surfaceId","blockId","blockKind"],"additionalProperties":false}}},"required":["backlinks"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/workspaces/{workspaceId}/notifications":{"get":{"tags":["notifications"],"operationId":"notifications.list","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"limit","in":"query","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false},{"name":"unreadOnly","in":"query","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"notifications":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"recipientUserId":{"type":"string"},"actorUserId":{"type":"string"},"actorDisplayName":{"anyOf":[{"type":"string"},{"type":"null"}]},"actorAvatarUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"kind":{"type":"string","enum":["comment","mention","time_entry_completed"]},"surfaceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"itemId":{"anyOf":[{"type":"string"},{"type":"null"}]},"blockId":{"anyOf":[{"type":"string"},{"type":"null"}]},"commentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"preview":{"anyOf":[{"type":"string"},{"type":"null"}]},"surfaceTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"readAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","recipientUserId","actorUserId","kind"],"additionalProperties":false}}},"required":["notifications"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/workspaces/{workspaceId}/notifications/read":{"post":{"tags":["notifications"],"operationId":"notifications.markRead","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"notificationIds":{"type":"array","items":{"type":"string"}},"readAt":{"type":"string"}},"required":["notificationIds","readAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"notificationId":{"anyOf":[{"type":"string","allOf":[{"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|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$","format":"uuid"}]},{"type":"null"}]},"all":{"anyOf":[{"type":"boolean"},{"type":"null"}]}},"additionalProperties":false}}},"required":true}}},"/v1/workspaces/{workspaceId}/items/{itemId}/share-links":{"post":{"tags":["item-share-links"],"operationId":"item-share-links.create","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"itemId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspaceItemId":{"type":"string"},"workspaceId":{"type":"string"},"kind":{"type":"string","enum":["folder","page","note","dashboard","canvas","view","form","database","file","data_source","action","automation","external_resource"]},"url":{"type":"string"},"expiresAt":{"type":"string"},"allowDownload":{"type":"boolean"},"maxUses":{"anyOf":[{"type":"number"},{"type":"null"}]},"useCount":{"type":"number"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"revokedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceItemId","workspaceId","kind","url","expiresAt","allowDownload","useCount"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"expiresInSeconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxUses":{"anyOf":[{"type":"number"},{"type":"null"}]},"allowDownload":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"accessLevel":{"anyOf":[{"type":"string","enum":["view","comment","edit"]},{"type":"null"}]}},"additionalProperties":false}}},"required":true}},"get":{"tags":["item-share-links"],"operationId":"item-share-links.list","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"itemId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceItemId":{"type":"string"},"workspaceId":{"type":"string"},"kind":{"type":"string","enum":["folder","page","note","dashboard","canvas","view","form","database","file","data_source","action","automation","external_resource"]},"url":{"type":"string"},"expiresAt":{"type":"string"},"allowDownload":{"type":"boolean"},"maxUses":{"anyOf":[{"type":"number"},{"type":"null"}]},"useCount":{"type":"number"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"revokedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceItemId","workspaceId","kind","url","expiresAt","allowDownload","useCount"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/workspaces/{workspaceId}/items/{itemId}/share-links/{linkId}":{"delete":{"tags":["item-share-links"],"operationId":"item-share-links.revoke","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"itemId","in":"path","schema":{"type":"string"},"required":true},{"name":"linkId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/shares/{token}/resolve":{"get":{"tags":["item-share-links"],"operationId":"item-share-links.resolveForActor","parameters":[{"name":"token","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"workspaceId":{"type":"string"},"workspaceName":{"anyOf":[{"type":"string"},{"type":"null"}]},"accessLevel":{"type":"string","enum":["view","comment","edit","full"]},"item":{"type":"object","properties":{"id":{"type":"string","examples":["0b6f2e6a-9f2c-4e7a-8d31-2c1e7a9f2c4e"]},"workspaceId":{"type":"string","examples":["4b81aa0c-6d2f-4b19-9f0e-1a7c3d5e8b02"]},"parentItemId":{"anyOf":[{"type":"string","examples":["d3a7f1b8-5c04-4e62-9a11-7b2e6c0d4f39"]},{"type":"null"}]},"kind":{"type":"string","enum":["folder","page","note","dashboard","canvas","view","form","database","file","data_source","action","automation","external_resource"],"examples":["database"]},"targetId":{"anyOf":[{"type":"string","examples":["9f2c1e7a-3b58-4d0c-8e27-6a1f9d4b3c85"]},{"type":"null"}]},"title":{"type":"string","examples":["Launch tasks"]},"icon":{"anyOf":[{"type":"string","examples":["rocket"]},{"type":"null"}]},"color":{"anyOf":[{"type":"string","examples":["#2f6f4f"]},{"type":"null"}]},"order":{"type":"number"},"archived":{"type":"boolean","examples":[false]},"accessMode":{"type":"string","enum":["open","restricted"],"examples":["open"]},"metadata":{"type":"object"},"createdAt":{"anyOf":[{"type":"string","examples":["2026-07-01T09:12:44.000Z"]},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","examples":["2026-07-14T16:03:10.000Z"]},{"type":"null"}]}},"required":["id","workspaceId","kind","title","order","archived","accessMode","metadata"],"additionalProperties":false}},"required":["workspaceId","accessLevel","item"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/public/shares/{token}":{"get":{"tags":["public-shares"],"operationId":"public-shares.resolve","parameters":[{"name":"token","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["surface"]},"meta":{"type":"object","properties":{"kind":{"type":"string","enum":["folder","page","note","dashboard","canvas","view","form","database","file","data_source","action","automation","external_resource"]},"title":{"type":"string"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"allowDownload":{"type":"boolean"},"accessLevel":{"anyOf":[{"type":"string","enum":["view","comment","edit","full"]},{"type":"null"}]},"workspaceName":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["kind","title","allowDownload"],"additionalProperties":false},"surfaceId":{"type":"string"},"surfaceKind":{"type":"string"},"manifest":{"type":"object"},"blocks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"surfaceId":{"type":"string"},"parentBlockId":{"anyOf":[{"type":"string"},{"type":"null"}]},"kind":{"type":"string","enum":["paragraph","heading_1","heading_2","heading_3","heading_4","heading_5","heading_6","bulleted_list_item","numbered_list_item","to_do","toggle","quote","callout","code","divider","image","bookmark","embed","file","video","audio","column_list","column","database_view","page_link","table_of_contents","equation","table","synced_page","footnote","metric","insight","activity_feed","button","form_embed","drive_embed"]},"orderKey":{"type":"string"},"manifest":{"type":"object"},"layout":{"anyOf":[{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"},"w":{"type":"number"},"h":{"type":"number"}},"required":["x","y","w","h"],"additionalProperties":false},{"type":"null"}]},{"type":"null"}]},"plainText":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","surfaceId","kind","orderKey","manifest"],"additionalProperties":false}},"hasMore":{"type":"boolean"}},"required":["type","meta","surfaceId","surfaceKind","manifest","blocks","hasMore"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["file"]},"meta":{"type":"object","properties":{"kind":{"type":"string","enum":["folder","page","note","dashboard","canvas","view","form","database","file","data_source","action","automation","external_resource"]},"title":{"type":"string"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"allowDownload":{"type":"boolean"},"accessLevel":{"anyOf":[{"type":"string","enum":["view","comment","edit","full"]},{"type":"null"}]},"workspaceName":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["kind","title","allowDownload"],"additionalProperties":false},"name":{"type":"string"},"mimeType":{"type":"string"},"byteSize":{"type":"number"},"url":{"type":"string"}},"required":["type","meta","name","mimeType","byteSize","url"],"additionalProperties":false}]}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/public/shares/{token}/comment":{"post":{"tags":["public-shares"],"operationId":"public-shares.comment","parameters":[{"name":"token","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"blockId":{"type":"string"},"body":{"type":"string"},"guestName":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["blockId","body"],"additionalProperties":false}}},"required":true}}},"/v1/workspaces/{workspaceId}/assets/{fileId}/share-links":{"post":{"tags":["share-links"],"operationId":"share-links.create","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"fileId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"fileId":{"type":"string"},"workspaceId":{"type":"string"},"url":{"type":"string"},"expiresAt":{"type":"string"},"downloadName":{"anyOf":[{"type":"string"},{"type":"null"}]},"maxUses":{"anyOf":[{"type":"number"},{"type":"null"}]},"useCount":{"type":"number"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"revokedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","fileId","workspaceId","url","expiresAt","useCount"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"expiresInSeconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"downloadName":{"anyOf":[{"type":"string"},{"type":"null"}]},"maxUses":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false}}},"required":true}},"get":{"tags":["share-links"],"operationId":"share-links.list","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"fileId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"fileId":{"type":"string"},"workspaceId":{"type":"string"},"url":{"type":"string"},"expiresAt":{"type":"string"},"downloadName":{"anyOf":[{"type":"string"},{"type":"null"}]},"maxUses":{"anyOf":[{"type":"number"},{"type":"null"}]},"useCount":{"type":"number"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"revokedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","fileId","workspaceId","url","expiresAt","useCount"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/workspaces/{workspaceId}/assets/{fileId}/share-links/{linkId}":{"delete":{"tags":["share-links"],"operationId":"share-links.revoke","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"fileId","in":"path","schema":{"type":"string"},"required":true},{"name":"linkId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/workspaces/{workspaceId}/skills":{"get":{"tags":["skills"],"operationId":"skills.list","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"creator":{"type":"object","properties":{"userId":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"displayName":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"avatarUrl":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]}},"additionalProperties":false},"key":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"origin":{"type":"string","enum":["builtin","workspace","imported"]},"status":{"type":"string","enum":["draft","enabled","disabled","archived"]},"version":{"type":"number"},"requiredTools":{"type":"array","items":{"type":"string"}},"tags":{"type":"array","items":{"type":"string"}},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","creator","key","name","description","origin","status","version","requiredTools","tags","createdAt","updatedAt"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"post":{"tags":["skills"],"operationId":"skills.create","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"creator":{"type":"object","properties":{"userId":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"displayName":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"avatarUrl":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]}},"additionalProperties":false},"key":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"origin":{"type":"string","enum":["builtin","workspace","imported"]},"status":{"type":"string","enum":["draft","enabled","disabled","archived"]},"version":{"type":"number"},"requiredTools":{"type":"array","items":{"type":"string"}},"tags":{"type":"array","items":{"type":"string"}},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"instructionMarkdown":{"type":"string"}},"required":["id","workspaceId","creator","key","name","description","origin","status","version","requiredTools","tags","createdAt","updatedAt","instructionMarkdown"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"instructionMarkdown":{"type":"string"},"origin":{"anyOf":[{"type":"string","enum":["workspace","imported"]},{"type":"null"}]},"status":{"anyOf":[{"type":"string","enum":["draft","enabled","disabled"]},{"type":"null"}]},"requiredTools":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"tags":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["key","name","description","instructionMarkdown"],"additionalProperties":false}}},"required":true}}},"/v1/workspaces/{workspaceId}/skills/search":{"post":{"tags":["skills"],"operationId":"skills.search","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"creator":{"type":"object","properties":{"userId":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"displayName":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"avatarUrl":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]}},"additionalProperties":false},"key":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"origin":{"type":"string","enum":["builtin","workspace","imported"]},"status":{"type":"string","enum":["draft","enabled","disabled","archived"]},"version":{"type":"number"},"requiredTools":{"type":"array","items":{"type":"string"}},"tags":{"type":"array","items":{"type":"string"}},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","creator","key","name","description","origin","status","version","requiredTools","tags","createdAt","updatedAt"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"query":{"anyOf":[{"type":"string"},{"type":"null"}]},"origins":{"anyOf":[{"type":"array","items":{"type":"string","enum":["builtin","workspace","imported"]}},{"type":"null"}]},"statuses":{"anyOf":[{"type":"array","items":{"type":"string","enum":["draft","enabled","disabled","archived"]}},{"type":"null"}]},"tags":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"limit":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false}}},"required":true}}},"/v1/workspaces/{workspaceId}/skills/{skillId}":{"get":{"tags":["skills"],"operationId":"skills.get","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"skillId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"creator":{"type":"object","properties":{"userId":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"displayName":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"avatarUrl":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]}},"additionalProperties":false},"key":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"origin":{"type":"string","enum":["builtin","workspace","imported"]},"status":{"type":"string","enum":["draft","enabled","disabled","archived"]},"version":{"type":"number"},"requiredTools":{"type":"array","items":{"type":"string"}},"tags":{"type":"array","items":{"type":"string"}},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"instructionMarkdown":{"type":"string"}},"required":["id","workspaceId","creator","key","name","description","origin","status","version","requiredTools","tags","createdAt","updatedAt","instructionMarkdown"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"patch":{"tags":["skills"],"operationId":"skills.update","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"skillId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"creator":{"type":"object","properties":{"userId":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"displayName":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"avatarUrl":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]}},"additionalProperties":false},"key":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"origin":{"type":"string","enum":["builtin","workspace","imported"]},"status":{"type":"string","enum":["draft","enabled","disabled","archived"]},"version":{"type":"number"},"requiredTools":{"type":"array","items":{"type":"string"}},"tags":{"type":"array","items":{"type":"string"}},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"instructionMarkdown":{"type":"string"}},"required":["id","workspaceId","creator","key","name","description","origin","status","version","requiredTools","tags","createdAt","updatedAt","instructionMarkdown"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"expectedVersion":{"type":"number"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"instructionMarkdown":{"anyOf":[{"type":"string"},{"type":"null"}]},"requiredTools":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"tags":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"icon":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"color":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]}},"required":["expectedVersion"],"additionalProperties":false}}},"required":true}}},"/v1/workspaces/{workspaceId}/skills/{skillId}/status":{"post":{"tags":["skills"],"operationId":"skills.setStatus","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"skillId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"creator":{"type":"object","properties":{"userId":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"displayName":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"avatarUrl":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]}},"additionalProperties":false},"key":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"origin":{"type":"string","enum":["builtin","workspace","imported"]},"status":{"type":"string","enum":["draft","enabled","disabled","archived"]},"version":{"type":"number"},"requiredTools":{"type":"array","items":{"type":"string"}},"tags":{"type":"array","items":{"type":"string"}},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"instructionMarkdown":{"type":"string"}},"required":["id","workspaceId","creator","key","name","description","origin","status","version","requiredTools","tags","createdAt","updatedAt","instructionMarkdown"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"expectedVersion":{"type":"number"},"status":{"type":"string","enum":["draft","enabled","disabled"]}},"required":["expectedVersion","status"],"additionalProperties":false}}},"required":true}}},"/v1/workspaces/{workspaceId}/skills/{skillId}/archive":{"post":{"tags":["skills"],"operationId":"skills.archive","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"skillId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"creator":{"type":"object","properties":{"userId":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"displayName":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"avatarUrl":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]}},"additionalProperties":false},"key":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"origin":{"type":"string","enum":["builtin","workspace","imported"]},"status":{"type":"string","enum":["draft","enabled","disabled","archived"]},"version":{"type":"number"},"requiredTools":{"type":"array","items":{"type":"string"}},"tags":{"type":"array","items":{"type":"string"}},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"instructionMarkdown":{"type":"string"}},"required":["id","workspaceId","creator","key","name","description","origin","status","version","requiredTools","tags","createdAt","updatedAt","instructionMarkdown"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"expectedVersion":{"type":"number"}},"required":["expectedVersion"],"additionalProperties":false}}},"required":true}}},"/v1/workspaces/{workspaceId}/surfaces/{surfaceId}/history":{"get":{"tags":["surface-history"],"operationId":"surface-history.list","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"surfaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"limit","in":"query","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false},{"name":"cursor","in":"query","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"surfaceId":{"type":"string"},"revisions":{"type":"array","items":{"type":"object","properties":{"fromVersion":{"type":"number"},"toVersion":{"type":"number"},"actorUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"actorDisplayName":{"anyOf":[{"type":"string"},{"type":"null"}]},"at":{"type":"string"},"eventCount":{"type":"number"}},"required":["fromVersion","toVersion","at","eventCount"],"additionalProperties":false}},"hasMore":{"type":"boolean"},"cursor":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["surfaceId","revisions","hasMore"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/workspaces/{workspaceId}/surfaces/{surfaceId}/history/{version}":{"get":{"tags":["surface-history"],"operationId":"surface-history.atVersion","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"surfaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"version","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"surfaceId":{"type":"string"},"version":{"type":"number"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"blocks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"surfaceId":{"type":"string"},"parentBlockId":{"anyOf":[{"type":"string"},{"type":"null"}]},"kind":{"type":"string","enum":["paragraph","heading_1","heading_2","heading_3","heading_4","heading_5","heading_6","bulleted_list_item","numbered_list_item","to_do","toggle","quote","callout","code","divider","image","bookmark","embed","file","video","audio","column_list","column","database_view","page_link","table_of_contents","equation","table","synced_page","footnote","metric","insight","activity_feed","button","form_embed","drive_embed"]},"orderKey":{"type":"string"},"manifest":{"type":"object"},"layout":{"anyOf":[{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"},"w":{"type":"number"},"h":{"type":"number"}},"required":["x","y","w","h"],"additionalProperties":false},{"type":"null"}]},{"type":"null"}]},"plainText":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","surfaceId","kind","orderKey","manifest"],"additionalProperties":false}},"approximate":{"type":"boolean"}},"required":["surfaceId","version","blocks","approximate"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/workspaces/{workspaceId}/surfaces/{surfaceId}/history/{version}/restore":{"post":{"tags":["surface-history"],"operationId":"surface-history.restore","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"surfaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"version","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"workspaceVersion":{"type":"number"},"blocks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"surfaceId":{"type":"string"},"parentBlockId":{"anyOf":[{"type":"string"},{"type":"null"}]},"kind":{"type":"string","enum":["paragraph","heading_1","heading_2","heading_3","heading_4","heading_5","heading_6","bulleted_list_item","numbered_list_item","to_do","toggle","quote","callout","code","divider","image","bookmark","embed","file","video","audio","column_list","column","database_view","page_link","table_of_contents","equation","table","synced_page","footnote","metric","insight","activity_feed","button","form_embed","drive_embed"]},"orderKey":{"type":"string"},"manifest":{"type":"object"},"layout":{"anyOf":[{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"},"w":{"type":"number"},"h":{"type":"number"}},"required":["x","y","w","h"],"additionalProperties":false},{"type":"null"}]},{"type":"null"}]},"plainText":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","surfaceId","kind","orderKey","manifest"],"additionalProperties":false}}},"required":["workspaceVersion","blocks"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"clientMutationId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"additionalProperties":false}}},"required":true}}},"/v1/me/onboarding-offers":{"get":{"tags":["onboarding"],"operationId":"onboarding.listOffers","parameters":[],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["invite","legacy_restore"]},"id":{"type":"string"},"workspaceId":{"type":"string"},"workspaceName":{"type":"string"},"workspaceIcon":{"type":"string","enum":["initials","rocket","building","home","folder","database","dashboard","canvas","workflow","note","users","profile","chart","ai","briefcase","bug","calendar","clock","code","lock","mail","money","target","star","library","globe","link","shield","file","git","idea","flag","settings","task","checklist","cloud","server","puzzle","terminal","browser","invoice","analytics","gantt","lab","megaphone","package","store","presentation","layers","compass"]},"workspaceAccentColor":{"type":"string"},"role":{"type":"string","enum":["owner","admin","builder","member","viewer"]},"memberCount":{"anyOf":[{"type":"number"},{"type":"null"}]},"isLegacyOwner":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"canDeleteOnSkip":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"canTransferOnSkip":{"anyOf":[{"type":"boolean"},{"type":"null"}]}},"required":["kind","id","workspaceId","workspaceName","workspaceIcon","workspaceAccentColor","role"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/me/legacy-workspace-claims/{claimId}/accept":{"post":{"tags":["onboarding"],"operationId":"onboarding.acceptLegacyClaim","parameters":[{"name":"claimId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"claimId":{"type":"string"},"workspace":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"icon":{"type":"string","enum":["initials","rocket","building","home","folder","database","dashboard","canvas","workflow","note","users","profile","chart","ai","briefcase","bug","calendar","clock","code","lock","mail","money","target","star","library","globe","link","shield","file","git","idea","flag","settings","task","checklist","cloud","server","puzzle","terminal","browser","invoice","analytics","gantt","lab","megaphone","package","store","presentation","layers","compass"]},"accentColor":{"type":"string"},"imageUrl":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"role":{"type":"string","enum":["owner","admin","builder","member","viewer"]},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","slug","name","icon","accentColor","role"],"additionalProperties":false}},"required":["claimId","workspace"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/me/legacy-workspace-claims/{claimId}/skip":{"post":{"tags":["onboarding"],"operationId":"onboarding.skipLegacyClaim","parameters":[{"name":"claimId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"claimId":{"type":"string"},"workspaceId":{"type":"string"},"outcome":{"type":"string","enum":["dismissed","workspace_deleted","ownership_transferred"]},"transferredOwnerUserId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["claimId","workspaceId","outcome"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/workspaces":{"get":{"tags":["workspaces"],"operationId":"workspaces.list","parameters":[],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"icon":{"type":"string","enum":["initials","rocket","building","home","folder","database","dashboard","canvas","workflow","note","users","profile","chart","ai","briefcase","bug","calendar","clock","code","lock","mail","money","target","star","library","globe","link","shield","file","git","idea","flag","settings","task","checklist","cloud","server","puzzle","terminal","browser","invoice","analytics","gantt","lab","megaphone","package","store","presentation","layers","compass"]},"accentColor":{"type":"string"},"imageUrl":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"role":{"type":"string","enum":["owner","admin","builder","member","viewer"]},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","slug","name","icon","accentColor","role"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"post":{"tags":["workspaces"],"operationId":"workspaces.create","parameters":[],"security":[{"apiKey":[]}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"icon":{"type":"string","enum":["initials","rocket","building","home","folder","database","dashboard","canvas","workflow","note","users","profile","chart","ai","briefcase","bug","calendar","clock","code","lock","mail","money","target","star","library","globe","link","shield","file","git","idea","flag","settings","task","checklist","cloud","server","puzzle","terminal","browser","invoice","analytics","gantt","lab","megaphone","package","store","presentation","layers","compass"]},"accentColor":{"type":"string"},"imageUrl":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"role":{"type":"string","enum":["owner","admin","builder","member","viewer"]},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","slug","name","icon","accentColor","role"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"slug":{"type":"string"},"icon":{"anyOf":[{"type":"string","enum":["initials","rocket","building","home","folder","database","dashboard","canvas","workflow","note","users","profile","chart","ai","briefcase","bug","calendar","clock","code","lock","mail","money","target","star","library","globe","link","shield","file","git","idea","flag","settings","task","checklist","cloud","server","puzzle","terminal","browser","invoice","analytics","gantt","lab","megaphone","package","store","presentation","layers","compass"]},{"type":"null"}]},"accentColor":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageFileId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["name","slug"],"additionalProperties":false}}},"required":true}}},"/v1/workspaces/{workspaceId}/starter":{"post":{"tags":["workspaces"],"operationId":"workspaces.applyStarter","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"template":{"type":"string","enum":["team","product","client","explore"]}},"required":["template"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"template":{"type":"string","enum":["team","product","client","explore"]}},"required":["template"],"additionalProperties":false}}},"required":true}}},"/v1/workspaces/{workspaceId}":{"get":{"tags":["workspaces"],"operationId":"workspaces.get","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"icon":{"type":"string","enum":["initials","rocket","building","home","folder","database","dashboard","canvas","workflow","note","users","profile","chart","ai","briefcase","bug","calendar","clock","code","lock","mail","money","target","star","library","globe","link","shield","file","git","idea","flag","settings","task","checklist","cloud","server","puzzle","terminal","browser","invoice","analytics","gantt","lab","megaphone","package","store","presentation","layers","compass"]},"accentColor":{"type":"string"},"imageUrl":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"role":{"type":"string","enum":["owner","admin","builder","member","viewer"]},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","slug","name","icon","accentColor","role"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"patch":{"tags":["workspaces"],"operationId":"workspaces.update","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"icon":{"type":"string","enum":["initials","rocket","building","home","folder","database","dashboard","canvas","workflow","note","users","profile","chart","ai","briefcase","bug","calendar","clock","code","lock","mail","money","target","star","library","globe","link","shield","file","git","idea","flag","settings","task","checklist","cloud","server","puzzle","terminal","browser","invoice","analytics","gantt","lab","megaphone","package","store","presentation","layers","compass"]},"accentColor":{"type":"string"},"imageUrl":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"role":{"type":"string","enum":["owner","admin","builder","member","viewer"]},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","slug","name","icon","accentColor","role"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"slug":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string","enum":["initials","rocket","building","home","folder","database","dashboard","canvas","workflow","note","users","profile","chart","ai","briefcase","bug","calendar","clock","code","lock","mail","money","target","star","library","globe","link","shield","file","git","idea","flag","settings","task","checklist","cloud","server","puzzle","terminal","browser","invoice","analytics","gantt","lab","megaphone","package","store","presentation","layers","compass"]},{"type":"null"}]},"accentColor":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageFileId":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]}},"additionalProperties":false}}},"required":true}},"delete":{"tags":["workspaces"],"operationId":"workspaces.remove","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/workspaces/{workspaceId}/events":{"get":{"tags":["workspaces"],"operationId":"workspaces.listEvents","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"afterVersion","in":"query","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false},{"name":"limit","in":"query","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"workspaceVersion":{"type":"number"},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"actorUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"version":{"type":"number"},"type":{"type":"string"},"visibility":{"type":"string","enum":["system","workspace","member"]},"subjectType":{"type":"string"},"subjectId":{"type":"string"},"payload":{"type":"object"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","version","type","visibility","subjectType","subjectId","payload"],"additionalProperties":false}}},"required":["workspaceVersion","events"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/workspaces/{workspaceId}/members":{"get":{"tags":["workspaces"],"operationId":"workspaces.listMembers","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"userId":{"type":"string"},"clerkUserId":{"type":"string"},"role":{"type":"string","enum":["owner","admin","builder","member","viewer"]},"primaryEmail":{"anyOf":[{"type":"string"},{"type":"null"}]},"displayName":{"anyOf":[{"type":"string"},{"type":"null"}]},"avatarUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","userId","clerkUserId","role"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/workspaces/{workspaceId}/members/{memberId}":{"patch":{"tags":["workspaces"],"operationId":"workspaces.updateMember","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"memberId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"userId":{"type":"string"},"clerkUserId":{"type":"string"},"role":{"type":"string","enum":["owner","admin","builder","member","viewer"]},"primaryEmail":{"anyOf":[{"type":"string"},{"type":"null"}]},"displayName":{"anyOf":[{"type":"string"},{"type":"null"}]},"avatarUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","userId","clerkUserId","role"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"role":{"type":"string","enum":["owner","admin","builder","member","viewer"]}},"required":["role"],"additionalProperties":false}}},"required":true}},"delete":{"tags":["workspaces"],"operationId":"workspaces.removeMember","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"memberId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"userId":{"type":"string"},"clerkUserId":{"type":"string"},"role":{"type":"string","enum":["owner","admin","builder","member","viewer"]},"primaryEmail":{"anyOf":[{"type":"string"},{"type":"null"}]},"displayName":{"anyOf":[{"type":"string"},{"type":"null"}]},"avatarUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","userId","clerkUserId","role"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/workspaces/{workspaceId}/invites":{"get":{"tags":["workspaces"],"operationId":"workspaces.listInvites","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"email":{"type":"string"},"role":{"type":"string","enum":["owner","admin","builder","member","viewer"]},"status":{"type":"string","enum":["pending","accepted","revoked","expired"]},"invitedByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"acceptedByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"expiresAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","email","role","status"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"post":{"tags":["workspaces"],"operationId":"workspaces.createInvite","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"email":{"type":"string"},"role":{"type":"string","enum":["owner","admin","builder","member","viewer"]},"status":{"type":"string","enum":["pending","accepted","revoked","expired"]},"token":{"type":"string"},"expiresAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","email","role","status","token"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string"},"role":{"type":"string","enum":["owner","admin","builder","member","viewer"]},"expiresAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["email","role"],"additionalProperties":false}}},"required":true}}},"/v1/me/workspace-invites":{"get":{"tags":["workspaces"],"operationId":"workspaces.listMyInvites","parameters":[],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"workspaceName":{"type":"string"},"workspaceSlug":{"type":"string"},"workspaceIcon":{"type":"string","enum":["initials","rocket","building","home","folder","database","dashboard","canvas","workflow","note","users","profile","chart","ai","briefcase","bug","calendar","clock","code","lock","mail","money","target","star","library","globe","link","shield","file","git","idea","flag","settings","task","checklist","cloud","server","puzzle","terminal","browser","invoice","analytics","gantt","lab","megaphone","package","store","presentation","layers","compass"]},"workspaceAccentColor":{"type":"string"},"email":{"type":"string"},"role":{"type":"string","enum":["owner","admin","builder","member","viewer"]},"status":{"type":"string","enum":["pending","accepted","revoked","expired"]},"expiresAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","workspaceName","workspaceSlug","workspaceIcon","workspaceAccentColor","email","role","status"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/workspaces/{workspaceId}/invites/{inviteId}":{"patch":{"tags":["workspaces"],"operationId":"workspaces.updateInvite","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"inviteId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"email":{"type":"string"},"role":{"type":"string","enum":["owner","admin","builder","member","viewer"]},"status":{"type":"string","enum":["pending","accepted","revoked","expired"]},"invitedByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"acceptedByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"expiresAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","email","role","status"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"role":{"anyOf":[{"type":"string","enum":["owner","admin","builder","member","viewer"]},{"type":"null"}]},"expiresAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"additionalProperties":false}}},"required":true}},"delete":{"tags":["workspaces"],"operationId":"workspaces.revokeInvite","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"inviteId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"email":{"type":"string"},"role":{"type":"string","enum":["owner","admin","builder","member","viewer"]},"status":{"type":"string","enum":["pending","accepted","revoked","expired"]},"invitedByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"acceptedByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"expiresAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","email","role","status"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/workspace-invites/{token}":{"get":{"tags":["workspaces"],"operationId":"workspaces.previewInvite","parameters":[{"name":"token","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"workspaceName":{"type":"string"},"workspaceSlug":{"type":"string"},"workspaceIcon":{"type":"string","enum":["initials","rocket","building","home","folder","database","dashboard","canvas","workflow","note","users","profile","chart","ai","briefcase","bug","calendar","clock","code","lock","mail","money","target","star","library","globe","link","shield","file","git","idea","flag","settings","task","checklist","cloud","server","puzzle","terminal","browser","invoice","analytics","gantt","lab","megaphone","package","store","presentation","layers","compass"]},"workspaceAccentColor":{"type":"string"},"email":{"type":"string"},"role":{"type":"string","enum":["owner","admin","builder","member","viewer"]},"status":{"type":"string","enum":["pending","accepted","revoked","expired"]},"expiresAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","workspaceName","workspaceSlug","workspaceIcon","workspaceAccentColor","email","role","status"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/workspace-invites/{token}/accept":{"post":{"tags":["workspaces"],"operationId":"workspaces.acceptInvite","parameters":[{"name":"token","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"icon":{"type":"string","enum":["initials","rocket","building","home","folder","database","dashboard","canvas","workflow","note","users","profile","chart","ai","briefcase","bug","calendar","clock","code","lock","mail","money","target","star","library","globe","link","shield","file","git","idea","flag","settings","task","checklist","cloud","server","puzzle","terminal","browser","invoice","analytics","gantt","lab","megaphone","package","store","presentation","layers","compass"]},"accentColor":{"type":"string"},"imageUrl":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"role":{"type":"string","enum":["owner","admin","builder","member","viewer"]},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","slug","name","icon","accentColor","role"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/me/workspace-invites/{inviteId}/accept":{"post":{"tags":["workspaces"],"operationId":"workspaces.acceptMyInvite","parameters":[{"name":"inviteId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"icon":{"type":"string","enum":["initials","rocket","building","home","folder","database","dashboard","canvas","workflow","note","users","profile","chart","ai","briefcase","bug","calendar","clock","code","lock","mail","money","target","star","library","globe","link","shield","file","git","idea","flag","settings","task","checklist","cloud","server","puzzle","terminal","browser","invoice","analytics","gantt","lab","megaphone","package","store","presentation","layers","compass"]},"accentColor":{"type":"string"},"imageUrl":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"role":{"type":"string","enum":["owner","admin","builder","member","viewer"]},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","slug","name","icon","accentColor","role"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/workspaces/{workspaceId}/roles":{"get":{"tags":["roles"],"operationId":"roles.list","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"type":"string"},"builtin":{"type":"boolean"},"permissions":{"type":"array","items":{"type":"string"}},"memberCount":{"anyOf":[{"type":"number"},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","name","builtin","permissions"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"post":{"tags":["roles"],"operationId":"roles.create","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"type":"string"},"builtin":{"type":"boolean"},"permissions":{"type":"array","items":{"type":"string"}},"memberCount":{"anyOf":[{"type":"number"},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","name","builtin","permissions"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"permissions":{"type":"array","items":{"type":"string"}}},"required":["name","permissions"],"additionalProperties":false}}},"required":true}}},"/v1/workspaces/{workspaceId}/roles/{roleId}":{"patch":{"tags":["roles"],"operationId":"roles.update","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"roleId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"type":"string"},"builtin":{"type":"boolean"},"permissions":{"type":"array","items":{"type":"string"}},"memberCount":{"anyOf":[{"type":"number"},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","name","builtin","permissions"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"permissions":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]}},"additionalProperties":false}}},"required":true}},"delete":{"tags":["roles"],"operationId":"roles.remove","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"roleId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/workspaces/{workspaceId}/roles/assign":{"post":{"tags":["roles"],"operationId":"roles.assign","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean"}},"required":["ok"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"memberId":{"type":"string"},"roleId":{"type":"string"}},"required":["memberId","roleId"],"additionalProperties":false}}},"required":true}}},"/v1/workspaces/{workspaceId}/preferences":{"get":{"tags":["user-preferences"],"operationId":"user-preferences.get","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"pinnedItemIds":{"type":"array","items":{"type":"string"}},"hidden":{"type":"array","items":{"type":"string"}},"order":{"type":"object","additionalProperties":{"type":"number"}},"homeLayout":{"anyOf":[{"type":"object","properties":{"widgets":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"x":{"type":"number"},"y":{"type":"number"},"w":{"type":"number"},"h":{"type":"number"},"config":{"anyOf":[{"type":"object"},{"type":"null"}]}},"required":["id","kind","x","y","w","h"],"additionalProperties":false}}},"required":["widgets"],"additionalProperties":false},{"type":"null"}]}},"required":["pinnedItemIds","hidden","order"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/workspaces/{workspaceId}/preferences/items/{itemId}/pin":{"post":{"tags":["user-preferences"],"operationId":"user-preferences.toggleItemPinned","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"itemId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"itemId":{"type":"string"},"pinned":{"type":"boolean"}},"required":["itemId","pinned"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"itemId":{"type":"string"},"pinned":{"type":"boolean"}},"required":["itemId","pinned"],"additionalProperties":false}}},"required":true}}},"/v1/workspaces/{workspaceId}/preferences/items/{itemId}/order":{"post":{"tags":["user-preferences"],"operationId":"user-preferences.setItemOrder","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"itemId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"itemId":{"type":"string"},"order":{"type":"number"}},"required":["itemId","order"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"itemId":{"type":"string"},"order":{"type":"number"}},"required":["itemId","order"],"additionalProperties":false}}},"required":true}}},"/v1/workspaces/{workspaceId}/preferences/home-layout":{"put":{"tags":["user-preferences"],"operationId":"user-preferences.setHomeLayout","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"homeLayout":{"type":"object","properties":{"widgets":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"x":{"type":"number"},"y":{"type":"number"},"w":{"type":"number"},"h":{"type":"number"},"config":{"anyOf":[{"type":"object"},{"type":"null"}]}},"required":["id","kind","x","y","w","h"],"additionalProperties":false}}},"required":["widgets"],"additionalProperties":false}},"required":["homeLayout"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"widgets":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"x":{"type":"number"},"y":{"type":"number"},"w":{"type":"number"},"h":{"type":"number"},"config":{"anyOf":[{"type":"object"},{"type":"null"}]}},"required":["id","kind","x","y","w","h"],"additionalProperties":false}}},"required":["widgets"],"additionalProperties":false}}},"required":true}}},"/v1/workspaces/{workspaceId}/items/{itemId}/access":{"get":{"tags":["item-access"],"operationId":"item-access.get","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"itemId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"workspaceItemId":{"type":"string"},"kind":{"type":"string","enum":["folder","page","note","dashboard","canvas","view","form","database","file","data_source","action","automation","external_resource"]},"grants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceItemId":{"type":"string"},"subjectKind":{"type":"string","enum":["user","role","guest"]},"subjectUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"subjectRoleId":{"anyOf":[{"type":"string"},{"type":"null"}]},"accessLevel":{"type":"string","enum":["view","comment","edit","full"]},"inherited":{"type":"boolean"},"inheritedFromItemId":{"anyOf":[{"type":"string"},{"type":"null"}]},"displayName":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"avatarUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"roleName":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"anyOf":[{"type":"string","enum":["active","pending"]},{"type":"null"}]},"expiresAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceItemId","subjectKind","accessLevel","inherited"],"additionalProperties":false}},"general":{"type":"object","properties":{"enabled":{"type":"boolean"},"accessLevel":{"anyOf":[{"type":"string","enum":["view","comment","edit","full"]},{"type":"null"}]},"expiresAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"url":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["enabled"],"additionalProperties":false},"viewerCanManage":{"type":"boolean"}},"required":["workspaceItemId","kind","grants","general","viewerCanManage"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/workspaces/{workspaceId}/items/{itemId}/access/invite":{"post":{"tags":["item-access"],"operationId":"item-access.invite","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"itemId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean"}},"required":["ok"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"invitees":{"type":"array","items":{"type":"object","properties":{"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"userId":{"anyOf":[{"type":"string"},{"type":"null"}]},"roleId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"additionalProperties":false}},"accessLevel":{"type":"string","enum":["view","comment","edit","full"]},"message":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["invitees","accessLevel"],"additionalProperties":false}}},"required":true}}},"/v1/workspaces/{workspaceId}/items/{itemId}/access/{grantId}":{"patch":{"tags":["item-access"],"operationId":"item-access.updateGrant","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"itemId","in":"path","schema":{"type":"string"},"required":true},{"name":"grantId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"accessLevel":{"type":"string","enum":["view","comment","edit","full"]}},"required":["accessLevel"],"additionalProperties":false}}},"required":true}},"delete":{"tags":["item-access"],"operationId":"item-access.removeGrant","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"itemId","in":"path","schema":{"type":"string"},"required":true},{"name":"grantId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/me/claim-guest-grants":{"post":{"tags":["item-access"],"operationId":"item-access.claimGuestGrants","parameters":[],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"claimed":{"type":"number"}},"required":["claimed"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/workspaces/{workspaceId}/databases":{"get":{"tags":["databases"],"operationId":"databases.list","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"itemId":{"anyOf":[{"type":"string"},{"type":"null"}]},"parentItemId":{"anyOf":[{"type":"string"},{"type":"null"}]},"key":{"type":"string"},"label":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"order":{"anyOf":[{"type":"number"},{"type":"null"}]},"settings":{"type":"object"},"recordLayout":{"anyOf":[{"type":"object","properties":{"version":{"type":"number","enum":[1]},"pageWidth":{"type":"string","enum":["default","wide","full"]},"propertyColumns":{"type":"number","enum":[1,2]},"propertyDensity":{"type":"string","enum":["comfortable","compact"]},"propertyOrder":{"type":"array","items":{"type":"string"}},"hiddenFieldKeys":{"type":"array","items":{"type":"string"}},"sections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"fieldKeys":{"type":"array","items":{"type":"string"}}},"required":["id","label","fieldKeys"],"additionalProperties":false}},"contentPosition":{"type":"string","enum":["before_properties","after_properties"]},"showComments":{"type":"boolean"},"showActivity":{"type":"boolean"}},"required":["version","pageWidth","propertyColumns","propertyDensity","propertyOrder","hiddenFieldKeys","sections","contentPosition","showComments","showActivity"],"additionalProperties":false},{"type":"null"}]},"archived":{"type":"boolean"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","key","label","settings","archived"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"post":{"tags":["databases"],"operationId":"databases.create","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"itemId":{"anyOf":[{"type":"string"},{"type":"null"}]},"parentItemId":{"anyOf":[{"type":"string"},{"type":"null"}]},"key":{"type":"string"},"label":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"order":{"anyOf":[{"type":"number"},{"type":"null"}]},"settings":{"type":"object"},"recordLayout":{"anyOf":[{"type":"object","properties":{"version":{"type":"number","enum":[1]},"pageWidth":{"type":"string","enum":["default","wide","full"]},"propertyColumns":{"type":"number","enum":[1,2]},"propertyDensity":{"type":"string","enum":["comfortable","compact"]},"propertyOrder":{"type":"array","items":{"type":"string"}},"hiddenFieldKeys":{"type":"array","items":{"type":"string"}},"sections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"fieldKeys":{"type":"array","items":{"type":"string"}}},"required":["id","label","fieldKeys"],"additionalProperties":false}},"contentPosition":{"type":"string","enum":["before_properties","after_properties"]},"showComments":{"type":"boolean"},"showActivity":{"type":"boolean"}},"required":["version","pageWidth","propertyColumns","propertyDensity","propertyOrder","hiddenFieldKeys","sections","contentPosition","showComments","showActivity"],"additionalProperties":false},{"type":"null"}]},"archived":{"type":"boolean"},"fields":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"databaseId":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"kind":{"type":"string","enum":["text","long_text","number","date","select","multi_select","status","checkbox","url","email","phone","user","file","place","json","created_at","created_by","updated_at","updated_by","unique_id","formula","relation","rollup","time_tracking","button"]},"required":{"type":"boolean"},"options":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}]},"key":{"type":"string"},"name":{"type":"string"},"color":{"type":"string"},"order":{"type":"number"}},"required":["key","name","color","order"],"additionalProperties":false}},{"type":"null"}]},"settings":{"type":"object"},"order":{"type":"number"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","databaseId","key","label","kind","required","settings","order"],"additionalProperties":false}},"views":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"databaseId":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"kind":{"type":"string","enum":["table","list","board","kanban","gallery","calendar","timeline","gantt","chart"]},"manifest":{"type":"object"},"ownerUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"scope":{"anyOf":[{"type":"string","enum":["shared","personal"]},{"type":"null"}]},"locked":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"definitionVersion":{"anyOf":[{"type":"number"},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","databaseId","key","label","kind","manifest"],"additionalProperties":false}},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","key","label","settings","archived","fields","views"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"parentItemId":{"anyOf":[{"type":"string"},{"type":"null"}]},"key":{"anyOf":[{"type":"string"},{"type":"null"}]},"label":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"order":{"anyOf":[{"type":"number"},{"type":"null"}]},"settings":{"anyOf":[{"type":"object"},{"type":"null"}]},"recordLayout":{"anyOf":[{"type":"object","properties":{"version":{"type":"number","enum":[1]},"pageWidth":{"type":"string","enum":["default","wide","full"]},"propertyColumns":{"type":"number","enum":[1,2]},"propertyDensity":{"type":"string","enum":["comfortable","compact"]},"propertyOrder":{"type":"array","items":{"type":"string"}},"hiddenFieldKeys":{"type":"array","items":{"type":"string"}},"sections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"fieldKeys":{"type":"array","items":{"type":"string"}}},"required":["id","label","fieldKeys"],"additionalProperties":false}},"contentPosition":{"type":"string","enum":["before_properties","after_properties"]},"showComments":{"type":"boolean"},"showActivity":{"type":"boolean"}},"required":["version","pageWidth","propertyColumns","propertyDensity","propertyOrder","hiddenFieldKeys","sections","contentPosition","showComments","showActivity"],"additionalProperties":false},{"type":"null"}]},"fields":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"key":{"anyOf":[{"type":"string"},{"type":"null"}]},"label":{"type":"string"},"kind":{"type":"string","enum":["text","long_text","number","date","select","multi_select","status","checkbox","url","email","phone","user","file","place","json","created_at","created_by","updated_at","updated_by","unique_id","formula","relation","rollup","time_tracking","button"]},"required":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"options":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"key":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"type":"string"},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"order":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["name"],"additionalProperties":false}},{"type":"null"}]},"settings":{"anyOf":[{"type":"object"},{"type":"null"}]},"order":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["label","kind"],"additionalProperties":false}},{"type":"null"}]}},"required":["label"],"additionalProperties":false}}},"required":true}}},"/v1/workspaces/{workspaceId}/databases/{databaseId}":{"get":{"tags":["databases"],"operationId":"databases.get","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"databaseId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"itemId":{"anyOf":[{"type":"string"},{"type":"null"}]},"parentItemId":{"anyOf":[{"type":"string"},{"type":"null"}]},"key":{"type":"string"},"label":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"order":{"anyOf":[{"type":"number"},{"type":"null"}]},"settings":{"type":"object"},"recordLayout":{"anyOf":[{"type":"object","properties":{"version":{"type":"number","enum":[1]},"pageWidth":{"type":"string","enum":["default","wide","full"]},"propertyColumns":{"type":"number","enum":[1,2]},"propertyDensity":{"type":"string","enum":["comfortable","compact"]},"propertyOrder":{"type":"array","items":{"type":"string"}},"hiddenFieldKeys":{"type":"array","items":{"type":"string"}},"sections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"fieldKeys":{"type":"array","items":{"type":"string"}}},"required":["id","label","fieldKeys"],"additionalProperties":false}},"contentPosition":{"type":"string","enum":["before_properties","after_properties"]},"showComments":{"type":"boolean"},"showActivity":{"type":"boolean"}},"required":["version","pageWidth","propertyColumns","propertyDensity","propertyOrder","hiddenFieldKeys","sections","contentPosition","showComments","showActivity"],"additionalProperties":false},{"type":"null"}]},"archived":{"type":"boolean"},"fields":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"databaseId":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"kind":{"type":"string","enum":["text","long_text","number","date","select","multi_select","status","checkbox","url","email","phone","user","file","place","json","created_at","created_by","updated_at","updated_by","unique_id","formula","relation","rollup","time_tracking","button"]},"required":{"type":"boolean"},"options":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}]},"key":{"type":"string"},"name":{"type":"string"},"color":{"type":"string"},"order":{"type":"number"}},"required":["key","name","color","order"],"additionalProperties":false}},{"type":"null"}]},"settings":{"type":"object"},"order":{"type":"number"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","databaseId","key","label","kind","required","settings","order"],"additionalProperties":false}},"views":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"databaseId":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"kind":{"type":"string","enum":["table","list","board","kanban","gallery","calendar","timeline","gantt","chart"]},"manifest":{"type":"object"},"ownerUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"scope":{"anyOf":[{"type":"string","enum":["shared","personal"]},{"type":"null"}]},"locked":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"definitionVersion":{"anyOf":[{"type":"number"},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","databaseId","key","label","kind","manifest"],"additionalProperties":false}},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","key","label","settings","archived","fields","views"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"patch":{"tags":["databases"],"operationId":"databases.update","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"databaseId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"itemId":{"anyOf":[{"type":"string"},{"type":"null"}]},"parentItemId":{"anyOf":[{"type":"string"},{"type":"null"}]},"key":{"type":"string"},"label":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"order":{"anyOf":[{"type":"number"},{"type":"null"}]},"settings":{"type":"object"},"recordLayout":{"anyOf":[{"type":"object","properties":{"version":{"type":"number","enum":[1]},"pageWidth":{"type":"string","enum":["default","wide","full"]},"propertyColumns":{"type":"number","enum":[1,2]},"propertyDensity":{"type":"string","enum":["comfortable","compact"]},"propertyOrder":{"type":"array","items":{"type":"string"}},"hiddenFieldKeys":{"type":"array","items":{"type":"string"}},"sections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"fieldKeys":{"type":"array","items":{"type":"string"}}},"required":["id","label","fieldKeys"],"additionalProperties":false}},"contentPosition":{"type":"string","enum":["before_properties","after_properties"]},"showComments":{"type":"boolean"},"showActivity":{"type":"boolean"}},"required":["version","pageWidth","propertyColumns","propertyDensity","propertyOrder","hiddenFieldKeys","sections","contentPosition","showComments","showActivity"],"additionalProperties":false},{"type":"null"}]},"archived":{"type":"boolean"},"fields":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"databaseId":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"kind":{"type":"string","enum":["text","long_text","number","date","select","multi_select","status","checkbox","url","email","phone","user","file","place","json","created_at","created_by","updated_at","updated_by","unique_id","formula","relation","rollup","time_tracking","button"]},"required":{"type":"boolean"},"options":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}]},"key":{"type":"string"},"name":{"type":"string"},"color":{"type":"string"},"order":{"type":"number"}},"required":["key","name","color","order"],"additionalProperties":false}},{"type":"null"}]},"settings":{"type":"object"},"order":{"type":"number"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","databaseId","key","label","kind","required","settings","order"],"additionalProperties":false}},"views":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"databaseId":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"kind":{"type":"string","enum":["table","list","board","kanban","gallery","calendar","timeline","gantt","chart"]},"manifest":{"type":"object"},"ownerUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"scope":{"anyOf":[{"type":"string","enum":["shared","personal"]},{"type":"null"}]},"locked":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"definitionVersion":{"anyOf":[{"type":"number"},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","databaseId","key","label","kind","manifest"],"additionalProperties":false}},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","key","label","settings","archived","fields","views"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"parentItemId":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"key":{"anyOf":[{"type":"string"},{"type":"null"}]},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"order":{"anyOf":[{"type":"number"},{"type":"null"}]},"settings":{"anyOf":[{"type":"object"},{"type":"null"}]},"recordLayout":{"anyOf":[{"type":"object","properties":{"version":{"type":"number","enum":[1]},"pageWidth":{"type":"string","enum":["default","wide","full"]},"propertyColumns":{"type":"number","enum":[1,2]},"propertyDensity":{"type":"string","enum":["comfortable","compact"]},"propertyOrder":{"type":"array","items":{"type":"string"}},"hiddenFieldKeys":{"type":"array","items":{"type":"string"}},"sections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"fieldKeys":{"type":"array","items":{"type":"string"}}},"required":["id","label","fieldKeys"],"additionalProperties":false}},"contentPosition":{"type":"string","enum":["before_properties","after_properties"]},"showComments":{"type":"boolean"},"showActivity":{"type":"boolean"}},"required":["version","pageWidth","propertyColumns","propertyDensity","propertyOrder","hiddenFieldKeys","sections","contentPosition","showComments","showActivity"],"additionalProperties":false},{"type":"null"}]},"archived":{"anyOf":[{"type":"boolean"},{"type":"null"}]}},"additionalProperties":false}}},"required":true}},"delete":{"tags":["databases"],"operationId":"databases.delete","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"databaseId","in":"path","schema":{"type":"string"},"required":true},{"name":"confirmed","in":"query","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/workspaces/{workspaceId}/databases/{databaseId}/deletion-impact":{"get":{"tags":["databases"],"operationId":"databases.deletionImpact","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"databaseId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"target":{"type":"object","properties":{"kind":{"type":"string","enum":["workspace_item","database","database_view","surface","data_source","action","automation","file"]},"id":{"type":"string"},"label":{"type":"string"}},"required":["kind","id","label"],"additionalProperties":false},"status":{"type":"string","enum":["safe","needs_confirmation","blocked"]},"summary":{"type":"object","properties":{"blockers":{"type":"number"},"warnings":{"type":"number"},"cascades":{"type":"number"}},"required":["blockers","warnings","cascades"],"additionalProperties":false},"entries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["workspace_item","folder_children","database","database_field","database_view","database_record","page_block","canvas_element","surface","data_source","action","automation","file"]},"level":{"type":"string","enum":["blocking","warning","cascade"]},"label":{"type":"string"},"reason":{"type":"string"},"action":{"type":"string"},"remediation":{"anyOf":[{"anyOf":[{"type":"object","properties":{"capability":{"type":"string","enum":["actions.delete"]},"args":{"type":"object","properties":{"actionId":{"type":"string"}},"required":["actionId"],"additionalProperties":false}},"required":["capability","args"],"additionalProperties":false},{"type":"object","properties":{"capability":{"type":"string","enum":["databases.delete"]},"args":{"type":"object","properties":{"databaseId":{"type":"string"}},"required":["databaseId"],"additionalProperties":false}},"required":["capability","args"],"additionalProperties":false},{"type":"object","properties":{"capability":{"type":"string","enum":["database_views.delete"]},"args":{"type":"object","properties":{"databaseId":{"type":"string"},"viewId":{"type":"string"}},"required":["databaseId","viewId"],"additionalProperties":false}},"required":["capability","args"],"additionalProperties":false},{"type":"object","properties":{"capability":{"type":"string","enum":["surfaces.delete"]},"args":{"type":"object","properties":{"surfaceId":{"type":"string"}},"required":["surfaceId"],"additionalProperties":false}},"required":["capability","args"],"additionalProperties":false},{"type":"object","properties":{"capability":{"type":"string","enum":["data_sources.delete"]},"args":{"type":"object","properties":{"dataSourceId":{"type":"string"}},"required":["dataSourceId"],"additionalProperties":false}},"required":["capability","args"],"additionalProperties":false},{"type":"object","properties":{"capability":{"type":"string","enum":["items.delete"]},"args":{"type":"object","properties":{"itemId":{"type":"string"}},"required":["itemId"],"additionalProperties":false}},"required":["capability","args"],"additionalProperties":false}]},{"type":"null"}]},"owner":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"label":{"type":"string"}},"required":["id","kind","label"],"additionalProperties":false},{"type":"null"}]}},"required":["id","kind","level","label","reason","action"],"additionalProperties":false}}},"required":["target","status","summary","entries"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/workspaces/{workspaceId}/databases/{databaseId}/fields":{"get":{"tags":["databases"],"operationId":"databases.listFields","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"databaseId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"databaseId":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"kind":{"type":"string","enum":["text","long_text","number","date","select","multi_select","status","checkbox","url","email","phone","user","file","place","json","created_at","created_by","updated_at","updated_by","unique_id","formula","relation","rollup","time_tracking","button"]},"required":{"type":"boolean"},"options":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}]},"key":{"type":"string"},"name":{"type":"string"},"color":{"type":"string"},"order":{"type":"number"}},"required":["key","name","color","order"],"additionalProperties":false}},{"type":"null"}]},"settings":{"type":"object"},"order":{"type":"number"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","databaseId","key","label","kind","required","settings","order"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"post":{"tags":["databases"],"operationId":"databases.createField","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"databaseId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"databaseId":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"kind":{"type":"string","enum":["text","long_text","number","date","select","multi_select","status","checkbox","url","email","phone","user","file","place","json","created_at","created_by","updated_at","updated_by","unique_id","formula","relation","rollup","time_tracking","button"]},"required":{"type":"boolean"},"options":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}]},"key":{"type":"string"},"name":{"type":"string"},"color":{"type":"string"},"order":{"type":"number"}},"required":["key","name","color","order"],"additionalProperties":false}},{"type":"null"}]},"settings":{"type":"object"},"order":{"type":"number"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","databaseId","key","label","kind","required","settings","order"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"key":{"anyOf":[{"type":"string"},{"type":"null"}]},"label":{"type":"string"},"kind":{"type":"string","enum":["text","long_text","number","date","select","multi_select","status","checkbox","url","email","phone","user","file","place","json","created_at","created_by","updated_at","updated_by","unique_id","formula","relation","rollup","time_tracking","button"]},"required":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"options":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"key":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"type":"string"},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"order":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["name"],"additionalProperties":false}},{"type":"null"}]},"settings":{"anyOf":[{"type":"object"},{"type":"null"}]},"order":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["label","kind"],"additionalProperties":false}}},"required":true}}},"/v1/workspaces/{workspaceId}/databases/{databaseId}/fields/{fieldId}":{"patch":{"tags":["databases"],"operationId":"databases.updateField","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"databaseId","in":"path","schema":{"type":"string"},"required":true},{"name":"fieldId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"databaseId":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"kind":{"type":"string","enum":["text","long_text","number","date","select","multi_select","status","checkbox","url","email","phone","user","file","place","json","created_at","created_by","updated_at","updated_by","unique_id","formula","relation","rollup","time_tracking","button"]},"required":{"type":"boolean"},"options":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}]},"key":{"type":"string"},"name":{"type":"string"},"color":{"type":"string"},"order":{"type":"number"}},"required":["key","name","color","order"],"additionalProperties":false}},{"type":"null"}]},"settings":{"type":"object"},"order":{"type":"number"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","databaseId","key","label","kind","required","settings","order"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"kind":{"anyOf":[{"type":"string","enum":["text","long_text","number","date","select","multi_select","status","checkbox","url","email","phone","user","file","place","json","created_at","created_by","updated_at","updated_by","unique_id","formula","relation","rollup","time_tracking","button"]},{"type":"null"}]},"required":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"options":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"key":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"type":"string"},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"order":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["name"],"additionalProperties":false}},{"type":"null"}]},"settings":{"anyOf":[{"type":"object"},{"type":"null"}]},"order":{"anyOf":[{"type":"number"},{"type":"null"}]},"clientMutationId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"additionalProperties":false}}},"required":true}},"delete":{"tags":["databases"],"operationId":"databases.deleteField","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"databaseId","in":"path","schema":{"type":"string"},"required":true},{"name":"fieldId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"databaseId":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"kind":{"type":"string","enum":["text","long_text","number","date","select","multi_select","status","checkbox","url","email","phone","user","file","place","json","created_at","created_by","updated_at","updated_by","unique_id","formula","relation","rollup","time_tracking","button"]},"required":{"type":"boolean"},"options":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}]},"key":{"type":"string"},"name":{"type":"string"},"color":{"type":"string"},"order":{"type":"number"}},"required":["key","name","color","order"],"additionalProperties":false}},{"type":"null"}]},"settings":{"type":"object"},"order":{"type":"number"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","databaseId","key","label","kind","required","settings","order"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/workspaces/{workspaceId}/databases/{databaseId}/records":{"get":{"tags":["databases"],"operationId":"databases.listRecords","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"databaseId","in":"path","schema":{"type":"string"},"required":true},{"name":"search","in":"query","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false},{"name":"limit","in":"query","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","examples":["1d8a44e0-7c93-4f21-b60a-3e8d2f5a9c14"]},"workspaceId":{"type":"string","examples":["4b81aa0c-6d2f-4b19-9f0e-1a7c3d5e8b02"]},"databaseId":{"type":"string","examples":["9f2c1e7a-3b58-4d0c-8e27-6a1f9d4b3c85"]},"contentSurfaceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string","examples":["Ship the desktop app"]},"data":{"type":"object","examples":[{"status":"in_progress","due":"2026-08-01"}]},"relations":{"type":"object"},"computed":{"type":"object"},"system":{"type":"object"},"related":{"anyOf":[{"type":"object"},{"type":"null"}]},"archived":{"type":"boolean","examples":[false]},"createdByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string","examples":["2026-07-10T08:00:00.000Z"]},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","examples":["2026-07-14T11:26:02.000Z"]},{"type":"null"}]}},"required":["id","workspaceId","databaseId","title","data","relations","computed","system","archived"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"post":{"tags":["databases"],"operationId":"databases.createRecord","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"databaseId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","examples":["1d8a44e0-7c93-4f21-b60a-3e8d2f5a9c14"]},"workspaceId":{"type":"string","examples":["4b81aa0c-6d2f-4b19-9f0e-1a7c3d5e8b02"]},"databaseId":{"type":"string","examples":["9f2c1e7a-3b58-4d0c-8e27-6a1f9d4b3c85"]},"contentSurfaceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string","examples":["Ship the desktop app"]},"data":{"type":"object","examples":[{"status":"in_progress","due":"2026-08-01"}]},"relations":{"type":"object"},"computed":{"type":"object"},"system":{"type":"object"},"related":{"anyOf":[{"type":"object"},{"type":"null"}]},"archived":{"type":"boolean","examples":[false]},"createdByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string","examples":["2026-07-10T08:00:00.000Z"]},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","examples":["2026-07-14T11:26:02.000Z"]},{"type":"null"}]}},"required":["id","workspaceId","databaseId","title","data","relations","computed","system","archived"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"data":{"anyOf":[{"type":"object"},{"type":"null"}]},"clientMutationId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"additionalProperties":false}}},"required":true}}},"/v1/workspaces/{workspaceId}/databases/{databaseId}/records/window":{"get":{"tags":["databases"],"operationId":"databases.recordWindow","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"databaseId","in":"path","schema":{"type":"string"},"required":true},{"name":"viewId","in":"query","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false},{"name":"cursor","in":"query","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false},{"name":"limit","in":"query","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"shapeId":{"type":"string"},"workspaceVersion":{"type":"number"},"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","examples":["1d8a44e0-7c93-4f21-b60a-3e8d2f5a9c14"]},"workspaceId":{"type":"string","examples":["4b81aa0c-6d2f-4b19-9f0e-1a7c3d5e8b02"]},"databaseId":{"type":"string","examples":["9f2c1e7a-3b58-4d0c-8e27-6a1f9d4b3c85"]},"contentSurfaceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string","examples":["Ship the desktop app"]},"data":{"type":"object","examples":[{"status":"in_progress","due":"2026-08-01"}]},"relations":{"type":"object"},"computed":{"type":"object"},"system":{"type":"object"},"related":{"anyOf":[{"type":"object"},{"type":"null"}]},"archived":{"type":"boolean","examples":[false]},"createdByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string","examples":["2026-07-10T08:00:00.000Z"]},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","examples":["2026-07-14T11:26:02.000Z"]},{"type":"null"}]}},"required":["id","workspaceId","databaseId","title","data","relations","computed","system","archived"],"additionalProperties":false}},"window":{"type":"object","properties":{"cursor":{"anyOf":[{"type":"string"},{"type":"null"}]},"hasMore":{"type":"boolean"}},"required":["hasMore"],"additionalProperties":false}},"required":["shapeId","workspaceVersion","rows","window"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/workspaces/{workspaceId}/databases/{databaseId}/records/aggregate":{"get":{"tags":["databases"],"operationId":"databases.aggregateRecords","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"databaseId","in":"path","schema":{"type":"string"},"required":true},{"name":"fn","in":"query","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false},{"name":"field","in":"query","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false},{"name":"viewId","in":"query","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"value":{"anyOf":[{"type":"number"},{"type":"null"}]},"count":{"type":"number"}},"required":["value","count"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/workspaces/{workspaceId}/databases/{databaseId}/records/{recordId}":{"get":{"tags":["databases"],"operationId":"databases.getRecord","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"databaseId","in":"path","schema":{"type":"string"},"required":true},{"name":"recordId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","examples":["1d8a44e0-7c93-4f21-b60a-3e8d2f5a9c14"]},"workspaceId":{"type":"string","examples":["4b81aa0c-6d2f-4b19-9f0e-1a7c3d5e8b02"]},"databaseId":{"type":"string","examples":["9f2c1e7a-3b58-4d0c-8e27-6a1f9d4b3c85"]},"contentSurfaceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string","examples":["Ship the desktop app"]},"data":{"type":"object","examples":[{"status":"in_progress","due":"2026-08-01"}]},"relations":{"type":"object"},"computed":{"type":"object"},"system":{"type":"object"},"related":{"anyOf":[{"type":"object"},{"type":"null"}]},"archived":{"type":"boolean","examples":[false]},"createdByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string","examples":["2026-07-10T08:00:00.000Z"]},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","examples":["2026-07-14T11:26:02.000Z"]},{"type":"null"}]}},"required":["id","workspaceId","databaseId","title","data","relations","computed","system","archived"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"patch":{"tags":["databases"],"operationId":"databases.updateRecord","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"databaseId","in":"path","schema":{"type":"string"},"required":true},{"name":"recordId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","examples":["1d8a44e0-7c93-4f21-b60a-3e8d2f5a9c14"]},"workspaceId":{"type":"string","examples":["4b81aa0c-6d2f-4b19-9f0e-1a7c3d5e8b02"]},"databaseId":{"type":"string","examples":["9f2c1e7a-3b58-4d0c-8e27-6a1f9d4b3c85"]},"contentSurfaceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string","examples":["Ship the desktop app"]},"data":{"type":"object","examples":[{"status":"in_progress","due":"2026-08-01"}]},"relations":{"type":"object"},"computed":{"type":"object"},"system":{"type":"object"},"related":{"anyOf":[{"type":"object"},{"type":"null"}]},"archived":{"type":"boolean","examples":[false]},"createdByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string","examples":["2026-07-10T08:00:00.000Z"]},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","examples":["2026-07-14T11:26:02.000Z"]},{"type":"null"}]}},"required":["id","workspaceId","databaseId","title","data","relations","computed","system","archived"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"data":{"anyOf":[{"type":"object"},{"type":"null"}]},"archived":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"clientMutationId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"additionalProperties":false}}},"required":true}},"delete":{"tags":["databases"],"operationId":"databases.deleteRecord","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"databaseId","in":"path","schema":{"type":"string"},"required":true},{"name":"recordId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","examples":["1d8a44e0-7c93-4f21-b60a-3e8d2f5a9c14"]},"workspaceId":{"type":"string","examples":["4b81aa0c-6d2f-4b19-9f0e-1a7c3d5e8b02"]},"databaseId":{"type":"string","examples":["9f2c1e7a-3b58-4d0c-8e27-6a1f9d4b3c85"]},"contentSurfaceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string","examples":["Ship the desktop app"]},"data":{"type":"object","examples":[{"status":"in_progress","due":"2026-08-01"}]},"relations":{"type":"object"},"computed":{"type":"object"},"system":{"type":"object"},"related":{"anyOf":[{"type":"object"},{"type":"null"}]},"archived":{"type":"boolean","examples":[false]},"createdByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string","examples":["2026-07-10T08:00:00.000Z"]},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","examples":["2026-07-14T11:26:02.000Z"]},{"type":"null"}]}},"required":["id","workspaceId","databaseId","title","data","relations","computed","system","archived"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/workspaces/{workspaceId}/databases/{databaseId}/records/{recordId}/content-surface":{"post":{"tags":["databases"],"operationId":"databases.ensureRecordContentSurface","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"databaseId","in":"path","schema":{"type":"string"},"required":true},{"name":"recordId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"workspaceId":{"type":"string"},"databaseId":{"type":"string"},"recordId":{"type":"string"},"surfaceId":{"type":"string"},"created":{"type":"boolean"}},"required":["workspaceId","databaseId","recordId","surfaceId","created"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/workspaces/{workspaceId}/databases/{databaseId}/records/{recordId}/comments":{"get":{"tags":["databases"],"operationId":"databases.listRecordComments","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"databaseId","in":"path","schema":{"type":"string"},"required":true},{"name":"recordId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"databaseId":{"type":"string"},"recordId":{"type":"string"},"authorUserId":{"type":"string"},"authorDisplayName":{"anyOf":[{"type":"string"},{"type":"null"}]},"authorAvatarUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"body":{"type":"string"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","databaseId","recordId","authorUserId","body"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"post":{"tags":["databases"],"operationId":"databases.createRecordComment","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"databaseId","in":"path","schema":{"type":"string"},"required":true},{"name":"recordId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"databaseId":{"type":"string"},"recordId":{"type":"string"},"authorUserId":{"type":"string"},"authorDisplayName":{"anyOf":[{"type":"string"},{"type":"null"}]},"authorAvatarUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"body":{"type":"string"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","databaseId","recordId","authorUserId","body"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"body":{"type":"string"}},"required":["body"],"additionalProperties":false}}},"required":true}}},"/v1/workspaces/{workspaceId}/databases/{databaseId}/records/{recordId}/comments/{commentId}":{"delete":{"tags":["databases"],"operationId":"databases.deleteRecordComment","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"databaseId","in":"path","schema":{"type":"string"},"required":true},{"name":"recordId","in":"path","schema":{"type":"string"},"required":true},{"name":"commentId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/workspaces/{workspaceId}/databases/{databaseId}/records/{recordId}/events":{"get":{"tags":["databases"],"operationId":"databases.listRecordEvents","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"databaseId","in":"path","schema":{"type":"string"},"required":true},{"name":"recordId","in":"path","schema":{"type":"string"},"required":true},{"name":"limit","in":"query","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"type":{"type":"string"},"version":{"type":"number"},"actorUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"actorDisplayName":{"anyOf":[{"type":"string"},{"type":"null"}]},"actorAvatarUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"payload":{"type":"object"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","type","version","payload"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/workspaces/{workspaceId}/databases/{databaseId}/views":{"get":{"tags":["databases"],"operationId":"databases.listViews","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"databaseId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"databaseId":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"kind":{"type":"string","enum":["table","list","board","kanban","gallery","calendar","timeline","gantt","chart"]},"manifest":{"type":"object"},"ownerUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"scope":{"anyOf":[{"type":"string","enum":["shared","personal"]},{"type":"null"}]},"locked":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"definitionVersion":{"anyOf":[{"type":"number"},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","databaseId","key","label","kind","manifest"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"post":{"tags":["databases"],"operationId":"databases.createView","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"databaseId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"databaseId":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"kind":{"type":"string","enum":["table","list","board","kanban","gallery","calendar","timeline","gantt","chart"]},"manifest":{"type":"object"},"ownerUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"scope":{"anyOf":[{"type":"string","enum":["shared","personal"]},{"type":"null"}]},"locked":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"definitionVersion":{"anyOf":[{"type":"number"},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","databaseId","key","label","kind","manifest"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"key":{"anyOf":[{"type":"string"},{"type":"null"}]},"label":{"type":"string"},"kind":{"type":"string","enum":["table","list","board","kanban","gallery","calendar","timeline","gantt","chart"]},"manifest":{"anyOf":[{"type":"object"},{"type":"null"}]},"scope":{"anyOf":[{"type":"string","enum":["shared","personal"]},{"type":"null"}]},"locked":{"anyOf":[{"type":"boolean"},{"type":"null"}]}},"required":["label","kind"],"additionalProperties":false}}},"required":true}}},"/v1/workspaces/{workspaceId}/databases/{databaseId}/views/{viewId}":{"patch":{"tags":["databases"],"operationId":"databases.updateView","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"databaseId","in":"path","schema":{"type":"string"},"required":true},{"name":"viewId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"databaseId":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"kind":{"type":"string","enum":["table","list","board","kanban","gallery","calendar","timeline","gantt","chart"]},"manifest":{"type":"object"},"ownerUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"scope":{"anyOf":[{"type":"string","enum":["shared","personal"]},{"type":"null"}]},"locked":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"definitionVersion":{"anyOf":[{"type":"number"},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","databaseId","key","label","kind","manifest"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"key":{"anyOf":[{"type":"string"},{"type":"null"}]},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"kind":{"anyOf":[{"type":"string","enum":["table","list","board","kanban","gallery","calendar","timeline","gantt","chart"]},{"type":"null"}]},"manifest":{"anyOf":[{"type":"object"},{"type":"null"}]},"scope":{"anyOf":[{"type":"string","enum":["shared","personal"]},{"type":"null"}]},"locked":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"expectedVersion":{"type":"number"},"clientMutationId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["expectedVersion"],"additionalProperties":false}}},"required":true}},"delete":{"tags":["databases"],"operationId":"databases.deleteView","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"databaseId","in":"path","schema":{"type":"string"},"required":true},{"name":"viewId","in":"path","schema":{"type":"string"},"required":true},{"name":"confirmed","in":"query","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"databaseId":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"kind":{"type":"string","enum":["table","list","board","kanban","gallery","calendar","timeline","gantt","chart"]},"manifest":{"type":"object"},"ownerUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"scope":{"anyOf":[{"type":"string","enum":["shared","personal"]},{"type":"null"}]},"locked":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"definitionVersion":{"anyOf":[{"type":"number"},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","databaseId","key","label","kind","manifest"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/workspaces/{workspaceId}/databases/{databaseId}/views/{viewId}/deletion-impact":{"get":{"tags":["databases"],"operationId":"databases.viewDeletionImpact","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"databaseId","in":"path","schema":{"type":"string"},"required":true},{"name":"viewId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"target":{"type":"object","properties":{"kind":{"type":"string","enum":["workspace_item","database","database_view","surface","data_source","action","automation","file"]},"id":{"type":"string"},"label":{"type":"string"}},"required":["kind","id","label"],"additionalProperties":false},"status":{"type":"string","enum":["safe","needs_confirmation","blocked"]},"summary":{"type":"object","properties":{"blockers":{"type":"number"},"warnings":{"type":"number"},"cascades":{"type":"number"}},"required":["blockers","warnings","cascades"],"additionalProperties":false},"entries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["workspace_item","folder_children","database","database_field","database_view","database_record","page_block","canvas_element","surface","data_source","action","automation","file"]},"level":{"type":"string","enum":["blocking","warning","cascade"]},"label":{"type":"string"},"reason":{"type":"string"},"action":{"type":"string"},"remediation":{"anyOf":[{"anyOf":[{"type":"object","properties":{"capability":{"type":"string","enum":["actions.delete"]},"args":{"type":"object","properties":{"actionId":{"type":"string"}},"required":["actionId"],"additionalProperties":false}},"required":["capability","args"],"additionalProperties":false},{"type":"object","properties":{"capability":{"type":"string","enum":["databases.delete"]},"args":{"type":"object","properties":{"databaseId":{"type":"string"}},"required":["databaseId"],"additionalProperties":false}},"required":["capability","args"],"additionalProperties":false},{"type":"object","properties":{"capability":{"type":"string","enum":["database_views.delete"]},"args":{"type":"object","properties":{"databaseId":{"type":"string"},"viewId":{"type":"string"}},"required":["databaseId","viewId"],"additionalProperties":false}},"required":["capability","args"],"additionalProperties":false},{"type":"object","properties":{"capability":{"type":"string","enum":["surfaces.delete"]},"args":{"type":"object","properties":{"surfaceId":{"type":"string"}},"required":["surfaceId"],"additionalProperties":false}},"required":["capability","args"],"additionalProperties":false},{"type":"object","properties":{"capability":{"type":"string","enum":["data_sources.delete"]},"args":{"type":"object","properties":{"dataSourceId":{"type":"string"}},"required":["dataSourceId"],"additionalProperties":false}},"required":["capability","args"],"additionalProperties":false},{"type":"object","properties":{"capability":{"type":"string","enum":["items.delete"]},"args":{"type":"object","properties":{"itemId":{"type":"string"}},"required":["itemId"],"additionalProperties":false}},"required":["capability","args"],"additionalProperties":false}]},{"type":"null"}]},"owner":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"label":{"type":"string"}},"required":["id","kind","label"],"additionalProperties":false},{"type":"null"}]}},"required":["id","kind","level","label","reason","action"],"additionalProperties":false}}},"required":["target","status","summary","entries"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/workspaces/{workspaceId}/database-templates":{"get":{"tags":["database-templates"],"operationId":"database-templates.listTemplates","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"label":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"manifest":{"type":"object","properties":{"version":{"type":"number","enum":[1]},"sourceDatabaseId":{"anyOf":[{"type":"string"},{"type":"null"}]},"settings":{"type":"object"},"recordLayout":{"type":"object","properties":{"version":{"type":"number","enum":[1]},"pageWidth":{"type":"string","enum":["default","wide","full"]},"propertyColumns":{"type":"number","enum":[1,2]},"propertyDensity":{"type":"string","enum":["comfortable","compact"]},"propertyOrder":{"type":"array","items":{"type":"string"}},"hiddenFieldKeys":{"type":"array","items":{"type":"string"}},"sections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"fieldKeys":{"type":"array","items":{"type":"string"}}},"required":["id","label","fieldKeys"],"additionalProperties":false}},"contentPosition":{"type":"string","enum":["before_properties","after_properties"]},"showComments":{"type":"boolean"},"showActivity":{"type":"boolean"}},"required":["version","pageWidth","propertyColumns","propertyDensity","propertyOrder","hiddenFieldKeys","sections","contentPosition","showComments","showActivity"],"additionalProperties":false},"sourceFieldIds":{"type":"object","additionalProperties":{"type":"string"}},"fields":{"type":"array","items":{"type":"object","properties":{"key":{"anyOf":[{"type":"string"},{"type":"null"}]},"label":{"type":"string"},"kind":{"type":"string","enum":["text","long_text","number","date","select","multi_select","status","checkbox","url","email","phone","user","file","place","json","created_at","created_by","updated_at","updated_by","unique_id","formula","relation","rollup","time_tracking","button"]},"required":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"options":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"key":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"type":"string"},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"order":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["name"],"additionalProperties":false}},{"type":"null"}]},"settings":{"anyOf":[{"type":"object"},{"type":"null"}]},"order":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["label","kind"],"additionalProperties":false}},"views":{"type":"array","items":{"type":"object","properties":{"key":{"anyOf":[{"type":"string"},{"type":"null"}]},"label":{"type":"string"},"kind":{"type":"string","enum":["table","list","board","kanban","gallery","calendar","timeline","gantt","chart"]},"manifest":{"anyOf":[{"type":"object"},{"type":"null"}]},"scope":{"anyOf":[{"type":"string","enum":["shared","personal"]},{"type":"null"}]},"locked":{"anyOf":[{"type":"boolean"},{"type":"null"}]}},"required":["label","kind"],"additionalProperties":false}}},"required":["version","settings","recordLayout","sourceFieldIds","fields","views"],"additionalProperties":false},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","label","manifest"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"post":{"tags":["database-templates"],"operationId":"database-templates.createTemplate","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"label":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"manifest":{"type":"object","properties":{"version":{"type":"number","enum":[1]},"sourceDatabaseId":{"anyOf":[{"type":"string"},{"type":"null"}]},"settings":{"type":"object"},"recordLayout":{"type":"object","properties":{"version":{"type":"number","enum":[1]},"pageWidth":{"type":"string","enum":["default","wide","full"]},"propertyColumns":{"type":"number","enum":[1,2]},"propertyDensity":{"type":"string","enum":["comfortable","compact"]},"propertyOrder":{"type":"array","items":{"type":"string"}},"hiddenFieldKeys":{"type":"array","items":{"type":"string"}},"sections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"fieldKeys":{"type":"array","items":{"type":"string"}}},"required":["id","label","fieldKeys"],"additionalProperties":false}},"contentPosition":{"type":"string","enum":["before_properties","after_properties"]},"showComments":{"type":"boolean"},"showActivity":{"type":"boolean"}},"required":["version","pageWidth","propertyColumns","propertyDensity","propertyOrder","hiddenFieldKeys","sections","contentPosition","showComments","showActivity"],"additionalProperties":false},"sourceFieldIds":{"type":"object","additionalProperties":{"type":"string"}},"fields":{"type":"array","items":{"type":"object","properties":{"key":{"anyOf":[{"type":"string"},{"type":"null"}]},"label":{"type":"string"},"kind":{"type":"string","enum":["text","long_text","number","date","select","multi_select","status","checkbox","url","email","phone","user","file","place","json","created_at","created_by","updated_at","updated_by","unique_id","formula","relation","rollup","time_tracking","button"]},"required":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"options":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"key":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"type":"string"},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"order":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["name"],"additionalProperties":false}},{"type":"null"}]},"settings":{"anyOf":[{"type":"object"},{"type":"null"}]},"order":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["label","kind"],"additionalProperties":false}},"views":{"type":"array","items":{"type":"object","properties":{"key":{"anyOf":[{"type":"string"},{"type":"null"}]},"label":{"type":"string"},"kind":{"type":"string","enum":["table","list","board","kanban","gallery","calendar","timeline","gantt","chart"]},"manifest":{"anyOf":[{"type":"object"},{"type":"null"}]},"scope":{"anyOf":[{"type":"string","enum":["shared","personal"]},{"type":"null"}]},"locked":{"anyOf":[{"type":"boolean"},{"type":"null"}]}},"required":["label","kind"],"additionalProperties":false}}},"required":["version","settings","recordLayout","sourceFieldIds","fields","views"],"additionalProperties":false},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","label","manifest"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"type":"string"},"onLabelConflict":{"anyOf":[{"type":"string","enum":["error","increment"]},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"sourceDatabaseId":{"anyOf":[{"type":"string"},{"type":"null"}]},"manifest":{"anyOf":[{"type":"object","properties":{"version":{"type":"number","enum":[1]},"sourceDatabaseId":{"anyOf":[{"type":"string"},{"type":"null"}]},"settings":{"type":"object"},"recordLayout":{"type":"object","properties":{"version":{"type":"number","enum":[1]},"pageWidth":{"type":"string","enum":["default","wide","full"]},"propertyColumns":{"type":"number","enum":[1,2]},"propertyDensity":{"type":"string","enum":["comfortable","compact"]},"propertyOrder":{"type":"array","items":{"type":"string"}},"hiddenFieldKeys":{"type":"array","items":{"type":"string"}},"sections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"fieldKeys":{"type":"array","items":{"type":"string"}}},"required":["id","label","fieldKeys"],"additionalProperties":false}},"contentPosition":{"type":"string","enum":["before_properties","after_properties"]},"showComments":{"type":"boolean"},"showActivity":{"type":"boolean"}},"required":["version","pageWidth","propertyColumns","propertyDensity","propertyOrder","hiddenFieldKeys","sections","contentPosition","showComments","showActivity"],"additionalProperties":false},"sourceFieldIds":{"type":"object","additionalProperties":{"type":"string"}},"fields":{"type":"array","items":{"type":"object","properties":{"key":{"anyOf":[{"type":"string"},{"type":"null"}]},"label":{"type":"string"},"kind":{"type":"string","enum":["text","long_text","number","date","select","multi_select","status","checkbox","url","email","phone","user","file","place","json","created_at","created_by","updated_at","updated_by","unique_id","formula","relation","rollup","time_tracking","button"]},"required":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"options":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"key":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"type":"string"},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"order":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["name"],"additionalProperties":false}},{"type":"null"}]},"settings":{"anyOf":[{"type":"object"},{"type":"null"}]},"order":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["label","kind"],"additionalProperties":false}},"views":{"type":"array","items":{"type":"object","properties":{"key":{"anyOf":[{"type":"string"},{"type":"null"}]},"label":{"type":"string"},"kind":{"type":"string","enum":["table","list","board","kanban","gallery","calendar","timeline","gantt","chart"]},"manifest":{"anyOf":[{"type":"object"},{"type":"null"}]},"scope":{"anyOf":[{"type":"string","enum":["shared","personal"]},{"type":"null"}]},"locked":{"anyOf":[{"type":"boolean"},{"type":"null"}]}},"required":["label","kind"],"additionalProperties":false}}},"required":["version","settings","recordLayout","sourceFieldIds","fields","views"],"additionalProperties":false},{"type":"null"}]}},"required":["label"],"additionalProperties":false}}},"required":true}}},"/v1/workspaces/{workspaceId}/database-templates/{templateId}":{"patch":{"tags":["database-templates"],"operationId":"database-templates.updateTemplate","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"templateId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"label":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"manifest":{"type":"object","properties":{"version":{"type":"number","enum":[1]},"sourceDatabaseId":{"anyOf":[{"type":"string"},{"type":"null"}]},"settings":{"type":"object"},"recordLayout":{"type":"object","properties":{"version":{"type":"number","enum":[1]},"pageWidth":{"type":"string","enum":["default","wide","full"]},"propertyColumns":{"type":"number","enum":[1,2]},"propertyDensity":{"type":"string","enum":["comfortable","compact"]},"propertyOrder":{"type":"array","items":{"type":"string"}},"hiddenFieldKeys":{"type":"array","items":{"type":"string"}},"sections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"fieldKeys":{"type":"array","items":{"type":"string"}}},"required":["id","label","fieldKeys"],"additionalProperties":false}},"contentPosition":{"type":"string","enum":["before_properties","after_properties"]},"showComments":{"type":"boolean"},"showActivity":{"type":"boolean"}},"required":["version","pageWidth","propertyColumns","propertyDensity","propertyOrder","hiddenFieldKeys","sections","contentPosition","showComments","showActivity"],"additionalProperties":false},"sourceFieldIds":{"type":"object","additionalProperties":{"type":"string"}},"fields":{"type":"array","items":{"type":"object","properties":{"key":{"anyOf":[{"type":"string"},{"type":"null"}]},"label":{"type":"string"},"kind":{"type":"string","enum":["text","long_text","number","date","select","multi_select","status","checkbox","url","email","phone","user","file","place","json","created_at","created_by","updated_at","updated_by","unique_id","formula","relation","rollup","time_tracking","button"]},"required":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"options":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"key":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"type":"string"},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"order":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["name"],"additionalProperties":false}},{"type":"null"}]},"settings":{"anyOf":[{"type":"object"},{"type":"null"}]},"order":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["label","kind"],"additionalProperties":false}},"views":{"type":"array","items":{"type":"object","properties":{"key":{"anyOf":[{"type":"string"},{"type":"null"}]},"label":{"type":"string"},"kind":{"type":"string","enum":["table","list","board","kanban","gallery","calendar","timeline","gantt","chart"]},"manifest":{"anyOf":[{"type":"object"},{"type":"null"}]},"scope":{"anyOf":[{"type":"string","enum":["shared","personal"]},{"type":"null"}]},"locked":{"anyOf":[{"type":"boolean"},{"type":"null"}]}},"required":["label","kind"],"additionalProperties":false}}},"required":["version","settings","recordLayout","sourceFieldIds","fields","views"],"additionalProperties":false},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","label","manifest"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"manifest":{"anyOf":[{"type":"object","properties":{"version":{"type":"number","enum":[1]},"sourceDatabaseId":{"anyOf":[{"type":"string"},{"type":"null"}]},"settings":{"type":"object"},"recordLayout":{"type":"object","properties":{"version":{"type":"number","enum":[1]},"pageWidth":{"type":"string","enum":["default","wide","full"]},"propertyColumns":{"type":"number","enum":[1,2]},"propertyDensity":{"type":"string","enum":["comfortable","compact"]},"propertyOrder":{"type":"array","items":{"type":"string"}},"hiddenFieldKeys":{"type":"array","items":{"type":"string"}},"sections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"fieldKeys":{"type":"array","items":{"type":"string"}}},"required":["id","label","fieldKeys"],"additionalProperties":false}},"contentPosition":{"type":"string","enum":["before_properties","after_properties"]},"showComments":{"type":"boolean"},"showActivity":{"type":"boolean"}},"required":["version","pageWidth","propertyColumns","propertyDensity","propertyOrder","hiddenFieldKeys","sections","contentPosition","showComments","showActivity"],"additionalProperties":false},"sourceFieldIds":{"type":"object","additionalProperties":{"type":"string"}},"fields":{"type":"array","items":{"type":"object","properties":{"key":{"anyOf":[{"type":"string"},{"type":"null"}]},"label":{"type":"string"},"kind":{"type":"string","enum":["text","long_text","number","date","select","multi_select","status","checkbox","url","email","phone","user","file","place","json","created_at","created_by","updated_at","updated_by","unique_id","formula","relation","rollup","time_tracking","button"]},"required":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"options":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"key":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"type":"string"},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"order":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["name"],"additionalProperties":false}},{"type":"null"}]},"settings":{"anyOf":[{"type":"object"},{"type":"null"}]},"order":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["label","kind"],"additionalProperties":false}},"views":{"type":"array","items":{"type":"object","properties":{"key":{"anyOf":[{"type":"string"},{"type":"null"}]},"label":{"type":"string"},"kind":{"type":"string","enum":["table","list","board","kanban","gallery","calendar","timeline","gantt","chart"]},"manifest":{"anyOf":[{"type":"object"},{"type":"null"}]},"scope":{"anyOf":[{"type":"string","enum":["shared","personal"]},{"type":"null"}]},"locked":{"anyOf":[{"type":"boolean"},{"type":"null"}]}},"required":["label","kind"],"additionalProperties":false}}},"required":["version","settings","recordLayout","sourceFieldIds","fields","views"],"additionalProperties":false},{"type":"null"}]}},"additionalProperties":false}}},"required":true}},"delete":{"tags":["database-templates"],"operationId":"database-templates.deleteTemplate","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"templateId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/workspaces/{workspaceId}/database-templates/{templateId}/instantiate":{"post":{"tags":["database-templates"],"operationId":"database-templates.instantiateTemplate","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"templateId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"itemId":{"anyOf":[{"type":"string"},{"type":"null"}]},"parentItemId":{"anyOf":[{"type":"string"},{"type":"null"}]},"key":{"type":"string"},"label":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"order":{"anyOf":[{"type":"number"},{"type":"null"}]},"settings":{"type":"object"},"recordLayout":{"anyOf":[{"type":"object","properties":{"version":{"type":"number","enum":[1]},"pageWidth":{"type":"string","enum":["default","wide","full"]},"propertyColumns":{"type":"number","enum":[1,2]},"propertyDensity":{"type":"string","enum":["comfortable","compact"]},"propertyOrder":{"type":"array","items":{"type":"string"}},"hiddenFieldKeys":{"type":"array","items":{"type":"string"}},"sections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"fieldKeys":{"type":"array","items":{"type":"string"}}},"required":["id","label","fieldKeys"],"additionalProperties":false}},"contentPosition":{"type":"string","enum":["before_properties","after_properties"]},"showComments":{"type":"boolean"},"showActivity":{"type":"boolean"}},"required":["version","pageWidth","propertyColumns","propertyDensity","propertyOrder","hiddenFieldKeys","sections","contentPosition","showComments","showActivity"],"additionalProperties":false},{"type":"null"}]},"archived":{"type":"boolean"},"fields":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"databaseId":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"kind":{"type":"string","enum":["text","long_text","number","date","select","multi_select","status","checkbox","url","email","phone","user","file","place","json","created_at","created_by","updated_at","updated_by","unique_id","formula","relation","rollup","time_tracking","button"]},"required":{"type":"boolean"},"options":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}]},"key":{"type":"string"},"name":{"type":"string"},"color":{"type":"string"},"order":{"type":"number"}},"required":["key","name","color","order"],"additionalProperties":false}},{"type":"null"}]},"settings":{"type":"object"},"order":{"type":"number"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","databaseId","key","label","kind","required","settings","order"],"additionalProperties":false}},"views":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"databaseId":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"kind":{"type":"string","enum":["table","list","board","kanban","gallery","calendar","timeline","gantt","chart"]},"manifest":{"type":"object"},"ownerUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"scope":{"anyOf":[{"type":"string","enum":["shared","personal"]},{"type":"null"}]},"locked":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"definitionVersion":{"anyOf":[{"type":"number"},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","databaseId","key","label","kind","manifest"],"additionalProperties":false}},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","key","label","settings","archived","fields","views"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"parentItemId":{"anyOf":[{"type":"string"},{"type":"null"}]},"order":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false}}},"required":true}}},"/v1/workspaces/{workspaceId}/databases/{databaseId}/duplicate":{"post":{"tags":["database-templates"],"operationId":"database-templates.duplicateDatabase","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"databaseId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"itemId":{"anyOf":[{"type":"string"},{"type":"null"}]},"parentItemId":{"anyOf":[{"type":"string"},{"type":"null"}]},"key":{"type":"string"},"label":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"order":{"anyOf":[{"type":"number"},{"type":"null"}]},"settings":{"type":"object"},"recordLayout":{"anyOf":[{"type":"object","properties":{"version":{"type":"number","enum":[1]},"pageWidth":{"type":"string","enum":["default","wide","full"]},"propertyColumns":{"type":"number","enum":[1,2]},"propertyDensity":{"type":"string","enum":["comfortable","compact"]},"propertyOrder":{"type":"array","items":{"type":"string"}},"hiddenFieldKeys":{"type":"array","items":{"type":"string"}},"sections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"fieldKeys":{"type":"array","items":{"type":"string"}}},"required":["id","label","fieldKeys"],"additionalProperties":false}},"contentPosition":{"type":"string","enum":["before_properties","after_properties"]},"showComments":{"type":"boolean"},"showActivity":{"type":"boolean"}},"required":["version","pageWidth","propertyColumns","propertyDensity","propertyOrder","hiddenFieldKeys","sections","contentPosition","showComments","showActivity"],"additionalProperties":false},{"type":"null"}]},"archived":{"type":"boolean"},"fields":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"databaseId":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"kind":{"type":"string","enum":["text","long_text","number","date","select","multi_select","status","checkbox","url","email","phone","user","file","place","json","created_at","created_by","updated_at","updated_by","unique_id","formula","relation","rollup","time_tracking","button"]},"required":{"type":"boolean"},"options":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}]},"key":{"type":"string"},"name":{"type":"string"},"color":{"type":"string"},"order":{"type":"number"}},"required":["key","name","color","order"],"additionalProperties":false}},{"type":"null"}]},"settings":{"type":"object"},"order":{"type":"number"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","databaseId","key","label","kind","required","settings","order"],"additionalProperties":false}},"views":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"databaseId":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"kind":{"type":"string","enum":["table","list","board","kanban","gallery","calendar","timeline","gantt","chart"]},"manifest":{"type":"object"},"ownerUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"scope":{"anyOf":[{"type":"string","enum":["shared","personal"]},{"type":"null"}]},"locked":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"definitionVersion":{"anyOf":[{"type":"number"},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","databaseId","key","label","kind","manifest"],"additionalProperties":false}},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","key","label","settings","archived","fields","views"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"parentItemId":{"anyOf":[{"type":"string"},{"type":"null"}]},"order":{"anyOf":[{"type":"number"},{"type":"null"}]},"includeRecords":{"anyOf":[{"type":"boolean"},{"type":"null"}]}},"additionalProperties":false}}},"required":true}}},"/v1/workspaces/{workspaceId}/databases/{databaseId}/record-templates":{"get":{"tags":["database-templates"],"operationId":"database-templates.listRecordTemplates","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"databaseId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"databaseId":{"type":"string"},"label":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"data":{"type":"object"},"contentSurfaceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"isDefault":{"type":"boolean"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","databaseId","label","data","isDefault"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"post":{"tags":["database-templates"],"operationId":"database-templates.createRecordTemplate","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"databaseId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"databaseId":{"type":"string"},"label":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"data":{"type":"object"},"contentSurfaceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"isDefault":{"type":"boolean"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","databaseId","label","data","isDefault"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"type":"string"},"onLabelConflict":{"anyOf":[{"type":"string","enum":["error","increment"]},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"data":{"anyOf":[{"type":"object"},{"type":"null"}]},"sourceRecordId":{"anyOf":[{"type":"string"},{"type":"null"}]},"isDefault":{"anyOf":[{"type":"boolean"},{"type":"null"}]}},"required":["label"],"additionalProperties":false}}},"required":true}}},"/v1/workspaces/{workspaceId}/databases/{databaseId}/record-templates/{templateId}":{"patch":{"tags":["database-templates"],"operationId":"database-templates.updateRecordTemplate","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"databaseId","in":"path","schema":{"type":"string"},"required":true},{"name":"templateId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"databaseId":{"type":"string"},"label":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"data":{"type":"object"},"contentSurfaceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"isDefault":{"type":"boolean"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","databaseId","label","data","isDefault"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"data":{"anyOf":[{"type":"object"},{"type":"null"}]},"isDefault":{"anyOf":[{"type":"boolean"},{"type":"null"}]}},"additionalProperties":false}}},"required":true}},"delete":{"tags":["database-templates"],"operationId":"database-templates.deleteRecordTemplate","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"databaseId","in":"path","schema":{"type":"string"},"required":true},{"name":"templateId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/workspaces/{workspaceId}/databases/{databaseId}/record-templates/{templateId}/instantiate":{"post":{"tags":["database-templates"],"operationId":"database-templates.instantiateRecordTemplate","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"databaseId","in":"path","schema":{"type":"string"},"required":true},{"name":"templateId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","examples":["1d8a44e0-7c93-4f21-b60a-3e8d2f5a9c14"]},"workspaceId":{"type":"string","examples":["4b81aa0c-6d2f-4b19-9f0e-1a7c3d5e8b02"]},"databaseId":{"type":"string","examples":["9f2c1e7a-3b58-4d0c-8e27-6a1f9d4b3c85"]},"contentSurfaceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string","examples":["Ship the desktop app"]},"data":{"type":"object","examples":[{"status":"in_progress","due":"2026-08-01"}]},"relations":{"type":"object"},"computed":{"type":"object"},"system":{"type":"object"},"related":{"anyOf":[{"type":"object"},{"type":"null"}]},"archived":{"type":"boolean","examples":[false]},"createdByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string","examples":["2026-07-10T08:00:00.000Z"]},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","examples":["2026-07-14T11:26:02.000Z"]},{"type":"null"}]}},"required":["id","workspaceId","databaseId","title","data","relations","computed","system","archived"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"data":{"anyOf":[{"type":"object"},{"type":"null"}]}},"additionalProperties":false}}},"required":true}}},"/v1/workspaces/{workspaceId}/databases/{databaseId}/records/{recordId}/duplicate":{"post":{"tags":["database-templates"],"operationId":"database-templates.duplicateRecord","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"databaseId","in":"path","schema":{"type":"string"},"required":true},{"name":"recordId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","examples":["1d8a44e0-7c93-4f21-b60a-3e8d2f5a9c14"]},"workspaceId":{"type":"string","examples":["4b81aa0c-6d2f-4b19-9f0e-1a7c3d5e8b02"]},"databaseId":{"type":"string","examples":["9f2c1e7a-3b58-4d0c-8e27-6a1f9d4b3c85"]},"contentSurfaceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string","examples":["Ship the desktop app"]},"data":{"type":"object","examples":[{"status":"in_progress","due":"2026-08-01"}]},"relations":{"type":"object"},"computed":{"type":"object"},"system":{"type":"object"},"related":{"anyOf":[{"type":"object"},{"type":"null"}]},"archived":{"type":"boolean","examples":[false]},"createdByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string","examples":["2026-07-10T08:00:00.000Z"]},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","examples":["2026-07-14T11:26:02.000Z"]},{"type":"null"}]}},"required":["id","workspaceId","databaseId","title","data","relations","computed","system","archived"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"anyOf":[{"type":"string"},{"type":"null"}]}},"additionalProperties":false}}},"required":true}}},"/v1/workspaces/{workspaceId}/databases/{databaseId}/import/csv":{"post":{"tags":["database-templates"],"operationId":"database-templates.importCsv","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"databaseId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"created":{"type":"number"},"skipped":{"type":"number"},"errors":{"type":"array","items":{"type":"object","properties":{"row":{"type":"number"},"message":{"type":"string"}},"required":["row","message"],"additionalProperties":false}}},"required":["created","skipped","errors"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"csv":{"type":"string"},"mappings":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"column":{"type":"string"},"fieldKey":{"type":"string"}},"required":["column","fieldKey"],"additionalProperties":false}},{"type":"null"}]},"titleColumn":{"anyOf":[{"type":"string"},{"type":"null"}]},"onError":{"anyOf":[{"type":"string","enum":["abort","skip"]},{"type":"null"}]}},"required":["csv"],"additionalProperties":false}}},"required":true}}},"/v1/workspaces/{workspaceId}/databases/{databaseId}/export/csv":{"get":{"tags":["database-templates"],"operationId":"database-templates.exportCsv","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"databaseId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"filename":{"type":"string"},"csv":{"type":"string"},"recordCount":{"type":"number"}},"required":["filename","csv","recordCount"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/workspaces/{workspaceId}/databases/{databaseId}/publish":{"get":{"tags":["database-publish"],"operationId":"database-publish.getConfig","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"databaseId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"enabled":{"type":"boolean"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}]},"seoIndexed":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"publishedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["enabled"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"put":{"tags":["database-publish"],"operationId":"database-publish.publish","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"databaseId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"enabled":{"type":"boolean"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}]},"seoIndexed":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"publishedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["enabled"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"slug":{"anyOf":[{"type":"string"},{"type":"null"}]},"seoIndexed":{"anyOf":[{"type":"boolean"},{"type":"null"}]}},"additionalProperties":false}}},"required":true}},"delete":{"tags":["database-publish"],"operationId":"database-publish.unpublish","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"databaseId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"databaseId":{"type":"string"}},"required":["databaseId"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/public/databases/{slug}":{"get":{"tags":["public-databases"],"operationId":"public-databases.getPublished","parameters":[{"name":"slug","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["published_database"]},"meta":{"type":"object","properties":{"title":{"type":"string"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"workspaceName":{"anyOf":[{"type":"string"},{"type":"null"}]},"seoIndexed":{"type":"boolean"}},"required":["title","seoIndexed"],"additionalProperties":false},"databaseId":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"databaseId":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"kind":{"type":"string","enum":["text","long_text","number","date","select","multi_select","status","checkbox","url","email","phone","user","file","place","json","created_at","created_by","updated_at","updated_by","unique_id","formula","relation","rollup","time_tracking","button"]},"required":{"type":"boolean"},"options":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}]},"key":{"type":"string"},"name":{"type":"string"},"color":{"type":"string"},"order":{"type":"number"}},"required":["key","name","color","order"],"additionalProperties":false}},{"type":"null"}]},"settings":{"type":"object"},"order":{"type":"number"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","databaseId","key","label","kind","required","settings","order"],"additionalProperties":false}},"records":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","examples":["1d8a44e0-7c93-4f21-b60a-3e8d2f5a9c14"]},"workspaceId":{"type":"string","examples":["4b81aa0c-6d2f-4b19-9f0e-1a7c3d5e8b02"]},"databaseId":{"type":"string","examples":["9f2c1e7a-3b58-4d0c-8e27-6a1f9d4b3c85"]},"contentSurfaceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string","examples":["Ship the desktop app"]},"data":{"type":"object","examples":[{"status":"in_progress","due":"2026-08-01"}]},"relations":{"type":"object"},"computed":{"type":"object"},"system":{"type":"object"},"related":{"anyOf":[{"type":"object"},{"type":"null"}]},"archived":{"type":"boolean","examples":[false]},"createdByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string","examples":["2026-07-10T08:00:00.000Z"]},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","examples":["2026-07-14T11:26:02.000Z"]},{"type":"null"}]}},"required":["id","workspaceId","databaseId","title","data","relations","computed","system","archived"],"additionalProperties":false}},"hasMore":{"type":"boolean"}},"required":["type","meta","databaseId","fields","records","hasMore"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/workspaces/{workspaceId}/databases/{databaseId}/gantt/dependencies":{"get":{"tags":["gantt"],"operationId":"gantt.listDependencies","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"databaseId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"databaseId":{"type":"string"},"predecessorRecordId":{"type":"string"},"successorRecordId":{"type":"string"},"type":{"type":"string","enum":["FS","SS","FF","SF"]},"lagMinutes":{"type":"number"}},"required":["id","workspaceId","databaseId","predecessorRecordId","successorRecordId","type","lagMinutes"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"post":{"tags":["gantt"],"operationId":"gantt.createDependency","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"databaseId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"databaseId":{"type":"string"},"predecessorRecordId":{"type":"string"},"successorRecordId":{"type":"string"},"type":{"type":"string","enum":["FS","SS","FF","SF"]},"lagMinutes":{"type":"number"}},"required":["id","workspaceId","databaseId","predecessorRecordId","successorRecordId","type","lagMinutes"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"predecessorRecordId":{"type":"string"},"successorRecordId":{"type":"string"},"type":{"type":"string","enum":["FS","SS","FF","SF"]},"lagMinutes":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["predecessorRecordId","successorRecordId","type"],"additionalProperties":false}}},"required":true}}},"/v1/workspaces/{workspaceId}/databases/{databaseId}/gantt/dependencies/{dependencyId}":{"delete":{"tags":["gantt"],"operationId":"gantt.deleteDependency","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"databaseId","in":"path","schema":{"type":"string"},"required":true},{"name":"dependencyId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/workspaces/{workspaceId}/connector-operations":{"get":{"tags":["actions"],"operationId":"actions.listConnectorOperations","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"connector":{"type":"string"},"connectorLabel":{"type":"string"},"operation":{"type":"string"},"operationLabel":{"type":"string"},"description":{"type":"string"},"settingsFields":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"required":{"type":"boolean"},"secret":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"placeholder":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["key","label","required"],"additionalProperties":false}},"inputFields":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"required":{"type":"boolean"},"secret":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"placeholder":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["key","label","required"],"additionalProperties":false}}},"required":["connector","connectorLabel","operation","operationLabel","description","settingsFields","inputFields"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/workspaces/{workspaceId}/actions":{"get":{"tags":["actions"],"operationId":"actions.list","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"key":{"anyOf":[{"type":"string"},{"type":"null"}]},"label":{"type":"string"},"kind":{"type":"string","enum":["refresh_data_source","create_database_record","update_database_record","run_actions","http_request","connector_operation","provider_operation","code"]},"config":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["refresh_data_source"]},"dataSourceId":{"type":"string"}},"required":["kind","dataSourceId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["create_database_record"]},"databaseId":{"type":"string"},"fields":{"type":"object"}},"required":["kind","databaseId","fields"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["update_database_record"]},"databaseId":{"type":"string"},"recordId":{"anyOf":[{"type":"string"},{"type":"null"}]},"fields":{"type":"object"}},"required":["kind","databaseId","fields"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["run_actions"]},"steps":{"type":"array","items":{"type":"object","properties":{"actionId":{"type":"string"},"input":{"anyOf":[{"type":"object"},{"type":"null"}]},"continueOnError":{"anyOf":[{"type":"boolean"},{"type":"null"}]}},"required":["actionId"],"additionalProperties":false}}},"required":["kind","steps"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["http_request"]},"url":{"type":"string"},"method":{"anyOf":[{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE"]},{"type":"null"}]},"headers":{"anyOf":[{"type":"object","additionalProperties":{"type":"string"}},{"type":"null"}]},"query":{"anyOf":[{"type":"object","additionalProperties":{"type":"string"}},{"type":"null"}]},"body":{"anyOf":[{"type":"string"},{"type":"null"}]},"connectionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"timeoutMs":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxBodyBytes":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["kind","url"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["connector_operation"]},"connector":{"type":"string"},"operation":{"type":"string"},"connectionId":{"type":"string"},"settings":{"anyOf":[{"type":"object"},{"type":"null"}]}},"required":["kind","connector","operation","connectionId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["provider_operation"]},"connectionId":{"type":"string"},"operation":{"type":"string"},"resourceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"input":{"anyOf":[{"type":"object"},{"type":"null"}]},"confirmed":{"anyOf":[{"type":"boolean"},{"type":"null"}]}},"required":["kind","connectionId","operation"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["code"]},"language":{"type":"string","enum":["javascript","typescript","python"]},"code":{"type":"string"},"timeoutMs":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["kind","language","code"],"additionalProperties":false}]},"enabled":{"type":"boolean"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","label","kind","config","enabled"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"post":{"tags":["actions"],"operationId":"actions.create","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"key":{"anyOf":[{"type":"string"},{"type":"null"}]},"label":{"type":"string"},"kind":{"type":"string","enum":["refresh_data_source","create_database_record","update_database_record","run_actions","http_request","connector_operation","provider_operation","code"]},"config":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["refresh_data_source"]},"dataSourceId":{"type":"string"}},"required":["kind","dataSourceId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["create_database_record"]},"databaseId":{"type":"string"},"fields":{"type":"object"}},"required":["kind","databaseId","fields"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["update_database_record"]},"databaseId":{"type":"string"},"recordId":{"anyOf":[{"type":"string"},{"type":"null"}]},"fields":{"type":"object"}},"required":["kind","databaseId","fields"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["run_actions"]},"steps":{"type":"array","items":{"type":"object","properties":{"actionId":{"type":"string"},"input":{"anyOf":[{"type":"object"},{"type":"null"}]},"continueOnError":{"anyOf":[{"type":"boolean"},{"type":"null"}]}},"required":["actionId"],"additionalProperties":false}}},"required":["kind","steps"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["http_request"]},"url":{"type":"string"},"method":{"anyOf":[{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE"]},{"type":"null"}]},"headers":{"anyOf":[{"type":"object","additionalProperties":{"type":"string"}},{"type":"null"}]},"query":{"anyOf":[{"type":"object","additionalProperties":{"type":"string"}},{"type":"null"}]},"body":{"anyOf":[{"type":"string"},{"type":"null"}]},"connectionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"timeoutMs":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxBodyBytes":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["kind","url"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["connector_operation"]},"connector":{"type":"string"},"operation":{"type":"string"},"connectionId":{"type":"string"},"settings":{"anyOf":[{"type":"object"},{"type":"null"}]}},"required":["kind","connector","operation","connectionId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["provider_operation"]},"connectionId":{"type":"string"},"operation":{"type":"string"},"resourceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"input":{"anyOf":[{"type":"object"},{"type":"null"}]},"confirmed":{"anyOf":[{"type":"boolean"},{"type":"null"}]}},"required":["kind","connectionId","operation"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["code"]},"language":{"type":"string","enum":["javascript","typescript","python"]},"code":{"type":"string"},"timeoutMs":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["kind","language","code"],"additionalProperties":false}]},"enabled":{"type":"boolean"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","label","kind","config","enabled"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"key":{"anyOf":[{"type":"string"},{"type":"null"}]},"label":{"type":"string"},"kind":{"type":"string","enum":["refresh_data_source","create_database_record","update_database_record","run_actions","http_request","connector_operation","provider_operation","code"]},"config":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["refresh_data_source"]},"dataSourceId":{"type":"string"}},"required":["kind","dataSourceId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["create_database_record"]},"databaseId":{"type":"string"},"fields":{"type":"object"}},"required":["kind","databaseId","fields"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["update_database_record"]},"databaseId":{"type":"string"},"recordId":{"anyOf":[{"type":"string"},{"type":"null"}]},"fields":{"type":"object"}},"required":["kind","databaseId","fields"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["run_actions"]},"steps":{"type":"array","items":{"type":"object","properties":{"actionId":{"type":"string"},"input":{"anyOf":[{"type":"object"},{"type":"null"}]},"continueOnError":{"anyOf":[{"type":"boolean"},{"type":"null"}]}},"required":["actionId"],"additionalProperties":false}}},"required":["kind","steps"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["http_request"]},"url":{"type":"string"},"method":{"anyOf":[{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE"]},{"type":"null"}]},"headers":{"anyOf":[{"type":"object","additionalProperties":{"type":"string"}},{"type":"null"}]},"query":{"anyOf":[{"type":"object","additionalProperties":{"type":"string"}},{"type":"null"}]},"body":{"anyOf":[{"type":"string"},{"type":"null"}]},"connectionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"timeoutMs":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxBodyBytes":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["kind","url"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["connector_operation"]},"connector":{"type":"string"},"operation":{"type":"string"},"connectionId":{"type":"string"},"settings":{"anyOf":[{"type":"object"},{"type":"null"}]}},"required":["kind","connector","operation","connectionId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["provider_operation"]},"connectionId":{"type":"string"},"operation":{"type":"string"},"resourceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"input":{"anyOf":[{"type":"object"},{"type":"null"}]},"confirmed":{"anyOf":[{"type":"boolean"},{"type":"null"}]}},"required":["kind","connectionId","operation"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["code"]},"language":{"type":"string","enum":["javascript","typescript","python"]},"code":{"type":"string"},"timeoutMs":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["kind","language","code"],"additionalProperties":false}]},"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}]}},"required":["label","kind","config"],"additionalProperties":false}}},"required":true}}},"/v1/workspaces/{workspaceId}/actions/{actionId}":{"get":{"tags":["actions"],"operationId":"actions.get","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"actionId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"key":{"anyOf":[{"type":"string"},{"type":"null"}]},"label":{"type":"string"},"kind":{"type":"string","enum":["refresh_data_source","create_database_record","update_database_record","run_actions","http_request","connector_operation","provider_operation","code"]},"config":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["refresh_data_source"]},"dataSourceId":{"type":"string"}},"required":["kind","dataSourceId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["create_database_record"]},"databaseId":{"type":"string"},"fields":{"type":"object"}},"required":["kind","databaseId","fields"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["update_database_record"]},"databaseId":{"type":"string"},"recordId":{"anyOf":[{"type":"string"},{"type":"null"}]},"fields":{"type":"object"}},"required":["kind","databaseId","fields"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["run_actions"]},"steps":{"type":"array","items":{"type":"object","properties":{"actionId":{"type":"string"},"input":{"anyOf":[{"type":"object"},{"type":"null"}]},"continueOnError":{"anyOf":[{"type":"boolean"},{"type":"null"}]}},"required":["actionId"],"additionalProperties":false}}},"required":["kind","steps"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["http_request"]},"url":{"type":"string"},"method":{"anyOf":[{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE"]},{"type":"null"}]},"headers":{"anyOf":[{"type":"object","additionalProperties":{"type":"string"}},{"type":"null"}]},"query":{"anyOf":[{"type":"object","additionalProperties":{"type":"string"}},{"type":"null"}]},"body":{"anyOf":[{"type":"string"},{"type":"null"}]},"connectionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"timeoutMs":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxBodyBytes":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["kind","url"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["connector_operation"]},"connector":{"type":"string"},"operation":{"type":"string"},"connectionId":{"type":"string"},"settings":{"anyOf":[{"type":"object"},{"type":"null"}]}},"required":["kind","connector","operation","connectionId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["provider_operation"]},"connectionId":{"type":"string"},"operation":{"type":"string"},"resourceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"input":{"anyOf":[{"type":"object"},{"type":"null"}]},"confirmed":{"anyOf":[{"type":"boolean"},{"type":"null"}]}},"required":["kind","connectionId","operation"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["code"]},"language":{"type":"string","enum":["javascript","typescript","python"]},"code":{"type":"string"},"timeoutMs":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["kind","language","code"],"additionalProperties":false}]},"enabled":{"type":"boolean"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","label","kind","config","enabled"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"patch":{"tags":["actions"],"operationId":"actions.update","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"actionId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"key":{"anyOf":[{"type":"string"},{"type":"null"}]},"label":{"type":"string"},"kind":{"type":"string","enum":["refresh_data_source","create_database_record","update_database_record","run_actions","http_request","connector_operation","provider_operation","code"]},"config":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["refresh_data_source"]},"dataSourceId":{"type":"string"}},"required":["kind","dataSourceId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["create_database_record"]},"databaseId":{"type":"string"},"fields":{"type":"object"}},"required":["kind","databaseId","fields"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["update_database_record"]},"databaseId":{"type":"string"},"recordId":{"anyOf":[{"type":"string"},{"type":"null"}]},"fields":{"type":"object"}},"required":["kind","databaseId","fields"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["run_actions"]},"steps":{"type":"array","items":{"type":"object","properties":{"actionId":{"type":"string"},"input":{"anyOf":[{"type":"object"},{"type":"null"}]},"continueOnError":{"anyOf":[{"type":"boolean"},{"type":"null"}]}},"required":["actionId"],"additionalProperties":false}}},"required":["kind","steps"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["http_request"]},"url":{"type":"string"},"method":{"anyOf":[{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE"]},{"type":"null"}]},"headers":{"anyOf":[{"type":"object","additionalProperties":{"type":"string"}},{"type":"null"}]},"query":{"anyOf":[{"type":"object","additionalProperties":{"type":"string"}},{"type":"null"}]},"body":{"anyOf":[{"type":"string"},{"type":"null"}]},"connectionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"timeoutMs":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxBodyBytes":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["kind","url"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["connector_operation"]},"connector":{"type":"string"},"operation":{"type":"string"},"connectionId":{"type":"string"},"settings":{"anyOf":[{"type":"object"},{"type":"null"}]}},"required":["kind","connector","operation","connectionId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["provider_operation"]},"connectionId":{"type":"string"},"operation":{"type":"string"},"resourceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"input":{"anyOf":[{"type":"object"},{"type":"null"}]},"confirmed":{"anyOf":[{"type":"boolean"},{"type":"null"}]}},"required":["kind","connectionId","operation"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["code"]},"language":{"type":"string","enum":["javascript","typescript","python"]},"code":{"type":"string"},"timeoutMs":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["kind","language","code"],"additionalProperties":false}]},"enabled":{"type":"boolean"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","label","kind","config","enabled"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"config":{"anyOf":[{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["refresh_data_source"]},"dataSourceId":{"type":"string"}},"required":["kind","dataSourceId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["create_database_record"]},"databaseId":{"type":"string"},"fields":{"type":"object"}},"required":["kind","databaseId","fields"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["update_database_record"]},"databaseId":{"type":"string"},"recordId":{"anyOf":[{"type":"string"},{"type":"null"}]},"fields":{"type":"object"}},"required":["kind","databaseId","fields"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["run_actions"]},"steps":{"type":"array","items":{"type":"object","properties":{"actionId":{"type":"string"},"input":{"anyOf":[{"type":"object"},{"type":"null"}]},"continueOnError":{"anyOf":[{"type":"boolean"},{"type":"null"}]}},"required":["actionId"],"additionalProperties":false}}},"required":["kind","steps"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["http_request"]},"url":{"type":"string"},"method":{"anyOf":[{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE"]},{"type":"null"}]},"headers":{"anyOf":[{"type":"object","additionalProperties":{"type":"string"}},{"type":"null"}]},"query":{"anyOf":[{"type":"object","additionalProperties":{"type":"string"}},{"type":"null"}]},"body":{"anyOf":[{"type":"string"},{"type":"null"}]},"connectionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"timeoutMs":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxBodyBytes":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["kind","url"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["connector_operation"]},"connector":{"type":"string"},"operation":{"type":"string"},"connectionId":{"type":"string"},"settings":{"anyOf":[{"type":"object"},{"type":"null"}]}},"required":["kind","connector","operation","connectionId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["provider_operation"]},"connectionId":{"type":"string"},"operation":{"type":"string"},"resourceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"input":{"anyOf":[{"type":"object"},{"type":"null"}]},"confirmed":{"anyOf":[{"type":"boolean"},{"type":"null"}]}},"required":["kind","connectionId","operation"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["code"]},"language":{"type":"string","enum":["javascript","typescript","python"]},"code":{"type":"string"},"timeoutMs":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["kind","language","code"],"additionalProperties":false}]},{"type":"null"}]},"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}]}},"additionalProperties":false}}},"required":true}},"delete":{"tags":["actions"],"operationId":"actions.remove","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"actionId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/workspaces/{workspaceId}/actions/{actionId}/run":{"post":{"tags":["actions"],"operationId":"actions.run","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"actionId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"actionId":{"type":"string"},"workspaceId":{"type":"string"},"status":{"type":"string","enum":["started","completed","failed"]},"startedAt":{"type":"string"},"completedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"result":{"anyOf":[{"type":"object"},{"type":"null"}]},"input":{"anyOf":[{"type":"object"},{"type":"null"}]}},"required":["id","actionId","workspaceId","status","startedAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"anyOf":[{"type":"object"},{"type":"null"}]}},"additionalProperties":false}}},"required":true}}},"/v1/workspaces/{workspaceId}/actions/{actionId}/runs":{"get":{"tags":["actions"],"operationId":"actions.listRuns","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"actionId","in":"path","schema":{"type":"string"},"required":true},{"name":"limit","in":"query","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"actionId":{"type":"string"},"workspaceId":{"type":"string"},"status":{"type":"string","enum":["started","completed","failed"]},"startedAt":{"type":"string"},"completedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"result":{"anyOf":[{"type":"object"},{"type":"null"}]},"input":{"anyOf":[{"type":"object"},{"type":"null"}]}},"required":["id","actionId","workspaceId","status","startedAt"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/workspaces/{workspaceId}/databases/{databaseId}/records/{recordId}/button-fields/{fieldId}/run":{"post":{"tags":["actions"],"operationId":"actions.runDatabaseButton","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"databaseId","in":"path","schema":{"type":"string"},"required":true},{"name":"recordId","in":"path","schema":{"type":"string"},"required":true},{"name":"fieldId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"actionId":{"type":"string"},"workspaceId":{"type":"string"},"status":{"type":"string","enum":["started","completed","failed"]},"startedAt":{"type":"string"},"completedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"result":{"anyOf":[{"type":"object"},{"type":"null"}]},"input":{"anyOf":[{"type":"object"},{"type":"null"}]}},"required":["id","actionId","workspaceId","status","startedAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/workspaces/{workspaceId}/automations":{"get":{"tags":["automations"],"operationId":"automations.list","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"enabled":{"type":"boolean"},"versionId":{"type":"string"},"version":{"type":"number"},"publishedVersionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"draftVersionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"hasUnpublishedChanges":{"type":"boolean"},"trigger":{"type":"string","enum":["manual","schedule","event","webhook"]},"triggerConfig":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["manual"]}},"required":["kind"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["schedule"]},"scheduleType":{"anyOf":[{"type":"string","enum":["interval"]},{"type":"null"}]},"intervalMinutes":{"type":"number"}},"required":["kind","intervalMinutes"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["schedule"]},"scheduleType":{"type":"string","enum":["cron"]},"cronExpression":{"type":"string"},"timezone":{"type":"string"}},"required":["kind","scheduleType","cronExpression","timezone"],"additionalProperties":false}]},{"type":"object","properties":{"kind":{"type":"string","enum":["event"]},"eventType":{"type":"string"},"subjectType":{"anyOf":[{"type":"string"},{"type":"null"}]},"filters":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"left":{"$ref":"#/components/schemas/Suspend_"},"operator":{"type":"string","enum":["equals","not_equals","contains","not_contains","greater_than","greater_than_or_equal","less_than","less_than_or_equal","is_empty","is_not_empty","exists","not_exists"]},"right":{"anyOf":[{"$ref":"#/components/schemas/Suspend_"},{"type":"null"}]}},"required":["left","operator"],"additionalProperties":false}},{"type":"null"}]}},"required":["kind","eventType"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["webhook"]}},"required":["kind"],"additionalProperties":false}]},"graph":{"type":"object","properties":{"nodes":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"maxAttempts":{"anyOf":[{"type":"number"},{"type":"null"}]},"initialDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"backoffMultiplier":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"position":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","enum":["action"]},"actionId":{"type":"string"},"input":{"anyOf":[{"type":"object","additionalProperties":{"$ref":"#/components/schemas/Suspend_"}},{"type":"null"}]}},"required":["id","kind","actionId"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"maxAttempts":{"anyOf":[{"type":"number"},{"type":"null"}]},"initialDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"backoffMultiplier":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"position":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","enum":["condition"]},"predicate":{"type":"object","properties":{"left":{"$ref":"#/components/schemas/Suspend_"},"operator":{"type":"string","enum":["equals","not_equals","contains","not_contains","greater_than","greater_than_or_equal","less_than","less_than_or_equal","is_empty","is_not_empty","exists","not_exists"]},"right":{"anyOf":[{"$ref":"#/components/schemas/Suspend_"},{"type":"null"}]}},"required":["left","operator"],"additionalProperties":false}},"required":["id","kind","predicate"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"maxAttempts":{"anyOf":[{"type":"number"},{"type":"null"}]},"initialDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"backoffMultiplier":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"position":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","enum":["transform"]},"values":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/Suspend_"}}},"required":["id","kind","values"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"maxAttempts":{"anyOf":[{"type":"number"},{"type":"null"}]},"initialDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"backoffMultiplier":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"position":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","enum":["delay"]},"durationSeconds":{"type":"number"}},"required":["id","kind","durationSeconds"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"maxAttempts":{"anyOf":[{"type":"number"},{"type":"null"}]},"initialDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"backoffMultiplier":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"position":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","enum":["for_each"]},"items":{"$ref":"#/components/schemas/Suspend_"},"maxConcurrency":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["id","kind","items"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"maxAttempts":{"anyOf":[{"type":"number"},{"type":"null"}]},"initialDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"backoffMultiplier":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"position":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","enum":["approval"]},"instructions":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","kind"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"maxAttempts":{"anyOf":[{"type":"number"},{"type":"null"}]},"initialDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"backoffMultiplier":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"position":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","enum":["sub_automation"]},"automationId":{"type":"string"},"input":{"anyOf":[{"type":"object","additionalProperties":{"$ref":"#/components/schemas/Suspend_"}},{"type":"null"}]}},"required":["id","kind","automationId"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"maxAttempts":{"anyOf":[{"type":"number"},{"type":"null"}]},"initialDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"backoffMultiplier":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"position":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","enum":["merge"]},"strategy":{"anyOf":[{"type":"string","enum":["all","any"]},{"type":"null"}]}},"required":["id","kind"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"maxAttempts":{"anyOf":[{"type":"number"},{"type":"null"}]},"initialDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"backoffMultiplier":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"position":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","enum":["database_record"]},"operation":{"type":"string","enum":["create","update","delete","find","list"]},"databaseId":{"type":"string"},"recordId":{"anyOf":[{"$ref":"#/components/schemas/Suspend_"},{"type":"null"}]},"title":{"anyOf":[{"$ref":"#/components/schemas/Suspend_"},{"type":"null"}]},"fields":{"anyOf":[{"type":"object","additionalProperties":{"$ref":"#/components/schemas/Suspend_"}},{"type":"null"}]},"search":{"anyOf":[{"$ref":"#/components/schemas/Suspend_"},{"type":"null"}]},"limit":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["id","kind","operation","databaseId"],"additionalProperties":false}]}},"edges":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"from":{"type":"string"},"to":{"type":"string"},"outcome":{"anyOf":[{"type":"string","enum":["always","success","failure","true","false","item","done"]},{"type":"null"}]}},"required":["id","from","to"],"additionalProperties":false}},"entryNodeIds":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"testPayloads":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"payload":{"type":"object"}},"required":["id","name","payload"],"additionalProperties":false}},{"type":"null"}]},"failureAutomationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"triggerPosition":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]}},"required":["nodes","edges"],"additionalProperties":false},"webhookPath":{"anyOf":[{"type":"string"},{"type":"null"}]},"webhookSecret":{"anyOf":[{"type":"string"},{"type":"null"}]},"nextRunAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastTriggeredAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","key","label","enabled","versionId","version","hasUnpublishedChanges","trigger","triggerConfig","graph"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"post":{"tags":["automations"],"operationId":"automations.create","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"enabled":{"type":"boolean"},"versionId":{"type":"string"},"version":{"type":"number"},"publishedVersionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"draftVersionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"hasUnpublishedChanges":{"type":"boolean"},"trigger":{"type":"string","enum":["manual","schedule","event","webhook"]},"triggerConfig":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["manual"]}},"required":["kind"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["schedule"]},"scheduleType":{"anyOf":[{"type":"string","enum":["interval"]},{"type":"null"}]},"intervalMinutes":{"type":"number"}},"required":["kind","intervalMinutes"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["schedule"]},"scheduleType":{"type":"string","enum":["cron"]},"cronExpression":{"type":"string"},"timezone":{"type":"string"}},"required":["kind","scheduleType","cronExpression","timezone"],"additionalProperties":false}]},{"type":"object","properties":{"kind":{"type":"string","enum":["event"]},"eventType":{"type":"string"},"subjectType":{"anyOf":[{"type":"string"},{"type":"null"}]},"filters":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"left":{"$ref":"#/components/schemas/Suspend_"},"operator":{"type":"string","enum":["equals","not_equals","contains","not_contains","greater_than","greater_than_or_equal","less_than","less_than_or_equal","is_empty","is_not_empty","exists","not_exists"]},"right":{"anyOf":[{"$ref":"#/components/schemas/Suspend_"},{"type":"null"}]}},"required":["left","operator"],"additionalProperties":false}},{"type":"null"}]}},"required":["kind","eventType"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["webhook"]}},"required":["kind"],"additionalProperties":false}]},"graph":{"type":"object","properties":{"nodes":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"maxAttempts":{"anyOf":[{"type":"number"},{"type":"null"}]},"initialDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"backoffMultiplier":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"position":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","enum":["action"]},"actionId":{"type":"string"},"input":{"anyOf":[{"type":"object","additionalProperties":{"$ref":"#/components/schemas/Suspend_"}},{"type":"null"}]}},"required":["id","kind","actionId"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"maxAttempts":{"anyOf":[{"type":"number"},{"type":"null"}]},"initialDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"backoffMultiplier":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"position":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","enum":["condition"]},"predicate":{"type":"object","properties":{"left":{"$ref":"#/components/schemas/Suspend_"},"operator":{"type":"string","enum":["equals","not_equals","contains","not_contains","greater_than","greater_than_or_equal","less_than","less_than_or_equal","is_empty","is_not_empty","exists","not_exists"]},"right":{"anyOf":[{"$ref":"#/components/schemas/Suspend_"},{"type":"null"}]}},"required":["left","operator"],"additionalProperties":false}},"required":["id","kind","predicate"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"maxAttempts":{"anyOf":[{"type":"number"},{"type":"null"}]},"initialDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"backoffMultiplier":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"position":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","enum":["transform"]},"values":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/Suspend_"}}},"required":["id","kind","values"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"maxAttempts":{"anyOf":[{"type":"number"},{"type":"null"}]},"initialDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"backoffMultiplier":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"position":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","enum":["delay"]},"durationSeconds":{"type":"number"}},"required":["id","kind","durationSeconds"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"maxAttempts":{"anyOf":[{"type":"number"},{"type":"null"}]},"initialDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"backoffMultiplier":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"position":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","enum":["for_each"]},"items":{"$ref":"#/components/schemas/Suspend_"},"maxConcurrency":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["id","kind","items"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"maxAttempts":{"anyOf":[{"type":"number"},{"type":"null"}]},"initialDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"backoffMultiplier":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"position":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","enum":["approval"]},"instructions":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","kind"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"maxAttempts":{"anyOf":[{"type":"number"},{"type":"null"}]},"initialDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"backoffMultiplier":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"position":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","enum":["sub_automation"]},"automationId":{"type":"string"},"input":{"anyOf":[{"type":"object","additionalProperties":{"$ref":"#/components/schemas/Suspend_"}},{"type":"null"}]}},"required":["id","kind","automationId"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"maxAttempts":{"anyOf":[{"type":"number"},{"type":"null"}]},"initialDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"backoffMultiplier":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"position":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","enum":["merge"]},"strategy":{"anyOf":[{"type":"string","enum":["all","any"]},{"type":"null"}]}},"required":["id","kind"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"maxAttempts":{"anyOf":[{"type":"number"},{"type":"null"}]},"initialDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"backoffMultiplier":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"position":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","enum":["database_record"]},"operation":{"type":"string","enum":["create","update","delete","find","list"]},"databaseId":{"type":"string"},"recordId":{"anyOf":[{"$ref":"#/components/schemas/Suspend_"},{"type":"null"}]},"title":{"anyOf":[{"$ref":"#/components/schemas/Suspend_"},{"type":"null"}]},"fields":{"anyOf":[{"type":"object","additionalProperties":{"$ref":"#/components/schemas/Suspend_"}},{"type":"null"}]},"search":{"anyOf":[{"$ref":"#/components/schemas/Suspend_"},{"type":"null"}]},"limit":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["id","kind","operation","databaseId"],"additionalProperties":false}]}},"edges":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"from":{"type":"string"},"to":{"type":"string"},"outcome":{"anyOf":[{"type":"string","enum":["always","success","failure","true","false","item","done"]},{"type":"null"}]}},"required":["id","from","to"],"additionalProperties":false}},"entryNodeIds":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"testPayloads":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"payload":{"type":"object"}},"required":["id","name","payload"],"additionalProperties":false}},{"type":"null"}]},"failureAutomationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"triggerPosition":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]}},"required":["nodes","edges"],"additionalProperties":false},"webhookPath":{"anyOf":[{"type":"string"},{"type":"null"}]},"webhookSecret":{"anyOf":[{"type":"string"},{"type":"null"}]},"nextRunAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastTriggeredAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","key","label","enabled","versionId","version","hasUnpublishedChanges","trigger","triggerConfig","graph"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"key":{"anyOf":[{"type":"string"},{"type":"null"}]},"label":{"type":"string"},"trigger":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["manual"]}},"required":["kind"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["schedule"]},"scheduleType":{"anyOf":[{"type":"string","enum":["interval"]},{"type":"null"}]},"intervalMinutes":{"type":"number"}},"required":["kind","intervalMinutes"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["schedule"]},"scheduleType":{"type":"string","enum":["cron"]},"cronExpression":{"type":"string"},"timezone":{"type":"string"}},"required":["kind","scheduleType","cronExpression","timezone"],"additionalProperties":false}]},{"type":"object","properties":{"kind":{"type":"string","enum":["event"]},"eventType":{"type":"string"},"subjectType":{"anyOf":[{"type":"string"},{"type":"null"}]},"filters":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"left":{"$ref":"#/components/schemas/Suspend_"},"operator":{"type":"string","enum":["equals","not_equals","contains","not_contains","greater_than","greater_than_or_equal","less_than","less_than_or_equal","is_empty","is_not_empty","exists","not_exists"]},"right":{"anyOf":[{"$ref":"#/components/schemas/Suspend_"},{"type":"null"}]}},"required":["left","operator"],"additionalProperties":false}},{"type":"null"}]}},"required":["kind","eventType"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["webhook"]}},"required":["kind"],"additionalProperties":false}]},"graph":{"type":"object","properties":{"nodes":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"maxAttempts":{"anyOf":[{"type":"number"},{"type":"null"}]},"initialDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"backoffMultiplier":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"position":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","enum":["action"]},"actionId":{"type":"string"},"input":{"anyOf":[{"type":"object","additionalProperties":{"$ref":"#/components/schemas/Suspend_"}},{"type":"null"}]}},"required":["id","kind","actionId"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"maxAttempts":{"anyOf":[{"type":"number"},{"type":"null"}]},"initialDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"backoffMultiplier":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"position":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","enum":["condition"]},"predicate":{"type":"object","properties":{"left":{"$ref":"#/components/schemas/Suspend_"},"operator":{"type":"string","enum":["equals","not_equals","contains","not_contains","greater_than","greater_than_or_equal","less_than","less_than_or_equal","is_empty","is_not_empty","exists","not_exists"]},"right":{"anyOf":[{"$ref":"#/components/schemas/Suspend_"},{"type":"null"}]}},"required":["left","operator"],"additionalProperties":false}},"required":["id","kind","predicate"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"maxAttempts":{"anyOf":[{"type":"number"},{"type":"null"}]},"initialDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"backoffMultiplier":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"position":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","enum":["transform"]},"values":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/Suspend_"}}},"required":["id","kind","values"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"maxAttempts":{"anyOf":[{"type":"number"},{"type":"null"}]},"initialDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"backoffMultiplier":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"position":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","enum":["delay"]},"durationSeconds":{"type":"number"}},"required":["id","kind","durationSeconds"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"maxAttempts":{"anyOf":[{"type":"number"},{"type":"null"}]},"initialDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"backoffMultiplier":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"position":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","enum":["for_each"]},"items":{"$ref":"#/components/schemas/Suspend_"},"maxConcurrency":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["id","kind","items"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"maxAttempts":{"anyOf":[{"type":"number"},{"type":"null"}]},"initialDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"backoffMultiplier":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"position":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","enum":["approval"]},"instructions":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","kind"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"maxAttempts":{"anyOf":[{"type":"number"},{"type":"null"}]},"initialDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"backoffMultiplier":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"position":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","enum":["sub_automation"]},"automationId":{"type":"string"},"input":{"anyOf":[{"type":"object","additionalProperties":{"$ref":"#/components/schemas/Suspend_"}},{"type":"null"}]}},"required":["id","kind","automationId"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"maxAttempts":{"anyOf":[{"type":"number"},{"type":"null"}]},"initialDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"backoffMultiplier":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"position":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","enum":["merge"]},"strategy":{"anyOf":[{"type":"string","enum":["all","any"]},{"type":"null"}]}},"required":["id","kind"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"maxAttempts":{"anyOf":[{"type":"number"},{"type":"null"}]},"initialDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"backoffMultiplier":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"position":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","enum":["database_record"]},"operation":{"type":"string","enum":["create","update","delete","find","list"]},"databaseId":{"type":"string"},"recordId":{"anyOf":[{"$ref":"#/components/schemas/Suspend_"},{"type":"null"}]},"title":{"anyOf":[{"$ref":"#/components/schemas/Suspend_"},{"type":"null"}]},"fields":{"anyOf":[{"type":"object","additionalProperties":{"$ref":"#/components/schemas/Suspend_"}},{"type":"null"}]},"search":{"anyOf":[{"$ref":"#/components/schemas/Suspend_"},{"type":"null"}]},"limit":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["id","kind","operation","databaseId"],"additionalProperties":false}]}},"edges":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"from":{"type":"string"},"to":{"type":"string"},"outcome":{"anyOf":[{"type":"string","enum":["always","success","failure","true","false","item","done"]},{"type":"null"}]}},"required":["id","from","to"],"additionalProperties":false}},"entryNodeIds":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"testPayloads":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"payload":{"type":"object"}},"required":["id","name","payload"],"additionalProperties":false}},{"type":"null"}]},"failureAutomationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"triggerPosition":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]}},"required":["nodes","edges"],"additionalProperties":false},"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"publish":{"anyOf":[{"type":"boolean"},{"type":"null"}]}},"required":["label","trigger","graph"],"additionalProperties":false}}},"required":true}}},"/v1/workspaces/{workspaceId}/automations/{automationId}":{"get":{"tags":["automations"],"operationId":"automations.get","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"automationId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"enabled":{"type":"boolean"},"versionId":{"type":"string"},"version":{"type":"number"},"publishedVersionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"draftVersionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"hasUnpublishedChanges":{"type":"boolean"},"trigger":{"type":"string","enum":["manual","schedule","event","webhook"]},"triggerConfig":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["manual"]}},"required":["kind"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["schedule"]},"scheduleType":{"anyOf":[{"type":"string","enum":["interval"]},{"type":"null"}]},"intervalMinutes":{"type":"number"}},"required":["kind","intervalMinutes"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["schedule"]},"scheduleType":{"type":"string","enum":["cron"]},"cronExpression":{"type":"string"},"timezone":{"type":"string"}},"required":["kind","scheduleType","cronExpression","timezone"],"additionalProperties":false}]},{"type":"object","properties":{"kind":{"type":"string","enum":["event"]},"eventType":{"type":"string"},"subjectType":{"anyOf":[{"type":"string"},{"type":"null"}]},"filters":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"left":{"$ref":"#/components/schemas/Suspend_"},"operator":{"type":"string","enum":["equals","not_equals","contains","not_contains","greater_than","greater_than_or_equal","less_than","less_than_or_equal","is_empty","is_not_empty","exists","not_exists"]},"right":{"anyOf":[{"$ref":"#/components/schemas/Suspend_"},{"type":"null"}]}},"required":["left","operator"],"additionalProperties":false}},{"type":"null"}]}},"required":["kind","eventType"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["webhook"]}},"required":["kind"],"additionalProperties":false}]},"graph":{"type":"object","properties":{"nodes":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"maxAttempts":{"anyOf":[{"type":"number"},{"type":"null"}]},"initialDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"backoffMultiplier":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"position":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","enum":["action"]},"actionId":{"type":"string"},"input":{"anyOf":[{"type":"object","additionalProperties":{"$ref":"#/components/schemas/Suspend_"}},{"type":"null"}]}},"required":["id","kind","actionId"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"maxAttempts":{"anyOf":[{"type":"number"},{"type":"null"}]},"initialDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"backoffMultiplier":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"position":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","enum":["condition"]},"predicate":{"type":"object","properties":{"left":{"$ref":"#/components/schemas/Suspend_"},"operator":{"type":"string","enum":["equals","not_equals","contains","not_contains","greater_than","greater_than_or_equal","less_than","less_than_or_equal","is_empty","is_not_empty","exists","not_exists"]},"right":{"anyOf":[{"$ref":"#/components/schemas/Suspend_"},{"type":"null"}]}},"required":["left","operator"],"additionalProperties":false}},"required":["id","kind","predicate"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"maxAttempts":{"anyOf":[{"type":"number"},{"type":"null"}]},"initialDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"backoffMultiplier":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"position":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","enum":["transform"]},"values":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/Suspend_"}}},"required":["id","kind","values"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"maxAttempts":{"anyOf":[{"type":"number"},{"type":"null"}]},"initialDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"backoffMultiplier":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"position":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","enum":["delay"]},"durationSeconds":{"type":"number"}},"required":["id","kind","durationSeconds"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"maxAttempts":{"anyOf":[{"type":"number"},{"type":"null"}]},"initialDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"backoffMultiplier":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"position":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","enum":["for_each"]},"items":{"$ref":"#/components/schemas/Suspend_"},"maxConcurrency":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["id","kind","items"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"maxAttempts":{"anyOf":[{"type":"number"},{"type":"null"}]},"initialDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"backoffMultiplier":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"position":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","enum":["approval"]},"instructions":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","kind"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"maxAttempts":{"anyOf":[{"type":"number"},{"type":"null"}]},"initialDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"backoffMultiplier":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"position":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","enum":["sub_automation"]},"automationId":{"type":"string"},"input":{"anyOf":[{"type":"object","additionalProperties":{"$ref":"#/components/schemas/Suspend_"}},{"type":"null"}]}},"required":["id","kind","automationId"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"maxAttempts":{"anyOf":[{"type":"number"},{"type":"null"}]},"initialDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"backoffMultiplier":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"position":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","enum":["merge"]},"strategy":{"anyOf":[{"type":"string","enum":["all","any"]},{"type":"null"}]}},"required":["id","kind"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"maxAttempts":{"anyOf":[{"type":"number"},{"type":"null"}]},"initialDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"backoffMultiplier":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"position":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","enum":["database_record"]},"operation":{"type":"string","enum":["create","update","delete","find","list"]},"databaseId":{"type":"string"},"recordId":{"anyOf":[{"$ref":"#/components/schemas/Suspend_"},{"type":"null"}]},"title":{"anyOf":[{"$ref":"#/components/schemas/Suspend_"},{"type":"null"}]},"fields":{"anyOf":[{"type":"object","additionalProperties":{"$ref":"#/components/schemas/Suspend_"}},{"type":"null"}]},"search":{"anyOf":[{"$ref":"#/components/schemas/Suspend_"},{"type":"null"}]},"limit":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["id","kind","operation","databaseId"],"additionalProperties":false}]}},"edges":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"from":{"type":"string"},"to":{"type":"string"},"outcome":{"anyOf":[{"type":"string","enum":["always","success","failure","true","false","item","done"]},{"type":"null"}]}},"required":["id","from","to"],"additionalProperties":false}},"entryNodeIds":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"testPayloads":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"payload":{"type":"object"}},"required":["id","name","payload"],"additionalProperties":false}},{"type":"null"}]},"failureAutomationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"triggerPosition":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]}},"required":["nodes","edges"],"additionalProperties":false},"webhookPath":{"anyOf":[{"type":"string"},{"type":"null"}]},"webhookSecret":{"anyOf":[{"type":"string"},{"type":"null"}]},"nextRunAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastTriggeredAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","key","label","enabled","versionId","version","hasUnpublishedChanges","trigger","triggerConfig","graph"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"patch":{"tags":["automations"],"operationId":"automations.update","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"automationId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"enabled":{"type":"boolean"},"versionId":{"type":"string"},"version":{"type":"number"},"publishedVersionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"draftVersionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"hasUnpublishedChanges":{"type":"boolean"},"trigger":{"type":"string","enum":["manual","schedule","event","webhook"]},"triggerConfig":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["manual"]}},"required":["kind"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["schedule"]},"scheduleType":{"anyOf":[{"type":"string","enum":["interval"]},{"type":"null"}]},"intervalMinutes":{"type":"number"}},"required":["kind","intervalMinutes"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["schedule"]},"scheduleType":{"type":"string","enum":["cron"]},"cronExpression":{"type":"string"},"timezone":{"type":"string"}},"required":["kind","scheduleType","cronExpression","timezone"],"additionalProperties":false}]},{"type":"object","properties":{"kind":{"type":"string","enum":["event"]},"eventType":{"type":"string"},"subjectType":{"anyOf":[{"type":"string"},{"type":"null"}]},"filters":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"left":{"$ref":"#/components/schemas/Suspend_"},"operator":{"type":"string","enum":["equals","not_equals","contains","not_contains","greater_than","greater_than_or_equal","less_than","less_than_or_equal","is_empty","is_not_empty","exists","not_exists"]},"right":{"anyOf":[{"$ref":"#/components/schemas/Suspend_"},{"type":"null"}]}},"required":["left","operator"],"additionalProperties":false}},{"type":"null"}]}},"required":["kind","eventType"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["webhook"]}},"required":["kind"],"additionalProperties":false}]},"graph":{"type":"object","properties":{"nodes":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"maxAttempts":{"anyOf":[{"type":"number"},{"type":"null"}]},"initialDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"backoffMultiplier":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"position":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","enum":["action"]},"actionId":{"type":"string"},"input":{"anyOf":[{"type":"object","additionalProperties":{"$ref":"#/components/schemas/Suspend_"}},{"type":"null"}]}},"required":["id","kind","actionId"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"maxAttempts":{"anyOf":[{"type":"number"},{"type":"null"}]},"initialDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"backoffMultiplier":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"position":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","enum":["condition"]},"predicate":{"type":"object","properties":{"left":{"$ref":"#/components/schemas/Suspend_"},"operator":{"type":"string","enum":["equals","not_equals","contains","not_contains","greater_than","greater_than_or_equal","less_than","less_than_or_equal","is_empty","is_not_empty","exists","not_exists"]},"right":{"anyOf":[{"$ref":"#/components/schemas/Suspend_"},{"type":"null"}]}},"required":["left","operator"],"additionalProperties":false}},"required":["id","kind","predicate"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"maxAttempts":{"anyOf":[{"type":"number"},{"type":"null"}]},"initialDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"backoffMultiplier":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"position":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","enum":["transform"]},"values":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/Suspend_"}}},"required":["id","kind","values"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"maxAttempts":{"anyOf":[{"type":"number"},{"type":"null"}]},"initialDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"backoffMultiplier":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"position":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","enum":["delay"]},"durationSeconds":{"type":"number"}},"required":["id","kind","durationSeconds"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"maxAttempts":{"anyOf":[{"type":"number"},{"type":"null"}]},"initialDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"backoffMultiplier":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"position":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","enum":["for_each"]},"items":{"$ref":"#/components/schemas/Suspend_"},"maxConcurrency":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["id","kind","items"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"maxAttempts":{"anyOf":[{"type":"number"},{"type":"null"}]},"initialDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"backoffMultiplier":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"position":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","enum":["approval"]},"instructions":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","kind"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"maxAttempts":{"anyOf":[{"type":"number"},{"type":"null"}]},"initialDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"backoffMultiplier":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"position":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","enum":["sub_automation"]},"automationId":{"type":"string"},"input":{"anyOf":[{"type":"object","additionalProperties":{"$ref":"#/components/schemas/Suspend_"}},{"type":"null"}]}},"required":["id","kind","automationId"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"maxAttempts":{"anyOf":[{"type":"number"},{"type":"null"}]},"initialDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"backoffMultiplier":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"position":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","enum":["merge"]},"strategy":{"anyOf":[{"type":"string","enum":["all","any"]},{"type":"null"}]}},"required":["id","kind"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"maxAttempts":{"anyOf":[{"type":"number"},{"type":"null"}]},"initialDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"backoffMultiplier":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"position":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","enum":["database_record"]},"operation":{"type":"string","enum":["create","update","delete","find","list"]},"databaseId":{"type":"string"},"recordId":{"anyOf":[{"$ref":"#/components/schemas/Suspend_"},{"type":"null"}]},"title":{"anyOf":[{"$ref":"#/components/schemas/Suspend_"},{"type":"null"}]},"fields":{"anyOf":[{"type":"object","additionalProperties":{"$ref":"#/components/schemas/Suspend_"}},{"type":"null"}]},"search":{"anyOf":[{"$ref":"#/components/schemas/Suspend_"},{"type":"null"}]},"limit":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["id","kind","operation","databaseId"],"additionalProperties":false}]}},"edges":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"from":{"type":"string"},"to":{"type":"string"},"outcome":{"anyOf":[{"type":"string","enum":["always","success","failure","true","false","item","done"]},{"type":"null"}]}},"required":["id","from","to"],"additionalProperties":false}},"entryNodeIds":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"testPayloads":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"payload":{"type":"object"}},"required":["id","name","payload"],"additionalProperties":false}},{"type":"null"}]},"failureAutomationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"triggerPosition":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]}},"required":["nodes","edges"],"additionalProperties":false},"webhookPath":{"anyOf":[{"type":"string"},{"type":"null"}]},"webhookSecret":{"anyOf":[{"type":"string"},{"type":"null"}]},"nextRunAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastTriggeredAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","key","label","enabled","versionId","version","hasUnpublishedChanges","trigger","triggerConfig","graph"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"expectedUpdatedAt":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"trigger":{"anyOf":[{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["manual"]}},"required":["kind"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["schedule"]},"scheduleType":{"anyOf":[{"type":"string","enum":["interval"]},{"type":"null"}]},"intervalMinutes":{"type":"number"}},"required":["kind","intervalMinutes"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["schedule"]},"scheduleType":{"type":"string","enum":["cron"]},"cronExpression":{"type":"string"},"timezone":{"type":"string"}},"required":["kind","scheduleType","cronExpression","timezone"],"additionalProperties":false}]},{"type":"object","properties":{"kind":{"type":"string","enum":["event"]},"eventType":{"type":"string"},"subjectType":{"anyOf":[{"type":"string"},{"type":"null"}]},"filters":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"left":{"$ref":"#/components/schemas/Suspend_"},"operator":{"type":"string","enum":["equals","not_equals","contains","not_contains","greater_than","greater_than_or_equal","less_than","less_than_or_equal","is_empty","is_not_empty","exists","not_exists"]},"right":{"anyOf":[{"$ref":"#/components/schemas/Suspend_"},{"type":"null"}]}},"required":["left","operator"],"additionalProperties":false}},{"type":"null"}]}},"required":["kind","eventType"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["webhook"]}},"required":["kind"],"additionalProperties":false}]},{"type":"null"}]},"graph":{"anyOf":[{"type":"object","properties":{"nodes":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"maxAttempts":{"anyOf":[{"type":"number"},{"type":"null"}]},"initialDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"backoffMultiplier":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"position":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","enum":["action"]},"actionId":{"type":"string"},"input":{"anyOf":[{"type":"object","additionalProperties":{"$ref":"#/components/schemas/Suspend_"}},{"type":"null"}]}},"required":["id","kind","actionId"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"maxAttempts":{"anyOf":[{"type":"number"},{"type":"null"}]},"initialDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"backoffMultiplier":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"position":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","enum":["condition"]},"predicate":{"type":"object","properties":{"left":{"$ref":"#/components/schemas/Suspend_"},"operator":{"type":"string","enum":["equals","not_equals","contains","not_contains","greater_than","greater_than_or_equal","less_than","less_than_or_equal","is_empty","is_not_empty","exists","not_exists"]},"right":{"anyOf":[{"$ref":"#/components/schemas/Suspend_"},{"type":"null"}]}},"required":["left","operator"],"additionalProperties":false}},"required":["id","kind","predicate"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"maxAttempts":{"anyOf":[{"type":"number"},{"type":"null"}]},"initialDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"backoffMultiplier":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"position":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","enum":["transform"]},"values":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/Suspend_"}}},"required":["id","kind","values"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"maxAttempts":{"anyOf":[{"type":"number"},{"type":"null"}]},"initialDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"backoffMultiplier":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"position":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","enum":["delay"]},"durationSeconds":{"type":"number"}},"required":["id","kind","durationSeconds"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"maxAttempts":{"anyOf":[{"type":"number"},{"type":"null"}]},"initialDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"backoffMultiplier":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"position":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","enum":["for_each"]},"items":{"$ref":"#/components/schemas/Suspend_"},"maxConcurrency":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["id","kind","items"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"maxAttempts":{"anyOf":[{"type":"number"},{"type":"null"}]},"initialDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"backoffMultiplier":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"position":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","enum":["approval"]},"instructions":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","kind"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"maxAttempts":{"anyOf":[{"type":"number"},{"type":"null"}]},"initialDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"backoffMultiplier":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"position":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","enum":["sub_automation"]},"automationId":{"type":"string"},"input":{"anyOf":[{"type":"object","additionalProperties":{"$ref":"#/components/schemas/Suspend_"}},{"type":"null"}]}},"required":["id","kind","automationId"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"maxAttempts":{"anyOf":[{"type":"number"},{"type":"null"}]},"initialDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"backoffMultiplier":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"position":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","enum":["merge"]},"strategy":{"anyOf":[{"type":"string","enum":["all","any"]},{"type":"null"}]}},"required":["id","kind"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"maxAttempts":{"anyOf":[{"type":"number"},{"type":"null"}]},"initialDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"backoffMultiplier":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"position":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","enum":["database_record"]},"operation":{"type":"string","enum":["create","update","delete","find","list"]},"databaseId":{"type":"string"},"recordId":{"anyOf":[{"$ref":"#/components/schemas/Suspend_"},{"type":"null"}]},"title":{"anyOf":[{"$ref":"#/components/schemas/Suspend_"},{"type":"null"}]},"fields":{"anyOf":[{"type":"object","additionalProperties":{"$ref":"#/components/schemas/Suspend_"}},{"type":"null"}]},"search":{"anyOf":[{"$ref":"#/components/schemas/Suspend_"},{"type":"null"}]},"limit":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["id","kind","operation","databaseId"],"additionalProperties":false}]}},"edges":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"from":{"type":"string"},"to":{"type":"string"},"outcome":{"anyOf":[{"type":"string","enum":["always","success","failure","true","false","item","done"]},{"type":"null"}]}},"required":["id","from","to"],"additionalProperties":false}},"entryNodeIds":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"testPayloads":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"payload":{"type":"object"}},"required":["id","name","payload"],"additionalProperties":false}},{"type":"null"}]},"failureAutomationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"triggerPosition":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]}},"required":["nodes","edges"],"additionalProperties":false},{"type":"null"}]},"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}]}},"required":["expectedUpdatedAt"],"additionalProperties":false}}},"required":true}},"delete":{"tags":["automations"],"operationId":"automations.remove","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"automationId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/workspaces/{workspaceId}/automations/{automationId}/run":{"post":{"tags":["automations"],"operationId":"automations.run","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"automationId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"202":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"automationId":{"type":"string"},"automationVersionId":{"type":"string"},"workspaceId":{"type":"string"},"status":{"type":"string","enum":["queued","running","waiting","completed","failed","cancelled"]},"source":{"type":"string","enum":["manual","schedule","event","webhook","sub_automation","retry","failure"]},"startedAt":{"type":"string"},"completedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"triggerPayload":{"type":"object"},"output":{"anyOf":[{"type":"object"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"metadata":{"anyOf":[{"type":"object"},{"type":"null"}]},"startNodeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"replayOfRunId":{"anyOf":[{"type":"string"},{"type":"null"}]},"nodeRuns":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"runId":{"type":"string"},"nodeId":{"type":"string"},"nodeKind":{"type":"string"},"scopeKey":{"type":"string"},"status":{"type":"string","enum":["queued","running","waiting","completed","failed","cancelled","skipped"]},"attempt":{"type":"number"},"input":{"type":"object"},"output":{"anyOf":[{"type":"object"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"startedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"completedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","runId","nodeId","nodeKind","scopeKey","status","attempt","input"],"additionalProperties":false}},{"type":"null"}]}},"required":["id","automationId","automationVersionId","workspaceId","status","source","startedAt","triggerPayload"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"triggerPayload":{"anyOf":[{"type":"object"},{"type":"null"}]}},"additionalProperties":false}}},"required":true}}},"/v1/workspaces/{workspaceId}/automations/{automationId}/run-from-node":{"post":{"tags":["automations"],"operationId":"automations.runFromNode","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"automationId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"202":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"automationId":{"type":"string"},"automationVersionId":{"type":"string"},"workspaceId":{"type":"string"},"status":{"type":"string","enum":["queued","running","waiting","completed","failed","cancelled"]},"source":{"type":"string","enum":["manual","schedule","event","webhook","sub_automation","retry","failure"]},"startedAt":{"type":"string"},"completedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"triggerPayload":{"type":"object"},"output":{"anyOf":[{"type":"object"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"metadata":{"anyOf":[{"type":"object"},{"type":"null"}]},"startNodeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"replayOfRunId":{"anyOf":[{"type":"string"},{"type":"null"}]},"nodeRuns":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"runId":{"type":"string"},"nodeId":{"type":"string"},"nodeKind":{"type":"string"},"scopeKey":{"type":"string"},"status":{"type":"string","enum":["queued","running","waiting","completed","failed","cancelled","skipped"]},"attempt":{"type":"number"},"input":{"type":"object"},"output":{"anyOf":[{"type":"object"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"startedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"completedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","runId","nodeId","nodeKind","scopeKey","status","attempt","input"],"additionalProperties":false}},{"type":"null"}]}},"required":["id","automationId","automationVersionId","workspaceId","status","source","startedAt","triggerPayload"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"nodeId":{"type":"string"},"automationVersionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"triggerPayload":{"anyOf":[{"type":"object"},{"type":"null"}]},"scope":{"anyOf":[{"type":"object"},{"type":"null"}]},"nodes":{"anyOf":[{"type":"object","additionalProperties":{"type":"object"}},{"type":"null"}]}},"required":["nodeId"],"additionalProperties":false}}},"required":true}}},"/v1/workspaces/{workspaceId}/automations/{automationId}/runs":{"get":{"tags":["automations"],"operationId":"automations.listRuns","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"automationId","in":"path","schema":{"type":"string"},"required":true},{"name":"limit","in":"query","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"automationId":{"type":"string"},"automationVersionId":{"type":"string"},"workspaceId":{"type":"string"},"status":{"type":"string","enum":["queued","running","waiting","completed","failed","cancelled"]},"source":{"type":"string","enum":["manual","schedule","event","webhook","sub_automation","retry","failure"]},"startedAt":{"type":"string"},"completedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"triggerPayload":{"type":"object"},"output":{"anyOf":[{"type":"object"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"metadata":{"anyOf":[{"type":"object"},{"type":"null"}]},"startNodeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"replayOfRunId":{"anyOf":[{"type":"string"},{"type":"null"}]},"nodeRuns":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"runId":{"type":"string"},"nodeId":{"type":"string"},"nodeKind":{"type":"string"},"scopeKey":{"type":"string"},"status":{"type":"string","enum":["queued","running","waiting","completed","failed","cancelled","skipped"]},"attempt":{"type":"number"},"input":{"type":"object"},"output":{"anyOf":[{"type":"object"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"startedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"completedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","runId","nodeId","nodeKind","scopeKey","status","attempt","input"],"additionalProperties":false}},{"type":"null"}]}},"required":["id","automationId","automationVersionId","workspaceId","status","source","startedAt","triggerPayload"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/workspaces/{workspaceId}/automations/{automationId}/publish":{"post":{"tags":["automations"],"operationId":"automations.publish","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"automationId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"enabled":{"type":"boolean"},"versionId":{"type":"string"},"version":{"type":"number"},"publishedVersionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"draftVersionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"hasUnpublishedChanges":{"type":"boolean"},"trigger":{"type":"string","enum":["manual","schedule","event","webhook"]},"triggerConfig":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["manual"]}},"required":["kind"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["schedule"]},"scheduleType":{"anyOf":[{"type":"string","enum":["interval"]},{"type":"null"}]},"intervalMinutes":{"type":"number"}},"required":["kind","intervalMinutes"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["schedule"]},"scheduleType":{"type":"string","enum":["cron"]},"cronExpression":{"type":"string"},"timezone":{"type":"string"}},"required":["kind","scheduleType","cronExpression","timezone"],"additionalProperties":false}]},{"type":"object","properties":{"kind":{"type":"string","enum":["event"]},"eventType":{"type":"string"},"subjectType":{"anyOf":[{"type":"string"},{"type":"null"}]},"filters":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"left":{"$ref":"#/components/schemas/Suspend_"},"operator":{"type":"string","enum":["equals","not_equals","contains","not_contains","greater_than","greater_than_or_equal","less_than","less_than_or_equal","is_empty","is_not_empty","exists","not_exists"]},"right":{"anyOf":[{"$ref":"#/components/schemas/Suspend_"},{"type":"null"}]}},"required":["left","operator"],"additionalProperties":false}},{"type":"null"}]}},"required":["kind","eventType"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["webhook"]}},"required":["kind"],"additionalProperties":false}]},"graph":{"type":"object","properties":{"nodes":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"maxAttempts":{"anyOf":[{"type":"number"},{"type":"null"}]},"initialDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"backoffMultiplier":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"position":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","enum":["action"]},"actionId":{"type":"string"},"input":{"anyOf":[{"type":"object","additionalProperties":{"$ref":"#/components/schemas/Suspend_"}},{"type":"null"}]}},"required":["id","kind","actionId"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"maxAttempts":{"anyOf":[{"type":"number"},{"type":"null"}]},"initialDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"backoffMultiplier":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"position":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","enum":["condition"]},"predicate":{"type":"object","properties":{"left":{"$ref":"#/components/schemas/Suspend_"},"operator":{"type":"string","enum":["equals","not_equals","contains","not_contains","greater_than","greater_than_or_equal","less_than","less_than_or_equal","is_empty","is_not_empty","exists","not_exists"]},"right":{"anyOf":[{"$ref":"#/components/schemas/Suspend_"},{"type":"null"}]}},"required":["left","operator"],"additionalProperties":false}},"required":["id","kind","predicate"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"maxAttempts":{"anyOf":[{"type":"number"},{"type":"null"}]},"initialDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"backoffMultiplier":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"position":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","enum":["transform"]},"values":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/Suspend_"}}},"required":["id","kind","values"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"maxAttempts":{"anyOf":[{"type":"number"},{"type":"null"}]},"initialDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"backoffMultiplier":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"position":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","enum":["delay"]},"durationSeconds":{"type":"number"}},"required":["id","kind","durationSeconds"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"maxAttempts":{"anyOf":[{"type":"number"},{"type":"null"}]},"initialDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"backoffMultiplier":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"position":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","enum":["for_each"]},"items":{"$ref":"#/components/schemas/Suspend_"},"maxConcurrency":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["id","kind","items"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"maxAttempts":{"anyOf":[{"type":"number"},{"type":"null"}]},"initialDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"backoffMultiplier":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"position":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","enum":["approval"]},"instructions":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","kind"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"maxAttempts":{"anyOf":[{"type":"number"},{"type":"null"}]},"initialDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"backoffMultiplier":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"position":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","enum":["sub_automation"]},"automationId":{"type":"string"},"input":{"anyOf":[{"type":"object","additionalProperties":{"$ref":"#/components/schemas/Suspend_"}},{"type":"null"}]}},"required":["id","kind","automationId"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"maxAttempts":{"anyOf":[{"type":"number"},{"type":"null"}]},"initialDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"backoffMultiplier":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"position":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","enum":["merge"]},"strategy":{"anyOf":[{"type":"string","enum":["all","any"]},{"type":"null"}]}},"required":["id","kind"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"maxAttempts":{"anyOf":[{"type":"number"},{"type":"null"}]},"initialDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"backoffMultiplier":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"position":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","enum":["database_record"]},"operation":{"type":"string","enum":["create","update","delete","find","list"]},"databaseId":{"type":"string"},"recordId":{"anyOf":[{"$ref":"#/components/schemas/Suspend_"},{"type":"null"}]},"title":{"anyOf":[{"$ref":"#/components/schemas/Suspend_"},{"type":"null"}]},"fields":{"anyOf":[{"type":"object","additionalProperties":{"$ref":"#/components/schemas/Suspend_"}},{"type":"null"}]},"search":{"anyOf":[{"$ref":"#/components/schemas/Suspend_"},{"type":"null"}]},"limit":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["id","kind","operation","databaseId"],"additionalProperties":false}]}},"edges":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"from":{"type":"string"},"to":{"type":"string"},"outcome":{"anyOf":[{"type":"string","enum":["always","success","failure","true","false","item","done"]},{"type":"null"}]}},"required":["id","from","to"],"additionalProperties":false}},"entryNodeIds":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"testPayloads":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"payload":{"type":"object"}},"required":["id","name","payload"],"additionalProperties":false}},{"type":"null"}]},"failureAutomationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"triggerPosition":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]}},"required":["nodes","edges"],"additionalProperties":false},"webhookPath":{"anyOf":[{"type":"string"},{"type":"null"}]},"webhookSecret":{"anyOf":[{"type":"string"},{"type":"null"}]},"nextRunAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastTriggeredAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","key","label","enabled","versionId","version","hasUnpublishedChanges","trigger","triggerConfig","graph"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"enable":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"rotateWebhookSecret":{"anyOf":[{"type":"boolean"},{"type":"null"}]}},"additionalProperties":false}}},"required":true}}},"/v1/workspaces/{workspaceId}/automations/{automationId}/versions":{"get":{"tags":["automations"],"operationId":"automations.listVersions","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"automationId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"automationId":{"type":"string"},"version":{"type":"number"},"status":{"type":"string","enum":["draft","published","archived"]},"trigger":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["manual"]}},"required":["kind"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["schedule"]},"scheduleType":{"anyOf":[{"type":"string","enum":["interval"]},{"type":"null"}]},"intervalMinutes":{"type":"number"}},"required":["kind","intervalMinutes"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["schedule"]},"scheduleType":{"type":"string","enum":["cron"]},"cronExpression":{"type":"string"},"timezone":{"type":"string"}},"required":["kind","scheduleType","cronExpression","timezone"],"additionalProperties":false}]},{"type":"object","properties":{"kind":{"type":"string","enum":["event"]},"eventType":{"type":"string"},"subjectType":{"anyOf":[{"type":"string"},{"type":"null"}]},"filters":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"left":{"$ref":"#/components/schemas/Suspend_"},"operator":{"type":"string","enum":["equals","not_equals","contains","not_contains","greater_than","greater_than_or_equal","less_than","less_than_or_equal","is_empty","is_not_empty","exists","not_exists"]},"right":{"anyOf":[{"$ref":"#/components/schemas/Suspend_"},{"type":"null"}]}},"required":["left","operator"],"additionalProperties":false}},{"type":"null"}]}},"required":["kind","eventType"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["webhook"]}},"required":["kind"],"additionalProperties":false}]},"graph":{"type":"object","properties":{"nodes":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"maxAttempts":{"anyOf":[{"type":"number"},{"type":"null"}]},"initialDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"backoffMultiplier":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"position":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","enum":["action"]},"actionId":{"type":"string"},"input":{"anyOf":[{"type":"object","additionalProperties":{"$ref":"#/components/schemas/Suspend_"}},{"type":"null"}]}},"required":["id","kind","actionId"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"maxAttempts":{"anyOf":[{"type":"number"},{"type":"null"}]},"initialDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"backoffMultiplier":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"position":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","enum":["condition"]},"predicate":{"type":"object","properties":{"left":{"$ref":"#/components/schemas/Suspend_"},"operator":{"type":"string","enum":["equals","not_equals","contains","not_contains","greater_than","greater_than_or_equal","less_than","less_than_or_equal","is_empty","is_not_empty","exists","not_exists"]},"right":{"anyOf":[{"$ref":"#/components/schemas/Suspend_"},{"type":"null"}]}},"required":["left","operator"],"additionalProperties":false}},"required":["id","kind","predicate"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"maxAttempts":{"anyOf":[{"type":"number"},{"type":"null"}]},"initialDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"backoffMultiplier":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"position":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","enum":["transform"]},"values":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/Suspend_"}}},"required":["id","kind","values"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"maxAttempts":{"anyOf":[{"type":"number"},{"type":"null"}]},"initialDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"backoffMultiplier":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"position":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","enum":["delay"]},"durationSeconds":{"type":"number"}},"required":["id","kind","durationSeconds"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"maxAttempts":{"anyOf":[{"type":"number"},{"type":"null"}]},"initialDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"backoffMultiplier":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"position":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","enum":["for_each"]},"items":{"$ref":"#/components/schemas/Suspend_"},"maxConcurrency":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["id","kind","items"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"maxAttempts":{"anyOf":[{"type":"number"},{"type":"null"}]},"initialDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"backoffMultiplier":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"position":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","enum":["approval"]},"instructions":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","kind"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"maxAttempts":{"anyOf":[{"type":"number"},{"type":"null"}]},"initialDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"backoffMultiplier":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"position":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","enum":["sub_automation"]},"automationId":{"type":"string"},"input":{"anyOf":[{"type":"object","additionalProperties":{"$ref":"#/components/schemas/Suspend_"}},{"type":"null"}]}},"required":["id","kind","automationId"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"maxAttempts":{"anyOf":[{"type":"number"},{"type":"null"}]},"initialDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"backoffMultiplier":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"position":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","enum":["merge"]},"strategy":{"anyOf":[{"type":"string","enum":["all","any"]},{"type":"null"}]}},"required":["id","kind"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"maxAttempts":{"anyOf":[{"type":"number"},{"type":"null"}]},"initialDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"backoffMultiplier":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"position":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","enum":["database_record"]},"operation":{"type":"string","enum":["create","update","delete","find","list"]},"databaseId":{"type":"string"},"recordId":{"anyOf":[{"$ref":"#/components/schemas/Suspend_"},{"type":"null"}]},"title":{"anyOf":[{"$ref":"#/components/schemas/Suspend_"},{"type":"null"}]},"fields":{"anyOf":[{"type":"object","additionalProperties":{"$ref":"#/components/schemas/Suspend_"}},{"type":"null"}]},"search":{"anyOf":[{"$ref":"#/components/schemas/Suspend_"},{"type":"null"}]},"limit":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["id","kind","operation","databaseId"],"additionalProperties":false}]}},"edges":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"from":{"type":"string"},"to":{"type":"string"},"outcome":{"anyOf":[{"type":"string","enum":["always","success","failure","true","false","item","done"]},{"type":"null"}]}},"required":["id","from","to"],"additionalProperties":false}},"entryNodeIds":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"testPayloads":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"payload":{"type":"object"}},"required":["id","name","payload"],"additionalProperties":false}},{"type":"null"}]},"failureAutomationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"triggerPosition":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]}},"required":["nodes","edges"],"additionalProperties":false},"createdAt":{"type":"string"},"publishedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","automationId","version","status","trigger","graph","createdAt"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/workspaces/{workspaceId}/automations/{automationId}/versions/{versionId}/restore":{"post":{"tags":["automations"],"operationId":"automations.restoreVersion","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"automationId","in":"path","schema":{"type":"string"},"required":true},{"name":"versionId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"enabled":{"type":"boolean"},"versionId":{"type":"string"},"version":{"type":"number"},"publishedVersionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"draftVersionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"hasUnpublishedChanges":{"type":"boolean"},"trigger":{"type":"string","enum":["manual","schedule","event","webhook"]},"triggerConfig":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["manual"]}},"required":["kind"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["schedule"]},"scheduleType":{"anyOf":[{"type":"string","enum":["interval"]},{"type":"null"}]},"intervalMinutes":{"type":"number"}},"required":["kind","intervalMinutes"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["schedule"]},"scheduleType":{"type":"string","enum":["cron"]},"cronExpression":{"type":"string"},"timezone":{"type":"string"}},"required":["kind","scheduleType","cronExpression","timezone"],"additionalProperties":false}]},{"type":"object","properties":{"kind":{"type":"string","enum":["event"]},"eventType":{"type":"string"},"subjectType":{"anyOf":[{"type":"string"},{"type":"null"}]},"filters":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"left":{"$ref":"#/components/schemas/Suspend_"},"operator":{"type":"string","enum":["equals","not_equals","contains","not_contains","greater_than","greater_than_or_equal","less_than","less_than_or_equal","is_empty","is_not_empty","exists","not_exists"]},"right":{"anyOf":[{"$ref":"#/components/schemas/Suspend_"},{"type":"null"}]}},"required":["left","operator"],"additionalProperties":false}},{"type":"null"}]}},"required":["kind","eventType"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["webhook"]}},"required":["kind"],"additionalProperties":false}]},"graph":{"type":"object","properties":{"nodes":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"maxAttempts":{"anyOf":[{"type":"number"},{"type":"null"}]},"initialDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"backoffMultiplier":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"position":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","enum":["action"]},"actionId":{"type":"string"},"input":{"anyOf":[{"type":"object","additionalProperties":{"$ref":"#/components/schemas/Suspend_"}},{"type":"null"}]}},"required":["id","kind","actionId"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"maxAttempts":{"anyOf":[{"type":"number"},{"type":"null"}]},"initialDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"backoffMultiplier":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"position":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","enum":["condition"]},"predicate":{"type":"object","properties":{"left":{"$ref":"#/components/schemas/Suspend_"},"operator":{"type":"string","enum":["equals","not_equals","contains","not_contains","greater_than","greater_than_or_equal","less_than","less_than_or_equal","is_empty","is_not_empty","exists","not_exists"]},"right":{"anyOf":[{"$ref":"#/components/schemas/Suspend_"},{"type":"null"}]}},"required":["left","operator"],"additionalProperties":false}},"required":["id","kind","predicate"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"maxAttempts":{"anyOf":[{"type":"number"},{"type":"null"}]},"initialDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"backoffMultiplier":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"position":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","enum":["transform"]},"values":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/Suspend_"}}},"required":["id","kind","values"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"maxAttempts":{"anyOf":[{"type":"number"},{"type":"null"}]},"initialDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"backoffMultiplier":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"position":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","enum":["delay"]},"durationSeconds":{"type":"number"}},"required":["id","kind","durationSeconds"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"maxAttempts":{"anyOf":[{"type":"number"},{"type":"null"}]},"initialDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"backoffMultiplier":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"position":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","enum":["for_each"]},"items":{"$ref":"#/components/schemas/Suspend_"},"maxConcurrency":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["id","kind","items"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"maxAttempts":{"anyOf":[{"type":"number"},{"type":"null"}]},"initialDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"backoffMultiplier":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"position":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","enum":["approval"]},"instructions":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","kind"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"maxAttempts":{"anyOf":[{"type":"number"},{"type":"null"}]},"initialDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"backoffMultiplier":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"position":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","enum":["sub_automation"]},"automationId":{"type":"string"},"input":{"anyOf":[{"type":"object","additionalProperties":{"$ref":"#/components/schemas/Suspend_"}},{"type":"null"}]}},"required":["id","kind","automationId"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"maxAttempts":{"anyOf":[{"type":"number"},{"type":"null"}]},"initialDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"backoffMultiplier":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"position":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","enum":["merge"]},"strategy":{"anyOf":[{"type":"string","enum":["all","any"]},{"type":"null"}]}},"required":["id","kind"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"maxAttempts":{"anyOf":[{"type":"number"},{"type":"null"}]},"initialDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"backoffMultiplier":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"position":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","enum":["database_record"]},"operation":{"type":"string","enum":["create","update","delete","find","list"]},"databaseId":{"type":"string"},"recordId":{"anyOf":[{"$ref":"#/components/schemas/Suspend_"},{"type":"null"}]},"title":{"anyOf":[{"$ref":"#/components/schemas/Suspend_"},{"type":"null"}]},"fields":{"anyOf":[{"type":"object","additionalProperties":{"$ref":"#/components/schemas/Suspend_"}},{"type":"null"}]},"search":{"anyOf":[{"$ref":"#/components/schemas/Suspend_"},{"type":"null"}]},"limit":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["id","kind","operation","databaseId"],"additionalProperties":false}]}},"edges":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"from":{"type":"string"},"to":{"type":"string"},"outcome":{"anyOf":[{"type":"string","enum":["always","success","failure","true","false","item","done"]},{"type":"null"}]}},"required":["id","from","to"],"additionalProperties":false}},"entryNodeIds":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"testPayloads":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"payload":{"type":"object"}},"required":["id","name","payload"],"additionalProperties":false}},{"type":"null"}]},"failureAutomationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"triggerPosition":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]}},"required":["nodes","edges"],"additionalProperties":false},"webhookPath":{"anyOf":[{"type":"string"},{"type":"null"}]},"webhookSecret":{"anyOf":[{"type":"string"},{"type":"null"}]},"nextRunAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastTriggeredAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","key","label","enabled","versionId","version","hasUnpublishedChanges","trigger","triggerConfig","graph"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/workspaces/{workspaceId}/automation-templates":{"get":{"tags":["automations"],"operationId":"automations.listTemplates","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"scope":{"type":"string","enum":["builtin","workspace"]},"name":{"type":"string"},"description":{"type":"string"},"category":{"type":"string"},"trigger":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["manual"]}},"required":["kind"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["schedule"]},"scheduleType":{"anyOf":[{"type":"string","enum":["interval"]},{"type":"null"}]},"intervalMinutes":{"type":"number"}},"required":["kind","intervalMinutes"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["schedule"]},"scheduleType":{"type":"string","enum":["cron"]},"cronExpression":{"type":"string"},"timezone":{"type":"string"}},"required":["kind","scheduleType","cronExpression","timezone"],"additionalProperties":false}]},{"type":"object","properties":{"kind":{"type":"string","enum":["event"]},"eventType":{"type":"string"},"subjectType":{"anyOf":[{"type":"string"},{"type":"null"}]},"filters":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"left":{"$ref":"#/components/schemas/Suspend_"},"operator":{"type":"string","enum":["equals","not_equals","contains","not_contains","greater_than","greater_than_or_equal","less_than","less_than_or_equal","is_empty","is_not_empty","exists","not_exists"]},"right":{"anyOf":[{"$ref":"#/components/schemas/Suspend_"},{"type":"null"}]}},"required":["left","operator"],"additionalProperties":false}},{"type":"null"}]}},"required":["kind","eventType"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["webhook"]}},"required":["kind"],"additionalProperties":false}]},"graph":{"type":"object","properties":{"nodes":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"maxAttempts":{"anyOf":[{"type":"number"},{"type":"null"}]},"initialDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"backoffMultiplier":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"position":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","enum":["action"]},"actionId":{"type":"string"},"input":{"anyOf":[{"type":"object","additionalProperties":{"$ref":"#/components/schemas/Suspend_"}},{"type":"null"}]}},"required":["id","kind","actionId"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"maxAttempts":{"anyOf":[{"type":"number"},{"type":"null"}]},"initialDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"backoffMultiplier":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"position":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","enum":["condition"]},"predicate":{"type":"object","properties":{"left":{"$ref":"#/components/schemas/Suspend_"},"operator":{"type":"string","enum":["equals","not_equals","contains","not_contains","greater_than","greater_than_or_equal","less_than","less_than_or_equal","is_empty","is_not_empty","exists","not_exists"]},"right":{"anyOf":[{"$ref":"#/components/schemas/Suspend_"},{"type":"null"}]}},"required":["left","operator"],"additionalProperties":false}},"required":["id","kind","predicate"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"maxAttempts":{"anyOf":[{"type":"number"},{"type":"null"}]},"initialDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"backoffMultiplier":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"position":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","enum":["transform"]},"values":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/Suspend_"}}},"required":["id","kind","values"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"maxAttempts":{"anyOf":[{"type":"number"},{"type":"null"}]},"initialDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"backoffMultiplier":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"position":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","enum":["delay"]},"durationSeconds":{"type":"number"}},"required":["id","kind","durationSeconds"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"maxAttempts":{"anyOf":[{"type":"number"},{"type":"null"}]},"initialDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"backoffMultiplier":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"position":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","enum":["for_each"]},"items":{"$ref":"#/components/schemas/Suspend_"},"maxConcurrency":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["id","kind","items"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"maxAttempts":{"anyOf":[{"type":"number"},{"type":"null"}]},"initialDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"backoffMultiplier":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"position":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","enum":["approval"]},"instructions":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","kind"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"maxAttempts":{"anyOf":[{"type":"number"},{"type":"null"}]},"initialDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"backoffMultiplier":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"position":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","enum":["sub_automation"]},"automationId":{"type":"string"},"input":{"anyOf":[{"type":"object","additionalProperties":{"$ref":"#/components/schemas/Suspend_"}},{"type":"null"}]}},"required":["id","kind","automationId"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"maxAttempts":{"anyOf":[{"type":"number"},{"type":"null"}]},"initialDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"backoffMultiplier":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"position":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","enum":["merge"]},"strategy":{"anyOf":[{"type":"string","enum":["all","any"]},{"type":"null"}]}},"required":["id","kind"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"maxAttempts":{"anyOf":[{"type":"number"},{"type":"null"}]},"initialDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"backoffMultiplier":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"position":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","enum":["database_record"]},"operation":{"type":"string","enum":["create","update","delete","find","list"]},"databaseId":{"type":"string"},"recordId":{"anyOf":[{"$ref":"#/components/schemas/Suspend_"},{"type":"null"}]},"title":{"anyOf":[{"$ref":"#/components/schemas/Suspend_"},{"type":"null"}]},"fields":{"anyOf":[{"type":"object","additionalProperties":{"$ref":"#/components/schemas/Suspend_"}},{"type":"null"}]},"search":{"anyOf":[{"$ref":"#/components/schemas/Suspend_"},{"type":"null"}]},"limit":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["id","kind","operation","databaseId"],"additionalProperties":false}]}},"edges":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"from":{"type":"string"},"to":{"type":"string"},"outcome":{"anyOf":[{"type":"string","enum":["always","success","failure","true","false","item","done"]},{"type":"null"}]}},"required":["id","from","to"],"additionalProperties":false}},"entryNodeIds":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"testPayloads":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"payload":{"type":"object"}},"required":["id","name","payload"],"additionalProperties":false}},{"type":"null"}]},"failureAutomationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"triggerPosition":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]}},"required":["nodes","edges"],"additionalProperties":false},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","scope","name","description","category","trigger","graph"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"post":{"tags":["automations"],"operationId":"automations.createTemplate","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"scope":{"type":"string","enum":["builtin","workspace"]},"name":{"type":"string"},"description":{"type":"string"},"category":{"type":"string"},"trigger":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["manual"]}},"required":["kind"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["schedule"]},"scheduleType":{"anyOf":[{"type":"string","enum":["interval"]},{"type":"null"}]},"intervalMinutes":{"type":"number"}},"required":["kind","intervalMinutes"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["schedule"]},"scheduleType":{"type":"string","enum":["cron"]},"cronExpression":{"type":"string"},"timezone":{"type":"string"}},"required":["kind","scheduleType","cronExpression","timezone"],"additionalProperties":false}]},{"type":"object","properties":{"kind":{"type":"string","enum":["event"]},"eventType":{"type":"string"},"subjectType":{"anyOf":[{"type":"string"},{"type":"null"}]},"filters":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"left":{"$ref":"#/components/schemas/Suspend_"},"operator":{"type":"string","enum":["equals","not_equals","contains","not_contains","greater_than","greater_than_or_equal","less_than","less_than_or_equal","is_empty","is_not_empty","exists","not_exists"]},"right":{"anyOf":[{"$ref":"#/components/schemas/Suspend_"},{"type":"null"}]}},"required":["left","operator"],"additionalProperties":false}},{"type":"null"}]}},"required":["kind","eventType"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["webhook"]}},"required":["kind"],"additionalProperties":false}]},"graph":{"type":"object","properties":{"nodes":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"maxAttempts":{"anyOf":[{"type":"number"},{"type":"null"}]},"initialDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"backoffMultiplier":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"position":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","enum":["action"]},"actionId":{"type":"string"},"input":{"anyOf":[{"type":"object","additionalProperties":{"$ref":"#/components/schemas/Suspend_"}},{"type":"null"}]}},"required":["id","kind","actionId"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"maxAttempts":{"anyOf":[{"type":"number"},{"type":"null"}]},"initialDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"backoffMultiplier":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"position":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","enum":["condition"]},"predicate":{"type":"object","properties":{"left":{"$ref":"#/components/schemas/Suspend_"},"operator":{"type":"string","enum":["equals","not_equals","contains","not_contains","greater_than","greater_than_or_equal","less_than","less_than_or_equal","is_empty","is_not_empty","exists","not_exists"]},"right":{"anyOf":[{"$ref":"#/components/schemas/Suspend_"},{"type":"null"}]}},"required":["left","operator"],"additionalProperties":false}},"required":["id","kind","predicate"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"maxAttempts":{"anyOf":[{"type":"number"},{"type":"null"}]},"initialDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"backoffMultiplier":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"position":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","enum":["transform"]},"values":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/Suspend_"}}},"required":["id","kind","values"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"maxAttempts":{"anyOf":[{"type":"number"},{"type":"null"}]},"initialDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"backoffMultiplier":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"position":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","enum":["delay"]},"durationSeconds":{"type":"number"}},"required":["id","kind","durationSeconds"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"maxAttempts":{"anyOf":[{"type":"number"},{"type":"null"}]},"initialDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"backoffMultiplier":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"position":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","enum":["for_each"]},"items":{"$ref":"#/components/schemas/Suspend_"},"maxConcurrency":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["id","kind","items"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"maxAttempts":{"anyOf":[{"type":"number"},{"type":"null"}]},"initialDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"backoffMultiplier":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"position":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","enum":["approval"]},"instructions":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","kind"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"maxAttempts":{"anyOf":[{"type":"number"},{"type":"null"}]},"initialDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"backoffMultiplier":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"position":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","enum":["sub_automation"]},"automationId":{"type":"string"},"input":{"anyOf":[{"type":"object","additionalProperties":{"$ref":"#/components/schemas/Suspend_"}},{"type":"null"}]}},"required":["id","kind","automationId"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"maxAttempts":{"anyOf":[{"type":"number"},{"type":"null"}]},"initialDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"backoffMultiplier":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"position":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","enum":["merge"]},"strategy":{"anyOf":[{"type":"string","enum":["all","any"]},{"type":"null"}]}},"required":["id","kind"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"maxAttempts":{"anyOf":[{"type":"number"},{"type":"null"}]},"initialDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"backoffMultiplier":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"position":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","enum":["database_record"]},"operation":{"type":"string","enum":["create","update","delete","find","list"]},"databaseId":{"type":"string"},"recordId":{"anyOf":[{"$ref":"#/components/schemas/Suspend_"},{"type":"null"}]},"title":{"anyOf":[{"$ref":"#/components/schemas/Suspend_"},{"type":"null"}]},"fields":{"anyOf":[{"type":"object","additionalProperties":{"$ref":"#/components/schemas/Suspend_"}},{"type":"null"}]},"search":{"anyOf":[{"$ref":"#/components/schemas/Suspend_"},{"type":"null"}]},"limit":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["id","kind","operation","databaseId"],"additionalProperties":false}]}},"edges":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"from":{"type":"string"},"to":{"type":"string"},"outcome":{"anyOf":[{"type":"string","enum":["always","success","failure","true","false","item","done"]},{"type":"null"}]}},"required":["id","from","to"],"additionalProperties":false}},"entryNodeIds":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"testPayloads":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"payload":{"type":"object"}},"required":["id","name","payload"],"additionalProperties":false}},{"type":"null"}]},"failureAutomationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"triggerPosition":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]}},"required":["nodes","edges"],"additionalProperties":false},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","scope","name","description","category","trigger","graph"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"automationId":{"type":"string"},"versionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"category":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["automationId","name"],"additionalProperties":false}}},"required":true}}},"/v1/workspaces/{workspaceId}/automation-templates/{templateId}":{"delete":{"tags":["automations"],"operationId":"automations.removeTemplate","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"templateId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/workspaces/{workspaceId}/automation-operations":{"get":{"tags":["automations"],"operationId":"automations.operations","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"generatedAt":{"type":"string"},"status":{"type":"string","enum":["healthy","degraded","critical"]},"activeWorkers":{"type":"number"},"queuedJobs":{"type":"number"},"runningJobs":{"type":"number"},"waitingJobs":{"type":"number"},"deadJobs":{"type":"number"},"pendingDeliveries":{"type":"number"},"processingDeliveries":{"type":"number"},"deadDeliveries":{"type":"number"},"runningRuns":{"type":"number"},"waitingRuns":{"type":"number"},"completedRuns24h":{"type":"number"},"failedRuns24h":{"type":"number"},"retriedJobs24h":{"type":"number"},"maxJobLagMs":{"type":"number"},"maxDeliveryLagMs":{"type":"number"}},"required":["generatedAt","status","activeWorkers","queuedJobs","runningJobs","waitingJobs","deadJobs","pendingDeliveries","processingDeliveries","deadDeliveries","runningRuns","waitingRuns","completedRuns24h","failedRuns24h","retriedJobs24h","maxJobLagMs","maxDeliveryLagMs"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/workspaces/{workspaceId}/automation-dead-letters":{"get":{"tags":["automations"],"operationId":"automations.listDeadLetters","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"limit","in":"query","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false},{"name":"includeAcknowledged","in":"query","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["job","delivery"]},"automationId":{"type":"string"},"runId":{"anyOf":[{"type":"string"},{"type":"null"}]},"nodeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"attempts":{"type":"number"},"error":{"type":"string"},"createdAt":{"type":"string"},"failedAt":{"type":"string"},"acknowledgedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","kind","automationId","attempts","error","createdAt","failedAt"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/workspaces/{workspaceId}/automation-dead-letters/{kind}/{deadLetterId}/replay":{"post":{"tags":["automations"],"operationId":"automations.replayDeadLetter","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"kind","in":"path","schema":{"type":"string","enum":["job","delivery"]},"required":true},{"name":"deadLetterId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"202":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["job","delivery"]},"status":{"type":"string","enum":["replayed","acknowledged"]},"run":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"automationId":{"type":"string"},"automationVersionId":{"type":"string"},"workspaceId":{"type":"string"},"status":{"type":"string","enum":["queued","running","waiting","completed","failed","cancelled"]},"source":{"type":"string","enum":["manual","schedule","event","webhook","sub_automation","retry","failure"]},"startedAt":{"type":"string"},"completedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"triggerPayload":{"type":"object"},"output":{"anyOf":[{"type":"object"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"metadata":{"anyOf":[{"type":"object"},{"type":"null"}]},"startNodeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"replayOfRunId":{"anyOf":[{"type":"string"},{"type":"null"}]},"nodeRuns":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"runId":{"type":"string"},"nodeId":{"type":"string"},"nodeKind":{"type":"string"},"scopeKey":{"type":"string"},"status":{"type":"string","enum":["queued","running","waiting","completed","failed","cancelled","skipped"]},"attempt":{"type":"number"},"input":{"type":"object"},"output":{"anyOf":[{"type":"object"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"startedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"completedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","runId","nodeId","nodeKind","scopeKey","status","attempt","input"],"additionalProperties":false}},{"type":"null"}]}},"required":["id","automationId","automationVersionId","workspaceId","status","source","startedAt","triggerPayload"],"additionalProperties":false},{"type":"null"}]}},"required":["id","kind","status"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/workspaces/{workspaceId}/automation-dead-letters/{kind}/{deadLetterId}/acknowledge":{"post":{"tags":["automations"],"operationId":"automations.acknowledgeDeadLetter","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"kind","in":"path","schema":{"type":"string","enum":["job","delivery"]},"required":true},{"name":"deadLetterId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["job","delivery"]},"status":{"type":"string","enum":["replayed","acknowledged"]},"run":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"automationId":{"type":"string"},"automationVersionId":{"type":"string"},"workspaceId":{"type":"string"},"status":{"type":"string","enum":["queued","running","waiting","completed","failed","cancelled"]},"source":{"type":"string","enum":["manual","schedule","event","webhook","sub_automation","retry","failure"]},"startedAt":{"type":"string"},"completedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"triggerPayload":{"type":"object"},"output":{"anyOf":[{"type":"object"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"metadata":{"anyOf":[{"type":"object"},{"type":"null"}]},"startNodeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"replayOfRunId":{"anyOf":[{"type":"string"},{"type":"null"}]},"nodeRuns":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"runId":{"type":"string"},"nodeId":{"type":"string"},"nodeKind":{"type":"string"},"scopeKey":{"type":"string"},"status":{"type":"string","enum":["queued","running","waiting","completed","failed","cancelled","skipped"]},"attempt":{"type":"number"},"input":{"type":"object"},"output":{"anyOf":[{"type":"object"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"startedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"completedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","runId","nodeId","nodeKind","scopeKey","status","attempt","input"],"additionalProperties":false}},{"type":"null"}]}},"required":["id","automationId","automationVersionId","workspaceId","status","source","startedAt","triggerPayload"],"additionalProperties":false},{"type":"null"}]}},"required":["id","kind","status"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/workspaces/{workspaceId}/automations/{automationId}/webhook-secret/rotate":{"post":{"tags":["automations"],"operationId":"automations.rotateWebhookSecret","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"automationId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"enabled":{"type":"boolean"},"versionId":{"type":"string"},"version":{"type":"number"},"publishedVersionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"draftVersionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"hasUnpublishedChanges":{"type":"boolean"},"trigger":{"type":"string","enum":["manual","schedule","event","webhook"]},"triggerConfig":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["manual"]}},"required":["kind"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["schedule"]},"scheduleType":{"anyOf":[{"type":"string","enum":["interval"]},{"type":"null"}]},"intervalMinutes":{"type":"number"}},"required":["kind","intervalMinutes"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["schedule"]},"scheduleType":{"type":"string","enum":["cron"]},"cronExpression":{"type":"string"},"timezone":{"type":"string"}},"required":["kind","scheduleType","cronExpression","timezone"],"additionalProperties":false}]},{"type":"object","properties":{"kind":{"type":"string","enum":["event"]},"eventType":{"type":"string"},"subjectType":{"anyOf":[{"type":"string"},{"type":"null"}]},"filters":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"left":{"$ref":"#/components/schemas/Suspend_"},"operator":{"type":"string","enum":["equals","not_equals","contains","not_contains","greater_than","greater_than_or_equal","less_than","less_than_or_equal","is_empty","is_not_empty","exists","not_exists"]},"right":{"anyOf":[{"$ref":"#/components/schemas/Suspend_"},{"type":"null"}]}},"required":["left","operator"],"additionalProperties":false}},{"type":"null"}]}},"required":["kind","eventType"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["webhook"]}},"required":["kind"],"additionalProperties":false}]},"graph":{"type":"object","properties":{"nodes":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"maxAttempts":{"anyOf":[{"type":"number"},{"type":"null"}]},"initialDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"backoffMultiplier":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"position":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","enum":["action"]},"actionId":{"type":"string"},"input":{"anyOf":[{"type":"object","additionalProperties":{"$ref":"#/components/schemas/Suspend_"}},{"type":"null"}]}},"required":["id","kind","actionId"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"maxAttempts":{"anyOf":[{"type":"number"},{"type":"null"}]},"initialDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"backoffMultiplier":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"position":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","enum":["condition"]},"predicate":{"type":"object","properties":{"left":{"$ref":"#/components/schemas/Suspend_"},"operator":{"type":"string","enum":["equals","not_equals","contains","not_contains","greater_than","greater_than_or_equal","less_than","less_than_or_equal","is_empty","is_not_empty","exists","not_exists"]},"right":{"anyOf":[{"$ref":"#/components/schemas/Suspend_"},{"type":"null"}]}},"required":["left","operator"],"additionalProperties":false}},"required":["id","kind","predicate"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"maxAttempts":{"anyOf":[{"type":"number"},{"type":"null"}]},"initialDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"backoffMultiplier":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"position":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","enum":["transform"]},"values":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/Suspend_"}}},"required":["id","kind","values"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"maxAttempts":{"anyOf":[{"type":"number"},{"type":"null"}]},"initialDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"backoffMultiplier":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"position":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","enum":["delay"]},"durationSeconds":{"type":"number"}},"required":["id","kind","durationSeconds"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"maxAttempts":{"anyOf":[{"type":"number"},{"type":"null"}]},"initialDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"backoffMultiplier":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"position":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","enum":["for_each"]},"items":{"$ref":"#/components/schemas/Suspend_"},"maxConcurrency":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["id","kind","items"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"maxAttempts":{"anyOf":[{"type":"number"},{"type":"null"}]},"initialDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"backoffMultiplier":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"position":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","enum":["approval"]},"instructions":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","kind"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"maxAttempts":{"anyOf":[{"type":"number"},{"type":"null"}]},"initialDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"backoffMultiplier":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"position":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","enum":["sub_automation"]},"automationId":{"type":"string"},"input":{"anyOf":[{"type":"object","additionalProperties":{"$ref":"#/components/schemas/Suspend_"}},{"type":"null"}]}},"required":["id","kind","automationId"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"maxAttempts":{"anyOf":[{"type":"number"},{"type":"null"}]},"initialDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"backoffMultiplier":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"position":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","enum":["merge"]},"strategy":{"anyOf":[{"type":"string","enum":["all","any"]},{"type":"null"}]}},"required":["id","kind"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"retry":{"anyOf":[{"type":"object","properties":{"maxAttempts":{"anyOf":[{"type":"number"},{"type":"null"}]},"initialDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"backoffMultiplier":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDelaySeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"position":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","enum":["database_record"]},"operation":{"type":"string","enum":["create","update","delete","find","list"]},"databaseId":{"type":"string"},"recordId":{"anyOf":[{"$ref":"#/components/schemas/Suspend_"},{"type":"null"}]},"title":{"anyOf":[{"$ref":"#/components/schemas/Suspend_"},{"type":"null"}]},"fields":{"anyOf":[{"type":"object","additionalProperties":{"$ref":"#/components/schemas/Suspend_"}},{"type":"null"}]},"search":{"anyOf":[{"$ref":"#/components/schemas/Suspend_"},{"type":"null"}]},"limit":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["id","kind","operation","databaseId"],"additionalProperties":false}]}},"edges":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"from":{"type":"string"},"to":{"type":"string"},"outcome":{"anyOf":[{"type":"string","enum":["always","success","failure","true","false","item","done"]},{"type":"null"}]}},"required":["id","from","to"],"additionalProperties":false}},"entryNodeIds":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"testPayloads":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"payload":{"type":"object"}},"required":["id","name","payload"],"additionalProperties":false}},{"type":"null"}]},"failureAutomationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"triggerPosition":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false},{"type":"null"}]}},"required":["nodes","edges"],"additionalProperties":false},"webhookPath":{"anyOf":[{"type":"string"},{"type":"null"}]},"webhookSecret":{"anyOf":[{"type":"string"},{"type":"null"}]},"nextRunAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastTriggeredAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","key","label","enabled","versionId","version","hasUnpublishedChanges","trigger","triggerConfig","graph"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/workspaces/{workspaceId}/automations/{automationId}/runs/{runId}":{"get":{"tags":["automations"],"operationId":"automations.getRun","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"automationId","in":"path","schema":{"type":"string"},"required":true},{"name":"runId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"automationId":{"type":"string"},"automationVersionId":{"type":"string"},"workspaceId":{"type":"string"},"status":{"type":"string","enum":["queued","running","waiting","completed","failed","cancelled"]},"source":{"type":"string","enum":["manual","schedule","event","webhook","sub_automation","retry","failure"]},"startedAt":{"type":"string"},"completedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"triggerPayload":{"type":"object"},"output":{"anyOf":[{"type":"object"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"metadata":{"anyOf":[{"type":"object"},{"type":"null"}]},"startNodeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"replayOfRunId":{"anyOf":[{"type":"string"},{"type":"null"}]},"nodeRuns":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"runId":{"type":"string"},"nodeId":{"type":"string"},"nodeKind":{"type":"string"},"scopeKey":{"type":"string"},"status":{"type":"string","enum":["queued","running","waiting","completed","failed","cancelled","skipped"]},"attempt":{"type":"number"},"input":{"type":"object"},"output":{"anyOf":[{"type":"object"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"startedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"completedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","runId","nodeId","nodeKind","scopeKey","status","attempt","input"],"additionalProperties":false}},{"type":"null"}]}},"required":["id","automationId","automationVersionId","workspaceId","status","source","startedAt","triggerPayload"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/workspaces/{workspaceId}/automations/{automationId}/runs/{runId}/cancel":{"post":{"tags":["automations"],"operationId":"automations.cancelRun","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"automationId","in":"path","schema":{"type":"string"},"required":true},{"name":"runId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"automationId":{"type":"string"},"automationVersionId":{"type":"string"},"workspaceId":{"type":"string"},"status":{"type":"string","enum":["queued","running","waiting","completed","failed","cancelled"]},"source":{"type":"string","enum":["manual","schedule","event","webhook","sub_automation","retry","failure"]},"startedAt":{"type":"string"},"completedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"triggerPayload":{"type":"object"},"output":{"anyOf":[{"type":"object"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"metadata":{"anyOf":[{"type":"object"},{"type":"null"}]},"startNodeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"replayOfRunId":{"anyOf":[{"type":"string"},{"type":"null"}]},"nodeRuns":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"runId":{"type":"string"},"nodeId":{"type":"string"},"nodeKind":{"type":"string"},"scopeKey":{"type":"string"},"status":{"type":"string","enum":["queued","running","waiting","completed","failed","cancelled","skipped"]},"attempt":{"type":"number"},"input":{"type":"object"},"output":{"anyOf":[{"type":"object"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"startedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"completedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","runId","nodeId","nodeKind","scopeKey","status","attempt","input"],"additionalProperties":false}},{"type":"null"}]}},"required":["id","automationId","automationVersionId","workspaceId","status","source","startedAt","triggerPayload"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/workspaces/{workspaceId}/automations/{automationId}/runs/{runId}/retry":{"post":{"tags":["automations"],"operationId":"automations.retryRun","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"automationId","in":"path","schema":{"type":"string"},"required":true},{"name":"runId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"202":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"automationId":{"type":"string"},"automationVersionId":{"type":"string"},"workspaceId":{"type":"string"},"status":{"type":"string","enum":["queued","running","waiting","completed","failed","cancelled"]},"source":{"type":"string","enum":["manual","schedule","event","webhook","sub_automation","retry","failure"]},"startedAt":{"type":"string"},"completedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"triggerPayload":{"type":"object"},"output":{"anyOf":[{"type":"object"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"metadata":{"anyOf":[{"type":"object"},{"type":"null"}]},"startNodeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"replayOfRunId":{"anyOf":[{"type":"string"},{"type":"null"}]},"nodeRuns":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"runId":{"type":"string"},"nodeId":{"type":"string"},"nodeKind":{"type":"string"},"scopeKey":{"type":"string"},"status":{"type":"string","enum":["queued","running","waiting","completed","failed","cancelled","skipped"]},"attempt":{"type":"number"},"input":{"type":"object"},"output":{"anyOf":[{"type":"object"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"startedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"completedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","runId","nodeId","nodeKind","scopeKey","status","attempt","input"],"additionalProperties":false}},{"type":"null"}]}},"required":["id","automationId","automationVersionId","workspaceId","status","source","startedAt","triggerPayload"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/workspaces/{workspaceId}/automations/{automationId}/runs/{runId}/nodes/{nodeRunId}/resume":{"post":{"tags":["automations"],"operationId":"automations.resumeNode","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"automationId","in":"path","schema":{"type":"string"},"required":true},{"name":"runId","in":"path","schema":{"type":"string"},"required":true},{"name":"nodeRunId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"automationId":{"type":"string"},"automationVersionId":{"type":"string"},"workspaceId":{"type":"string"},"status":{"type":"string","enum":["queued","running","waiting","completed","failed","cancelled"]},"source":{"type":"string","enum":["manual","schedule","event","webhook","sub_automation","retry","failure"]},"startedAt":{"type":"string"},"completedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"triggerPayload":{"type":"object"},"output":{"anyOf":[{"type":"object"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"metadata":{"anyOf":[{"type":"object"},{"type":"null"}]},"startNodeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"replayOfRunId":{"anyOf":[{"type":"string"},{"type":"null"}]},"nodeRuns":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"runId":{"type":"string"},"nodeId":{"type":"string"},"nodeKind":{"type":"string"},"scopeKey":{"type":"string"},"status":{"type":"string","enum":["queued","running","waiting","completed","failed","cancelled","skipped"]},"attempt":{"type":"number"},"input":{"type":"object"},"output":{"anyOf":[{"type":"object"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"startedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"completedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","runId","nodeId","nodeKind","scopeKey","status","attempt","input"],"additionalProperties":false}},{"type":"null"}]}},"required":["id","automationId","automationVersionId","workspaceId","status","source","startedAt","triggerPayload"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"decision":{"type":"string","enum":["approved","rejected"]},"output":{"anyOf":[{"type":"object"},{"type":"null"}]}},"required":["decision"],"additionalProperties":false}}},"required":true}}},"/v1/workspaces/{workspaceId}/automations/{automationId}/runs/{runId}/nodes/{nodeRunId}/replay":{"post":{"tags":["automations"],"operationId":"automations.replayNode","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"automationId","in":"path","schema":{"type":"string"},"required":true},{"name":"runId","in":"path","schema":{"type":"string"},"required":true},{"name":"nodeRunId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"202":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"automationId":{"type":"string"},"automationVersionId":{"type":"string"},"workspaceId":{"type":"string"},"status":{"type":"string","enum":["queued","running","waiting","completed","failed","cancelled"]},"source":{"type":"string","enum":["manual","schedule","event","webhook","sub_automation","retry","failure"]},"startedAt":{"type":"string"},"completedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"triggerPayload":{"type":"object"},"output":{"anyOf":[{"type":"object"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"metadata":{"anyOf":[{"type":"object"},{"type":"null"}]},"startNodeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"replayOfRunId":{"anyOf":[{"type":"string"},{"type":"null"}]},"nodeRuns":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"runId":{"type":"string"},"nodeId":{"type":"string"},"nodeKind":{"type":"string"},"scopeKey":{"type":"string"},"status":{"type":"string","enum":["queued","running","waiting","completed","failed","cancelled","skipped"]},"attempt":{"type":"number"},"input":{"type":"object"},"output":{"anyOf":[{"type":"object"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"startedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"completedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","runId","nodeId","nodeKind","scopeKey","status","attempt","input"],"additionalProperties":false}},{"type":"null"}]}},"required":["id","automationId","automationVersionId","workspaceId","status","source","startedAt","triggerPayload"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/workspaces/{workspaceId}/webhooks/outbound":{"get":{"tags":["outbound-webhooks"],"operationId":"outbound-webhooks.list","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"url":{"type":"string"},"enabled":{"type":"boolean"},"eventTypes":{"type":"array","items":{"type":"string"}},"lastEventVersion":{"type":"number"},"createdByUserId":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","key","label","url","enabled","eventTypes","lastEventVersion"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"post":{"tags":["outbound-webhooks"],"operationId":"outbound-webhooks.create","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"endpoint":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"url":{"type":"string"},"enabled":{"type":"boolean"},"eventTypes":{"type":"array","items":{"type":"string"}},"lastEventVersion":{"type":"number"},"createdByUserId":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","key","label","url","enabled","eventTypes","lastEventVersion"],"additionalProperties":false},"signingSecret":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["endpoint"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"key":{"anyOf":[{"type":"string"},{"type":"null"}]},"label":{"type":"string"},"url":{"type":"string"},"eventTypes":{"type":"array","items":{"type":"string"}}},"required":["label","url","eventTypes"],"additionalProperties":false}}},"required":true}}},"/v1/workspaces/{workspaceId}/webhooks/outbound/{endpointId}":{"patch":{"tags":["outbound-webhooks"],"operationId":"outbound-webhooks.update","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"endpointId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"endpoint":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"url":{"type":"string"},"enabled":{"type":"boolean"},"eventTypes":{"type":"array","items":{"type":"string"}},"lastEventVersion":{"type":"number"},"createdByUserId":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","key","label","url","enabled","eventTypes","lastEventVersion"],"additionalProperties":false},"signingSecret":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["endpoint"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"eventTypes":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"rotateSecret":{"anyOf":[{"type":"boolean"},{"type":"null"}]}},"additionalProperties":false}}},"required":true}},"delete":{"tags":["outbound-webhooks"],"operationId":"outbound-webhooks.remove","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"endpointId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/workspaces/{workspaceId}/webhooks/outbound/{endpointId}/deliveries":{"get":{"tags":["outbound-webhooks"],"operationId":"outbound-webhooks.listDeliveries","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"endpointId","in":"path","schema":{"type":"string"},"required":true},{"name":"limit","in":"query","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"endpointId":{"type":"string"},"eventId":{"type":"string"},"eventVersion":{"type":"number"},"status":{"type":"string","enum":["pending","delivering","succeeded","failed","dead"]},"attempts":{"type":"number"},"nextAttemptAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"responseStatus":{"anyOf":[{"anyOf":[{"type":"number"},{"type":"null"}]},{"type":"null"}]},"lastError":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"deliveredAt":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]}},"required":["id","workspaceId","endpointId","eventId","eventVersion","status","attempts"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/workspaces/{workspaceId}/webhooks/outbound/deliveries/{deliveryId}/replay":{"post":{"tags":["outbound-webhooks"],"operationId":"outbound-webhooks.replayDelivery","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"deliveryId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"endpointId":{"type":"string"},"eventId":{"type":"string"},"eventVersion":{"type":"number"},"status":{"type":"string","enum":["pending","delivering","succeeded","failed","dead"]},"attempts":{"type":"number"},"nextAttemptAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"responseStatus":{"anyOf":[{"anyOf":[{"type":"number"},{"type":"null"}]},{"type":"null"}]},"lastError":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"deliveredAt":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]}},"required":["id","workspaceId","endpointId","eventId","eventVersion","status","attempts"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/workspaces/{workspaceId}/webhooks/inbound":{"get":{"tags":["inbound-webhooks"],"operationId":"inbound-webhooks.list","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"slug":{"type":"string"},"enabled":{"type":"boolean"},"eventType":{"type":"string"},"hasSecret":{"type":"boolean"},"createdByUserId":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","key","label","slug","enabled","eventType","hasSecret"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"post":{"tags":["inbound-webhooks"],"operationId":"inbound-webhooks.create","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"endpoint":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"slug":{"type":"string"},"enabled":{"type":"boolean"},"eventType":{"type":"string"},"hasSecret":{"type":"boolean"},"createdByUserId":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","key","label","slug","enabled","eventType","hasSecret"],"additionalProperties":false},"signingSecret":{"anyOf":[{"type":"string"},{"type":"null"}]},"urlPath":{"type":"string"}},"required":["endpoint","urlPath"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"key":{"anyOf":[{"type":"string"},{"type":"null"}]},"label":{"type":"string"},"eventType":{"anyOf":[{"type":"string"},{"type":"null"}]},"requireSignature":{"anyOf":[{"type":"boolean"},{"type":"null"}]}},"required":["label"],"additionalProperties":false}}},"required":true}}},"/v1/workspaces/{workspaceId}/webhooks/inbound/{endpointId}":{"patch":{"tags":["inbound-webhooks"],"operationId":"inbound-webhooks.update","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"endpointId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"endpoint":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"slug":{"type":"string"},"enabled":{"type":"boolean"},"eventType":{"type":"string"},"hasSecret":{"type":"boolean"},"createdByUserId":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","key","label","slug","enabled","eventType","hasSecret"],"additionalProperties":false},"signingSecret":{"anyOf":[{"type":"string"},{"type":"null"}]},"urlPath":{"type":"string"}},"required":["endpoint","urlPath"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"eventType":{"anyOf":[{"type":"string"},{"type":"null"}]},"rotateSecret":{"anyOf":[{"type":"boolean"},{"type":"null"}]}},"additionalProperties":false}}},"required":true}},"delete":{"tags":["inbound-webhooks"],"operationId":"inbound-webhooks.remove","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"endpointId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/workspaces/{workspaceId}/webhooks/inbound/{endpointId}/deliveries":{"get":{"tags":["inbound-webhooks"],"operationId":"inbound-webhooks.listDeliveries","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"endpointId","in":"path","schema":{"type":"string"},"required":true},{"name":"limit","in":"query","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"endpointId":{"type":"string"},"deliveryKey":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"status":{"type":"string","enum":["received","processed","duplicate","rejected","failed"]},"signatureStatus":{"type":"string"},"eventId":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"error":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"responseStatus":{"anyOf":[{"anyOf":[{"type":"number"},{"type":"null"}]},{"type":"null"}]},"receivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"processedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","endpointId","status","signatureStatus"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/workspaces/{workspaceId}/product-controls/features/{key}":{"get":{"tags":["product-controls"],"operationId":"product-controls.getFeature","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"key","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"key":{"type":"string"},"enabled":{"type":"boolean"}},"required":["key","enabled"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/workspaces/{workspaceId}/product-controls/experiments/{targetKey}":{"get":{"tags":["product-controls"],"operationId":"product-controls.getExperiment","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"targetKey","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"targetKey":{"type":"string"},"assignment":{"anyOf":[{"type":"object","properties":{"experimentId":{"type":"string"},"experimentName":{"type":"string"},"targetType":{"type":"string","enum":["flag","surface","flow","pricing"]},"targetKey":{"type":"string"},"assignmentUnit":{"type":"string","enum":["workspace","user"]},"variantId":{"type":"string"},"variant":{"type":"string"}},"required":["experimentId","experimentName","targetType","targetKey","assignmentUnit","variantId","variant"],"additionalProperties":false},{"type":"null"}]}},"required":["targetKey","assignment"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/workspaces/{workspaceId}/surfaces":{"post":{"tags":["surfaces"],"operationId":"surfaces.create","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"surface":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"kind":{"type":"string","enum":["page","note","dashboard","canvas","view","form"]},"title":{"type":"string"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"manifest":{"type":"object"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"itemId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","kind","title","manifest"],"additionalProperties":false},"item":{"type":"object","properties":{"id":{"type":"string","examples":["0b6f2e6a-9f2c-4e7a-8d31-2c1e7a9f2c4e"]},"workspaceId":{"type":"string","examples":["4b81aa0c-6d2f-4b19-9f0e-1a7c3d5e8b02"]},"parentItemId":{"anyOf":[{"type":"string","examples":["d3a7f1b8-5c04-4e62-9a11-7b2e6c0d4f39"]},{"type":"null"}]},"kind":{"type":"string","enum":["folder","page","note","dashboard","canvas","view","form","database","file","data_source","action","automation","external_resource"],"examples":["database"]},"targetId":{"anyOf":[{"type":"string","examples":["9f2c1e7a-3b58-4d0c-8e27-6a1f9d4b3c85"]},{"type":"null"}]},"title":{"type":"string","examples":["Launch tasks"]},"icon":{"anyOf":[{"type":"string","examples":["rocket"]},{"type":"null"}]},"color":{"anyOf":[{"type":"string","examples":["#2f6f4f"]},{"type":"null"}]},"order":{"type":"number"},"archived":{"type":"boolean","examples":[false]},"accessMode":{"type":"string","enum":["open","restricted"],"examples":["open"]},"metadata":{"type":"object"},"createdAt":{"anyOf":[{"type":"string","examples":["2026-07-01T09:12:44.000Z"]},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","examples":["2026-07-14T16:03:10.000Z"]},{"type":"null"}]}},"required":["id","workspaceId","kind","title","order","archived","accessMode","metadata"],"additionalProperties":false}},"required":["surface","item"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["page","note","dashboard","canvas","view","form"]},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"parentItemId":{"anyOf":[{"type":"string"},{"type":"null"}]},"manifest":{"anyOf":[{"type":"object"},{"type":"null"}]},"initialBlocks":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["paragraph","heading_1","heading_2","heading_3","heading_4","heading_5","heading_6","bulleted_list_item","numbered_list_item","to_do","toggle","quote","callout","code","divider","image","bookmark","embed","file","video","audio","column_list","column","database_view","page_link","table_of_contents","equation","table","synced_page","footnote","metric","insight","activity_feed","button","form_embed","drive_embed"]},"orderKey":{"type":"string"},"manifest":{"anyOf":[{"type":"object"},{"type":"null"}]}},"required":["id","kind","orderKey"],"additionalProperties":false}},{"type":"null"}]},"clientMutationId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["kind"],"additionalProperties":false}}},"required":true}}},"/v1/workspaces/{workspaceId}/surfaces/{surfaceId}":{"get":{"tags":["surfaces"],"operationId":"surfaces.get","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"surfaceId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"kind":{"type":"string","enum":["page","note","dashboard","canvas","view","form"]},"title":{"type":"string"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"manifest":{"type":"object"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"itemId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","kind","title","manifest"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"patch":{"tags":["surfaces"],"operationId":"surfaces.update","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"surfaceId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"kind":{"type":"string","enum":["page","note","dashboard","canvas","view","form"]},"title":{"type":"string"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"manifest":{"type":"object"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"itemId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","kind","title","manifest"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"manifest":{"anyOf":[{"type":"object"},{"type":"null"}]},"clientMutationId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"additionalProperties":false}}},"required":true}},"delete":{"tags":["surfaces"],"operationId":"surfaces.delete","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"surfaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"confirmed","in":"query","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"kind":{"type":"string","enum":["page","note","dashboard","canvas","view","form"]},"title":{"type":"string"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"manifest":{"type":"object"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"itemId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","kind","title","manifest"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/workspaces/{workspaceId}/surfaces/{surfaceId}/deletion-impact":{"get":{"tags":["surfaces"],"operationId":"surfaces.getDeletionImpact","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"surfaceId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"target":{"type":"object","properties":{"kind":{"type":"string","enum":["workspace_item","database","database_view","surface","data_source","action","automation","file"]},"id":{"type":"string"},"label":{"type":"string"}},"required":["kind","id","label"],"additionalProperties":false},"status":{"type":"string","enum":["safe","needs_confirmation","blocked"]},"summary":{"type":"object","properties":{"blockers":{"type":"number"},"warnings":{"type":"number"},"cascades":{"type":"number"}},"required":["blockers","warnings","cascades"],"additionalProperties":false},"entries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["workspace_item","folder_children","database","database_field","database_view","database_record","page_block","canvas_element","surface","data_source","action","automation","file"]},"level":{"type":"string","enum":["blocking","warning","cascade"]},"label":{"type":"string"},"reason":{"type":"string"},"action":{"type":"string"},"remediation":{"anyOf":[{"anyOf":[{"type":"object","properties":{"capability":{"type":"string","enum":["actions.delete"]},"args":{"type":"object","properties":{"actionId":{"type":"string"}},"required":["actionId"],"additionalProperties":false}},"required":["capability","args"],"additionalProperties":false},{"type":"object","properties":{"capability":{"type":"string","enum":["databases.delete"]},"args":{"type":"object","properties":{"databaseId":{"type":"string"}},"required":["databaseId"],"additionalProperties":false}},"required":["capability","args"],"additionalProperties":false},{"type":"object","properties":{"capability":{"type":"string","enum":["database_views.delete"]},"args":{"type":"object","properties":{"databaseId":{"type":"string"},"viewId":{"type":"string"}},"required":["databaseId","viewId"],"additionalProperties":false}},"required":["capability","args"],"additionalProperties":false},{"type":"object","properties":{"capability":{"type":"string","enum":["surfaces.delete"]},"args":{"type":"object","properties":{"surfaceId":{"type":"string"}},"required":["surfaceId"],"additionalProperties":false}},"required":["capability","args"],"additionalProperties":false},{"type":"object","properties":{"capability":{"type":"string","enum":["data_sources.delete"]},"args":{"type":"object","properties":{"dataSourceId":{"type":"string"}},"required":["dataSourceId"],"additionalProperties":false}},"required":["capability","args"],"additionalProperties":false},{"type":"object","properties":{"capability":{"type":"string","enum":["items.delete"]},"args":{"type":"object","properties":{"itemId":{"type":"string"}},"required":["itemId"],"additionalProperties":false}},"required":["capability","args"],"additionalProperties":false}]},{"type":"null"}]},"owner":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"label":{"type":"string"}},"required":["id","kind","label"],"additionalProperties":false},{"type":"null"}]}},"required":["id","kind","level","label","reason","action"],"additionalProperties":false}}},"required":["target","status","summary","entries"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/workspaces/{workspaceId}/surfaces/{surfaceId}/blocks":{"get":{"tags":["surfaces"],"operationId":"surfaces.listBlocks","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"surfaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"cursor","in":"query","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false},{"name":"limit","in":"query","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"surfaceId":{"type":"string"},"workspaceVersion":{"type":"number"},"blocks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"surfaceId":{"type":"string"},"parentBlockId":{"anyOf":[{"type":"string"},{"type":"null"}]},"kind":{"type":"string","enum":["paragraph","heading_1","heading_2","heading_3","heading_4","heading_5","heading_6","bulleted_list_item","numbered_list_item","to_do","toggle","quote","callout","code","divider","image","bookmark","embed","file","video","audio","column_list","column","database_view","page_link","table_of_contents","equation","table","synced_page","footnote","metric","insight","activity_feed","button","form_embed","drive_embed"]},"orderKey":{"type":"string"},"manifest":{"type":"object"},"layout":{"anyOf":[{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"},"w":{"type":"number"},"h":{"type":"number"}},"required":["x","y","w","h"],"additionalProperties":false},{"type":"null"}]},{"type":"null"}]},"plainText":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","surfaceId","kind","orderKey","manifest"],"additionalProperties":false}},"window":{"type":"object","properties":{"cursor":{"anyOf":[{"type":"string"},{"type":"null"}]},"hasMore":{"type":"boolean"}},"required":["hasMore"],"additionalProperties":false}},"required":["surfaceId","workspaceVersion","blocks","window"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/workspaces/{workspaceId}/surfaces/{surfaceId}/blocks/ops":{"post":{"tags":["surfaces"],"operationId":"surfaces.applyBlockOps","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"surfaceId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"workspaceVersion":{"type":"number"},"blocks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"surfaceId":{"type":"string"},"parentBlockId":{"anyOf":[{"type":"string"},{"type":"null"}]},"kind":{"type":"string","enum":["paragraph","heading_1","heading_2","heading_3","heading_4","heading_5","heading_6","bulleted_list_item","numbered_list_item","to_do","toggle","quote","callout","code","divider","image","bookmark","embed","file","video","audio","column_list","column","database_view","page_link","table_of_contents","equation","table","synced_page","footnote","metric","insight","activity_feed","button","form_embed","drive_embed"]},"orderKey":{"type":"string"},"manifest":{"type":"object"},"layout":{"anyOf":[{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"},"w":{"type":"number"},"h":{"type":"number"}},"required":["x","y","w","h"],"additionalProperties":false},{"type":"null"}]},{"type":"null"}]},"plainText":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","surfaceId","kind","orderKey","manifest"],"additionalProperties":false}}},"required":["workspaceVersion","blocks"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"clientMutationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"ops":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["insert"]},"block":{"type":"object","properties":{"id":{"type":"string"},"parentBlockId":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"kind":{"type":"string","enum":["paragraph","heading_1","heading_2","heading_3","heading_4","heading_5","heading_6","bulleted_list_item","numbered_list_item","to_do","toggle","quote","callout","code","divider","image","bookmark","embed","file","video","audio","column_list","column","database_view","page_link","table_of_contents","equation","table","synced_page","footnote","metric","insight","activity_feed","button","form_embed","drive_embed"]},"orderKey":{"type":"string"},"manifest":{"anyOf":[{"type":"object"},{"type":"null"}]},"layout":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"},"w":{"type":"number"},"h":{"type":"number"}},"required":["x","y","w","h"],"additionalProperties":false},{"type":"null"}]}},"required":["id","kind","orderKey"],"additionalProperties":false}},"required":["type","block"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["update"]},"blockId":{"type":"string"},"patch":{"type":"object","properties":{"kind":{"anyOf":[{"type":"string","enum":["paragraph","heading_1","heading_2","heading_3","heading_4","heading_5","heading_6","bulleted_list_item","numbered_list_item","to_do","toggle","quote","callout","code","divider","image","bookmark","embed","file","video","audio","column_list","column","database_view","page_link","table_of_contents","equation","table","synced_page","footnote","metric","insight","activity_feed","button","form_embed","drive_embed"]},{"type":"null"}]},"manifest":{"anyOf":[{"type":"object"},{"type":"null"}]}},"additionalProperties":false}},"required":["type","blockId","patch"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["move"]},"blockId":{"type":"string"},"parentBlockId":{"anyOf":[{"type":"string"},{"type":"null"}]},"orderKey":{"type":"string"}},"required":["type","blockId","parentBlockId","orderKey"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["layout"]},"blockId":{"type":"string"},"layout":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"},"w":{"type":"number"},"h":{"type":"number"}},"required":["x","y","w","h"],"additionalProperties":false}},"required":["type","blockId","layout"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["delete"]},"blockId":{"type":"string"}},"required":["type","blockId"],"additionalProperties":false}]}}},"required":["ops"],"additionalProperties":false}}},"required":true}}},"/v1/workspaces/{workspaceId}/surfaces/{surfaceId}/comments":{"get":{"tags":["surfaces"],"operationId":"surfaces.listComments","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"surfaceId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"surfaceId":{"type":"string"},"blockId":{"type":"string"},"authorUserId":{"type":"string"},"authorDisplayName":{"anyOf":[{"type":"string"},{"type":"null"}]},"authorAvatarUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"body":{"type":"string"},"resolvedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","surfaceId","blockId","authorUserId","body"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/workspaces/{workspaceId}/surfaces/{surfaceId}/blocks/{blockId}/comments":{"post":{"tags":["surfaces"],"operationId":"surfaces.createBlockComment","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"surfaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"blockId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"surfaceId":{"type":"string"},"blockId":{"type":"string"},"authorUserId":{"type":"string"},"authorDisplayName":{"anyOf":[{"type":"string"},{"type":"null"}]},"authorAvatarUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"body":{"type":"string"},"resolvedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","surfaceId","blockId","authorUserId","body"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"anyOf":[{"type":"string","allOf":[{"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|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$","format":"uuid"}]},{"type":"null"}]},"body":{"type":"string"},"clientMutationId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["body"],"additionalProperties":false}}},"required":true}}},"/v1/workspaces/{workspaceId}/surfaces/{surfaceId}/comments/{commentId}/resolve":{"post":{"tags":["surfaces"],"operationId":"surfaces.resolveComment","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"surfaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"commentId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"surfaceId":{"type":"string"},"blockId":{"type":"string"},"authorUserId":{"type":"string"},"authorDisplayName":{"anyOf":[{"type":"string"},{"type":"null"}]},"authorAvatarUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"body":{"type":"string"},"resolvedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","surfaceId","blockId","authorUserId","body"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"resolved":{"type":"boolean"},"clientMutationId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["resolved"],"additionalProperties":false}}},"required":true}}},"/v1/workspaces/{workspaceId}/surfaces/{surfaceId}/comments/{commentId}":{"delete":{"tags":["surfaces"],"operationId":"surfaces.deleteComment","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"surfaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"commentId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/workspaces/{workspaceId}/surfaces/{surfaceId}/canvas/elements":{"get":{"tags":["canvas"],"operationId":"canvas.listElements","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"surfaceId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"surfaceId":{"type":"string"},"workspaceVersion":{"type":"number"},"elements":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"surfaceId":{"type":"string"},"type":{"type":"string","enum":["rectangle","ellipse","diamond","triangle","text","note","line","arrow","freehand","image","frame","group","mindmap","edgeless-text"]},"x":{"type":"number"},"y":{"type":"number"},"w":{"type":"number"},"h":{"type":"number"},"angle":{"type":"number"},"version":{"type":"number"},"versionNonce":{"type":"number"},"index":{"type":"string"},"isDeleted":{"type":"boolean"},"props":{"type":"object"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","surfaceId","type","x","y","w","h","angle","version","versionNonce","index","isDeleted","props"],"additionalProperties":false}}},"required":["surfaceId","workspaceVersion","elements"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/workspaces/{workspaceId}/surfaces/{surfaceId}/canvas/ops":{"post":{"tags":["canvas"],"operationId":"canvas.applyOps","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"surfaceId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"workspaceVersion":{"type":"number"},"elements":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"surfaceId":{"type":"string"},"type":{"type":"string","enum":["rectangle","ellipse","diamond","triangle","text","note","line","arrow","freehand","image","frame","group","mindmap","edgeless-text"]},"x":{"type":"number"},"y":{"type":"number"},"w":{"type":"number"},"h":{"type":"number"},"angle":{"type":"number"},"version":{"type":"number"},"versionNonce":{"type":"number"},"index":{"type":"string"},"isDeleted":{"type":"boolean"},"props":{"type":"object"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","surfaceId","type","x","y","w","h","angle","version","versionNonce","index","isDeleted","props"],"additionalProperties":false}}},"required":["workspaceVersion","elements"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"clientMutationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"ops":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["insert"]},"element":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["rectangle","ellipse","diamond","triangle","text","note","line","arrow","freehand","image","frame","group","mindmap","edgeless-text"]},"index":{"type":"string"},"x":{"anyOf":[{"type":"number"},{"type":"null"}]},"y":{"anyOf":[{"type":"number"},{"type":"null"}]},"w":{"anyOf":[{"type":"number"},{"type":"null"}]},"h":{"anyOf":[{"type":"number"},{"type":"null"}]},"angle":{"anyOf":[{"type":"number"},{"type":"null"}]},"props":{"anyOf":[{"type":"object"},{"type":"null"}]}},"required":["id","type","index"],"additionalProperties":false}},"required":["type","element"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["update"]},"elementId":{"type":"string"},"patch":{"type":"object","properties":{"x":{"anyOf":[{"type":"number"},{"type":"null"}]},"y":{"anyOf":[{"type":"number"},{"type":"null"}]},"w":{"anyOf":[{"type":"number"},{"type":"null"}]},"h":{"anyOf":[{"type":"number"},{"type":"null"}]},"angle":{"anyOf":[{"type":"number"},{"type":"null"}]},"index":{"anyOf":[{"type":"string"},{"type":"null"}]},"type":{"anyOf":[{"type":"string","enum":["rectangle","ellipse","diamond","triangle","text","note","line","arrow","freehand","image","frame","group","mindmap","edgeless-text"]},{"type":"null"}]},"props":{"anyOf":[{"type":"object"},{"type":"null"}]}},"additionalProperties":false}},"required":["type","elementId","patch"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["delete"]},"elementId":{"type":"string"}},"required":["type","elementId"],"additionalProperties":false}]}}},"required":["ops"],"additionalProperties":false}}},"required":true}}},"/v1/workspaces/{workspaceId}/items":{"get":{"tags":["resources"],"operationId":"resources.list","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"includePreview","in":"query","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","examples":["0b6f2e6a-9f2c-4e7a-8d31-2c1e7a9f2c4e"]},"workspaceId":{"type":"string","examples":["4b81aa0c-6d2f-4b19-9f0e-1a7c3d5e8b02"]},"parentItemId":{"anyOf":[{"type":"string","examples":["d3a7f1b8-5c04-4e62-9a11-7b2e6c0d4f39"]},{"type":"null"}]},"kind":{"type":"string","enum":["folder","page","note","dashboard","canvas","view","form","database","file","data_source","action","automation","external_resource"],"examples":["database"]},"targetId":{"anyOf":[{"type":"string","examples":["9f2c1e7a-3b58-4d0c-8e27-6a1f9d4b3c85"]},{"type":"null"}]},"title":{"type":"string","examples":["Launch tasks"]},"icon":{"anyOf":[{"type":"string","examples":["rocket"]},{"type":"null"}]},"color":{"anyOf":[{"type":"string","examples":["#2f6f4f"]},{"type":"null"}]},"order":{"type":"number"},"archived":{"type":"boolean","examples":[false]},"accessMode":{"type":"string","enum":["open","restricted"],"examples":["open"]},"metadata":{"type":"object"},"createdAt":{"anyOf":[{"type":"string","examples":["2026-07-01T09:12:44.000Z"]},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","examples":["2026-07-14T16:03:10.000Z"]},{"type":"null"}]},"preview":{"anyOf":[{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["surface"]},"blocks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"surfaceId":{"type":"string"},"parentBlockId":{"anyOf":[{"type":"string"},{"type":"null"}]},"kind":{"type":"string","enum":["paragraph","heading_1","heading_2","heading_3","heading_4","heading_5","heading_6","bulleted_list_item","numbered_list_item","to_do","toggle","quote","callout","code","divider","image","bookmark","embed","file","video","audio","column_list","column","database_view","page_link","table_of_contents","equation","table","synced_page","footnote","metric","insight","activity_feed","button","form_embed","drive_embed"]},"orderKey":{"type":"string"},"manifest":{"type":"object"},"layout":{"anyOf":[{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"},"w":{"type":"number"},"h":{"type":"number"}},"required":["x","y","w","h"],"additionalProperties":false},{"type":"null"}]},{"type":"null"}]},"plainText":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","surfaceId","kind","orderKey","manifest"],"additionalProperties":false}}},"required":["kind","blocks"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["database"]},"fields":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"databaseId":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"kind":{"type":"string","enum":["text","long_text","number","date","select","multi_select","status","checkbox","url","email","phone","user","file","place","json","created_at","created_by","updated_at","updated_by","unique_id","formula","relation","rollup","time_tracking","button"]},"required":{"type":"boolean"},"options":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}]},"key":{"type":"string"},"name":{"type":"string"},"color":{"type":"string"},"order":{"type":"number"}},"required":["key","name","color","order"],"additionalProperties":false}},{"type":"null"}]},"settings":{"type":"object"},"order":{"type":"number"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","databaseId","key","label","kind","required","settings","order"],"additionalProperties":false}},"records":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","examples":["1d8a44e0-7c93-4f21-b60a-3e8d2f5a9c14"]},"workspaceId":{"type":"string","examples":["4b81aa0c-6d2f-4b19-9f0e-1a7c3d5e8b02"]},"databaseId":{"type":"string","examples":["9f2c1e7a-3b58-4d0c-8e27-6a1f9d4b3c85"]},"contentSurfaceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string","examples":["Ship the desktop app"]},"data":{"type":"object","examples":[{"status":"in_progress","due":"2026-08-01"}]},"relations":{"type":"object"},"computed":{"type":"object"},"system":{"type":"object"},"related":{"anyOf":[{"type":"object"},{"type":"null"}]},"archived":{"type":"boolean","examples":[false]},"createdByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string","examples":["2026-07-10T08:00:00.000Z"]},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","examples":["2026-07-14T11:26:02.000Z"]},{"type":"null"}]}},"required":["id","workspaceId","databaseId","title","data","relations","computed","system","archived"],"additionalProperties":false}}},"required":["kind","fields","records"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["data_source"]},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["idle","syncing","error"]},"lastRunAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"sourceKind":{"type":"string","enum":["http","file","provider"]}},"required":["kind","status","sourceKind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["file"]},"url":{"type":"string"},"mimeType":{"type":"string"}},"required":["kind","url","mimeType"],"additionalProperties":false}]},{"type":"null"}]}},"required":["id","workspaceId","kind","title","order","archived","accessMode","metadata"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"post":{"tags":["resources"],"operationId":"resources.create","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","examples":["0b6f2e6a-9f2c-4e7a-8d31-2c1e7a9f2c4e"]},"workspaceId":{"type":"string","examples":["4b81aa0c-6d2f-4b19-9f0e-1a7c3d5e8b02"]},"parentItemId":{"anyOf":[{"type":"string","examples":["d3a7f1b8-5c04-4e62-9a11-7b2e6c0d4f39"]},{"type":"null"}]},"kind":{"type":"string","enum":["folder","page","note","dashboard","canvas","view","form","database","file","data_source","action","automation","external_resource"],"examples":["database"]},"targetId":{"anyOf":[{"type":"string","examples":["9f2c1e7a-3b58-4d0c-8e27-6a1f9d4b3c85"]},{"type":"null"}]},"title":{"type":"string","examples":["Launch tasks"]},"icon":{"anyOf":[{"type":"string","examples":["rocket"]},{"type":"null"}]},"color":{"anyOf":[{"type":"string","examples":["#2f6f4f"]},{"type":"null"}]},"order":{"type":"number"},"archived":{"type":"boolean","examples":[false]},"accessMode":{"type":"string","enum":["open","restricted"],"examples":["open"]},"metadata":{"type":"object"},"createdAt":{"anyOf":[{"type":"string","examples":["2026-07-01T09:12:44.000Z"]},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","examples":["2026-07-14T16:03:10.000Z"]},{"type":"null"}]}},"required":["id","workspaceId","kind","title","order","archived","accessMode","metadata"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"parentItemId":{"anyOf":[{"type":"string"},{"type":"null"}]},"kind":{"type":"string","enum":["folder","page","note","dashboard","canvas","view","form","database","file","data_source","action","automation","external_resource"]},"targetId":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"order":{"anyOf":[{"type":"number"},{"type":"null"}]},"archived":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"accessMode":{"anyOf":[{"type":"string","enum":["open","restricted"]},{"type":"null"}]},"metadata":{"anyOf":[{"type":"object"},{"type":"null"}]}},"required":["kind","title"],"additionalProperties":false}}},"required":true}}},"/v1/workspaces/{workspaceId}/items/{itemId}":{"patch":{"tags":["resources"],"operationId":"resources.update","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"itemId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","examples":["0b6f2e6a-9f2c-4e7a-8d31-2c1e7a9f2c4e"]},"workspaceId":{"type":"string","examples":["4b81aa0c-6d2f-4b19-9f0e-1a7c3d5e8b02"]},"parentItemId":{"anyOf":[{"type":"string","examples":["d3a7f1b8-5c04-4e62-9a11-7b2e6c0d4f39"]},{"type":"null"}]},"kind":{"type":"string","enum":["folder","page","note","dashboard","canvas","view","form","database","file","data_source","action","automation","external_resource"],"examples":["database"]},"targetId":{"anyOf":[{"type":"string","examples":["9f2c1e7a-3b58-4d0c-8e27-6a1f9d4b3c85"]},{"type":"null"}]},"title":{"type":"string","examples":["Launch tasks"]},"icon":{"anyOf":[{"type":"string","examples":["rocket"]},{"type":"null"}]},"color":{"anyOf":[{"type":"string","examples":["#2f6f4f"]},{"type":"null"}]},"order":{"type":"number"},"archived":{"type":"boolean","examples":[false]},"accessMode":{"type":"string","enum":["open","restricted"],"examples":["open"]},"metadata":{"type":"object"},"createdAt":{"anyOf":[{"type":"string","examples":["2026-07-01T09:12:44.000Z"]},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","examples":["2026-07-14T16:03:10.000Z"]},{"type":"null"}]}},"required":["id","workspaceId","kind","title","order","archived","accessMode","metadata"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"parentItemId":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"color":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"order":{"anyOf":[{"type":"number"},{"type":"null"}]},"archived":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"accessMode":{"anyOf":[{"type":"string","enum":["open","restricted"]},{"type":"null"}]},"metadata":{"anyOf":[{"type":"object"},{"type":"null"}]}},"additionalProperties":false}}},"required":true}},"delete":{"tags":["resources"],"operationId":"resources.delete","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"itemId","in":"path","schema":{"type":"string"},"required":true},{"name":"confirmed","in":"query","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","examples":["0b6f2e6a-9f2c-4e7a-8d31-2c1e7a9f2c4e"]},"workspaceId":{"type":"string","examples":["4b81aa0c-6d2f-4b19-9f0e-1a7c3d5e8b02"]},"parentItemId":{"anyOf":[{"type":"string","examples":["d3a7f1b8-5c04-4e62-9a11-7b2e6c0d4f39"]},{"type":"null"}]},"kind":{"type":"string","enum":["folder","page","note","dashboard","canvas","view","form","database","file","data_source","action","automation","external_resource"],"examples":["database"]},"targetId":{"anyOf":[{"type":"string","examples":["9f2c1e7a-3b58-4d0c-8e27-6a1f9d4b3c85"]},{"type":"null"}]},"title":{"type":"string","examples":["Launch tasks"]},"icon":{"anyOf":[{"type":"string","examples":["rocket"]},{"type":"null"}]},"color":{"anyOf":[{"type":"string","examples":["#2f6f4f"]},{"type":"null"}]},"order":{"type":"number"},"archived":{"type":"boolean","examples":[false]},"accessMode":{"type":"string","enum":["open","restricted"],"examples":["open"]},"metadata":{"type":"object"},"createdAt":{"anyOf":[{"type":"string","examples":["2026-07-01T09:12:44.000Z"]},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","examples":["2026-07-14T16:03:10.000Z"]},{"type":"null"}]}},"required":["id","workspaceId","kind","title","order","archived","accessMode","metadata"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/workspaces/{workspaceId}/items/{itemId}/deletion-impact":{"get":{"tags":["resources"],"operationId":"resources.getDeletionImpact","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"itemId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"target":{"type":"object","properties":{"kind":{"type":"string","enum":["workspace_item","database","database_view","surface","data_source","action","automation","file"]},"id":{"type":"string"},"label":{"type":"string"}},"required":["kind","id","label"],"additionalProperties":false},"status":{"type":"string","enum":["safe","needs_confirmation","blocked"]},"summary":{"type":"object","properties":{"blockers":{"type":"number"},"warnings":{"type":"number"},"cascades":{"type":"number"}},"required":["blockers","warnings","cascades"],"additionalProperties":false},"entries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["workspace_item","folder_children","database","database_field","database_view","database_record","page_block","canvas_element","surface","data_source","action","automation","file"]},"level":{"type":"string","enum":["blocking","warning","cascade"]},"label":{"type":"string"},"reason":{"type":"string"},"action":{"type":"string"},"remediation":{"anyOf":[{"anyOf":[{"type":"object","properties":{"capability":{"type":"string","enum":["actions.delete"]},"args":{"type":"object","properties":{"actionId":{"type":"string"}},"required":["actionId"],"additionalProperties":false}},"required":["capability","args"],"additionalProperties":false},{"type":"object","properties":{"capability":{"type":"string","enum":["databases.delete"]},"args":{"type":"object","properties":{"databaseId":{"type":"string"}},"required":["databaseId"],"additionalProperties":false}},"required":["capability","args"],"additionalProperties":false},{"type":"object","properties":{"capability":{"type":"string","enum":["database_views.delete"]},"args":{"type":"object","properties":{"databaseId":{"type":"string"},"viewId":{"type":"string"}},"required":["databaseId","viewId"],"additionalProperties":false}},"required":["capability","args"],"additionalProperties":false},{"type":"object","properties":{"capability":{"type":"string","enum":["surfaces.delete"]},"args":{"type":"object","properties":{"surfaceId":{"type":"string"}},"required":["surfaceId"],"additionalProperties":false}},"required":["capability","args"],"additionalProperties":false},{"type":"object","properties":{"capability":{"type":"string","enum":["data_sources.delete"]},"args":{"type":"object","properties":{"dataSourceId":{"type":"string"}},"required":["dataSourceId"],"additionalProperties":false}},"required":["capability","args"],"additionalProperties":false},{"type":"object","properties":{"capability":{"type":"string","enum":["items.delete"]},"args":{"type":"object","properties":{"itemId":{"type":"string"}},"required":["itemId"],"additionalProperties":false}},"required":["capability","args"],"additionalProperties":false}]},{"type":"null"}]},"owner":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"label":{"type":"string"}},"required":["id","kind","label"],"additionalProperties":false},{"type":"null"}]}},"required":["id","kind","level","label","reason","action"],"additionalProperties":false}}},"required":["target","status","summary","entries"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/workspaces/{workspaceId}/surfaces/{surfaceId}/publish":{"get":{"tags":["page-publish"],"operationId":"page-publish.getConfig","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"surfaceId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"enabled":{"type":"boolean"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}]},"seoIndexed":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"coverImageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"showIcon":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"theme":{"anyOf":[{"type":"object","properties":{"background":{"anyOf":[{"type":"object","properties":{"type":{"anyOf":[{"type":"string","enum":["none","color","gradient","image"]},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"gradient":{"anyOf":[{"type":"string"},{"type":"null"}]},"gradientFrom":{"anyOf":[{"type":"string"},{"type":"null"}]},"gradientTo":{"anyOf":[{"type":"string"},{"type":"null"}]},"gradientAngle":{"anyOf":[{"type":"number"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"blur":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"accent":{"anyOf":[{"type":"string"},{"type":"null"}]},"radius":{"anyOf":[{"type":"number"},{"type":"null"}]},"pageWidth":{"anyOf":[{"type":"string","enum":["default","full"]},{"type":"null"}]},"colorScheme":{"anyOf":[{"type":"string","enum":["auto","light","dark"]},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"publishedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["enabled"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"put":{"tags":["page-publish"],"operationId":"page-publish.publish","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"surfaceId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"enabled":{"type":"boolean"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}]},"seoIndexed":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"coverImageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"showIcon":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"theme":{"anyOf":[{"type":"object","properties":{"background":{"anyOf":[{"type":"object","properties":{"type":{"anyOf":[{"type":"string","enum":["none","color","gradient","image"]},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"gradient":{"anyOf":[{"type":"string"},{"type":"null"}]},"gradientFrom":{"anyOf":[{"type":"string"},{"type":"null"}]},"gradientTo":{"anyOf":[{"type":"string"},{"type":"null"}]},"gradientAngle":{"anyOf":[{"type":"number"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"blur":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"accent":{"anyOf":[{"type":"string"},{"type":"null"}]},"radius":{"anyOf":[{"type":"number"},{"type":"null"}]},"pageWidth":{"anyOf":[{"type":"string","enum":["default","full"]},{"type":"null"}]},"colorScheme":{"anyOf":[{"type":"string","enum":["auto","light","dark"]},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"publishedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["enabled"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"slug":{"anyOf":[{"type":"string"},{"type":"null"}]},"seoIndexed":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"coverImageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"showIcon":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"theme":{"anyOf":[{"type":"object","properties":{"background":{"anyOf":[{"type":"object","properties":{"type":{"anyOf":[{"type":"string","enum":["none","color","gradient","image"]},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"gradient":{"anyOf":[{"type":"string"},{"type":"null"}]},"gradientFrom":{"anyOf":[{"type":"string"},{"type":"null"}]},"gradientTo":{"anyOf":[{"type":"string"},{"type":"null"}]},"gradientAngle":{"anyOf":[{"type":"number"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"blur":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"accent":{"anyOf":[{"type":"string"},{"type":"null"}]},"radius":{"anyOf":[{"type":"number"},{"type":"null"}]},"pageWidth":{"anyOf":[{"type":"string","enum":["default","full"]},{"type":"null"}]},"colorScheme":{"anyOf":[{"type":"string","enum":["auto","light","dark"]},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]}},"additionalProperties":false}}},"required":true}},"delete":{"tags":["page-publish"],"operationId":"page-publish.unpublish","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"surfaceId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"surfaceId":{"type":"string"}},"required":["surfaceId"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/workspaces/{workspaceId}/surfaces/{surfaceId}/embed-data":{"get":{"tags":["page-publish"],"operationId":"page-publish.getEmbedData","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"surfaceId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"databaseData":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"databaseId":{"type":"string"},"detail":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"itemId":{"anyOf":[{"type":"string"},{"type":"null"}]},"parentItemId":{"anyOf":[{"type":"string"},{"type":"null"}]},"key":{"type":"string"},"label":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"order":{"anyOf":[{"type":"number"},{"type":"null"}]},"settings":{"type":"object"},"recordLayout":{"anyOf":[{"type":"object","properties":{"version":{"type":"number","enum":[1]},"pageWidth":{"type":"string","enum":["default","wide","full"]},"propertyColumns":{"type":"number","enum":[1,2]},"propertyDensity":{"type":"string","enum":["comfortable","compact"]},"propertyOrder":{"type":"array","items":{"type":"string"}},"hiddenFieldKeys":{"type":"array","items":{"type":"string"}},"sections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"fieldKeys":{"type":"array","items":{"type":"string"}}},"required":["id","label","fieldKeys"],"additionalProperties":false}},"contentPosition":{"type":"string","enum":["before_properties","after_properties"]},"showComments":{"type":"boolean"},"showActivity":{"type":"boolean"}},"required":["version","pageWidth","propertyColumns","propertyDensity","propertyOrder","hiddenFieldKeys","sections","contentPosition","showComments","showActivity"],"additionalProperties":false},{"type":"null"}]},"archived":{"type":"boolean"},"fields":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"databaseId":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"kind":{"type":"string","enum":["text","long_text","number","date","select","multi_select","status","checkbox","url","email","phone","user","file","place","json","created_at","created_by","updated_at","updated_by","unique_id","formula","relation","rollup","time_tracking","button"]},"required":{"type":"boolean"},"options":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}]},"key":{"type":"string"},"name":{"type":"string"},"color":{"type":"string"},"order":{"type":"number"}},"required":["key","name","color","order"],"additionalProperties":false}},{"type":"null"}]},"settings":{"type":"object"},"order":{"type":"number"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","databaseId","key","label","kind","required","settings","order"],"additionalProperties":false}},"views":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"databaseId":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"kind":{"type":"string","enum":["table","list","board","kanban","gallery","calendar","timeline","gantt","chart"]},"manifest":{"type":"object"},"ownerUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"scope":{"anyOf":[{"type":"string","enum":["shared","personal"]},{"type":"null"}]},"locked":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"definitionVersion":{"anyOf":[{"type":"number"},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","databaseId","key","label","kind","manifest"],"additionalProperties":false}},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","key","label","settings","archived","fields","views"],"additionalProperties":false},"records":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","examples":["1d8a44e0-7c93-4f21-b60a-3e8d2f5a9c14"]},"workspaceId":{"type":"string","examples":["4b81aa0c-6d2f-4b19-9f0e-1a7c3d5e8b02"]},"databaseId":{"type":"string","examples":["9f2c1e7a-3b58-4d0c-8e27-6a1f9d4b3c85"]},"contentSurfaceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string","examples":["Ship the desktop app"]},"data":{"type":"object","examples":[{"status":"in_progress","due":"2026-08-01"}]},"relations":{"type":"object"},"computed":{"type":"object"},"system":{"type":"object"},"related":{"anyOf":[{"type":"object"},{"type":"null"}]},"archived":{"type":"boolean","examples":[false]},"createdByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string","examples":["2026-07-10T08:00:00.000Z"]},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","examples":["2026-07-14T11:26:02.000Z"]},{"type":"null"}]}},"required":["id","workspaceId","databaseId","title","data","relations","computed","system","archived"],"additionalProperties":false}}},"required":["databaseId","detail","records"],"additionalProperties":false}},{"type":"null"}]},"events":{"anyOf":[{"type":"object"},{"type":"null"}]},"linkedItems":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","examples":["0b6f2e6a-9f2c-4e7a-8d31-2c1e7a9f2c4e"]},"workspaceId":{"type":"string","examples":["4b81aa0c-6d2f-4b19-9f0e-1a7c3d5e8b02"]},"parentItemId":{"anyOf":[{"type":"string","examples":["d3a7f1b8-5c04-4e62-9a11-7b2e6c0d4f39"]},{"type":"null"}]},"kind":{"type":"string","enum":["folder","page","note","dashboard","canvas","view","form","database","file","data_source","action","automation","external_resource"],"examples":["database"]},"targetId":{"anyOf":[{"type":"string","examples":["9f2c1e7a-3b58-4d0c-8e27-6a1f9d4b3c85"]},{"type":"null"}]},"title":{"type":"string","examples":["Launch tasks"]},"icon":{"anyOf":[{"type":"string","examples":["rocket"]},{"type":"null"}]},"color":{"anyOf":[{"type":"string","examples":["#2f6f4f"]},{"type":"null"}]},"order":{"type":"number"},"archived":{"type":"boolean","examples":[false]},"accessMode":{"type":"string","enum":["open","restricted"],"examples":["open"]},"metadata":{"type":"object"},"createdAt":{"anyOf":[{"type":"string","examples":["2026-07-01T09:12:44.000Z"]},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","examples":["2026-07-14T16:03:10.000Z"]},{"type":"null"}]}},"required":["id","workspaceId","kind","title","order","archived","accessMode","metadata"],"additionalProperties":false}},{"type":"null"}]},"linkedSurfaceBlocks":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"surfaceId":{"type":"string"},"state":{"type":"object"}},"required":["surfaceId","state"],"additionalProperties":false}},{"type":"null"}]},"surfaceDetails":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"surfaceId":{"type":"string"},"detail":{"type":"object"}},"required":["surfaceId","detail"],"additionalProperties":false}},{"type":"null"}]},"aggregates":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"databaseId":{"type":"string"},"fn":{"type":"string"},"fieldKey":{"type":"string"},"viewId":{"type":"string"},"value":{"type":"number"},"count":{"type":"number"}},"required":["databaseId","fn","fieldKey","viewId","value","count"],"additionalProperties":false}},{"type":"null"}]},"members":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"userId":{"type":"string"},"clerkUserId":{"type":"string"},"role":{"type":"string","enum":["owner","admin","builder","member","viewer"]},"primaryEmail":{"anyOf":[{"type":"string"},{"type":"null"}]},"displayName":{"anyOf":[{"type":"string"},{"type":"null"}]},"avatarUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","userId","clerkUserId","role"],"additionalProperties":false}},{"type":"null"}]}},"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/public/pages/{slug}":{"get":{"tags":["public-pages"],"operationId":"public-pages.getPublished","parameters":[{"name":"slug","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["published_page"]},"meta":{"type":"object","properties":{"title":{"type":"string"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"coverImageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"showIcon":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"workspaceName":{"anyOf":[{"type":"string"},{"type":"null"}]},"seoIndexed":{"type":"boolean"}},"required":["title","seoIndexed"],"additionalProperties":false},"workspaceId":{"type":"string"},"surfaceId":{"type":"string"},"surfaceKind":{"type":"string"},"manifest":{"type":"object"},"theme":{"anyOf":[{"type":"object","properties":{"background":{"anyOf":[{"type":"object","properties":{"type":{"anyOf":[{"type":"string","enum":["none","color","gradient","image"]},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"gradient":{"anyOf":[{"type":"string"},{"type":"null"}]},"gradientFrom":{"anyOf":[{"type":"string"},{"type":"null"}]},"gradientTo":{"anyOf":[{"type":"string"},{"type":"null"}]},"gradientAngle":{"anyOf":[{"type":"number"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"blur":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"accent":{"anyOf":[{"type":"string"},{"type":"null"}]},"radius":{"anyOf":[{"type":"number"},{"type":"null"}]},"pageWidth":{"anyOf":[{"type":"string","enum":["default","full"]},{"type":"null"}]},"colorScheme":{"anyOf":[{"type":"string","enum":["auto","light","dark"]},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"blocks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"surfaceId":{"type":"string"},"parentBlockId":{"anyOf":[{"type":"string"},{"type":"null"}]},"kind":{"type":"string","enum":["paragraph","heading_1","heading_2","heading_3","heading_4","heading_5","heading_6","bulleted_list_item","numbered_list_item","to_do","toggle","quote","callout","code","divider","image","bookmark","embed","file","video","audio","column_list","column","database_view","page_link","table_of_contents","equation","table","synced_page","footnote","metric","insight","activity_feed","button","form_embed","drive_embed"]},"orderKey":{"type":"string"},"manifest":{"type":"object"},"layout":{"anyOf":[{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"},"w":{"type":"number"},"h":{"type":"number"}},"required":["x","y","w","h"],"additionalProperties":false},{"type":"null"}]},{"type":"null"}]},"plainText":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","surfaceId","kind","orderKey","manifest"],"additionalProperties":false}},"hasMore":{"type":"boolean"},"canvasElements":{"anyOf":[{"type":"array","items":{"type":"object"}},{"type":"null"}]},"databaseData":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"databaseId":{"type":"string"},"detail":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"itemId":{"anyOf":[{"type":"string"},{"type":"null"}]},"parentItemId":{"anyOf":[{"type":"string"},{"type":"null"}]},"key":{"type":"string"},"label":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"order":{"anyOf":[{"type":"number"},{"type":"null"}]},"settings":{"type":"object"},"recordLayout":{"anyOf":[{"type":"object","properties":{"version":{"type":"number","enum":[1]},"pageWidth":{"type":"string","enum":["default","wide","full"]},"propertyColumns":{"type":"number","enum":[1,2]},"propertyDensity":{"type":"string","enum":["comfortable","compact"]},"propertyOrder":{"type":"array","items":{"type":"string"}},"hiddenFieldKeys":{"type":"array","items":{"type":"string"}},"sections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"fieldKeys":{"type":"array","items":{"type":"string"}}},"required":["id","label","fieldKeys"],"additionalProperties":false}},"contentPosition":{"type":"string","enum":["before_properties","after_properties"]},"showComments":{"type":"boolean"},"showActivity":{"type":"boolean"}},"required":["version","pageWidth","propertyColumns","propertyDensity","propertyOrder","hiddenFieldKeys","sections","contentPosition","showComments","showActivity"],"additionalProperties":false},{"type":"null"}]},"archived":{"type":"boolean"},"fields":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"databaseId":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"kind":{"type":"string","enum":["text","long_text","number","date","select","multi_select","status","checkbox","url","email","phone","user","file","place","json","created_at","created_by","updated_at","updated_by","unique_id","formula","relation","rollup","time_tracking","button"]},"required":{"type":"boolean"},"options":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}]},"key":{"type":"string"},"name":{"type":"string"},"color":{"type":"string"},"order":{"type":"number"}},"required":["key","name","color","order"],"additionalProperties":false}},{"type":"null"}]},"settings":{"type":"object"},"order":{"type":"number"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","databaseId","key","label","kind","required","settings","order"],"additionalProperties":false}},"views":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"databaseId":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"kind":{"type":"string","enum":["table","list","board","kanban","gallery","calendar","timeline","gantt","chart"]},"manifest":{"type":"object"},"ownerUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"scope":{"anyOf":[{"type":"string","enum":["shared","personal"]},{"type":"null"}]},"locked":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"definitionVersion":{"anyOf":[{"type":"number"},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","databaseId","key","label","kind","manifest"],"additionalProperties":false}},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","key","label","settings","archived","fields","views"],"additionalProperties":false},"records":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","examples":["1d8a44e0-7c93-4f21-b60a-3e8d2f5a9c14"]},"workspaceId":{"type":"string","examples":["4b81aa0c-6d2f-4b19-9f0e-1a7c3d5e8b02"]},"databaseId":{"type":"string","examples":["9f2c1e7a-3b58-4d0c-8e27-6a1f9d4b3c85"]},"contentSurfaceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string","examples":["Ship the desktop app"]},"data":{"type":"object","examples":[{"status":"in_progress","due":"2026-08-01"}]},"relations":{"type":"object"},"computed":{"type":"object"},"system":{"type":"object"},"related":{"anyOf":[{"type":"object"},{"type":"null"}]},"archived":{"type":"boolean","examples":[false]},"createdByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string","examples":["2026-07-10T08:00:00.000Z"]},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","examples":["2026-07-14T11:26:02.000Z"]},{"type":"null"}]}},"required":["id","workspaceId","databaseId","title","data","relations","computed","system","archived"],"additionalProperties":false}}},"required":["databaseId","detail","records"],"additionalProperties":false}},{"type":"null"}]},"events":{"anyOf":[{"type":"object"},{"type":"null"}]},"linkedItems":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","examples":["0b6f2e6a-9f2c-4e7a-8d31-2c1e7a9f2c4e"]},"workspaceId":{"type":"string","examples":["4b81aa0c-6d2f-4b19-9f0e-1a7c3d5e8b02"]},"parentItemId":{"anyOf":[{"type":"string","examples":["d3a7f1b8-5c04-4e62-9a11-7b2e6c0d4f39"]},{"type":"null"}]},"kind":{"type":"string","enum":["folder","page","note","dashboard","canvas","view","form","database","file","data_source","action","automation","external_resource"],"examples":["database"]},"targetId":{"anyOf":[{"type":"string","examples":["9f2c1e7a-3b58-4d0c-8e27-6a1f9d4b3c85"]},{"type":"null"}]},"title":{"type":"string","examples":["Launch tasks"]},"icon":{"anyOf":[{"type":"string","examples":["rocket"]},{"type":"null"}]},"color":{"anyOf":[{"type":"string","examples":["#2f6f4f"]},{"type":"null"}]},"order":{"type":"number"},"archived":{"type":"boolean","examples":[false]},"accessMode":{"type":"string","enum":["open","restricted"],"examples":["open"]},"metadata":{"type":"object"},"createdAt":{"anyOf":[{"type":"string","examples":["2026-07-01T09:12:44.000Z"]},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","examples":["2026-07-14T16:03:10.000Z"]},{"type":"null"}]}},"required":["id","workspaceId","kind","title","order","archived","accessMode","metadata"],"additionalProperties":false}},{"type":"null"}]},"linkedSurfaceBlocks":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"surfaceId":{"type":"string"},"state":{"type":"object"}},"required":["surfaceId","state"],"additionalProperties":false}},{"type":"null"}]},"surfaceDetails":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"surfaceId":{"type":"string"},"detail":{"type":"object"}},"required":["surfaceId","detail"],"additionalProperties":false}},{"type":"null"}]},"aggregates":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"databaseId":{"type":"string"},"fn":{"type":"string"},"fieldKey":{"type":"string"},"viewId":{"type":"string"},"value":{"type":"number"},"count":{"type":"number"}},"required":["databaseId","fn","fieldKey","viewId","value","count"],"additionalProperties":false}},{"type":"null"}]},"members":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"userId":{"type":"string"},"clerkUserId":{"type":"string"},"role":{"type":"string","enum":["owner","admin","builder","member","viewer"]},"primaryEmail":{"anyOf":[{"type":"string"},{"type":"null"}]},"displayName":{"anyOf":[{"type":"string"},{"type":"null"}]},"avatarUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","userId","clerkUserId","role"],"additionalProperties":false}},{"type":"null"}]}},"required":["type","meta","workspaceId","surfaceId","surfaceKind","manifest","blocks","hasMore"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/workspaces/{workspaceId}/data-sources":{"get":{"tags":["data-sources"],"operationId":"data-sources.list","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"itemId":{"anyOf":[{"type":"string"},{"type":"null"}]},"key":{"type":"string"},"label":{"type":"string"},"kind":{"type":"string","enum":["http","file","provider"]},"enabled":{"type":"boolean"},"status":{"type":"string","enum":["idle","syncing","error"]},"config":{"type":"object","properties":{"http":{"anyOf":[{"type":"object","properties":{"url":{"type":"string"},"method":{"anyOf":[{"type":"string","enum":["GET","POST"]},{"type":"null"}]},"headers":{"anyOf":[{"type":"object","additionalProperties":{"type":"string"}},{"type":"null"}]},"query":{"anyOf":[{"type":"object","additionalProperties":{"type":"string"}},{"type":"null"}]},"body":{"anyOf":[{"type":"string"},{"type":"null"}]},"rowsPath":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["url"],"additionalProperties":false},{"type":"null"}]},"file":{"anyOf":[{"type":"object","properties":{"fileId":{"type":"string"},"format":{"type":"string","enum":["csv"]},"delimiter":{"anyOf":[{"type":"string"},{"type":"null"}]},"hasHeader":{"anyOf":[{"type":"boolean"},{"type":"null"}]}},"required":["fileId","format"],"additionalProperties":false},{"type":"null"}]},"provider":{"anyOf":[{"type":"object","properties":{"connectionId":{"type":"string"},"externalType":{"type":"string"},"parentExternalId":{"anyOf":[{"type":"string"},{"type":"null"}]},"query":{"anyOf":[{"type":"string"},{"type":"null"}]},"selector":{"anyOf":[{"type":"object"},{"type":"null"}]}},"required":["connectionId","externalType"],"additionalProperties":false},{"type":"null"}]},"externalIdPath":{"anyOf":[{"type":"string"},{"type":"null"}]},"titleFieldKey":{"anyOf":[{"type":"string"},{"type":"null"}]},"syncMode":{"anyOf":[{"type":"string","enum":["mirror","append"]},{"type":"null"}]},"fields":{"type":"array","items":{"type":"object","properties":{"sourcePath":{"type":"string"},"fieldKey":{"type":"string"},"label":{"type":"string"},"kind":{"type":"string","enum":["text","long_text","number","date","checkbox","url","email","phone","select","multi_select","json"]}},"required":["sourcePath","fieldKey","label","kind"],"additionalProperties":false}}},"required":["fields"],"additionalProperties":false},"connectionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"targetDatabaseId":{"anyOf":[{"type":"string"},{"type":"null"}]},"refreshIntervalMinutes":{"anyOf":[{"type":"number"},{"type":"null"}]},"nextRunAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastRunAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"consecutiveFailures":{"type":"number"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","key","label","kind","enabled","status","config","consecutiveFailures"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"post":{"tags":["data-sources"],"operationId":"data-sources.create","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"itemId":{"anyOf":[{"type":"string"},{"type":"null"}]},"key":{"type":"string"},"label":{"type":"string"},"kind":{"type":"string","enum":["http","file","provider"]},"enabled":{"type":"boolean"},"status":{"type":"string","enum":["idle","syncing","error"]},"config":{"type":"object","properties":{"http":{"anyOf":[{"type":"object","properties":{"url":{"type":"string"},"method":{"anyOf":[{"type":"string","enum":["GET","POST"]},{"type":"null"}]},"headers":{"anyOf":[{"type":"object","additionalProperties":{"type":"string"}},{"type":"null"}]},"query":{"anyOf":[{"type":"object","additionalProperties":{"type":"string"}},{"type":"null"}]},"body":{"anyOf":[{"type":"string"},{"type":"null"}]},"rowsPath":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["url"],"additionalProperties":false},{"type":"null"}]},"file":{"anyOf":[{"type":"object","properties":{"fileId":{"type":"string"},"format":{"type":"string","enum":["csv"]},"delimiter":{"anyOf":[{"type":"string"},{"type":"null"}]},"hasHeader":{"anyOf":[{"type":"boolean"},{"type":"null"}]}},"required":["fileId","format"],"additionalProperties":false},{"type":"null"}]},"provider":{"anyOf":[{"type":"object","properties":{"connectionId":{"type":"string"},"externalType":{"type":"string"},"parentExternalId":{"anyOf":[{"type":"string"},{"type":"null"}]},"query":{"anyOf":[{"type":"string"},{"type":"null"}]},"selector":{"anyOf":[{"type":"object"},{"type":"null"}]}},"required":["connectionId","externalType"],"additionalProperties":false},{"type":"null"}]},"externalIdPath":{"anyOf":[{"type":"string"},{"type":"null"}]},"titleFieldKey":{"anyOf":[{"type":"string"},{"type":"null"}]},"syncMode":{"anyOf":[{"type":"string","enum":["mirror","append"]},{"type":"null"}]},"fields":{"type":"array","items":{"type":"object","properties":{"sourcePath":{"type":"string"},"fieldKey":{"type":"string"},"label":{"type":"string"},"kind":{"type":"string","enum":["text","long_text","number","date","checkbox","url","email","phone","select","multi_select","json"]}},"required":["sourcePath","fieldKey","label","kind"],"additionalProperties":false}}},"required":["fields"],"additionalProperties":false},"connectionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"targetDatabaseId":{"anyOf":[{"type":"string"},{"type":"null"}]},"refreshIntervalMinutes":{"anyOf":[{"type":"number"},{"type":"null"}]},"nextRunAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastRunAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"consecutiveFailures":{"type":"number"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","key","label","kind","enabled","status","config","consecutiveFailures"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"parentItemId":{"anyOf":[{"type":"string"},{"type":"null"}]},"key":{"anyOf":[{"type":"string"},{"type":"null"}]},"label":{"type":"string"},"kind":{"type":"string","enum":["http","file","provider"]},"config":{"type":"object","properties":{"http":{"anyOf":[{"type":"object","properties":{"url":{"type":"string"},"method":{"anyOf":[{"type":"string","enum":["GET","POST"]},{"type":"null"}]},"headers":{"anyOf":[{"type":"object","additionalProperties":{"type":"string"}},{"type":"null"}]},"query":{"anyOf":[{"type":"object","additionalProperties":{"type":"string"}},{"type":"null"}]},"body":{"anyOf":[{"type":"string"},{"type":"null"}]},"rowsPath":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["url"],"additionalProperties":false},{"type":"null"}]},"file":{"anyOf":[{"type":"object","properties":{"fileId":{"type":"string"},"format":{"type":"string","enum":["csv"]},"delimiter":{"anyOf":[{"type":"string"},{"type":"null"}]},"hasHeader":{"anyOf":[{"type":"boolean"},{"type":"null"}]}},"required":["fileId","format"],"additionalProperties":false},{"type":"null"}]},"provider":{"anyOf":[{"type":"object","properties":{"connectionId":{"type":"string"},"externalType":{"type":"string"},"parentExternalId":{"anyOf":[{"type":"string"},{"type":"null"}]},"query":{"anyOf":[{"type":"string"},{"type":"null"}]},"selector":{"anyOf":[{"type":"object"},{"type":"null"}]}},"required":["connectionId","externalType"],"additionalProperties":false},{"type":"null"}]},"externalIdPath":{"anyOf":[{"type":"string"},{"type":"null"}]},"titleFieldKey":{"anyOf":[{"type":"string"},{"type":"null"}]},"syncMode":{"anyOf":[{"type":"string","enum":["mirror","append"]},{"type":"null"}]},"fields":{"type":"array","items":{"type":"object","properties":{"sourcePath":{"type":"string"},"fieldKey":{"type":"string"},"label":{"type":"string"},"kind":{"type":"string","enum":["text","long_text","number","date","checkbox","url","email","phone","select","multi_select","json"]}},"required":["sourcePath","fieldKey","label","kind"],"additionalProperties":false}}},"required":["fields"],"additionalProperties":false},"connectionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"refreshIntervalMinutes":{"anyOf":[{"type":"number"},{"type":"null"}]},"runNow":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"clientMutationId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["label","kind","config"],"additionalProperties":false}}},"required":true}}},"/v1/workspaces/{workspaceId}/data-sources/preview":{"post":{"tags":["data-sources"],"operationId":"data-sources.preview","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object"}},"columns":{"type":"array","items":{"type":"object","properties":{"sourcePath":{"type":"string"},"suggestedLabel":{"type":"string"},"suggestedKind":{"type":"string","enum":["text","long_text","number","date","checkbox","url","email","phone","select","multi_select","json"]},"samples":{"type":"array"}},"required":["sourcePath","suggestedLabel","suggestedKind","samples"],"additionalProperties":false}},"totalRowsSampled":{"type":"number"},"rowsPathUsed":{"anyOf":[{"type":"string"},{"type":"null"}]},"warning":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["rows","columns","totalRowsSampled"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["http","file","provider"]},"http":{"anyOf":[{"type":"object","properties":{"url":{"type":"string"},"method":{"anyOf":[{"type":"string","enum":["GET","POST"]},{"type":"null"}]},"headers":{"anyOf":[{"type":"object","additionalProperties":{"type":"string"}},{"type":"null"}]},"query":{"anyOf":[{"type":"object","additionalProperties":{"type":"string"}},{"type":"null"}]},"body":{"anyOf":[{"type":"string"},{"type":"null"}]},"rowsPath":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["url"],"additionalProperties":false},{"type":"null"}]},"file":{"anyOf":[{"type":"object","properties":{"fileId":{"type":"string"},"format":{"type":"string","enum":["csv"]},"delimiter":{"anyOf":[{"type":"string"},{"type":"null"}]},"hasHeader":{"anyOf":[{"type":"boolean"},{"type":"null"}]}},"required":["fileId","format"],"additionalProperties":false},{"type":"null"}]},"provider":{"anyOf":[{"type":"object","properties":{"connectionId":{"type":"string"},"externalType":{"type":"string"},"parentExternalId":{"anyOf":[{"type":"string"},{"type":"null"}]},"query":{"anyOf":[{"type":"string"},{"type":"null"}]},"selector":{"anyOf":[{"type":"object"},{"type":"null"}]}},"required":["connectionId","externalType"],"additionalProperties":false},{"type":"null"}]},"connectionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"limit":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["kind"],"additionalProperties":false}}},"required":true}}},"/v1/workspaces/{workspaceId}/data-sources/{dataSourceId}":{"get":{"tags":["data-sources"],"operationId":"data-sources.get","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"dataSourceId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"itemId":{"anyOf":[{"type":"string"},{"type":"null"}]},"key":{"type":"string"},"label":{"type":"string"},"kind":{"type":"string","enum":["http","file","provider"]},"enabled":{"type":"boolean"},"status":{"type":"string","enum":["idle","syncing","error"]},"config":{"type":"object","properties":{"http":{"anyOf":[{"type":"object","properties":{"url":{"type":"string"},"method":{"anyOf":[{"type":"string","enum":["GET","POST"]},{"type":"null"}]},"headers":{"anyOf":[{"type":"object","additionalProperties":{"type":"string"}},{"type":"null"}]},"query":{"anyOf":[{"type":"object","additionalProperties":{"type":"string"}},{"type":"null"}]},"body":{"anyOf":[{"type":"string"},{"type":"null"}]},"rowsPath":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["url"],"additionalProperties":false},{"type":"null"}]},"file":{"anyOf":[{"type":"object","properties":{"fileId":{"type":"string"},"format":{"type":"string","enum":["csv"]},"delimiter":{"anyOf":[{"type":"string"},{"type":"null"}]},"hasHeader":{"anyOf":[{"type":"boolean"},{"type":"null"}]}},"required":["fileId","format"],"additionalProperties":false},{"type":"null"}]},"provider":{"anyOf":[{"type":"object","properties":{"connectionId":{"type":"string"},"externalType":{"type":"string"},"parentExternalId":{"anyOf":[{"type":"string"},{"type":"null"}]},"query":{"anyOf":[{"type":"string"},{"type":"null"}]},"selector":{"anyOf":[{"type":"object"},{"type":"null"}]}},"required":["connectionId","externalType"],"additionalProperties":false},{"type":"null"}]},"externalIdPath":{"anyOf":[{"type":"string"},{"type":"null"}]},"titleFieldKey":{"anyOf":[{"type":"string"},{"type":"null"}]},"syncMode":{"anyOf":[{"type":"string","enum":["mirror","append"]},{"type":"null"}]},"fields":{"type":"array","items":{"type":"object","properties":{"sourcePath":{"type":"string"},"fieldKey":{"type":"string"},"label":{"type":"string"},"kind":{"type":"string","enum":["text","long_text","number","date","checkbox","url","email","phone","select","multi_select","json"]}},"required":["sourcePath","fieldKey","label","kind"],"additionalProperties":false}}},"required":["fields"],"additionalProperties":false},"connectionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"targetDatabaseId":{"anyOf":[{"type":"string"},{"type":"null"}]},"refreshIntervalMinutes":{"anyOf":[{"type":"number"},{"type":"null"}]},"nextRunAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastRunAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"consecutiveFailures":{"type":"number"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","key","label","kind","enabled","status","config","consecutiveFailures"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"patch":{"tags":["data-sources"],"operationId":"data-sources.update","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"dataSourceId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"itemId":{"anyOf":[{"type":"string"},{"type":"null"}]},"key":{"type":"string"},"label":{"type":"string"},"kind":{"type":"string","enum":["http","file","provider"]},"enabled":{"type":"boolean"},"status":{"type":"string","enum":["idle","syncing","error"]},"config":{"type":"object","properties":{"http":{"anyOf":[{"type":"object","properties":{"url":{"type":"string"},"method":{"anyOf":[{"type":"string","enum":["GET","POST"]},{"type":"null"}]},"headers":{"anyOf":[{"type":"object","additionalProperties":{"type":"string"}},{"type":"null"}]},"query":{"anyOf":[{"type":"object","additionalProperties":{"type":"string"}},{"type":"null"}]},"body":{"anyOf":[{"type":"string"},{"type":"null"}]},"rowsPath":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["url"],"additionalProperties":false},{"type":"null"}]},"file":{"anyOf":[{"type":"object","properties":{"fileId":{"type":"string"},"format":{"type":"string","enum":["csv"]},"delimiter":{"anyOf":[{"type":"string"},{"type":"null"}]},"hasHeader":{"anyOf":[{"type":"boolean"},{"type":"null"}]}},"required":["fileId","format"],"additionalProperties":false},{"type":"null"}]},"provider":{"anyOf":[{"type":"object","properties":{"connectionId":{"type":"string"},"externalType":{"type":"string"},"parentExternalId":{"anyOf":[{"type":"string"},{"type":"null"}]},"query":{"anyOf":[{"type":"string"},{"type":"null"}]},"selector":{"anyOf":[{"type":"object"},{"type":"null"}]}},"required":["connectionId","externalType"],"additionalProperties":false},{"type":"null"}]},"externalIdPath":{"anyOf":[{"type":"string"},{"type":"null"}]},"titleFieldKey":{"anyOf":[{"type":"string"},{"type":"null"}]},"syncMode":{"anyOf":[{"type":"string","enum":["mirror","append"]},{"type":"null"}]},"fields":{"type":"array","items":{"type":"object","properties":{"sourcePath":{"type":"string"},"fieldKey":{"type":"string"},"label":{"type":"string"},"kind":{"type":"string","enum":["text","long_text","number","date","checkbox","url","email","phone","select","multi_select","json"]}},"required":["sourcePath","fieldKey","label","kind"],"additionalProperties":false}}},"required":["fields"],"additionalProperties":false},"connectionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"targetDatabaseId":{"anyOf":[{"type":"string"},{"type":"null"}]},"refreshIntervalMinutes":{"anyOf":[{"type":"number"},{"type":"null"}]},"nextRunAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastRunAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"consecutiveFailures":{"type":"number"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","key","label","kind","enabled","status","config","consecutiveFailures"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"config":{"anyOf":[{"type":"object","properties":{"http":{"anyOf":[{"type":"object","properties":{"url":{"type":"string"},"method":{"anyOf":[{"type":"string","enum":["GET","POST"]},{"type":"null"}]},"headers":{"anyOf":[{"type":"object","additionalProperties":{"type":"string"}},{"type":"null"}]},"query":{"anyOf":[{"type":"object","additionalProperties":{"type":"string"}},{"type":"null"}]},"body":{"anyOf":[{"type":"string"},{"type":"null"}]},"rowsPath":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["url"],"additionalProperties":false},{"type":"null"}]},"file":{"anyOf":[{"type":"object","properties":{"fileId":{"type":"string"},"format":{"type":"string","enum":["csv"]},"delimiter":{"anyOf":[{"type":"string"},{"type":"null"}]},"hasHeader":{"anyOf":[{"type":"boolean"},{"type":"null"}]}},"required":["fileId","format"],"additionalProperties":false},{"type":"null"}]},"provider":{"anyOf":[{"type":"object","properties":{"connectionId":{"type":"string"},"externalType":{"type":"string"},"parentExternalId":{"anyOf":[{"type":"string"},{"type":"null"}]},"query":{"anyOf":[{"type":"string"},{"type":"null"}]},"selector":{"anyOf":[{"type":"object"},{"type":"null"}]}},"required":["connectionId","externalType"],"additionalProperties":false},{"type":"null"}]},"externalIdPath":{"anyOf":[{"type":"string"},{"type":"null"}]},"titleFieldKey":{"anyOf":[{"type":"string"},{"type":"null"}]},"syncMode":{"anyOf":[{"type":"string","enum":["mirror","append"]},{"type":"null"}]},"fields":{"type":"array","items":{"type":"object","properties":{"sourcePath":{"type":"string"},"fieldKey":{"type":"string"},"label":{"type":"string"},"kind":{"type":"string","enum":["text","long_text","number","date","checkbox","url","email","phone","select","multi_select","json"]}},"required":["sourcePath","fieldKey","label","kind"],"additionalProperties":false}}},"required":["fields"],"additionalProperties":false},{"type":"null"}]},"connectionId":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"refreshIntervalMinutes":{"anyOf":[{"anyOf":[{"type":"number"},{"type":"null"}]},{"type":"null"}]},"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"clientMutationId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"additionalProperties":false}}},"required":true}},"delete":{"tags":["data-sources"],"operationId":"data-sources.delete","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"dataSourceId","in":"path","schema":{"type":"string"},"required":true},{"name":"confirmed","in":"query","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/workspaces/{workspaceId}/data-sources/{dataSourceId}/deletion-impact":{"get":{"tags":["data-sources"],"operationId":"data-sources.deletionImpact","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"dataSourceId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"target":{"type":"object","properties":{"kind":{"type":"string","enum":["workspace_item","database","database_view","surface","data_source","action","automation","file"]},"id":{"type":"string"},"label":{"type":"string"}},"required":["kind","id","label"],"additionalProperties":false},"status":{"type":"string","enum":["safe","needs_confirmation","blocked"]},"summary":{"type":"object","properties":{"blockers":{"type":"number"},"warnings":{"type":"number"},"cascades":{"type":"number"}},"required":["blockers","warnings","cascades"],"additionalProperties":false},"entries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["workspace_item","folder_children","database","database_field","database_view","database_record","page_block","canvas_element","surface","data_source","action","automation","file"]},"level":{"type":"string","enum":["blocking","warning","cascade"]},"label":{"type":"string"},"reason":{"type":"string"},"action":{"type":"string"},"remediation":{"anyOf":[{"anyOf":[{"type":"object","properties":{"capability":{"type":"string","enum":["actions.delete"]},"args":{"type":"object","properties":{"actionId":{"type":"string"}},"required":["actionId"],"additionalProperties":false}},"required":["capability","args"],"additionalProperties":false},{"type":"object","properties":{"capability":{"type":"string","enum":["databases.delete"]},"args":{"type":"object","properties":{"databaseId":{"type":"string"}},"required":["databaseId"],"additionalProperties":false}},"required":["capability","args"],"additionalProperties":false},{"type":"object","properties":{"capability":{"type":"string","enum":["database_views.delete"]},"args":{"type":"object","properties":{"databaseId":{"type":"string"},"viewId":{"type":"string"}},"required":["databaseId","viewId"],"additionalProperties":false}},"required":["capability","args"],"additionalProperties":false},{"type":"object","properties":{"capability":{"type":"string","enum":["surfaces.delete"]},"args":{"type":"object","properties":{"surfaceId":{"type":"string"}},"required":["surfaceId"],"additionalProperties":false}},"required":["capability","args"],"additionalProperties":false},{"type":"object","properties":{"capability":{"type":"string","enum":["data_sources.delete"]},"args":{"type":"object","properties":{"dataSourceId":{"type":"string"}},"required":["dataSourceId"],"additionalProperties":false}},"required":["capability","args"],"additionalProperties":false},{"type":"object","properties":{"capability":{"type":"string","enum":["items.delete"]},"args":{"type":"object","properties":{"itemId":{"type":"string"}},"required":["itemId"],"additionalProperties":false}},"required":["capability","args"],"additionalProperties":false}]},{"type":"null"}]},"owner":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"label":{"type":"string"}},"required":["id","kind","label"],"additionalProperties":false},{"type":"null"}]}},"required":["id","kind","level","label","reason","action"],"additionalProperties":false}}},"required":["target","status","summary","entries"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/workspaces/{workspaceId}/data-sources/{dataSourceId}/refresh":{"post":{"tags":["data-sources"],"operationId":"data-sources.refresh","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"dataSourceId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"dataSourceId":{"type":"string"},"status":{"type":"string","enum":["running","succeeded","failed"]},"trigger":{"type":"string","enum":["manual","schedule"]},"actorUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"stats":{"type":"object","properties":{"rowsFetched":{"anyOf":[{"type":"number"},{"type":"null"}]},"rowsInserted":{"anyOf":[{"type":"number"},{"type":"null"}]},"rowsUpdated":{"anyOf":[{"type":"number"},{"type":"null"}]},"rowsUnchanged":{"anyOf":[{"type":"number"},{"type":"null"}]},"rowsRemoved":{"anyOf":[{"type":"number"},{"type":"null"}]},"rowsSkipped":{"anyOf":[{"type":"number"},{"type":"null"}]},"bytesFetched":{"anyOf":[{"type":"number"},{"type":"null"}]},"durationMs":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"errorKind":{"anyOf":[{"type":"string","enum":["fetch","decode","schema_drift","rate_limited","internal"]},{"type":"null"}]},"startedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"completedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","dataSourceId","status","trigger","stats"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/workspaces/{workspaceId}/data-sources/{dataSourceId}/runs":{"get":{"tags":["data-sources"],"operationId":"data-sources.listRuns","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"dataSourceId","in":"path","schema":{"type":"string"},"required":true},{"name":"limit","in":"query","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"dataSourceId":{"type":"string"},"status":{"type":"string","enum":["running","succeeded","failed"]},"trigger":{"type":"string","enum":["manual","schedule"]},"actorUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"stats":{"type":"object","properties":{"rowsFetched":{"anyOf":[{"type":"number"},{"type":"null"}]},"rowsInserted":{"anyOf":[{"type":"number"},{"type":"null"}]},"rowsUpdated":{"anyOf":[{"type":"number"},{"type":"null"}]},"rowsUnchanged":{"anyOf":[{"type":"number"},{"type":"null"}]},"rowsRemoved":{"anyOf":[{"type":"number"},{"type":"null"}]},"rowsSkipped":{"anyOf":[{"type":"number"},{"type":"null"}]},"bytesFetched":{"anyOf":[{"type":"number"},{"type":"null"}]},"durationMs":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"errorKind":{"anyOf":[{"type":"string","enum":["fetch","decode","schema_drift","rate_limited","internal"]},{"type":"null"}]},"startedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"completedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","dataSourceId","status","trigger","stats"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/workspaces/{workspaceId}/connections":{"get":{"tags":["connections"],"operationId":"connections.list","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"kind":{"type":"string","enum":["http"]},"secretHint":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","key","label","kind"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"post":{"tags":["connections"],"operationId":"connections.create","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"kind":{"type":"string","enum":["http"]},"secretHint":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","key","label","kind"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"key":{"anyOf":[{"type":"string"},{"type":"null"}]},"label":{"type":"string"},"kind":{"type":"string","enum":["http"]},"secret":{"type":"object","properties":{"headers":{"anyOf":[{"type":"object","additionalProperties":{"type":"string"}},{"type":"null"}]},"query":{"anyOf":[{"type":"object","additionalProperties":{"type":"string"}},{"type":"null"}]}},"additionalProperties":false}},"required":["label","kind","secret"],"additionalProperties":false}}},"required":true}}},"/v1/workspaces/{workspaceId}/connections/{connectionId}":{"delete":{"tags":["connections"],"operationId":"connections.delete","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"connectionId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/workspaces/{workspaceId}/model-sources":{"get":{"tags":["model-sources"],"operationId":"model-sources.list","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"kind":{"anyOf":[{"type":"string","enum":["openrouter"]}]},"label":{"type":"string"},"enabled":{"type":"boolean"},"selectedModelIds":{"type":"array","items":{"type":"string"}},"keyHint":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","kind","label","enabled","selectedModelIds"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"post":{"tags":["model-sources"],"operationId":"model-sources.create","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"kind":{"anyOf":[{"type":"string","enum":["openrouter"]}]},"label":{"type":"string"},"enabled":{"type":"boolean"},"selectedModelIds":{"type":"array","items":{"type":"string"}},"keyHint":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","kind","label","enabled","selectedModelIds"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"anyOf":[{"type":"string","enum":["openrouter"]}]},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"key":{"type":"object","properties":{"apiKey":{"type":"string"}},"required":["apiKey"],"additionalProperties":false},"selectedModelIds":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]}},"required":["kind","key"],"additionalProperties":false}}},"required":true}}},"/v1/workspaces/{workspaceId}/model-sources/validate-key":{"post":{"tags":["model-sources"],"operationId":"model-sources.validateKey","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"valid":{"type":"boolean"},"models":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"contextLength":{"anyOf":[{"type":"number"},{"type":"null"}]},"pricing":{"anyOf":[{"type":"object","properties":{"prompt":{"anyOf":[{"type":"string"},{"type":"null"}]},"completion":{"anyOf":[{"type":"string"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]}},"required":["id","label"],"additionalProperties":false}}},"required":["valid","models"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"anyOf":[{"type":"string","enum":["openrouter"]}]},"key":{"type":"object","properties":{"apiKey":{"type":"string"}},"required":["apiKey"],"additionalProperties":false}},"required":["kind","key"],"additionalProperties":false}}},"required":true}}},"/v1/workspaces/{workspaceId}/model-sources/{modelSourceId}":{"patch":{"tags":["model-sources"],"operationId":"model-sources.update","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"modelSourceId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"kind":{"anyOf":[{"type":"string","enum":["openrouter"]}]},"label":{"type":"string"},"enabled":{"type":"boolean"},"selectedModelIds":{"type":"array","items":{"type":"string"}},"keyHint":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","kind","label","enabled","selectedModelIds"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"selectedModelIds":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"key":{"anyOf":[{"type":"object","properties":{"apiKey":{"type":"string"}},"required":["apiKey"],"additionalProperties":false},{"type":"null"}]}},"additionalProperties":false}}},"required":true}},"delete":{"tags":["model-sources"],"operationId":"model-sources.delete","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"modelSourceId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/workspaces/{workspaceId}/model-sources/{modelSourceId}/models":{"get":{"tags":["model-sources"],"operationId":"model-sources.listModels","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"modelSourceId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"models":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"contextLength":{"anyOf":[{"type":"number"},{"type":"null"}]},"pricing":{"anyOf":[{"type":"object","properties":{"prompt":{"anyOf":[{"type":"string"},{"type":"null"}]},"completion":{"anyOf":[{"type":"string"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]}},"required":["id","label"],"additionalProperties":false}}},"required":["models"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/workspaces/{workspaceId}/link-preview":{"get":{"tags":["link-preview"],"operationId":"link-preview.get","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"url","in":"query","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"url":{"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"siteName":{"anyOf":[{"type":"string"},{"type":"null"}]},"iconUrl":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["url"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/me/time-entry":{"get":{"tags":["time-tracking"],"operationId":"time-tracking.activeEntry","parameters":[],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"anyOf":[{"type":"object","properties":{"entry":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"userId":{"type":"string"},"userDisplayName":{"anyOf":[{"type":"string"},{"type":"null"}]},"targetKind":{"type":"string","enum":["database_record"]},"targetId":{"type":"string"},"targetTitleSnapshot":{"type":"string"},"databaseId":{"anyOf":[{"type":"string"},{"type":"null"}]},"fieldId":{"anyOf":[{"type":"string"},{"type":"null"}]},"fieldLabelSnapshot":{"anyOf":[{"type":"string"},{"type":"null"}]},"source":{"type":"string","enum":["timer","manual","imported"]},"mode":{"type":"string","enum":["stopwatch","pomodoro","manual"]},"status":{"type":"string","enum":["active","paused","completed","abandoned"]},"startedAt":{"type":"string"},"endedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"pausedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"accumulatedPausedMs":{"type":"number"},"durationMs":{"anyOf":[{"type":"number"},{"type":"null"}]},"targetDurationMs":{"anyOf":[{"type":"number"},{"type":"null"}]},"dueAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"summary":{"anyOf":[{"type":"string"},{"type":"null"}]},"soundId":{"anyOf":[{"type":"string","enum":["none","soft_chime","digital_ping","focus_bell","custom"]},{"type":"null"}]},"completedBy":{"anyOf":[{"type":"string","enum":["user","deadline","import"]},{"type":"null"}]},"clientMutationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByUserId":{"type":"string"},"updatedByUserId":{"type":"string"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","userId","targetKind","targetId","targetTitleSnapshot","source","mode","status","startedAt","accumulatedPausedMs","createdByUserId","updatedByUserId"],"additionalProperties":false},"serverTime":{"type":"string"},"authoritativeElapsedMs":{"type":"number"}},"required":["entry","serverTime","authoritativeElapsedMs"],"additionalProperties":false},{"type":"null"}]}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/workspaces/{workspaceId}/time-entries/start":{"post":{"tags":["time-tracking"],"operationId":"time-tracking.start","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"entry":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"userId":{"type":"string"},"userDisplayName":{"anyOf":[{"type":"string"},{"type":"null"}]},"targetKind":{"type":"string","enum":["database_record"]},"targetId":{"type":"string"},"targetTitleSnapshot":{"type":"string"},"databaseId":{"anyOf":[{"type":"string"},{"type":"null"}]},"fieldId":{"anyOf":[{"type":"string"},{"type":"null"}]},"fieldLabelSnapshot":{"anyOf":[{"type":"string"},{"type":"null"}]},"source":{"type":"string","enum":["timer","manual","imported"]},"mode":{"type":"string","enum":["stopwatch","pomodoro","manual"]},"status":{"type":"string","enum":["active","paused","completed","abandoned"]},"startedAt":{"type":"string"},"endedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"pausedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"accumulatedPausedMs":{"type":"number"},"durationMs":{"anyOf":[{"type":"number"},{"type":"null"}]},"targetDurationMs":{"anyOf":[{"type":"number"},{"type":"null"}]},"dueAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"summary":{"anyOf":[{"type":"string"},{"type":"null"}]},"soundId":{"anyOf":[{"type":"string","enum":["none","soft_chime","digital_ping","focus_bell","custom"]},{"type":"null"}]},"completedBy":{"anyOf":[{"type":"string","enum":["user","deadline","import"]},{"type":"null"}]},"clientMutationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByUserId":{"type":"string"},"updatedByUserId":{"type":"string"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","userId","targetKind","targetId","targetTitleSnapshot","source","mode","status","startedAt","accumulatedPausedMs","createdByUserId","updatedByUserId"],"additionalProperties":false},"serverTime":{"type":"string"},"authoritativeElapsedMs":{"type":"number"}},"required":["entry","serverTime","authoritativeElapsedMs"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"target":{"type":"object","properties":{"kind":{"type":"string","enum":["database_record"]},"targetId":{"type":"string"},"databaseId":{"type":"string"},"fieldId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["kind","targetId","databaseId"],"additionalProperties":false},"mode":{"anyOf":[{"type":"string","enum":["stopwatch","pomodoro"]},{"type":"null"}]},"durationMinutes":{"anyOf":[{"type":"number"},{"type":"null"}]},"soundId":{"anyOf":[{"type":"string","enum":["none","soft_chime","digital_ping","focus_bell","custom"]},{"type":"null"}]},"summary":{"anyOf":[{"type":"string"},{"type":"null"}]},"clientMutationId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["target"],"additionalProperties":false}}},"required":true}}},"/v1/workspaces/{workspaceId}/time-entries/manual":{"post":{"tags":["time-tracking"],"operationId":"time-tracking.manual","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"entry":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"userId":{"type":"string"},"userDisplayName":{"anyOf":[{"type":"string"},{"type":"null"}]},"targetKind":{"type":"string","enum":["database_record"]},"targetId":{"type":"string"},"targetTitleSnapshot":{"type":"string"},"databaseId":{"anyOf":[{"type":"string"},{"type":"null"}]},"fieldId":{"anyOf":[{"type":"string"},{"type":"null"}]},"fieldLabelSnapshot":{"anyOf":[{"type":"string"},{"type":"null"}]},"source":{"type":"string","enum":["timer","manual","imported"]},"mode":{"type":"string","enum":["stopwatch","pomodoro","manual"]},"status":{"type":"string","enum":["active","paused","completed","abandoned"]},"startedAt":{"type":"string"},"endedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"pausedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"accumulatedPausedMs":{"type":"number"},"durationMs":{"anyOf":[{"type":"number"},{"type":"null"}]},"targetDurationMs":{"anyOf":[{"type":"number"},{"type":"null"}]},"dueAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"summary":{"anyOf":[{"type":"string"},{"type":"null"}]},"soundId":{"anyOf":[{"type":"string","enum":["none","soft_chime","digital_ping","focus_bell","custom"]},{"type":"null"}]},"completedBy":{"anyOf":[{"type":"string","enum":["user","deadline","import"]},{"type":"null"}]},"clientMutationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByUserId":{"type":"string"},"updatedByUserId":{"type":"string"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","userId","targetKind","targetId","targetTitleSnapshot","source","mode","status","startedAt","accumulatedPausedMs","createdByUserId","updatedByUserId"],"additionalProperties":false},"serverTime":{"type":"string"},"authoritativeElapsedMs":{"type":"number"}},"required":["entry","serverTime","authoritativeElapsedMs"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"target":{"type":"object","properties":{"kind":{"type":"string","enum":["database_record"]},"targetId":{"type":"string"},"databaseId":{"type":"string"},"fieldId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["kind","targetId","databaseId"],"additionalProperties":false},"userId":{"anyOf":[{"type":"string"},{"type":"null"}]},"startedAt":{"type":"string"},"endedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"durationMs":{"anyOf":[{"type":"number"},{"type":"null"}]},"summary":{"anyOf":[{"type":"string"},{"type":"null"}]},"reason":{"anyOf":[{"type":"string"},{"type":"null"}]},"clientMutationId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["target","startedAt"],"additionalProperties":false}}},"required":true}}},"/v1/workspaces/{workspaceId}/time-entries":{"get":{"tags":["time-tracking"],"operationId":"time-tracking.list","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"from","in":"query","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false},{"name":"to","in":"query","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false},{"name":"memberId","in":"query","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false},{"name":"targetId","in":"query","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false},{"name":"databaseId","in":"query","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false},{"name":"fieldId","in":"query","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false},{"name":"source","in":"query","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false},{"name":"status","in":"query","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false},{"name":"cursor","in":"query","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false},{"name":"limit","in":"query","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"entries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"userId":{"type":"string"},"userDisplayName":{"anyOf":[{"type":"string"},{"type":"null"}]},"targetKind":{"type":"string","enum":["database_record"]},"targetId":{"type":"string"},"targetTitleSnapshot":{"type":"string"},"databaseId":{"anyOf":[{"type":"string"},{"type":"null"}]},"fieldId":{"anyOf":[{"type":"string"},{"type":"null"}]},"fieldLabelSnapshot":{"anyOf":[{"type":"string"},{"type":"null"}]},"source":{"type":"string","enum":["timer","manual","imported"]},"mode":{"type":"string","enum":["stopwatch","pomodoro","manual"]},"status":{"type":"string","enum":["active","paused","completed","abandoned"]},"startedAt":{"type":"string"},"endedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"pausedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"accumulatedPausedMs":{"type":"number"},"durationMs":{"anyOf":[{"type":"number"},{"type":"null"}]},"targetDurationMs":{"anyOf":[{"type":"number"},{"type":"null"}]},"dueAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"summary":{"anyOf":[{"type":"string"},{"type":"null"}]},"soundId":{"anyOf":[{"type":"string","enum":["none","soft_chime","digital_ping","focus_bell","custom"]},{"type":"null"}]},"completedBy":{"anyOf":[{"type":"string","enum":["user","deadline","import"]},{"type":"null"}]},"clientMutationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByUserId":{"type":"string"},"updatedByUserId":{"type":"string"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","userId","targetKind","targetId","targetTitleSnapshot","source","mode","status","startedAt","accumulatedPausedMs","createdByUserId","updatedByUserId"],"additionalProperties":false}},"cursor":{"anyOf":[{"type":"string"},{"type":"null"}]},"hasMore":{"type":"boolean"}},"required":["entries","hasMore"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/workspaces/{workspaceId}/time-entries/timesheet":{"get":{"tags":["time-tracking"],"operationId":"time-tracking.timesheet","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"from","in":"query","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false},{"name":"to","in":"query","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false},{"name":"memberId","in":"query","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false},{"name":"targetId","in":"query","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false},{"name":"databaseId","in":"query","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false},{"name":"fieldId","in":"query","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false},{"name":"source","in":"query","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false},{"name":"status","in":"query","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false},{"name":"cursor","in":"query","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false},{"name":"limit","in":"query","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"entries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"userId":{"type":"string"},"userDisplayName":{"anyOf":[{"type":"string"},{"type":"null"}]},"targetKind":{"type":"string","enum":["database_record"]},"targetId":{"type":"string"},"targetTitleSnapshot":{"type":"string"},"databaseId":{"anyOf":[{"type":"string"},{"type":"null"}]},"fieldId":{"anyOf":[{"type":"string"},{"type":"null"}]},"fieldLabelSnapshot":{"anyOf":[{"type":"string"},{"type":"null"}]},"source":{"type":"string","enum":["timer","manual","imported"]},"mode":{"type":"string","enum":["stopwatch","pomodoro","manual"]},"status":{"type":"string","enum":["active","paused","completed","abandoned"]},"startedAt":{"type":"string"},"endedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"pausedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"accumulatedPausedMs":{"type":"number"},"durationMs":{"anyOf":[{"type":"number"},{"type":"null"}]},"targetDurationMs":{"anyOf":[{"type":"number"},{"type":"null"}]},"dueAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"summary":{"anyOf":[{"type":"string"},{"type":"null"}]},"soundId":{"anyOf":[{"type":"string","enum":["none","soft_chime","digital_ping","focus_bell","custom"]},{"type":"null"}]},"completedBy":{"anyOf":[{"type":"string","enum":["user","deadline","import"]},{"type":"null"}]},"clientMutationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByUserId":{"type":"string"},"updatedByUserId":{"type":"string"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","userId","targetKind","targetId","targetTitleSnapshot","source","mode","status","startedAt","accumulatedPausedMs","createdByUserId","updatedByUserId"],"additionalProperties":false}},"cursor":{"anyOf":[{"type":"string"},{"type":"null"}]},"hasMore":{"type":"boolean"},"totalDurationMs":{"type":"number"},"entryCount":{"type":"number"},"byMember":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"},"userDisplayName":{"anyOf":[{"type":"string"},{"type":"null"}]},"durationMs":{"type":"number"},"entryCount":{"type":"number"}},"required":["userId","durationMs","entryCount"],"additionalProperties":false}},"byTarget":{"type":"array","items":{"type":"object","properties":{"targetKind":{"type":"string","enum":["database_record"]},"targetId":{"type":"string"},"targetTitle":{"type":"string"},"durationMs":{"type":"number"},"entryCount":{"type":"number"}},"required":["targetKind","targetId","targetTitle","durationMs","entryCount"],"additionalProperties":false}}},"required":["entries","hasMore","totalDurationMs","entryCount","byMember","byTarget"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/workspaces/{workspaceId}/time-entries/{entryId}":{"get":{"tags":["time-tracking"],"operationId":"time-tracking.get","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"entryId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"userId":{"type":"string"},"userDisplayName":{"anyOf":[{"type":"string"},{"type":"null"}]},"targetKind":{"type":"string","enum":["database_record"]},"targetId":{"type":"string"},"targetTitleSnapshot":{"type":"string"},"databaseId":{"anyOf":[{"type":"string"},{"type":"null"}]},"fieldId":{"anyOf":[{"type":"string"},{"type":"null"}]},"fieldLabelSnapshot":{"anyOf":[{"type":"string"},{"type":"null"}]},"source":{"type":"string","enum":["timer","manual","imported"]},"mode":{"type":"string","enum":["stopwatch","pomodoro","manual"]},"status":{"type":"string","enum":["active","paused","completed","abandoned"]},"startedAt":{"type":"string"},"endedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"pausedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"accumulatedPausedMs":{"type":"number"},"durationMs":{"anyOf":[{"type":"number"},{"type":"null"}]},"targetDurationMs":{"anyOf":[{"type":"number"},{"type":"null"}]},"dueAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"summary":{"anyOf":[{"type":"string"},{"type":"null"}]},"soundId":{"anyOf":[{"type":"string","enum":["none","soft_chime","digital_ping","focus_bell","custom"]},{"type":"null"}]},"completedBy":{"anyOf":[{"type":"string","enum":["user","deadline","import"]},{"type":"null"}]},"clientMutationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByUserId":{"type":"string"},"updatedByUserId":{"type":"string"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","userId","targetKind","targetId","targetTitleSnapshot","source","mode","status","startedAt","accumulatedPausedMs","createdByUserId","updatedByUserId"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"patch":{"tags":["time-tracking"],"operationId":"time-tracking.update","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"entryId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"entry":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"userId":{"type":"string"},"userDisplayName":{"anyOf":[{"type":"string"},{"type":"null"}]},"targetKind":{"type":"string","enum":["database_record"]},"targetId":{"type":"string"},"targetTitleSnapshot":{"type":"string"},"databaseId":{"anyOf":[{"type":"string"},{"type":"null"}]},"fieldId":{"anyOf":[{"type":"string"},{"type":"null"}]},"fieldLabelSnapshot":{"anyOf":[{"type":"string"},{"type":"null"}]},"source":{"type":"string","enum":["timer","manual","imported"]},"mode":{"type":"string","enum":["stopwatch","pomodoro","manual"]},"status":{"type":"string","enum":["active","paused","completed","abandoned"]},"startedAt":{"type":"string"},"endedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"pausedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"accumulatedPausedMs":{"type":"number"},"durationMs":{"anyOf":[{"type":"number"},{"type":"null"}]},"targetDurationMs":{"anyOf":[{"type":"number"},{"type":"null"}]},"dueAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"summary":{"anyOf":[{"type":"string"},{"type":"null"}]},"soundId":{"anyOf":[{"type":"string","enum":["none","soft_chime","digital_ping","focus_bell","custom"]},{"type":"null"}]},"completedBy":{"anyOf":[{"type":"string","enum":["user","deadline","import"]},{"type":"null"}]},"clientMutationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByUserId":{"type":"string"},"updatedByUserId":{"type":"string"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","userId","targetKind","targetId","targetTitleSnapshot","source","mode","status","startedAt","accumulatedPausedMs","createdByUserId","updatedByUserId"],"additionalProperties":false},"serverTime":{"type":"string"},"authoritativeElapsedMs":{"type":"number"}},"required":["entry","serverTime","authoritativeElapsedMs"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"target":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["database_record"]},"targetId":{"type":"string"},"databaseId":{"type":"string"},"fieldId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["kind","targetId","databaseId"],"additionalProperties":false},{"type":"null"}]},"userId":{"anyOf":[{"type":"string"},{"type":"null"}]},"startedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"endedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"durationMs":{"anyOf":[{"type":"number"},{"type":"null"}]},"summary":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"reason":{"anyOf":[{"type":"string"},{"type":"null"}]}},"additionalProperties":false}}},"required":true}},"delete":{"tags":["time-tracking"],"operationId":"time-tracking.delete","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"entryId","in":"path","schema":{"type":"string"},"required":true},{"name":"reason","in":"query","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/workspaces/{workspaceId}/time-entries/{entryId}/pause":{"post":{"tags":["time-tracking"],"operationId":"time-tracking.pause","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"entryId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"entry":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"userId":{"type":"string"},"userDisplayName":{"anyOf":[{"type":"string"},{"type":"null"}]},"targetKind":{"type":"string","enum":["database_record"]},"targetId":{"type":"string"},"targetTitleSnapshot":{"type":"string"},"databaseId":{"anyOf":[{"type":"string"},{"type":"null"}]},"fieldId":{"anyOf":[{"type":"string"},{"type":"null"}]},"fieldLabelSnapshot":{"anyOf":[{"type":"string"},{"type":"null"}]},"source":{"type":"string","enum":["timer","manual","imported"]},"mode":{"type":"string","enum":["stopwatch","pomodoro","manual"]},"status":{"type":"string","enum":["active","paused","completed","abandoned"]},"startedAt":{"type":"string"},"endedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"pausedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"accumulatedPausedMs":{"type":"number"},"durationMs":{"anyOf":[{"type":"number"},{"type":"null"}]},"targetDurationMs":{"anyOf":[{"type":"number"},{"type":"null"}]},"dueAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"summary":{"anyOf":[{"type":"string"},{"type":"null"}]},"soundId":{"anyOf":[{"type":"string","enum":["none","soft_chime","digital_ping","focus_bell","custom"]},{"type":"null"}]},"completedBy":{"anyOf":[{"type":"string","enum":["user","deadline","import"]},{"type":"null"}]},"clientMutationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByUserId":{"type":"string"},"updatedByUserId":{"type":"string"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","userId","targetKind","targetId","targetTitleSnapshot","source","mode","status","startedAt","accumulatedPausedMs","createdByUserId","updatedByUserId"],"additionalProperties":false},"serverTime":{"type":"string"},"authoritativeElapsedMs":{"type":"number"}},"required":["entry","serverTime","authoritativeElapsedMs"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"clientMutationId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"additionalProperties":false}}},"required":true}}},"/v1/workspaces/{workspaceId}/time-entries/{entryId}/resume":{"post":{"tags":["time-tracking"],"operationId":"time-tracking.resume","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"entryId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"entry":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"userId":{"type":"string"},"userDisplayName":{"anyOf":[{"type":"string"},{"type":"null"}]},"targetKind":{"type":"string","enum":["database_record"]},"targetId":{"type":"string"},"targetTitleSnapshot":{"type":"string"},"databaseId":{"anyOf":[{"type":"string"},{"type":"null"}]},"fieldId":{"anyOf":[{"type":"string"},{"type":"null"}]},"fieldLabelSnapshot":{"anyOf":[{"type":"string"},{"type":"null"}]},"source":{"type":"string","enum":["timer","manual","imported"]},"mode":{"type":"string","enum":["stopwatch","pomodoro","manual"]},"status":{"type":"string","enum":["active","paused","completed","abandoned"]},"startedAt":{"type":"string"},"endedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"pausedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"accumulatedPausedMs":{"type":"number"},"durationMs":{"anyOf":[{"type":"number"},{"type":"null"}]},"targetDurationMs":{"anyOf":[{"type":"number"},{"type":"null"}]},"dueAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"summary":{"anyOf":[{"type":"string"},{"type":"null"}]},"soundId":{"anyOf":[{"type":"string","enum":["none","soft_chime","digital_ping","focus_bell","custom"]},{"type":"null"}]},"completedBy":{"anyOf":[{"type":"string","enum":["user","deadline","import"]},{"type":"null"}]},"clientMutationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByUserId":{"type":"string"},"updatedByUserId":{"type":"string"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","userId","targetKind","targetId","targetTitleSnapshot","source","mode","status","startedAt","accumulatedPausedMs","createdByUserId","updatedByUserId"],"additionalProperties":false},"serverTime":{"type":"string"},"authoritativeElapsedMs":{"type":"number"}},"required":["entry","serverTime","authoritativeElapsedMs"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"clientMutationId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"additionalProperties":false}}},"required":true}}},"/v1/workspaces/{workspaceId}/time-entries/{entryId}/stop":{"post":{"tags":["time-tracking"],"operationId":"time-tracking.stop","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"entryId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"entry":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"userId":{"type":"string"},"userDisplayName":{"anyOf":[{"type":"string"},{"type":"null"}]},"targetKind":{"type":"string","enum":["database_record"]},"targetId":{"type":"string"},"targetTitleSnapshot":{"type":"string"},"databaseId":{"anyOf":[{"type":"string"},{"type":"null"}]},"fieldId":{"anyOf":[{"type":"string"},{"type":"null"}]},"fieldLabelSnapshot":{"anyOf":[{"type":"string"},{"type":"null"}]},"source":{"type":"string","enum":["timer","manual","imported"]},"mode":{"type":"string","enum":["stopwatch","pomodoro","manual"]},"status":{"type":"string","enum":["active","paused","completed","abandoned"]},"startedAt":{"type":"string"},"endedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"pausedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"accumulatedPausedMs":{"type":"number"},"durationMs":{"anyOf":[{"type":"number"},{"type":"null"}]},"targetDurationMs":{"anyOf":[{"type":"number"},{"type":"null"}]},"dueAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"summary":{"anyOf":[{"type":"string"},{"type":"null"}]},"soundId":{"anyOf":[{"type":"string","enum":["none","soft_chime","digital_ping","focus_bell","custom"]},{"type":"null"}]},"completedBy":{"anyOf":[{"type":"string","enum":["user","deadline","import"]},{"type":"null"}]},"clientMutationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByUserId":{"type":"string"},"updatedByUserId":{"type":"string"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","userId","targetKind","targetId","targetTitleSnapshot","source","mode","status","startedAt","accumulatedPausedMs","createdByUserId","updatedByUserId"],"additionalProperties":false},"serverTime":{"type":"string"},"authoritativeElapsedMs":{"type":"number"}},"required":["entry","serverTime","authoritativeElapsedMs"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"clientMutationId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"additionalProperties":false}}},"required":true}}},"/v1/workspaces/{workspaceId}/time-entries/{entryId}/abandon":{"post":{"tags":["time-tracking"],"operationId":"time-tracking.abandon","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"entryId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"entry":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"userId":{"type":"string"},"userDisplayName":{"anyOf":[{"type":"string"},{"type":"null"}]},"targetKind":{"type":"string","enum":["database_record"]},"targetId":{"type":"string"},"targetTitleSnapshot":{"type":"string"},"databaseId":{"anyOf":[{"type":"string"},{"type":"null"}]},"fieldId":{"anyOf":[{"type":"string"},{"type":"null"}]},"fieldLabelSnapshot":{"anyOf":[{"type":"string"},{"type":"null"}]},"source":{"type":"string","enum":["timer","manual","imported"]},"mode":{"type":"string","enum":["stopwatch","pomodoro","manual"]},"status":{"type":"string","enum":["active","paused","completed","abandoned"]},"startedAt":{"type":"string"},"endedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"pausedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"accumulatedPausedMs":{"type":"number"},"durationMs":{"anyOf":[{"type":"number"},{"type":"null"}]},"targetDurationMs":{"anyOf":[{"type":"number"},{"type":"null"}]},"dueAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"summary":{"anyOf":[{"type":"string"},{"type":"null"}]},"soundId":{"anyOf":[{"type":"string","enum":["none","soft_chime","digital_ping","focus_bell","custom"]},{"type":"null"}]},"completedBy":{"anyOf":[{"type":"string","enum":["user","deadline","import"]},{"type":"null"}]},"clientMutationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByUserId":{"type":"string"},"updatedByUserId":{"type":"string"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","userId","targetKind","targetId","targetTitleSnapshot","source","mode","status","startedAt","accumulatedPausedMs","createdByUserId","updatedByUserId"],"additionalProperties":false},"serverTime":{"type":"string"},"authoritativeElapsedMs":{"type":"number"}},"required":["entry","serverTime","authoritativeElapsedMs"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"clientMutationId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"additionalProperties":false}}},"required":true}}},"/v1/workspaces/{workspaceId}/tools":{"get":{"tags":["tools"],"operationId":"tools.list","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"stake":{"type":"string","enum":["never_ask","low","medium","high"]},"permission":{"anyOf":[{"type":"string"},{"type":"null"}]},"audiences":{"type":"array","items":{"type":"string","enum":["agent","mcp","api"]}},"availability":{"type":"string","enum":["core","discoverable"]},"annotations":{"type":"object","properties":{"readOnly":{"type":"boolean"},"destructive":{"type":"boolean"},"idempotent":{"type":"boolean"},"openWorld":{"type":"boolean"}},"required":["readOnly","destructive","idempotent","openWorld"],"additionalProperties":false},"inputSchema":{"anyOf":[{"type":"object"},{"type":"null"}]}},"required":["name","description","stake","audiences","availability","annotations"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/workspaces/{workspaceId}/tools/invoke":{"post":{"tags":["tools"],"operationId":"tools.invoke","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"workspaceId":{"type":"string"},"status":{"type":"string","enum":["completed","failed","blocked","input_required"]},"stake":{"type":"string","enum":["never_ask","low","medium","high"]},"output":{"anyOf":[{"type":"object"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"errorDetails":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"toolName":{"anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"type":"boolean"},"repairHint":{"anyOf":[{"type":"string"},{"type":"null"}]},"issues":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}},{"type":"null"}]},"expectedSchema":{"anyOf":[{"type":"object"},{"type":"null"}]},"impact":{"anyOf":[{"type":"object"},{"type":"null"}]},"remediations":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"tool":{"type":"string"},"args":{"type":"object"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["tool","args"],"additionalProperties":false}},{"type":"null"}]}},"required":["code","retryable"],"additionalProperties":false},{"type":"null"}]},"resumeToken":{"anyOf":[{"type":"string"},{"type":"null"}]},"inputRequest":{"anyOf":[{"type":"object","properties":{"questions":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","allOf":[{"minLength":1},{"maxLength":80}]},"header":{"type":"string","allOf":[{"minLength":1},{"maxLength":40}]},"prompt":{"type":"string","allOf":[{"minLength":1},{"maxLength":1000}]},"required":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"placeholder":{"anyOf":[{"type":"string","allOf":[{"maxLength":200}]},{"type":"null"}]},"kind":{"type":"string","enum":["single_select"]},"options":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string","allOf":[{"minLength":1},{"maxLength":120}]},"description":{"type":"string","allOf":[{"minLength":1},{"maxLength":500}]}},"required":["label","description"],"additionalProperties":false},"allOf":[{"minItems":1},{"maxItems":20}]},"allowCustom":{"anyOf":[{"type":"boolean"},{"type":"null"}]}},"required":["id","header","prompt","kind","options"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","allOf":[{"minLength":1},{"maxLength":80}]},"header":{"type":"string","allOf":[{"minLength":1},{"maxLength":40}]},"prompt":{"type":"string","allOf":[{"minLength":1},{"maxLength":1000}]},"required":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"placeholder":{"anyOf":[{"type":"string","allOf":[{"maxLength":200}]},{"type":"null"}]},"kind":{"type":"string","enum":["multi_select"]},"options":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string","allOf":[{"minLength":1},{"maxLength":120}]},"description":{"type":"string","allOf":[{"minLength":1},{"maxLength":500}]}},"required":["label","description"],"additionalProperties":false},"allOf":[{"minItems":1},{"maxItems":20}]},"allowCustom":{"anyOf":[{"type":"boolean"},{"type":"null"}]}},"required":["id","header","prompt","kind","options"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","allOf":[{"minLength":1},{"maxLength":80}]},"header":{"type":"string","allOf":[{"minLength":1},{"maxLength":40}]},"prompt":{"type":"string","allOf":[{"minLength":1},{"maxLength":1000}]},"required":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"placeholder":{"anyOf":[{"type":"string","allOf":[{"maxLength":200}]},{"type":"null"}]},"kind":{"type":"string","enum":["text"]}},"required":["id","header","prompt","kind"],"additionalProperties":false}]},"allOf":[{"minItems":1},{"maxItems":3}]}},"required":["questions"],"additionalProperties":false},{"type":"null"}]},"approvalPreview":{"anyOf":[{"type":"object"},{"type":"null"}]},"startedAt":{"type":"string"},"completedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","workspaceId","status","stake","startedAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"args":{"type":"object"},"approvals":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"stakeCeiling":{"type":"string","enum":["never_ask","low","medium","high"]},"toolName":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["stakeCeiling"],"additionalProperties":false}},{"type":"null"}]},"resumeToken":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["name","args"],"additionalProperties":false}}},"required":true}}},"/v1/workspaces/{workspaceId}/rag/sources":{"post":{"tags":["rag"],"operationId":"rag.ingest","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"sourceKind":{"type":"string","enum":["page","database","data_source","file","manual"]},"sourceId":{"type":"string"},"chunkCount":{"type":"integer"},"embeddingModel":{"type":"string"}},"required":["sourceKind","sourceId","chunkCount","embeddingModel"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"sourceKind":{"type":"string","enum":["page","database","data_source","file","manual"]},"sourceId":{"type":"string"},"sourceLabel":{"anyOf":[{"type":"string"},{"type":"null"}]},"content":{"type":"string"},"metadata":{"anyOf":[{"type":"object"},{"type":"null"}]}},"required":["sourceKind","sourceId","content"],"additionalProperties":false}}},"required":true}}},"/v1/workspaces/{workspaceId}/rag/models":{"get":{"tags":["rag"],"operationId":"rag.listModels","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"label":{"type":"string"},"dimension":{"type":"integer"},"isDefault":{"type":"boolean"},"createdAt":{"anyOf":[{"anyOf":[{"type":"null"},{"type":"null"}]},{"type":"null"}]}},"required":["id","slug","label","dimension","isDefault"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/workspaces/{workspaceId}/rag/chats/{chatId}/sources":{"get":{"tags":["rag"],"operationId":"rag.listSources","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"chatId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"sourceKind":{"type":"string","enum":["page","database","data_source","file","manual"]},"sourceId":{"type":"string"},"sourceLabel":{"type":"string"},"chunkCount":{"type":"integer"},"selected":{"type":"boolean"}},"required":["sourceKind","sourceId","sourceLabel","chunkCount","selected"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"put":{"tags":["rag"],"operationId":"rag.setSources","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"chatId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"sourceKind":{"type":"string","enum":["page","database","data_source","file","manual"]},"sourceId":{"type":"string"}},"required":["sourceKind","sourceId"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"sources":{"type":"array","items":{"type":"object","properties":{"sourceKind":{"type":"string","enum":["page","database","data_source","file","manual"]},"sourceId":{"type":"string"}},"required":["sourceKind","sourceId"],"additionalProperties":false}}},"required":["sources"],"additionalProperties":false}}},"required":true}}},"/v1/workspaces/{workspaceId}/rag/chats/{chatId}/search":{"post":{"tags":["rag"],"operationId":"rag.search","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"chatId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"query":{"type":"string"},"results":{"type":"array","items":{"type":"object","properties":{"chunkId":{"type":"string"},"sourceKind":{"type":"string","enum":["page","database","data_source","file","manual"]},"sourceId":{"type":"string"},"sourceLabel":{"type":"string"},"chunkIndex":{"type":"integer"},"content":{"type":"string"},"score":{"type":"number"},"citation":{"type":"string"}},"required":["chunkId","sourceKind","sourceId","sourceLabel","chunkIndex","content","score","citation"],"additionalProperties":false}}},"required":["query","results"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"query":{"type":"string"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}]}},"required":["query"],"additionalProperties":false}}},"required":true}}},"/v1/ai/models":{"get":{"tags":["ai"],"operationId":"ai.listModels","parameters":[],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"icon":{"type":"string"},"group":{"type":"string","enum":["frontier","open"]},"vision":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"disabled":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"costX":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["id","label","icon","group"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/workspaces/{workspaceId}/databases/{databaseId}/ai/plan":{"post":{"tags":["ai-database"],"operationId":"ai-database.plan","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"databaseId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"databaseId":{"type":"string"},"prompt":{"type":"string"},"summary":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"status":{"type":"string","enum":["planned","applying","applied","partial","failed"]},"ops":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer"},"op":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["create_field"]},"label":{"type":"string"},"fieldKind":{"type":"string","enum":["text","long_text","number","date","select","multi_select","status","checkbox","url","email","phone","user","file","place","json","created_at","created_by","updated_at","updated_by","unique_id","formula","relation","rollup","time_tracking","button"]},"required":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"options":{"anyOf":[{"type":"array","items":{"type":"object"}},{"type":"null"}]},"settings":{"anyOf":[{"type":"object"},{"type":"null"}]}},"required":["kind","label","fieldKind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["update_field"]},"fieldId":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"fieldKind":{"anyOf":[{"type":"string","enum":["text","long_text","number","date","select","multi_select","status","checkbox","url","email","phone","user","file","place","json","created_at","created_by","updated_at","updated_by","unique_id","formula","relation","rollup","time_tracking","button"]},{"type":"null"}]},"required":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"options":{"anyOf":[{"type":"array","items":{"type":"object"}},{"type":"null"}]},"settings":{"anyOf":[{"type":"object"},{"type":"null"}]}},"required":["kind","fieldId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["delete_field"]},"fieldId":{"type":"string"}},"required":["kind","fieldId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["create_view"]},"label":{"type":"string"},"viewKind":{"type":"string","enum":["table","list","board","kanban","gallery","calendar","timeline","gantt","chart"]},"manifest":{"anyOf":[{"type":"object"},{"type":"null"}]}},"required":["kind","label","viewKind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["update_view"]},"viewId":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"viewKind":{"anyOf":[{"type":"string","enum":["table","list","board","kanban","gallery","calendar","timeline","gantt","chart"]},{"type":"null"}]},"manifest":{"anyOf":[{"type":"object"},{"type":"null"}]}},"required":["kind","viewId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["delete_view"]},"viewId":{"type":"string"}},"required":["kind","viewId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["create_record"]},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"data":{"anyOf":[{"type":"object"},{"type":"null"}]}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["update_record"]},"recordId":{"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"data":{"anyOf":[{"type":"object"},{"type":"null"}]}},"required":["kind","recordId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["create_form"]},"label":{"type":"string"},"manifest":{"type":"object"}},"required":["kind","label","manifest"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["create_dashboard"]},"label":{"type":"string"},"widgets":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["database_view","metric","activity_feed","button"]},"manifest":{"anyOf":[{"type":"object"},{"type":"null"}]},"layout":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"},"w":{"type":"number"},"h":{"type":"number"}},"required":["x","y","w","h"],"additionalProperties":false},{"type":"null"}]}},"required":["kind"],"additionalProperties":false}}},"required":["kind","label","widgets"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["create_action"]},"label":{"type":"string"},"actionKind":{"type":"string","enum":["refresh_data_source","create_database_record","update_database_record","run_actions","http_request","connector_operation","provider_operation","code"]},"config":{"type":"object"},"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}]}},"required":["kind","label","actionKind","config"],"additionalProperties":false}]},"stake":{"type":"string","enum":["never_ask","low","medium","high"]},"description":{"type":"string"}},"required":["index","op","stake","description"],"additionalProperties":false}},"maxStake":{"type":"string","enum":["never_ask","low","medium","high"]},"createdAt":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]}},"required":["id","workspaceId","databaseId","prompt","status","ops","maxStake"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"prompt":{"type":"string"},"model":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["prompt"],"additionalProperties":false}}},"required":true}}},"/v1/workspaces/{workspaceId}/ai/runs/{runId}/apply":{"post":{"tags":["ai-database"],"operationId":"ai-database.apply","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"runId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"runId":{"type":"string"},"status":{"type":"string","enum":["planned","applying","applied","partial","failed"]},"results":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer"},"kind":{"type":"string"},"stake":{"type":"string","enum":["never_ask","low","medium","high"]},"status":{"type":"string","enum":["applied","skipped","failed"]},"needsApproval":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"subjectId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["index","kind","stake","status"],"additionalProperties":false}},"appliedCount":{"type":"integer"},"skippedCount":{"type":"integer"},"failedCount":{"type":"integer"}},"required":["runId","status","results","appliedCount","skippedCount","failedCount"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"approvals":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"stakeCeiling":{"type":"string","enum":["never_ask","low","medium","high"]},"toolName":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["stakeCeiling"],"additionalProperties":false}},{"type":"null"}]}},"additionalProperties":false}}},"required":true}}},"/v1/workspaces/{workspaceId}/ai/runs/{runId}":{"get":{"tags":["ai-database"],"operationId":"ai-database.getRun","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"runId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"databaseId":{"type":"string"},"prompt":{"type":"string"},"summary":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"status":{"type":"string","enum":["planned","applying","applied","partial","failed"]},"ops":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer"},"op":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["create_field"]},"label":{"type":"string"},"fieldKind":{"type":"string","enum":["text","long_text","number","date","select","multi_select","status","checkbox","url","email","phone","user","file","place","json","created_at","created_by","updated_at","updated_by","unique_id","formula","relation","rollup","time_tracking","button"]},"required":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"options":{"anyOf":[{"type":"array","items":{"type":"object"}},{"type":"null"}]},"settings":{"anyOf":[{"type":"object"},{"type":"null"}]}},"required":["kind","label","fieldKind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["update_field"]},"fieldId":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"fieldKind":{"anyOf":[{"type":"string","enum":["text","long_text","number","date","select","multi_select","status","checkbox","url","email","phone","user","file","place","json","created_at","created_by","updated_at","updated_by","unique_id","formula","relation","rollup","time_tracking","button"]},{"type":"null"}]},"required":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"options":{"anyOf":[{"type":"array","items":{"type":"object"}},{"type":"null"}]},"settings":{"anyOf":[{"type":"object"},{"type":"null"}]}},"required":["kind","fieldId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["delete_field"]},"fieldId":{"type":"string"}},"required":["kind","fieldId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["create_view"]},"label":{"type":"string"},"viewKind":{"type":"string","enum":["table","list","board","kanban","gallery","calendar","timeline","gantt","chart"]},"manifest":{"anyOf":[{"type":"object"},{"type":"null"}]}},"required":["kind","label","viewKind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["update_view"]},"viewId":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"viewKind":{"anyOf":[{"type":"string","enum":["table","list","board","kanban","gallery","calendar","timeline","gantt","chart"]},{"type":"null"}]},"manifest":{"anyOf":[{"type":"object"},{"type":"null"}]}},"required":["kind","viewId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["delete_view"]},"viewId":{"type":"string"}},"required":["kind","viewId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["create_record"]},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"data":{"anyOf":[{"type":"object"},{"type":"null"}]}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["update_record"]},"recordId":{"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"data":{"anyOf":[{"type":"object"},{"type":"null"}]}},"required":["kind","recordId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["create_form"]},"label":{"type":"string"},"manifest":{"type":"object"}},"required":["kind","label","manifest"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["create_dashboard"]},"label":{"type":"string"},"widgets":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["database_view","metric","activity_feed","button"]},"manifest":{"anyOf":[{"type":"object"},{"type":"null"}]},"layout":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"},"w":{"type":"number"},"h":{"type":"number"}},"required":["x","y","w","h"],"additionalProperties":false},{"type":"null"}]}},"required":["kind"],"additionalProperties":false}}},"required":["kind","label","widgets"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["create_action"]},"label":{"type":"string"},"actionKind":{"type":"string","enum":["refresh_data_source","create_database_record","update_database_record","run_actions","http_request","connector_operation","provider_operation","code"]},"config":{"type":"object"},"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}]}},"required":["kind","label","actionKind","config"],"additionalProperties":false}]},"stake":{"type":"string","enum":["never_ask","low","medium","high"]},"description":{"type":"string"}},"required":["index","op","stake","description"],"additionalProperties":false}},"maxStake":{"type":"string","enum":["never_ask","low","medium","high"]},"createdAt":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]}},"required":["id","workspaceId","databaseId","prompt","status","ops","maxStake"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/workspaces/{workspaceId}/ai/runs":{"get":{"tags":["ai-database"],"operationId":"ai-database.listRuns","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"databaseId","in":"query","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"databaseId":{"type":"string"},"prompt":{"type":"string"},"summary":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"status":{"type":"string","enum":["planned","applying","applied","partial","failed"]},"ops":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer"},"op":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["create_field"]},"label":{"type":"string"},"fieldKind":{"type":"string","enum":["text","long_text","number","date","select","multi_select","status","checkbox","url","email","phone","user","file","place","json","created_at","created_by","updated_at","updated_by","unique_id","formula","relation","rollup","time_tracking","button"]},"required":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"options":{"anyOf":[{"type":"array","items":{"type":"object"}},{"type":"null"}]},"settings":{"anyOf":[{"type":"object"},{"type":"null"}]}},"required":["kind","label","fieldKind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["update_field"]},"fieldId":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"fieldKind":{"anyOf":[{"type":"string","enum":["text","long_text","number","date","select","multi_select","status","checkbox","url","email","phone","user","file","place","json","created_at","created_by","updated_at","updated_by","unique_id","formula","relation","rollup","time_tracking","button"]},{"type":"null"}]},"required":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"options":{"anyOf":[{"type":"array","items":{"type":"object"}},{"type":"null"}]},"settings":{"anyOf":[{"type":"object"},{"type":"null"}]}},"required":["kind","fieldId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["delete_field"]},"fieldId":{"type":"string"}},"required":["kind","fieldId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["create_view"]},"label":{"type":"string"},"viewKind":{"type":"string","enum":["table","list","board","kanban","gallery","calendar","timeline","gantt","chart"]},"manifest":{"anyOf":[{"type":"object"},{"type":"null"}]}},"required":["kind","label","viewKind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["update_view"]},"viewId":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"viewKind":{"anyOf":[{"type":"string","enum":["table","list","board","kanban","gallery","calendar","timeline","gantt","chart"]},{"type":"null"}]},"manifest":{"anyOf":[{"type":"object"},{"type":"null"}]}},"required":["kind","viewId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["delete_view"]},"viewId":{"type":"string"}},"required":["kind","viewId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["create_record"]},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"data":{"anyOf":[{"type":"object"},{"type":"null"}]}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["update_record"]},"recordId":{"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"data":{"anyOf":[{"type":"object"},{"type":"null"}]}},"required":["kind","recordId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["create_form"]},"label":{"type":"string"},"manifest":{"type":"object"}},"required":["kind","label","manifest"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["create_dashboard"]},"label":{"type":"string"},"widgets":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["database_view","metric","activity_feed","button"]},"manifest":{"anyOf":[{"type":"object"},{"type":"null"}]},"layout":{"anyOf":[{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"},"w":{"type":"number"},"h":{"type":"number"}},"required":["x","y","w","h"],"additionalProperties":false},{"type":"null"}]}},"required":["kind"],"additionalProperties":false}}},"required":["kind","label","widgets"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["create_action"]},"label":{"type":"string"},"actionKind":{"type":"string","enum":["refresh_data_source","create_database_record","update_database_record","run_actions","http_request","connector_operation","provider_operation","code"]},"config":{"type":"object"},"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}]}},"required":["kind","label","actionKind","config"],"additionalProperties":false}]},"stake":{"type":"string","enum":["never_ask","low","medium","high"]},"description":{"type":"string"}},"required":["index","op","stake","description"],"additionalProperties":false}},"maxStake":{"type":"string","enum":["never_ask","low","medium","high"]},"createdAt":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]}},"required":["id","workspaceId","databaseId","prompt","status","ops","maxStake"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/workspaces/{workspaceId}/ai-artifacts":{"get":{"tags":["aiArtifacts"],"operationId":"aiArtifacts.list","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"chatId","in":"query","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false},{"name":"messageId","in":"query","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false},{"name":"kind","in":"query","schema":{"anyOf":[{"type":"string","enum":["markdown","code","html","svg","json","text","workspace_item_ref","file_ref"]},{"type":"null"}]},"required":false},{"name":"status","in":"query","schema":{"anyOf":[{"type":"string","enum":["draft","ready","archived"]},{"type":"null"}]},"required":false},{"name":"limit","in":"query","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"chatId":{"anyOf":[{"type":"string"},{"type":"null"}]},"messageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"creator":{"type":"object","properties":{"userId":{"anyOf":[{"type":"string"},{"type":"null"}]},"principalType":{"type":"string","enum":["user","api_key","system","provider_installation"]},"principalId":{"anyOf":[{"type":"string"},{"type":"null"}]},"displayName":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["principalType"],"additionalProperties":false},"kind":{"type":"string","enum":["markdown","code","html","svg","json","text","workspace_item_ref","file_ref"]},"status":{"type":"string","enum":["draft","ready","archived"]},"title":{"type":"string"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}]},"textContent":{"anyOf":[{"type":"string"},{"type":"null"}]},"jsonContent":{"anyOf":[{},{"type":"null"}]},"mimeType":{"anyOf":[{"type":"string"},{"type":"null"}]},"language":{"anyOf":[{"type":"string"},{"type":"null"}]},"sourceRefs":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["chat_message"]},"chatId":{"type":"string"},"messageId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["type","chatId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["workspace_item"]},"workspaceItemId":{"type":"string"}},"required":["type","workspaceItemId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["file"]},"fileId":{"type":"string"}},"required":["type","fileId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["tool_run"]},"toolRunId":{"type":"string"}},"required":["type","toolRunId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["artifact"]},"artifactId":{"type":"string"}},"required":["type","artifactId"],"additionalProperties":false}]}},"workspaceItemId":{"anyOf":[{"type":"string"},{"type":"null"}]},"fileId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","creator","kind","status","title","sourceRefs","createdAt","updatedAt"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"post":{"tags":["aiArtifacts"],"operationId":"aiArtifacts.create","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"chatId":{"anyOf":[{"type":"string"},{"type":"null"}]},"messageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"creator":{"type":"object","properties":{"userId":{"anyOf":[{"type":"string"},{"type":"null"}]},"principalType":{"type":"string","enum":["user","api_key","system","provider_installation"]},"principalId":{"anyOf":[{"type":"string"},{"type":"null"}]},"displayName":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["principalType"],"additionalProperties":false},"kind":{"type":"string","enum":["markdown","code","html","svg","json","text","workspace_item_ref","file_ref"]},"status":{"type":"string","enum":["draft","ready","archived"]},"title":{"type":"string"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}]},"textContent":{"anyOf":[{"type":"string"},{"type":"null"}]},"jsonContent":{"anyOf":[{},{"type":"null"}]},"mimeType":{"anyOf":[{"type":"string"},{"type":"null"}]},"language":{"anyOf":[{"type":"string"},{"type":"null"}]},"sourceRefs":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["chat_message"]},"chatId":{"type":"string"},"messageId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["type","chatId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["workspace_item"]},"workspaceItemId":{"type":"string"}},"required":["type","workspaceItemId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["file"]},"fileId":{"type":"string"}},"required":["type","fileId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["tool_run"]},"toolRunId":{"type":"string"}},"required":["type","toolRunId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["artifact"]},"artifactId":{"type":"string"}},"required":["type","artifactId"],"additionalProperties":false}]}},"workspaceItemId":{"anyOf":[{"type":"string"},{"type":"null"}]},"fileId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","creator","kind","status","title","sourceRefs","createdAt","updatedAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"chatId":{"anyOf":[{"type":"string"},{"type":"null"}]},"messageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"kind":{"type":"string","enum":["markdown","code","html","svg","json","text","workspace_item_ref","file_ref"]},"status":{"anyOf":[{"type":"string","enum":["draft","ready"]},{"type":"null"}]},"title":{"type":"string"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}]},"textContent":{"anyOf":[{"type":"string"},{"type":"null"}]},"jsonContent":{"anyOf":[{},{"type":"null"}]},"mimeType":{"anyOf":[{"type":"string"},{"type":"null"}]},"language":{"anyOf":[{"type":"string"},{"type":"null"}]},"sourceRefs":{"anyOf":[{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["chat_message"]},"chatId":{"type":"string"},"messageId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["type","chatId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["workspace_item"]},"workspaceItemId":{"type":"string"}},"required":["type","workspaceItemId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["file"]},"fileId":{"type":"string"}},"required":["type","fileId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["tool_run"]},"toolRunId":{"type":"string"}},"required":["type","toolRunId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["artifact"]},"artifactId":{"type":"string"}},"required":["type","artifactId"],"additionalProperties":false}]}},{"type":"null"}]},"workspaceItemId":{"anyOf":[{"type":"string"},{"type":"null"}]},"fileId":{"anyOf":[{"type":"string"},{"type":"null"}]},"clientMutationId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["kind","title"],"additionalProperties":false}}},"required":true}}},"/v1/workspaces/{workspaceId}/ai-artifacts/{artifactId}":{"get":{"tags":["aiArtifacts"],"operationId":"aiArtifacts.get","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"artifactId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"chatId":{"anyOf":[{"type":"string"},{"type":"null"}]},"messageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"creator":{"type":"object","properties":{"userId":{"anyOf":[{"type":"string"},{"type":"null"}]},"principalType":{"type":"string","enum":["user","api_key","system","provider_installation"]},"principalId":{"anyOf":[{"type":"string"},{"type":"null"}]},"displayName":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["principalType"],"additionalProperties":false},"kind":{"type":"string","enum":["markdown","code","html","svg","json","text","workspace_item_ref","file_ref"]},"status":{"type":"string","enum":["draft","ready","archived"]},"title":{"type":"string"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}]},"textContent":{"anyOf":[{"type":"string"},{"type":"null"}]},"jsonContent":{"anyOf":[{},{"type":"null"}]},"mimeType":{"anyOf":[{"type":"string"},{"type":"null"}]},"language":{"anyOf":[{"type":"string"},{"type":"null"}]},"sourceRefs":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["chat_message"]},"chatId":{"type":"string"},"messageId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["type","chatId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["workspace_item"]},"workspaceItemId":{"type":"string"}},"required":["type","workspaceItemId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["file"]},"fileId":{"type":"string"}},"required":["type","fileId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["tool_run"]},"toolRunId":{"type":"string"}},"required":["type","toolRunId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["artifact"]},"artifactId":{"type":"string"}},"required":["type","artifactId"],"additionalProperties":false}]}},"workspaceItemId":{"anyOf":[{"type":"string"},{"type":"null"}]},"fileId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","creator","kind","status","title","sourceRefs","createdAt","updatedAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"patch":{"tags":["aiArtifacts"],"operationId":"aiArtifacts.update","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"artifactId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"chatId":{"anyOf":[{"type":"string"},{"type":"null"}]},"messageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"creator":{"type":"object","properties":{"userId":{"anyOf":[{"type":"string"},{"type":"null"}]},"principalType":{"type":"string","enum":["user","api_key","system","provider_installation"]},"principalId":{"anyOf":[{"type":"string"},{"type":"null"}]},"displayName":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["principalType"],"additionalProperties":false},"kind":{"type":"string","enum":["markdown","code","html","svg","json","text","workspace_item_ref","file_ref"]},"status":{"type":"string","enum":["draft","ready","archived"]},"title":{"type":"string"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}]},"textContent":{"anyOf":[{"type":"string"},{"type":"null"}]},"jsonContent":{"anyOf":[{},{"type":"null"}]},"mimeType":{"anyOf":[{"type":"string"},{"type":"null"}]},"language":{"anyOf":[{"type":"string"},{"type":"null"}]},"sourceRefs":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["chat_message"]},"chatId":{"type":"string"},"messageId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["type","chatId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["workspace_item"]},"workspaceItemId":{"type":"string"}},"required":["type","workspaceItemId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["file"]},"fileId":{"type":"string"}},"required":["type","fileId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["tool_run"]},"toolRunId":{"type":"string"}},"required":["type","toolRunId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["artifact"]},"artifactId":{"type":"string"}},"required":["type","artifactId"],"additionalProperties":false}]}},"workspaceItemId":{"anyOf":[{"type":"string"},{"type":"null"}]},"fileId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","creator","kind","status","title","sourceRefs","createdAt","updatedAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"chatId":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"messageId":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"status":{"anyOf":[{"type":"string","enum":["draft","ready"]},{"type":"null"}]},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"summary":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"textContent":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"jsonContent":{"anyOf":[{},{"type":"null"}]},"mimeType":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"language":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"sourceRefs":{"anyOf":[{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["chat_message"]},"chatId":{"type":"string"},"messageId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["type","chatId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["workspace_item"]},"workspaceItemId":{"type":"string"}},"required":["type","workspaceItemId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["file"]},"fileId":{"type":"string"}},"required":["type","fileId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["tool_run"]},"toolRunId":{"type":"string"}},"required":["type","toolRunId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["artifact"]},"artifactId":{"type":"string"}},"required":["type","artifactId"],"additionalProperties":false}]}},{"type":"null"}]},"fileId":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"clientMutationId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"additionalProperties":false}}},"required":true}},"delete":{"tags":["aiArtifacts"],"operationId":"aiArtifacts.remove","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"artifactId","in":"path","schema":{"type":"string"},"required":true},{"name":"clientMutationId","in":"query","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/workspaces/{workspaceId}/ai-artifacts/{artifactId}/archive":{"post":{"tags":["aiArtifacts"],"operationId":"aiArtifacts.archive","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"artifactId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"chatId":{"anyOf":[{"type":"string"},{"type":"null"}]},"messageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"creator":{"type":"object","properties":{"userId":{"anyOf":[{"type":"string"},{"type":"null"}]},"principalType":{"type":"string","enum":["user","api_key","system","provider_installation"]},"principalId":{"anyOf":[{"type":"string"},{"type":"null"}]},"displayName":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["principalType"],"additionalProperties":false},"kind":{"type":"string","enum":["markdown","code","html","svg","json","text","workspace_item_ref","file_ref"]},"status":{"type":"string","enum":["draft","ready","archived"]},"title":{"type":"string"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}]},"textContent":{"anyOf":[{"type":"string"},{"type":"null"}]},"jsonContent":{"anyOf":[{},{"type":"null"}]},"mimeType":{"anyOf":[{"type":"string"},{"type":"null"}]},"language":{"anyOf":[{"type":"string"},{"type":"null"}]},"sourceRefs":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["chat_message"]},"chatId":{"type":"string"},"messageId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["type","chatId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["workspace_item"]},"workspaceItemId":{"type":"string"}},"required":["type","workspaceItemId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["file"]},"fileId":{"type":"string"}},"required":["type","fileId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["tool_run"]},"toolRunId":{"type":"string"}},"required":["type","toolRunId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["artifact"]},"artifactId":{"type":"string"}},"required":["type","artifactId"],"additionalProperties":false}]}},"workspaceItemId":{"anyOf":[{"type":"string"},{"type":"null"}]},"fileId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","creator","kind","status","title","sourceRefs","createdAt","updatedAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"clientMutationId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"additionalProperties":false}}},"required":true}}},"/v1/workspaces/{workspaceId}/ai-artifacts/{artifactId}/link-workspace-item":{"post":{"tags":["aiArtifacts"],"operationId":"aiArtifacts.linkWorkspaceItem","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"artifactId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"chatId":{"anyOf":[{"type":"string"},{"type":"null"}]},"messageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"creator":{"type":"object","properties":{"userId":{"anyOf":[{"type":"string"},{"type":"null"}]},"principalType":{"type":"string","enum":["user","api_key","system","provider_installation"]},"principalId":{"anyOf":[{"type":"string"},{"type":"null"}]},"displayName":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["principalType"],"additionalProperties":false},"kind":{"type":"string","enum":["markdown","code","html","svg","json","text","workspace_item_ref","file_ref"]},"status":{"type":"string","enum":["draft","ready","archived"]},"title":{"type":"string"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}]},"textContent":{"anyOf":[{"type":"string"},{"type":"null"}]},"jsonContent":{"anyOf":[{},{"type":"null"}]},"mimeType":{"anyOf":[{"type":"string"},{"type":"null"}]},"language":{"anyOf":[{"type":"string"},{"type":"null"}]},"sourceRefs":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["chat_message"]},"chatId":{"type":"string"},"messageId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["type","chatId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["workspace_item"]},"workspaceItemId":{"type":"string"}},"required":["type","workspaceItemId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["file"]},"fileId":{"type":"string"}},"required":["type","fileId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["tool_run"]},"toolRunId":{"type":"string"}},"required":["type","toolRunId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["artifact"]},"artifactId":{"type":"string"}},"required":["type","artifactId"],"additionalProperties":false}]}},"workspaceItemId":{"anyOf":[{"type":"string"},{"type":"null"}]},"fileId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","creator","kind","status","title","sourceRefs","createdAt","updatedAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceItemId":{"type":"string"},"clientMutationId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["workspaceItemId"],"additionalProperties":false}}},"required":true}}},"/v1/workspaces/{workspaceId}/agent/chats":{"get":{"tags":["agent"],"operationId":"agent.listChats","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"title":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"parentSessionId":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"model":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"status":{"anyOf":[{"type":"string","enum":["idle","running","error","blocked"]},{"type":"null"}]},"runningAssistantMessageId":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"lastError":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"createdAt":{"anyOf":[{"anyOf":[{"type":"null"},{"type":"null"}]},{"type":"null"}]},"updatedAt":{"anyOf":[{"anyOf":[{"type":"null"},{"type":"null"}]},{"type":"null"}]}},"required":["id","workspaceId"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"post":{"tags":["agent"],"operationId":"agent.createChat","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"title":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"parentSessionId":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"model":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"status":{"anyOf":[{"type":"string","enum":["idle","running","error","blocked"]},{"type":"null"}]},"runningAssistantMessageId":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"lastError":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"createdAt":{"anyOf":[{"anyOf":[{"type":"null"},{"type":"null"}]},{"type":"null"}]},"updatedAt":{"anyOf":[{"anyOf":[{"type":"null"},{"type":"null"}]},{"type":"null"}]}},"required":["id","workspaceId"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"model":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]}},"additionalProperties":false}}},"required":true}}},"/v1/workspaces/{workspaceId}/agent/chats/{chatId}":{"patch":{"tags":["agent"],"operationId":"agent.updateChat","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"chatId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"title":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"parentSessionId":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"model":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"status":{"anyOf":[{"type":"string","enum":["idle","running","error","blocked"]},{"type":"null"}]},"runningAssistantMessageId":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"lastError":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"createdAt":{"anyOf":[{"anyOf":[{"type":"null"},{"type":"null"}]},{"type":"null"}]},"updatedAt":{"anyOf":[{"anyOf":[{"type":"null"},{"type":"null"}]},{"type":"null"}]}},"required":["id","workspaceId"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"model":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]}},"additionalProperties":false}}},"required":true}},"get":{"tags":["agent"],"operationId":"agent.getTranscript","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"chatId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"chat":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"title":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"parentSessionId":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"model":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"status":{"anyOf":[{"type":"string","enum":["idle","running","error","blocked"]},{"type":"null"}]},"runningAssistantMessageId":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"lastError":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"createdAt":{"anyOf":[{"anyOf":[{"type":"null"},{"type":"null"}]},{"type":"null"}]},"updatedAt":{"anyOf":[{"anyOf":[{"type":"null"},{"type":"null"}]},{"type":"null"}]}},"required":["id","workspaceId"],"additionalProperties":false},"messages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"role":{"type":"string","enum":["system","user","assistant","tool"]},"seq":{"type":"integer"},"content":{"type":"array","items":{"type":"object","properties":{"step":{"type":"integer"},"index":{"type":"integer"},"type":{"type":"string","enum":["text","reasoning","tool_call","tool_result"]},"text":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"payload":{"anyOf":[{"anyOf":[{"type":"object"},{"type":"null"}]},{"type":"null"}]}},"required":["step","index","type"],"additionalProperties":false}},"model":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"createdAt":{"anyOf":[{"anyOf":[{"type":"null"},{"type":"null"}]},{"type":"null"}]},"versionIndex":{"anyOf":[{"type":"integer"},{"type":"null"}]},"versionCount":{"anyOf":[{"type":"integer"},{"type":"null"}]},"versionIds":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]}},"required":["id","role","seq","content"],"additionalProperties":false}}},"required":["chat","messages"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/workspaces/{workspaceId}/agent/chats/{chatId}/messages/start":{"post":{"tags":["agent"],"operationId":"agent.startMessage","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"chatId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"202":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["started"]},"chatId":{"type":"string"},"userMessageId":{"type":"string"},"assistantMessageId":{"type":"string"}},"required":["type","chatId","userMessageId","assistantMessageId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["delta"]},"event":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text-delta"]},"id":{"type":"string"},"delta":{"type":"string"}},"required":["type","id","delta"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["reasoning"]},"id":{"type":"string"},"delta":{"type":"string"}},"required":["type","id","delta"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["tool-call"]},"toolCallId":{"type":"string"},"name":{"type":"string"},"args":{"type":"object"}},"required":["type","toolCallId","name","args"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["tool-result"]},"toolCallId":{"type":"string"},"name":{"type":"string"},"result":{},"isError":{"anyOf":[{"type":"boolean"},{"type":"null"}]}},"required":["type","toolCallId","name","result"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["usage"]},"usage":{"type":"object","properties":{"inputTokens":{"anyOf":[{"type":"integer"},{"type":"null"}]},"outputTokens":{"anyOf":[{"type":"integer"},{"type":"null"}]},"totalTokens":{"anyOf":[{"type":"integer"},{"type":"null"}]},"model":{"anyOf":[{"type":"string"},{"type":"null"}]}},"additionalProperties":false}},"required":["type","usage"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["done"]},"reason":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["type"],"additionalProperties":false}]}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["saved"]},"message":{"type":"object","properties":{"id":{"type":"string"},"role":{"type":"string","enum":["system","user","assistant","tool"]},"seq":{"type":"integer"},"content":{"type":"array","items":{"type":"object","properties":{"step":{"type":"integer"},"index":{"type":"integer"},"type":{"type":"string","enum":["text","reasoning","tool_call","tool_result"]},"text":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"payload":{"anyOf":[{"anyOf":[{"type":"object"},{"type":"null"}]},{"type":"null"}]}},"required":["step","index","type"],"additionalProperties":false}},"model":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"createdAt":{"anyOf":[{"anyOf":[{"type":"null"},{"type":"null"}]},{"type":"null"}]},"versionIndex":{"anyOf":[{"type":"integer"},{"type":"null"}]},"versionCount":{"anyOf":[{"type":"integer"},{"type":"null"}]},"versionIds":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]}},"required":["id","role","seq","content"],"additionalProperties":false}},"required":["type","message"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"message":{"type":"string"}},"required":["type","message"],"additionalProperties":false}]}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"content":{"type":"string"},"model":{"anyOf":[{"type":"string"},{"type":"null"}]},"temperature":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxTokens":{"anyOf":[{"type":"integer"},{"type":"null"}]},"approvalMode":{"anyOf":[{"type":"string","enum":["required","auto"]},{"type":"null"}]},"images":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"mediaType":{"type":"string"},"data":{"type":"string"}},"required":["mediaType","data"],"additionalProperties":false}},{"type":"null"}]}},"required":["content"],"additionalProperties":false}}},"required":true}}},"/v1/workspaces/{workspaceId}/agent/chats/{chatId}/messages/{messageId}/edit/start":{"post":{"tags":["agent"],"operationId":"agent.startEditMessage","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"chatId","in":"path","schema":{"type":"string"},"required":true},{"name":"messageId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"202":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["started"]},"chatId":{"type":"string"},"userMessageId":{"type":"string"},"assistantMessageId":{"type":"string"}},"required":["type","chatId","userMessageId","assistantMessageId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["delta"]},"event":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text-delta"]},"id":{"type":"string"},"delta":{"type":"string"}},"required":["type","id","delta"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["reasoning"]},"id":{"type":"string"},"delta":{"type":"string"}},"required":["type","id","delta"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["tool-call"]},"toolCallId":{"type":"string"},"name":{"type":"string"},"args":{"type":"object"}},"required":["type","toolCallId","name","args"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["tool-result"]},"toolCallId":{"type":"string"},"name":{"type":"string"},"result":{},"isError":{"anyOf":[{"type":"boolean"},{"type":"null"}]}},"required":["type","toolCallId","name","result"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["usage"]},"usage":{"type":"object","properties":{"inputTokens":{"anyOf":[{"type":"integer"},{"type":"null"}]},"outputTokens":{"anyOf":[{"type":"integer"},{"type":"null"}]},"totalTokens":{"anyOf":[{"type":"integer"},{"type":"null"}]},"model":{"anyOf":[{"type":"string"},{"type":"null"}]}},"additionalProperties":false}},"required":["type","usage"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["done"]},"reason":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["type"],"additionalProperties":false}]}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["saved"]},"message":{"type":"object","properties":{"id":{"type":"string"},"role":{"type":"string","enum":["system","user","assistant","tool"]},"seq":{"type":"integer"},"content":{"type":"array","items":{"type":"object","properties":{"step":{"type":"integer"},"index":{"type":"integer"},"type":{"type":"string","enum":["text","reasoning","tool_call","tool_result"]},"text":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"payload":{"anyOf":[{"anyOf":[{"type":"object"},{"type":"null"}]},{"type":"null"}]}},"required":["step","index","type"],"additionalProperties":false}},"model":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"createdAt":{"anyOf":[{"anyOf":[{"type":"null"},{"type":"null"}]},{"type":"null"}]},"versionIndex":{"anyOf":[{"type":"integer"},{"type":"null"}]},"versionCount":{"anyOf":[{"type":"integer"},{"type":"null"}]},"versionIds":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]}},"required":["id","role","seq","content"],"additionalProperties":false}},"required":["type","message"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"message":{"type":"string"}},"required":["type","message"],"additionalProperties":false}]}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"content":{"type":"string"},"model":{"anyOf":[{"type":"string"},{"type":"null"}]},"approvalMode":{"anyOf":[{"type":"string","enum":["required","auto"]},{"type":"null"}]}},"required":["content"],"additionalProperties":false}}},"required":true}}},"/v1/workspaces/{workspaceId}/agent/chats/{chatId}/messages/{messageId}/regenerate/start":{"post":{"tags":["agent"],"operationId":"agent.startRegenerateMessage","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"chatId","in":"path","schema":{"type":"string"},"required":true},{"name":"messageId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"202":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["started"]},"chatId":{"type":"string"},"userMessageId":{"type":"string"},"assistantMessageId":{"type":"string"}},"required":["type","chatId","userMessageId","assistantMessageId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["delta"]},"event":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text-delta"]},"id":{"type":"string"},"delta":{"type":"string"}},"required":["type","id","delta"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["reasoning"]},"id":{"type":"string"},"delta":{"type":"string"}},"required":["type","id","delta"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["tool-call"]},"toolCallId":{"type":"string"},"name":{"type":"string"},"args":{"type":"object"}},"required":["type","toolCallId","name","args"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["tool-result"]},"toolCallId":{"type":"string"},"name":{"type":"string"},"result":{},"isError":{"anyOf":[{"type":"boolean"},{"type":"null"}]}},"required":["type","toolCallId","name","result"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["usage"]},"usage":{"type":"object","properties":{"inputTokens":{"anyOf":[{"type":"integer"},{"type":"null"}]},"outputTokens":{"anyOf":[{"type":"integer"},{"type":"null"}]},"totalTokens":{"anyOf":[{"type":"integer"},{"type":"null"}]},"model":{"anyOf":[{"type":"string"},{"type":"null"}]}},"additionalProperties":false}},"required":["type","usage"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["done"]},"reason":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["type"],"additionalProperties":false}]}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["saved"]},"message":{"type":"object","properties":{"id":{"type":"string"},"role":{"type":"string","enum":["system","user","assistant","tool"]},"seq":{"type":"integer"},"content":{"type":"array","items":{"type":"object","properties":{"step":{"type":"integer"},"index":{"type":"integer"},"type":{"type":"string","enum":["text","reasoning","tool_call","tool_result"]},"text":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"payload":{"anyOf":[{"anyOf":[{"type":"object"},{"type":"null"}]},{"type":"null"}]}},"required":["step","index","type"],"additionalProperties":false}},"model":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"createdAt":{"anyOf":[{"anyOf":[{"type":"null"},{"type":"null"}]},{"type":"null"}]},"versionIndex":{"anyOf":[{"type":"integer"},{"type":"null"}]},"versionCount":{"anyOf":[{"type":"integer"},{"type":"null"}]},"versionIds":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]}},"required":["id","role","seq","content"],"additionalProperties":false}},"required":["type","message"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"message":{"type":"string"}},"required":["type","message"],"additionalProperties":false}]}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"model":{"anyOf":[{"type":"string"},{"type":"null"}]},"approvalMode":{"anyOf":[{"type":"string","enum":["required","auto"]},{"type":"null"}]}},"additionalProperties":false}}},"required":true}}},"/v1/workspaces/{workspaceId}/agent/chats/{chatId}/resume":{"post":{"tags":["agent"],"operationId":"agent.resumeTool","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"chatId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"202":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["started"]},"chatId":{"type":"string"},"userMessageId":{"type":"string"},"assistantMessageId":{"type":"string"}},"required":["type","chatId","userMessageId","assistantMessageId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["delta"]},"event":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text-delta"]},"id":{"type":"string"},"delta":{"type":"string"}},"required":["type","id","delta"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["reasoning"]},"id":{"type":"string"},"delta":{"type":"string"}},"required":["type","id","delta"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["tool-call"]},"toolCallId":{"type":"string"},"name":{"type":"string"},"args":{"type":"object"}},"required":["type","toolCallId","name","args"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["tool-result"]},"toolCallId":{"type":"string"},"name":{"type":"string"},"result":{},"isError":{"anyOf":[{"type":"boolean"},{"type":"null"}]}},"required":["type","toolCallId","name","result"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["usage"]},"usage":{"type":"object","properties":{"inputTokens":{"anyOf":[{"type":"integer"},{"type":"null"}]},"outputTokens":{"anyOf":[{"type":"integer"},{"type":"null"}]},"totalTokens":{"anyOf":[{"type":"integer"},{"type":"null"}]},"model":{"anyOf":[{"type":"string"},{"type":"null"}]}},"additionalProperties":false}},"required":["type","usage"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["done"]},"reason":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["type"],"additionalProperties":false}]}},"required":["type","event"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["saved"]},"message":{"type":"object","properties":{"id":{"type":"string"},"role":{"type":"string","enum":["system","user","assistant","tool"]},"seq":{"type":"integer"},"content":{"type":"array","items":{"type":"object","properties":{"step":{"type":"integer"},"index":{"type":"integer"},"type":{"type":"string","enum":["text","reasoning","tool_call","tool_result"]},"text":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"payload":{"anyOf":[{"anyOf":[{"type":"object"},{"type":"null"}]},{"type":"null"}]}},"required":["step","index","type"],"additionalProperties":false}},"model":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"createdAt":{"anyOf":[{"anyOf":[{"type":"null"},{"type":"null"}]},{"type":"null"}]},"versionIndex":{"anyOf":[{"type":"integer"},{"type":"null"}]},"versionCount":{"anyOf":[{"type":"integer"},{"type":"null"}]},"versionIds":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]}},"required":["id","role","seq","content"],"additionalProperties":false}},"required":["type","message"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"message":{"type":"string"}},"required":["type","message"],"additionalProperties":false}]}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"toolCallId":{"type":"string"},"stakeCeiling":{"anyOf":[{"type":"string","enum":["never_ask","low","medium","high"]},{"type":"null"}]},"inputResponse":{"anyOf":[{"type":"object","properties":{"answers":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["single_select"]},"value":{"anyOf":[{"type":"string"},{"type":"null"}]},"custom":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","kind"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["multi_select"]},"values":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"custom":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","kind"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["text"]},"value":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","kind"],"additionalProperties":false}]},"allOf":[{"maxItems":3}]}},"required":["answers"],"additionalProperties":false},{"type":"null"}]}},"required":["toolCallId"],"additionalProperties":false}}},"required":true}}},"/v1/workspaces/{workspaceId}/agent/chats/{chatId}/cancel":{"post":{"tags":["agent"],"operationId":"agent.cancelRun","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"chatId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"chat":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"title":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"parentSessionId":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"model":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"status":{"anyOf":[{"type":"string","enum":["idle","running","error","blocked"]},{"type":"null"}]},"runningAssistantMessageId":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"lastError":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"createdAt":{"anyOf":[{"anyOf":[{"type":"null"},{"type":"null"}]},{"type":"null"}]},"updatedAt":{"anyOf":[{"anyOf":[{"type":"null"},{"type":"null"}]},{"type":"null"}]}},"required":["id","workspaceId"],"additionalProperties":false},"messages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"role":{"type":"string","enum":["system","user","assistant","tool"]},"seq":{"type":"integer"},"content":{"type":"array","items":{"type":"object","properties":{"step":{"type":"integer"},"index":{"type":"integer"},"type":{"type":"string","enum":["text","reasoning","tool_call","tool_result"]},"text":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"payload":{"anyOf":[{"anyOf":[{"type":"object"},{"type":"null"}]},{"type":"null"}]}},"required":["step","index","type"],"additionalProperties":false}},"model":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"createdAt":{"anyOf":[{"anyOf":[{"type":"null"},{"type":"null"}]},{"type":"null"}]},"versionIndex":{"anyOf":[{"type":"integer"},{"type":"null"}]},"versionCount":{"anyOf":[{"type":"integer"},{"type":"null"}]},"versionIds":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]}},"required":["id","role","seq","content"],"additionalProperties":false}}},"required":["chat","messages"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/workspaces/{workspaceId}/agent/chats/{chatId}/messages/{messageId}/switch":{"post":{"tags":["agent"],"operationId":"agent.switchVersion","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"chatId","in":"path","schema":{"type":"string"},"required":true},{"name":"messageId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"chat":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"title":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"parentSessionId":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"model":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"status":{"anyOf":[{"type":"string","enum":["idle","running","error","blocked"]},{"type":"null"}]},"runningAssistantMessageId":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"lastError":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"createdAt":{"anyOf":[{"anyOf":[{"type":"null"},{"type":"null"}]},{"type":"null"}]},"updatedAt":{"anyOf":[{"anyOf":[{"type":"null"},{"type":"null"}]},{"type":"null"}]}},"required":["id","workspaceId"],"additionalProperties":false},"messages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"role":{"type":"string","enum":["system","user","assistant","tool"]},"seq":{"type":"integer"},"content":{"type":"array","items":{"type":"object","properties":{"step":{"type":"integer"},"index":{"type":"integer"},"type":{"type":"string","enum":["text","reasoning","tool_call","tool_result"]},"text":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"payload":{"anyOf":[{"anyOf":[{"type":"object"},{"type":"null"}]},{"type":"null"}]}},"required":["step","index","type"],"additionalProperties":false}},"model":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"createdAt":{"anyOf":[{"anyOf":[{"type":"null"},{"type":"null"}]},{"type":"null"}]},"versionIndex":{"anyOf":[{"type":"integer"},{"type":"null"}]},"versionCount":{"anyOf":[{"type":"integer"},{"type":"null"}]},"versionIds":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]}},"required":["id","role","seq","content"],"additionalProperties":false}}},"required":["chat","messages"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/workspaces/{workspaceId}/agent/chats/{chatId}/branch":{"post":{"tags":["agent"],"operationId":"agent.branchChat","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"chatId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"chat":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"title":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"parentSessionId":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"model":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"status":{"anyOf":[{"type":"string","enum":["idle","running","error","blocked"]},{"type":"null"}]},"runningAssistantMessageId":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"lastError":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"createdAt":{"anyOf":[{"anyOf":[{"type":"null"},{"type":"null"}]},{"type":"null"}]},"updatedAt":{"anyOf":[{"anyOf":[{"type":"null"},{"type":"null"}]},{"type":"null"}]}},"required":["id","workspaceId"],"additionalProperties":false},"seed":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["chat","seed"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"fromMessageId":{"type":"string"},"model":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["fromMessageId"],"additionalProperties":false}}},"required":true}}},"/v1/workspaces/{workspaceId}/assets":{"get":{"tags":["assets"],"operationId":"assets.list","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"cursor","in":"query","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false},{"name":"limit","in":"query","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"assets":{"type":"array","items":{"type":"object","properties":{"fileId":{"type":"string"},"url":{"type":"string"},"name":{"type":"string"},"size":{"type":"number"},"mimeType":{"type":"string"}},"required":["fileId","url","name","size","mimeType"],"additionalProperties":false}},"cursor":{"anyOf":[{"type":"string"},{"type":"null"}]},"hasMore":{"type":"boolean"}},"required":["assets","hasMore"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/workspaces/{workspaceId}/assets/{fileId}/meta":{"get":{"tags":["assets"],"operationId":"assets.getMetadata","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"fileId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"fileId":{"type":"string"},"url":{"type":"string"},"name":{"type":"string"},"size":{"type":"number"},"mimeType":{"type":"string"}},"required":["fileId","url","name","size","mimeType"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/workspaces/{workspaceId}/assets/{fileId}":{"delete":{"tags":["assets"],"operationId":"assets.delete","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"fileId","in":"path","schema":{"type":"string"},"required":true},{"name":"force","in":"query","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"fileId":{"type":"string"}},"required":["fileId"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/workspaces/{workspaceId}/assets/{fileId}/rotate-access-key":{"post":{"tags":["assets"],"operationId":"assets.rotateAccessKey","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"fileId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"fileId":{"type":"string"},"accessKey":{"type":"string"}},"required":["fileId","accessKey"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/workspaces/{workspaceId}/integrations/providers":{"get":{"tags":["integrations"],"operationId":"integrations.listProviders","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"provider":{"type":"string"},"label":{"type":"string"},"category":{"type":"string"},"authKinds":{"type":"array","items":{"type":"string","enum":["api_key","oauth","webhook","none"]}},"capabilities":{"type":"array","items":{"type":"string"}},"installKind":{"type":"string","enum":["github_app","oauth2","manual"]},"enabled":{"type":"boolean"},"configured":{"type":"boolean"},"installFields":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"required":{"type":"boolean"},"placeholder":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["key","label","required"],"additionalProperties":false}},{"type":"null"}]},"docsUrl":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["provider","label","category","authKinds","capabilities","installKind","enabled","configured"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/workspaces/{workspaceId}/integrations/providers/{provider}/install":{"post":{"tags":["integrations"],"operationId":"integrations.startInstall","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"provider","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"provider":{"type":"string"},"installKind":{"type":"string","enum":["github_app","oauth2","manual"]},"url":{"type":"string"},"state":{"type":"string"},"expiresAt":{"type":"string"}},"required":["provider","installKind","url","state","expiresAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"key":{"anyOf":[{"type":"string"},{"type":"null"}]},"manifest":{"anyOf":[{"type":"object"},{"type":"null"}]},"redirectTo":{"anyOf":[{"type":"string"},{"type":"null"}]}},"additionalProperties":false}}},"required":true}}},"/v1/workspaces/{workspaceId}/integrations/connections":{"get":{"tags":["integrations"],"operationId":"integrations.listConnections","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"provider":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"enabled":{"type":"boolean"},"authKind":{"type":"string","enum":["api_key","oauth","webhook","none"]},"hasSecret":{"type":"boolean"},"externalAccountId":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"manifest":{"type":"object"},"createdByUserId":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","provider","key","label","enabled","authKind","hasSecret","manifest"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"post":{"tags":["integrations"],"operationId":"integrations.createConnection","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"provider":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"enabled":{"type":"boolean"},"authKind":{"type":"string","enum":["api_key","oauth","webhook","none"]},"hasSecret":{"type":"boolean"},"externalAccountId":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"manifest":{"type":"object"},"createdByUserId":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","provider","key","label","enabled","authKind","hasSecret","manifest"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"provider":{"type":"string"},"key":{"anyOf":[{"type":"string"},{"type":"null"}]},"label":{"type":"string"},"authKind":{"anyOf":[{"type":"string","enum":["api_key","oauth","webhook","none"]},{"type":"null"}]},"secret":{"anyOf":[{"type":"object"},{"type":"null"}]},"externalAccountId":{"anyOf":[{"type":"string"},{"type":"null"}]},"manifest":{"anyOf":[{"type":"object"},{"type":"null"}]}},"required":["provider","label"],"additionalProperties":false}}},"required":true}}},"/v1/workspaces/{workspaceId}/integrations/connections/{connectionId}":{"get":{"tags":["integrations"],"operationId":"integrations.getConnection","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"connectionId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"provider":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"enabled":{"type":"boolean"},"authKind":{"type":"string","enum":["api_key","oauth","webhook","none"]},"hasSecret":{"type":"boolean"},"externalAccountId":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"manifest":{"type":"object"},"createdByUserId":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","provider","key","label","enabled","authKind","hasSecret","manifest"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"patch":{"tags":["integrations"],"operationId":"integrations.updateConnection","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"connectionId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"provider":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"enabled":{"type":"boolean"},"authKind":{"type":"string","enum":["api_key","oauth","webhook","none"]},"hasSecret":{"type":"boolean"},"externalAccountId":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"manifest":{"type":"object"},"createdByUserId":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","provider","key","label","enabled","authKind","hasSecret","manifest"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"authKind":{"anyOf":[{"type":"string","enum":["api_key","oauth","webhook","none"]},{"type":"null"}]},"secret":{"anyOf":[{"anyOf":[{"type":"object"},{"type":"null"}]},{"type":"null"}]},"externalAccountId":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"manifest":{"anyOf":[{"type":"object"},{"type":"null"}]}},"additionalProperties":false}}},"required":true}},"delete":{"tags":["integrations"],"operationId":"integrations.deleteConnection","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"connectionId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/workspaces/{workspaceId}/integrations/connections/{connectionId}/sync":{"post":{"tags":["integrations"],"operationId":"integrations.runSync","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"connectionId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"connectionId":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"dataSourceId":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"provider":{"type":"string"},"status":{"type":"string","enum":["running","succeeded","failed"]},"trigger":{"type":"string"},"cursorBefore":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"cursorAfter":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"stats":{"type":"object"},"error":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"startedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"completedAt":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]}},"required":["id","workspaceId","provider","status","trigger","stats"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"trigger":{"anyOf":[{"type":"string"},{"type":"null"}]},"scope":{"anyOf":[{"type":"string"},{"type":"null"}]}},"additionalProperties":false}}},"required":true}}},"/v1/workspaces/{workspaceId}/integrations/sync-runs":{"get":{"tags":["integrations"],"operationId":"integrations.listSyncRuns","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"limit","in":"query","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"connectionId":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"dataSourceId":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"provider":{"type":"string"},"status":{"type":"string","enum":["running","succeeded","failed"]},"trigger":{"type":"string"},"cursorBefore":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"cursorAfter":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"stats":{"type":"object"},"error":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"startedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"completedAt":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]}},"required":["id","workspaceId","provider","status","trigger","stats"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/workspaces/{workspaceId}/integrations/resources/browse":{"post":{"tags":["integrations"],"operationId":"integrations.browseResources","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"resources":{"type":"array","items":{"type":"object","properties":{"externalType":{"type":"string"},"externalId":{"type":"string"},"name":{"type":"string"},"surfaceKind":{"type":"string","enum":["generic","folder","file","document","spreadsheet","repository","calendar","record","conversation"]},"capabilities":{"type":"array","items":{"type":"string","enum":["browse","read","write","create","move","delete","search","comments","revisions","export"]}},"mimeType":{"anyOf":[{"type":"string"},{"type":"null"}]},"canonicalUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"parentExternalId":{"anyOf":[{"type":"string"},{"type":"null"}]},"revision":{"anyOf":[{"type":"string"},{"type":"null"}]},"providerCreatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"providerModifiedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"metadata":{"anyOf":[{"type":"object"},{"type":"null"}]}},"required":["externalType","externalId","name","surfaceKind","capabilities"],"additionalProperties":false}},"cursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["resources"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"connectionId":{"type":"string"},"parentExternalId":{"anyOf":[{"type":"string"},{"type":"null"}]},"externalType":{"anyOf":[{"type":"string"},{"type":"null"}]},"query":{"anyOf":[{"type":"string"},{"type":"null"}]},"cursor":{"anyOf":[{"type":"string"},{"type":"null"}]},"limit":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["connectionId"],"additionalProperties":false}}},"required":true}}},"/v1/workspaces/{workspaceId}/integrations/items/{itemId}/sync-children":{"post":{"tags":["integrations"],"operationId":"integrations.syncFolderChildren","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"itemId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","examples":["0b6f2e6a-9f2c-4e7a-8d31-2c1e7a9f2c4e"]},"workspaceId":{"type":"string","examples":["4b81aa0c-6d2f-4b19-9f0e-1a7c3d5e8b02"]},"parentItemId":{"anyOf":[{"type":"string","examples":["d3a7f1b8-5c04-4e62-9a11-7b2e6c0d4f39"]},{"type":"null"}]},"kind":{"type":"string","enum":["folder","page","note","dashboard","canvas","view","form","database","file","data_source","action","automation","external_resource"],"examples":["database"]},"targetId":{"anyOf":[{"type":"string","examples":["9f2c1e7a-3b58-4d0c-8e27-6a1f9d4b3c85"]},{"type":"null"}]},"title":{"type":"string","examples":["Launch tasks"]},"icon":{"anyOf":[{"type":"string","examples":["rocket"]},{"type":"null"}]},"color":{"anyOf":[{"type":"string","examples":["#2f6f4f"]},{"type":"null"}]},"order":{"type":"number"},"archived":{"type":"boolean","examples":[false]},"accessMode":{"type":"string","enum":["open","restricted"],"examples":["open"]},"metadata":{"type":"object"},"createdAt":{"anyOf":[{"type":"string","examples":["2026-07-01T09:12:44.000Z"]},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","examples":["2026-07-14T16:03:10.000Z"]},{"type":"null"}]}},"required":["id","workspaceId","kind","title","order","archived","accessMode","metadata"],"additionalProperties":false}}},"required":["items"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/workspaces/{workspaceId}/integrations/resources":{"get":{"tags":["integrations"],"operationId":"integrations.listResources","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"connectionId":{"type":"string"},"provider":{"type":"string"},"externalType":{"type":"string"},"externalId":{"type":"string"},"name":{"type":"string"},"surfaceKind":{"type":"string","enum":["generic","folder","file","document","spreadsheet","repository","calendar","record","conversation"]},"ownership":{"type":"string","enum":["external","snoze","snapshot"]},"capabilities":{"type":"array","items":{"type":"string","enum":["browse","read","write","create","move","delete","search","comments","revisions","export"]}},"mimeType":{"anyOf":[{"type":"string"},{"type":"null"}]},"canonicalUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"parentExternalId":{"anyOf":[{"type":"string"},{"type":"null"}]},"revision":{"anyOf":[{"type":"string"},{"type":"null"}]},"providerCreatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"providerModifiedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"metadata":{"type":"object"},"syncStatus":{"type":"string","enum":["current","stale","syncing","error"]},"lastSyncedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","connectionId","provider","externalType","externalId","name","surfaceKind","ownership","capabilities","metadata","syncStatus"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/workspaces/{workspaceId}/integrations/resources/{resourceId}/content":{"get":{"tags":["integrations"],"operationId":"integrations.getResourceContent","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"resourceId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"resource":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"connectionId":{"type":"string"},"provider":{"type":"string"},"externalType":{"type":"string"},"externalId":{"type":"string"},"name":{"type":"string"},"surfaceKind":{"type":"string","enum":["generic","folder","file","document","spreadsheet","repository","calendar","record","conversation"]},"ownership":{"type":"string","enum":["external","snoze","snapshot"]},"capabilities":{"type":"array","items":{"type":"string","enum":["browse","read","write","create","move","delete","search","comments","revisions","export"]}},"mimeType":{"anyOf":[{"type":"string"},{"type":"null"}]},"canonicalUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"parentExternalId":{"anyOf":[{"type":"string"},{"type":"null"}]},"revision":{"anyOf":[{"type":"string"},{"type":"null"}]},"providerCreatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"providerModifiedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"metadata":{"type":"object"},"syncStatus":{"type":"string","enum":["current","stale","syncing","error"]},"lastSyncedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","connectionId","provider","externalType","externalId","name","surfaceKind","ownership","capabilities","metadata","syncStatus"],"additionalProperties":false},"format":{"type":"string","enum":["json","text","html","markdown","grid"]},"content":{},"revision":{"anyOf":[{"type":"string"},{"type":"null"}]},"readOnly":{"type":"boolean"},"fallbackUrl":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["resource","format","content","readOnly"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/workspaces/{workspaceId}/integrations/resources/read":{"post":{"tags":["integrations"],"operationId":"integrations.readResourceRef","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"format":{"type":"string","enum":["json","text","html","markdown","grid"]},"content":{},"revision":{"anyOf":[{"type":"string"},{"type":"null"}]},"readOnly":{"type":"boolean"},"fallbackUrl":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["format","content","readOnly"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"connectionId":{"type":"string"},"resource":{"type":"object","properties":{"externalType":{"type":"string"},"externalId":{"type":"string"},"name":{"type":"string"},"surfaceKind":{"type":"string","enum":["generic","folder","file","document","spreadsheet","repository","calendar","record","conversation"]},"capabilities":{"type":"array","items":{"type":"string","enum":["browse","read","write","create","move","delete","search","comments","revisions","export"]}},"mimeType":{"anyOf":[{"type":"string"},{"type":"null"}]},"canonicalUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"parentExternalId":{"anyOf":[{"type":"string"},{"type":"null"}]},"revision":{"anyOf":[{"type":"string"},{"type":"null"}]},"providerCreatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"providerModifiedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"metadata":{"anyOf":[{"type":"object"},{"type":"null"}]}},"required":["externalType","externalId","name","surfaceKind","capabilities"],"additionalProperties":false}},"required":["connectionId","resource"],"additionalProperties":false}}},"required":true}}},"/v1/workspaces/{workspaceId}/integrations/placements/{placementId}":{"get":{"tags":["integrations"],"operationId":"integrations.getPlacement","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"placementId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"resource":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"connectionId":{"type":"string"},"provider":{"type":"string"},"externalType":{"type":"string"},"externalId":{"type":"string"},"name":{"type":"string"},"surfaceKind":{"type":"string","enum":["generic","folder","file","document","spreadsheet","repository","calendar","record","conversation"]},"ownership":{"type":"string","enum":["external","snoze","snapshot"]},"capabilities":{"type":"array","items":{"type":"string","enum":["browse","read","write","create","move","delete","search","comments","revisions","export"]}},"mimeType":{"anyOf":[{"type":"string"},{"type":"null"}]},"canonicalUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"parentExternalId":{"anyOf":[{"type":"string"},{"type":"null"}]},"revision":{"anyOf":[{"type":"string"},{"type":"null"}]},"providerCreatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"providerModifiedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"metadata":{"type":"object"},"syncStatus":{"type":"string","enum":["current","stale","syncing","error"]},"lastSyncedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","connectionId","provider","externalType","externalId","name","surfaceKind","ownership","capabilities","metadata","syncStatus"],"additionalProperties":false},"placement":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"resourceId":{"type":"string"},"workspaceItemId":{"type":"string"},"mountId":{"anyOf":[{"type":"string"},{"type":"null"}]},"kind":{"type":"string","enum":["link","mount_root","mount_child","shortcut"]},"displayName":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","resourceId","workspaceItemId","kind"],"additionalProperties":false}},"required":["resource","placement"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"delete":{"tags":["integrations"],"operationId":"integrations.unlinkPlacement","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"placementId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/workspaces/{workspaceId}/integrations/resources/link":{"post":{"tags":["integrations"],"operationId":"integrations.linkResource","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"resource":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"connectionId":{"type":"string"},"provider":{"type":"string"},"externalType":{"type":"string"},"externalId":{"type":"string"},"name":{"type":"string"},"surfaceKind":{"type":"string","enum":["generic","folder","file","document","spreadsheet","repository","calendar","record","conversation"]},"ownership":{"type":"string","enum":["external","snoze","snapshot"]},"capabilities":{"type":"array","items":{"type":"string","enum":["browse","read","write","create","move","delete","search","comments","revisions","export"]}},"mimeType":{"anyOf":[{"type":"string"},{"type":"null"}]},"canonicalUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"parentExternalId":{"anyOf":[{"type":"string"},{"type":"null"}]},"revision":{"anyOf":[{"type":"string"},{"type":"null"}]},"providerCreatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"providerModifiedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"metadata":{"type":"object"},"syncStatus":{"type":"string","enum":["current","stale","syncing","error"]},"lastSyncedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","connectionId","provider","externalType","externalId","name","surfaceKind","ownership","capabilities","metadata","syncStatus"],"additionalProperties":false},"placement":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"resourceId":{"type":"string"},"workspaceItemId":{"type":"string"},"mountId":{"anyOf":[{"type":"string"},{"type":"null"}]},"kind":{"type":"string","enum":["link","mount_root","mount_child","shortcut"]},"displayName":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","resourceId","workspaceItemId","kind"],"additionalProperties":false}},"required":["resource","placement"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"connectionId":{"type":"string"},"resource":{"type":"object","properties":{"externalType":{"type":"string"},"externalId":{"type":"string"},"name":{"type":"string"},"surfaceKind":{"type":"string","enum":["generic","folder","file","document","spreadsheet","repository","calendar","record","conversation"]},"capabilities":{"type":"array","items":{"type":"string","enum":["browse","read","write","create","move","delete","search","comments","revisions","export"]}},"mimeType":{"anyOf":[{"type":"string"},{"type":"null"}]},"canonicalUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"parentExternalId":{"anyOf":[{"type":"string"},{"type":"null"}]},"revision":{"anyOf":[{"type":"string"},{"type":"null"}]},"providerCreatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"providerModifiedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"metadata":{"anyOf":[{"type":"object"},{"type":"null"}]}},"required":["externalType","externalId","name","surfaceKind","capabilities"],"additionalProperties":false},"parentItemId":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"placementKind":{"anyOf":[{"type":"string","enum":["link","shortcut"]},{"type":"null"}]},"clientMutationId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["connectionId","resource"],"additionalProperties":false}}},"required":true}}},"/v1/workspaces/{workspaceId}/integrations/resources/mount":{"post":{"tags":["integrations"],"operationId":"integrations.mountResource","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"resource":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"connectionId":{"type":"string"},"provider":{"type":"string"},"externalType":{"type":"string"},"externalId":{"type":"string"},"name":{"type":"string"},"surfaceKind":{"type":"string","enum":["generic","folder","file","document","spreadsheet","repository","calendar","record","conversation"]},"ownership":{"type":"string","enum":["external","snoze","snapshot"]},"capabilities":{"type":"array","items":{"type":"string","enum":["browse","read","write","create","move","delete","search","comments","revisions","export"]}},"mimeType":{"anyOf":[{"type":"string"},{"type":"null"}]},"canonicalUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"parentExternalId":{"anyOf":[{"type":"string"},{"type":"null"}]},"revision":{"anyOf":[{"type":"string"},{"type":"null"}]},"providerCreatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"providerModifiedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"metadata":{"type":"object"},"syncStatus":{"type":"string","enum":["current","stale","syncing","error"]},"lastSyncedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","connectionId","provider","externalType","externalId","name","surfaceKind","ownership","capabilities","metadata","syncStatus"],"additionalProperties":false},"placement":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"resourceId":{"type":"string"},"workspaceItemId":{"type":"string"},"mountId":{"anyOf":[{"type":"string"},{"type":"null"}]},"kind":{"type":"string","enum":["link","mount_root","mount_child","shortcut"]},"displayName":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","resourceId","workspaceItemId","kind"],"additionalProperties":false},"mount":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"connectionId":{"type":"string"},"provider":{"type":"string"},"rootResourceId":{"type":"string"},"rootPlacementId":{"type":"string"},"mode":{"type":"string","enum":["live","on_demand","snapshot"]},"recursive":{"type":"boolean"},"enabled":{"type":"boolean"},"cursor":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastSyncedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","connectionId","provider","rootResourceId","rootPlacementId","mode","recursive","enabled"],"additionalProperties":false}},"required":["resource","placement","mount"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"connectionId":{"type":"string"},"resource":{"type":"object","properties":{"externalType":{"type":"string"},"externalId":{"type":"string"},"name":{"type":"string"},"surfaceKind":{"type":"string","enum":["generic","folder","file","document","spreadsheet","repository","calendar","record","conversation"]},"capabilities":{"type":"array","items":{"type":"string","enum":["browse","read","write","create","move","delete","search","comments","revisions","export"]}},"mimeType":{"anyOf":[{"type":"string"},{"type":"null"}]},"canonicalUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"parentExternalId":{"anyOf":[{"type":"string"},{"type":"null"}]},"revision":{"anyOf":[{"type":"string"},{"type":"null"}]},"providerCreatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"providerModifiedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"metadata":{"anyOf":[{"type":"object"},{"type":"null"}]}},"required":["externalType","externalId","name","surfaceKind","capabilities"],"additionalProperties":false},"parentItemId":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"mode":{"anyOf":[{"type":"string","enum":["live","on_demand","snapshot"]},{"type":"null"}]},"recursive":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"clientMutationId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["connectionId","resource"],"additionalProperties":false}}},"required":true}}},"/v1/workspaces/{workspaceId}/integrations/operations":{"get":{"tags":["integrations"],"operationId":"integrations.listOperations","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"provider":{"type":"string"},"operation":{"type":"string"},"label":{"type":"string"},"description":{"type":"string"},"resourceTypes":{"type":"array","items":{"type":"string"}},"inputFields":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"kind":{"type":"string","enum":["string","number","boolean","json","resource","string_array"]},"required":{"type":"boolean"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"placeholder":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["key","label","kind","required"],"additionalProperties":false}},"mutates":{"type":"boolean"},"requiresConfirmation":{"type":"boolean"}},"required":["provider","operation","label","description","resourceTypes","inputFields","mutates","requiresConfirmation"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/workspaces/{workspaceId}/integrations/operations/run":{"post":{"tags":["integrations"],"operationId":"integrations.executeOperation","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"connectionId":{"type":"string"},"provider":{"type":"string"},"operation":{"type":"string"},"resourceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["running","succeeded","failed"]},"input":{"type":"object"},"output":{"type":"object"},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"actorUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"startedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"completedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","connectionId","provider","operation","status","input","output"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"connectionId":{"type":"string"},"operation":{"type":"string"},"resourceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"externalType":{"anyOf":[{"type":"string"},{"type":"null"}]},"externalId":{"anyOf":[{"type":"string"},{"type":"null"}]},"input":{"anyOf":[{"type":"object"},{"type":"null"}]},"expectedRevision":{"anyOf":[{"type":"string"},{"type":"null"}]},"confirmed":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"clientMutationId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["connectionId","operation"],"additionalProperties":false}}},"required":true}}},"/v1/workspaces/{workspaceId}/integrations/operation-runs":{"get":{"tags":["integrations"],"operationId":"integrations.listOperationRuns","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true},{"name":"limit","in":"query","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"connectionId":{"type":"string"},"provider":{"type":"string"},"operation":{"type":"string"},"resourceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["running","succeeded","failed"]},"input":{"type":"object"},"output":{"type":"object"},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"actorUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"startedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"completedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","connectionId","provider","operation","status","input","output"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/auth/me":{"get":{"tags":["auth"],"operationId":"auth.me","parameters":[],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"clerkUserId":{"type":"string"},"sessionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"emailVerified":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"displayName":{"anyOf":[{"type":"string"},{"type":"null"}]},"avatarUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"principalType":{"anyOf":[{"type":"string","enum":["user","api_key","system","provider_installation"]},{"type":"null"}]},"principalId":{"anyOf":[{"type":"string"},{"type":"null"}]},"principalWorkspaceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"principalScopes":{"anyOf":[{"type":"array","items":{"type":"string","enum":["workspace:read","workspace:update","workspace:delete","members:read","members:invite","members:manage","workspace_changes:read","workspace_changes:propose","workspace_changes:apply","resources:read","resources:write","surfaces:read","surfaces:write","blocks:read","blocks:write","blocks:comment","canvas:read","canvas:write","files:read","files:write","databases:read","databases:write","records:read","records:write","records:comment","time_entries:read","time_entries:write","time_entries:manage","views:read","views:write","data_sources:read","data_sources:write","models:read","models:write","actions:read","actions:write","actions:run","automations:read","automations:write","api_keys:read","api_keys:write","webhooks:read","webhooks:write","integrations:read","integrations:write","ai:read","ai:write","billing:read","billing:manage"]}},{"type":"null"}]},"principalLabel":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["clerkUserId"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/workspaces/{workspaceId}/billing/subscription":{"get":{"tags":["billing"],"operationId":"billing.getSubscription","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"subscription":{"type":"object","properties":{"workspaceId":{"type":"string"},"plan":{"type":"string","enum":["free","pro","team","enterprise"]},"status":{"type":"string","enum":["none","trialing","active","past_due","canceled","unpaid","incomplete"]},"polarCustomerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"polarSubscriptionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"polarProductId":{"anyOf":[{"type":"string"},{"type":"null"}]},"cancelAtPeriodEnd":{"type":"boolean"},"currentPeriodEnd":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["workspaceId","plan","status","polarCustomerId","polarSubscriptionId","polarProductId","cancelAtPeriodEnd","currentPeriodEnd"],"additionalProperties":false},"entitlements":{"type":"object","properties":{"plan":{"type":"string","enum":["free","pro","team","enterprise"]},"status":{"type":"string","enum":["none","trialing","active","past_due","canceled","unpaid","incomplete"]},"maxWorkspaceMembers":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDatabases":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDataSources":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxStorageBytes":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxFileSizeBytes":{"anyOf":[{"type":"number"},{"type":"null"}]},"features":{"type":"array","items":{"type":"string"}}},"required":["plan","status","maxWorkspaceMembers","maxDatabases","maxDataSources","maxStorageBytes","maxFileSizeBytes","features"],"additionalProperties":false}},"required":["subscription","entitlements"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/workspaces/{workspaceId}/billing/plans":{"get":{"tags":["billing"],"operationId":"billing.getPlanCatalog","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"catalog":{"type":"object","properties":{"plans":{"type":"array","items":{"type":"object","properties":{"plan":{"type":"string","enum":["free","pro","team","enterprise"]},"name":{"type":"string"},"tagline":{"type":"string"},"bullets":{"type":"array","items":{"type":"string"}},"selfServe":{"type":"boolean"},"maxWorkspaceMembers":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDatabases":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDataSources":{"anyOf":[{"type":"number"},{"type":"null"}]},"features":{"type":"array","items":{"type":"string"}},"prices":{"type":"object","properties":{"month":{"anyOf":[{"type":"object","properties":{"amountCents":{"type":"number"},"currency":{"type":"string"},"checkoutReady":{"type":"boolean"}},"required":["amountCents","currency","checkoutReady"],"additionalProperties":false},{"type":"null"}]},"year":{"anyOf":[{"type":"object","properties":{"amountCents":{"type":"number"},"currency":{"type":"string"},"checkoutReady":{"type":"boolean"}},"required":["amountCents","currency","checkoutReady"],"additionalProperties":false},{"type":"null"}]}},"required":["month","year"],"additionalProperties":false}},"required":["plan","name","tagline","bullets","selfServe","maxWorkspaceMembers","maxDatabases","maxDataSources","features","prices"],"additionalProperties":false}}},"required":["plans"],"additionalProperties":false},"plan":{"type":"string","enum":["free","pro","team","enterprise"]},"status":{"type":"string","enum":["none","trialing","active","past_due","canceled","unpaid","incomplete"]}},"required":["catalog","plan","status"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/workspaces/{workspaceId}/billing/ai-usage":{"get":{"tags":["billing"],"operationId":"billing.getAiUsage","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"plan":{"type":"string","enum":["free","pro","team","enterprise"]},"unlimited":{"type":"boolean"},"source":{"type":"string","enum":["seat","free"]},"base":{"type":"object","properties":{"remaining":{"type":"number"},"refillsAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["remaining","refillsAt"],"additionalProperties":false},"overage":{"type":"object","properties":{"remaining":{"type":"number"},"refillsAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["remaining","refillsAt"],"additionalProperties":false}},"required":["plan","unlimited","source","base","overage"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/workspaces/{workspaceId}/billing/detail":{"get":{"tags":["billing"],"operationId":"billing.getBillingDetail","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"invoices":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"createdAt":{"type":"string"},"amountCents":{"type":"number"},"currency":{"type":"string"},"status":{"type":"string"},"paid":{"type":"boolean"},"invoiceUrl":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","createdAt","amountCents","currency","status","paid","invoiceUrl"],"additionalProperties":false}},"paymentMethod":{"anyOf":[{"type":"object","properties":{"brand":{"anyOf":[{"type":"string"},{"type":"null"}]},"last4":{"anyOf":[{"type":"string"},{"type":"null"}]},"expMonth":{"anyOf":[{"type":"number"},{"type":"null"}]},"expYear":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["brand","last4","expMonth","expYear"],"additionalProperties":false},{"type":"null"}]}},"required":["invoices","paymentMethod"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/workspaces/{workspaceId}/billing/change-plan":{"post":{"tags":["billing"],"operationId":"billing.changePlan","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"workspaceId":{"type":"string"},"plan":{"type":"string","enum":["free","pro","team","enterprise"]},"status":{"type":"string","enum":["none","trialing","active","past_due","canceled","unpaid","incomplete"]},"polarCustomerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"polarSubscriptionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"polarProductId":{"anyOf":[{"type":"string"},{"type":"null"}]},"cancelAtPeriodEnd":{"type":"boolean"},"currentPeriodEnd":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["workspaceId","plan","status","polarCustomerId","polarSubscriptionId","polarProductId","cancelAtPeriodEnd","currentPeriodEnd"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"plan":{"type":"string","enum":["free","pro","team","enterprise"]},"interval":{"type":"string","enum":["month","year"]},"successUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"customerEmail":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["plan","interval"],"additionalProperties":false}}},"required":true}}},"/v1/workspaces/{workspaceId}/billing/ai-seats":{"get":{"tags":["billing"],"operationId":"billing.getAiSeats","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"seatPriceCents":{"type":"number"},"enabledSeats":{"type":"number"},"billableSeats":{"type":"number"},"monthlyCents":{"type":"number"},"members":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"},"displayName":{"type":"string"},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"role":{"type":"string"},"hasSeat":{"type":"boolean"},"included":{"type":"boolean"}},"required":["userId","displayName","email","role","hasSeat","included"],"additionalProperties":false}}},"required":["seatPriceCents","enabledSeats","billableSeats","monthlyCents","members"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"put":{"tags":["billing"],"operationId":"billing.setAiSeat","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"seatPriceCents":{"type":"number"},"enabledSeats":{"type":"number"},"billableSeats":{"type":"number"},"monthlyCents":{"type":"number"},"members":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"},"displayName":{"type":"string"},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"role":{"type":"string"},"hasSeat":{"type":"boolean"},"included":{"type":"boolean"}},"required":["userId","displayName","email","role","hasSeat","included"],"additionalProperties":false}}},"required":["seatPriceCents","enabledSeats","billableSeats","monthlyCents","members"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"userId":{"type":"string"},"enabled":{"type":"boolean"}},"required":["userId","enabled"],"additionalProperties":false}}},"required":true}}},"/v1/workspaces/{workspaceId}/billing/checkout":{"post":{"tags":["billing"],"operationId":"billing.createCheckout","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"}},"required":["id","url"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"plan":{"type":"string","enum":["free","pro","team","enterprise"]},"interval":{"type":"string","enum":["month","year"]},"successUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"customerEmail":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["plan","interval"],"additionalProperties":false}}},"required":true}}},"/v1/workspaces/{workspaceId}/billing/portal":{"post":{"tags":["billing"],"operationId":"billing.customerPortal","parameters":[{"name":"workspaceId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"url":{"type":"string"}},"required":["url"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/billing/pricing":{"get":{"tags":["billing"],"operationId":"billing.getPublicPricing","parameters":[],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"plans":{"type":"array","items":{"type":"object","properties":{"plan":{"type":"string","enum":["free","pro","team","enterprise"]},"name":{"type":"string"},"tagline":{"type":"string"},"bullets":{"type":"array","items":{"type":"string"}},"selfServe":{"type":"boolean"},"maxWorkspaceMembers":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDatabases":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDataSources":{"anyOf":[{"type":"number"},{"type":"null"}]},"features":{"type":"array","items":{"type":"string"}},"prices":{"type":"object","properties":{"month":{"anyOf":[{"type":"object","properties":{"amountCents":{"type":"number"},"currency":{"type":"string"},"checkoutReady":{"type":"boolean"}},"required":["amountCents","currency","checkoutReady"],"additionalProperties":false},{"type":"null"}]},"year":{"anyOf":[{"type":"object","properties":{"amountCents":{"type":"number"},"currency":{"type":"string"},"checkoutReady":{"type":"boolean"}},"required":["amountCents","currency","checkoutReady"],"additionalProperties":false},{"type":"null"}]}},"required":["month","year"],"additionalProperties":false}},"required":["plan","name","tagline","bullets","selfServe","maxWorkspaceMembers","maxDatabases","maxDataSources","features","prices"],"additionalProperties":false}}},"required":["plans"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/admin/bootstrap-status":{"get":{"tags":["admin"],"operationId":"admin.bootstrapStatus","parameters":[],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"bootstrapAvailable":{"type":"boolean"},"adminCount":{"type":"number"}},"required":["bootstrapAvailable","adminCount"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/admin/bootstrap-owner":{"post":{"tags":["admin"],"operationId":"admin.createBootstrapOwner","parameters":[],"security":[{"apiKey":[]}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"displayName":{"anyOf":[{"type":"string"},{"type":"null"}]},"role":{"type":"string","enum":["owner","admin"]},"status":{"type":"string","enum":["active","invited","disabled"]},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"activatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","email","role","status"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/admin/bootstrap":{"get":{"tags":["admin"],"operationId":"admin.getBootstrap","parameters":[],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"actorEmail":{"anyOf":[{"type":"string"},{"type":"null"}]},"bootstrapAvailable":{"type":"boolean"},"admin":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"displayName":{"anyOf":[{"type":"string"},{"type":"null"}]},"role":{"type":"string","enum":["owner","admin"]},"status":{"type":"string","enum":["active","invited","disabled"]},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"activatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","email","role","status"],"additionalProperties":false},{"type":"null"}]}},"required":["bootstrapAvailable"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/admin/dashboard":{"get":{"tags":["admin"],"operationId":"admin.getDashboard","parameters":[],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"generatedAt":{"type":"string"},"metrics":{"type":"object","properties":{"activeFlags":{"type":"number"},"activeExperiments":{"type":"number"},"activeRollouts":{"type":"number"},"failedRuns24h":{"type":"number"},"affectedWorkspaces":{"type":"number"},"auditWarnings24h":{"type":"number"}},"required":["activeFlags","activeExperiments","activeRollouts","failedRuns24h","affectedWorkspaces","auditWarnings24h"],"additionalProperties":false},"flags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"key":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"owner":{"type":"string"},"category":{"anyOf":[{"type":"string"},{"type":"null"}]},"controlType":{"anyOf":[{"type":"string","enum":["release","entitlement","kill_switch","ops"]},{"type":"null"}]},"registered":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"status":{"type":"string","enum":["enabled","disabled","staged","archived"]},"rollout":{"type":"number"},"environment":{"type":"string","enum":["development","staging","production"]},"target":{"type":"string"},"changedBy":{"type":"string"},"changedAt":{"type":"string"},"risk":{"type":"string","enum":["low","medium","high"]},"linkedExperimentId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","key","name","description","owner","status","rollout","environment","target","changedBy","changedAt","risk"],"additionalProperties":false}},"experiments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"hypothesis":{"type":"string"},"targetType":{"anyOf":[{"type":"string","enum":["flag","surface","flow","pricing"]},{"type":"null"}]},"targetKey":{"anyOf":[{"type":"string"},{"type":"null"}]},"assignmentUnit":{"anyOf":[{"type":"string","enum":["workspace","user"]},{"type":"null"}]},"status":{"type":"string","enum":["draft","running","paused","completed"]},"flagKey":{"type":"string"},"audience":{"type":"string"},"allocation":{"type":"number"},"primaryMetric":{"type":"string"},"guardrailMetric":{"type":"string"},"startedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"endsAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"winner":{"anyOf":[{"type":"string"},{"type":"null"}]},"variants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"split":{"type":"number"},"exposures":{"type":"number"},"conversionRate":{"type":"number"},"errorRate":{"type":"number"}},"required":["id","label","split","exposures","conversionRate","errorRate"],"additionalProperties":false}}},"required":["id","name","hypothesis","status","flagKey","audience","allocation","primaryMetric","guardrailMetric","variants"],"additionalProperties":false}},"segments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"rules":{"type":"array","items":{"type":"string"}},"matches":{"type":"number"},"usedBy":{"type":"array","items":{"type":"string"}}},"required":["id","name","description","rules","matches","usedBy"],"additionalProperties":false}},"auditEvents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"actor":{"type":"string"},"action":{"type":"string"},"resource":{"type":"string"},"summary":{"type":"string"},"createdAt":{"type":"string"},"severity":{"type":"string","enum":["info","warning","critical"]}},"required":["id","actor","action","resource","summary","createdAt","severity"],"additionalProperties":false}},"runs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["action","automation","tool"]},"label":{"type":"string"},"status":{"type":"string","enum":["completed","failed","running"]},"workspace":{"type":"string"},"durationMs":{"type":"number"},"startedAt":{"type":"string"},"error":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","kind","label","status","workspace","durationMs","startedAt"],"additionalProperties":false}},"policies":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"enabled":{"type":"boolean"},"appliesTo":{"type":"string"}},"required":["id","name","description","enabled","appliesTo"],"additionalProperties":false}},"admins":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"displayName":{"anyOf":[{"type":"string"},{"type":"null"}]},"role":{"type":"string","enum":["owner","admin"]},"status":{"type":"string","enum":["active","invited","disabled"]},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"activatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","email","role","status"],"additionalProperties":false}}},"required":["generatedAt","metrics","flags","experiments","segments","auditEvents","runs","policies","admins"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/admin/flags":{"get":{"tags":["admin"],"operationId":"admin.listFlags","parameters":[],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"key":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"owner":{"type":"string"},"category":{"anyOf":[{"type":"string"},{"type":"null"}]},"controlType":{"anyOf":[{"type":"string","enum":["release","entitlement","kill_switch","ops"]},{"type":"null"}]},"registered":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"status":{"type":"string","enum":["enabled","disabled","staged","archived"]},"rollout":{"type":"number"},"environment":{"type":"string","enum":["development","staging","production"]},"target":{"type":"string"},"changedBy":{"type":"string"},"changedAt":{"type":"string"},"risk":{"type":"string","enum":["low","medium","high"]},"linkedExperimentId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","key","name","description","owner","status","rollout","environment","target","changedBy","changedAt","risk"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"post":{"tags":["admin"],"operationId":"admin.createFlag","parameters":[],"security":[{"apiKey":[]}],"responses":{"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/admin/flags/{flagId}":{"patch":{"tags":["admin"],"operationId":"admin.updateFlag","parameters":[{"name":"flagId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"key":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"owner":{"type":"string"},"category":{"anyOf":[{"type":"string"},{"type":"null"}]},"controlType":{"anyOf":[{"type":"string","enum":["release","entitlement","kill_switch","ops"]},{"type":"null"}]},"registered":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"status":{"type":"string","enum":["enabled","disabled","staged","archived"]},"rollout":{"type":"number"},"environment":{"type":"string","enum":["development","staging","production"]},"target":{"type":"string"},"changedBy":{"type":"string"},"changedAt":{"type":"string"},"risk":{"type":"string","enum":["low","medium","high"]},"linkedExperimentId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","key","name","description","owner","status","rollout","environment","target","changedBy","changedAt","risk"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"rollout":{"anyOf":[{"type":"number"},{"type":"null"}]},"status":{"anyOf":[{"type":"string","enum":["enabled","disabled","staged","archived"]},{"type":"null"}]},"reason":{"anyOf":[{"type":"string"},{"type":"null"}]}},"additionalProperties":false}}},"required":true}}},"/v1/admin/experiments":{"get":{"tags":["admin"],"operationId":"admin.listExperiments","parameters":[],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"hypothesis":{"type":"string"},"targetType":{"anyOf":[{"type":"string","enum":["flag","surface","flow","pricing"]},{"type":"null"}]},"targetKey":{"anyOf":[{"type":"string"},{"type":"null"}]},"assignmentUnit":{"anyOf":[{"type":"string","enum":["workspace","user"]},{"type":"null"}]},"status":{"type":"string","enum":["draft","running","paused","completed"]},"flagKey":{"type":"string"},"audience":{"type":"string"},"allocation":{"type":"number"},"primaryMetric":{"type":"string"},"guardrailMetric":{"type":"string"},"startedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"endsAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"winner":{"anyOf":[{"type":"string"},{"type":"null"}]},"variants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"split":{"type":"number"},"exposures":{"type":"number"},"conversionRate":{"type":"number"},"errorRate":{"type":"number"}},"required":["id","label","split","exposures","conversionRate","errorRate"],"additionalProperties":false}}},"required":["id","name","hypothesis","status","flagKey","audience","allocation","primaryMetric","guardrailMetric","variants"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"post":{"tags":["admin"],"operationId":"admin.createExperiment","parameters":[],"security":[{"apiKey":[]}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"hypothesis":{"type":"string"},"targetType":{"anyOf":[{"type":"string","enum":["flag","surface","flow","pricing"]},{"type":"null"}]},"targetKey":{"anyOf":[{"type":"string"},{"type":"null"}]},"assignmentUnit":{"anyOf":[{"type":"string","enum":["workspace","user"]},{"type":"null"}]},"status":{"type":"string","enum":["draft","running","paused","completed"]},"flagKey":{"type":"string"},"audience":{"type":"string"},"allocation":{"type":"number"},"primaryMetric":{"type":"string"},"guardrailMetric":{"type":"string"},"startedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"endsAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"winner":{"anyOf":[{"type":"string"},{"type":"null"}]},"variants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"split":{"type":"number"},"exposures":{"type":"number"},"conversionRate":{"type":"number"},"errorRate":{"type":"number"}},"required":["id","label","split","exposures","conversionRate","errorRate"],"additionalProperties":false}}},"required":["id","name","hypothesis","status","flagKey","audience","allocation","primaryMetric","guardrailMetric","variants"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"hypothesis":{"anyOf":[{"type":"string"},{"type":"null"}]},"flagId":{"anyOf":[{"type":"string"},{"type":"null"}]},"targetType":{"anyOf":[{"type":"string","enum":["flag","surface","flow","pricing"]},{"type":"null"}]},"targetKey":{"anyOf":[{"type":"string"},{"type":"null"}]},"assignmentUnit":{"anyOf":[{"type":"string","enum":["workspace","user"]},{"type":"null"}]},"audience":{"anyOf":[{"type":"string"},{"type":"null"}]},"allocation":{"anyOf":[{"type":"number"},{"type":"null"}]},"primaryMetric":{"anyOf":[{"type":"string"},{"type":"null"}]},"guardrailMetric":{"anyOf":[{"type":"string"},{"type":"null"}]},"variants":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]}},"required":["name"],"additionalProperties":false}}},"required":true}}},"/v1/admin/experiments/{experimentId}":{"patch":{"tags":["admin"],"operationId":"admin.updateExperiment","parameters":[{"name":"experimentId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"hypothesis":{"type":"string"},"targetType":{"anyOf":[{"type":"string","enum":["flag","surface","flow","pricing"]},{"type":"null"}]},"targetKey":{"anyOf":[{"type":"string"},{"type":"null"}]},"assignmentUnit":{"anyOf":[{"type":"string","enum":["workspace","user"]},{"type":"null"}]},"status":{"type":"string","enum":["draft","running","paused","completed"]},"flagKey":{"type":"string"},"audience":{"type":"string"},"allocation":{"type":"number"},"primaryMetric":{"type":"string"},"guardrailMetric":{"type":"string"},"startedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"endsAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"winner":{"anyOf":[{"type":"string"},{"type":"null"}]},"variants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"split":{"type":"number"},"exposures":{"type":"number"},"conversionRate":{"type":"number"},"errorRate":{"type":"number"}},"required":["id","label","split","exposures","conversionRate","errorRate"],"additionalProperties":false}}},"required":["id","name","hypothesis","status","flagKey","audience","allocation","primaryMetric","guardrailMetric","variants"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"anyOf":[{"type":"string","enum":["draft","running","paused","completed"]},{"type":"null"}]},"allocation":{"anyOf":[{"type":"number"},{"type":"null"}]},"reason":{"anyOf":[{"type":"string"},{"type":"null"}]}},"additionalProperties":false}}},"required":true}}},"/v1/admin/segments":{"get":{"tags":["admin"],"operationId":"admin.listSegments","parameters":[],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"rules":{"type":"array","items":{"type":"string"}},"matches":{"type":"number"},"usedBy":{"type":"array","items":{"type":"string"}}},"required":["id","name","description","rules","matches","usedBy"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"post":{"tags":["admin"],"operationId":"admin.createSegment","parameters":[],"security":[{"apiKey":[]}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"rules":{"type":"array","items":{"type":"string"}},"matches":{"type":"number"},"usedBy":{"type":"array","items":{"type":"string"}}},"required":["id","name","description","rules","matches","usedBy"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"rules":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]}},"required":["name"],"additionalProperties":false}}},"required":true}}},"/v1/admin/audit-events":{"get":{"tags":["admin"],"operationId":"admin.listAuditEvents","parameters":[],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"actor":{"type":"string"},"action":{"type":"string"},"resource":{"type":"string"},"summary":{"type":"string"},"createdAt":{"type":"string"},"severity":{"type":"string","enum":["info","warning","critical"]}},"required":["id","actor","action","resource","summary","createdAt","severity"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/admin/runs":{"get":{"tags":["admin"],"operationId":"admin.listRuns","parameters":[],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["action","automation","tool"]},"label":{"type":"string"},"status":{"type":"string","enum":["completed","failed","running"]},"workspace":{"type":"string"},"durationMs":{"type":"number"},"startedAt":{"type":"string"},"error":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","kind","label","status","workspace","durationMs","startedAt"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/admin/policies":{"get":{"tags":["admin"],"operationId":"admin.listPolicies","parameters":[],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"enabled":{"type":"boolean"},"appliesTo":{"type":"string"}},"required":["id","name","description","enabled","appliesTo"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/admin/policies/{policyId}":{"patch":{"tags":["admin"],"operationId":"admin.updatePolicy","parameters":[{"name":"policyId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"enabled":{"type":"boolean"},"appliesTo":{"type":"string"}},"required":["id","name","description","enabled","appliesTo"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"],"additionalProperties":false}}},"required":true}}},"/v1/admin/admins":{"get":{"tags":["admin"],"operationId":"admin.listAdmins","parameters":[],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"displayName":{"anyOf":[{"type":"string"},{"type":"null"}]},"role":{"type":"string","enum":["owner","admin"]},"status":{"type":"string","enum":["active","invited","disabled"]},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"activatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","email","role","status"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"post":{"tags":["admin"],"operationId":"admin.inviteAdmin","parameters":[],"security":[{"apiKey":[]}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"displayName":{"anyOf":[{"type":"string"},{"type":"null"}]},"role":{"type":"string","enum":["owner","admin"]},"status":{"type":"string","enum":["active","invited","disabled"]},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"activatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","email","role","status"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string"},"role":{"anyOf":[{"type":"string","enum":["owner","admin"]},{"type":"null"}]}},"required":["email"],"additionalProperties":false}}},"required":true}}},"/v1/admin/billing":{"get":{"tags":["admin-billing"],"operationId":"admin-billing.getOverview","parameters":[],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"plans":{"type":"array","items":{"type":"object","properties":{"plan":{"type":"string","enum":["free","pro","team","enterprise"]},"name":{"type":"string"},"tagline":{"type":"string"},"bullets":{"type":"array","items":{"type":"string"}},"selfServe":{"type":"boolean"},"sortOrder":{"type":"number"},"maxWorkspaceMembers":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDatabases":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDataSources":{"anyOf":[{"type":"number"},{"type":"null"}]},"features":{"type":"array","items":{"type":"string"}},"aiBaseMicrousd":{"anyOf":[{"type":"number"},{"type":"null"}]},"aiOverageMicrousd":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["plan","name","tagline","bullets","selfServe","sortOrder","maxWorkspaceMembers","maxDatabases","maxDataSources","features","aiBaseMicrousd","aiOverageMicrousd"],"additionalProperties":false}},"prices":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"plan":{"type":"string","enum":["free","pro","team","enterprise"]},"interval":{"type":"string","enum":["month","year"]},"variant":{"type":"string"},"amountCents":{"type":"number"},"currency":{"type":"string"},"polarProductId":{"anyOf":[{"type":"string"},{"type":"null"}]},"active":{"type":"boolean"},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","plan","interval","variant","amountCents","currency","polarProductId","active","updatedAt"],"additionalProperties":false}},"subscriptions":{"type":"array","items":{"type":"object","properties":{"workspaceId":{"type":"string"},"workspaceName":{"type":"string"},"plan":{"type":"string","enum":["free","pro","team","enterprise"]},"status":{"type":"string","enum":["none","trialing","active","past_due","canceled","unpaid","incomplete"]},"cancelAtPeriodEnd":{"type":"boolean"},"currentPeriodEnd":{"anyOf":[{"type":"string"},{"type":"null"}]},"polarProductId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["workspaceId","workspaceName","plan","status","cancelAtPeriodEnd","currentPeriodEnd","polarProductId","updatedAt"],"additionalProperties":false}},"pricingExperiments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"hypothesis":{"type":"string"},"status":{"type":"string","enum":["draft","running","paused","completed"]},"allocation":{"type":"number"},"assignmentUnit":{"type":"string","enum":["workspace","user"]},"audience":{"type":"string"},"startedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"winner":{"anyOf":[{"type":"string"},{"type":"null"}]},"variants":{"type":"array","items":{"type":"object","properties":{"variantId":{"type":"string"},"label":{"type":"string"},"split":{"type":"number"},"exposures":{"type":"number"},"conversions":{"type":"number"}},"required":["variantId","label","split","exposures","conversions"],"additionalProperties":false}}},"required":["id","name","hypothesis","status","allocation","assignmentUnit","audience","startedAt","winner","variants"],"additionalProperties":false}},"metrics":{"type":"object","properties":{"activeSubscriptions":{"type":"number"},"trialing":{"type":"number"},"mrrCents":{"type":"number"},"byPlan":{"type":"object","properties":{"pro":{"type":"number"},"team":{"type":"number"},"enterprise":{"type":"number"}},"required":["pro","team","enterprise"],"additionalProperties":false}},"required":["activeSubscriptions","trialing","mrrCents","byPlan"],"additionalProperties":false}},"required":["plans","prices","subscriptions","pricingExperiments","metrics"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/admin/billing/prices":{"post":{"tags":["admin-billing"],"operationId":"admin-billing.createPrice","parameters":[],"security":[{"apiKey":[]}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"plan":{"type":"string","enum":["free","pro","team","enterprise"]},"interval":{"type":"string","enum":["month","year"]},"variant":{"type":"string"},"amountCents":{"type":"number"},"currency":{"type":"string"},"polarProductId":{"anyOf":[{"type":"string"},{"type":"null"}]},"active":{"type":"boolean"},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","plan","interval","variant","amountCents","currency","polarProductId","active","updatedAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"plan":{"type":"string","enum":["free","pro","team","enterprise"]},"interval":{"type":"string","enum":["month","year"]},"variant":{"anyOf":[{"type":"string"},{"type":"null"}]},"amountCents":{"type":"number"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}]},"polarProductId":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"reason":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["plan","interval","amountCents"],"additionalProperties":false}}},"required":true}}},"/v1/admin/billing/prices/{priceId}":{"patch":{"tags":["admin-billing"],"operationId":"admin-billing.updatePrice","parameters":[{"name":"priceId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"plan":{"type":"string","enum":["free","pro","team","enterprise"]},"interval":{"type":"string","enum":["month","year"]},"variant":{"type":"string"},"amountCents":{"type":"number"},"currency":{"type":"string"},"polarProductId":{"anyOf":[{"type":"string"},{"type":"null"}]},"active":{"type":"boolean"},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","plan","interval","variant","amountCents","currency","polarProductId","active","updatedAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"amountCents":{"anyOf":[{"type":"number"},{"type":"null"}]},"polarProductId":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"active":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"reason":{"anyOf":[{"type":"string"},{"type":"null"}]}},"additionalProperties":false}}},"required":true}}},"/v1/admin/billing/plans/{plan}":{"patch":{"tags":["admin-billing"],"operationId":"admin-billing.updatePlan","parameters":[{"name":"plan","in":"path","schema":{"type":"string","enum":["free","pro","team","enterprise"]},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"plan":{"type":"string","enum":["free","pro","team","enterprise"]},"name":{"type":"string"},"tagline":{"type":"string"},"bullets":{"type":"array","items":{"type":"string"}},"selfServe":{"type":"boolean"},"sortOrder":{"type":"number"},"maxWorkspaceMembers":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDatabases":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxDataSources":{"anyOf":[{"type":"number"},{"type":"null"}]},"features":{"type":"array","items":{"type":"string"}},"aiBaseMicrousd":{"anyOf":[{"type":"number"},{"type":"null"}]},"aiOverageMicrousd":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["plan","name","tagline","bullets","selfServe","sortOrder","maxWorkspaceMembers","maxDatabases","maxDataSources","features","aiBaseMicrousd","aiOverageMicrousd"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"tagline":{"anyOf":[{"type":"string"},{"type":"null"}]},"bullets":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"selfServe":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"maxWorkspaceMembers":{"anyOf":[{"anyOf":[{"type":"number"},{"type":"null"}]},{"type":"null"}]},"maxDatabases":{"anyOf":[{"anyOf":[{"type":"number"},{"type":"null"}]},{"type":"null"}]},"maxDataSources":{"anyOf":[{"anyOf":[{"type":"number"},{"type":"null"}]},{"type":"null"}]},"features":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"aiBaseMicrousd":{"anyOf":[{"anyOf":[{"type":"number"},{"type":"null"}]},{"type":"null"}]},"aiOverageMicrousd":{"anyOf":[{"anyOf":[{"type":"number"},{"type":"null"}]},{"type":"null"}]},"reason":{"anyOf":[{"type":"string"},{"type":"null"}]}},"additionalProperties":false}}},"required":true}}},"/v1/admin/billing/experiments":{"post":{"tags":["admin-billing"],"operationId":"admin-billing.launchPricingExperiment","parameters":[],"security":[{"apiKey":[]}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"hypothesis":{"type":"string"},"status":{"type":"string","enum":["draft","running","paused","completed"]},"allocation":{"type":"number"},"assignmentUnit":{"type":"string","enum":["workspace","user"]},"audience":{"type":"string"},"startedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"winner":{"anyOf":[{"type":"string"},{"type":"null"}]},"variants":{"type":"array","items":{"type":"object","properties":{"variantId":{"type":"string"},"label":{"type":"string"},"split":{"type":"number"},"exposures":{"type":"number"},"conversions":{"type":"number"}},"required":["variantId","label","split","exposures","conversions"],"additionalProperties":false}}},"required":["id","name","hypothesis","status","allocation","assignmentUnit","audience","startedAt","winner","variants"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"hypothesis":{"anyOf":[{"type":"string"},{"type":"null"}]},"audience":{"anyOf":[{"type":"string"},{"type":"null"}]},"allocation":{"type":"number"},"assignmentUnit":{"anyOf":[{"type":"string","enum":["workspace","user"]},{"type":"null"}]},"variants":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"split":{"type":"number"},"prices":{"type":"array","items":{"type":"object","properties":{"plan":{"type":"string","enum":["free","pro","team","enterprise"]},"interval":{"type":"string","enum":["month","year"]},"amountCents":{"type":"number"},"polarProductId":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]}},"required":["plan","interval","amountCents"],"additionalProperties":false}}},"required":["label","split","prices"],"additionalProperties":false}},"reason":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["name","allocation","variants"],"additionalProperties":false}}},"required":true}}},"/v1/admin/billing/migratable":{"get":{"tags":["admin-billing"],"operationId":"admin-billing.listMigratable","parameters":[],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"subscriptionId":{"type":"string"},"customerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"customerEmail":{"anyOf":[{"type":"string"},{"type":"null"}]},"productId":{"anyOf":[{"type":"string"},{"type":"null"}]},"productName":{"anyOf":[{"type":"string"},{"type":"null"}]},"plan":{"type":"string","enum":["free","pro","team","enterprise"]},"status":{"type":"string"},"amountCents":{"anyOf":[{"type":"number"},{"type":"null"}]},"currency":{"anyOf":[{"type":"string"},{"type":"null"}]},"currentPeriodEnd":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["subscriptionId","customerId","customerEmail","productId","productName","plan","status","amountCents","currency","currentPeriodEnd"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/admin/billing/link":{"post":{"tags":["admin-billing"],"operationId":"admin-billing.linkSubscription","parameters":[],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"linked":{"type":"boolean"}},"required":["linked"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string"},"subscriptionId":{"type":"string"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["workspaceId","subscriptionId"],"additionalProperties":false}}},"required":true}}},"/v1/public/forms/{slug}":{"get":{"tags":["public-forms"],"operationId":"public-forms.getForm","parameters":[{"name":"slug","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"slug":{"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"submitLabel":{"anyOf":[{"type":"string"},{"type":"null"}]},"successMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"fields":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"kind":{"type":"string","enum":["text","long_text","number","date","select","multi_select","status","checkbox","url","email","phone","user","file","place","json","created_at","created_by","updated_at","updated_by","unique_id","formula","relation","rollup","time_tracking","button"]},"required":{"type":"boolean"},"helpText":{"anyOf":[{"type":"string"},{"type":"null"}]},"placeholder":{"anyOf":[{"type":"string"},{"type":"null"}]},"options":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"name":{"type":"string"},"color":{"type":"string"}},"required":["key","name","color"],"additionalProperties":false}},{"type":"null"}]},"display":{"anyOf":[{"type":"object","properties":{"variant":{"anyOf":[{"type":"string"},{"type":"null"}]},"min":{"anyOf":[{"type":"number"},{"type":"null"}]},"max":{"anyOf":[{"type":"number"},{"type":"null"}]},"step":{"anyOf":[{"type":"number"},{"type":"null"}]},"minLabel":{"anyOf":[{"type":"string"},{"type":"null"}]},"maxLabel":{"anyOf":[{"type":"string"},{"type":"null"}]},"count":{"anyOf":[{"type":"number"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"validation":{"anyOf":[{"type":"object","properties":{"tooltip":{"anyOf":[{"type":"string"},{"type":"null"}]},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"min":{"anyOf":[{"type":"number"},{"type":"null"}]},"max":{"anyOf":[{"type":"number"},{"type":"null"}]},"minLength":{"anyOf":[{"type":"number"},{"type":"null"}]},"maxLength":{"anyOf":[{"type":"number"},{"type":"null"}]},"pattern":{"anyOf":[{"type":"string"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"step":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["key","label","kind","required"],"additionalProperties":false}},"steps":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id"],"additionalProperties":false}},{"type":"null"}]},"theme":{"anyOf":[{"type":"object","properties":{"layout":{"anyOf":[{"type":"string","enum":["traditional","conversational"]},{"type":"null"}]},"frame":{"anyOf":[{"type":"string","enum":["card","plain"]},{"type":"null"}]},"cardColor":{"anyOf":[{"type":"string"},{"type":"null"}]},"background":{"anyOf":[{"type":"object","properties":{"type":{"anyOf":[{"type":"string","enum":["none","color","gradient","image"]},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"gradient":{"anyOf":[{"type":"string"},{"type":"null"}]},"gradientFrom":{"anyOf":[{"type":"string"},{"type":"null"}]},"gradientTo":{"anyOf":[{"type":"string"},{"type":"null"}]},"gradientAngle":{"anyOf":[{"type":"number"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"blur":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"accent":{"anyOf":[{"type":"string"},{"type":"null"}]},"radius":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]}},"required":["slug","fields"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"post":{"tags":["public-forms"],"operationId":"public-forms.submit","parameters":[{"name":"slug","in":"path","schema":{"type":"string"},"required":true}],"security":[],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"recordId":{"type":"string"},"successMessage":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["recordId"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"values":{"anyOf":[{"type":"object"},{"type":"null"}]}},"additionalProperties":false}}},"required":true}}},"/v1/admin/legacy-imports/uploads":{"post":{"tags":["legacy-imports"],"operationId":"legacy-imports.createUpload","parameters":[],"security":[{"apiKey":[]}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"uploadId":{"type":"string"},"objectKey":{"type":"string"},"partSize":{"type":"number"},"parts":{"type":"array","items":{"type":"object","properties":{"partNumber":{"type":"number"},"url":{"type":"string"},"expiresAt":{"type":"string"}},"required":["partNumber","url","expiresAt"],"additionalProperties":false}},"completionUrl":{"type":"string"},"expiresAt":{"type":"string"}},"required":["uploadId","objectKey","partSize","parts","completionUrl","expiresAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"fileName":{"type":"string"},"size":{"type":"number"},"sha256":{"type":"string"},"partSize":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["fileName","size","sha256"],"additionalProperties":false}}},"required":true}}},"/v1/admin/legacy-imports":{"post":{"tags":["legacy-imports"],"operationId":"legacy-imports.create","parameters":[],"security":[{"apiKey":[]}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"bundleObjectKey":{"type":"string"},"bundleChecksum":{"type":"string"},"sourceSnapshotTimestamp":{"type":"string"},"sourceVersion":{"type":"string"},"converterVersion":{"type":"string"},"status":{"type":"string","enum":["uploaded","preflighting","needs_review","ready","running","verifying","completed","failed","canceled","rolled_back"]},"mode":{"type":"string","enum":["dry_run","apply"]},"selectedWorkspaceCount":{"type":"number"},"sourceCounts":{"type":"object","additionalProperties":{"type":"number"}},"targetCounts":{"type":"object","additionalProperties":{"type":"number"}},"warnings":{"type":"array","items":{"type":"string"}},"errors":{"type":"array","items":{"type":"string"}},"approvedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"canceledByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"cancellationReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"rollbackRequestedByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"rollbackReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"startedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"completedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"workspaces":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"sourceWorkspaceId":{"type":"string"},"targetWorkspaceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"selected":{"type":"boolean"},"stage":{"type":"string","enum":["queued","identities","workspace","hierarchy","content","databases","time_entries","files","secondary_data","verifying","active"]},"lifecycleState":{"type":"string"},"counts":{"type":"object","additionalProperties":{"type":"number"}},"warnings":{"type":"array","items":{"type":"string"}},"verification":{"anyOf":[{"type":"object"},{"type":"null"}]},"rollbackState":{"type":"string"},"attempt":{"type":"number"},"lastError":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","sourceWorkspaceId","selected","stage","lifecycleState","counts","warnings","rollbackState","attempt"],"additionalProperties":false}}},"required":["id","bundleObjectKey","bundleChecksum","sourceSnapshotTimestamp","sourceVersion","converterVersion","status","mode","selectedWorkspaceCount","sourceCounts","targetCounts","warnings","errors","createdAt","updatedAt","workspaces"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"bundleObjectKey":{"type":"string"},"bundleChecksum":{"type":"string"},"mode":{"anyOf":[{"type":"string","enum":["dry_run","apply"]},{"type":"null"}]},"manifest":{"type":"object","properties":{"bundleVersion":{"type":"string"},"converterVersion":{"type":"string"},"sourceSnapshotTimestamp":{"type":"string"},"workspaceIds":{"type":"array","items":{"type":"string"}},"counts":{"type":"object","properties":{"entities":{"type":"number"},"tables":{"type":"number"},"workspaces":{"type":"number"}},"required":["entities","tables","workspaces"],"additionalProperties":false}},"required":["bundleVersion","converterVersion","sourceSnapshotTimestamp","workspaceIds","counts"],"additionalProperties":false}},"required":["bundleObjectKey","bundleChecksum","manifest"],"additionalProperties":false}}},"required":true}}},"/v1/admin/legacy-imports/{runId}":{"get":{"tags":["legacy-imports"],"operationId":"legacy-imports.get","parameters":[{"name":"runId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"bundleObjectKey":{"type":"string"},"bundleChecksum":{"type":"string"},"sourceSnapshotTimestamp":{"type":"string"},"sourceVersion":{"type":"string"},"converterVersion":{"type":"string"},"status":{"type":"string","enum":["uploaded","preflighting","needs_review","ready","running","verifying","completed","failed","canceled","rolled_back"]},"mode":{"type":"string","enum":["dry_run","apply"]},"selectedWorkspaceCount":{"type":"number"},"sourceCounts":{"type":"object","additionalProperties":{"type":"number"}},"targetCounts":{"type":"object","additionalProperties":{"type":"number"}},"warnings":{"type":"array","items":{"type":"string"}},"errors":{"type":"array","items":{"type":"string"}},"approvedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"canceledByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"cancellationReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"rollbackRequestedByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"rollbackReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"startedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"completedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"workspaces":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"sourceWorkspaceId":{"type":"string"},"targetWorkspaceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"selected":{"type":"boolean"},"stage":{"type":"string","enum":["queued","identities","workspace","hierarchy","content","databases","time_entries","files","secondary_data","verifying","active"]},"lifecycleState":{"type":"string"},"counts":{"type":"object","additionalProperties":{"type":"number"}},"warnings":{"type":"array","items":{"type":"string"}},"verification":{"anyOf":[{"type":"object"},{"type":"null"}]},"rollbackState":{"type":"string"},"attempt":{"type":"number"},"lastError":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","sourceWorkspaceId","selected","stage","lifecycleState","counts","warnings","rollbackState","attempt"],"additionalProperties":false}}},"required":["id","bundleObjectKey","bundleChecksum","sourceSnapshotTimestamp","sourceVersion","converterVersion","status","mode","selectedWorkspaceCount","sourceCounts","targetCounts","warnings","errors","createdAt","updatedAt","workspaces"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/admin/legacy-imports/{runId}/preflight":{"post":{"tags":["legacy-imports"],"operationId":"legacy-imports.preflight","parameters":[{"name":"runId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"202":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"bundleObjectKey":{"type":"string"},"bundleChecksum":{"type":"string"},"sourceSnapshotTimestamp":{"type":"string"},"sourceVersion":{"type":"string"},"converterVersion":{"type":"string"},"status":{"type":"string","enum":["uploaded","preflighting","needs_review","ready","running","verifying","completed","failed","canceled","rolled_back"]},"mode":{"type":"string","enum":["dry_run","apply"]},"selectedWorkspaceCount":{"type":"number"},"sourceCounts":{"type":"object","additionalProperties":{"type":"number"}},"targetCounts":{"type":"object","additionalProperties":{"type":"number"}},"warnings":{"type":"array","items":{"type":"string"}},"errors":{"type":"array","items":{"type":"string"}},"approvedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"canceledByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"cancellationReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"rollbackRequestedByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"rollbackReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"startedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"completedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"workspaces":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"sourceWorkspaceId":{"type":"string"},"targetWorkspaceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"selected":{"type":"boolean"},"stage":{"type":"string","enum":["queued","identities","workspace","hierarchy","content","databases","time_entries","files","secondary_data","verifying","active"]},"lifecycleState":{"type":"string"},"counts":{"type":"object","additionalProperties":{"type":"number"}},"warnings":{"type":"array","items":{"type":"string"}},"verification":{"anyOf":[{"type":"object"},{"type":"null"}]},"rollbackState":{"type":"string"},"attempt":{"type":"number"},"lastError":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","sourceWorkspaceId","selected","stage","lifecycleState","counts","warnings","rollbackState","attempt"],"additionalProperties":false}}},"required":["id","bundleObjectKey","bundleChecksum","sourceSnapshotTimestamp","sourceVersion","converterVersion","status","mode","selectedWorkspaceCount","sourceCounts","targetCounts","warnings","errors","createdAt","updatedAt","workspaces"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/admin/legacy-imports/{runId}/workspaces":{"patch":{"tags":["legacy-imports"],"operationId":"legacy-imports.updateWorkspaces","parameters":[{"name":"runId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"bundleObjectKey":{"type":"string"},"bundleChecksum":{"type":"string"},"sourceSnapshotTimestamp":{"type":"string"},"sourceVersion":{"type":"string"},"converterVersion":{"type":"string"},"status":{"type":"string","enum":["uploaded","preflighting","needs_review","ready","running","verifying","completed","failed","canceled","rolled_back"]},"mode":{"type":"string","enum":["dry_run","apply"]},"selectedWorkspaceCount":{"type":"number"},"sourceCounts":{"type":"object","additionalProperties":{"type":"number"}},"targetCounts":{"type":"object","additionalProperties":{"type":"number"}},"warnings":{"type":"array","items":{"type":"string"}},"errors":{"type":"array","items":{"type":"string"}},"approvedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"canceledByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"cancellationReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"rollbackRequestedByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"rollbackReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"startedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"completedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"workspaces":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"sourceWorkspaceId":{"type":"string"},"targetWorkspaceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"selected":{"type":"boolean"},"stage":{"type":"string","enum":["queued","identities","workspace","hierarchy","content","databases","time_entries","files","secondary_data","verifying","active"]},"lifecycleState":{"type":"string"},"counts":{"type":"object","additionalProperties":{"type":"number"}},"warnings":{"type":"array","items":{"type":"string"}},"verification":{"anyOf":[{"type":"object"},{"type":"null"}]},"rollbackState":{"type":"string"},"attempt":{"type":"number"},"lastError":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","sourceWorkspaceId","selected","stage","lifecycleState","counts","warnings","rollbackState","attempt"],"additionalProperties":false}}},"required":["id","bundleObjectKey","bundleChecksum","sourceSnapshotTimestamp","sourceVersion","converterVersion","status","mode","selectedWorkspaceCount","sourceCounts","targetCounts","warnings","errors","createdAt","updatedAt","workspaces"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"workspaces":{"type":"array","items":{"type":"object","properties":{"sourceWorkspaceId":{"type":"string"},"selected":{"type":"boolean"}},"required":["sourceWorkspaceId","selected"],"additionalProperties":false}}},"required":["workspaces"],"additionalProperties":false}}},"required":true}}},"/v1/admin/legacy-imports/{runId}/approve":{"post":{"tags":["legacy-imports"],"operationId":"legacy-imports.approve","parameters":[{"name":"runId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"bundleObjectKey":{"type":"string"},"bundleChecksum":{"type":"string"},"sourceSnapshotTimestamp":{"type":"string"},"sourceVersion":{"type":"string"},"converterVersion":{"type":"string"},"status":{"type":"string","enum":["uploaded","preflighting","needs_review","ready","running","verifying","completed","failed","canceled","rolled_back"]},"mode":{"type":"string","enum":["dry_run","apply"]},"selectedWorkspaceCount":{"type":"number"},"sourceCounts":{"type":"object","additionalProperties":{"type":"number"}},"targetCounts":{"type":"object","additionalProperties":{"type":"number"}},"warnings":{"type":"array","items":{"type":"string"}},"errors":{"type":"array","items":{"type":"string"}},"approvedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"canceledByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"cancellationReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"rollbackRequestedByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"rollbackReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"startedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"completedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"workspaces":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"sourceWorkspaceId":{"type":"string"},"targetWorkspaceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"selected":{"type":"boolean"},"stage":{"type":"string","enum":["queued","identities","workspace","hierarchy","content","databases","time_entries","files","secondary_data","verifying","active"]},"lifecycleState":{"type":"string"},"counts":{"type":"object","additionalProperties":{"type":"number"}},"warnings":{"type":"array","items":{"type":"string"}},"verification":{"anyOf":[{"type":"object"},{"type":"null"}]},"rollbackState":{"type":"string"},"attempt":{"type":"number"},"lastError":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","sourceWorkspaceId","selected","stage","lifecycleState","counts","warnings","rollbackState","attempt"],"additionalProperties":false}}},"required":["id","bundleObjectKey","bundleChecksum","sourceSnapshotTimestamp","sourceVersion","converterVersion","status","mode","selectedWorkspaceCount","sourceCounts","targetCounts","warnings","errors","createdAt","updatedAt","workspaces"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"approvalNote":{"anyOf":[{"type":"string"},{"type":"null"}]}},"additionalProperties":false}}},"required":true}}},"/v1/admin/legacy-imports/{runId}/start":{"post":{"tags":["legacy-imports"],"operationId":"legacy-imports.start","parameters":[{"name":"runId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"202":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"bundleObjectKey":{"type":"string"},"bundleChecksum":{"type":"string"},"sourceSnapshotTimestamp":{"type":"string"},"sourceVersion":{"type":"string"},"converterVersion":{"type":"string"},"status":{"type":"string","enum":["uploaded","preflighting","needs_review","ready","running","verifying","completed","failed","canceled","rolled_back"]},"mode":{"type":"string","enum":["dry_run","apply"]},"selectedWorkspaceCount":{"type":"number"},"sourceCounts":{"type":"object","additionalProperties":{"type":"number"}},"targetCounts":{"type":"object","additionalProperties":{"type":"number"}},"warnings":{"type":"array","items":{"type":"string"}},"errors":{"type":"array","items":{"type":"string"}},"approvedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"canceledByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"cancellationReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"rollbackRequestedByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"rollbackReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"startedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"completedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"workspaces":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"sourceWorkspaceId":{"type":"string"},"targetWorkspaceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"selected":{"type":"boolean"},"stage":{"type":"string","enum":["queued","identities","workspace","hierarchy","content","databases","time_entries","files","secondary_data","verifying","active"]},"lifecycleState":{"type":"string"},"counts":{"type":"object","additionalProperties":{"type":"number"}},"warnings":{"type":"array","items":{"type":"string"}},"verification":{"anyOf":[{"type":"object"},{"type":"null"}]},"rollbackState":{"type":"string"},"attempt":{"type":"number"},"lastError":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","sourceWorkspaceId","selected","stage","lifecycleState","counts","warnings","rollbackState","attempt"],"additionalProperties":false}}},"required":["id","bundleObjectKey","bundleChecksum","sourceSnapshotTimestamp","sourceVersion","converterVersion","status","mode","selectedWorkspaceCount","sourceCounts","targetCounts","warnings","errors","createdAt","updatedAt","workspaces"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/admin/legacy-imports/{runId}/cancel":{"post":{"tags":["legacy-imports"],"operationId":"legacy-imports.cancel","parameters":[{"name":"runId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"202":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"bundleObjectKey":{"type":"string"},"bundleChecksum":{"type":"string"},"sourceSnapshotTimestamp":{"type":"string"},"sourceVersion":{"type":"string"},"converterVersion":{"type":"string"},"status":{"type":"string","enum":["uploaded","preflighting","needs_review","ready","running","verifying","completed","failed","canceled","rolled_back"]},"mode":{"type":"string","enum":["dry_run","apply"]},"selectedWorkspaceCount":{"type":"number"},"sourceCounts":{"type":"object","additionalProperties":{"type":"number"}},"targetCounts":{"type":"object","additionalProperties":{"type":"number"}},"warnings":{"type":"array","items":{"type":"string"}},"errors":{"type":"array","items":{"type":"string"}},"approvedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"canceledByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"cancellationReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"rollbackRequestedByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"rollbackReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"startedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"completedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"workspaces":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"sourceWorkspaceId":{"type":"string"},"targetWorkspaceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"selected":{"type":"boolean"},"stage":{"type":"string","enum":["queued","identities","workspace","hierarchy","content","databases","time_entries","files","secondary_data","verifying","active"]},"lifecycleState":{"type":"string"},"counts":{"type":"object","additionalProperties":{"type":"number"}},"warnings":{"type":"array","items":{"type":"string"}},"verification":{"anyOf":[{"type":"object"},{"type":"null"}]},"rollbackState":{"type":"string"},"attempt":{"type":"number"},"lastError":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","sourceWorkspaceId","selected","stage","lifecycleState","counts","warnings","rollbackState","attempt"],"additionalProperties":false}}},"required":["id","bundleObjectKey","bundleChecksum","sourceSnapshotTimestamp","sourceVersion","converterVersion","status","mode","selectedWorkspaceCount","sourceCounts","targetCounts","warnings","errors","createdAt","updatedAt","workspaces"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"anyOf":[{"type":"string"},{"type":"null"}]}},"additionalProperties":false}}},"required":true}}},"/v1/admin/legacy-imports/{runId}/retry":{"post":{"tags":["legacy-imports"],"operationId":"legacy-imports.retry","parameters":[{"name":"runId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"202":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"bundleObjectKey":{"type":"string"},"bundleChecksum":{"type":"string"},"sourceSnapshotTimestamp":{"type":"string"},"sourceVersion":{"type":"string"},"converterVersion":{"type":"string"},"status":{"type":"string","enum":["uploaded","preflighting","needs_review","ready","running","verifying","completed","failed","canceled","rolled_back"]},"mode":{"type":"string","enum":["dry_run","apply"]},"selectedWorkspaceCount":{"type":"number"},"sourceCounts":{"type":"object","additionalProperties":{"type":"number"}},"targetCounts":{"type":"object","additionalProperties":{"type":"number"}},"warnings":{"type":"array","items":{"type":"string"}},"errors":{"type":"array","items":{"type":"string"}},"approvedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"canceledByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"cancellationReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"rollbackRequestedByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"rollbackReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"startedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"completedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"workspaces":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"sourceWorkspaceId":{"type":"string"},"targetWorkspaceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"selected":{"type":"boolean"},"stage":{"type":"string","enum":["queued","identities","workspace","hierarchy","content","databases","time_entries","files","secondary_data","verifying","active"]},"lifecycleState":{"type":"string"},"counts":{"type":"object","additionalProperties":{"type":"number"}},"warnings":{"type":"array","items":{"type":"string"}},"verification":{"anyOf":[{"type":"object"},{"type":"null"}]},"rollbackState":{"type":"string"},"attempt":{"type":"number"},"lastError":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","sourceWorkspaceId","selected","stage","lifecycleState","counts","warnings","rollbackState","attempt"],"additionalProperties":false}}},"required":["id","bundleObjectKey","bundleChecksum","sourceSnapshotTimestamp","sourceVersion","converterVersion","status","mode","selectedWorkspaceCount","sourceCounts","targetCounts","warnings","errors","createdAt","updatedAt","workspaces"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/admin/legacy-imports/{runId}/rollback":{"post":{"tags":["legacy-imports"],"operationId":"legacy-imports.rollback","parameters":[{"name":"runId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"202":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"bundleObjectKey":{"type":"string"},"bundleChecksum":{"type":"string"},"sourceSnapshotTimestamp":{"type":"string"},"sourceVersion":{"type":"string"},"converterVersion":{"type":"string"},"status":{"type":"string","enum":["uploaded","preflighting","needs_review","ready","running","verifying","completed","failed","canceled","rolled_back"]},"mode":{"type":"string","enum":["dry_run","apply"]},"selectedWorkspaceCount":{"type":"number"},"sourceCounts":{"type":"object","additionalProperties":{"type":"number"}},"targetCounts":{"type":"object","additionalProperties":{"type":"number"}},"warnings":{"type":"array","items":{"type":"string"}},"errors":{"type":"array","items":{"type":"string"}},"approvedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"canceledByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"cancellationReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"rollbackRequestedByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"rollbackReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"startedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"completedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"workspaces":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"sourceWorkspaceId":{"type":"string"},"targetWorkspaceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"selected":{"type":"boolean"},"stage":{"type":"string","enum":["queued","identities","workspace","hierarchy","content","databases","time_entries","files","secondary_data","verifying","active"]},"lifecycleState":{"type":"string"},"counts":{"type":"object","additionalProperties":{"type":"number"}},"warnings":{"type":"array","items":{"type":"string"}},"verification":{"anyOf":[{"type":"object"},{"type":"null"}]},"rollbackState":{"type":"string"},"attempt":{"type":"number"},"lastError":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","sourceWorkspaceId","selected","stage","lifecycleState","counts","warnings","rollbackState","attempt"],"additionalProperties":false}}},"required":["id","bundleObjectKey","bundleChecksum","sourceSnapshotTimestamp","sourceVersion","converterVersion","status","mode","selectedWorkspaceCount","sourceCounts","targetCounts","warnings","errors","createdAt","updatedAt","workspaces"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"anyOf":[{"type":"string"},{"type":"null"}]}},"additionalProperties":false}}},"required":true}}},"/v1/admin/legacy-imports/{runId}/report":{"get":{"tags":["legacy-imports"],"operationId":"legacy-imports.report","parameters":[{"name":"runId","in":"path","schema":{"type":"string"},"required":true}],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"run":{"type":"object","properties":{"id":{"type":"string"},"bundleObjectKey":{"type":"string"},"bundleChecksum":{"type":"string"},"sourceSnapshotTimestamp":{"type":"string"},"sourceVersion":{"type":"string"},"converterVersion":{"type":"string"},"status":{"type":"string","enum":["uploaded","preflighting","needs_review","ready","running","verifying","completed","failed","canceled","rolled_back"]},"mode":{"type":"string","enum":["dry_run","apply"]},"selectedWorkspaceCount":{"type":"number"},"sourceCounts":{"type":"object","additionalProperties":{"type":"number"}},"targetCounts":{"type":"object","additionalProperties":{"type":"number"}},"warnings":{"type":"array","items":{"type":"string"}},"errors":{"type":"array","items":{"type":"string"}},"approvedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"canceledByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"cancellationReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"rollbackRequestedByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"rollbackReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"startedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"completedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"workspaces":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"sourceWorkspaceId":{"type":"string"},"targetWorkspaceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"selected":{"type":"boolean"},"stage":{"type":"string","enum":["queued","identities","workspace","hierarchy","content","databases","time_entries","files","secondary_data","verifying","active"]},"lifecycleState":{"type":"string"},"counts":{"type":"object","additionalProperties":{"type":"number"}},"warnings":{"type":"array","items":{"type":"string"}},"verification":{"anyOf":[{"type":"object"},{"type":"null"}]},"rollbackState":{"type":"string"},"attempt":{"type":"number"},"lastError":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","sourceWorkspaceId","selected","stage","lifecycleState","counts","warnings","rollbackState","attempt"],"additionalProperties":false}}},"required":["id","bundleObjectKey","bundleChecksum","sourceSnapshotTimestamp","sourceVersion","converterVersion","status","mode","selectedWorkspaceCount","sourceCounts","targetCounts","warnings","errors","createdAt","updatedAt","workspaces"],"additionalProperties":false},"failureCounts":{"type":"object","additionalProperties":{"type":"number"}},"entityCounts":{"type":"object","additionalProperties":{"type":"number"}},"archivedConfigurationCount":{"type":"number"},"quarantinedFileCount":{"type":"number"},"revokedPublicLinkCount":{"type":"number"},"importedTimeDurationMs":{"type":"number"},"blockingIssues":{"type":"array","items":{"type":"string"}}},"required":["run","failureCounts","entityCounts","archivedConfigurationCount","quarantinedFileCount","revokedPublicLinkCount","importedTimeDurationMs","blockingIssues"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"4XX":{"description":"Request error — bad input, auth, scope, or state. The `error` code identifies which; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"5XX":{"description":"Server error. Retry with backoff; see https://developers.snoze.dev/docs/api/errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}}},"components":{"schemas":{"Suspend_":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["literal"]},"value":{}},"required":["type","value"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["path"]},"source":{"type":"string","enum":["trigger","node","scope"]},"nodeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"path":{"type":"array","items":{"type":"string"}}},"required":["type","source","path"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["template"]},"template":{"type":"string"}},"required":["type","template"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["operation"]},"operator":{"type":"string","enum":["coalesce","concat","add","subtract","multiply","divide","lowercase","uppercase","length"]},"args":{"type":"array","items":{"$ref":"#/components/schemas/Suspend_"}}},"required":["type","operator","args"],"additionalProperties":false}]},"ApiError":{"type":"object","required":["_tag","error","message","status"],"additionalProperties":false,"properties":{"_tag":{"type":"string","description":"Specific failure name, e.g. `ApiNotFound`.","examples":["ApiNotFound"]},"error":{"type":"string","description":"Stable machine-readable code, e.g. `not_found`. Write code against this.","examples":["not_found"]},"message":{"type":"string","description":"Human-readable explanation. Never parse it.","examples":["That item does not exist, or this key cannot see it."]},"status":{"type":"integer","description":"HTTP status code.","examples":[404]}}}},"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","bearerFormat":"snoze_sk_…","description":"Workspace API key created in Workspace settings → API keys. Scopes on the key bound what it can read and write."}}},"security":[{"apiKey":[]}],"tags":[{"name":"api-keys"},{"name":"items"},{"name":"records"},{"name":"files"},{"name":"backlinks"},{"name":"notifications"},{"name":"item-share-links"},{"name":"public-shares"},{"name":"share-links"},{"name":"skills"},{"name":"surface-history"},{"name":"onboarding"},{"name":"workspaces"},{"name":"roles"},{"name":"user-preferences"},{"name":"item-access"},{"name":"databases"},{"name":"database-templates"},{"name":"database-publish"},{"name":"public-databases"},{"name":"gantt"},{"name":"actions"},{"name":"automations"},{"name":"outbound-webhooks"},{"name":"inbound-webhooks"},{"name":"product-controls"},{"name":"surfaces"},{"name":"canvas"},{"name":"resources"},{"name":"page-publish"},{"name":"public-pages"},{"name":"data-sources"},{"name":"connections"},{"name":"model-sources"},{"name":"link-preview"},{"name":"time-tracking"},{"name":"tools"},{"name":"rag"},{"name":"ai"},{"name":"ai-database"},{"name":"aiArtifacts"},{"name":"agent"},{"name":"assets"},{"name":"integrations"},{"name":"auth"},{"name":"billing"},{"name":"admin"},{"name":"admin-billing"},{"name":"public-forms"},{"name":"legacy-imports"}]}