{"openapi":"3.1.0","info":{"title":"Cold OS Platform API","version":"2.0.0","description":"REST API for the Cold OS CRM. Authenticated with bearer API keys (`coldos_<env>_<rand>`). Issued at `/settings/api-keys`. Every entity carries a `wyrd_uid` for federation with WyrdOS. **v2.0.0 (2026-05-15) is a breaking release**: the `/v1/lists` and `/v1/sequences` resource families were renamed to `/v1/pools` and `/v1/flows` (and their nested routes — `list_contacts` → `pool_contacts`, `sequence_nodes` → `flow_nodes`, `sequence_runs` → `flow_runs`). Old paths return 404. Scopes likewise renamed (`lists:*` → `pools:*`, `sequences:*` → `flows:*`).","contact":{"name":"Cold OS","url":"https://coldos.justgotwyrd.com"}},"servers":[{"url":"https://coldos.justgotwyrd.com","description":"Cold OS production"}],"tags":[{"name":"Contacts"},{"name":"Organizations"},{"name":"Pools"},{"name":"Flows"},{"name":"Messaging"},{"name":"Tasks"},{"name":"Meetings"},{"name":"Templates"},{"name":"Admin"}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"http","scheme":"bearer","bearerFormat":"coldos_<env>_<32char base64url>","description":"Bearer token. Available scopes: *, contacts:*, contacts:read, contacts:write, contacts:delete, organizations:*, organizations:read, organizations:write, organizations:delete, pools:*, pools:read, pools:write, pools:delete, pool_contacts:*, pool_contacts:read, pool_contacts:write, pool_contacts:delete, flows:*, flows:read, flows:write, flows:delete, flow_nodes:*, flow_nodes:read, flow_nodes:write, flow_nodes:delete, flow_runs:*, flow_runs:read, flow_runs:write, flow_runs:delete, sent_emails:*, sent_emails:read, sent_emails:write, sent_emails:delete, email_events:*, email_events:read, email_events:write, email_events:delete, touchpoints:*, touchpoints:read, touchpoints:write, touchpoints:delete, tasks:*, tasks:read, tasks:write, tasks:delete, call_logs:*, call_logs:read, call_logs:write, call_logs:delete, meetings:*, meetings:read, meetings:write, meetings:delete, integrations:*, integrations:read, integrations:write, integrations:delete, users:*, users:read, users:write, users:delete, email_templates:*, email_templates:read, email_templates:write, email_templates:delete, whatsapp_templates:*, whatsapp_templates:read, whatsapp_templates:write, whatsapp_templates:delete"}},"schemas":{"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["unauthorized","forbidden","not_found","validation_failed","rate_limited","internal"]},"message":{"type":"string"},"details":{}}}}},"Contacts":{"type":"object","additionalProperties":true},"Organizations":{"type":"object","additionalProperties":true},"Pools":{"type":"object","additionalProperties":true},"PoolContacts":{"type":"object","additionalProperties":true},"Flows":{"type":"object","additionalProperties":true},"FlowNodes":{"type":"object","additionalProperties":true},"FlowRuns":{"type":"object","additionalProperties":true},"SentEmails":{"type":"object","additionalProperties":true},"EmailEvents":{"type":"object","additionalProperties":true},"Touchpoints":{"type":"object","additionalProperties":true},"Tasks":{"type":"object","additionalProperties":true},"CallLogs":{"type":"object","additionalProperties":true},"Meetings":{"type":"object","additionalProperties":true},"Integrations":{"type":"object","additionalProperties":true},"Users":{"type":"object","additionalProperties":true},"EmailTemplates":{"type":"object","additionalProperties":true},"WhatsappTemplates":{"type":"object","additionalProperties":true},"TimelineEvent":{"type":"object","properties":{"kind":{"type":"string","enum":["sent_email","email_event","touchpoint","call_log","meeting","task"]},"id":{"type":"string"},"occurred_at":{"type":"string","format":"date-time"},"summary":{"type":"string"},"payload":{"type":"object","additionalProperties":true}}},"FlowAnalytics":{"type":"object","properties":{"flow_id":{"type":"string","format":"uuid"},"flow_name":{"type":"string","nullable":true},"enrollments":{"type":"object","additionalProperties":{"type":"integer"}},"exits":{"type":"object","additionalProperties":{"type":"integer"}},"funnel":{"type":"array","items":{"type":"object","properties":{"node_id":{"type":"string","format":"uuid"},"node_label":{"type":"string","nullable":true},"node_type":{"type":"string"},"count":{"type":"integer"}}}}}},"UserPerformance":{"type":"object","properties":{"user_id":{"type":"string","format":"uuid"},"window":{"type":"string"},"window_start":{"type":"string","format":"date-time"},"window_end":{"type":"string","format":"date-time"},"emails_sent":{"type":"integer"},"emails_replied":{"type":"integer"},"emails_opened":{"type":"integer"},"emails_clicked":{"type":"integer"},"calls_placed":{"type":"integer"},"call_talk_seconds":{"type":"integer"},"meetings_scheduled":{"type":"integer"},"tasks_completed":{"type":"integer"}}}},"responses":{"Unauthorized":{"description":"API key missing or invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Forbidden":{"description":"API key does not grant the required scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotFound":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"ValidationFailed":{"description":"Request payload failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"RateLimited":{"description":"Per-key rate limit exceeded. Retry-After header indicates wait.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds until retry"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Internal":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/v1/contacts":{"get":{"tags":["Contacts"],"summary":"List contacts","description":"People records — leads / prospects in the CRM.","operationId":"list_contacts","security":[{"ApiKeyAuth":["contacts:read"]}],"parameters":[{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"Opaque cursor from a previous page's `next_cursor`."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"sort","in":"query","required":false,"schema":{"type":"string"},"description":"Sort field. Prefix with - for desc. Multi-sort: comma-separated. Allowed: created_at, updated_at, last_engagement_at, last_touchpoint_at, first_name, last_name, company_name, internal_stage, priority"},{"name":"internal_stage","in":"query","required":false,"schema":{"type":"string"}},{"name":"owner_id","in":"query","required":false,"schema":{"type":"string"}},{"name":"organization_id","in":"query","required":false,"schema":{"type":"string"}},{"name":"source","in":"query","required":false,"schema":{"type":"string"}},{"name":"company_domain","in":"query","required":false,"schema":{"type":"string"}},{"name":"country","in":"query","required":false,"schema":{"type":"string"}},{"name":"state","in":"query","required":false,"schema":{"type":"string"}},{"name":"city","in":"query","required":false,"schema":{"type":"string"}},{"name":"since","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"Filter created_at >= since"},{"name":"until","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"Filter created_at < until"},{"name":"q","in":"query","required":false,"schema":{"type":"string"},"description":"Search across: first_name, last_name, email, company_name"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Contacts"}},"next_cursor":{"type":"string","nullable":true}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/Internal"}}},"post":{"tags":["Contacts"],"summary":"Create contact","operationId":"create_contacts","security":[{"ApiKeyAuth":["contacts:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Contacts"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Contacts"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/Internal"}}}},"/v1/contacts/{id}":{"get":{"tags":["Contacts"],"summary":"Get contact by id","operationId":"get_contacts","security":[{"ApiKeyAuth":["contacts:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Contacts"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/Internal"}}},"patch":{"tags":["Contacts"],"summary":"Update contact","operationId":"update_contacts","security":[{"ApiKeyAuth":["contacts:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Contacts"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Contacts"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/Internal"}}},"delete":{"tags":["Contacts"],"summary":"Delete contact","operationId":"delete_contacts","security":[{"ApiKeyAuth":["contacts:delete"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Deleted"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/Internal"}}}},"/v1/organizations":{"get":{"tags":["Organizations"],"summary":"List organizations","description":"Companies / accounts.","operationId":"list_organizations","security":[{"ApiKeyAuth":["organizations:read"]}],"parameters":[{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"Opaque cursor from a previous page's `next_cursor`."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"sort","in":"query","required":false,"schema":{"type":"string"},"description":"Sort field. Prefix with - for desc. Multi-sort: comma-separated. Allowed: created_at, updated_at, name, industry"},{"name":"industry","in":"query","required":false,"schema":{"type":"string"}},{"name":"country","in":"query","required":false,"schema":{"type":"string"}},{"name":"domain","in":"query","required":false,"schema":{"type":"string"}},{"name":"since","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"Filter created_at >= since"},{"name":"until","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"Filter created_at < until"},{"name":"q","in":"query","required":false,"schema":{"type":"string"},"description":"Search across: name, domain, website_url"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Organizations"}},"next_cursor":{"type":"string","nullable":true}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/Internal"}}},"post":{"tags":["Organizations"],"summary":"Create organization","operationId":"create_organizations","security":[{"ApiKeyAuth":["organizations:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Organizations"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Organizations"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/Internal"}}}},"/v1/organizations/{id}":{"get":{"tags":["Organizations"],"summary":"Get organization by id","operationId":"get_organizations","security":[{"ApiKeyAuth":["organizations:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Organizations"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/Internal"}}},"patch":{"tags":["Organizations"],"summary":"Update organization","operationId":"update_organizations","security":[{"ApiKeyAuth":["organizations:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Organizations"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Organizations"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/Internal"}}},"delete":{"tags":["Organizations"],"summary":"Delete organization","operationId":"delete_organizations","security":[{"ApiKeyAuth":["organizations:delete"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Deleted"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/Internal"}}}},"/v1/pools":{"get":{"tags":["Pools"],"summary":"List pools","description":"Static contact pools.","operationId":"list_pools","security":[{"ApiKeyAuth":["pools:read"]}],"parameters":[{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"Opaque cursor from a previous page's `next_cursor`."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"sort","in":"query","required":false,"schema":{"type":"string"},"description":"Sort field. Prefix with - for desc. Multi-sort: comma-separated. Allowed: created_at, updated_at, name, contacts_count"},{"name":"owner_id","in":"query","required":false,"schema":{"type":"string"}},{"name":"visibility","in":"query","required":false,"schema":{"type":"string"}},{"name":"since","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"Filter created_at >= since"},{"name":"until","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"Filter created_at < until"},{"name":"q","in":"query","required":false,"schema":{"type":"string"},"description":"Search across: name, description"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Pools"}},"next_cursor":{"type":"string","nullable":true}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/Internal"}}},"post":{"tags":["Pools"],"summary":"Create pool","operationId":"create_pools","security":[{"ApiKeyAuth":["pools:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Pools"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Pools"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/Internal"}}}},"/v1/pools/{id}":{"get":{"tags":["Pools"],"summary":"Get pool by id","operationId":"get_pools","security":[{"ApiKeyAuth":["pools:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Pools"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/Internal"}}},"patch":{"tags":["Pools"],"summary":"Update pool","operationId":"update_pools","security":[{"ApiKeyAuth":["pools:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Pools"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Pools"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/Internal"}}},"delete":{"tags":["Pools"],"summary":"Delete pool","operationId":"delete_pools","security":[{"ApiKeyAuth":["pools:delete"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Deleted"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/Internal"}}}},"/v1/pool_contacts":{"get":{"tags":["Pools"],"summary":"List pool_contacts","description":"Pool membership join table.","operationId":"list_pool_contacts","security":[{"ApiKeyAuth":["pool_contacts:read"]}],"parameters":[{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"Opaque cursor from a previous page's `next_cursor`."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"sort","in":"query","required":false,"schema":{"type":"string"},"description":"Sort field. Prefix with - for desc. Multi-sort: comma-separated. Allowed: added_at"},{"name":"pool_id","in":"query","required":false,"schema":{"type":"string"}},{"name":"contact_id","in":"query","required":false,"schema":{"type":"string"}},{"name":"added_by","in":"query","required":false,"schema":{"type":"string"}},{"name":"since","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"Filter added_at >= since"},{"name":"until","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"Filter added_at < until"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/PoolContacts"}},"next_cursor":{"type":"string","nullable":true}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/Internal"}}},"post":{"tags":["Pools"],"summary":"Create pool_contact","operationId":"create_pool_contacts","security":[{"ApiKeyAuth":["pool_contacts:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PoolContacts"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/PoolContacts"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/Internal"}}}},"/v1/pool_contacts/{id}":{"get":{"tags":["Pools"],"summary":"Get pool_contact by id","operationId":"get_pool_contacts","security":[{"ApiKeyAuth":["pool_contacts:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/PoolContacts"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/Internal"}}},"delete":{"tags":["Pools"],"summary":"Delete pool_contact","operationId":"delete_pool_contacts","security":[{"ApiKeyAuth":["pool_contacts:delete"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Deleted"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/Internal"}}}},"/v1/flows":{"get":{"tags":["Flows"],"summary":"List flows","description":"Outreach flows (native engine).","operationId":"list_flows","security":[{"ApiKeyAuth":["flows:read"]}],"parameters":[{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"Opaque cursor from a previous page's `next_cursor`."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"sort","in":"query","required":false,"schema":{"type":"string"},"description":"Sort field. Prefix with - for desc. Multi-sort: comma-separated. Allowed: created_at, updated_at, name, status"},{"name":"status","in":"query","required":false,"schema":{"type":"string"}},{"name":"owner_id","in":"query","required":false,"schema":{"type":"string"}},{"name":"since","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"Filter created_at >= since"},{"name":"until","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"Filter created_at < until"},{"name":"q","in":"query","required":false,"schema":{"type":"string"},"description":"Search across: name, description"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Flows"}},"next_cursor":{"type":"string","nullable":true}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/Internal"}}},"post":{"tags":["Flows"],"summary":"Create flow","operationId":"create_flows","security":[{"ApiKeyAuth":["flows:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Flows"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Flows"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/Internal"}}}},"/v1/flows/{id}":{"get":{"tags":["Flows"],"summary":"Get flow by id","operationId":"get_flows","security":[{"ApiKeyAuth":["flows:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Flows"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/Internal"}}},"patch":{"tags":["Flows"],"summary":"Update flow","operationId":"update_flows","security":[{"ApiKeyAuth":["flows:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Flows"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Flows"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/Internal"}}},"delete":{"tags":["Flows"],"summary":"Delete flow","operationId":"delete_flows","security":[{"ApiKeyAuth":["flows:delete"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Deleted"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/Internal"}}}},"/v1/flow_nodes":{"get":{"tags":["Flows"],"summary":"List flow_nodes","description":"Read-only node graph for a flow. Mutate via the builder UI / flows API.","operationId":"list_flow_nodes","security":[{"ApiKeyAuth":["flow_nodes:read"]}],"parameters":[{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"Opaque cursor from a previous page's `next_cursor`."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"sort","in":"query","required":false,"schema":{"type":"string"},"description":"Sort field. Prefix with - for desc. Multi-sort: comma-separated. Allowed: created_at, type"},{"name":"flow_id","in":"query","required":false,"schema":{"type":"string"}},{"name":"type","in":"query","required":false,"schema":{"type":"string"}},{"name":"since","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"Filter created_at >= since"},{"name":"until","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"Filter created_at < until"},{"name":"q","in":"query","required":false,"schema":{"type":"string"},"description":"Search across: label"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/FlowNodes"}},"next_cursor":{"type":"string","nullable":true}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/Internal"}}}},"/v1/flow_nodes/{id}":{"get":{"tags":["Flows"],"summary":"Get flow_node by id","operationId":"get_flow_nodes","security":[{"ApiKeyAuth":["flow_nodes:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/FlowNodes"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/Internal"}}}},"/v1/flow_runs":{"get":{"tags":["Flows"],"summary":"List flow_runs","description":"One row per contact enrolled in a flow.","operationId":"list_flow_runs","security":[{"ApiKeyAuth":["flow_runs:read"]}],"parameters":[{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"Opaque cursor from a previous page's `next_cursor`."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"sort","in":"query","required":false,"schema":{"type":"string"},"description":"Sort field. Prefix with - for desc. Multi-sort: comma-separated. Allowed: started_at, completed_at, status, next_run_at"},{"name":"flow_id","in":"query","required":false,"schema":{"type":"string"}},{"name":"contact_id","in":"query","required":false,"schema":{"type":"string"}},{"name":"status","in":"query","required":false,"schema":{"type":"string"}},{"name":"exit_reason","in":"query","required":false,"schema":{"type":"string"}},{"name":"enrolled_by","in":"query","required":false,"schema":{"type":"string"}},{"name":"since","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"Filter started_at >= since"},{"name":"until","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"Filter started_at < until"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/FlowRuns"}},"next_cursor":{"type":"string","nullable":true}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/Internal"}}}},"/v1/flow_runs/{id}":{"get":{"tags":["Flows"],"summary":"Get flow_run by id","operationId":"get_flow_runs","security":[{"ApiKeyAuth":["flow_runs:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/FlowRuns"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/Internal"}}}},"/v1/sent_emails":{"get":{"tags":["Messaging"],"summary":"List sent_emails","description":"Outbound emails sent through Cold OS. Read-only via the API — sends go through the SendWizard / sequences engine.","operationId":"list_sent_emails","security":[{"ApiKeyAuth":["sent_emails:read"]}],"parameters":[{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"Opaque cursor from a previous page's `next_cursor`."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"sort","in":"query","required":false,"schema":{"type":"string"},"description":"Sort field. Prefix with - for desc. Multi-sort: comma-separated. Allowed: sent_at, created_at"},{"name":"contact_id","in":"query","required":false,"schema":{"type":"string"}},{"name":"owner_id","in":"query","required":false,"schema":{"type":"string"}},{"name":"provider","in":"query","required":false,"schema":{"type":"string"}},{"name":"status","in":"query","required":false,"schema":{"type":"string"}},{"name":"since","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"Filter sent_at >= since"},{"name":"until","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"Filter sent_at < until"},{"name":"q","in":"query","required":false,"schema":{"type":"string"},"description":"Search across: subject, to_email, from_email"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/SentEmails"}},"next_cursor":{"type":"string","nullable":true}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/Internal"}}}},"/v1/sent_emails/{id}":{"get":{"tags":["Messaging"],"summary":"Get sent_email by id","operationId":"get_sent_emails","security":[{"ApiKeyAuth":["sent_emails:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/SentEmails"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/Internal"}}}},"/v1/email_events":{"get":{"tags":["Messaging"],"summary":"List email_events","description":"Open / click / reply / bounce / unsubscribe events.","operationId":"list_email_events","security":[{"ApiKeyAuth":["email_events:read"]}],"parameters":[{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"Opaque cursor from a previous page's `next_cursor`."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"sort","in":"query","required":false,"schema":{"type":"string"},"description":"Sort field. Prefix with - for desc. Multi-sort: comma-separated. Allowed: occurred_at, created_at"},{"name":"sent_email_id","in":"query","required":false,"schema":{"type":"string"}},{"name":"contact_id","in":"query","required":false,"schema":{"type":"string"}},{"name":"event_type","in":"query","required":false,"schema":{"type":"string"}},{"name":"since","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"Filter occurred_at >= since"},{"name":"until","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"Filter occurred_at < until"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/EmailEvents"}},"next_cursor":{"type":"string","nullable":true}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/Internal"}}}},"/v1/email_events/{id}":{"get":{"tags":["Messaging"],"summary":"Get email_event by id","operationId":"get_email_events","security":[{"ApiKeyAuth":["email_events:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/EmailEvents"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/Internal"}}}},"/v1/touchpoints":{"get":{"tags":["Messaging"],"summary":"List touchpoints","description":"Unified outreach activity log (email + WhatsApp + call + LinkedIn).","operationId":"list_touchpoints","security":[{"ApiKeyAuth":["touchpoints:read"]}],"parameters":[{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"Opaque cursor from a previous page's `next_cursor`."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"sort","in":"query","required":false,"schema":{"type":"string"},"description":"Sort field. Prefix with - for desc. Multi-sort: comma-separated. Allowed: occurred_at, created_at"},{"name":"contact_id","in":"query","required":false,"schema":{"type":"string"}},{"name":"owner_id","in":"query","required":false,"schema":{"type":"string"}},{"name":"channel","in":"query","required":false,"schema":{"type":"string"}},{"name":"direction","in":"query","required":false,"schema":{"type":"string"}},{"name":"status","in":"query","required":false,"schema":{"type":"string"}},{"name":"since","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"Filter occurred_at >= since"},{"name":"until","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"Filter occurred_at < until"},{"name":"q","in":"query","required":false,"schema":{"type":"string"},"description":"Search across: summary, subject"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Touchpoints"}},"next_cursor":{"type":"string","nullable":true}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/Internal"}}}},"/v1/touchpoints/{id}":{"get":{"tags":["Messaging"],"summary":"Get touchpoint by id","operationId":"get_touchpoints","security":[{"ApiKeyAuth":["touchpoints:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Touchpoints"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/Internal"}}}},"/v1/tasks":{"get":{"tags":["Tasks"],"summary":"List tasks","description":"Operator tasks.","operationId":"list_tasks","security":[{"ApiKeyAuth":["tasks:read"]}],"parameters":[{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"Opaque cursor from a previous page's `next_cursor`."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"sort","in":"query","required":false,"schema":{"type":"string"},"description":"Sort field. Prefix with - for desc. Multi-sort: comma-separated. Allowed: created_at, updated_at, due_at, priority, status"},{"name":"assignee_id","in":"query","required":false,"schema":{"type":"string"}},{"name":"contact_id","in":"query","required":false,"schema":{"type":"string"}},{"name":"organization_id","in":"query","required":false,"schema":{"type":"string"}},{"name":"status","in":"query","required":false,"schema":{"type":"string"}},{"name":"priority","in":"query","required":false,"schema":{"type":"string"}},{"name":"suggested_action","in":"query","required":false,"schema":{"type":"string"}},{"name":"flow_enrollment_id","in":"query","required":false,"schema":{"type":"string"}},{"name":"since","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"Filter created_at >= since"},{"name":"until","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"Filter created_at < until"},{"name":"q","in":"query","required":false,"schema":{"type":"string"},"description":"Search across: title, description"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Tasks"}},"next_cursor":{"type":"string","nullable":true}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/Internal"}}},"post":{"tags":["Tasks"],"summary":"Create task","operationId":"create_tasks","security":[{"ApiKeyAuth":["tasks:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tasks"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Tasks"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/Internal"}}}},"/v1/tasks/{id}":{"get":{"tags":["Tasks"],"summary":"Get task by id","operationId":"get_tasks","security":[{"ApiKeyAuth":["tasks:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Tasks"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/Internal"}}},"patch":{"tags":["Tasks"],"summary":"Update task","operationId":"update_tasks","security":[{"ApiKeyAuth":["tasks:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tasks"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Tasks"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/Internal"}}},"delete":{"tags":["Tasks"],"summary":"Delete task","operationId":"delete_tasks","security":[{"ApiKeyAuth":["tasks:delete"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Deleted"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/Internal"}}}},"/v1/call_logs":{"get":{"tags":["Messaging"],"summary":"List call_logs","description":"Calls placed (manual + Twilio bridge).","operationId":"list_call_logs","security":[{"ApiKeyAuth":["call_logs:read"]}],"parameters":[{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"Opaque cursor from a previous page's `next_cursor`."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"sort","in":"query","required":false,"schema":{"type":"string"},"description":"Sort field. Prefix with - for desc. Multi-sort: comma-separated. Allowed: created_at, started_at, ended_at, duration_seconds"},{"name":"contact_id","in":"query","required":false,"schema":{"type":"string"}},{"name":"owner_id","in":"query","required":false,"schema":{"type":"string"}},{"name":"outcome","in":"query","required":false,"schema":{"type":"string"}},{"name":"status","in":"query","required":false,"schema":{"type":"string"}},{"name":"mode","in":"query","required":false,"schema":{"type":"string"}},{"name":"since","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"Filter created_at >= since"},{"name":"until","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"Filter created_at < until"},{"name":"q","in":"query","required":false,"schema":{"type":"string"},"description":"Search across: notes"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/CallLogs"}},"next_cursor":{"type":"string","nullable":true}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/Internal"}}}},"/v1/call_logs/{id}":{"get":{"tags":["Messaging"],"summary":"Get call_log by id","operationId":"get_call_logs","security":[{"ApiKeyAuth":["call_logs:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/CallLogs"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/Internal"}}}},"/v1/meetings":{"get":{"tags":["Meetings"],"summary":"List meetings","description":"Calendar meetings (Cold-OS-originated + Calendar-synced).","operationId":"list_meetings","security":[{"ApiKeyAuth":["meetings:read"]}],"parameters":[{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"Opaque cursor from a previous page's `next_cursor`."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"sort","in":"query","required":false,"schema":{"type":"string"},"description":"Sort field. Prefix with - for desc. Multi-sort: comma-separated. Allowed: scheduled_start, scheduled_end, created_at"},{"name":"contact_id","in":"query","required":false,"schema":{"type":"string"}},{"name":"owner_id","in":"query","required":false,"schema":{"type":"string"}},{"name":"status","in":"query","required":false,"schema":{"type":"string"}},{"name":"outcome","in":"query","required":false,"schema":{"type":"string"}},{"name":"since","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"Filter scheduled_start >= since"},{"name":"until","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"Filter scheduled_start < until"},{"name":"q","in":"query","required":false,"schema":{"type":"string"},"description":"Search across: title, description, location"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Meetings"}},"next_cursor":{"type":"string","nullable":true}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/Internal"}}},"post":{"tags":["Meetings"],"summary":"Create meeting","operationId":"create_meetings","security":[{"ApiKeyAuth":["meetings:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Meetings"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Meetings"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/Internal"}}}},"/v1/meetings/{id}":{"get":{"tags":["Meetings"],"summary":"Get meeting by id","operationId":"get_meetings","security":[{"ApiKeyAuth":["meetings:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Meetings"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/Internal"}}},"patch":{"tags":["Meetings"],"summary":"Update meeting","operationId":"update_meetings","security":[{"ApiKeyAuth":["meetings:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Meetings"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Meetings"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/Internal"}}},"delete":{"tags":["Meetings"],"summary":"Delete meeting","operationId":"delete_meetings","security":[{"ApiKeyAuth":["meetings:delete"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Deleted"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/Internal"}}}},"/v1/integrations":{"get":{"tags":["Admin"],"summary":"List integrations","description":"Configured integrations (read-only over API; secrets are never exposed).","operationId":"list_integrations","security":[{"ApiKeyAuth":["integrations:read"]}],"parameters":[{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"Opaque cursor from a previous page's `next_cursor`."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"sort","in":"query","required":false,"schema":{"type":"string"},"description":"Sort field. Prefix with - for desc. Multi-sort: comma-separated. Allowed: type, created_at, updated_at"},{"name":"type","in":"query","required":false,"schema":{"type":"string"}},{"name":"status","in":"query","required":false,"schema":{"type":"string"}},{"name":"enabled","in":"query","required":false,"schema":{"type":"string"}},{"name":"since","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"Filter created_at >= since"},{"name":"until","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"Filter created_at < until"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Integrations"}},"next_cursor":{"type":"string","nullable":true}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/Internal"}}}},"/v1/integrations/{id}":{"get":{"tags":["Admin"],"summary":"Get integration by id","operationId":"get_integrations","security":[{"ApiKeyAuth":["integrations:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Integrations"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/Internal"}}}},"/v1/users":{"get":{"tags":["Admin"],"summary":"List users","description":"Workspace users.","operationId":"list_users","security":[{"ApiKeyAuth":["users:read"]}],"parameters":[{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"Opaque cursor from a previous page's `next_cursor`."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"sort","in":"query","required":false,"schema":{"type":"string"},"description":"Sort field. Prefix with - for desc. Multi-sort: comma-separated. Allowed: created_at, full_name, role"},{"name":"role","in":"query","required":false,"schema":{"type":"string"}},{"name":"is_active","in":"query","required":false,"schema":{"type":"string"}},{"name":"since","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"Filter created_at >= since"},{"name":"until","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"Filter created_at < until"},{"name":"q","in":"query","required":false,"schema":{"type":"string"},"description":"Search across: full_name, email"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Users"}},"next_cursor":{"type":"string","nullable":true}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/Internal"}}}},"/v1/users/{id}":{"get":{"tags":["Admin"],"summary":"Get user by id","operationId":"get_users","security":[{"ApiKeyAuth":["users:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Users"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/Internal"}}}},"/v1/email_templates":{"get":{"tags":["Templates"],"summary":"List email_templates","description":"Email templates for sequences and one-off sends.","operationId":"list_email_templates","security":[{"ApiKeyAuth":["email_templates:read"]}],"parameters":[{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"Opaque cursor from a previous page's `next_cursor`."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"sort","in":"query","required":false,"schema":{"type":"string"},"description":"Sort field. Prefix with - for desc. Multi-sort: comma-separated. Allowed: created_at, updated_at, name"},{"name":"created_by","in":"query","required":false,"schema":{"type":"string"}},{"name":"archived_at","in":"query","required":false,"schema":{"type":"string"}},{"name":"since","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"Filter created_at >= since"},{"name":"until","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"Filter created_at < until"},{"name":"q","in":"query","required":false,"schema":{"type":"string"},"description":"Search across: name, subject"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/EmailTemplates"}},"next_cursor":{"type":"string","nullable":true}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/Internal"}}},"post":{"tags":["Templates"],"summary":"Create email_template","operationId":"create_email_templates","security":[{"ApiKeyAuth":["email_templates:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailTemplates"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/EmailTemplates"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/Internal"}}}},"/v1/email_templates/{id}":{"get":{"tags":["Templates"],"summary":"Get email_template by id","operationId":"get_email_templates","security":[{"ApiKeyAuth":["email_templates:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/EmailTemplates"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/Internal"}}},"patch":{"tags":["Templates"],"summary":"Update email_template","operationId":"update_email_templates","security":[{"ApiKeyAuth":["email_templates:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailTemplates"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/EmailTemplates"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/Internal"}}},"delete":{"tags":["Templates"],"summary":"Delete email_template","operationId":"delete_email_templates","security":[{"ApiKeyAuth":["email_templates:delete"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Deleted"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/Internal"}}}},"/v1/whatsapp_templates":{"get":{"tags":["Templates"],"summary":"List whatsapp_templates","description":"WhatsApp message templates (Meta + Twilio).","operationId":"list_whatsapp_templates","security":[{"ApiKeyAuth":["whatsapp_templates:read"]}],"parameters":[{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"Opaque cursor from a previous page's `next_cursor`."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"sort","in":"query","required":false,"schema":{"type":"string"},"description":"Sort field. Prefix with - for desc. Multi-sort: comma-separated. Allowed: created_at, updated_at, name, status"},{"name":"status","in":"query","required":false,"schema":{"type":"string"}},{"name":"language","in":"query","required":false,"schema":{"type":"string"}},{"name":"created_by","in":"query","required":false,"schema":{"type":"string"}},{"name":"since","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"Filter created_at >= since"},{"name":"until","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"Filter created_at < until"},{"name":"q","in":"query","required":false,"schema":{"type":"string"},"description":"Search across: name, body"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/WhatsappTemplates"}},"next_cursor":{"type":"string","nullable":true}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/Internal"}}},"post":{"tags":["Templates"],"summary":"Create whatsapp_template","operationId":"create_whatsapp_templates","security":[{"ApiKeyAuth":["whatsapp_templates:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsappTemplates"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/WhatsappTemplates"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/Internal"}}}},"/v1/whatsapp_templates/{id}":{"get":{"tags":["Templates"],"summary":"Get whatsapp_template by id","operationId":"get_whatsapp_templates","security":[{"ApiKeyAuth":["whatsapp_templates:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/WhatsappTemplates"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/Internal"}}},"patch":{"tags":["Templates"],"summary":"Update whatsapp_template","operationId":"update_whatsapp_templates","security":[{"ApiKeyAuth":["whatsapp_templates:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsappTemplates"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/WhatsappTemplates"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/Internal"}}},"delete":{"tags":["Templates"],"summary":"Delete whatsapp_template","operationId":"delete_whatsapp_templates","security":[{"ApiKeyAuth":["whatsapp_templates:delete"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Deleted"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/Internal"}}}},"/v1/contacts/bulk":{"post":{"tags":["Contacts"],"summary":"Bulk create contacts","operationId":"bulk_create_contacts","security":[{"ApiKeyAuth":["contacts:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["contacts"],"properties":{"contacts":{"type":"array","items":{"$ref":"#/components/schemas/Contacts"},"minItems":1,"maxItems":500}}}}}},"responses":{"201":{"description":"Inserted","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Contacts"}},"next_cursor":{"type":"string","nullable":true}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/Internal"}}},"patch":{"tags":["Contacts"],"summary":"Bulk update contacts","operationId":"bulk_update_contacts","security":[{"ApiKeyAuth":["contacts:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["contacts"],"properties":{"contacts":{"type":"array","items":{"type":"object","required":["id"],"properties":{"id":{"type":"string","format":"uuid"}},"additionalProperties":true},"minItems":1,"maxItems":500}}}}}},"responses":{"200":{"description":"Updated","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Contacts"}},"next_cursor":{"type":"string","nullable":true}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/Internal"}}}},"/v1/contacts/{id}/timeline":{"get":{"tags":["Contacts"],"summary":"Get contact timeline","operationId":"contact_timeline","security":[{"ApiKeyAuth":["contacts:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"default":100}},{"name":"since","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"until","in":"query","required":false,"schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/TimelineEvent"}},"next_cursor":{"type":"string","nullable":true}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/Internal"}}}},"/v1/contacts/{id}/flows":{"get":{"tags":["Contacts"],"summary":"List flow enrollments for a contact","operationId":"contact_flows","security":[{"ApiKeyAuth":["contacts:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/FlowRuns"}},"next_cursor":{"type":"string","nullable":true}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/Internal"}}}},"/v1/flows/{id}/enroll":{"post":{"tags":["Flows"],"summary":"Enroll contacts in a flow","operationId":"flow_enroll","security":[{"ApiKeyAuth":["flows:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["contact_ids"],"properties":{"contact_ids":{"type":"array","items":{"type":"string","format":"uuid"},"minItems":1,"maxItems":500}}}}}},"responses":{"201":{"description":"Enrolled"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/Internal"}}}},"/v1/flows/{id}/unenroll":{"post":{"tags":["Flows"],"summary":"Unenroll contacts from a flow","operationId":"flow_unenroll","security":[{"ApiKeyAuth":["flows:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["contact_ids"],"properties":{"contact_ids":{"type":"array","items":{"type":"string","format":"uuid"},"minItems":1,"maxItems":500}}}}}},"responses":{"200":{"description":"Unenrolled"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/Internal"}}}},"/v1/flows/{id}/analytics":{"get":{"tags":["Flows"],"summary":"Flow analytics: counts + funnel","operationId":"flow_analytics","security":[{"ApiKeyAuth":["flows:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/FlowAnalytics"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/Internal"}}}},"/v1/users/{id}/performance":{"get":{"tags":["Admin"],"summary":"User performance counts","operationId":"user_performance","security":[{"ApiKeyAuth":["users:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"window","in":"query","required":false,"schema":{"type":"string","enum":["today","7d","30d","90d","all"],"default":"30d"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/UserPerformance"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/Internal"}}}}}}