{"openapi":"3.0.0","info":{"title":"Conduit API","version":"1.0.0","description":"Public API for Conduit."},"servers":[{"url":"https://api.conduit.ai","description":"Production"}],"tags":[{"name":"meta","description":"Discovery and API metadata endpoints."},{"name":"agents","description":"V2 chat agent configuration, including instructions, skills, triggers, and automation behavior."},{"name":"contacts","description":"Contact profile and contact-scoped related resources such as tickets and calls."},{"name":"workspaces","description":"Workspaces accessible to the current API token."},{"name":"escalations","description":"Chat escalations that require operator review, including message, proposed response, and disposition context when available."},{"name":"conversations","description":"Canonical message threads. Use these endpoints to list threads, inspect conversation state, read transcripts, and send replies."},{"name":"conversation-tags","description":"Conversation labels, root topics, and subtopics used for classification and topic analytics."},{"name":"tickets","description":"Operational queue items tied to conversations, including ticket-scoped transcripts and replies."},{"name":"calls","description":"Phone call records, transcripts, summaries, and recordings when available."},{"name":"reservations","description":"PMS reservations synced from the workspace's integrations (Hostaway, Guesty, Airbnb, etc.), including guest identity, payment status, and stay dates."},{"name":"appointments","description":"Scheduled appointments (bookings) backed by the Conduit booking service. Exposes allocation context and the upstream booking-service `external_id`."},{"name":"helpdesk_tickets","description":"Helpdesk tickets mirrored from external helpdesk integrations (Zendesk, Pylon, Plain), including requester identity and upstream metadata."},{"name":"kb","description":"Knowledge base search and node management. Nodes represent knowledge base entries (files or directories), chunks are the indexed retrieval units used by search."},{"name":"skills","description":"Workspace agent skills that can be attached to V2 chat agents. Sidebar/global-assistant skills are intentionally excluded."},{"name":"custom_tools","description":"Custom code tools: user-authored Python/JavaScript functions executed in a sandbox when an agent calls them. Includes a runtimes endpoint describing the entrypoint signature, return shape, and available dependencies per language."},{"name":"inbox_types","description":"Workspace inbox types. Each id is stable and usable as a message trigger's `inboxTypeId` and as the `inbox_type_id` filter on list conversations."},{"name":"workflows","description":"Workspace automation workflows: definitions, executions, and per-execution event timelines."},{"name":"insights","description":"Aggregated workspace analytics, such as conversation automation rate."}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API Token","description":"Conduit API token. Use `Authorization: Bearer <token>`. Read/write endpoints require a token with write access."}},"schemas":{},"parameters":{}},"paths":{"/v1":{"get":{"operationId":"getV1Index","security":[{"bearerAuth":[]}],"tags":["meta"],"summary":"Public API v1 index","description":"Lists the currently available v1 resource families and their primary endpoints.","responses":{"200":{"description":"V1 index","content":{"application/json":{"schema":{"type":"object","properties":{"version":{"type":"string"},"resources":{"type":"array","items":{"type":"string"}}},"required":["version","resources"],"description":"Top-level index of the main v1 resource families.","example":{"version":"v1","resources":["/v1/agents","/v1/agents/{id}","/v1/agents/{id}/tools","/v1/contacts","/v1/contacts/search","/v1/contacts/{id}/messages","/v1/contacts/{id}/pause-ai","/v1/contacts/{id}/resume-ai","/v1/conversation-tags","/v1/conversation-tags/{id}","/v1/conversations","/v1/conversations/search","/v1/skills","/v1/skills/{id}","/v1/custom-tools","/v1/custom-tools/{id}","/v1/custom-tools/runtimes","/v1/workspaces","/v1/workspaces/{id}/workflow-folders","/v1/workflows/{id}/folder","/v1/workspaces/{id}/users","/v1/workspaces/{id}/users/search","/v1/workspaces/{id}/senders","/v1/workspaces/{id}/whatsapp-templates","/v1/workspaces/{id}/verification-rules","/v1/workspaces/{id}/verification-rules/{rule_id}","/v1/escalations","/v1/escalations/{id}/resolve","/v1/escalations/{id}/assign","/v1/calls","/v1/tickets","/v1/tickets/search","/v1/tickets/{id}","/v1/contacts/{id}/tickets","/v1/tickets/{id}/messages","/v1/tickets/{id}/resolve","/v1/tickets/{id}/close","/v1/tickets/{id}/reopen","/v1/tickets/{id}/notes","/v1/tickets/{id}/notes/{note_id}","/v1/reservations","/v1/reservations/{id}","/v1/contacts/{id}/reservations","/v1/airbnb/transactions","/v1/appointments","/v1/appointments/{id}","/v1/contacts/{id}/appointments","/v1/helpdesk-tickets","/v1/helpdesk-tickets/{id}","/v1/contacts/{id}/helpdesk-tickets"]}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}}},"/v1/attachments/upload-url":{"post":{"operationId":"createAttachmentUploadUrl","security":[{"bearerAuth":[]}],"tags":["attachments"],"summary":"Create attachment upload URL","description":"Creates a signed Convex upload URL for public API attachments. PUT the raw file bytes to `upload_url`; the PUT response returns `{ storageId }`. Pass that value as `attachment_id` to `sendTicketMessage` or `createTicketNote` with filename, content type, and byte length metadata.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspace_id":{"type":"string","description":"Workspace the upload will be used with.","example":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o"}},"required":["workspace_id"],"description":"Request body for creating a signed attachment upload URL.","example":{"workspace_id":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o"}}}}},"responses":{"201":{"description":"Attachment upload URL","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"upload_url":{"type":"string","format":"uri","description":"Signed URL. PUT the raw file bytes here. The PUT response returns `{ storageId }`; use that value as `attachment_id`."}},"required":["upload_url"]}},"required":["data"],"description":"Signed attachment upload URL.","example":{"data":{"upload_url":"https://example.convex.cloud/api/storage/upload?token=..."}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}}},"/v1/models":{"get":{"operationId":"listModels","security":[{"bearerAuth":[]}],"tags":["agents"],"summary":"List supported agent models","description":"Lists the LLM models that can be set as an agent's `model` on create_agent / patch_agent. The set is global and can change over time, so read it here instead of hardcoding values.","responses":{"200":{"description":"Supported agent models","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"model_string":{"type":"string","description":"The value to pass as an agent's `model` (e.g. `openai:gpt-4o`)."},"provider":{"type":"string","description":"Model vendor, e.g. `openai` or `anthropic`."},"name":{"type":"string","description":"Human-readable model name for display."},"context_window_tokens":{"type":"number","description":"Maximum context window size in tokens."}},"required":["model_string","provider","name","context_window_tokens"]}}},"required":["data"],"description":"The LLM models available to set as an agent `model`. The set is global and can change over time, so read it here rather than hardcoding values.","example":{"data":[{"model_string":"openai:gpt-4o","provider":"openai","name":"GPT-4o","context_window_tokens":128000},{"model_string":"anthropic:claude-sonnet-4-6","provider":"anthropic","name":"Claude Sonnet 4.6","context_window_tokens":200000}]}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}}},"/v1/agents":{"get":{"operationId":"listAgents","security":[{"bearerAuth":[]}],"tags":["agents"],"summary":"List V2 chat agents","description":"Returns cursor-paginated V2 chat agents for a workspace, including their attached skills and triggers.","parameters":[{"schema":{"type":"string","description":"Workspace to query.","example":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o"},"required":true,"name":"workspace_id","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"}],"responses":{"200":{"description":"V2 chat agents","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Agent identifier. Use it with get_agent."},"workspace_id":{"type":"string"},"name":{"type":"string","description":"Display name of the agent."},"description":{"type":"string","nullable":true,"description":"Short description of the agent's purpose."},"color":{"type":"string","nullable":true,"description":"Hex color used to identify the agent in Conduit."},"icon_id":{"type":"number","nullable":true,"description":"Conduit icon identifier used for the agent."},"version":{"type":"string","enum":["v2"]},"instructions":{"type":"string","nullable":true},"model":{"type":"string","description":"The LLM this agent runs on: a kb_api `model_string` (e.g. `openai:gpt-4o`), or `default` when no override is set."},"guardrails":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"knowledge":{"type":"string"}},"required":["title","knowledge"]}},"operation_mode":{"type":"string","enum":["autopilot","copilot","inactive"],"description":"How the agent handles matching conversations."},"autopilot_schedule":{"type":"object","nullable":true,"properties":{"timezone":{"type":"string","description":"IANA timezone the schedule is evaluated in, e.g. \"America/New_York\"."},"days":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string","enum":["sunday","monday","tuesday","wednesday","thursday","friday","saturday"],"description":"Day of the week this window applies to."},"enabled":{"type":"boolean","description":"Whether autopilot is active on this day."},"ranges":{"type":"array","items":{"type":"object","properties":{"start":{"type":"string","description":"Window start as a 12-hour clock time, e.g. \"09:00 AM\"."},"end":{"type":"string","description":"Window end as a 12-hour clock time, e.g. \"05:00 PM\"."}},"required":["start","end"]},"description":"Time windows during which autopilot is active on this day."}},"required":["day","enabled","ranges"]},"description":"Per-day autopilot windows."}},"required":["timezone","days"],"description":"Autopilot schedule. Autopilot only sends inside the enabled day windows; outside them the agent falls back to copilot. Omit or set null for always-on autopilot."},"custom_response_delay_ms":{"type":"number"},"auto_mark_as_done":{"type":"boolean"},"response_language":{"type":"string","nullable":true,"enum":["English","Original","Spanish","French","German","Italian","Portuguese"]},"responseflow":{"type":"boolean"},"output_schema":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"type":{"type":"string"},"is_required":{"type":"boolean"}},"required":["name","type"]}},"skill_ids":{"type":"array","items":{"type":"string"}},"connection_ids":{"type":"array","items":{"type":"string"},"description":"Ids of the integration connections linked to this agent. Use list_agent_connections (GET /v1/agents/{id}/connections) for the full connection details and their tools."},"enabled":{"type":"boolean","description":"Whether the agent is enabled."},"triggers":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"type":{"type":"string","enum":["message"]},"config":{"oneOf":[{"type":"object","properties":{"scopeType":{"type":"string","enum":["all"]}},"required":["scopeType"],"additionalProperties":false},{"type":"object","properties":{"scopeType":{"type":"string","enum":["inbox"]},"inboxTypeId":{"type":"string"}},"required":["scopeType","inboxTypeId"],"additionalProperties":false},{"type":"object","properties":{"scopeType":{"type":"string","enum":["channel"]},"channelType":{"type":"string","enum":["airbnb","booking_com","sms","whatsapp","messenger","email","unthreaded_email","pms","widget","instagram","vrbo","expedia","helpdesk","slack","line_oa","portal"]}},"required":["scopeType","channelType"],"additionalProperties":false}]},"enabled":{"type":"boolean"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","workspace_id","name","description","type","config","enabled","created_at","updated_at"]},{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"type":{"type":"string","enum":["webhook"]},"config":{"nullable":true},"enabled":{"type":"boolean"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","workspace_id","name","description","type","enabled","created_at","updated_at"]},{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"type":{"type":"string","enum":["cron"]},"config":{"nullable":true},"enabled":{"type":"boolean"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","workspace_id","name","description","type","enabled","created_at","updated_at"]},{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"type":{"type":"string","enum":["event"]},"config":{"nullable":true},"enabled":{"type":"boolean"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","workspace_id","name","description","type","enabled","created_at","updated_at"]},{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"type":{"type":"string","enum":["mention"]},"config":{"oneOf":[{"type":"object","properties":{"tool":{"type":"string","enum":["slack"]},"slackTeamId":{"type":"string","minLength":1},"slackChannelId":{"type":"string","minLength":1}},"required":["tool"],"additionalProperties":false},{"type":"object","properties":{"tool":{"type":"string","enum":["linear"]},"linearTeamId":{"type":"string","minLength":1}},"required":["tool"],"additionalProperties":false},{"type":"object","properties":{"tool":{"type":"string","enum":["microsoft_teams"]},"tenantId":{"type":"string","minLength":1},"teamId":{"type":"string","minLength":1},"channelId":{"type":"string","minLength":1}},"required":["tool"],"additionalProperties":false}]},"enabled":{"type":"boolean"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","workspace_id","name","description","type","config","enabled","created_at","updated_at"]},{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"type":{"type":"string","enum":["manual"]},"config":{"nullable":true},"enabled":{"type":"boolean"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","workspace_id","name","description","type","enabled","created_at","updated_at"]}]}},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","workspace_id","name","description","color","icon_id","version","instructions","model","guardrails","operation_mode","autopilot_schedule","custom_response_delay_ms","auto_mark_as_done","response_language","responseflow","output_schema","skill_ids","connection_ids","enabled","triggers","created_at","updated_at"]}},"next_cursor":{"type":"string","nullable":true},"has_more":{"type":"boolean"}},"required":["data","next_cursor","has_more"],"description":"Cursor-paginated V2 chat agents response.","example":{"data":[{"id":"ag77c0dy0mgdpzmqz6tesry8w184002s","workspace_id":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o","name":"Reservations","description":"Handles booking and cancellation flows.","color":"#2563EB","icon_id":12,"version":"v2","instructions":"Answer booking questions, use policies before escalating, and keep replies concise.","model":"default","guardrails":[{"id":"guardrail_1","title":"Do not promise refunds","knowledge":"Only cite refund terms from approved policy docs or escalate."}],"operation_mode":"autopilot","autopilot_schedule":null,"custom_response_delay_ms":10000,"auto_mark_as_done":false,"response_language":"English","responseflow":true,"output_schema":[{"name":"resolution","description":"Short summary of the final outcome.","type":"string","is_required":true}],"skill_ids":["ks77c0dy0mgdpzmqz6tesry8w184002s"],"connection_ids":["cn77c0dy0mgdpzmqz6tesry8w184002s"],"enabled":true,"triggers":[{"id":"tr77c0dy0mgdpzmqz6tesry8w184002s","workspace_id":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o","name":"All Messages","description":"Runs for every inbound message.","type":"message","config":{"scopeType":"all"},"enabled":true,"created_at":"2026-04-01T17:22:10.000Z","updated_at":"2026-04-03T03:14:15.000Z"},{"id":"tr88c0dy0mgdpzmqz6tesry8w184003s","workspace_id":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o","name":"Contact Inbox","description":"Runs only for contact-type inbox messages.","type":"message","config":{"scopeType":"inbox","inboxTypeId":"guest"},"enabled":true,"created_at":"2026-04-01T17:22:10.000Z","updated_at":"2026-04-03T03:14:15.000Z"},{"id":"tr99c0dy0mgdpzmqz6tesry8w184004s","workspace_id":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o","name":"SMS Channel","description":"Runs only for SMS channel messages.","type":"message","config":{"scopeType":"channel","channelType":"sms"},"enabled":true,"created_at":"2026-04-01T17:22:10.000Z","updated_at":"2026-04-03T03:14:15.000Z"}],"created_at":"2026-04-01T17:22:10.000Z","updated_at":"2026-04-03T03:14:15.000Z"}],"next_cursor":"page-token","has_more":true}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}},"post":{"operationId":"createAgent","security":[{"bearerAuth":[]}],"tags":["agents"],"summary":"Create V2 chat agent","description":"Creates a V2 chat agent and its initial trigger set. Requires a token with write access.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspace_id":{"type":"string"},"name":{"type":"string","minLength":1},"description":{"type":"string","minLength":1},"color":{"type":"string","minLength":1},"icon_id":{"type":"integer","minimum":0},"instructions":{"type":"string","minLength":1},"model":{"type":"string","nullable":true,"minLength":1,"description":"Override the LLM this agent runs on. Must be a `model_string` from `GET /v1/models` (MCP: `list_supported_models`), e.g. `openai:gpt-4o`. Omit to leave unchanged; send null to reset to the workspace default. Reads return the configured value, or `default` when none is set."},"guardrails":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"knowledge":{"type":"string"}},"required":["title","knowledge"]}},"skill_ids":{"type":"array","items":{"type":"string"}},"operation_mode":{"type":"string","enum":["autopilot","copilot","inactive"]},"autopilot_schedule":{"type":"object","properties":{"timezone":{"type":"string","description":"IANA timezone the schedule is evaluated in, e.g. \"America/New_York\"."},"days":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string","enum":["sunday","monday","tuesday","wednesday","thursday","friday","saturday"],"description":"Day of the week this window applies to."},"enabled":{"type":"boolean","description":"Whether autopilot is active on this day."},"ranges":{"type":"array","items":{"type":"object","properties":{"start":{"type":"string","description":"Window start as a 12-hour clock time, e.g. \"09:00 AM\"."},"end":{"type":"string","description":"Window end as a 12-hour clock time, e.g. \"05:00 PM\"."}},"required":["start","end"]},"description":"Time windows during which autopilot is active on this day."}},"required":["day","enabled","ranges"]},"description":"Per-day autopilot windows."}},"required":["timezone","days"],"description":"Autopilot schedule. Autopilot only sends inside the enabled day windows; outside them the agent falls back to copilot. Omit or set null for always-on autopilot."},"custom_response_delay_ms":{"type":"integer","minimum":0},"auto_mark_as_done":{"type":"boolean"},"response_language":{"type":"string","nullable":true,"enum":["English","Original","Spanish","French","German","Italian","Portuguese"]},"responseflow":{"type":"boolean"},"output_schema":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"type":{"type":"string"},"is_required":{"type":"boolean"}},"required":["name","type"]}},"enabled":{"type":"boolean"},"triggers":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["message"]},"name":{"type":"string","minLength":1},"description":{"type":"string","nullable":true,"minLength":1},"config":{"oneOf":[{"type":"object","properties":{"scopeType":{"type":"string","enum":["all"]}},"required":["scopeType"],"additionalProperties":false},{"type":"object","properties":{"scopeType":{"type":"string","enum":["inbox"]},"inboxTypeId":{"type":"string"}},"required":["scopeType","inboxTypeId"],"additionalProperties":false},{"type":"object","properties":{"scopeType":{"type":"string","enum":["channel"]},"channelType":{"type":"string","enum":["airbnb","booking_com","sms","whatsapp","messenger","email","unthreaded_email","pms","widget","instagram","vrbo","expedia","helpdesk","slack","line_oa","portal"]}},"required":["scopeType","channelType"],"additionalProperties":false}]},"enabled":{"type":"boolean"}},"required":["type","name","config"]},{"type":"object","properties":{"type":{"type":"string","enum":["webhook"]},"name":{"type":"string","minLength":1},"description":{"type":"string","nullable":true,"minLength":1},"config":{"nullable":true},"enabled":{"type":"boolean"}},"required":["type","name"]},{"type":"object","properties":{"type":{"type":"string","enum":["cron"]},"name":{"type":"string","minLength":1},"description":{"type":"string","nullable":true,"minLength":1},"config":{"type":"object","properties":{"prompt":{"type":"string","minLength":1},"spec":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["once"]},"atMs":{"type":"number"}},"required":["kind","atMs"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["interval"]},"everyMinutes":{"type":"integer","minimum":1}},"required":["kind","everyMinutes"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["daily"]},"hour":{"type":"integer","minimum":0,"maximum":23},"minute":{"type":"integer","minimum":0,"maximum":59}},"required":["kind","hour","minute"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["weekly"]},"dayOfWeek":{"type":"integer","minimum":0,"maximum":6},"hour":{"type":"integer","minimum":0,"maximum":23},"minute":{"type":"integer","minimum":0,"maximum":59}},"required":["kind","dayOfWeek","hour","minute"],"additionalProperties":false}]},"timezone":{"type":"string","minLength":1},"overlapPolicy":{"type":"string","enum":["skip"]}},"required":["prompt","spec","timezone","overlapPolicy"],"additionalProperties":false},"enabled":{"type":"boolean"}},"required":["type","name","config"]},{"type":"object","properties":{"type":{"type":"string","enum":["event"]},"name":{"type":"string","minLength":1},"description":{"type":"string","nullable":true,"minLength":1},"config":{"type":"object","properties":{"eventType":{"type":"string","enum":["CONTACT_NEW","CONTACT_ATTRIBUTE_UPDATED","CONTACT_LABEL_ADDED","CONVERSATION_TAG_ADDED","TASK_NEW","TASK_STATUS_CHANGED","TASK_COMPLETED","TASK_STARTED","TASK_ASSIGNED","RESERVATION_NEW","RESERVATION_MODIFIED","RESERVATION_LABEL_ADDED","BOOKING_NEW","BOOKING_MODIFIED","CLEANING_STATUS_CHANGED","ESCALATION_CREATED","CALL_COMPLETED","CALL_MISSED","WIDGET_FORM_SUBMITTED","WIDGET_SESSION_ENDED","AI_TRIGGER","WEBHOOK_RECEIVED","STRIPE_WEBHOOK","JOBBER_JOB_CREATED","JOBBER_JOB_UPDATED","JOBBER_JOB_CLOSED","JOBBER_VISIT_COMPLETED","PORTAL_VIEWED","PORTAL_OFFER_VIEWED","PORTAL_OFFER_ADDED_TO_CART","PORTAL_OFFER_REMOVED_FROM_CART","PORTAL_CHECKOUT_OPENED","PORTAL_CHECKOUT_STARTED","PORTAL_PAYMENT_SUBMITTED","PORTAL_CHECKOUT_SUCCEEDED","PORTAL_PAYMENT_FAILED","PORTAL_REFUND_ISSUED","PORTAL_SESSION_COMPLETED","PORTAL_CHECK_IN_COMPLETED","PORTAL_SESSION_EXPIRED","PORTAL_REQUEST_SUBMITTED","PORTAL_REQUEST_APPROVED","PORTAL_REQUEST_DECLINED","PORTAL_REQUEST_EXPIRED","PORTAL_DELIVERY_FAILED","PORTAL_MANDATORY_FEE_PAID","PORTAL_SECURITY_DEPOSIT_AUTHORIZED","PORTAL_SECURITY_DEPOSIT_CAPTURED","PORTAL_SECURITY_DEPOSIT_RELEASED","PORTAL_SECURITY_DEPOSIT_RENEWAL_REQUIRED","PORTAL_AGREEMENT_SIGNED","PORTAL_DAMAGE_WAIVER_COMPLETED","PORTAL_GUEST_DETAILS_SUBMITTED","PORTAL_ADDITIONAL_QUESTIONS_SUBMITTED","PORTAL_OTHER_GUESTS_SUBMITTED"]},"prompt":{"type":"string","minLength":1}},"required":["eventType","prompt"],"additionalProperties":false},"enabled":{"type":"boolean"}},"required":["type","name","config"]},{"type":"object","properties":{"type":{"type":"string","enum":["mention"]},"name":{"type":"string","minLength":1},"description":{"type":"string","nullable":true,"minLength":1},"config":{"oneOf":[{"type":"object","properties":{"tool":{"type":"string","enum":["slack"]},"slackTeamId":{"type":"string","minLength":1},"slackChannelId":{"type":"string","minLength":1}},"required":["tool"],"additionalProperties":false},{"type":"object","properties":{"tool":{"type":"string","enum":["linear"]},"linearTeamId":{"type":"string","minLength":1}},"required":["tool"],"additionalProperties":false},{"type":"object","properties":{"tool":{"type":"string","enum":["microsoft_teams"]},"tenantId":{"type":"string","minLength":1},"teamId":{"type":"string","minLength":1},"channelId":{"type":"string","minLength":1}},"required":["tool"],"additionalProperties":false}]},"enabled":{"type":"boolean"}},"required":["type","name","config"]},{"type":"object","properties":{"type":{"type":"string","enum":["manual"]},"name":{"type":"string","minLength":1},"description":{"type":"string","nullable":true,"minLength":1},"config":{"type":"object","properties":{"defaultPrompt":{"type":"string","minLength":1}},"additionalProperties":false},"enabled":{"type":"boolean"}},"required":["type","name","config"]}]},"minItems":1}},"required":["workspace_id","name","triggers"],"description":"Request body for creating a V2 chat agent with one or more triggers.","example":{"workspace_id":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o","name":"Reservations","description":"Handles booking and cancellation flows.","color":"#2563EB","icon_id":12,"instructions":"Answer booking questions, use policies before escalating, and keep replies concise.","guardrails":[{"title":"Do not promise refunds","knowledge":"Only cite refund terms from approved policy docs or escalate."}],"skill_ids":["ks77c0dy0mgdpzmqz6tesry8w184002s"],"operation_mode":"autopilot","response_language":"English","responseflow":true,"custom_response_delay_ms":10000,"auto_mark_as_done":false,"output_schema":[{"name":"resolution","description":"Short summary of the final outcome.","type":"string","is_required":true}],"triggers":[{"name":"All Messages","description":"Runs for every inbound message.","type":"message","config":{"scopeType":"all"},"enabled":true},{"name":"Contact Inbox","description":"Runs only for contact-type inbox messages.","type":"message","config":{"scopeType":"inbox","inboxTypeId":"guest"},"enabled":true}]}}}}},"responses":{"201":{"description":"Agent created","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Agent identifier. Use it with get_agent."},"workspace_id":{"type":"string"},"name":{"type":"string","description":"Display name of the agent."},"description":{"type":"string","nullable":true,"description":"Short description of the agent's purpose."},"color":{"type":"string","nullable":true,"description":"Hex color used to identify the agent in Conduit."},"icon_id":{"type":"number","nullable":true,"description":"Conduit icon identifier used for the agent."},"version":{"type":"string","enum":["v2"]},"instructions":{"type":"string","nullable":true},"model":{"type":"string","description":"The LLM this agent runs on: a kb_api `model_string` (e.g. `openai:gpt-4o`), or `default` when no override is set."},"guardrails":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"knowledge":{"type":"string"}},"required":["title","knowledge"]}},"operation_mode":{"type":"string","enum":["autopilot","copilot","inactive"],"description":"How the agent handles matching conversations."},"autopilot_schedule":{"type":"object","nullable":true,"properties":{"timezone":{"type":"string","description":"IANA timezone the schedule is evaluated in, e.g. \"America/New_York\"."},"days":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string","enum":["sunday","monday","tuesday","wednesday","thursday","friday","saturday"],"description":"Day of the week this window applies to."},"enabled":{"type":"boolean","description":"Whether autopilot is active on this day."},"ranges":{"type":"array","items":{"type":"object","properties":{"start":{"type":"string","description":"Window start as a 12-hour clock time, e.g. \"09:00 AM\"."},"end":{"type":"string","description":"Window end as a 12-hour clock time, e.g. \"05:00 PM\"."}},"required":["start","end"]},"description":"Time windows during which autopilot is active on this day."}},"required":["day","enabled","ranges"]},"description":"Per-day autopilot windows."}},"required":["timezone","days"],"description":"Autopilot schedule. Autopilot only sends inside the enabled day windows; outside them the agent falls back to copilot. Omit or set null for always-on autopilot."},"custom_response_delay_ms":{"type":"number"},"auto_mark_as_done":{"type":"boolean"},"response_language":{"type":"string","nullable":true,"enum":["English","Original","Spanish","French","German","Italian","Portuguese"]},"responseflow":{"type":"boolean"},"output_schema":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"type":{"type":"string"},"is_required":{"type":"boolean"}},"required":["name","type"]}},"skill_ids":{"type":"array","items":{"type":"string"}},"connection_ids":{"type":"array","items":{"type":"string"},"description":"Ids of the integration connections linked to this agent. Use list_agent_connections (GET /v1/agents/{id}/connections) for the full connection details and their tools."},"enabled":{"type":"boolean","description":"Whether the agent is enabled."},"triggers":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"type":{"type":"string","enum":["message"]},"config":{"oneOf":[{"type":"object","properties":{"scopeType":{"type":"string","enum":["all"]}},"required":["scopeType"],"additionalProperties":false},{"type":"object","properties":{"scopeType":{"type":"string","enum":["inbox"]},"inboxTypeId":{"type":"string"}},"required":["scopeType","inboxTypeId"],"additionalProperties":false},{"type":"object","properties":{"scopeType":{"type":"string","enum":["channel"]},"channelType":{"type":"string","enum":["airbnb","booking_com","sms","whatsapp","messenger","email","unthreaded_email","pms","widget","instagram","vrbo","expedia","helpdesk","slack","line_oa","portal"]}},"required":["scopeType","channelType"],"additionalProperties":false}]},"enabled":{"type":"boolean"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","workspace_id","name","description","type","config","enabled","created_at","updated_at"]},{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"type":{"type":"string","enum":["webhook"]},"config":{"nullable":true},"enabled":{"type":"boolean"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","workspace_id","name","description","type","enabled","created_at","updated_at"]},{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"type":{"type":"string","enum":["cron"]},"config":{"nullable":true},"enabled":{"type":"boolean"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","workspace_id","name","description","type","enabled","created_at","updated_at"]},{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"type":{"type":"string","enum":["event"]},"config":{"nullable":true},"enabled":{"type":"boolean"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","workspace_id","name","description","type","enabled","created_at","updated_at"]},{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"type":{"type":"string","enum":["mention"]},"config":{"oneOf":[{"type":"object","properties":{"tool":{"type":"string","enum":["slack"]},"slackTeamId":{"type":"string","minLength":1},"slackChannelId":{"type":"string","minLength":1}},"required":["tool"],"additionalProperties":false},{"type":"object","properties":{"tool":{"type":"string","enum":["linear"]},"linearTeamId":{"type":"string","minLength":1}},"required":["tool"],"additionalProperties":false},{"type":"object","properties":{"tool":{"type":"string","enum":["microsoft_teams"]},"tenantId":{"type":"string","minLength":1},"teamId":{"type":"string","minLength":1},"channelId":{"type":"string","minLength":1}},"required":["tool"],"additionalProperties":false}]},"enabled":{"type":"boolean"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","workspace_id","name","description","type","config","enabled","created_at","updated_at"]},{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"type":{"type":"string","enum":["manual"]},"config":{"nullable":true},"enabled":{"type":"boolean"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","workspace_id","name","description","type","enabled","created_at","updated_at"]}]}},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","workspace_id","name","description","color","icon_id","version","instructions","model","guardrails","operation_mode","autopilot_schedule","custom_response_delay_ms","auto_mark_as_done","response_language","responseflow","output_schema","skill_ids","connection_ids","enabled","triggers","created_at","updated_at"]}},"required":["data"],"description":"Single V2 chat agent response.","example":{"data":{"id":"ag77c0dy0mgdpzmqz6tesry8w184002s","workspace_id":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o","name":"Reservations","description":"Handles booking and cancellation flows.","color":"#2563EB","icon_id":12,"version":"v2","instructions":"Answer booking questions, use policies before escalating, and keep replies concise.","model":"default","guardrails":[{"id":"guardrail_1","title":"Do not promise refunds","knowledge":"Only cite refund terms from approved policy docs or escalate."}],"operation_mode":"autopilot","autopilot_schedule":null,"custom_response_delay_ms":10000,"auto_mark_as_done":false,"response_language":"English","responseflow":true,"output_schema":[{"name":"resolution","description":"Short summary of the final outcome.","type":"string","is_required":true}],"skill_ids":["ks77c0dy0mgdpzmqz6tesry8w184002s"],"connection_ids":["cn77c0dy0mgdpzmqz6tesry8w184002s"],"enabled":true,"triggers":[{"id":"tr77c0dy0mgdpzmqz6tesry8w184002s","workspace_id":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o","name":"All Messages","description":"Runs for every inbound message.","type":"message","config":{"scopeType":"all"},"enabled":true,"created_at":"2026-04-01T17:22:10.000Z","updated_at":"2026-04-03T03:14:15.000Z"},{"id":"tr88c0dy0mgdpzmqz6tesry8w184003s","workspace_id":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o","name":"Contact Inbox","description":"Runs only for contact-type inbox messages.","type":"message","config":{"scopeType":"inbox","inboxTypeId":"guest"},"enabled":true,"created_at":"2026-04-01T17:22:10.000Z","updated_at":"2026-04-03T03:14:15.000Z"},{"id":"tr99c0dy0mgdpzmqz6tesry8w184004s","workspace_id":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o","name":"SMS Channel","description":"Runs only for SMS channel messages.","type":"message","config":{"scopeType":"channel","channelType":"sms"},"enabled":true,"created_at":"2026-04-01T17:22:10.000Z","updated_at":"2026-04-03T03:14:15.000Z"}],"created_at":"2026-04-01T17:22:10.000Z","updated_at":"2026-04-03T03:14:15.000Z"}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}}},"/v1/agents/{id}":{"get":{"operationId":"getAgent","security":[{"bearerAuth":[]}],"tags":["agents"],"summary":"Get agent by id","description":"Returns a single V2 chat agent by id.","parameters":[{"schema":{"type":"string","description":"Agent id.","example":"ag77c0dy0mgdpzmqz6tesry8w184002s"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"Optional workspace override. If omitted, Conduit resolves the agent's workspace automatically.","example":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o"},"required":false,"name":"workspace_id","in":"query"}],"responses":{"200":{"description":"Agent","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Agent identifier. Use it with get_agent."},"workspace_id":{"type":"string"},"name":{"type":"string","description":"Display name of the agent."},"description":{"type":"string","nullable":true,"description":"Short description of the agent's purpose."},"color":{"type":"string","nullable":true,"description":"Hex color used to identify the agent in Conduit."},"icon_id":{"type":"number","nullable":true,"description":"Conduit icon identifier used for the agent."},"version":{"type":"string","enum":["v2"]},"instructions":{"type":"string","nullable":true},"model":{"type":"string","description":"The LLM this agent runs on: a kb_api `model_string` (e.g. `openai:gpt-4o`), or `default` when no override is set."},"guardrails":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"knowledge":{"type":"string"}},"required":["title","knowledge"]}},"operation_mode":{"type":"string","enum":["autopilot","copilot","inactive"],"description":"How the agent handles matching conversations."},"autopilot_schedule":{"type":"object","nullable":true,"properties":{"timezone":{"type":"string","description":"IANA timezone the schedule is evaluated in, e.g. \"America/New_York\"."},"days":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string","enum":["sunday","monday","tuesday","wednesday","thursday","friday","saturday"],"description":"Day of the week this window applies to."},"enabled":{"type":"boolean","description":"Whether autopilot is active on this day."},"ranges":{"type":"array","items":{"type":"object","properties":{"start":{"type":"string","description":"Window start as a 12-hour clock time, e.g. \"09:00 AM\"."},"end":{"type":"string","description":"Window end as a 12-hour clock time, e.g. \"05:00 PM\"."}},"required":["start","end"]},"description":"Time windows during which autopilot is active on this day."}},"required":["day","enabled","ranges"]},"description":"Per-day autopilot windows."}},"required":["timezone","days"],"description":"Autopilot schedule. Autopilot only sends inside the enabled day windows; outside them the agent falls back to copilot. Omit or set null for always-on autopilot."},"custom_response_delay_ms":{"type":"number"},"auto_mark_as_done":{"type":"boolean"},"response_language":{"type":"string","nullable":true,"enum":["English","Original","Spanish","French","German","Italian","Portuguese"]},"responseflow":{"type":"boolean"},"output_schema":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"type":{"type":"string"},"is_required":{"type":"boolean"}},"required":["name","type"]}},"skill_ids":{"type":"array","items":{"type":"string"}},"connection_ids":{"type":"array","items":{"type":"string"},"description":"Ids of the integration connections linked to this agent. Use list_agent_connections (GET /v1/agents/{id}/connections) for the full connection details and their tools."},"enabled":{"type":"boolean","description":"Whether the agent is enabled."},"triggers":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"type":{"type":"string","enum":["message"]},"config":{"oneOf":[{"type":"object","properties":{"scopeType":{"type":"string","enum":["all"]}},"required":["scopeType"],"additionalProperties":false},{"type":"object","properties":{"scopeType":{"type":"string","enum":["inbox"]},"inboxTypeId":{"type":"string"}},"required":["scopeType","inboxTypeId"],"additionalProperties":false},{"type":"object","properties":{"scopeType":{"type":"string","enum":["channel"]},"channelType":{"type":"string","enum":["airbnb","booking_com","sms","whatsapp","messenger","email","unthreaded_email","pms","widget","instagram","vrbo","expedia","helpdesk","slack","line_oa","portal"]}},"required":["scopeType","channelType"],"additionalProperties":false}]},"enabled":{"type":"boolean"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","workspace_id","name","description","type","config","enabled","created_at","updated_at"]},{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"type":{"type":"string","enum":["webhook"]},"config":{"nullable":true},"enabled":{"type":"boolean"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","workspace_id","name","description","type","enabled","created_at","updated_at"]},{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"type":{"type":"string","enum":["cron"]},"config":{"nullable":true},"enabled":{"type":"boolean"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","workspace_id","name","description","type","enabled","created_at","updated_at"]},{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"type":{"type":"string","enum":["event"]},"config":{"nullable":true},"enabled":{"type":"boolean"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","workspace_id","name","description","type","enabled","created_at","updated_at"]},{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"type":{"type":"string","enum":["mention"]},"config":{"oneOf":[{"type":"object","properties":{"tool":{"type":"string","enum":["slack"]},"slackTeamId":{"type":"string","minLength":1},"slackChannelId":{"type":"string","minLength":1}},"required":["tool"],"additionalProperties":false},{"type":"object","properties":{"tool":{"type":"string","enum":["linear"]},"linearTeamId":{"type":"string","minLength":1}},"required":["tool"],"additionalProperties":false},{"type":"object","properties":{"tool":{"type":"string","enum":["microsoft_teams"]},"tenantId":{"type":"string","minLength":1},"teamId":{"type":"string","minLength":1},"channelId":{"type":"string","minLength":1}},"required":["tool"],"additionalProperties":false}]},"enabled":{"type":"boolean"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","workspace_id","name","description","type","config","enabled","created_at","updated_at"]},{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"type":{"type":"string","enum":["manual"]},"config":{"nullable":true},"enabled":{"type":"boolean"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","workspace_id","name","description","type","enabled","created_at","updated_at"]}]}},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","workspace_id","name","description","color","icon_id","version","instructions","model","guardrails","operation_mode","autopilot_schedule","custom_response_delay_ms","auto_mark_as_done","response_language","responseflow","output_schema","skill_ids","connection_ids","enabled","triggers","created_at","updated_at"]}},"required":["data"],"description":"Single V2 chat agent response.","example":{"data":{"id":"ag77c0dy0mgdpzmqz6tesry8w184002s","workspace_id":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o","name":"Reservations","description":"Handles booking and cancellation flows.","color":"#2563EB","icon_id":12,"version":"v2","instructions":"Answer booking questions, use policies before escalating, and keep replies concise.","model":"default","guardrails":[{"id":"guardrail_1","title":"Do not promise refunds","knowledge":"Only cite refund terms from approved policy docs or escalate."}],"operation_mode":"autopilot","autopilot_schedule":null,"custom_response_delay_ms":10000,"auto_mark_as_done":false,"response_language":"English","responseflow":true,"output_schema":[{"name":"resolution","description":"Short summary of the final outcome.","type":"string","is_required":true}],"skill_ids":["ks77c0dy0mgdpzmqz6tesry8w184002s"],"connection_ids":["cn77c0dy0mgdpzmqz6tesry8w184002s"],"enabled":true,"triggers":[{"id":"tr77c0dy0mgdpzmqz6tesry8w184002s","workspace_id":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o","name":"All Messages","description":"Runs for every inbound message.","type":"message","config":{"scopeType":"all"},"enabled":true,"created_at":"2026-04-01T17:22:10.000Z","updated_at":"2026-04-03T03:14:15.000Z"},{"id":"tr88c0dy0mgdpzmqz6tesry8w184003s","workspace_id":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o","name":"Contact Inbox","description":"Runs only for contact-type inbox messages.","type":"message","config":{"scopeType":"inbox","inboxTypeId":"guest"},"enabled":true,"created_at":"2026-04-01T17:22:10.000Z","updated_at":"2026-04-03T03:14:15.000Z"},{"id":"tr99c0dy0mgdpzmqz6tesry8w184004s","workspace_id":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o","name":"SMS Channel","description":"Runs only for SMS channel messages.","type":"message","config":{"scopeType":"channel","channelType":"sms"},"enabled":true,"created_at":"2026-04-01T17:22:10.000Z","updated_at":"2026-04-03T03:14:15.000Z"}],"created_at":"2026-04-01T17:22:10.000Z","updated_at":"2026-04-03T03:14:15.000Z"}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}},"patch":{"operationId":"patchAgent","security":[{"bearerAuth":[]}],"tags":["agents"],"summary":"Patch V2 chat agent","description":"Updates mutable V2 chat agent fields. `skill_ids` and `triggers` replace the existing values when provided.","parameters":[{"schema":{"type":"string","description":"Agent id.","example":"ag77c0dy0mgdpzmqz6tesry8w184002s"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"Optional workspace override. If omitted, Conduit resolves the agent's workspace automatically.","example":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o"},"required":false,"name":"workspace_id","in":"query"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"description":{"type":"string","nullable":true,"minLength":1},"color":{"type":"string","nullable":true,"minLength":1},"icon_id":{"type":"integer","nullable":true,"minimum":0},"instructions":{"type":"string","nullable":true,"minLength":1},"model":{"type":"string","nullable":true,"minLength":1,"description":"Override the LLM this agent runs on. Must be a `model_string` from `GET /v1/models` (MCP: `list_supported_models`), e.g. `openai:gpt-4o`. Omit to leave unchanged; send null to reset to the workspace default. Reads return the configured value, or `default` when none is set."},"guardrails":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"knowledge":{"type":"string"}},"required":["title","knowledge"]}},"skill_ids":{"type":"array","items":{"type":"string"}},"operation_mode":{"type":"string","enum":["autopilot","copilot","inactive"]},"autopilot_schedule":{"type":"object","nullable":true,"properties":{"timezone":{"type":"string","description":"IANA timezone the schedule is evaluated in, e.g. \"America/New_York\"."},"days":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string","enum":["sunday","monday","tuesday","wednesday","thursday","friday","saturday"],"description":"Day of the week this window applies to."},"enabled":{"type":"boolean","description":"Whether autopilot is active on this day."},"ranges":{"type":"array","items":{"type":"object","properties":{"start":{"type":"string","description":"Window start as a 12-hour clock time, e.g. \"09:00 AM\"."},"end":{"type":"string","description":"Window end as a 12-hour clock time, e.g. \"05:00 PM\"."}},"required":["start","end"]},"description":"Time windows during which autopilot is active on this day."}},"required":["day","enabled","ranges"]},"description":"Per-day autopilot windows."}},"required":["timezone","days"],"description":"Autopilot schedule. Autopilot only sends inside the enabled day windows; outside them the agent falls back to copilot. Omit or set null for always-on autopilot."},"custom_response_delay_ms":{"type":"integer","nullable":true,"minimum":0},"auto_mark_as_done":{"type":"boolean"},"response_language":{"type":"string","nullable":true,"enum":["English","Original","Spanish","French","German","Italian","Portuguese"]},"responseflow":{"type":"boolean"},"output_schema":{"type":"array","nullable":true,"items":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"type":{"type":"string"},"is_required":{"type":"boolean"}},"required":["name","type"]}},"enabled":{"type":"boolean"},"triggers":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["message"]},"name":{"type":"string","minLength":1},"description":{"type":"string","nullable":true,"minLength":1},"config":{"oneOf":[{"type":"object","properties":{"scopeType":{"type":"string","enum":["all"]}},"required":["scopeType"],"additionalProperties":false},{"type":"object","properties":{"scopeType":{"type":"string","enum":["inbox"]},"inboxTypeId":{"type":"string"}},"required":["scopeType","inboxTypeId"],"additionalProperties":false},{"type":"object","properties":{"scopeType":{"type":"string","enum":["channel"]},"channelType":{"type":"string","enum":["airbnb","booking_com","sms","whatsapp","messenger","email","unthreaded_email","pms","widget","instagram","vrbo","expedia","helpdesk","slack","line_oa","portal"]}},"required":["scopeType","channelType"],"additionalProperties":false}]},"enabled":{"type":"boolean"}},"required":["type","name","config"]},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["webhook"]},"name":{"type":"string","minLength":1},"description":{"type":"string","nullable":true,"minLength":1},"config":{"nullable":true},"enabled":{"type":"boolean"}},"required":["type","name"]},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["cron"]},"name":{"type":"string","minLength":1},"description":{"type":"string","nullable":true,"minLength":1},"config":{"type":"object","properties":{"prompt":{"type":"string","minLength":1},"spec":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["once"]},"atMs":{"type":"number"}},"required":["kind","atMs"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["interval"]},"everyMinutes":{"type":"integer","minimum":1}},"required":["kind","everyMinutes"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["daily"]},"hour":{"type":"integer","minimum":0,"maximum":23},"minute":{"type":"integer","minimum":0,"maximum":59}},"required":["kind","hour","minute"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["weekly"]},"dayOfWeek":{"type":"integer","minimum":0,"maximum":6},"hour":{"type":"integer","minimum":0,"maximum":23},"minute":{"type":"integer","minimum":0,"maximum":59}},"required":["kind","dayOfWeek","hour","minute"],"additionalProperties":false}]},"timezone":{"type":"string","minLength":1},"overlapPolicy":{"type":"string","enum":["skip"]}},"required":["prompt","spec","timezone","overlapPolicy"],"additionalProperties":false},"enabled":{"type":"boolean"}},"required":["type","name","config"]},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["event"]},"name":{"type":"string","minLength":1},"description":{"type":"string","nullable":true,"minLength":1},"config":{"type":"object","properties":{"eventType":{"type":"string","enum":["CONTACT_NEW","CONTACT_ATTRIBUTE_UPDATED","CONTACT_LABEL_ADDED","CONVERSATION_TAG_ADDED","TASK_NEW","TASK_STATUS_CHANGED","TASK_COMPLETED","TASK_STARTED","TASK_ASSIGNED","RESERVATION_NEW","RESERVATION_MODIFIED","RESERVATION_LABEL_ADDED","BOOKING_NEW","BOOKING_MODIFIED","CLEANING_STATUS_CHANGED","ESCALATION_CREATED","CALL_COMPLETED","CALL_MISSED","WIDGET_FORM_SUBMITTED","WIDGET_SESSION_ENDED","AI_TRIGGER","WEBHOOK_RECEIVED","STRIPE_WEBHOOK","JOBBER_JOB_CREATED","JOBBER_JOB_UPDATED","JOBBER_JOB_CLOSED","JOBBER_VISIT_COMPLETED","PORTAL_VIEWED","PORTAL_OFFER_VIEWED","PORTAL_OFFER_ADDED_TO_CART","PORTAL_OFFER_REMOVED_FROM_CART","PORTAL_CHECKOUT_OPENED","PORTAL_CHECKOUT_STARTED","PORTAL_PAYMENT_SUBMITTED","PORTAL_CHECKOUT_SUCCEEDED","PORTAL_PAYMENT_FAILED","PORTAL_REFUND_ISSUED","PORTAL_SESSION_COMPLETED","PORTAL_CHECK_IN_COMPLETED","PORTAL_SESSION_EXPIRED","PORTAL_REQUEST_SUBMITTED","PORTAL_REQUEST_APPROVED","PORTAL_REQUEST_DECLINED","PORTAL_REQUEST_EXPIRED","PORTAL_DELIVERY_FAILED","PORTAL_MANDATORY_FEE_PAID","PORTAL_SECURITY_DEPOSIT_AUTHORIZED","PORTAL_SECURITY_DEPOSIT_CAPTURED","PORTAL_SECURITY_DEPOSIT_RELEASED","PORTAL_SECURITY_DEPOSIT_RENEWAL_REQUIRED","PORTAL_AGREEMENT_SIGNED","PORTAL_DAMAGE_WAIVER_COMPLETED","PORTAL_GUEST_DETAILS_SUBMITTED","PORTAL_ADDITIONAL_QUESTIONS_SUBMITTED","PORTAL_OTHER_GUESTS_SUBMITTED"]},"prompt":{"type":"string","minLength":1}},"required":["eventType","prompt"],"additionalProperties":false},"enabled":{"type":"boolean"}},"required":["type","name","config"]},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["mention"]},"name":{"type":"string","minLength":1},"description":{"type":"string","nullable":true,"minLength":1},"config":{"oneOf":[{"type":"object","properties":{"tool":{"type":"string","enum":["slack"]},"slackTeamId":{"type":"string","minLength":1},"slackChannelId":{"type":"string","minLength":1}},"required":["tool"],"additionalProperties":false},{"type":"object","properties":{"tool":{"type":"string","enum":["linear"]},"linearTeamId":{"type":"string","minLength":1}},"required":["tool"],"additionalProperties":false},{"type":"object","properties":{"tool":{"type":"string","enum":["microsoft_teams"]},"tenantId":{"type":"string","minLength":1},"teamId":{"type":"string","minLength":1},"channelId":{"type":"string","minLength":1}},"required":["tool"],"additionalProperties":false}]},"enabled":{"type":"boolean"}},"required":["type","name","config"]},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["manual"]},"name":{"type":"string","minLength":1},"description":{"type":"string","nullable":true,"minLength":1},"config":{"type":"object","properties":{"defaultPrompt":{"type":"string","minLength":1}},"additionalProperties":false},"enabled":{"type":"boolean"}},"required":["type","name","config"]}]}}},"description":"Request body for patching a V2 chat agent. `skill_ids` and `triggers` replace the existing values when provided.","example":{"description":"Handles reservation, cancellation, and refund flows.","color":"#2563EB","icon_id":12,"operation_mode":"copilot","skill_ids":["ks77c0dy0mgdpzmqz6tesry8w184002s"],"triggers":[{"id":"tr77c0dy0mgdpzmqz6tesry8w184002s","name":"All Messages","description":"Runs for every inbound message.","type":"message","config":{"scopeType":"all"},"enabled":true},{"id":"tr88c0dy0mgdpzmqz6tesry8w184003s","name":"SMS Channel","description":"Runs only for SMS channel messages.","type":"message","config":{"scopeType":"channel","channelType":"sms"},"enabled":true}]}}}}},"responses":{"200":{"description":"Agent updated","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Agent identifier. Use it with get_agent."},"workspace_id":{"type":"string"},"name":{"type":"string","description":"Display name of the agent."},"description":{"type":"string","nullable":true,"description":"Short description of the agent's purpose."},"color":{"type":"string","nullable":true,"description":"Hex color used to identify the agent in Conduit."},"icon_id":{"type":"number","nullable":true,"description":"Conduit icon identifier used for the agent."},"version":{"type":"string","enum":["v2"]},"instructions":{"type":"string","nullable":true},"model":{"type":"string","description":"The LLM this agent runs on: a kb_api `model_string` (e.g. `openai:gpt-4o`), or `default` when no override is set."},"guardrails":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"knowledge":{"type":"string"}},"required":["title","knowledge"]}},"operation_mode":{"type":"string","enum":["autopilot","copilot","inactive"],"description":"How the agent handles matching conversations."},"autopilot_schedule":{"type":"object","nullable":true,"properties":{"timezone":{"type":"string","description":"IANA timezone the schedule is evaluated in, e.g. \"America/New_York\"."},"days":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string","enum":["sunday","monday","tuesday","wednesday","thursday","friday","saturday"],"description":"Day of the week this window applies to."},"enabled":{"type":"boolean","description":"Whether autopilot is active on this day."},"ranges":{"type":"array","items":{"type":"object","properties":{"start":{"type":"string","description":"Window start as a 12-hour clock time, e.g. \"09:00 AM\"."},"end":{"type":"string","description":"Window end as a 12-hour clock time, e.g. \"05:00 PM\"."}},"required":["start","end"]},"description":"Time windows during which autopilot is active on this day."}},"required":["day","enabled","ranges"]},"description":"Per-day autopilot windows."}},"required":["timezone","days"],"description":"Autopilot schedule. Autopilot only sends inside the enabled day windows; outside them the agent falls back to copilot. Omit or set null for always-on autopilot."},"custom_response_delay_ms":{"type":"number"},"auto_mark_as_done":{"type":"boolean"},"response_language":{"type":"string","nullable":true,"enum":["English","Original","Spanish","French","German","Italian","Portuguese"]},"responseflow":{"type":"boolean"},"output_schema":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"type":{"type":"string"},"is_required":{"type":"boolean"}},"required":["name","type"]}},"skill_ids":{"type":"array","items":{"type":"string"}},"connection_ids":{"type":"array","items":{"type":"string"},"description":"Ids of the integration connections linked to this agent. Use list_agent_connections (GET /v1/agents/{id}/connections) for the full connection details and their tools."},"enabled":{"type":"boolean","description":"Whether the agent is enabled."},"triggers":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"type":{"type":"string","enum":["message"]},"config":{"oneOf":[{"type":"object","properties":{"scopeType":{"type":"string","enum":["all"]}},"required":["scopeType"],"additionalProperties":false},{"type":"object","properties":{"scopeType":{"type":"string","enum":["inbox"]},"inboxTypeId":{"type":"string"}},"required":["scopeType","inboxTypeId"],"additionalProperties":false},{"type":"object","properties":{"scopeType":{"type":"string","enum":["channel"]},"channelType":{"type":"string","enum":["airbnb","booking_com","sms","whatsapp","messenger","email","unthreaded_email","pms","widget","instagram","vrbo","expedia","helpdesk","slack","line_oa","portal"]}},"required":["scopeType","channelType"],"additionalProperties":false}]},"enabled":{"type":"boolean"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","workspace_id","name","description","type","config","enabled","created_at","updated_at"]},{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"type":{"type":"string","enum":["webhook"]},"config":{"nullable":true},"enabled":{"type":"boolean"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","workspace_id","name","description","type","enabled","created_at","updated_at"]},{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"type":{"type":"string","enum":["cron"]},"config":{"nullable":true},"enabled":{"type":"boolean"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","workspace_id","name","description","type","enabled","created_at","updated_at"]},{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"type":{"type":"string","enum":["event"]},"config":{"nullable":true},"enabled":{"type":"boolean"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","workspace_id","name","description","type","enabled","created_at","updated_at"]},{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"type":{"type":"string","enum":["mention"]},"config":{"oneOf":[{"type":"object","properties":{"tool":{"type":"string","enum":["slack"]},"slackTeamId":{"type":"string","minLength":1},"slackChannelId":{"type":"string","minLength":1}},"required":["tool"],"additionalProperties":false},{"type":"object","properties":{"tool":{"type":"string","enum":["linear"]},"linearTeamId":{"type":"string","minLength":1}},"required":["tool"],"additionalProperties":false},{"type":"object","properties":{"tool":{"type":"string","enum":["microsoft_teams"]},"tenantId":{"type":"string","minLength":1},"teamId":{"type":"string","minLength":1},"channelId":{"type":"string","minLength":1}},"required":["tool"],"additionalProperties":false}]},"enabled":{"type":"boolean"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","workspace_id","name","description","type","config","enabled","created_at","updated_at"]},{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"type":{"type":"string","enum":["manual"]},"config":{"nullable":true},"enabled":{"type":"boolean"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","workspace_id","name","description","type","enabled","created_at","updated_at"]}]}},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","workspace_id","name","description","color","icon_id","version","instructions","model","guardrails","operation_mode","autopilot_schedule","custom_response_delay_ms","auto_mark_as_done","response_language","responseflow","output_schema","skill_ids","connection_ids","enabled","triggers","created_at","updated_at"]}},"required":["data"],"description":"Single V2 chat agent response.","example":{"data":{"id":"ag77c0dy0mgdpzmqz6tesry8w184002s","workspace_id":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o","name":"Reservations","description":"Handles booking and cancellation flows.","color":"#2563EB","icon_id":12,"version":"v2","instructions":"Answer booking questions, use policies before escalating, and keep replies concise.","model":"default","guardrails":[{"id":"guardrail_1","title":"Do not promise refunds","knowledge":"Only cite refund terms from approved policy docs or escalate."}],"operation_mode":"autopilot","autopilot_schedule":null,"custom_response_delay_ms":10000,"auto_mark_as_done":false,"response_language":"English","responseflow":true,"output_schema":[{"name":"resolution","description":"Short summary of the final outcome.","type":"string","is_required":true}],"skill_ids":["ks77c0dy0mgdpzmqz6tesry8w184002s"],"connection_ids":["cn77c0dy0mgdpzmqz6tesry8w184002s"],"enabled":true,"triggers":[{"id":"tr77c0dy0mgdpzmqz6tesry8w184002s","workspace_id":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o","name":"All Messages","description":"Runs for every inbound message.","type":"message","config":{"scopeType":"all"},"enabled":true,"created_at":"2026-04-01T17:22:10.000Z","updated_at":"2026-04-03T03:14:15.000Z"},{"id":"tr88c0dy0mgdpzmqz6tesry8w184003s","workspace_id":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o","name":"Contact Inbox","description":"Runs only for contact-type inbox messages.","type":"message","config":{"scopeType":"inbox","inboxTypeId":"guest"},"enabled":true,"created_at":"2026-04-01T17:22:10.000Z","updated_at":"2026-04-03T03:14:15.000Z"},{"id":"tr99c0dy0mgdpzmqz6tesry8w184004s","workspace_id":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o","name":"SMS Channel","description":"Runs only for SMS channel messages.","type":"message","config":{"scopeType":"channel","channelType":"sms"},"enabled":true,"created_at":"2026-04-01T17:22:10.000Z","updated_at":"2026-04-03T03:14:15.000Z"}],"created_at":"2026-04-01T17:22:10.000Z","updated_at":"2026-04-03T03:14:15.000Z"}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}},"delete":{"operationId":"deleteAgent","security":[{"bearerAuth":[]}],"tags":["agents"],"summary":"Delete V2 chat agent","description":"Soft-deletes a V2 chat agent and removes it from its triggers. Requires a token with write access.","parameters":[{"schema":{"type":"string","description":"Agent id.","example":"ag77c0dy0mgdpzmqz6tesry8w184002s"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"Optional workspace override. If omitted, Conduit resolves the agent's workspace automatically.","example":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o"},"required":false,"name":"workspace_id","in":"query"}],"responses":{"204":{"description":"Agent deleted"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}}},"/v1/agents/{id}/run":{"post":{"operationId":"runAgent","security":[{"bearerAuth":[]}],"tags":["agents"],"summary":"Run V2 chat agent","description":"Manually dispatches a V2 agent as if one of its triggers fired. Cron triggers run immediately; webhook and workflow triggers use the supplied `payload`. Channel/message triggers are not supported. Requires a token with write access.","parameters":[{"schema":{"type":"string","description":"Agent id.","example":"ag77c0dy0mgdpzmqz6tesry8w184002s"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"Optional workspace override. If omitted, Conduit resolves the agent's workspace automatically.","example":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o"},"required":false,"name":"workspace_id","in":"query"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"trigger_id":{"type":"string","description":"Which trigger to run. Required only when the agent has more than one trigger. Cron runs immediately; webhook and workflow runs use `payload`.","example":"tr77c0dy0mgdpzmqz6tesry8w184002s"},"payload":{"nullable":true,"description":"Event payload for webhook / workflow triggers — the same JSON shape that trigger would receive when it fires for real. Ignored for cron triggers. Defaults to an empty object."}},"description":"Request body for manually dispatching a V2 chat agent.","example":{"trigger_id":"tr77c0dy0mgdpzmqz6tesry8w184002s","payload":{"reservation_id":"res_123","status":"confirmed"}}}}}},"responses":{"200":{"description":"Agent dispatched","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"dispatched":{"type":"boolean"},"trigger_id":{"type":"string"},"trigger_type":{"type":"string","enum":["cron","webhook","event"]}},"required":["dispatched","trigger_id","trigger_type"]}},"required":["data"],"description":"Result of a manual agent dispatch.","example":{"data":{"dispatched":true,"trigger_id":"tr77c0dy0mgdpzmqz6tesry8w184002s","trigger_type":"event"}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"422":{"description":"Trigger cannot be dispatched","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}}},"/v1/agents/{id}/runs":{"get":{"operationId":"listAgentRuns","security":[{"bearerAuth":[]}],"tags":["agents"],"summary":"List agent runs","description":"Returns cursor-paginated runs for a V2 chat agent, newest first. Each run summarizes its status, disposition, error, latency, and token usage. Use `get agent run` for the full tool-call trace.","parameters":[{"schema":{"type":"string","description":"Agent id.","example":"ag77c0dy0mgdpzmqz6tesry8w184002s"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"Optional workspace override. If omitted, Conduit resolves the agent's workspace automatically.","example":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o"},"required":false,"name":"workspace_id","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"string","enum":["accepted","running","completed","failed"],"description":"Filter runs by lifecycle status."},"required":false,"name":"status","in":"query"}],"responses":{"200":{"description":"Agent runs","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Run identifier. Pass to the get-run endpoint."},"run_id":{"type":"string","description":"Agent backend run id, useful for cross-referencing traces."},"agent_id":{"type":"string"},"workspace_id":{"type":"string"},"status":{"type":"string","enum":["accepted","running","completed","failed"],"description":"Lifecycle status of the run. `accepted`/`running` are in-flight; `completed`/`failed` are terminal."},"disposition":{"type":"string","nullable":true,"enum":["escalated","escalation_and_answer","resolved","unresolved","no_op","proactive"],"description":"The agent's decision for this run."},"disposition_reason":{"type":"string","nullable":true,"description":"Short tag explaining the disposition."},"autopilot_sent":{"type":"boolean","nullable":true,"description":"Whether a countable autopilot run delivered a reply. False means autopilot decided but held back or failed delivery; null means the run was not a countable autopilot run."},"proposal_outcome":{"type":"string","nullable":true,"enum":["approved","edited","dismissed"],"description":"What the operator did with a copilot proposal. Null means the operator has not acted yet, which is distinct from `dismissed`."},"contact_id":{"type":"string","nullable":true},"conversation_id":{"type":"string","nullable":true},"trigger_id":{"type":"string","nullable":true},"error":{"type":"string","nullable":true,"description":"Failure message when `status` is `failed`."},"duration_ms":{"type":"number","nullable":true,"description":"End-to-end run latency in milliseconds."},"token_usage":{"type":"object","nullable":true,"properties":{"input":{"type":"number","description":"Input (prompt) tokens consumed."},"output":{"type":"number","description":"Output (completion) tokens produced."}},"required":["input","output"],"description":"Token usage reported by the agent backend."},"total_cost":{"type":"number","nullable":true,"description":"Provider cost of the run in USD. Null for internal agents (billed in credits)."},"trace_id":{"type":"string","nullable":true},"created_at":{"type":"string"},"completed_at":{"type":"string","nullable":true}},"required":["id","run_id","agent_id","workspace_id","status","disposition","disposition_reason","autopilot_sent","proposal_outcome","contact_id","conversation_id","trigger_id","error","duration_ms","token_usage","total_cost","trace_id","created_at","completed_at"]}},"next_cursor":{"type":"string","nullable":true},"has_more":{"type":"boolean"}},"required":["data","next_cursor","has_more"],"description":"Cursor-paginated agent runs response.","example":{"data":[{"id":"ar77c0dy0mgdpzmqz6tesry8w184002s","run_id":"run_9f3a1c7e","agent_id":"ag77c0dy0mgdpzmqz6tesry8w184002s","workspace_id":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o","status":"completed","disposition":"resolved","disposition_reason":"answered_from_knowledge","autopilot_sent":true,"proposal_outcome":null,"contact_id":"co77c0dy0mgdpzmqz6tesry8w184002s","conversation_id":"cv77c0dy0mgdpzmqz6tesry8w184002s","trigger_id":"tr77c0dy0mgdpzmqz6tesry8w184002s","error":null,"duration_ms":4213,"token_usage":{"input":1820,"output":342},"total_cost":0.0121,"trace_id":"0f9c2b1d8a7e4f36","created_at":"2026-04-03T03:14:15.000Z","completed_at":"2026-04-03T03:14:19.213Z"}],"next_cursor":"page-token","has_more":true}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}}},"/v1/agents/{id}/runs/{run_id}":{"get":{"operationId":"getAgentRun","security":[{"bearerAuth":[]}],"tags":["agents"],"summary":"Get agent run","description":"Returns a single agent run with its full trace: status, disposition, error, token usage, latency, the model's reply, its reasoning, and the ordered tool-call timeline.","parameters":[{"schema":{"type":"string","description":"Agent id.","example":"ag77c0dy0mgdpzmqz6tesry8w184002s"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"Run id (from the list-runs response).","example":"ar77c0dy0mgdpzmqz6tesry8w184002s"},"required":true,"name":"run_id","in":"path"},{"schema":{"type":"string","description":"Optional workspace override. If omitted, Conduit resolves the agent's workspace automatically.","example":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o"},"required":false,"name":"workspace_id","in":"query"}],"responses":{"200":{"description":"Agent run","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Run identifier. Pass to the get-run endpoint."},"run_id":{"type":"string","description":"Agent backend run id, useful for cross-referencing traces."},"agent_id":{"type":"string"},"workspace_id":{"type":"string"},"status":{"type":"string","enum":["accepted","running","completed","failed"],"description":"Lifecycle status of the run. `accepted`/`running` are in-flight; `completed`/`failed` are terminal."},"disposition":{"type":"string","nullable":true,"enum":["escalated","escalation_and_answer","resolved","unresolved","no_op","proactive"],"description":"The agent's decision for this run."},"disposition_reason":{"type":"string","nullable":true,"description":"Short tag explaining the disposition."},"autopilot_sent":{"type":"boolean","nullable":true,"description":"Whether a countable autopilot run delivered a reply. False means autopilot decided but held back or failed delivery; null means the run was not a countable autopilot run."},"proposal_outcome":{"type":"string","nullable":true,"enum":["approved","edited","dismissed"],"description":"What the operator did with a copilot proposal. Null means the operator has not acted yet, which is distinct from `dismissed`."},"contact_id":{"type":"string","nullable":true},"conversation_id":{"type":"string","nullable":true},"trigger_id":{"type":"string","nullable":true},"error":{"type":"string","nullable":true,"description":"Failure message when `status` is `failed`."},"duration_ms":{"type":"number","nullable":true,"description":"End-to-end run latency in milliseconds."},"token_usage":{"type":"object","nullable":true,"properties":{"input":{"type":"number","description":"Input (prompt) tokens consumed."},"output":{"type":"number","description":"Output (completion) tokens produced."}},"required":["input","output"],"description":"Token usage reported by the agent backend."},"total_cost":{"type":"number","nullable":true,"description":"Provider cost of the run in USD. Null for internal agents (billed in credits)."},"trace_id":{"type":"string","nullable":true},"created_at":{"type":"string"},"completed_at":{"type":"string","nullable":true},"session_id":{"type":"string","nullable":true},"trigger_event_id":{"type":"string","nullable":true},"response":{"type":"string","nullable":true,"description":"The reply text the agent produced, if any."},"reflection":{"type":"string","nullable":true,"description":"The agent's reasoning narrative for its decision."},"tool_trace":{"type":"array","nullable":true,"items":{"nullable":true},"description":"Ordered timeline of tool calls the agent made (name, input, output per step)."}},"required":["id","run_id","agent_id","workspace_id","status","disposition","disposition_reason","autopilot_sent","proposal_outcome","contact_id","conversation_id","trigger_id","error","duration_ms","token_usage","total_cost","trace_id","created_at","completed_at","session_id","trigger_event_id","response","reflection","tool_trace"]}},"required":["data"],"description":"Single agent run with its stored detail and ordered tool-call timeline.","example":{"data":{"id":"ar77c0dy0mgdpzmqz6tesry8w184002s","run_id":"run_9f3a1c7e","agent_id":"ag77c0dy0mgdpzmqz6tesry8w184002s","workspace_id":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o","status":"completed","disposition":"resolved","disposition_reason":"answered_from_knowledge","autopilot_sent":true,"proposal_outcome":null,"contact_id":"co77c0dy0mgdpzmqz6tesry8w184002s","conversation_id":"cv77c0dy0mgdpzmqz6tesry8w184002s","trigger_id":"tr77c0dy0mgdpzmqz6tesry8w184002s","error":null,"duration_ms":4213,"token_usage":{"input":1820,"output":342},"total_cost":0.0121,"trace_id":"0f9c2b1d8a7e4f36","created_at":"2026-04-03T03:14:15.000Z","completed_at":"2026-04-03T03:14:19.213Z","session_id":"sess_4b21e9","trigger_event_id":"te77c0dy0mgdpzmqz6tesry8w184002s","response":"You're all set, your reservation is confirmed for April 5th. Let me know if you need anything else!","reflection":"Contact asked to confirm their booking. The reservation lookup returned an active booking, so I confirmed it directly instead of escalating.","tool_trace":[{"name":"get_reservation","input":{"reservation_id":"res_123"},"output":{"status":"confirmed","check_in":"2026-04-05"}}]}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}}},"/v1/agents/{id}/simulate":{"post":{"operationId":"simulateAgentConversation","security":[{"bearerAuth":[]}],"tags":["agents"],"summary":"Simulate an inbound conversation","description":"Dry-runs an inbound message against a live V2 agent and returns the reply it would produce, plus its reasoning trace. Nothing is sent to any contact. Unlike `run_agent`, this is the supported way to test channel/message behavior end-to-end. Requires a token with write access.","parameters":[{"schema":{"type":"string","description":"Agent id.","example":"ag77c0dy0mgdpzmqz6tesry8w184002s"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"Optional workspace override. If omitted, Conduit resolves the agent's workspace automatically.","example":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o"},"required":false,"name":"workspace_id","in":"query"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"inbound_message":{"type":"string","minLength":1,"description":"The new inbound message from the contact to answer.","example":"Hi, what time is check-in?"},"channel":{"type":"string","enum":["whatsapp","email","unthreaded_email","sms","instagram","messenger","airbnb","booking_com","vrbo","expedia","line_oa","widget"],"description":"Channel the message arrived on. Influences channel-specific agent behavior. Defaults to the agent's inbox default.","example":"whatsapp"},"history":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["user","assistant"],"description":"`user` for the contact, `assistant` for a prior agent reply."},"content":{"type":"string","minLength":1,"description":"Message text."}},"required":["role","content"]},"maxItems":50,"description":"Prior turns of the conversation, oldest first. The `inbound_message` is appended as the latest `user` turn."},"timeout_ms":{"type":"integer","minimum":1000,"maximum":110000,"description":"How long to wait for the agent to respond before returning `timed_out`. Defaults to 60000."}},"required":["inbound_message"],"description":"Request body for simulating an inbound conversation turn.","example":{"inbound_message":"Hi, what time is check-in?","channel":"whatsapp"}}}}},"responses":{"200":{"description":"Simulated agent reply","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"run_id":{"type":"string"},"status":{"type":"string","enum":["completed","failed","timed_out"]},"channel":{"type":"string","nullable":true},"operation_mode":{"type":"string","nullable":true,"description":"The agent's operation mode. A `copilot` agent would propose rather than auto-send even when `would_send` is true."},"response":{"type":"string","nullable":true,"description":"The reply the agent would send. Never delivered."},"disposition":{"type":"string","nullable":true},"disposition_reason":{"type":"string","nullable":true},"would_send":{"type":"boolean","description":"Whether an autopilot agent would actually deliver `response` to the contact (vs. escalate or no-op)."},"error":{"type":"string","nullable":true},"trace":{"type":"object","properties":{"reasoning":{"type":"string","nullable":true},"tool_calls":{"type":"array","items":{"nullable":true}},"sources":{"type":"array","items":{"nullable":true}},"guardrails":{"type":"array","items":{"nullable":true}},"skills":{"type":"array","items":{"nullable":true}},"trace_id":{"type":"string","nullable":true},"duration_ms":{"type":"number","nullable":true},"token_usage":{"type":"object","nullable":true,"properties":{"input":{"type":"number"},"output":{"type":"number"}},"required":["input","output"]}},"required":["reasoning","tool_calls","sources","guardrails","skills","trace_id","duration_ms","token_usage"],"description":"How the agent arrived at its reply: reasoning, tool calls, cited sources, guardrails, skills, and timing."}},"required":["run_id","status","channel","operation_mode","response","disposition","disposition_reason","would_send","error","trace"]}},"required":["data"],"description":"The reply an agent would have produced for the inbound message, plus its reasoning trace. Nothing is sent.","example":{"data":{"run_id":"3f2504e0-4f89-41d3-9a0c-0305e82c3301","status":"completed","channel":"whatsapp","operation_mode":"autopilot","response":"Check-in is at 3pm. Let me know if you need an early check-in!","disposition":"resolved","disposition_reason":"answered_from_knowledge","would_send":true,"error":null,"trace":{"reasoning":"The guest asked about check-in time; answered directly from the property knowledge base.","tool_calls":[],"sources":[],"guardrails":[],"skills":[],"trace_id":"0af7651916cd43dd8448eb211c80319c","duration_ms":4200,"token_usage":{"input":1800,"output":40}}}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}}},"/v1/agents/{id}/tools":{"get":{"operationId":"listAgentTools","security":[{"bearerAuth":[]}],"tags":["agents"],"summary":"List an agent's tools","description":"Lists the built-in and custom tools a V2 chat agent can resolve, each with its per-agent enabled state. Integration/connection tools are managed via the connections surface; use GET /v1/agents/{id}/connections for those.","parameters":[{"schema":{"type":"string","description":"V2 chat agent id.","example":"ag77c0dy0mgdpzmqz6tesry8w184002s"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"Optional workspace override. If omitted, Conduit resolves the agent's workspace automatically.","example":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o"},"required":false,"name":"workspace_id","in":"query"},{"schema":{"type":"string","enum":["builtin","custom"],"description":"Filter to a single tool source. Omit for all."},"required":false,"name":"source","in":"query"}],"responses":{"200":{"description":"Tools resolvable by the agent with their enabled state","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Underlying tool id (builtin or custom tool)."},"name":{"type":"string","description":"Tool name the agent references, unique per source."},"source":{"type":"string","enum":["builtin","custom"],"description":"`builtin` for a platform tool from the `tools` catalog, `custom` for a workspace custom code tool."},"description":{"type":"string"},"enabled":{"type":"boolean","description":"In the per-agent listing (an `id` was supplied), whether this tool is currently enabled for that agent. In the workspace catalog (no `id`), the default a new chat agent inherits before any per-agent override. Chat agents default to disabled (opt-in)."},"domain":{"type":"string","nullable":true,"description":"Built-in tool domain; null for custom tools."},"tags":{"type":"array","items":{"type":"string"}},"language":{"type":"string","nullable":true,"enum":["python","javascript"],"description":"Custom tool runtime; null for built-in tools."},"connection_required":{"type":"boolean","description":"Built-in tool catalog only (no `id` supplied): true when the tool is backed by an external MCP/portal connection that must be set up before it works. Omitted from the per-agent listing."}},"required":["id","name","source","description","enabled","domain","tags","language"]}}},"required":["data"],"description":"With an agent id: tools resolvable by that V2 chat agent (built-in + custom), each with its per-agent enabled state. Without an agent id: the workspace's built-in tool catalog, each entry's `enabled` being the default a new agent inherits, plus a `connection_required` flag. Integration/connection tools are managed through the connections surface: use list_agent_connections (GET /v1/agents/{id}/connections) to see those.","example":{"data":[{"id":"kt55c0dy0mgdpzmqz6tesry8w184771b","name":"search-knowledge-base","source":"builtin","description":"Search the workspace knowledge base.","enabled":false,"domain":"knowledge","tags":["knowledge"],"language":null},{"id":"kg77c0dy0mgdpzmqz6tesry8w184002s","name":"lookup-order-status","source":"custom","description":"Look up the fulfillment status of an order by id.","enabled":true,"domain":null,"tags":[],"language":"python"}]}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}},"patch":{"operationId":"setAgentToolAccess","security":[{"bearerAuth":[]}],"tags":["agents"],"summary":"Toggle a tool for an agent","description":"Enable or disable a single built-in or custom tool for a V2 chat agent. Requires a token with write access.","parameters":[{"schema":{"type":"string","description":"V2 chat agent id.","example":"ag77c0dy0mgdpzmqz6tesry8w184002s"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"Optional workspace override. If omitted, Conduit resolves the agent's workspace automatically.","example":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o"},"required":false,"name":"workspace_id","in":"query"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"tool_name":{"type":"string","minLength":1,"description":"Name of the tool to toggle, as returned by `GET /v1/agents/{id}/tools`."},"source":{"type":"string","enum":["builtin","custom"],"description":"`builtin` for a platform tool from the `tools` catalog, `custom` for a workspace custom code tool."},"enabled":{"type":"boolean","description":"Set true to enable the tool for this agent, false to disable."}},"required":["tool_name","source","enabled"],"description":"Enable or disable a single tool for a V2 chat agent. The (tool_name, source) pair identifies the tool.","example":{"tool_name":"lookup-order-status","source":"custom","enabled":true}}}}},"responses":{"200":{"description":"Updated tool access","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Underlying tool id (builtin or custom tool)."},"name":{"type":"string","description":"Tool name the agent references, unique per source."},"source":{"type":"string","enum":["builtin","custom"],"description":"`builtin` for a platform tool from the `tools` catalog, `custom` for a workspace custom code tool."},"description":{"type":"string"},"enabled":{"type":"boolean","description":"In the per-agent listing (an `id` was supplied), whether this tool is currently enabled for that agent. In the workspace catalog (no `id`), the default a new chat agent inherits before any per-agent override. Chat agents default to disabled (opt-in)."},"domain":{"type":"string","nullable":true,"description":"Built-in tool domain; null for custom tools."},"tags":{"type":"array","items":{"type":"string"}},"language":{"type":"string","nullable":true,"enum":["python","javascript"],"description":"Custom tool runtime; null for built-in tools."},"connection_required":{"type":"boolean","description":"Built-in tool catalog only (no `id` supplied): true when the tool is backed by an external MCP/portal connection that must be set up before it works. Omitted from the per-agent listing."}},"required":["id","name","source","description","enabled","domain","tags","language"]}},"required":["data"],"description":"The tool's resolved access state after the change.","example":{"data":{"id":"kg77c0dy0mgdpzmqz6tesry8w184002s","name":"lookup-order-status","source":"custom","description":"Look up the fulfillment status of an order by id.","enabled":true,"domain":null,"tags":[],"language":"python"}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}}},"/v1/agents/{id}/connections":{"get":{"operationId":"listAgentConnections","security":[{"bearerAuth":[]}],"tags":["agents"],"summary":"List an agent's connections","description":"Lists the integration connections linked to a V2 chat agent (the agent's `connection_ids`), each with its enabled tools. These are the integration/connection tools that GET /v1/agents/{id}/tools does not include.","parameters":[{"schema":{"type":"string","description":"V2 chat agent id.","example":"ag77c0dy0mgdpzmqz6tesry8w184002s"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"Optional workspace override. If omitted, Conduit resolves the agent's workspace automatically.","example":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o"},"required":false,"name":"workspace_id","in":"query"}],"responses":{"200":{"description":"Integration connections linked to the agent, each with its enabled tools","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Connection id."},"provider":{"type":"string","description":"Provider slug, e.g. \"google-calendar\", \"slack\", \"mcp\"."},"provider_type":{"type":"string","enum":["oauth","custom_oauth","api_key","pms","mcp","composio"],"description":"How the connection authenticates."},"display_name":{"type":"string"},"description":{"type":"string","nullable":true},"scope":{"type":"string","enum":["user","workspace"],"description":"`workspace` connections are shared; `user` connections belong to a single member."},"status":{"type":"string","enum":["connected","disconnected","error","pending"]},"enabled_tool_names":{"type":"array","items":{"type":"string"},"description":"Human-readable names of the connection tools currently enabled for this agent."}},"required":["id","provider","provider_type","display_name","description","scope","status","enabled_tool_names"]}}},"required":["data"],"description":"Integration connections linked to a V2 chat agent (via the agent's `connection_ids`), each with its enabled tools. These are the integration/connection tools that list_agent_tools intentionally omits.","example":{"data":[{"id":"cn77c0dy0mgdpzmqz6tesry8w184002s","provider":"google-calendar","provider_type":"oauth","display_name":"Google Calendar","description":"Ops team shared calendar.","scope":"workspace","status":"connected","enabled_tool_names":["List events","Create event"]}]}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}}},"/v1/airbnb/transactions":{"get":{"operationId":"listAirbnbTransactions","security":[{"bearerAuth":[]}],"tags":["airbnb"],"summary":"List Airbnb transactions","description":"Returns cursor-paginated cached Airbnb transaction rows for connections where transaction data sync is enabled. Rows include Conduit metadata and the raw Airbnb transaction object.","parameters":[{"schema":{"type":"string","description":"Workspace to query.","example":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o"},"required":true,"name":"workspace_id","in":"query"},{"schema":{"type":"string","description":"Optional Airbnb account id. When omitted, returns rows across all Airbnb connections with transaction sync enabled.","example":"47268713785589411"},"required":false,"name":"airbnb_user_id","in":"query"},{"schema":{"type":"string","enum":["COMPLETED","UPCOMING"],"description":"Filter to completed payout ledger rows or upcoming payout rows."},"required":false,"name":"transaction_type","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"description":"Page size. Defaults to 20. Max 100."},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","description":"Pagination cursor returned as `next_cursor` on the previous page."},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"string","enum":["asc","desc"],"description":"Sort direction by Conduit insertion time. Defaults to desc."},"required":false,"name":"order","in":"query"}],"responses":{"200":{"description":"Airbnb transactions","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"airbnb_user_id":{"type":"string","description":"Airbnb account id for the connected host account."},"airbnb_transaction_id":{"type":"string","description":"Conduit-stable transaction identity. Uses Airbnb's id when present, otherwise a stable hash of the raw transaction object."},"transaction_type":{"type":"string","enum":["COMPLETED","UPCOMING"],"description":"Airbnb transaction collection this row was synced from."},"raw":{"nullable":true,"description":"The raw Airbnb transaction object returned by the Airbnb API."},"first_seen_at":{"type":"string"},"last_seen_at":{"type":"string"},"synced_at":{"type":"string"}},"required":["id","workspace_id","airbnb_user_id","airbnb_transaction_id","transaction_type","first_seen_at","last_seen_at","synced_at"],"description":"A cached Airbnb transaction row for a connection that has transaction data sync enabled."}},"next_cursor":{"type":"string","nullable":true},"has_more":{"type":"boolean"}},"required":["data","next_cursor","has_more"],"description":"Cursor-paginated Airbnb transactions response.","example":{"data":[{"id":"at77c0dy0mgdpzmqz6tesry8w184002s","workspace_id":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o","airbnb_user_id":"47268713785589411","airbnb_transaction_id":"id:txn_demo_001","transaction_type":"COMPLETED","raw":{"id":"txn_demo_001","amount":"782.40","currency":"USD","reservation_confirmation_code":"HMDEMO1234"},"first_seen_at":"2026-04-18T17:20:00.000Z","last_seen_at":"2026-04-18T17:20:00.000Z","synced_at":"2026-04-18T17:20:00.000Z"}],"next_cursor":"page-token","has_more":true}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}}},"/v1/contacts":{"get":{"operationId":"listContacts","security":[{"bearerAuth":[]}],"tags":["contacts"],"summary":"List contacts","description":"Returns paginated contact summaries for a workspace, ordered by latest activity by default. Reuse `cursor` with the same filters to continue pagination.","parameters":[{"schema":{"type":"string","description":"Workspace to query.","example":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o"},"required":true,"name":"workspace_id","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"string","enum":["true","false"]},"required":false,"name":"archived","in":"query"},{"schema":{"type":"string","enum":["last_message_at","follow_up_at"]},"required":false,"name":"sort_by","in":"query"},{"schema":{"type":"string","enum":["asc","desc"]},"required":false,"name":"order","in":"query"},{"schema":{"type":"string"},"required":false,"name":"inbox_type_id","in":"query"}],"responses":{"200":{"description":"Contacts","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string","nullable":true},"image_url":{"type":"string","nullable":true},"type":{"type":"string","nullable":true},"inbox_type_id":{"type":"string"},"archived":{"type":"boolean"},"ai_paused":{"type":"boolean"},"last_channel":{"type":"string","nullable":true},"last_message_at":{"type":"string","nullable":true},"last_message_preview":{"type":"string","nullable":true},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","workspace_id","first_name","last_name","image_url","type","inbox_type_id","archived","ai_paused","last_channel","last_message_at","last_message_preview","created_at","updated_at"]}},"next_cursor":{"type":"string","nullable":true},"has_more":{"type":"boolean"}},"required":["data","next_cursor","has_more"],"description":"Cursor-paginated contacts response.","example":{"data":[{"id":"ph77c0dy0mgdpzmqz6tesry8w184002s","workspace_id":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o","first_name":"Jane","last_name":"Doe","image_url":null,"type":null,"inbox_type_id":"guest","archived":false,"ai_paused":false,"last_channel":"unthreaded_email","last_message_at":"2026-04-03T03:14:15.000Z","last_message_preview":"Can I check in early?","created_at":"2026-04-01T17:22:10.000Z","updated_at":"2026-04-03T03:14:15.000Z"}],"next_cursor":"page-token","has_more":true}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}},"post":{"operationId":"createContact","security":[{"bearerAuth":[]}],"tags":["contacts"],"summary":"Create contact","description":"Creates a new contact in a workspace with one or more direct channels. Requires a token with write access.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspace_id":{"type":"string"},"first_name":{"type":"string","minLength":1},"last_name":{"type":"string","nullable":true,"minLength":1},"inbox_type_id":{"type":"string"},"channels":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["email","sms","whatsapp","instagram"]},"value":{"type":"string","minLength":1}},"required":["type","value"]},"minItems":1}},"required":["workspace_id","first_name","inbox_type_id","channels"],"description":"Request body for creating a contact with one or more direct channels.","example":{"workspace_id":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o","first_name":"Jane","last_name":"Doe","inbox_type_id":"guest","channels":[{"type":"email","value":"jane@example.com"},{"type":"sms","value":"+14155550123"}]}}}}},"responses":{"201":{"description":"Contact created","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"language":{"type":"string","nullable":true},"id":{"type":"string"},"workspace_id":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string","nullable":true},"image_url":{"type":"string","nullable":true},"type":{"type":"string","nullable":true},"inbox_type_id":{"type":"string"},"archived":{"type":"boolean"},"ai_paused":{"type":"boolean"},"last_message_at":{"type":"string","nullable":true},"created_at":{"type":"string"},"channels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"value":{"type":"string"}},"required":["id","type","value"]}}},"required":["language","id","workspace_id","first_name","last_name","image_url","type","inbox_type_id","archived","ai_paused","last_message_at","created_at","channels"]}},"required":["data"],"description":"Single contact response.","example":{"data":{"id":"ph77c0dy0mgdpzmqz6tesry8w184002s","workspace_id":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o","first_name":"Jane","last_name":"Doe","image_url":null,"language":null,"type":null,"inbox_type_id":"guest","archived":false,"ai_paused":false,"last_message_at":"2026-04-03T03:14:15.000Z","created_at":"2026-04-01T17:22:10.000Z","channels":[{"id":"ns782tta8jzdst8a2w5vdcgfnd841nzf","type":"unthreaded_email","value":"jane@example.com"}]}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"409":{"description":"Contact cannot be created with the requested channels","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}}},"/v1/contacts/{id}":{"patch":{"operationId":"patchContact","security":[{"bearerAuth":[]}],"tags":["contacts"],"summary":"Patch contact","description":"Updates mutable contact metadata. Channel edits and merge semantics are not supported by this endpoint.","parameters":[{"schema":{"type":"string","description":"Contact id.","example":"ph77c0dy0mgdpzmqz6tesry8w184002s"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"Optional workspace override. If omitted, Conduit resolves the contact's workspace automatically.","example":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o"},"required":false,"name":"workspace_id","in":"query"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"first_name":{"type":"string","minLength":1},"last_name":{"type":"string","nullable":true,"minLength":1},"inbox_type_id":{"type":"string"},"archived":{"type":"boolean"}},"description":"Request body for patching mutable contact metadata. Channel edits are not supported by this endpoint.","example":{"first_name":"Jane","last_name":null,"inbox_type_id":"lead","archived":true}}}}},"responses":{"200":{"description":"Contact updated","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"language":{"type":"string","nullable":true},"id":{"type":"string"},"workspace_id":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string","nullable":true},"image_url":{"type":"string","nullable":true},"type":{"type":"string","nullable":true},"inbox_type_id":{"type":"string"},"archived":{"type":"boolean"},"ai_paused":{"type":"boolean"},"last_message_at":{"type":"string","nullable":true},"created_at":{"type":"string"},"channels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"value":{"type":"string"}},"required":["id","type","value"]}}},"required":["language","id","workspace_id","first_name","last_name","image_url","type","inbox_type_id","archived","ai_paused","last_message_at","created_at","channels"]}},"required":["data"],"description":"Single contact response.","example":{"data":{"id":"ph77c0dy0mgdpzmqz6tesry8w184002s","workspace_id":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o","first_name":"Jane","last_name":"Doe","image_url":null,"language":null,"type":null,"inbox_type_id":"guest","archived":false,"ai_paused":false,"last_message_at":"2026-04-03T03:14:15.000Z","created_at":"2026-04-01T17:22:10.000Z","channels":[{"id":"ns782tta8jzdst8a2w5vdcgfnd841nzf","type":"unthreaded_email","value":"jane@example.com"}]}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}},"get":{"operationId":"getContact","security":[{"bearerAuth":[]}],"tags":["contacts"],"summary":"Get contact by id","description":"Returns the profile view of a canonical contact record. Use conversation endpoints for transcript and reply workflows.","parameters":[{"schema":{"type":"string","example":"j57e2g8z4qbydxtjq8rbxprc4x7f2h5d"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"Optional workspace override. If omitted, Conduit resolves the contact's workspace automatically.","example":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o"},"required":false,"name":"workspace_id","in":"query"}],"responses":{"200":{"description":"Contact","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"language":{"type":"string","nullable":true},"id":{"type":"string"},"workspace_id":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string","nullable":true},"image_url":{"type":"string","nullable":true},"type":{"type":"string","nullable":true},"inbox_type_id":{"type":"string"},"archived":{"type":"boolean"},"ai_paused":{"type":"boolean"},"last_message_at":{"type":"string","nullable":true},"created_at":{"type":"string"},"channels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"value":{"type":"string"}},"required":["id","type","value"]}}},"required":["language","id","workspace_id","first_name","last_name","image_url","type","inbox_type_id","archived","ai_paused","last_message_at","created_at","channels"]}},"required":["data"],"description":"Single contact response.","example":{"data":{"id":"ph77c0dy0mgdpzmqz6tesry8w184002s","workspace_id":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o","first_name":"Jane","last_name":"Doe","image_url":null,"language":null,"type":null,"inbox_type_id":"guest","archived":false,"ai_paused":false,"last_message_at":"2026-04-03T03:14:15.000Z","created_at":"2026-04-01T17:22:10.000Z","channels":[{"id":"ns782tta8jzdst8a2w5vdcgfnd841nzf","type":"unthreaded_email","value":"jane@example.com"}]}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}}},"/v1/contacts/{id}/messages":{"post":{"operationId":"sendContactMessage","security":[{"bearerAuth":[]}],"tags":["contacts"],"summary":"Send a proactive message to a contact","description":"Delivers a new outbound message through the exact `channel_node_id` chosen for the contact. Supply `sender_id` when you need to choose the exact workspace sender returned by `/v1/workspaces/{id}/senders`.","parameters":[{"schema":{"type":"string","description":"Contact id.","example":"ph77c0dy0mgdpzmqz6tesry8w184002s"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"Optional workspace override. If omitted, Conduit resolves the contact's workspace automatically.","example":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o"},"required":false,"name":"workspace_id","in":"query"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"channel_node_id":{"type":"string","description":"Exact contact channel node to deliver through."},"sender_id":{"type":"string","description":"Optional workspace sender to use. Required when multiple compatible senders exist and no single default can be chosen."},"body":{"type":"string","minLength":1,"description":"Plain-text message body. Required unless `whatsapp_template` is provided."},"subject":{"type":"string","description":"Optional subject for email channel nodes."},"whatsapp_template":{"type":"object","properties":{"content_sid":{"type":"string","minLength":1,"description":"Twilio Content SID for an approved WhatsApp template returned by `/v1/workspaces/{id}/whatsapp-templates`."},"variables":{"type":"object","additionalProperties":{"type":"string"},"description":"Template variable values keyed by Twilio variable name, for example `{ \"1\": \"Alex\" }`."}},"required":["content_sid"],"description":"WhatsApp template to send instead of a plain-text body. Only valid for WhatsApp channel nodes."}},"required":["channel_node_id"],"description":"Request body for sending a proactive message to a contact through an explicit channel node. Provide either `body` for plain text or `whatsapp_template` for a WhatsApp template send.","example":{"channel_node_id":"hg77c0dy0mgdpzmqz6tesry8w184002s","sender_id":"whatsapp_number:+14155550999","whatsapp_template":{"content_sid":"HXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","variables":{"1":"Alex","2":"May 15 at 3 PM"}}}}}}},"responses":{"201":{"description":"Contact message accepted","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","nullable":true},"workspace_id":{"type":"string"},"contact_id":{"type":"string"},"channel_node_id":{"type":"string"},"sender_id":{"type":"string"},"channel":{"type":"string"},"status":{"type":"string","enum":["sent"]}},"required":["id","workspace_id","contact_id","channel_node_id","sender_id","channel","status"]}},"required":["data"],"description":"Result returned after a proactive contact message is accepted for delivery.","example":{"data":{"id":"yh7t5azsr0zpfpyf67vtce0j6n844y1e","workspace_id":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o","contact_id":"ph77c0dy0mgdpzmqz6tesry8w184002s","channel_node_id":"hg77c0dy0mgdpzmqz6tesry8w184002s","sender_id":"gmail_account:team@conduit.ai","channel":"email","status":"sent"}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"503":{"description":"Service unavailable","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}}},"/v1/contacts/search":{"get":{"operationId":"searchContacts","security":[{"bearerAuth":[]}],"tags":["contacts"],"summary":"Search contacts","description":"Find contacts by name, last name, email, phone number, WhatsApp number, or channel value. Use the returned contact ids with related endpoints like `/v1/contacts/{id}/tickets` and `/v1/contacts/{id}/calls`.","parameters":[{"schema":{"type":"string","description":"Workspace to query.","example":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o"},"required":true,"name":"workspace_id","in":"query"},{"schema":{"type":"string","description":"Search value. Common lookups include email address, phone number, first name, and last name.","example":"joe@gmail.com"},"required":true,"name":"query","in":"query"},{"schema":{"type":"string","enum":["any","name","first_name","last_name","email","phone","whatsapp","channel"],"description":"Field to search. `any` uses heuristics: email-like input searches channels, phone-like input searches phone channels, otherwise it searches contact metadata.","example":"email"},"required":false,"name":"field","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"string","enum":["true","false"]},"required":false,"name":"archived","in":"query"},{"schema":{"type":"string"},"required":false,"name":"inbox_type_id","in":"query"}],"responses":{"200":{"description":"Contact search results","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string","nullable":true},"image_url":{"type":"string","nullable":true},"type":{"type":"string","nullable":true},"inbox_type_id":{"type":"string"},"archived":{"type":"boolean"},"ai_paused":{"type":"boolean"},"last_channel":{"type":"string","nullable":true},"last_message_at":{"type":"string","nullable":true},"last_message_preview":{"type":"string","nullable":true},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","workspace_id","first_name","last_name","image_url","type","inbox_type_id","archived","ai_paused","last_channel","last_message_at","last_message_preview","created_at","updated_at"]}},"next_cursor":{"type":"string","nullable":true},"has_more":{"type":"boolean"}},"required":["data","next_cursor","has_more"],"description":"Cursor-paginated contacts response.","example":{"data":[{"id":"ph77c0dy0mgdpzmqz6tesry8w184002s","workspace_id":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o","first_name":"Jane","last_name":"Doe","image_url":null,"type":null,"inbox_type_id":"guest","archived":false,"ai_paused":false,"last_channel":"unthreaded_email","last_message_at":"2026-04-03T03:14:15.000Z","last_message_preview":"Can I check in early?","created_at":"2026-04-01T17:22:10.000Z","updated_at":"2026-04-03T03:14:15.000Z"}],"next_cursor":"page-token","has_more":true}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}}},"/v1/contacts/{id}/tickets":{"get":{"operationId":"listContactTickets","security":[{"bearerAuth":[]}],"tags":["contacts"],"summary":"List tickets for a contact","description":"Convenience endpoint that filters the ticket queue down to tickets for a single contact.","parameters":[{"schema":{"type":"string","description":"Contact id.","example":"ph77c0dy0mgdpzmqz6tesry8w184002s"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"Optional workspace override. If omitted, Conduit resolves the contact's workspace automatically.","example":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o"},"required":false,"name":"workspace_id","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"string","enum":["asc","desc"]},"required":false,"name":"order","in":"query"},{"schema":{"type":"string","enum":["open","new","pending","resolved","closed"],"description":"`open` returns actionable tickets (`new` + `pending`)."},"required":false,"name":"status","in":"query"},{"schema":{"type":"string","enum":["team","customer","third_party","none"]},"required":false,"name":"waiting_on","in":"query"},{"schema":{"type":"string"},"required":false,"name":"channel","in":"query"}],"responses":{"200":{"description":"Contact tickets","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"contact_id":{"type":"string"},"conversation_id":{"type":"string"},"channel":{"type":"string"},"status":{"type":"string","enum":["new","pending","resolved","closed","merged"]},"waiting_on":{"type":"string","nullable":true},"inbox_type_id":{"type":"string"},"subject":{"type":"string","nullable":true},"summary":{"type":"string","nullable":true},"ai_paused":{"type":"boolean"},"assignee":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"picture_url":{"type":"string","nullable":true}},"required":["id","name","email","picture_url"]},"follow_up_at":{"type":"string","nullable":true},"first_message_at":{"type":"string","nullable":true},"first_response_at":{"type":"string","nullable":true},"resolved_at":{"type":"string","nullable":true},"first_resolved_at":{"type":"string","nullable":true},"closed_at":{"type":"string","nullable":true},"time_to_first_response_ms":{"type":"number","nullable":true,"description":"Blended AI and human time to first response in milliseconds. Use ai_participated as the segmentation key."},"time_to_resolution_ms":{"type":"number","nullable":true,"description":"Blended AI and human time to resolution in milliseconds. Use ai_participated as the segmentation key."},"reopen_count":{"type":"number"},"ai_participated":{"type":"boolean"},"last_message_at":{"type":"string","nullable":true},"last_message_preview":{"type":"string","nullable":true},"created_at":{"type":"string"},"updated_at":{"type":"string"},"call_transcript_id":{"type":"string","nullable":true},"merged_into_ticket_id":{"type":"string","nullable":true}},"required":["id","workspace_id","contact_id","conversation_id","channel","status","waiting_on","inbox_type_id","subject","summary","ai_paused","assignee","follow_up_at","first_message_at","first_response_at","resolved_at","first_resolved_at","closed_at","time_to_first_response_ms","time_to_resolution_ms","reopen_count","ai_participated","last_message_at","last_message_preview","created_at","updated_at","call_transcript_id","merged_into_ticket_id"]}},"next_cursor":{"type":"string","nullable":true},"has_more":{"type":"boolean"}},"required":["data","next_cursor","has_more"],"description":"Cursor-paginated tickets response.","example":{"data":[{"id":"xd88mkfbmxgckpeyzs8m9r9d3d843me3","workspace_id":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o","contact_id":"ph77c0dy0mgdpzmqz6tesry8w184002s","conversation_id":"ph77c0dy0mgdpzmqz6tesry8w184002s","channel":"unthreaded_email","status":"new","waiting_on":"customer","inbox_type_id":"guest","subject":"Early check-in request","summary":"Guest asked to confirm whether early arrival is possible.","ai_paused":false,"assignee":{"id":"m48k3v7p2q9x5t1w8r6n4j0y3u2i5o7a","name":"Alex M","email":"alex@example.com","picture_url":null},"follow_up_at":null,"first_message_at":"2026-04-01T17:22:10.000Z","first_response_at":"2026-04-01T17:22:14.000Z","resolved_at":null,"first_resolved_at":null,"closed_at":null,"time_to_first_response_ms":4000,"time_to_resolution_ms":null,"reopen_count":0,"ai_participated":true,"last_message_at":"2026-04-03T03:14:15.000Z","last_message_preview":"Can I check in early?","created_at":"2026-04-01T17:22:10.000Z","updated_at":"2026-04-03T03:14:15.000Z","call_transcript_id":null,"merged_into_ticket_id":null}],"next_cursor":"page-token","has_more":true}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}}},"/v1/contacts/{id}/calls":{"get":{"operationId":"listContactCalls","security":[{"bearerAuth":[]}],"tags":["contacts"],"summary":"List calls for a contact","description":"Convenience endpoint that filters workspace call records down to calls associated with a single contact.","parameters":[{"schema":{"type":"string","description":"Contact id.","example":"ph77c0dy0mgdpzmqz6tesry8w184002s"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"Optional workspace override. If omitted, Conduit resolves the contact's workspace automatically.","example":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o"},"required":false,"name":"workspace_id","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"string","enum":["asc","desc"]},"required":false,"name":"order","in":"query"},{"schema":{"type":"string","enum":["inbound","outbound"]},"required":false,"name":"direction","in":"query"},{"schema":{"type":"string","enum":["true","false"]},"required":false,"name":"missed","in":"query"},{"schema":{"type":"string","enum":["app","retell"]},"required":false,"name":"source","in":"query"}],"responses":{"200":{"description":"Contact calls","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"contact_id":{"type":"string","nullable":true},"conversation_id":{"type":"string","nullable":true},"ticket_id":{"type":"string","nullable":true},"call_id":{"type":"string"},"direction":{"type":"string","enum":["inbound","outbound"]},"from_phone":{"type":"string"},"to_phone":{"type":"string","nullable":true},"source":{"type":"string","nullable":true},"is_missed":{"type":"boolean","nullable":true},"transfer_status":{"type":"string","nullable":true},"answered_by_user_id":{"type":"string","nullable":true},"transfer_target_user_id":{"type":"string","nullable":true},"transfer_target_number":{"type":"string","nullable":true},"transfer_target_display_name":{"type":"string","nullable":true},"transfer_initiated_by_user_id":{"type":"string","nullable":true},"transfer_type":{"type":"string","nullable":true,"enum":["internal","external"]},"transfer_mode":{"type":"string","nullable":true,"enum":["warm","blind"]},"transfer_outcome":{"type":"string","nullable":true,"enum":["completed","canceled","declined","timed_out","aborted","failed"]},"transfer_started_at":{"type":"string","nullable":true},"transfer_accepted_at":{"type":"string","nullable":true},"transfer_ended_at":{"type":"string","nullable":true},"duration_ms":{"type":"number","nullable":true},"sentiment":{"type":"string","nullable":true},"summary":{"type":"string","nullable":true},"recording_url":{"type":"string","nullable":true},"started_at":{"type":"string"},"created_at":{"type":"string"},"call_status":{"type":"object","nullable":true,"properties":{"success":{"type":"boolean"},"is_voicemail_reached":{"type":"boolean","nullable":true},"is_transferred":{"type":"boolean","nullable":true}},"required":["success","is_voicemail_reached","is_transferred"]}},"required":["id","workspace_id","contact_id","conversation_id","ticket_id","call_id","direction","from_phone","to_phone","source","is_missed","transfer_status","answered_by_user_id","transfer_target_user_id","transfer_target_number","transfer_target_display_name","transfer_initiated_by_user_id","transfer_type","transfer_mode","transfer_outcome","transfer_started_at","transfer_accepted_at","transfer_ended_at","duration_ms","sentiment","summary","recording_url","started_at","created_at","call_status"]}},"next_cursor":{"type":"string","nullable":true},"has_more":{"type":"boolean"}},"required":["data","next_cursor","has_more"],"description":"Cursor-paginated calls response.","example":{"data":[{"id":"ce7e2g8z4qbydxtjq8rbxprc4x7f2h5d","workspace_id":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o","contact_id":"ph77c0dy0mgdpzmqz6tesry8w184002s","conversation_id":"ph77c0dy0mgdpzmqz6tesry8w184002s","ticket_id":"xd88mkfbmxgckpeyzs8m9r9d3d843me3","call_id":"call_123","direction":"inbound","from_phone":"+14155550123","to_phone":"+14155550999","source":"retell","is_missed":false,"transfer_status":null,"answered_by_user_id":"m48k3v7p2q9x5t1w8r6n4j0y3u2i5o7a","transfer_target_user_id":null,"transfer_target_number":null,"transfer_target_display_name":null,"transfer_initiated_by_user_id":null,"transfer_type":null,"transfer_mode":null,"transfer_outcome":null,"transfer_started_at":null,"transfer_accepted_at":null,"transfer_ended_at":null,"duration_ms":183000,"sentiment":"neutral","summary":"Guest asked about check-in timing.","recording_url":"https://recordings.conduit.ai/calls/call_123.mp3","started_at":"2026-04-03T02:58:00.000Z","created_at":"2026-04-03T03:01:03.000Z","call_status":{"success":true,"is_voicemail_reached":false,"is_transferred":false}}],"next_cursor":"page-token","has_more":true}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}}},"/v1/conversation-tags":{"get":{"operationId":"listConversationTags","security":[{"bearerAuth":[]}],"tags":["conversation-tags"],"summary":"List conversation tags","description":"Returns cursor-paginated conversation labels, root topics, and subtopics for a workspace.","parameters":[{"schema":{"type":"string","description":"Workspace to query.","example":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o"},"required":true,"name":"workspace_id","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"}],"responses":{"200":{"description":"Conversation tags","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"kind":{"type":"string","enum":["topic","label"]},"parent_tag_id":{"type":"string","nullable":true},"urgency_level":{"type":"string","enum":["urgent","not_urgent"]},"shown_in_inbox":{"type":"boolean"},"icon_id":{"type":"number"},"color":{"type":"string","nullable":true},"action_item":{"type":"string","nullable":true,"enum":["Mark as done","Create task","Create invoice"]},"count":{"type":"number"},"created_at":{"type":"string"}},"required":["id","workspace_id","name","description","kind","parent_tag_id","urgency_level","shown_in_inbox","icon_id","color","action_item","count","created_at"]}},"next_cursor":{"type":"string","nullable":true},"has_more":{"type":"boolean"}},"required":["data","next_cursor","has_more"],"description":"Cursor-paginated conversation tags, topics, and subtopics response.","example":{"data":[{"id":"tg77c0dy0mgdpzmqz6tesry8w184002s","workspace_id":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o","name":"Billing","description":"Billing and payment conversations.","kind":"topic","parent_tag_id":null,"urgency_level":"not_urgent","shown_in_inbox":false,"icon_id":0,"color":null,"action_item":null,"count":12,"created_at":"2026-04-01T17:22:10.000Z"}],"next_cursor":"page-token","has_more":true}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}},"post":{"operationId":"createConversationTag","security":[{"bearerAuth":[]}],"tags":["conversation-tags"],"summary":"Create conversation tag","description":"Creates a conversation label, root topic, or subtopic. Requires a token with write access.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspace_id":{"type":"string"},"name":{"type":"string","minLength":1},"description":{"type":"string","nullable":true,"minLength":1},"kind":{"type":"string","enum":["topic","label"]},"parent_tag_id":{"type":"string","nullable":true},"urgency_level":{"type":"string","enum":["urgent","not_urgent"]},"shown_in_inbox":{"type":"boolean"},"icon_id":{"type":"integer","minimum":0},"color":{"type":"string","nullable":true,"minLength":1},"action_item":{"type":"string","nullable":true,"enum":["Mark as done","Create task","Create invoice"]}},"required":["workspace_id","name","kind"],"description":"Request body for creating a conversation label, root topic, or subtopic. Subtopics are `kind: topic` with `parent_tag_id` set to a root topic id.","example":{"workspace_id":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o","name":"Refund","description":"Refund requests.","kind":"topic","parent_tag_id":"tg77c0dy0mgdpzmqz6tesry8w184002s"}}}}},"responses":{"201":{"description":"Conversation tag created","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"kind":{"type":"string","enum":["topic","label"]},"parent_tag_id":{"type":"string","nullable":true},"urgency_level":{"type":"string","enum":["urgent","not_urgent"]},"shown_in_inbox":{"type":"boolean"},"icon_id":{"type":"number"},"color":{"type":"string","nullable":true},"action_item":{"type":"string","nullable":true,"enum":["Mark as done","Create task","Create invoice"]},"count":{"type":"number"},"created_at":{"type":"string"}},"required":["id","workspace_id","name","description","kind","parent_tag_id","urgency_level","shown_in_inbox","icon_id","color","action_item","count","created_at"]}},"required":["data"],"description":"Single conversation tag, topic, or subtopic response.","example":{"data":{"id":"tg77c0dy0mgdpzmqz6tesry8w184002s","workspace_id":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o","name":"Billing","description":"Billing and payment conversations.","kind":"topic","parent_tag_id":null,"urgency_level":"not_urgent","shown_in_inbox":false,"icon_id":0,"color":null,"action_item":null,"count":12,"created_at":"2026-04-01T17:22:10.000Z"}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}}},"/v1/conversation-tags/{id}":{"get":{"operationId":"getConversationTag","security":[{"bearerAuth":[]}],"tags":["conversation-tags"],"summary":"Get conversation tag by id","description":"Returns a single conversation label, root topic, or subtopic.","parameters":[{"schema":{"type":"string","description":"Conversation tag id.","example":"tg77c0dy0mgdpzmqz6tesry8w184002s"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"Optional workspace override. If omitted, Conduit resolves the tag's workspace automatically.","example":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o"},"required":false,"name":"workspace_id","in":"query"}],"responses":{"200":{"description":"Conversation tag","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"kind":{"type":"string","enum":["topic","label"]},"parent_tag_id":{"type":"string","nullable":true},"urgency_level":{"type":"string","enum":["urgent","not_urgent"]},"shown_in_inbox":{"type":"boolean"},"icon_id":{"type":"number"},"color":{"type":"string","nullable":true},"action_item":{"type":"string","nullable":true,"enum":["Mark as done","Create task","Create invoice"]},"count":{"type":"number"},"created_at":{"type":"string"}},"required":["id","workspace_id","name","description","kind","parent_tag_id","urgency_level","shown_in_inbox","icon_id","color","action_item","count","created_at"]}},"required":["data"],"description":"Single conversation tag, topic, or subtopic response.","example":{"data":{"id":"tg77c0dy0mgdpzmqz6tesry8w184002s","workspace_id":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o","name":"Billing","description":"Billing and payment conversations.","kind":"topic","parent_tag_id":null,"urgency_level":"not_urgent","shown_in_inbox":false,"icon_id":0,"color":null,"action_item":null,"count":12,"created_at":"2026-04-01T17:22:10.000Z"}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}},"patch":{"operationId":"patchConversationTag","security":[{"bearerAuth":[]}],"tags":["conversation-tags"],"summary":"Patch conversation tag","description":"Updates mutable conversation tag fields. Requires a token with write access.","parameters":[{"schema":{"type":"string","description":"Conversation tag id.","example":"tg77c0dy0mgdpzmqz6tesry8w184002s"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"Optional workspace override. If omitted, Conduit resolves the tag's workspace automatically.","example":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o"},"required":false,"name":"workspace_id","in":"query"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"description":{"type":"string","nullable":true,"minLength":1},"kind":{"type":"string","enum":["topic","label"]},"parent_tag_id":{"type":"string","nullable":true},"urgency_level":{"type":"string","enum":["urgent","not_urgent"]},"shown_in_inbox":{"type":"boolean"},"icon_id":{"type":"integer","minimum":0},"color":{"type":"string","nullable":true,"minLength":1},"action_item":{"type":"string","nullable":true,"enum":["Mark as done","Create task","Create invoice"]}},"description":"Request body for patching mutable conversation tag fields. Pass `parent_tag_id: null` to promote a subtopic to a root topic.","example":{"name":"Refunds","parent_tag_id":null,"shown_in_inbox":false}}}}},"responses":{"200":{"description":"Conversation tag updated","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"kind":{"type":"string","enum":["topic","label"]},"parent_tag_id":{"type":"string","nullable":true},"urgency_level":{"type":"string","enum":["urgent","not_urgent"]},"shown_in_inbox":{"type":"boolean"},"icon_id":{"type":"number"},"color":{"type":"string","nullable":true},"action_item":{"type":"string","nullable":true,"enum":["Mark as done","Create task","Create invoice"]},"count":{"type":"number"},"created_at":{"type":"string"}},"required":["id","workspace_id","name","description","kind","parent_tag_id","urgency_level","shown_in_inbox","icon_id","color","action_item","count","created_at"]}},"required":["data"],"description":"Single conversation tag, topic, or subtopic response.","example":{"data":{"id":"tg77c0dy0mgdpzmqz6tesry8w184002s","workspace_id":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o","name":"Billing","description":"Billing and payment conversations.","kind":"topic","parent_tag_id":null,"urgency_level":"not_urgent","shown_in_inbox":false,"icon_id":0,"color":null,"action_item":null,"count":12,"created_at":"2026-04-01T17:22:10.000Z"}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}},"delete":{"operationId":"deleteConversationTag","security":[{"bearerAuth":[]}],"tags":["conversation-tags"],"summary":"Delete conversation tag","description":"Deletes a conversation tag. Root topics with live subtopics must be reparented or deleted after their subtopics.","parameters":[{"schema":{"type":"string","description":"Conversation tag id.","example":"tg77c0dy0mgdpzmqz6tesry8w184002s"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"Optional workspace override. If omitted, Conduit resolves the tag's workspace automatically.","example":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o"},"required":false,"name":"workspace_id","in":"query"}],"responses":{"204":{"description":"Conversation tag deleted"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}}},"/v1/conversations":{"get":{"operationId":"listConversations","security":[{"bearerAuth":[]}],"tags":["conversations"],"summary":"List conversations","description":"Returns paginated conversation summaries for a workspace. This endpoint is optimized for inbox-style thread browsing and does not include full message history. Use `updated_after` to poll for recently active threads instead of walking the whole list.","parameters":[{"schema":{"type":"string","description":"Workspace to query.","example":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o"},"required":true,"name":"workspace_id","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"string","enum":["true","false"]},"required":false,"name":"archived","in":"query"},{"schema":{"type":"string","enum":["last_message_at","follow_up_at"]},"required":false,"name":"sort_by","in":"query"},{"schema":{"type":"string","enum":["asc","desc"]},"required":false,"name":"order","in":"query"},{"schema":{"type":"string"},"required":false,"name":"inbox_type_id","in":"query"},{"schema":{"type":"string","format":"date-time","description":"Only return conversations whose `updated_at` is at or after this ISO 8601 timestamp. Pair with the default `sort_by=last_message_at&order=desc` to poll for activity: carry the highest `updated_at` you have seen into the next request.","example":"2026-04-03T03:15:04.000Z"},"required":false,"name":"updated_after","in":"query"}],"responses":{"200":{"description":"Conversations","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"contact":{"type":"object","properties":{"id":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string","nullable":true},"image_url":{"type":"string","nullable":true},"inbox_type_id":{"type":"string"}},"required":["id","first_name","last_name","image_url","inbox_type_id"]},"channel":{"type":"string","nullable":true},"archived":{"type":"boolean"},"ai_paused":{"type":"boolean"},"follow_up_at":{"type":"string","nullable":true},"assignee":{"type":"object","nullable":true,"properties":{"user_id":{"type":"string"},"member_id":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"role":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"picture_url":{"type":"string","nullable":true}},"required":["user_id","member_id","first_name","last_name","role","id","name","email","picture_url"]},"assigned_at":{"type":"string","nullable":true,"format":"date-time"},"assigned_by":{"type":"object","nullable":true,"properties":{"kind":{"type":"string","enum":["user","workflow","api","round_robin","system"]},"user_id":{"type":"string","nullable":true},"workflow_id":{"type":"string","nullable":true},"workflow_execution_id":{"type":"string","nullable":true}},"required":["kind","user_id","workflow_id","workflow_execution_id"]},"authorship":{"type":"object","nullable":true,"properties":{"principal":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["user"]},"userId":{"type":"string"}},"required":["kind","userId"]},{"type":"object","properties":{"kind":{"type":"string","enum":["service"]},"serviceId":{"type":"string"}},"required":["kind"]}]},"via":{"type":"string","enum":["direct","operator","agent_run","api","mcp","system"]}},"required":["principal","via"],"description":"Who performed the assignment and through which mechanism. Null when assignment authorship is unknown."},"last_message_at":{"type":"string","nullable":true},"last_message_preview":{"type":"string","nullable":true},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","workspace_id","contact","channel","archived","ai_paused","follow_up_at","assignee","assigned_at","assigned_by","authorship","last_message_at","last_message_preview","created_at","updated_at"]}},"next_cursor":{"type":"string","nullable":true},"has_more":{"type":"boolean"}},"required":["data","next_cursor","has_more"],"description":"Cursor-paginated conversations response.","example":{"data":[{"id":"ph77c0dy0mgdpzmqz6tesry8w184002s","workspace_id":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o","contact":{"id":"ph77c0dy0mgdpzmqz6tesry8w184002s","first_name":"Jane","last_name":"Doe","image_url":null,"inbox_type_id":"guest"},"channel":"unthreaded_email","archived":false,"ai_paused":false,"follow_up_at":null,"assignee":null,"assigned_at":null,"assigned_by":null,"authorship":null,"last_message_at":"2026-04-03T03:14:15.000Z","last_message_preview":"Can I check in early?","created_at":"2026-04-01T17:22:10.000Z","updated_at":"2026-04-03T03:14:15.000Z"}],"next_cursor":"page-token","has_more":true}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}}},"/v1/conversations/search":{"get":{"operationId":"searchConversations","security":[{"bearerAuth":[]}],"tags":["conversations"],"summary":"Search conversations","description":"Find canonical conversation threads by contact identity or, when `field=message`, by message body text.","parameters":[{"schema":{"type":"string","description":"Workspace to query.","example":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o"},"required":true,"name":"workspace_id","in":"query"},{"schema":{"type":"string","description":"Search value. Use names, emails, phones, or message fragments depending on `field`.","example":"deprano"},"required":true,"name":"query","in":"query"},{"schema":{"type":"string","enum":["any","contact","name","first_name","last_name","email","phone","whatsapp","channel","message"],"description":"Conversation search scope. `message` searches transcript bodies; `any` uses the same heuristics as contact search.","example":"last_name"},"required":false,"name":"field","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"string","enum":["true","false"]},"required":false,"name":"archived","in":"query"},{"schema":{"type":"string"},"required":false,"name":"inbox_type_id","in":"query"}],"responses":{"200":{"description":"Conversation search results","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"contact":{"type":"object","properties":{"id":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string","nullable":true},"image_url":{"type":"string","nullable":true},"inbox_type_id":{"type":"string"}},"required":["id","first_name","last_name","image_url","inbox_type_id"]},"channel":{"type":"string","nullable":true},"archived":{"type":"boolean"},"ai_paused":{"type":"boolean"},"follow_up_at":{"type":"string","nullable":true},"assignee":{"type":"object","nullable":true,"properties":{"user_id":{"type":"string"},"member_id":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"role":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"picture_url":{"type":"string","nullable":true}},"required":["user_id","member_id","first_name","last_name","role","id","name","email","picture_url"]},"assigned_at":{"type":"string","nullable":true,"format":"date-time"},"assigned_by":{"type":"object","nullable":true,"properties":{"kind":{"type":"string","enum":["user","workflow","api","round_robin","system"]},"user_id":{"type":"string","nullable":true},"workflow_id":{"type":"string","nullable":true},"workflow_execution_id":{"type":"string","nullable":true}},"required":["kind","user_id","workflow_id","workflow_execution_id"]},"authorship":{"type":"object","nullable":true,"properties":{"principal":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["user"]},"userId":{"type":"string"}},"required":["kind","userId"]},{"type":"object","properties":{"kind":{"type":"string","enum":["service"]},"serviceId":{"type":"string"}},"required":["kind"]}]},"via":{"type":"string","enum":["direct","operator","agent_run","api","mcp","system"]}},"required":["principal","via"],"description":"Who performed the assignment and through which mechanism. Null when assignment authorship is unknown."},"last_message_at":{"type":"string","nullable":true},"last_message_preview":{"type":"string","nullable":true},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","workspace_id","contact","channel","archived","ai_paused","follow_up_at","assignee","assigned_at","assigned_by","authorship","last_message_at","last_message_preview","created_at","updated_at"]}},"next_cursor":{"type":"string","nullable":true},"has_more":{"type":"boolean"}},"required":["data","next_cursor","has_more"],"description":"Cursor-paginated conversations response.","example":{"data":[{"id":"ph77c0dy0mgdpzmqz6tesry8w184002s","workspace_id":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o","contact":{"id":"ph77c0dy0mgdpzmqz6tesry8w184002s","first_name":"Jane","last_name":"Doe","image_url":null,"inbox_type_id":"guest"},"channel":"unthreaded_email","archived":false,"ai_paused":false,"follow_up_at":null,"assignee":null,"assigned_at":null,"assigned_by":null,"authorship":null,"last_message_at":"2026-04-03T03:14:15.000Z","last_message_preview":"Can I check in early?","created_at":"2026-04-01T17:22:10.000Z","updated_at":"2026-04-03T03:14:15.000Z"}],"next_cursor":"page-token","has_more":true}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}}},"/v1/conversations/{id}":{"get":{"operationId":"getConversation","security":[{"bearerAuth":[]}],"tags":["conversations"],"summary":"Get conversation by id","description":"Returns conversation metadata for a single thread, including contact summary, ticket state, assignee, reservation context, summary, sentiment, and the latest message preview.","parameters":[{"schema":{"type":"string","description":"Canonical conversation id.","example":"ph77c0dy0mgdpzmqz6tesry8w184002s"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"Optional workspace override. If omitted, Conduit resolves the conversation's workspace automatically.","example":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o"},"required":false,"name":"workspace_id","in":"query"}],"responses":{"200":{"description":"Conversation","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"contact":{"type":"object","properties":{"id":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string","nullable":true},"image_url":{"type":"string","nullable":true},"inbox_type_id":{"type":"string"}},"required":["id","first_name","last_name","image_url","inbox_type_id"]},"channel":{"type":"string","nullable":true},"archived":{"type":"boolean"},"ai_paused":{"type":"boolean"},"status":{"type":"string","nullable":true},"waiting_on":{"type":"string","nullable":true},"follow_up_at":{"type":"string","nullable":true},"assignee":{"type":"object","nullable":true,"properties":{"user_id":{"type":"string"},"member_id":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"role":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"picture_url":{"type":"string","nullable":true}},"required":["user_id","member_id","first_name","last_name","role","id","name","email","picture_url"]},"assigned_at":{"type":"string","nullable":true,"format":"date-time"},"assigned_by":{"type":"object","nullable":true,"properties":{"kind":{"type":"string","enum":["user","workflow","api","round_robin","system"]},"user_id":{"type":"string","nullable":true},"workflow_id":{"type":"string","nullable":true},"workflow_execution_id":{"type":"string","nullable":true}},"required":["kind","user_id","workflow_id","workflow_execution_id"]},"authorship":{"type":"object","nullable":true,"properties":{"principal":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["user"]},"userId":{"type":"string"}},"required":["kind","userId"]},{"type":"object","properties":{"kind":{"type":"string","enum":["service"]},"serviceId":{"type":"string"}},"required":["kind"]}]},"via":{"type":"string","enum":["direct","operator","agent_run","api","mcp","system"]}},"required":["principal","via"],"description":"Who performed the assignment and through which mechanism. Null when assignment authorship is unknown."},"reservation":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"listing_id":{"type":"string"},"status":{"type":"string","nullable":true},"guest_name":{"type":"string","nullable":true},"check_in":{"type":"string"},"check_out":{"type":"string"}},"required":["id","listing_id","status","guest_name","check_in","check_out"]},"last_message_at":{"type":"string","nullable":true},"last_message_preview":{"type":"string","nullable":true},"created_at":{"type":"string"},"updated_at":{"type":"string"},"summary":{"type":"string","nullable":true},"sentiment":{"type":"string","nullable":true},"customer_sentiment_score":{"type":"number","nullable":true},"support_service_quality_score":{"type":"number","nullable":true},"stay_quality_score":{"type":"number","nullable":true},"cx_score_reasoning":{"type":"string","nullable":true},"sentiment_history":{"type":"array","items":{"type":"object","properties":{"sentiment":{"type":"string","nullable":true},"customer_sentiment_score":{"type":"number","nullable":true},"support_service_quality_score":{"type":"number","nullable":true},"stay_quality_score":{"type":"number","nullable":true},"cx_score_reasoning":{"type":"string","nullable":true},"timestamp":{"type":"string","format":"date-time"},"last_message_id":{"anyOf":[{"type":"string"},{"type":"number"}]}},"required":["sentiment","customer_sentiment_score","support_service_quality_score","stay_quality_score","cx_score_reasoning","timestamp","last_message_id"]}}},"required":["id","workspace_id","contact","channel","archived","ai_paused","status","waiting_on","follow_up_at","assignee","assigned_at","assigned_by","authorship","reservation","last_message_at","last_message_preview","created_at","updated_at","summary","sentiment","customer_sentiment_score","support_service_quality_score","stay_quality_score","cx_score_reasoning","sentiment_history"]}},"required":["data"],"description":"Conversation detail response. This endpoint returns conversation metadata and operational state, not the full transcript.","example":{"data":{"id":"ph77c0dy0mgdpzmqz6tesry8w184002s","workspace_id":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o","contact":{"id":"ph77c0dy0mgdpzmqz6tesry8w184002s","first_name":"Jane","last_name":"Doe","image_url":null,"inbox_type_id":"guest"},"channel":"unthreaded_email","archived":false,"ai_paused":false,"status":"open","waiting_on":"customer","follow_up_at":null,"assignee":{"user_id":"m48k3v7p2q9x5t1w8r6n4j0y3u2i5o7a","member_id":"wm48k3v7p2q9x5t1w8r6n4j0y3u2i5o7","first_name":"Alex","last_name":"Morgan","role":"Admin","id":"m48k3v7p2q9x5t1w8r6n4j0y3u2i5o7a","name":"Alex M","email":"alex@example.com","picture_url":null},"assigned_at":"2026-04-02T10:00:00.000Z","authorship":null,"assigned_by":{"kind":"workflow","user_id":null,"workflow_id":"wf_123","workflow_execution_id":"wfe_123"},"reservation":{"id":"res_123","listing_id":"listing_456","status":"confirmed","guest_name":"Jane Doe","check_in":"2026-04-08","check_out":"2026-04-12"},"last_message_at":"2026-04-03T03:14:15.000Z","last_message_preview":"Can I check in early?","created_at":"2026-04-01T17:22:10.000Z","updated_at":"2026-04-03T03:14:15.000Z","summary":"Guest is asking about early check-in availability.","sentiment":"neutral","customer_sentiment_score":3,"support_service_quality_score":5,"stay_quality_score":4,"cx_score_reasoning":"The guest is neutral about the request and positive about the stay.","sentiment_history":[{"sentiment":"neutral","customer_sentiment_score":3,"support_service_quality_score":5,"stay_quality_score":4,"cx_score_reasoning":"The guest is neutral about the request and positive about the stay.","timestamp":"2026-04-03T03:14:15.000Z","last_message_id":"message_123"}]}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}}},"/v1/conversations/{id}/messages":{"get":{"operationId":"listConversationMessages","security":[{"bearerAuth":[]}],"tags":["conversations"],"summary":"List messages for conversation","description":"Returns the paginated transcript for a conversation. Messages are chronological by default; reuse `cursor` with the same filters to continue pagination. Use `created_after` to fetch only what has arrived since your last poll, `ticket_id` to identify the ticket associated with each message, and `is_sent_by_autopilot` to tell AI replies from operator replies.","parameters":[{"schema":{"type":"string","description":"Canonical conversation id.","example":"ph77c0dy0mgdpzmqz6tesry8w184002s"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"Optional workspace override. If omitted, Conduit resolves the conversation's workspace automatically.","example":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o"},"required":false,"name":"workspace_id","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"string","enum":["asc","desc"]},"required":false,"name":"order","in":"query"},{"schema":{"type":"string","format":"date-time","description":"Only return messages whose `created_at` is at or after this ISO 8601 timestamp. This is the incremental-sync cursor: carry the highest `created_at` you have seen into the next request instead of re-paging the thread. Filters on `created_at` (when Conduit recorded the message) rather than `sent_at`, so a backdated import from a connected channel is still returned.","example":"2026-04-03T03:15:04.000Z"},"required":false,"name":"created_after","in":"query"}],"responses":{"200":{"description":"Conversation messages","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"conversation_id":{"type":"string"},"ticket_id":{"type":"string","nullable":true,"description":"The ticket associated with this message, or null when the message is not assigned to a ticket."},"channel":{"type":"string"},"body":{"type":"string"},"direction":{"type":"string","enum":["inbound","outbound"]},"is_sent_by_autopilot":{"type":"boolean","description":"True when Conduit's AI agent generated and sent this message. False for everything else, including operator replies, workflow sends, and messages ingested from a connected channel's own UI. Prefer this over inferring automation from `sender.user_id`: agent sends usually leave that null, but so do OTA-ingested host replies and workflow sends."},"author":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["contact"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["autopilot"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["user"]},"user_id":{"type":"string","nullable":true}},"required":["type","user_id"]}]},"status":{"type":"string"},"sent_at":{"type":"string"},"created_at":{"type":"string"},"sender":{"type":"object","properties":{"type":{"type":"string","enum":["contact","user","agent","workflow","external","unknown"]},"user_id":{"type":"string","nullable":true},"agent_id":{"type":"string","nullable":true},"workflow_id":{"type":"string","nullable":true},"external_id":{"type":"string","nullable":true},"name":{"type":"string","nullable":true}},"required":["type","user_id","agent_id","workflow_id","external_id","name"]},"attachments":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","description":"Convex storage URL for the attachment. Long-lived (no signature expiry); fetched directly without auth."},"content_type":{"type":"string"},"name":{"type":"string","nullable":true}},"required":["url","content_type","name"]}},"widget_website_url":{"type":"string","nullable":true}},"required":["id","workspace_id","conversation_id","ticket_id","channel","body","direction","is_sent_by_autopilot","author","status","sent_at","created_at","sender","attachments"]}},"next_cursor":{"type":"string","nullable":true},"has_more":{"type":"boolean"}},"required":["data","next_cursor","has_more"],"description":"Cursor-paginated conversation messages response.","example":{"data":[{"id":"yh7t5azsr0zpfpyf67vtce0j6n844y1e","workspace_id":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o","conversation_id":"ph77c0dy0mgdpzmqz6tesry8w184002s","ticket_id":"xd88mkfbmxgckpeyzs8m9r9d3d843me3","channel":"unthreaded_email","body":"Hi there, can you confirm check-in time?","direction":"outbound","is_sent_by_autopilot":false,"author":{"type":"user","user_id":"m48k3v7p2q9x5t1w8r6n4j0y3u2i5o7a"},"status":"sent","sent_at":"2026-04-03T03:15:02.000Z","created_at":"2026-04-03T03:15:04.000Z","sender":{"type":"user","user_id":"m48k3v7p2q9x5t1w8r6n4j0y3u2i5o7a","agent_id":null,"workflow_id":null,"external_id":null,"name":"Alex M"},"attachments":[{"url":"https://files.conduit.ai/storage/kg2abc123def456","content_type":"image/png","name":"screenshot.png"}]}],"next_cursor":null,"has_more":false}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}},"post":{"operationId":"sendConversationMessage","security":[{"bearerAuth":[]}],"tags":["conversations"],"summary":"Send message to conversation","description":"Sends a reply on the current conversation thread. Requires a token with write access and uses the active channel/thread behind the conversation.","parameters":[{"schema":{"type":"string","description":"Canonical conversation id.","example":"ph77c0dy0mgdpzmqz6tesry8w184002s"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"Optional workspace override. If omitted, Conduit resolves the conversation's workspace automatically.","example":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o"},"required":false,"name":"workspace_id","in":"query"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"body":{"type":"string","minLength":1}},"required":["body"],"description":"Request body for sending a message into an existing thread.","example":{"body":"Hi there, can you confirm check-in time?","attachments":[{"attachment_id":"kg2a8d8w8zv1m9q9f9h7e3b2n97j6x2c","name":"failed-contacts.csv","content_type":"text/csv","content_length":18432}]}}}}},"responses":{"201":{"description":"Conversation message sent","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","nullable":true},"workspace_id":{"type":"string"},"conversation_id":{"type":"string"},"ticket_id":{"type":"string","nullable":true},"channel":{"type":"string","nullable":true},"status":{"type":"string","enum":["sent"]}},"required":["id","workspace_id","conversation_id","channel","status"]}},"required":["data"],"description":"Result returned after a message is accepted for delivery.","example":{"data":{"id":"yh7t5azsr0zpfpyf67vtce0j6n844y1e","workspace_id":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o","conversation_id":"ph77c0dy0mgdpzmqz6tesry8w184002s","ticket_id":null,"channel":"unthreaded_email","status":"sent"}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"409":{"description":"Conversation cannot be replied to","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}}},"/v1/workspaces":{"get":{"operationId":"listWorkspaces","security":[{"bearerAuth":[]}],"tags":["workspaces"],"summary":"List accessible workspaces","description":"Returns the workspaces that the current API token is authorized to access. Use this endpoint to discover valid `workspace_id` values for subsequent requests.","responses":{"200":{"description":"Accessible workspaces","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"image_url":{"type":"string","nullable":true}},"required":["id","name","slug","image_url"]}}},"required":["data"],"description":"List of workspaces that the current API token is authorized to access.","example":{"data":[{"id":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o","name":"Your Workspace","slug":"your-workspace","image_url":"https://example.com/workspace.png"}]}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}}},"/v1/workspaces/{id}/users":{"get":{"operationId":"listWorkspaceUsers","security":[{"bearerAuth":[]}],"tags":["workspaces"],"summary":"List workspace users","description":"Returns workspace members and their user ids for the current token.","parameters":[{"schema":{"type":"string","description":"Workspace identifier.","example":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o"},"required":true,"name":"id","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":100},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"}],"responses":{"200":{"description":"Workspace users","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"member_id":{"type":"string"},"email":{"type":"string"},"first_name":{"type":"string","nullable":true},"last_name":{"type":"string","nullable":true},"role":{"type":"string"},"picture_url":{"type":"string","nullable":true}},"required":["id","member_id","email","first_name","last_name","role","picture_url"]}},"next_cursor":{"type":"string","nullable":true},"has_more":{"type":"boolean"}},"required":["data","next_cursor","has_more"],"description":"Cursor-paginated workspace members available to the current token.","example":{"data":[{"id":"m48k3v7p2q9x5t1w8r6n4j0y3u2i5o7a","member_id":"k91w2e4r6t8y0u1i3o5p7a9s2d4f6g8h","email":"member@example.com","first_name":"Member","last_name":"User","role":"Member","picture_url":null}],"next_cursor":"page-token","has_more":true}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}}},"/v1/workspaces/{id}/users/search":{"get":{"operationId":"searchWorkspaceUsers","security":[{"bearerAuth":[]}],"tags":["workspaces"],"summary":"Search workspace users","description":"Find workspace members by partial name or email so callers can resolve a teammate to a user id.","parameters":[{"schema":{"type":"string","description":"Workspace identifier.","example":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"Case-insensitive substring to match against workspace member name or email.","example":"member@example.com"},"required":true,"name":"query","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":50},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"Workspace user search results","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"member_id":{"type":"string"},"email":{"type":"string"},"first_name":{"type":"string","nullable":true},"last_name":{"type":"string","nullable":true},"role":{"type":"string"},"picture_url":{"type":"string","nullable":true}},"required":["id","member_id","email","first_name","last_name","role","picture_url"]}}},"required":["data"],"description":"Workspace members matching a name or email search query.","example":{"data":[{"id":"m48k3v7p2q9x5t1w8r6n4j0y3u2i5o7a","member_id":"k91w2e4r6t8y0u1i3o5p7a9s2d4f6g8h","email":"member@example.com","first_name":"Member","last_name":"User","role":"Member","picture_url":null}]}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}}},"/v1/workspaces/{id}/settings":{"get":{"operationId":"getWorkspaceSettings","security":[{"bearerAuth":[]}],"tags":["workspaces"],"summary":"Get workspace settings","description":"Returns general workspace settings: company profile, timezone, date format, default phone country code, and business hours.","parameters":[{"schema":{"type":"string","description":"Workspace identifier.","example":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Workspace settings","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"company_name":{"type":"string","nullable":true},"company_website":{"type":"string","nullable":true},"company_size":{"type":"string","nullable":true},"about":{"type":"string","nullable":true},"timezone":{"type":"string","nullable":true,"description":"IANA workspace timezone.","example":"America/New_York"},"date_format":{"type":"string","nullable":true,"enum":["MM/DD/YYYY","DD/MM/YYYY"]},"default_phone_country_code":{"type":"string","nullable":true,"example":"US"},"business_hours":{"type":"object","nullable":true,"properties":{"timezone":{"type":"string","example":"America/New_York"},"days":{"type":"array","items":{"type":"object","properties":{"enabled":{"type":"boolean"},"day":{"type":"string","enum":["monday","tuesday","wednesday","thursday","friday","saturday","sunday"]},"ranges":{"type":"array","items":{"type":"object","properties":{"start":{"type":"string","example":"09:00"},"end":{"type":"string","example":"17:00"}},"required":["start","end"]}}},"required":["enabled","day","ranges"]}}},"required":["timezone","days"]}},"required":["company_name","company_website","company_size","about","timezone","date_format","default_phone_country_code","business_hours"]}},"required":["data"],"description":"General workspace settings: company profile, timezone, date format, and business hours."}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}}},"/v1/workspaces/{id}/roles":{"get":{"operationId":"listWorkspaceRoles","security":[{"bearerAuth":[]}],"tags":["workspaces"],"summary":"List workspace roles","description":"Returns the workspace's roles with the permission names each role grants. Use the role ids when inviting members or changing a member's role.","parameters":[{"schema":{"type":"string","description":"Workspace identifier.","example":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Workspace roles","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"role_id":{"type":"string"},"name":{"type":"string","example":"Member"},"is_default":{"type":"boolean"},"permissions":{"type":"array","items":{"type":"string"},"description":"Permission names granted to the role.","example":["View Contacts","Manage Contacts"]}},"required":["role_id","name","is_default","permissions"]}}},"required":["data"],"description":"Workspace roles with the permission names each role grants."}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}}},"/v1/workspaces/{id}/senders":{"get":{"operationId":"listWorkspaceSenders","security":[{"bearerAuth":[]}],"tags":["workspaces"],"summary":"List configured outbound senders","description":"Returns the workspace's configured outbound email, SMS, and WhatsApp senders. Use these `sender_id` values with proactive `send_contact_message` requests when you need to choose the exact sender.","parameters":[{"schema":{"type":"string","description":"Workspace identifier.","example":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Configured outbound senders","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"channel":{"type":"string","enum":["email","sms","whatsapp"]},"provider_type":{"type":"string","enum":["gmail_account","postmark_domain_sender","phone_number_config","whatsapp_number"]},"value":{"type":"string"},"display_name":{"type":"string","nullable":true},"is_default":{"type":"boolean"}},"required":["id","workspace_id","channel","provider_type","value","display_name","is_default"]}}},"required":["data"],"description":"Configured outbound senders that can be used for proactive contact messages in a workspace.","example":{"data":[{"id":"gmail_account:team@conduit.ai","workspace_id":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o","channel":"email","provider_type":"gmail_account","value":"team@conduit.ai","display_name":"team@conduit.ai","is_default":true},{"id":"phone_number_config:+14155550999","workspace_id":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o","channel":"sms","provider_type":"phone_number_config","value":"+14155550999","display_name":"+14155550999","is_default":true},{"id":"whatsapp_number:+14155550999","workspace_id":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o","channel":"whatsapp","provider_type":"whatsapp_number","value":"+14155550999","display_name":"WhatsApp Front Desk","is_default":false}]}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}}},"/v1/workspaces/{id}/whatsapp-templates":{"get":{"operationId":"listWorkspaceWhatsappTemplates","security":[{"bearerAuth":[]}],"tags":["workspaces"],"summary":"List WhatsApp templates","description":"Returns the workspace's stored WhatsApp templates, including Twilio Content SIDs, approval status, template body, and variable keys. Use approved `content_sid` values with proactive WhatsApp contact message requests.","parameters":[{"schema":{"type":"string","description":"Workspace identifier.","example":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Workspace WhatsApp templates","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"content_sid":{"type":"string"},"friendly_name":{"type":"string"},"language":{"type":"string"},"status":{"type":"string"},"category":{"type":"string"},"content_type":{"type":"string"},"rejection_reason":{"type":"string"},"body":{"type":"string"},"variables":{"type":"object","additionalProperties":{"type":"string"}},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","workspace_id","content_sid","friendly_name","language","status","category","content_type","rejection_reason","body","variables","created_at","updated_at"]}}},"required":["data"],"description":"WhatsApp templates stored for the workspace. Use `content_sid` and `variables` with proactive WhatsApp contact sends.","example":{"data":[{"id":"HXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","workspace_id":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o","content_sid":"HXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","friendly_name":"arrival_reminder","language":"en","status":"approved","category":"UTILITY","content_type":"twilio/text","rejection_reason":"","body":"Hi {{1}}, your check-in is {{2}}.","variables":{"1":"Guest name","2":"Check-in time"},"created_at":"2026-04-03T03:15:02.000Z","updated_at":"2026-04-03T03:15:04.000Z"}]}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}}},"/v1/escalations":{"get":{"operationId":"listEscalations","security":[{"bearerAuth":[]}],"tags":["escalations"],"summary":"List chat escalations","description":"Returns cursor-paginated chat escalations for a workspace. Each result includes the current status, guest message, proposed response, operator question, and disposition when available.","parameters":[{"schema":{"type":"string","description":"Workspace to query.","example":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o"},"required":true,"name":"workspace_id","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"string","enum":["pending","reviewed","resolved","dismissed"],"description":"Optional escalation status filter."},"required":false,"name":"status","in":"query"}],"responses":{"200":{"description":"Chat escalations","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"type":{"type":"string","enum":["chat"]},"conversation_id":{"type":"string","nullable":true},"contact_id":{"type":"string","nullable":true},"agent_run_id":{"type":"string","nullable":true},"agent_id":{"type":"string","nullable":true},"disposition":{"type":"string","nullable":true,"enum":["escalated","escalation_and_answer","resolved","unresolved","no_op"]},"disposition_reason":{"type":"string","nullable":true},"status":{"type":"string","enum":["pending","reviewed","resolved","dismissed"]},"created_at":{"type":"string"},"reviewed_at":{"type":"string","nullable":true},"reviewed_by":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"picture_url":{"type":"string","nullable":true}},"required":["id","name","email","picture_url"]},"assignee":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"picture_url":{"type":"string","nullable":true}},"required":["id","name","email","picture_url"]},"guest_message":{"type":"string","nullable":true},"proposed_response":{"type":"string","nullable":true},"request_for_additional_info":{"type":"string","nullable":true},"questions_for_operator":{"type":"string","nullable":true}},"required":["id","workspace_id","type","conversation_id","contact_id","agent_run_id","agent_id","disposition","disposition_reason","status","created_at","reviewed_at","reviewed_by","assignee","guest_message","proposed_response","request_for_additional_info","questions_for_operator"],"description":"Single chat escalation entry with review status, assignee, and escalation context when available.","example":{"id":"k578dfetqv2xv0b7bt9c6m4j5s7n8p1r","workspace_id":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o","type":"chat","conversation_id":"ph77c0dy0mgdpzmqz6tesry8w184002s","contact_id":"ph77c0dy0mgdpzmqz6tesry8w184002s","agent_run_id":"ar77c0dy0mgdpzmqz6tesry8w184002s","agent_id":"ag77c0dy0mgdpzmqz6tesry8w184002s","disposition":"escalated","disposition_reason":"Early check-in availability requires property team confirmation.","status":"pending","created_at":"2026-04-03T05:42:10.000Z","reviewed_at":null,"reviewed_by":null,"assignee":null,"guest_message":"Can I check in before 3 PM tomorrow?","proposed_response":"I can help confirm that for you. Let me check with the property team.","request_for_additional_info":"Please confirm whether early check-in is available for this reservation.","questions_for_operator":"Please confirm whether early check-in is available for this reservation."}}},"next_cursor":{"type":"string","nullable":true},"has_more":{"type":"boolean"}},"required":["data","next_cursor","has_more"],"description":"Cursor-paginated chat escalations response with escalation context when available.","example":{"data":[{"id":"k578dfetqv2xv0b7bt9c6m4j5s7n8p1r","workspace_id":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o","type":"chat","conversation_id":"ph77c0dy0mgdpzmqz6tesry8w184002s","contact_id":"ph77c0dy0mgdpzmqz6tesry8w184002s","agent_run_id":"ar77c0dy0mgdpzmqz6tesry8w184002s","agent_id":"ag77c0dy0mgdpzmqz6tesry8w184002s","disposition":"escalated","disposition_reason":"Early check-in availability requires property team confirmation.","status":"pending","created_at":"2026-04-03T05:42:10.000Z","reviewed_at":null,"reviewed_by":null,"assignee":null,"guest_message":"Can I check in before 3 PM tomorrow?","proposed_response":"I can help confirm that for you. Let me check with the property team.","request_for_additional_info":"Please confirm whether early check-in is available for this reservation.","questions_for_operator":"Please confirm whether early check-in is available for this reservation."}],"next_cursor":"page-token","has_more":true}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}}},"/v1/escalations/{id}/resolve":{"post":{"operationId":"resolveEscalation","security":[{"bearerAuth":[]}],"tags":["escalations"],"summary":"Resolve escalation","description":"Moves a chat escalation into a terminal, human-reviewed state (`resolved` by default; `reviewed` or `dismissed` when supplied) and records the reviewer. Requires a token with write access.","parameters":[{"schema":{"type":"string","description":"Escalation id.","example":"k578dfetqv2xv0b7bt9c6m4j5s7n8p1r"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"Optional workspace override. If omitted, Conduit resolves the escalation's workspace automatically.","example":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o"},"required":false,"name":"workspace_id","in":"query"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["reviewed","resolved","dismissed"],"description":"Terminal status to move the escalation into. Defaults to `resolved`."}},"description":"Request body for resolving a chat escalation. The status defaults to `resolved` when omitted.","example":{"status":"resolved"}}}}},"responses":{"200":{"description":"Resolved escalation","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"type":{"type":"string","enum":["chat"]},"conversation_id":{"type":"string","nullable":true},"contact_id":{"type":"string","nullable":true},"agent_run_id":{"type":"string","nullable":true},"agent_id":{"type":"string","nullable":true},"disposition":{"type":"string","nullable":true,"enum":["escalated","escalation_and_answer","resolved","unresolved","no_op"]},"disposition_reason":{"type":"string","nullable":true},"status":{"type":"string","enum":["pending","reviewed","resolved","dismissed"]},"created_at":{"type":"string"},"reviewed_at":{"type":"string","nullable":true},"reviewed_by":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"picture_url":{"type":"string","nullable":true}},"required":["id","name","email","picture_url"]},"assignee":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"picture_url":{"type":"string","nullable":true}},"required":["id","name","email","picture_url"]},"guest_message":{"type":"string","nullable":true},"proposed_response":{"type":"string","nullable":true},"request_for_additional_info":{"type":"string","nullable":true},"questions_for_operator":{"type":"string","nullable":true}},"required":["id","workspace_id","type","conversation_id","contact_id","agent_run_id","agent_id","disposition","disposition_reason","status","created_at","reviewed_at","reviewed_by","assignee","guest_message","proposed_response","request_for_additional_info","questions_for_operator"],"description":"Single chat escalation entry with review status, assignee, and escalation context when available.","example":{"id":"k578dfetqv2xv0b7bt9c6m4j5s7n8p1r","workspace_id":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o","type":"chat","conversation_id":"ph77c0dy0mgdpzmqz6tesry8w184002s","contact_id":"ph77c0dy0mgdpzmqz6tesry8w184002s","agent_run_id":"ar77c0dy0mgdpzmqz6tesry8w184002s","agent_id":"ag77c0dy0mgdpzmqz6tesry8w184002s","disposition":"escalated","disposition_reason":"Early check-in availability requires property team confirmation.","status":"pending","created_at":"2026-04-03T05:42:10.000Z","reviewed_at":null,"reviewed_by":null,"assignee":null,"guest_message":"Can I check in before 3 PM tomorrow?","proposed_response":"I can help confirm that for you. Let me check with the property team.","request_for_additional_info":"Please confirm whether early check-in is available for this reservation.","questions_for_operator":"Please confirm whether early check-in is available for this reservation."}}},"required":["data"],"description":"Single chat escalation response.","example":{"data":{"id":"k578dfetqv2xv0b7bt9c6m4j5s7n8p1r","workspace_id":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o","type":"chat","conversation_id":"ph77c0dy0mgdpzmqz6tesry8w184002s","contact_id":"ph77c0dy0mgdpzmqz6tesry8w184002s","agent_run_id":"ar77c0dy0mgdpzmqz6tesry8w184002s","agent_id":"ag77c0dy0mgdpzmqz6tesry8w184002s","disposition":"escalated","disposition_reason":"Early check-in availability requires property team confirmation.","status":"pending","created_at":"2026-04-03T05:42:10.000Z","reviewed_at":null,"reviewed_by":null,"assignee":null,"guest_message":"Can I check in before 3 PM tomorrow?","proposed_response":"I can help confirm that for you. Let me check with the property team.","request_for_additional_info":"Please confirm whether early check-in is available for this reservation.","questions_for_operator":"Please confirm whether early check-in is available for this reservation."}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}}},"/v1/escalations/{id}/assign":{"post":{"operationId":"assignEscalation","security":[{"bearerAuth":[]}],"tags":["escalations"],"summary":"Assign escalation","description":"Assigns a chat escalation to a workspace user for the human-handoff path. The assignee must be a member of the escalation's workspace. Requires a token with write access.","parameters":[{"schema":{"type":"string","description":"Escalation id.","example":"k578dfetqv2xv0b7bt9c6m4j5s7n8p1r"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"Optional workspace override. If omitted, Conduit resolves the escalation's workspace automatically.","example":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o"},"required":false,"name":"workspace_id","in":"query"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"assignee_id":{"type":"string","description":"Workspace user to assign the escalation to. Must be a member of the escalation's workspace.","example":"m48k3v7p2q9x5t1w8r6n4j0y3u2i5o7a"}},"required":["assignee_id"],"description":"Request body for assigning a chat escalation to a user.","example":{"assignee_id":"m48k3v7p2q9x5t1w8r6n4j0y3u2i5o7a"}}}}},"responses":{"200":{"description":"Assigned escalation","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"type":{"type":"string","enum":["chat"]},"conversation_id":{"type":"string","nullable":true},"contact_id":{"type":"string","nullable":true},"agent_run_id":{"type":"string","nullable":true},"agent_id":{"type":"string","nullable":true},"disposition":{"type":"string","nullable":true,"enum":["escalated","escalation_and_answer","resolved","unresolved","no_op"]},"disposition_reason":{"type":"string","nullable":true},"status":{"type":"string","enum":["pending","reviewed","resolved","dismissed"]},"created_at":{"type":"string"},"reviewed_at":{"type":"string","nullable":true},"reviewed_by":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"picture_url":{"type":"string","nullable":true}},"required":["id","name","email","picture_url"]},"assignee":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"picture_url":{"type":"string","nullable":true}},"required":["id","name","email","picture_url"]},"guest_message":{"type":"string","nullable":true},"proposed_response":{"type":"string","nullable":true},"request_for_additional_info":{"type":"string","nullable":true},"questions_for_operator":{"type":"string","nullable":true}},"required":["id","workspace_id","type","conversation_id","contact_id","agent_run_id","agent_id","disposition","disposition_reason","status","created_at","reviewed_at","reviewed_by","assignee","guest_message","proposed_response","request_for_additional_info","questions_for_operator"],"description":"Single chat escalation entry with review status, assignee, and escalation context when available.","example":{"id":"k578dfetqv2xv0b7bt9c6m4j5s7n8p1r","workspace_id":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o","type":"chat","conversation_id":"ph77c0dy0mgdpzmqz6tesry8w184002s","contact_id":"ph77c0dy0mgdpzmqz6tesry8w184002s","agent_run_id":"ar77c0dy0mgdpzmqz6tesry8w184002s","agent_id":"ag77c0dy0mgdpzmqz6tesry8w184002s","disposition":"escalated","disposition_reason":"Early check-in availability requires property team confirmation.","status":"pending","created_at":"2026-04-03T05:42:10.000Z","reviewed_at":null,"reviewed_by":null,"assignee":null,"guest_message":"Can I check in before 3 PM tomorrow?","proposed_response":"I can help confirm that for you. Let me check with the property team.","request_for_additional_info":"Please confirm whether early check-in is available for this reservation.","questions_for_operator":"Please confirm whether early check-in is available for this reservation."}}},"required":["data"],"description":"Single chat escalation response.","example":{"data":{"id":"k578dfetqv2xv0b7bt9c6m4j5s7n8p1r","workspace_id":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o","type":"chat","conversation_id":"ph77c0dy0mgdpzmqz6tesry8w184002s","contact_id":"ph77c0dy0mgdpzmqz6tesry8w184002s","agent_run_id":"ar77c0dy0mgdpzmqz6tesry8w184002s","agent_id":"ag77c0dy0mgdpzmqz6tesry8w184002s","disposition":"escalated","disposition_reason":"Early check-in availability requires property team confirmation.","status":"pending","created_at":"2026-04-03T05:42:10.000Z","reviewed_at":null,"reviewed_by":null,"assignee":null,"guest_message":"Can I check in before 3 PM tomorrow?","proposed_response":"I can help confirm that for you. Let me check with the property team.","request_for_additional_info":"Please confirm whether early check-in is available for this reservation.","questions_for_operator":"Please confirm whether early check-in is available for this reservation."}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}}},"/v1/calls":{"get":{"operationId":"listCalls","security":[{"bearerAuth":[]}],"tags":["calls"],"summary":"List calls","description":"Returns paginated call records for a workspace. Filter by direction, missed status, source, or phone number to narrow the result set.","parameters":[{"schema":{"type":"string","description":"Workspace to query.","example":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o"},"required":true,"name":"workspace_id","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"string","enum":["asc","desc"]},"required":false,"name":"order","in":"query"},{"schema":{"type":"string","enum":["inbound","outbound"]},"required":false,"name":"direction","in":"query"},{"schema":{"type":"string","enum":["true","false"]},"required":false,"name":"missed","in":"query"},{"schema":{"type":"string","enum":["app","retell"]},"required":false,"name":"source","in":"query"},{"schema":{"type":"string"},"required":false,"name":"phone_number","in":"query"}],"responses":{"200":{"description":"Calls","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"contact_id":{"type":"string","nullable":true},"conversation_id":{"type":"string","nullable":true},"ticket_id":{"type":"string","nullable":true},"call_id":{"type":"string"},"direction":{"type":"string","enum":["inbound","outbound"]},"from_phone":{"type":"string"},"to_phone":{"type":"string","nullable":true},"source":{"type":"string","nullable":true},"is_missed":{"type":"boolean","nullable":true},"transfer_status":{"type":"string","nullable":true},"answered_by_user_id":{"type":"string","nullable":true},"transfer_target_user_id":{"type":"string","nullable":true},"transfer_target_number":{"type":"string","nullable":true},"transfer_target_display_name":{"type":"string","nullable":true},"transfer_initiated_by_user_id":{"type":"string","nullable":true},"transfer_type":{"type":"string","nullable":true,"enum":["internal","external"]},"transfer_mode":{"type":"string","nullable":true,"enum":["warm","blind"]},"transfer_outcome":{"type":"string","nullable":true,"enum":["completed","canceled","declined","timed_out","aborted","failed"]},"transfer_started_at":{"type":"string","nullable":true},"transfer_accepted_at":{"type":"string","nullable":true},"transfer_ended_at":{"type":"string","nullable":true},"duration_ms":{"type":"number","nullable":true},"sentiment":{"type":"string","nullable":true},"summary":{"type":"string","nullable":true},"recording_url":{"type":"string","nullable":true},"started_at":{"type":"string"},"created_at":{"type":"string"},"call_status":{"type":"object","nullable":true,"properties":{"success":{"type":"boolean"},"is_voicemail_reached":{"type":"boolean","nullable":true},"is_transferred":{"type":"boolean","nullable":true}},"required":["success","is_voicemail_reached","is_transferred"]}},"required":["id","workspace_id","contact_id","conversation_id","ticket_id","call_id","direction","from_phone","to_phone","source","is_missed","transfer_status","answered_by_user_id","transfer_target_user_id","transfer_target_number","transfer_target_display_name","transfer_initiated_by_user_id","transfer_type","transfer_mode","transfer_outcome","transfer_started_at","transfer_accepted_at","transfer_ended_at","duration_ms","sentiment","summary","recording_url","started_at","created_at","call_status"]}},"next_cursor":{"type":"string","nullable":true},"has_more":{"type":"boolean"}},"required":["data","next_cursor","has_more"],"description":"Cursor-paginated calls response.","example":{"data":[{"id":"ce7e2g8z4qbydxtjq8rbxprc4x7f2h5d","workspace_id":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o","contact_id":"ph77c0dy0mgdpzmqz6tesry8w184002s","conversation_id":"ph77c0dy0mgdpzmqz6tesry8w184002s","ticket_id":"xd88mkfbmxgckpeyzs8m9r9d3d843me3","call_id":"call_123","direction":"inbound","from_phone":"+14155550123","to_phone":"+14155550999","source":"retell","is_missed":false,"transfer_status":null,"answered_by_user_id":"m48k3v7p2q9x5t1w8r6n4j0y3u2i5o7a","transfer_target_user_id":null,"transfer_target_number":null,"transfer_target_display_name":null,"transfer_initiated_by_user_id":null,"transfer_type":null,"transfer_mode":null,"transfer_outcome":null,"transfer_started_at":null,"transfer_accepted_at":null,"transfer_ended_at":null,"duration_ms":183000,"sentiment":"neutral","summary":"Guest asked about check-in timing.","recording_url":"https://recordings.conduit.ai/calls/call_123.mp3","started_at":"2026-04-03T02:58:00.000Z","created_at":"2026-04-03T03:01:03.000Z","call_status":{"success":true,"is_voicemail_reached":false,"is_transferred":false}}],"next_cursor":"page-token","has_more":true}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}}},"/v1/calls/{id}":{"get":{"operationId":"getCall","security":[{"bearerAuth":[]}],"tags":["calls"],"summary":"Get call by id","description":"Returns call detail for a single call record, including transcript entries and recording URL when available.","parameters":[{"schema":{"type":"string","description":"Call id.","example":"ce7e2g8z4qbydxtjq8rbxprc4x7f2h5d"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"Optional workspace override. If omitted, Conduit resolves the call's workspace automatically.","example":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o"},"required":false,"name":"workspace_id","in":"query"}],"responses":{"200":{"description":"Call","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"contact_id":{"type":"string","nullable":true},"conversation_id":{"type":"string","nullable":true},"ticket_id":{"type":"string","nullable":true},"call_id":{"type":"string"},"direction":{"type":"string","enum":["inbound","outbound"]},"from_phone":{"type":"string"},"to_phone":{"type":"string","nullable":true},"source":{"type":"string","nullable":true},"is_missed":{"type":"boolean","nullable":true},"transfer_status":{"type":"string","nullable":true},"answered_by_user_id":{"type":"string","nullable":true},"transfer_target_user_id":{"type":"string","nullable":true},"transfer_target_number":{"type":"string","nullable":true},"transfer_target_display_name":{"type":"string","nullable":true},"transfer_initiated_by_user_id":{"type":"string","nullable":true},"transfer_type":{"type":"string","nullable":true,"enum":["internal","external"]},"transfer_mode":{"type":"string","nullable":true,"enum":["warm","blind"]},"transfer_outcome":{"type":"string","nullable":true,"enum":["completed","canceled","declined","timed_out","aborted","failed"]},"transfer_started_at":{"type":"string","nullable":true},"transfer_accepted_at":{"type":"string","nullable":true},"transfer_ended_at":{"type":"string","nullable":true},"duration_ms":{"type":"number","nullable":true},"sentiment":{"type":"string","nullable":true},"summary":{"type":"string","nullable":true},"recording_url":{"type":"string","nullable":true},"started_at":{"type":"string"},"created_at":{"type":"string"},"call_status":{"type":"object","nullable":true,"properties":{"success":{"type":"boolean"},"is_voicemail_reached":{"type":"boolean","nullable":true},"is_transferred":{"type":"boolean","nullable":true}},"required":["success","is_voicemail_reached","is_transferred"]},"transcript":{"type":"array","items":{"type":"object","properties":{"author":{"type":"string"},"text":{"type":"string"},"start":{"type":"number","nullable":true},"end":{"type":"number","nullable":true}},"required":["author","text","start","end"]}}},"required":["id","workspace_id","contact_id","conversation_id","ticket_id","call_id","direction","from_phone","to_phone","source","is_missed","transfer_status","answered_by_user_id","transfer_target_user_id","transfer_target_number","transfer_target_display_name","transfer_initiated_by_user_id","transfer_type","transfer_mode","transfer_outcome","transfer_started_at","transfer_accepted_at","transfer_ended_at","duration_ms","sentiment","summary","recording_url","started_at","created_at","call_status","transcript"]}},"required":["data"],"description":"Call detail response including transcript and recording URL when available.","example":{"data":{"id":"ce7e2g8z4qbydxtjq8rbxprc4x7f2h5d","workspace_id":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o","contact_id":"ph77c0dy0mgdpzmqz6tesry8w184002s","conversation_id":"ph77c0dy0mgdpzmqz6tesry8w184002s","ticket_id":"xd88mkfbmxgckpeyzs8m9r9d3d843me3","call_id":"call_123","direction":"inbound","from_phone":"+14155550123","to_phone":"+14155550999","source":"retell","is_missed":false,"transfer_status":null,"answered_by_user_id":"m48k3v7p2q9x5t1w8r6n4j0y3u2i5o7a","transfer_target_user_id":null,"transfer_target_number":null,"transfer_target_display_name":null,"transfer_initiated_by_user_id":null,"transfer_type":null,"transfer_mode":null,"transfer_outcome":null,"transfer_started_at":null,"transfer_accepted_at":null,"transfer_ended_at":null,"duration_ms":183000,"sentiment":"neutral","summary":"Guest asked about check-in timing.","recording_url":"https://recordings.conduit.ai/calls/call_123.mp3","started_at":"2026-04-03T02:58:00.000Z","created_at":"2026-04-03T03:01:03.000Z","call_status":{"success":true,"is_voicemail_reached":false,"is_transferred":false},"transcript":[{"author":"guest","text":"Hi, can I check in early?","start":0.2,"end":2.8},{"author":"agent","text":"Let me confirm that for you.","start":3,"end":5.4}]}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}}},"/v1/reservations":{"get":{"operationId":"listReservations","security":[{"bearerAuth":[]}],"tags":["reservations"],"summary":"List reservations","description":"Returns cursor-paginated PMS reservations for a workspace, ordered by arrival date (most recent first by default). To find arrivals or departures on a specific date, provide `listing_id` with either `arrival_date` or `departure_date`. The date filters cannot be combined. Filter by `status` when needed. Reservations are synced from the workspace's PMS integration (Hostaway, Guesty, Airbnb, etc.). Airbnb reservations include `airbnb_payment` when normalized Airbnb payout, fee, and tax amounts are available. To sort by departure or booking creation time, use `/v1/contacts/{id}/reservations` for a contact-scoped view.","parameters":[{"schema":{"type":"string","description":"Workspace to query.","example":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o"},"required":true,"name":"workspace_id","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"description":"Page size. Defaults to 20. Max 100."},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","description":"Pagination cursor returned as `next_cursor` on the previous page."},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"string","enum":["asc","desc"],"description":"Sort direction over arrival date. Defaults to `desc` (most recent arrivals first)."},"required":false,"name":"order","in":"query"},{"schema":{"type":"string","description":"Filter by reservation status. Values are PMS-normalized and vary by integration (common examples: `confirmed`, `cancelled`, `inquiry`, `new`).","example":"confirmed"},"required":false,"name":"status","in":"query"},{"schema":{"type":"string","description":"Filter to reservations for a single listing. Matches the `listing_id` value returned on reservation objects.","example":"12345"},"required":false,"name":"listing_id","in":"query"},{"schema":{"type":"string","format":"date","description":"Exact arrival date in YYYY-MM-DD format. Requires `listing_id` and cannot be combined with `departure_date`.","example":"2026-07-29"},"required":false,"name":"arrival_date","in":"query"},{"schema":{"type":"string","format":"date","description":"Exact departure date in YYYY-MM-DD format. Requires `listing_id` and cannot be combined with `arrival_date`.","example":"2026-07-31"},"required":false,"name":"departure_date","in":"query"}],"responses":{"200":{"description":"Reservations","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"contact_id":{"type":"string","nullable":true},"listing_id":{"type":"string","nullable":true},"pms_platform":{"type":"string"},"external_id":{"type":"string"},"channel_name":{"type":"string","nullable":true},"channel_reservation_id":{"type":"string","nullable":true},"confirmation_code":{"type":"string","nullable":true},"status":{"type":"string","nullable":true},"source":{"type":"string","nullable":true},"arrival_date":{"type":"string"},"arrival_at":{"type":"string","nullable":true},"departure_date":{"type":"string"},"departure_at":{"type":"string","nullable":true},"num_nights":{"type":"number","nullable":true},"number_of_guests":{"type":"number","nullable":true},"number_of_adults":{"type":"number","nullable":true},"number_of_children":{"type":"number","nullable":true},"number_of_infants":{"type":"number","nullable":true},"number_of_pets":{"type":"number","nullable":true},"guest":{"type":"object","properties":{"name":{"type":"string","nullable":true},"first_name":{"type":"string","nullable":true},"last_name":{"type":"string","nullable":true},"email":{"type":"string","nullable":true},"phone":{"type":"string","nullable":true},"country":{"type":"string","nullable":true},"city":{"type":"string","nullable":true},"locale":{"type":"string","nullable":true},"external_account_id":{"type":"string","nullable":true}},"required":["name","first_name","last_name","email","phone","country","city","locale","external_account_id"]},"payment":{"type":"object","nullable":true,"properties":{"is_paid":{"type":"boolean","nullable":true,"description":"Whether the PMS reports the reservation as fully paid. null when the PMS gave no payment signal (unknown, not unpaid)."},"total_price":{"type":"number","description":"Total reservation price in major units (e.g. dollars, euros) of `currency`, as reported by the PMS. Not minor units (cents)."},"currency":{"type":"string","description":"ISO 4217 currency code reported by the PMS."},"outstanding_balance":{"type":"number","nullable":true,"description":"Balance owed in major units of `currency`, when reported. `null` if the PMS does not provide it."}},"required":["is_paid","total_price","currency","outstanding_balance"]},"airbnb_payment":{"type":"object","nullable":true,"properties":{"currency":{"type":"string","nullable":true,"description":"ISO 4217 currency code for the Airbnb payout amounts, when reported."},"expected_payout_amount":{"type":"number","nullable":true,"description":"Airbnb expected host payout in major units of the reservation currency."},"expected_payout_amount_before_taxes":{"type":"number","nullable":true,"description":"Airbnb expected host payout before taxes, in major units of the reservation currency."},"listing_base_price":{"type":"number","nullable":true},"listing_cancellation_payout":{"type":"number","nullable":true},"listing_cancellation_host_fee":{"type":"number","nullable":true},"total_paid_amount":{"type":"number","nullable":true,"description":"Total amount paid by the guest, when Airbnb reports it."},"transient_occupancy_tax_paid_amount":{"type":"number","nullable":true},"airbnb_collected_tax_amount":{"type":"number","nullable":true},"pass_through_tax_amount_paid_to_host":{"type":"number","nullable":true},"pass_through_tax_expected_amount":{"type":"number","nullable":true},"host_fee_base":{"type":"number","nullable":true},"host_fee_vat":{"type":"number","nullable":true},"guest_fee_base":{"type":"number","nullable":true},"guest_fee_vat":{"type":"number","nullable":true},"tax_withholding_amount":{"type":"number","nullable":true}},"required":["currency","expected_payout_amount","expected_payout_amount_before_taxes","listing_base_price","listing_cancellation_payout","listing_cancellation_host_fee","total_paid_amount","transient_occupancy_tax_paid_amount","airbnb_collected_tax_amount","pass_through_tax_amount_paid_to_host","pass_through_tax_expected_amount","host_fee_base","host_fee_vat","guest_fee_base","guest_fee_vat","tax_withholding_amount"],"description":"Airbnb-specific normalized payout, fee, and tax amounts. `null` for non-Airbnb reservations or when Airbnb did not provide payout amounts."},"door_code":{"type":"string","nullable":true},"key_code":{"type":"string","nullable":true},"guest_note":{"type":"string","nullable":true},"ai_paused":{"type":"boolean","nullable":true},"created_at":{"type":"string"},"updated_at":{"type":"string","nullable":true}},"required":["id","workspace_id","contact_id","listing_id","pms_platform","external_id","channel_name","channel_reservation_id","confirmation_code","status","source","arrival_date","arrival_at","departure_date","departure_at","num_nights","number_of_guests","number_of_adults","number_of_children","number_of_infants","number_of_pets","guest","payment","airbnb_payment","door_code","key_code","guest_note","ai_paused","created_at","updated_at"],"description":"A reservation synced from the workspace's PMS integration. `id` is the Conduit-stable identifier; `external_id` is the PMS's own reservation id."}},"next_cursor":{"type":"string","nullable":true},"has_more":{"type":"boolean"}},"required":["data","next_cursor","has_more"],"description":"Cursor-paginated reservations response.","example":{"data":[{"id":"rs77c0dy0mgdpzmqz6tesry8w184002s","workspace_id":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o","contact_id":"ph77c0dy0mgdpzmqz6tesry8w184002s","listing_id":"listing-demo-12345","pms_platform":"Guesty","external_id":"guesty-demo-res-001","channel_name":"Airbnb","channel_reservation_id":"HMDEMO1234","confirmation_code":"HMDEMO1234","status":"confirmed","source":"airbnb","arrival_date":"2026-05-01","arrival_at":"2026-05-01T15:00:00.000Z","departure_date":"2026-05-05","departure_at":"2026-05-05T11:00:00.000Z","num_nights":4,"number_of_guests":2,"number_of_adults":2,"number_of_children":0,"number_of_infants":0,"number_of_pets":0,"guest":{"name":"Jordan Guest","first_name":"Jordan","last_name":"Guest","email":"jordan.guest@example.com","phone":"+14155550123","country":"US","city":"San Francisco","locale":"en","external_account_id":"airbnb_user_demo_001"},"payment":{"is_paid":true,"total_price":920.5,"currency":"USD","outstanding_balance":0},"airbnb_payment":{"currency":"USD","expected_payout_amount":782.4,"expected_payout_amount_before_taxes":735.25,"listing_base_price":860,"listing_cancellation_payout":null,"listing_cancellation_host_fee":null,"total_paid_amount":940.5,"transient_occupancy_tax_paid_amount":58.1,"airbnb_collected_tax_amount":42,"pass_through_tax_amount_paid_to_host":16.1,"pass_through_tax_expected_amount":16.1,"host_fee_base":25.8,"host_fee_vat":0,"guest_fee_base":72,"guest_fee_vat":0,"tax_withholding_amount":null},"door_code":null,"key_code":null,"guest_note":null,"ai_paused":false,"created_at":"2026-04-18T17:20:00.000Z","updated_at":"2026-04-18T17:20:00.000Z"}],"next_cursor":"page-token","has_more":true}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}}},"/v1/reservations/{id}":{"get":{"operationId":"getReservation","security":[{"bearerAuth":[]}],"tags":["reservations"],"summary":"Get reservation by id","description":"Returns a single reservation by its Conduit id, including guest identity, payment summary, normalized Airbnb payout amounts when available, and PMS-specific metadata.","parameters":[{"schema":{"type":"string","description":"Reservation id.","example":"rs77c0dy0mgdpzmqz6tesry8w184002s"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"Optional workspace override. If omitted, Conduit resolves the reservation's workspace automatically.","example":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o"},"required":false,"name":"workspace_id","in":"query"}],"responses":{"200":{"description":"Reservation","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"contact_id":{"type":"string","nullable":true},"listing_id":{"type":"string","nullable":true},"pms_platform":{"type":"string"},"external_id":{"type":"string"},"channel_name":{"type":"string","nullable":true},"channel_reservation_id":{"type":"string","nullable":true},"confirmation_code":{"type":"string","nullable":true},"status":{"type":"string","nullable":true},"source":{"type":"string","nullable":true},"arrival_date":{"type":"string"},"arrival_at":{"type":"string","nullable":true},"departure_date":{"type":"string"},"departure_at":{"type":"string","nullable":true},"num_nights":{"type":"number","nullable":true},"number_of_guests":{"type":"number","nullable":true},"number_of_adults":{"type":"number","nullable":true},"number_of_children":{"type":"number","nullable":true},"number_of_infants":{"type":"number","nullable":true},"number_of_pets":{"type":"number","nullable":true},"guest":{"type":"object","properties":{"name":{"type":"string","nullable":true},"first_name":{"type":"string","nullable":true},"last_name":{"type":"string","nullable":true},"email":{"type":"string","nullable":true},"phone":{"type":"string","nullable":true},"country":{"type":"string","nullable":true},"city":{"type":"string","nullable":true},"locale":{"type":"string","nullable":true},"external_account_id":{"type":"string","nullable":true}},"required":["name","first_name","last_name","email","phone","country","city","locale","external_account_id"]},"payment":{"type":"object","nullable":true,"properties":{"is_paid":{"type":"boolean","nullable":true,"description":"Whether the PMS reports the reservation as fully paid. null when the PMS gave no payment signal (unknown, not unpaid)."},"total_price":{"type":"number","description":"Total reservation price in major units (e.g. dollars, euros) of `currency`, as reported by the PMS. Not minor units (cents)."},"currency":{"type":"string","description":"ISO 4217 currency code reported by the PMS."},"outstanding_balance":{"type":"number","nullable":true,"description":"Balance owed in major units of `currency`, when reported. `null` if the PMS does not provide it."}},"required":["is_paid","total_price","currency","outstanding_balance"]},"airbnb_payment":{"type":"object","nullable":true,"properties":{"currency":{"type":"string","nullable":true,"description":"ISO 4217 currency code for the Airbnb payout amounts, when reported."},"expected_payout_amount":{"type":"number","nullable":true,"description":"Airbnb expected host payout in major units of the reservation currency."},"expected_payout_amount_before_taxes":{"type":"number","nullable":true,"description":"Airbnb expected host payout before taxes, in major units of the reservation currency."},"listing_base_price":{"type":"number","nullable":true},"listing_cancellation_payout":{"type":"number","nullable":true},"listing_cancellation_host_fee":{"type":"number","nullable":true},"total_paid_amount":{"type":"number","nullable":true,"description":"Total amount paid by the guest, when Airbnb reports it."},"transient_occupancy_tax_paid_amount":{"type":"number","nullable":true},"airbnb_collected_tax_amount":{"type":"number","nullable":true},"pass_through_tax_amount_paid_to_host":{"type":"number","nullable":true},"pass_through_tax_expected_amount":{"type":"number","nullable":true},"host_fee_base":{"type":"number","nullable":true},"host_fee_vat":{"type":"number","nullable":true},"guest_fee_base":{"type":"number","nullable":true},"guest_fee_vat":{"type":"number","nullable":true},"tax_withholding_amount":{"type":"number","nullable":true}},"required":["currency","expected_payout_amount","expected_payout_amount_before_taxes","listing_base_price","listing_cancellation_payout","listing_cancellation_host_fee","total_paid_amount","transient_occupancy_tax_paid_amount","airbnb_collected_tax_amount","pass_through_tax_amount_paid_to_host","pass_through_tax_expected_amount","host_fee_base","host_fee_vat","guest_fee_base","guest_fee_vat","tax_withholding_amount"],"description":"Airbnb-specific normalized payout, fee, and tax amounts. `null` for non-Airbnb reservations or when Airbnb did not provide payout amounts."},"door_code":{"type":"string","nullable":true},"key_code":{"type":"string","nullable":true},"guest_note":{"type":"string","nullable":true},"ai_paused":{"type":"boolean","nullable":true},"created_at":{"type":"string"},"updated_at":{"type":"string","nullable":true}},"required":["id","workspace_id","contact_id","listing_id","pms_platform","external_id","channel_name","channel_reservation_id","confirmation_code","status","source","arrival_date","arrival_at","departure_date","departure_at","num_nights","number_of_guests","number_of_adults","number_of_children","number_of_infants","number_of_pets","guest","payment","airbnb_payment","door_code","key_code","guest_note","ai_paused","created_at","updated_at"],"description":"A reservation synced from the workspace's PMS integration. `id` is the Conduit-stable identifier; `external_id` is the PMS's own reservation id."}},"required":["data"],"description":"Single reservation response including guest, payment, and PMS context.","example":{"data":{"id":"rs77c0dy0mgdpzmqz6tesry8w184002s","workspace_id":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o","contact_id":"ph77c0dy0mgdpzmqz6tesry8w184002s","listing_id":"listing-demo-12345","pms_platform":"Guesty","external_id":"guesty-demo-res-001","channel_name":"Airbnb","channel_reservation_id":"HMDEMO1234","confirmation_code":"HMDEMO1234","status":"confirmed","source":"airbnb","arrival_date":"2026-05-01","arrival_at":"2026-05-01T15:00:00.000Z","departure_date":"2026-05-05","departure_at":"2026-05-05T11:00:00.000Z","num_nights":4,"number_of_guests":2,"number_of_adults":2,"number_of_children":0,"number_of_infants":0,"number_of_pets":0,"guest":{"name":"Jordan Guest","first_name":"Jordan","last_name":"Guest","email":"jordan.guest@example.com","phone":"+14155550123","country":"US","city":"San Francisco","locale":"en","external_account_id":"airbnb_user_demo_001"},"payment":{"is_paid":true,"total_price":920.5,"currency":"USD","outstanding_balance":0},"airbnb_payment":{"currency":"USD","expected_payout_amount":782.4,"expected_payout_amount_before_taxes":735.25,"listing_base_price":860,"listing_cancellation_payout":null,"listing_cancellation_host_fee":null,"total_paid_amount":940.5,"transient_occupancy_tax_paid_amount":58.1,"airbnb_collected_tax_amount":42,"pass_through_tax_amount_paid_to_host":16.1,"pass_through_tax_expected_amount":16.1,"host_fee_base":25.8,"host_fee_vat":0,"guest_fee_base":72,"guest_fee_vat":0,"tax_withholding_amount":null},"door_code":null,"key_code":null,"guest_note":null,"ai_paused":false,"created_at":"2026-04-18T17:20:00.000Z","updated_at":"2026-04-18T17:20:00.000Z"}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}}},"/v1/contacts/{id}/reservations":{"get":{"operationId":"listContactReservations","security":[{"bearerAuth":[]}],"tags":["reservations"],"summary":"List reservations for a contact","description":"Returns reservations associated with a single contact via the contact's reservation allocations. Airbnb reservations include `airbnb_payment` when normalized Airbnb payout, fee, and tax amounts are available. Use `sort_by` to order by `arrival` (default), `departure`, or `created`. `order` defaults to `desc`.","parameters":[{"schema":{"type":"string","description":"Contact id.","example":"ph77c0dy0mgdpzmqz6tesry8w184002s"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"Optional workspace override. If omitted, Conduit resolves the contact's workspace automatically.","example":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o"},"required":false,"name":"workspace_id","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"description":"Page size. Defaults to 20. Max 100."},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"string","enum":["asc","desc"],"description":"Sort direction. Defaults to `desc`."},"required":false,"name":"order","in":"query"},{"schema":{"type":"string","enum":["arrival","departure","created"],"description":"Primary sort field. `arrival` sorts by check-in date, `departure` by check-out date, `created` by booking creation time. Defaults to `arrival`."},"required":false,"name":"sort_by","in":"query"},{"schema":{"type":"string","description":"Filter by reservation status. Values are PMS-normalized and vary by integration (common examples: `confirmed`, `cancelled`, `inquiry`, `new`).","example":"confirmed"},"required":false,"name":"status","in":"query"}],"responses":{"200":{"description":"Contact reservations","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"contact_id":{"type":"string","nullable":true},"listing_id":{"type":"string","nullable":true},"pms_platform":{"type":"string"},"external_id":{"type":"string"},"channel_name":{"type":"string","nullable":true},"channel_reservation_id":{"type":"string","nullable":true},"confirmation_code":{"type":"string","nullable":true},"status":{"type":"string","nullable":true},"source":{"type":"string","nullable":true},"arrival_date":{"type":"string"},"arrival_at":{"type":"string","nullable":true},"departure_date":{"type":"string"},"departure_at":{"type":"string","nullable":true},"num_nights":{"type":"number","nullable":true},"number_of_guests":{"type":"number","nullable":true},"number_of_adults":{"type":"number","nullable":true},"number_of_children":{"type":"number","nullable":true},"number_of_infants":{"type":"number","nullable":true},"number_of_pets":{"type":"number","nullable":true},"guest":{"type":"object","properties":{"name":{"type":"string","nullable":true},"first_name":{"type":"string","nullable":true},"last_name":{"type":"string","nullable":true},"email":{"type":"string","nullable":true},"phone":{"type":"string","nullable":true},"country":{"type":"string","nullable":true},"city":{"type":"string","nullable":true},"locale":{"type":"string","nullable":true},"external_account_id":{"type":"string","nullable":true}},"required":["name","first_name","last_name","email","phone","country","city","locale","external_account_id"]},"payment":{"type":"object","nullable":true,"properties":{"is_paid":{"type":"boolean","nullable":true,"description":"Whether the PMS reports the reservation as fully paid. null when the PMS gave no payment signal (unknown, not unpaid)."},"total_price":{"type":"number","description":"Total reservation price in major units (e.g. dollars, euros) of `currency`, as reported by the PMS. Not minor units (cents)."},"currency":{"type":"string","description":"ISO 4217 currency code reported by the PMS."},"outstanding_balance":{"type":"number","nullable":true,"description":"Balance owed in major units of `currency`, when reported. `null` if the PMS does not provide it."}},"required":["is_paid","total_price","currency","outstanding_balance"]},"airbnb_payment":{"type":"object","nullable":true,"properties":{"currency":{"type":"string","nullable":true,"description":"ISO 4217 currency code for the Airbnb payout amounts, when reported."},"expected_payout_amount":{"type":"number","nullable":true,"description":"Airbnb expected host payout in major units of the reservation currency."},"expected_payout_amount_before_taxes":{"type":"number","nullable":true,"description":"Airbnb expected host payout before taxes, in major units of the reservation currency."},"listing_base_price":{"type":"number","nullable":true},"listing_cancellation_payout":{"type":"number","nullable":true},"listing_cancellation_host_fee":{"type":"number","nullable":true},"total_paid_amount":{"type":"number","nullable":true,"description":"Total amount paid by the guest, when Airbnb reports it."},"transient_occupancy_tax_paid_amount":{"type":"number","nullable":true},"airbnb_collected_tax_amount":{"type":"number","nullable":true},"pass_through_tax_amount_paid_to_host":{"type":"number","nullable":true},"pass_through_tax_expected_amount":{"type":"number","nullable":true},"host_fee_base":{"type":"number","nullable":true},"host_fee_vat":{"type":"number","nullable":true},"guest_fee_base":{"type":"number","nullable":true},"guest_fee_vat":{"type":"number","nullable":true},"tax_withholding_amount":{"type":"number","nullable":true}},"required":["currency","expected_payout_amount","expected_payout_amount_before_taxes","listing_base_price","listing_cancellation_payout","listing_cancellation_host_fee","total_paid_amount","transient_occupancy_tax_paid_amount","airbnb_collected_tax_amount","pass_through_tax_amount_paid_to_host","pass_through_tax_expected_amount","host_fee_base","host_fee_vat","guest_fee_base","guest_fee_vat","tax_withholding_amount"],"description":"Airbnb-specific normalized payout, fee, and tax amounts. `null` for non-Airbnb reservations or when Airbnb did not provide payout amounts."},"door_code":{"type":"string","nullable":true},"key_code":{"type":"string","nullable":true},"guest_note":{"type":"string","nullable":true},"ai_paused":{"type":"boolean","nullable":true},"created_at":{"type":"string"},"updated_at":{"type":"string","nullable":true}},"required":["id","workspace_id","contact_id","listing_id","pms_platform","external_id","channel_name","channel_reservation_id","confirmation_code","status","source","arrival_date","arrival_at","departure_date","departure_at","num_nights","number_of_guests","number_of_adults","number_of_children","number_of_infants","number_of_pets","guest","payment","airbnb_payment","door_code","key_code","guest_note","ai_paused","created_at","updated_at"],"description":"A reservation synced from the workspace's PMS integration. `id` is the Conduit-stable identifier; `external_id` is the PMS's own reservation id."}},"next_cursor":{"type":"string","nullable":true},"has_more":{"type":"boolean"}},"required":["data","next_cursor","has_more"],"description":"Cursor-paginated reservations response.","example":{"data":[{"id":"rs77c0dy0mgdpzmqz6tesry8w184002s","workspace_id":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o","contact_id":"ph77c0dy0mgdpzmqz6tesry8w184002s","listing_id":"listing-demo-12345","pms_platform":"Guesty","external_id":"guesty-demo-res-001","channel_name":"Airbnb","channel_reservation_id":"HMDEMO1234","confirmation_code":"HMDEMO1234","status":"confirmed","source":"airbnb","arrival_date":"2026-05-01","arrival_at":"2026-05-01T15:00:00.000Z","departure_date":"2026-05-05","departure_at":"2026-05-05T11:00:00.000Z","num_nights":4,"number_of_guests":2,"number_of_adults":2,"number_of_children":0,"number_of_infants":0,"number_of_pets":0,"guest":{"name":"Jordan Guest","first_name":"Jordan","last_name":"Guest","email":"jordan.guest@example.com","phone":"+14155550123","country":"US","city":"San Francisco","locale":"en","external_account_id":"airbnb_user_demo_001"},"payment":{"is_paid":true,"total_price":920.5,"currency":"USD","outstanding_balance":0},"airbnb_payment":{"currency":"USD","expected_payout_amount":782.4,"expected_payout_amount_before_taxes":735.25,"listing_base_price":860,"listing_cancellation_payout":null,"listing_cancellation_host_fee":null,"total_paid_amount":940.5,"transient_occupancy_tax_paid_amount":58.1,"airbnb_collected_tax_amount":42,"pass_through_tax_amount_paid_to_host":16.1,"pass_through_tax_expected_amount":16.1,"host_fee_base":25.8,"host_fee_vat":0,"guest_fee_base":72,"guest_fee_vat":0,"tax_withholding_amount":null},"door_code":null,"key_code":null,"guest_note":null,"ai_paused":false,"created_at":"2026-04-18T17:20:00.000Z","updated_at":"2026-04-18T17:20:00.000Z"}],"next_cursor":"page-token","has_more":true}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}}},"/v1/appointments":{"get":{"operationId":"listAppointments","security":[{"bearerAuth":[]}],"tags":["appointments"],"summary":"List appointments","description":"Returns cursor-paginated appointments backed by the Conduit booking service. v1 exposes allocation + `external_id` context only; full appointment details (scheduled time, assigned agent, location) are retrievable from the booking service using `external_id`.","parameters":[{"schema":{"type":"string","description":"Workspace to query.","example":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o"},"required":true,"name":"workspace_id","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"description":"Page size. Defaults to 20. Max 100."},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","description":"Pagination cursor returned as `next_cursor` on the previous page."},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"string","enum":["asc","desc"],"description":"Sort direction over scheduled start time. Defaults to `desc` (most recently scheduled first)."},"required":false,"name":"order","in":"query"},{"schema":{"type":"string","enum":["awaiting_response","awaiting_confirmation","confirmed","cancelled","completed","no_show","rescheduled"],"description":"Filter by appointment status. Use `completed`, `no_show`, `cancelled`, or `rescheduled` to compute booking efficacy rates."},"required":false,"name":"status","in":"query"},{"schema":{"type":"string","format":"date-time","description":"Only return appointments scheduled at or after this ISO 8601 timestamp.","example":"2026-04-01T00:00:00.000Z"},"required":false,"name":"start_after","in":"query"},{"schema":{"type":"string","format":"date-time","description":"Only return appointments scheduled strictly before this ISO 8601 timestamp.","example":"2026-05-01T00:00:00.000Z"},"required":false,"name":"start_before","in":"query"}],"responses":{"200":{"description":"Appointments","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Conduit appointment id."},"workspace_id":{"type":"string"},"contact_id":{"type":"string","nullable":true,"description":"Contact associated with this appointment. `null` if the appointment is not yet linked to a contact."},"external_id":{"type":"string","nullable":true,"description":"Upstream booking service id (typically prefixed `bk_`). `null` if the appointment was created outside the booking service sync."},"status":{"type":"string","enum":["awaiting_response","awaiting_confirmation","confirmed","cancelled","completed","no_show","rescheduled"],"description":"Appointment lifecycle status. Use `completed`, `no_show`, `cancelled`, and `rescheduled` to compute booking efficacy rates."},"start_at":{"type":"string","nullable":true,"description":"ISO 8601 scheduled start time. `null` if the appointment is a scheduling link that has not been claimed."},"end_at":{"type":"string","nullable":true,"description":"ISO 8601 scheduled end time."},"duration_ms":{"type":"number","nullable":true,"description":"Scheduled duration in milliseconds, derived from `end_at - start_at`. `null` if either boundary is missing."},"origin":{"type":"string","nullable":true,"description":"Where the booking originated (e.g. `call`, `text`, `direct`)."},"notes":{"type":"string","nullable":true,"description":"Operator-entered notes about the appointment."},"generated_context":{"type":"string","nullable":true,"description":"AI-generated summary of the conversation context leading to the booking."},"short_link_id":{"type":"string","description":"Identifier of the scheduling short link used to create this appointment."},"strength_indicator":{"type":"number","nullable":true,"description":"Optional 0..1 confidence score of booking quality (provided by the booking service)."},"booking_info":{"type":"object","properties":{"name":{"type":"string","nullable":true},"email":{"type":"string","nullable":true},"phone":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true}},"required":["name","email","phone","notes"],"description":"Contact details captured at the time of booking."},"references":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","nullable":true},"type":{"type":"string","enum":["property","unit","unknown"]},"value":{"type":"string"}},"required":["id","type","value"]},"description":"External entities the appointment is scoped to (e.g. a property or unit)."},"last_synced_at":{"type":"string","nullable":true,"description":"ISO 8601 of the last sync from the upstream booking service."},"created_at":{"type":"string"}},"required":["id","workspace_id","contact_id","external_id","status","start_at","end_at","duration_ms","origin","notes","generated_context","short_link_id","strength_indicator","booking_info","references","last_synced_at","created_at"],"description":"A scheduled appointment, including status, start/end times, notes, and the contact details captured at booking time."}},"next_cursor":{"type":"string","nullable":true},"has_more":{"type":"boolean"}},"required":["data","next_cursor","has_more"],"description":"Cursor-paginated appointments response.","example":{"data":[{"id":"ar77c0dy0mgdpzmqz6tesry8w184002s","workspace_id":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o","contact_id":"ph77c0dy0mgdpzmqz6tesry8w184002s","external_id":"bk_vcNpA4g3iJWvlkY1","status":"confirmed","start_at":"2026-04-21T13:30:00.000Z","end_at":"2026-04-21T13:45:00.000Z","duration_ms":900000,"origin":"direct","notes":"Tour of the property, coming from Airbnb inquiry.","generated_context":"Guest asked about check-in flexibility.","short_link_id":"sl_8m3qxv2","strength_indicator":0.82,"booking_info":{"name":"Taylor Reid","email":"taylor.reid@example.com","phone":"+14155550123","notes":null},"references":[{"id":"listing_456","type":"unit","value":"Unit 4B"}],"last_synced_at":"2026-04-18T16:12:05.000Z","created_at":"2026-04-18T16:12:00.000Z"}],"next_cursor":"page-token","has_more":true}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}}},"/v1/appointments/{id}":{"get":{"operationId":"getAppointment","security":[{"bearerAuth":[]}],"tags":["appointments"],"summary":"Get appointment by id","description":"Returns a single appointment by its Conduit id. Use `external_id` to look up full appointment details from the booking service.","parameters":[{"schema":{"type":"string","description":"Appointment id.","example":"ar77c0dy0mgdpzmqz6tesry8w184002s"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"Optional workspace override. If omitted, Conduit resolves the appointment's workspace automatically.","example":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o"},"required":false,"name":"workspace_id","in":"query"}],"responses":{"200":{"description":"Appointment","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Conduit appointment id."},"workspace_id":{"type":"string"},"contact_id":{"type":"string","nullable":true,"description":"Contact associated with this appointment. `null` if the appointment is not yet linked to a contact."},"external_id":{"type":"string","nullable":true,"description":"Upstream booking service id (typically prefixed `bk_`). `null` if the appointment was created outside the booking service sync."},"status":{"type":"string","enum":["awaiting_response","awaiting_confirmation","confirmed","cancelled","completed","no_show","rescheduled"],"description":"Appointment lifecycle status. Use `completed`, `no_show`, `cancelled`, and `rescheduled` to compute booking efficacy rates."},"start_at":{"type":"string","nullable":true,"description":"ISO 8601 scheduled start time. `null` if the appointment is a scheduling link that has not been claimed."},"end_at":{"type":"string","nullable":true,"description":"ISO 8601 scheduled end time."},"duration_ms":{"type":"number","nullable":true,"description":"Scheduled duration in milliseconds, derived from `end_at - start_at`. `null` if either boundary is missing."},"origin":{"type":"string","nullable":true,"description":"Where the booking originated (e.g. `call`, `text`, `direct`)."},"notes":{"type":"string","nullable":true,"description":"Operator-entered notes about the appointment."},"generated_context":{"type":"string","nullable":true,"description":"AI-generated summary of the conversation context leading to the booking."},"short_link_id":{"type":"string","description":"Identifier of the scheduling short link used to create this appointment."},"strength_indicator":{"type":"number","nullable":true,"description":"Optional 0..1 confidence score of booking quality (provided by the booking service)."},"booking_info":{"type":"object","properties":{"name":{"type":"string","nullable":true},"email":{"type":"string","nullable":true},"phone":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true}},"required":["name","email","phone","notes"],"description":"Contact details captured at the time of booking."},"references":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","nullable":true},"type":{"type":"string","enum":["property","unit","unknown"]},"value":{"type":"string"}},"required":["id","type","value"]},"description":"External entities the appointment is scoped to (e.g. a property or unit)."},"last_synced_at":{"type":"string","nullable":true,"description":"ISO 8601 of the last sync from the upstream booking service."},"created_at":{"type":"string"}},"required":["id","workspace_id","contact_id","external_id","status","start_at","end_at","duration_ms","origin","notes","generated_context","short_link_id","strength_indicator","booking_info","references","last_synced_at","created_at"],"description":"A scheduled appointment, including status, start/end times, notes, and the contact details captured at booking time."}},"required":["data"],"description":"Single appointment response.","example":{"data":{"id":"ar77c0dy0mgdpzmqz6tesry8w184002s","workspace_id":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o","contact_id":"ph77c0dy0mgdpzmqz6tesry8w184002s","external_id":"bk_vcNpA4g3iJWvlkY1","status":"confirmed","start_at":"2026-04-21T13:30:00.000Z","end_at":"2026-04-21T13:45:00.000Z","duration_ms":900000,"origin":"direct","notes":"Tour of the property, coming from Airbnb inquiry.","generated_context":"Guest asked about check-in flexibility.","short_link_id":"sl_8m3qxv2","strength_indicator":0.82,"booking_info":{"name":"Taylor Reid","email":"taylor.reid@example.com","phone":"+14155550123","notes":null},"references":[{"id":"listing_456","type":"unit","value":"Unit 4B"}],"last_synced_at":"2026-04-18T16:12:05.000Z","created_at":"2026-04-18T16:12:00.000Z"}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}}},"/v1/contacts/{id}/appointments":{"get":{"operationId":"listContactAppointments","security":[{"bearerAuth":[]}],"tags":["appointments"],"summary":"List appointments for a contact","description":"Returns appointments associated with a single contact via the contact's conduit allocations.","parameters":[{"schema":{"type":"string","description":"Contact id.","example":"ph77c0dy0mgdpzmqz6tesry8w184002s"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"Optional workspace override. If omitted, Conduit resolves the contact's workspace automatically.","example":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o"},"required":false,"name":"workspace_id","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"description":"Page size. Defaults to 20. Max 100."},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"string","enum":["asc","desc"],"description":"Sort direction. Defaults to `desc`."},"required":false,"name":"order","in":"query"},{"schema":{"type":"string","enum":["awaiting_response","awaiting_confirmation","confirmed","cancelled","completed","no_show","rescheduled"],"description":"Filter by appointment status. Use `completed`, `no_show`, `cancelled`, or `rescheduled` to compute booking efficacy rates."},"required":false,"name":"status","in":"query"},{"schema":{"type":"string","format":"date-time","description":"Only return appointments scheduled at or after this ISO 8601 timestamp."},"required":false,"name":"start_after","in":"query"},{"schema":{"type":"string","format":"date-time","description":"Only return appointments scheduled strictly before this ISO 8601 timestamp."},"required":false,"name":"start_before","in":"query"}],"responses":{"200":{"description":"Contact appointments","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Conduit appointment id."},"workspace_id":{"type":"string"},"contact_id":{"type":"string","nullable":true,"description":"Contact associated with this appointment. `null` if the appointment is not yet linked to a contact."},"external_id":{"type":"string","nullable":true,"description":"Upstream booking service id (typically prefixed `bk_`). `null` if the appointment was created outside the booking service sync."},"status":{"type":"string","enum":["awaiting_response","awaiting_confirmation","confirmed","cancelled","completed","no_show","rescheduled"],"description":"Appointment lifecycle status. Use `completed`, `no_show`, `cancelled`, and `rescheduled` to compute booking efficacy rates."},"start_at":{"type":"string","nullable":true,"description":"ISO 8601 scheduled start time. `null` if the appointment is a scheduling link that has not been claimed."},"end_at":{"type":"string","nullable":true,"description":"ISO 8601 scheduled end time."},"duration_ms":{"type":"number","nullable":true,"description":"Scheduled duration in milliseconds, derived from `end_at - start_at`. `null` if either boundary is missing."},"origin":{"type":"string","nullable":true,"description":"Where the booking originated (e.g. `call`, `text`, `direct`)."},"notes":{"type":"string","nullable":true,"description":"Operator-entered notes about the appointment."},"generated_context":{"type":"string","nullable":true,"description":"AI-generated summary of the conversation context leading to the booking."},"short_link_id":{"type":"string","description":"Identifier of the scheduling short link used to create this appointment."},"strength_indicator":{"type":"number","nullable":true,"description":"Optional 0..1 confidence score of booking quality (provided by the booking service)."},"booking_info":{"type":"object","properties":{"name":{"type":"string","nullable":true},"email":{"type":"string","nullable":true},"phone":{"type":"string","nullable":true},"notes":{"type":"string","nullable":true}},"required":["name","email","phone","notes"],"description":"Contact details captured at the time of booking."},"references":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","nullable":true},"type":{"type":"string","enum":["property","unit","unknown"]},"value":{"type":"string"}},"required":["id","type","value"]},"description":"External entities the appointment is scoped to (e.g. a property or unit)."},"last_synced_at":{"type":"string","nullable":true,"description":"ISO 8601 of the last sync from the upstream booking service."},"created_at":{"type":"string"}},"required":["id","workspace_id","contact_id","external_id","status","start_at","end_at","duration_ms","origin","notes","generated_context","short_link_id","strength_indicator","booking_info","references","last_synced_at","created_at"],"description":"A scheduled appointment, including status, start/end times, notes, and the contact details captured at booking time."}},"next_cursor":{"type":"string","nullable":true},"has_more":{"type":"boolean"}},"required":["data","next_cursor","has_more"],"description":"Cursor-paginated appointments response.","example":{"data":[{"id":"ar77c0dy0mgdpzmqz6tesry8w184002s","workspace_id":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o","contact_id":"ph77c0dy0mgdpzmqz6tesry8w184002s","external_id":"bk_vcNpA4g3iJWvlkY1","status":"confirmed","start_at":"2026-04-21T13:30:00.000Z","end_at":"2026-04-21T13:45:00.000Z","duration_ms":900000,"origin":"direct","notes":"Tour of the property, coming from Airbnb inquiry.","generated_context":"Guest asked about check-in flexibility.","short_link_id":"sl_8m3qxv2","strength_indicator":0.82,"booking_info":{"name":"Taylor Reid","email":"taylor.reid@example.com","phone":"+14155550123","notes":null},"references":[{"id":"listing_456","type":"unit","value":"Unit 4B"}],"last_synced_at":"2026-04-18T16:12:05.000Z","created_at":"2026-04-18T16:12:00.000Z"}],"next_cursor":"page-token","has_more":true}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}}},"/v1/helpdesk-tickets":{"get":{"operationId":"listHelpdeskTickets","security":[{"bearerAuth":[]}],"tags":["helpdesk_tickets"],"summary":"List helpdesk tickets","description":"Returns cursor-paginated helpdesk tickets mirrored from the workspace's helpdesk integrations (Zendesk, Pylon, Plain). Filter by `status`, `channel`, or `connection_id`.","parameters":[{"schema":{"type":"string","description":"Workspace to query.","example":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o"},"required":true,"name":"workspace_id","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"description":"Page size. Defaults to 20. Max 100."},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","description":"Pagination cursor returned as `next_cursor` on the previous page."},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"string","enum":["asc","desc"],"description":"Sort direction over last external update time. Defaults to `desc`."},"required":false,"name":"order","in":"query"},{"schema":{"type":"string","description":"Filter by helpdesk status. Values depend on the upstream helpdesk system (examples: `open`, `new`, `pending`, `solved`, `closed`).","example":"open"},"required":false,"name":"status","in":"query"},{"schema":{"type":"string","description":"Filter by the channel the ticket arrived on (examples: `email`, `web`, `chat`)."},"required":false,"name":"channel","in":"query"},{"schema":{"type":"string","description":"Filter to tickets from a single helpdesk connection (Zendesk/Pylon/Plain instance)."},"required":false,"name":"connection_id","in":"query"}],"responses":{"200":{"description":"Helpdesk tickets","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"contact_id":{"type":"string","nullable":true},"ticket_id":{"type":"string","nullable":true,"description":"Conduit inbox ticket id when the helpdesk ticket has been linked to a native conversation, otherwise null."},"connection_id":{"type":"string"},"external_ticket_id":{"type":"string"},"external_group_id":{"type":"string","nullable":true},"external_assignee_id":{"type":"string","nullable":true},"subject":{"type":"string"},"description":{"type":"string","nullable":true},"status":{"type":"string"},"priority":{"type":"string","nullable":true},"type":{"type":"string","nullable":true},"channel":{"type":"string","nullable":true},"tags":{"type":"array","items":{"type":"string"}},"requester":{"type":"object","properties":{"external_id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string","nullable":true}},"required":["external_id","name","email"]},"last_external_update_at":{"type":"string"},"created_at":{"type":"string"}},"required":["id","workspace_id","contact_id","ticket_id","connection_id","external_ticket_id","external_group_id","external_assignee_id","subject","description","status","priority","type","channel","tags","requester","last_external_update_at","created_at"],"description":"A helpdesk ticket mirrored from an external helpdesk system (Zendesk, Pylon, Plain). `external_ticket_id` is the upstream ticket id; `id` is the Conduit-stable identifier."}},"next_cursor":{"type":"string","nullable":true},"has_more":{"type":"boolean"}},"required":["data","next_cursor","has_more"],"description":"Cursor-paginated helpdesk tickets response.","example":{"data":[{"id":"hd77c0dy0mgdpzmqz6tesry8w184002s","workspace_id":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o","contact_id":"ph77c0dy0mgdpzmqz6tesry8w184002s","ticket_id":"tk77c0dy0mgdpzmqz6tesry8w184002s","connection_id":"cn77c0dy0mgdpzmqz6tesry8w184002s","external_ticket_id":"zd_12345","external_group_id":"grp_42","external_assignee_id":"usr_987","subject":"Unable to access door code","description":"Guest reports the keypad is not accepting the code.","status":"open","priority":"high","type":"incident","channel":"email","tags":["urgent","access"],"requester":{"external_id":"zd_user_abc","name":"Taylor Reid","email":"taylor.reid@example.com"},"last_external_update_at":"2026-04-19T14:05:00.000Z","created_at":"2026-04-19T13:48:00.000Z"}],"next_cursor":"page-token","has_more":true}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}}},"/v1/helpdesk-tickets/{id}":{"get":{"operationId":"getHelpdeskTicket","security":[{"bearerAuth":[]}],"tags":["helpdesk_tickets"],"summary":"Get helpdesk ticket by id","description":"Returns a single helpdesk ticket by its Conduit id, including requester identity and upstream helpdesk-system metadata.","parameters":[{"schema":{"type":"string","description":"Helpdesk ticket id.","example":"hd77c0dy0mgdpzmqz6tesry8w184002s"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"Optional workspace override. If omitted, Conduit resolves the helpdesk ticket's workspace automatically.","example":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o"},"required":false,"name":"workspace_id","in":"query"}],"responses":{"200":{"description":"Helpdesk ticket","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"contact_id":{"type":"string","nullable":true},"ticket_id":{"type":"string","nullable":true,"description":"Conduit inbox ticket id when the helpdesk ticket has been linked to a native conversation, otherwise null."},"connection_id":{"type":"string"},"external_ticket_id":{"type":"string"},"external_group_id":{"type":"string","nullable":true},"external_assignee_id":{"type":"string","nullable":true},"subject":{"type":"string"},"description":{"type":"string","nullable":true},"status":{"type":"string"},"priority":{"type":"string","nullable":true},"type":{"type":"string","nullable":true},"channel":{"type":"string","nullable":true},"tags":{"type":"array","items":{"type":"string"}},"requester":{"type":"object","properties":{"external_id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string","nullable":true}},"required":["external_id","name","email"]},"last_external_update_at":{"type":"string"},"created_at":{"type":"string"}},"required":["id","workspace_id","contact_id","ticket_id","connection_id","external_ticket_id","external_group_id","external_assignee_id","subject","description","status","priority","type","channel","tags","requester","last_external_update_at","created_at"],"description":"A helpdesk ticket mirrored from an external helpdesk system (Zendesk, Pylon, Plain). `external_ticket_id` is the upstream ticket id; `id` is the Conduit-stable identifier."}},"required":["data"],"description":"Single helpdesk ticket response including requester identity and upstream metadata.","example":{"data":{"id":"hd77c0dy0mgdpzmqz6tesry8w184002s","workspace_id":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o","contact_id":"ph77c0dy0mgdpzmqz6tesry8w184002s","ticket_id":"tk77c0dy0mgdpzmqz6tesry8w184002s","connection_id":"cn77c0dy0mgdpzmqz6tesry8w184002s","external_ticket_id":"zd_12345","external_group_id":"grp_42","external_assignee_id":"usr_987","subject":"Unable to access door code","description":"Guest reports the keypad is not accepting the code.","status":"open","priority":"high","type":"incident","channel":"email","tags":["urgent","access"],"requester":{"external_id":"zd_user_abc","name":"Taylor Reid","email":"taylor.reid@example.com"},"last_external_update_at":"2026-04-19T14:05:00.000Z","created_at":"2026-04-19T13:48:00.000Z"}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}}},"/v1/contacts/{id}/helpdesk-tickets":{"get":{"operationId":"listContactHelpdeskTickets","security":[{"bearerAuth":[]}],"tags":["helpdesk_tickets"],"summary":"List helpdesk tickets for a contact","description":"Returns helpdesk tickets mirrored from external helpdesk systems that are associated with a single contact.","parameters":[{"schema":{"type":"string","description":"Contact id.","example":"ph77c0dy0mgdpzmqz6tesry8w184002s"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"Optional workspace override. If omitted, Conduit resolves the contact's workspace automatically.","example":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o"},"required":false,"name":"workspace_id","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"description":"Page size. Defaults to 20. Max 100."},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"string","enum":["asc","desc"],"description":"Sort direction. Defaults to `desc`."},"required":false,"name":"order","in":"query"},{"schema":{"type":"string","description":"Filter by helpdesk status. Values depend on the upstream helpdesk system."},"required":false,"name":"status","in":"query"},{"schema":{"type":"string","description":"Filter by the channel the ticket arrived on."},"required":false,"name":"channel","in":"query"},{"schema":{"type":"string","description":"Filter to tickets from a single helpdesk connection (Zendesk/Pylon/Plain instance)."},"required":false,"name":"connection_id","in":"query"}],"responses":{"200":{"description":"Contact helpdesk tickets","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"contact_id":{"type":"string","nullable":true},"ticket_id":{"type":"string","nullable":true,"description":"Conduit inbox ticket id when the helpdesk ticket has been linked to a native conversation, otherwise null."},"connection_id":{"type":"string"},"external_ticket_id":{"type":"string"},"external_group_id":{"type":"string","nullable":true},"external_assignee_id":{"type":"string","nullable":true},"subject":{"type":"string"},"description":{"type":"string","nullable":true},"status":{"type":"string"},"priority":{"type":"string","nullable":true},"type":{"type":"string","nullable":true},"channel":{"type":"string","nullable":true},"tags":{"type":"array","items":{"type":"string"}},"requester":{"type":"object","properties":{"external_id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string","nullable":true}},"required":["external_id","name","email"]},"last_external_update_at":{"type":"string"},"created_at":{"type":"string"}},"required":["id","workspace_id","contact_id","ticket_id","connection_id","external_ticket_id","external_group_id","external_assignee_id","subject","description","status","priority","type","channel","tags","requester","last_external_update_at","created_at"],"description":"A helpdesk ticket mirrored from an external helpdesk system (Zendesk, Pylon, Plain). `external_ticket_id` is the upstream ticket id; `id` is the Conduit-stable identifier."}},"next_cursor":{"type":"string","nullable":true},"has_more":{"type":"boolean"}},"required":["data","next_cursor","has_more"],"description":"Cursor-paginated helpdesk tickets response.","example":{"data":[{"id":"hd77c0dy0mgdpzmqz6tesry8w184002s","workspace_id":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o","contact_id":"ph77c0dy0mgdpzmqz6tesry8w184002s","ticket_id":"tk77c0dy0mgdpzmqz6tesry8w184002s","connection_id":"cn77c0dy0mgdpzmqz6tesry8w184002s","external_ticket_id":"zd_12345","external_group_id":"grp_42","external_assignee_id":"usr_987","subject":"Unable to access door code","description":"Guest reports the keypad is not accepting the code.","status":"open","priority":"high","type":"incident","channel":"email","tags":["urgent","access"],"requester":{"external_id":"zd_user_abc","name":"Taylor Reid","email":"taylor.reid@example.com"},"last_external_update_at":"2026-04-19T14:05:00.000Z","created_at":"2026-04-19T13:48:00.000Z"}],"next_cursor":"page-token","has_more":true}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}}},"/v1/insights/automation_rate":{"get":{"operationId":"getAutomationRate","security":[{"bearerAuth":[]}],"tags":["insights"],"summary":"Get automation rate","description":"Returns the automation-rate headline fields plus aggregate and daily decision, disposition, delivery, and input-message mapping breakdowns. Answer-and-escalate is a successful AI send in this metric. Top-level counts equal sums over the dense daily series. Hits BigQuery, so it carries a dedicated 10 requests/minute per-workspace limit in addition to the general public API limit.","parameters":[{"schema":{"type":"string","description":"Workspace to query.","example":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o"},"required":true,"name":"workspace_id","in":"query"},{"schema":{"type":"string","description":"Inclusive range start (ISO 8601 date).","example":"2026-06-01"},"required":true,"name":"start_date","in":"query"},{"schema":{"type":"string","description":"Inclusive range end (ISO 8601 date). Max 90 days from start.","example":"2026-06-30"},"required":true,"name":"end_date","in":"query"},{"schema":{"type":"string","description":"Optional inbox type / contact category to segment by. Omit for the whole workspace.","example":"guest"},"required":false,"name":"category_name","in":"query"}],"responses":{"200":{"description":"Automation-rate metric for the workspace and date range","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"numerator":{"type":"number","description":"Count of AI-handled (send-like) agent-run decisions in the range."},"denominator":{"type":"number","description":"Count of all agent-run decisions in the range (the human + AI split total)."},"rate":{"type":"number","description":"numerator / denominator, rounded to 4 decimals. 0 when there are no decisions."},"range":{"type":"object","properties":{"start_date":{"type":"string"},"end_date":{"type":"string"}},"required":["start_date","end_date"],"description":"The inclusive date range the metric was computed over."},"formula_version":{"type":"string","description":"Stable identifier for the numerator/denominator formula. Diff it across responses to detect a silent formula change."},"breakdown":{"type":"object","properties":{"decisions":{"type":"object","properties":{"total":{"type":"number"},"sent":{"type":"number"},"not_sent":{"type":"number"}},"required":["total","sent","not_sent"]},"by_disposition":{"type":"object","properties":{"resolved":{"type":"object","properties":{"total":{"type":"number"},"sent":{"type":"number"},"not_sent":{"type":"number"}},"required":["total","sent","not_sent"]},"unresolved":{"type":"object","properties":{"total":{"type":"number"},"sent":{"type":"number"},"not_sent":{"type":"number"}},"required":["total","sent","not_sent"]},"escalation_and_answer":{"type":"object","properties":{"total":{"type":"number"},"sent":{"type":"number"},"not_sent":{"type":"number"}},"required":["total","sent","not_sent"]},"escalated":{"type":"object","properties":{"total":{"type":"number"},"sent":{"type":"number"},"not_sent":{"type":"number"}},"required":["total","sent","not_sent"]},"proactive":{"type":"object","properties":{"total":{"type":"number"},"sent":{"type":"number"},"not_sent":{"type":"number"}},"required":["total","sent","not_sent"]},"unknown":{"type":"object","properties":{"total":{"type":"number"},"sent":{"type":"number"},"not_sent":{"type":"number"}},"required":["total","sent","not_sent"]}},"required":["resolved","unresolved","escalation_and_answer","escalated","proactive","unknown"]},"message_mapping":{"type":"object","properties":{"decision_batches":{"type":"number"},"referenced_input_messages":{"type":"number"},"decisions_without_input_messages":{"type":"number"}},"required":["decision_batches","referenced_input_messages","decisions_without_input_messages"]}},"required":["decisions","by_disposition","message_mapping"]},"series":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string","description":"Bucket day, ISO 8601 date (YYYY-MM-DD)."},"numerator":{"type":"number","description":"AI-handled decisions on this day."},"denominator":{"type":"number","description":"All decisions on this day."},"rate":{"type":"number","description":"numerator / denominator for the day, rounded to 4 decimals. 0 when the day has no decisions."},"breakdown":{"type":"object","properties":{"decisions":{"type":"object","properties":{"total":{"type":"number"},"sent":{"type":"number"},"not_sent":{"type":"number"}},"required":["total","sent","not_sent"]},"by_disposition":{"type":"object","properties":{"resolved":{"type":"object","properties":{"total":{"type":"number"},"sent":{"type":"number"},"not_sent":{"type":"number"}},"required":["total","sent","not_sent"]},"unresolved":{"type":"object","properties":{"total":{"type":"number"},"sent":{"type":"number"},"not_sent":{"type":"number"}},"required":["total","sent","not_sent"]},"escalation_and_answer":{"type":"object","properties":{"total":{"type":"number"},"sent":{"type":"number"},"not_sent":{"type":"number"}},"required":["total","sent","not_sent"]},"escalated":{"type":"object","properties":{"total":{"type":"number"},"sent":{"type":"number"},"not_sent":{"type":"number"}},"required":["total","sent","not_sent"]},"proactive":{"type":"object","properties":{"total":{"type":"number"},"sent":{"type":"number"},"not_sent":{"type":"number"}},"required":["total","sent","not_sent"]},"unknown":{"type":"object","properties":{"total":{"type":"number"},"sent":{"type":"number"},"not_sent":{"type":"number"}},"required":["total","sent","not_sent"]}},"required":["resolved","unresolved","escalation_and_answer","escalated","proactive","unknown"]},"message_mapping":{"type":"object","properties":{"decision_batches":{"type":"number"},"referenced_input_messages":{"type":"number"},"decisions_without_input_messages":{"type":"number"}},"required":["decision_batches","referenced_input_messages","decisions_without_input_messages"]}},"required":["decisions","by_disposition","message_mapping"]}},"required":["date","numerator","denominator","rate","breakdown"]},"description":"Per-day automation-rate buckets, one entry per calendar day in the range (zero-filled, ascending by date). This is the same series the Insights dashboard automation-rate chart renders, bucketed in the workspace timezone. The top-level numerator/denominator equal the sums over this series."}},"required":["numerator","denominator","rate","range","formula_version","breakdown","series"]}},"required":["data"],"description":"Automation-rate metric (human vs AI-handled contact split) for a workspace and date range.","example":{"data":{"numerator":40,"denominator":52,"rate":0.7692,"range":{"start_date":"2026-06-01","end_date":"2026-06-30"},"formula_version":"2026-07-10","breakdown":{"decisions":{"total":52,"sent":40,"not_sent":12},"by_disposition":{"resolved":{"total":30,"sent":30,"not_sent":0},"unresolved":{"total":10,"sent":8,"not_sent":2},"escalation_and_answer":{"total":2,"sent":2,"not_sent":0},"escalated":{"total":4,"sent":0,"not_sent":4},"proactive":{"total":0,"sent":0,"not_sent":0},"unknown":{"total":6,"sent":0,"not_sent":6}},"message_mapping":{"decision_batches":52,"referenced_input_messages":61,"decisions_without_input_messages":3}},"series":[{"date":"2026-06-01","numerator":40,"denominator":52,"rate":0.7692,"breakdown":{"decisions":{"total":52,"sent":40,"not_sent":12},"by_disposition":{"resolved":{"total":30,"sent":30,"not_sent":0},"unresolved":{"total":10,"sent":8,"not_sent":2},"escalation_and_answer":{"total":2,"sent":2,"not_sent":0},"escalated":{"total":4,"sent":0,"not_sent":4},"proactive":{"total":0,"sent":0,"not_sent":0},"unknown":{"total":6,"sent":0,"not_sent":6}},"message_mapping":{"decision_batches":52,"referenced_input_messages":61,"decisions_without_input_messages":3}}},{"date":"2026-06-02","numerator":0,"denominator":0,"rate":0,"breakdown":{"decisions":{"total":0,"sent":0,"not_sent":0},"by_disposition":{"resolved":{"total":0,"sent":0,"not_sent":0},"unresolved":{"total":0,"sent":0,"not_sent":0},"escalation_and_answer":{"total":0,"sent":0,"not_sent":0},"escalated":{"total":0,"sent":0,"not_sent":0},"proactive":{"total":0,"sent":0,"not_sent":0},"unknown":{"total":0,"sent":0,"not_sent":0}},"message_mapping":{"decision_batches":0,"referenced_input_messages":0,"decisions_without_input_messages":0}}}]}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}}},"/v1/insights/resolution_rate":{"get":{"operationId":"getResolutionRate","security":[{"bearerAuth":[]}],"tags":["insights"],"summary":"Get resolution rate","description":"Returns the share of eligible conversation threads whose final agent decision was resolved and sent. The additive fully_autonomous metric is the stricter subset with no teammate outbound and no escalation during the selected date range.","parameters":[{"schema":{"type":"string","description":"Workspace to query.","example":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o"},"required":true,"name":"workspace_id","in":"query"},{"schema":{"type":"string","description":"Inclusive range start (ISO 8601 date).","example":"2026-06-01"},"required":true,"name":"start_date","in":"query"},{"schema":{"type":"string","description":"Inclusive range end (ISO 8601 date). Max 90 days from start.","example":"2026-06-30"},"required":true,"name":"end_date","in":"query"},{"schema":{"type":"string","description":"Optional inbox type / contact category to segment by. Omit for the whole workspace.","example":"guest"},"required":false,"name":"category_name","in":"query"}],"responses":{"200":{"description":"Resolution rate with fully autonomous subset","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"numerator":{"type":"number"},"denominator":{"type":"number"},"rate":{"type":"number"},"range":{"type":"object","properties":{"start_date":{"type":"string"},"end_date":{"type":"string"}},"required":["start_date","end_date"]},"formula_version":{"type":"string"},"fully_autonomous":{"type":"object","properties":{"numerator":{"type":"number"},"denominator":{"type":"number"},"rate":{"type":"number"}},"required":["numerator","denominator","rate"]},"breakdown":{"type":"array","items":{"type":"object","properties":{"final_disposition":{"type":"string","enum":["resolved","unresolved","escalation_and_answer","escalated","unknown"]},"final_response_sent":{"type":"boolean"},"human_intervention":{"type":"boolean"},"escalated_at_any_point":{"type":"boolean"},"count":{"type":"integer","minimum":0}},"required":["final_disposition","final_response_sent","human_intervention","escalated_at_any_point","count"]}},"series":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string"},"numerator":{"type":"number"},"denominator":{"type":"number"},"rate":{"type":"number"},"fully_autonomous":{"type":"object","properties":{"numerator":{"type":"number"},"denominator":{"type":"number"},"rate":{"type":"number"}},"required":["numerator","denominator","rate"]},"breakdown":{"type":"array","items":{"type":"object","properties":{"final_disposition":{"type":"string","enum":["resolved","unresolved","escalation_and_answer","escalated","unknown"]},"final_response_sent":{"type":"boolean"},"human_intervention":{"type":"boolean"},"escalated_at_any_point":{"type":"boolean"},"count":{"type":"integer","minimum":0}},"required":["final_disposition","final_response_sent","human_intervention","escalated_at_any_point","count"]}}},"required":["date","numerator","denominator","rate","fully_autonomous","breakdown"]}}},"required":["numerator","denominator","rate","range","formula_version","fully_autonomous","breakdown","series"]}},"required":["data"],"description":"Resolution rate for eligible conversation threads, with fully autonomous completion as a stricter additive subset."}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}}},"/v1/tickets":{"get":{"operationId":"listTickets","security":[{"bearerAuth":[]}],"tags":["tickets"],"summary":"List tickets","description":"Returns the workspace ticket queue. This endpoint defaults to `open` tickets, where `open` means actionable tickets (`new` + `pending`), and supports queue-style filtering by inbox type, waiting state, channel, and status.","parameters":[{"schema":{"type":"string","description":"Workspace to query.","example":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o"},"required":true,"name":"workspace_id","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"string","enum":["open","new","pending","resolved","closed"],"description":"`open` returns actionable tickets (`new` + `pending`)."},"required":false,"name":"status","in":"query"},{"schema":{"type":"string"},"required":false,"name":"inbox_type_id","in":"query"},{"schema":{"type":"string","enum":["team","customer","third_party","none"]},"required":false,"name":"waiting_on","in":"query"},{"schema":{"type":"string"},"required":false,"name":"channel","in":"query"},{"schema":{"type":"string","enum":["asc","desc"]},"required":false,"name":"order","in":"query"}],"responses":{"200":{"description":"Tickets","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"contact_id":{"type":"string"},"conversation_id":{"type":"string"},"channel":{"type":"string"},"status":{"type":"string","enum":["new","pending","resolved","closed","merged"]},"waiting_on":{"type":"string","nullable":true},"inbox_type_id":{"type":"string"},"subject":{"type":"string","nullable":true},"summary":{"type":"string","nullable":true},"ai_paused":{"type":"boolean"},"assignee":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"picture_url":{"type":"string","nullable":true}},"required":["id","name","email","picture_url"]},"follow_up_at":{"type":"string","nullable":true},"first_message_at":{"type":"string","nullable":true},"first_response_at":{"type":"string","nullable":true},"resolved_at":{"type":"string","nullable":true},"first_resolved_at":{"type":"string","nullable":true},"closed_at":{"type":"string","nullable":true},"time_to_first_response_ms":{"type":"number","nullable":true,"description":"Blended AI and human time to first response in milliseconds. Use ai_participated as the segmentation key."},"time_to_resolution_ms":{"type":"number","nullable":true,"description":"Blended AI and human time to resolution in milliseconds. Use ai_participated as the segmentation key."},"reopen_count":{"type":"number"},"ai_participated":{"type":"boolean"},"last_message_at":{"type":"string","nullable":true},"last_message_preview":{"type":"string","nullable":true},"created_at":{"type":"string"},"updated_at":{"type":"string"},"call_transcript_id":{"type":"string","nullable":true},"merged_into_ticket_id":{"type":"string","nullable":true}},"required":["id","workspace_id","contact_id","conversation_id","channel","status","waiting_on","inbox_type_id","subject","summary","ai_paused","assignee","follow_up_at","first_message_at","first_response_at","resolved_at","first_resolved_at","closed_at","time_to_first_response_ms","time_to_resolution_ms","reopen_count","ai_participated","last_message_at","last_message_preview","created_at","updated_at","call_transcript_id","merged_into_ticket_id"]}},"next_cursor":{"type":"string","nullable":true},"has_more":{"type":"boolean"}},"required":["data","next_cursor","has_more"],"description":"Cursor-paginated tickets response.","example":{"data":[{"id":"xd88mkfbmxgckpeyzs8m9r9d3d843me3","workspace_id":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o","contact_id":"ph77c0dy0mgdpzmqz6tesry8w184002s","conversation_id":"ph77c0dy0mgdpzmqz6tesry8w184002s","channel":"unthreaded_email","status":"new","waiting_on":"customer","inbox_type_id":"guest","subject":"Early check-in request","summary":"Guest asked to confirm whether early arrival is possible.","ai_paused":false,"assignee":{"id":"m48k3v7p2q9x5t1w8r6n4j0y3u2i5o7a","name":"Alex M","email":"alex@example.com","picture_url":null},"follow_up_at":null,"first_message_at":"2026-04-01T17:22:10.000Z","first_response_at":"2026-04-01T17:22:14.000Z","resolved_at":null,"first_resolved_at":null,"closed_at":null,"time_to_first_response_ms":4000,"time_to_resolution_ms":null,"reopen_count":0,"ai_participated":true,"last_message_at":"2026-04-03T03:14:15.000Z","last_message_preview":"Can I check in early?","created_at":"2026-04-01T17:22:10.000Z","updated_at":"2026-04-03T03:14:15.000Z","call_transcript_id":null,"merged_into_ticket_id":null}],"next_cursor":"page-token","has_more":true}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}}},"/v1/tickets/search":{"get":{"operationId":"searchTickets","security":[{"bearerAuth":[]}],"tags":["tickets"],"summary":"Search tickets","description":"Find tickets by contact identity, subject, channel value, or message body. This search spans all statuses unless you provide a `status` filter.","parameters":[{"schema":{"type":"string","description":"Workspace to query.","example":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o"},"required":true,"name":"workspace_id","in":"query"},{"schema":{"type":"string","description":"Search value. Ticket metadata search covers subject, contact identity, and supported channel values. Use `field=message` to search message body text.","example":"joe@gmail.com"},"required":true,"name":"query","in":"query"},{"schema":{"type":"string","enum":["any","contact","subject","channel","message"],"description":"Search scope. `subject` restricts to the ticket subject, `contact` restricts to the linked contact identity, `channel` restricts to contact channel values, and `message` searches ticket transcripts.","example":"contact"},"required":false,"name":"field","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"string","enum":["open","new","pending","resolved","closed"],"description":"Optional ticket status filter. `open` searches actionable tickets (`new` + `pending`)."},"required":false,"name":"status","in":"query"},{"schema":{"type":"string"},"required":false,"name":"inbox_type_id","in":"query"},{"schema":{"type":"string","enum":["team","customer","third_party","none"]},"required":false,"name":"waiting_on","in":"query"},{"schema":{"type":"string"},"required":false,"name":"channel","in":"query"}],"responses":{"200":{"description":"Ticket search results","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"contact_id":{"type":"string"},"conversation_id":{"type":"string"},"channel":{"type":"string"},"status":{"type":"string","enum":["new","pending","resolved","closed","merged"]},"waiting_on":{"type":"string","nullable":true},"inbox_type_id":{"type":"string"},"subject":{"type":"string","nullable":true},"summary":{"type":"string","nullable":true},"ai_paused":{"type":"boolean"},"assignee":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"picture_url":{"type":"string","nullable":true}},"required":["id","name","email","picture_url"]},"follow_up_at":{"type":"string","nullable":true},"first_message_at":{"type":"string","nullable":true},"first_response_at":{"type":"string","nullable":true},"resolved_at":{"type":"string","nullable":true},"first_resolved_at":{"type":"string","nullable":true},"closed_at":{"type":"string","nullable":true},"time_to_first_response_ms":{"type":"number","nullable":true,"description":"Blended AI and human time to first response in milliseconds. Use ai_participated as the segmentation key."},"time_to_resolution_ms":{"type":"number","nullable":true,"description":"Blended AI and human time to resolution in milliseconds. Use ai_participated as the segmentation key."},"reopen_count":{"type":"number"},"ai_participated":{"type":"boolean"},"last_message_at":{"type":"string","nullable":true},"last_message_preview":{"type":"string","nullable":true},"created_at":{"type":"string"},"updated_at":{"type":"string"},"call_transcript_id":{"type":"string","nullable":true},"merged_into_ticket_id":{"type":"string","nullable":true}},"required":["id","workspace_id","contact_id","conversation_id","channel","status","waiting_on","inbox_type_id","subject","summary","ai_paused","assignee","follow_up_at","first_message_at","first_response_at","resolved_at","first_resolved_at","closed_at","time_to_first_response_ms","time_to_resolution_ms","reopen_count","ai_participated","last_message_at","last_message_preview","created_at","updated_at","call_transcript_id","merged_into_ticket_id"]}},"next_cursor":{"type":"string","nullable":true},"has_more":{"type":"boolean"}},"required":["data","next_cursor","has_more"],"description":"Cursor-paginated tickets response.","example":{"data":[{"id":"xd88mkfbmxgckpeyzs8m9r9d3d843me3","workspace_id":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o","contact_id":"ph77c0dy0mgdpzmqz6tesry8w184002s","conversation_id":"ph77c0dy0mgdpzmqz6tesry8w184002s","channel":"unthreaded_email","status":"new","waiting_on":"customer","inbox_type_id":"guest","subject":"Early check-in request","summary":"Guest asked to confirm whether early arrival is possible.","ai_paused":false,"assignee":{"id":"m48k3v7p2q9x5t1w8r6n4j0y3u2i5o7a","name":"Alex M","email":"alex@example.com","picture_url":null},"follow_up_at":null,"first_message_at":"2026-04-01T17:22:10.000Z","first_response_at":"2026-04-01T17:22:14.000Z","resolved_at":null,"first_resolved_at":null,"closed_at":null,"time_to_first_response_ms":4000,"time_to_resolution_ms":null,"reopen_count":0,"ai_participated":true,"last_message_at":"2026-04-03T03:14:15.000Z","last_message_preview":"Can I check in early?","created_at":"2026-04-01T17:22:10.000Z","updated_at":"2026-04-03T03:14:15.000Z","call_transcript_id":null,"merged_into_ticket_id":null}],"next_cursor":"page-token","has_more":true}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}}},"/v1/tickets/{id}":{"get":{"operationId":"getTicket","security":[{"bearerAuth":[]}],"tags":["tickets"],"summary":"Get ticket by id","description":"Returns metadata for a single ticket queue item, including status, waiting state, assignee, latest message preview, and thread linkage.","parameters":[{"schema":{"type":"string","description":"Ticket id.","example":"xd88mkfbmxgckpeyzs8m9r9d3d843me3"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"Optional workspace override. If omitted, Conduit resolves the ticket's workspace automatically.","example":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o"},"required":false,"name":"workspace_id","in":"query"}],"responses":{"200":{"description":"Ticket","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"contact_id":{"type":"string"},"conversation_id":{"type":"string"},"channel":{"type":"string"},"status":{"type":"string","enum":["new","pending","resolved","closed","merged"]},"waiting_on":{"type":"string","nullable":true},"inbox_type_id":{"type":"string"},"subject":{"type":"string","nullable":true},"summary":{"type":"string","nullable":true},"ai_paused":{"type":"boolean"},"assignee":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"picture_url":{"type":"string","nullable":true}},"required":["id","name","email","picture_url"]},"follow_up_at":{"type":"string","nullable":true},"first_message_at":{"type":"string","nullable":true},"first_response_at":{"type":"string","nullable":true},"resolved_at":{"type":"string","nullable":true},"first_resolved_at":{"type":"string","nullable":true},"closed_at":{"type":"string","nullable":true},"time_to_first_response_ms":{"type":"number","nullable":true,"description":"Blended AI and human time to first response in milliseconds. Use ai_participated as the segmentation key."},"time_to_resolution_ms":{"type":"number","nullable":true,"description":"Blended AI and human time to resolution in milliseconds. Use ai_participated as the segmentation key."},"reopen_count":{"type":"number"},"ai_participated":{"type":"boolean"},"last_message_at":{"type":"string","nullable":true},"last_message_preview":{"type":"string","nullable":true},"created_at":{"type":"string"},"updated_at":{"type":"string"},"call_transcript_id":{"type":"string","nullable":true},"merged_into_ticket_id":{"type":"string","nullable":true}},"required":["id","workspace_id","contact_id","conversation_id","channel","status","waiting_on","inbox_type_id","subject","summary","ai_paused","assignee","follow_up_at","first_message_at","first_response_at","resolved_at","first_resolved_at","closed_at","time_to_first_response_ms","time_to_resolution_ms","reopen_count","ai_participated","last_message_at","last_message_preview","created_at","updated_at","call_transcript_id","merged_into_ticket_id"]}},"required":["data"],"description":"Single ticket response.","example":{"data":{"id":"xd88mkfbmxgckpeyzs8m9r9d3d843me3","workspace_id":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o","contact_id":"ph77c0dy0mgdpzmqz6tesry8w184002s","conversation_id":"ph77c0dy0mgdpzmqz6tesry8w184002s","channel":"unthreaded_email","status":"new","waiting_on":"customer","inbox_type_id":"guest","subject":"Early check-in request","summary":"Guest asked to confirm whether early arrival is possible.","ai_paused":false,"assignee":{"id":"m48k3v7p2q9x5t1w8r6n4j0y3u2i5o7a","name":"Alex M","email":"alex@example.com","picture_url":null},"follow_up_at":null,"first_message_at":"2026-04-01T17:22:10.000Z","first_response_at":"2026-04-01T17:22:14.000Z","resolved_at":null,"first_resolved_at":null,"closed_at":null,"time_to_first_response_ms":4000,"time_to_resolution_ms":null,"reopen_count":0,"ai_participated":true,"last_message_at":"2026-04-03T03:14:15.000Z","last_message_preview":"Can I check in early?","created_at":"2026-04-01T17:22:10.000Z","updated_at":"2026-04-03T03:14:15.000Z","call_transcript_id":null,"merged_into_ticket_id":null}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}}},"/v1/tickets/{id}/messages":{"get":{"operationId":"listTicketMessages","security":[{"bearerAuth":[]}],"tags":["tickets"],"summary":"List messages for ticket","description":"Returns the paginated message history associated with a ticket's active thread.","parameters":[{"schema":{"type":"string","description":"Ticket id.","example":"xd88mkfbmxgckpeyzs8m9r9d3d843me3"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"Optional workspace override. If omitted, Conduit resolves the ticket's workspace automatically.","example":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o"},"required":false,"name":"workspace_id","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"string","enum":["asc","desc"]},"required":false,"name":"order","in":"query"}],"responses":{"200":{"description":"Ticket messages","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"ticket_id":{"type":"string"},"conversation_id":{"type":"string"},"channel":{"type":"string"},"body":{"type":"string"},"direction":{"type":"string","enum":["inbound","outbound"]},"is_sent_by_autopilot":{"type":"boolean","description":"True when Conduit's AI agent generated and sent this message. False for everything else, including operator replies, workflow sends, and messages ingested from a connected channel's own UI. Prefer this over inferring automation from `sender.user_id`: agent sends usually leave that null, but so do OTA-ingested host replies and workflow sends."},"author":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["contact"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["autopilot"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["user"]},"user_id":{"type":"string","nullable":true}},"required":["type","user_id"]}]},"status":{"type":"string"},"sent_at":{"type":"string"},"created_at":{"type":"string"},"sender":{"type":"object","properties":{"type":{"type":"string","enum":["contact","user","agent","workflow","external","unknown"]},"user_id":{"type":"string","nullable":true},"agent_id":{"type":"string","nullable":true},"workflow_id":{"type":"string","nullable":true},"external_id":{"type":"string","nullable":true},"name":{"type":"string","nullable":true}},"required":["type","user_id","agent_id","workflow_id","external_id","name"]},"attachments":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","description":"Convex storage URL for the attachment. Long-lived (no signature expiry); fetched directly without auth."},"content_type":{"type":"string"},"name":{"type":"string","nullable":true}},"required":["url","content_type","name"]}},"widget_website_url":{"type":"string","nullable":true}},"required":["id","workspace_id","ticket_id","conversation_id","channel","body","direction","is_sent_by_autopilot","author","status","sent_at","created_at","sender","attachments"]}},"next_cursor":{"type":"string","nullable":true},"has_more":{"type":"boolean"}},"required":["data","next_cursor","has_more"],"description":"Cursor-paginated ticket messages response.","example":{"data":[{"id":"yh7t5azsr0zpfpyf67vtce0j6n844y1e","workspace_id":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o","ticket_id":"xd88mkfbmxgckpeyzs8m9r9d3d843me3","conversation_id":"ph77c0dy0mgdpzmqz6tesry8w184002s","channel":"unthreaded_email","body":"Hi there, can you confirm check-in time?","direction":"outbound","is_sent_by_autopilot":false,"author":{"type":"user","user_id":"m48k3v7p2q9x5t1w8r6n4j0y3u2i5o7a"},"status":"sent","sent_at":"2026-04-03T03:15:02.000Z","created_at":"2026-04-03T03:15:04.000Z","sender":{"type":"user","user_id":"m48k3v7p2q9x5t1w8r6n4j0y3u2i5o7a","agent_id":null,"workflow_id":null,"external_id":null,"name":"Alex M"},"attachments":[{"url":"https://files.conduit.ai/storage/kg2abc123def456","content_type":"image/png","name":"screenshot.png"}]}],"next_cursor":null,"has_more":false}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}},"post":{"operationId":"sendTicketMessage","security":[{"bearerAuth":[]}],"tags":["tickets"],"summary":"Send message to ticket","description":"Sends a reply within the ticket's current active thread. Requires a token with write access.","parameters":[{"schema":{"type":"string","description":"Ticket id.","example":"xd88mkfbmxgckpeyzs8m9r9d3d843me3"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"Optional workspace override. If omitted, Conduit resolves the ticket's workspace automatically.","example":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o"},"required":false,"name":"workspace_id","in":"query"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"body":{"type":"string"},"attachments":{"type":"array","items":{"type":"object","properties":{"attachment_id":{"type":"string","minLength":1,"description":"Convex storage id returned by the signed upload PUT response. This is the attachment id used by message and note APIs."},"name":{"type":"string","minLength":1,"description":"Original filename to display."},"content_type":{"type":"string","minLength":1,"description":"MIME content type supplied when the file was uploaded."},"content_length":{"type":"integer","minimum":0,"description":"File size in bytes."}},"required":["attachment_id","name","content_type","content_length"],"description":"Uploaded attachment metadata. First call `POST /v1/attachments/upload-url`, PUT the bytes to `upload_url`, then pass the PUT response `storageId` as `attachment_id`. Email delivers attachments directly. SMS and WhatsApp delivery depends on the configured Twilio/Linq sender and carrier media support; unsupported channels reject attachments.","example":{"attachment_id":"kg2a8d8w8zv1m9q9f9h7e3b2n97j6x2c","name":"failed-contacts.csv","content_type":"text/csv","content_length":18432}},"maxItems":10}},"description":"Request body for sending a message into an existing ticket thread. Attachments are uploaded first via `POST /v1/attachments/upload-url`; pass the PUT response `storageId` as `attachment_id`. Email supports file attachments. SMS and WhatsApp can deliver media only when the configured sender/provider supports the file type and size.","example":{"body":"Hi there, can you confirm check-in time?","attachments":[{"attachment_id":"kg2a8d8w8zv1m9q9f9h7e3b2n97j6x2c","name":"failed-contacts.csv","content_type":"text/csv","content_length":18432}]}}}}},"responses":{"201":{"description":"Ticket message sent","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","nullable":true},"workspace_id":{"type":"string"},"conversation_id":{"type":"string"},"ticket_id":{"type":"string","nullable":true},"channel":{"type":"string","nullable":true},"status":{"type":"string","enum":["sent"]}},"required":["id","workspace_id","conversation_id","channel","status"]}},"required":["data"],"description":"Result returned after a message is accepted for delivery.","example":{"data":{"id":"yh7t5azsr0zpfpyf67vtce0j6n844y1e","workspace_id":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o","conversation_id":"ph77c0dy0mgdpzmqz6tesry8w184002s","ticket_id":null,"channel":"unthreaded_email","status":"sent"}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"409":{"description":"Ticket cannot be replied to","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}}},"/v1/tickets/{id}/resolve":{"post":{"operationId":"resolveTicket","security":[{"bearerAuth":[]}],"tags":["tickets"],"summary":"Resolve ticket","description":"Resolves a ticket using Conduit's ticket lifecycle rules. If this is the contact's last active ticket, the contact is marked done.","parameters":[{"schema":{"type":"string","description":"Ticket id.","example":"xd88mkfbmxgckpeyzs8m9r9d3d843me3"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"Optional workspace override. If omitted, Conduit resolves the ticket's workspace automatically.","example":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o"},"required":false,"name":"workspace_id","in":"query"}],"responses":{"200":{"description":"Resolved ticket","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"contact_id":{"type":"string"},"conversation_id":{"type":"string"},"channel":{"type":"string"},"status":{"type":"string","enum":["new","pending","resolved","closed","merged"]},"waiting_on":{"type":"string","nullable":true},"inbox_type_id":{"type":"string"},"subject":{"type":"string","nullable":true},"summary":{"type":"string","nullable":true},"ai_paused":{"type":"boolean"},"assignee":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"picture_url":{"type":"string","nullable":true}},"required":["id","name","email","picture_url"]},"follow_up_at":{"type":"string","nullable":true},"first_message_at":{"type":"string","nullable":true},"first_response_at":{"type":"string","nullable":true},"resolved_at":{"type":"string","nullable":true},"first_resolved_at":{"type":"string","nullable":true},"closed_at":{"type":"string","nullable":true},"time_to_first_response_ms":{"type":"number","nullable":true,"description":"Blended AI and human time to first response in milliseconds. Use ai_participated as the segmentation key."},"time_to_resolution_ms":{"type":"number","nullable":true,"description":"Blended AI and human time to resolution in milliseconds. Use ai_participated as the segmentation key."},"reopen_count":{"type":"number"},"ai_participated":{"type":"boolean"},"last_message_at":{"type":"string","nullable":true},"last_message_preview":{"type":"string","nullable":true},"created_at":{"type":"string"},"updated_at":{"type":"string"},"call_transcript_id":{"type":"string","nullable":true},"merged_into_ticket_id":{"type":"string","nullable":true}},"required":["id","workspace_id","contact_id","conversation_id","channel","status","waiting_on","inbox_type_id","subject","summary","ai_paused","assignee","follow_up_at","first_message_at","first_response_at","resolved_at","first_resolved_at","closed_at","time_to_first_response_ms","time_to_resolution_ms","reopen_count","ai_participated","last_message_at","last_message_preview","created_at","updated_at","call_transcript_id","merged_into_ticket_id"]}},"required":["data"],"description":"Single ticket response.","example":{"data":{"id":"xd88mkfbmxgckpeyzs8m9r9d3d843me3","workspace_id":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o","contact_id":"ph77c0dy0mgdpzmqz6tesry8w184002s","conversation_id":"ph77c0dy0mgdpzmqz6tesry8w184002s","channel":"unthreaded_email","status":"new","waiting_on":"customer","inbox_type_id":"guest","subject":"Early check-in request","summary":"Guest asked to confirm whether early arrival is possible.","ai_paused":false,"assignee":{"id":"m48k3v7p2q9x5t1w8r6n4j0y3u2i5o7a","name":"Alex M","email":"alex@example.com","picture_url":null},"follow_up_at":null,"first_message_at":"2026-04-01T17:22:10.000Z","first_response_at":"2026-04-01T17:22:14.000Z","resolved_at":null,"first_resolved_at":null,"closed_at":null,"time_to_first_response_ms":4000,"time_to_resolution_ms":null,"reopen_count":0,"ai_participated":true,"last_message_at":"2026-04-03T03:14:15.000Z","last_message_preview":"Can I check in early?","created_at":"2026-04-01T17:22:10.000Z","updated_at":"2026-04-03T03:14:15.000Z","call_transcript_id":null,"merged_into_ticket_id":null}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"409":{"description":"Ticket cannot be resolved","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}}},"/v1/tickets/{id}/close":{"post":{"operationId":"closeTicket","security":[{"bearerAuth":[]}],"tags":["tickets"],"summary":"Close ticket","description":"Closes a resolved ticket. Open or pending tickets must be resolved before they can be closed.","parameters":[{"schema":{"type":"string","description":"Ticket id.","example":"xd88mkfbmxgckpeyzs8m9r9d3d843me3"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"Optional workspace override. If omitted, Conduit resolves the ticket's workspace automatically.","example":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o"},"required":false,"name":"workspace_id","in":"query"}],"responses":{"200":{"description":"Closed ticket","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"contact_id":{"type":"string"},"conversation_id":{"type":"string"},"channel":{"type":"string"},"status":{"type":"string","enum":["new","pending","resolved","closed","merged"]},"waiting_on":{"type":"string","nullable":true},"inbox_type_id":{"type":"string"},"subject":{"type":"string","nullable":true},"summary":{"type":"string","nullable":true},"ai_paused":{"type":"boolean"},"assignee":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"picture_url":{"type":"string","nullable":true}},"required":["id","name","email","picture_url"]},"follow_up_at":{"type":"string","nullable":true},"first_message_at":{"type":"string","nullable":true},"first_response_at":{"type":"string","nullable":true},"resolved_at":{"type":"string","nullable":true},"first_resolved_at":{"type":"string","nullable":true},"closed_at":{"type":"string","nullable":true},"time_to_first_response_ms":{"type":"number","nullable":true,"description":"Blended AI and human time to first response in milliseconds. Use ai_participated as the segmentation key."},"time_to_resolution_ms":{"type":"number","nullable":true,"description":"Blended AI and human time to resolution in milliseconds. Use ai_participated as the segmentation key."},"reopen_count":{"type":"number"},"ai_participated":{"type":"boolean"},"last_message_at":{"type":"string","nullable":true},"last_message_preview":{"type":"string","nullable":true},"created_at":{"type":"string"},"updated_at":{"type":"string"},"call_transcript_id":{"type":"string","nullable":true},"merged_into_ticket_id":{"type":"string","nullable":true}},"required":["id","workspace_id","contact_id","conversation_id","channel","status","waiting_on","inbox_type_id","subject","summary","ai_paused","assignee","follow_up_at","first_message_at","first_response_at","resolved_at","first_resolved_at","closed_at","time_to_first_response_ms","time_to_resolution_ms","reopen_count","ai_participated","last_message_at","last_message_preview","created_at","updated_at","call_transcript_id","merged_into_ticket_id"]}},"required":["data"],"description":"Single ticket response.","example":{"data":{"id":"xd88mkfbmxgckpeyzs8m9r9d3d843me3","workspace_id":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o","contact_id":"ph77c0dy0mgdpzmqz6tesry8w184002s","conversation_id":"ph77c0dy0mgdpzmqz6tesry8w184002s","channel":"unthreaded_email","status":"new","waiting_on":"customer","inbox_type_id":"guest","subject":"Early check-in request","summary":"Guest asked to confirm whether early arrival is possible.","ai_paused":false,"assignee":{"id":"m48k3v7p2q9x5t1w8r6n4j0y3u2i5o7a","name":"Alex M","email":"alex@example.com","picture_url":null},"follow_up_at":null,"first_message_at":"2026-04-01T17:22:10.000Z","first_response_at":"2026-04-01T17:22:14.000Z","resolved_at":null,"first_resolved_at":null,"closed_at":null,"time_to_first_response_ms":4000,"time_to_resolution_ms":null,"reopen_count":0,"ai_participated":true,"last_message_at":"2026-04-03T03:14:15.000Z","last_message_preview":"Can I check in early?","created_at":"2026-04-01T17:22:10.000Z","updated_at":"2026-04-03T03:14:15.000Z","call_transcript_id":null,"merged_into_ticket_id":null}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"409":{"description":"Ticket cannot be closed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}}},"/v1/tickets/{id}/reopen":{"post":{"operationId":"reopenTicket","security":[{"bearerAuth":[]}],"tags":["tickets"],"summary":"Reopen ticket","description":"Reopens a resolved ticket and moves the contact back to todo if needed.","parameters":[{"schema":{"type":"string","description":"Ticket id.","example":"xd88mkfbmxgckpeyzs8m9r9d3d843me3"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"Optional workspace override. If omitted, Conduit resolves the ticket's workspace automatically.","example":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o"},"required":false,"name":"workspace_id","in":"query"}],"responses":{"200":{"description":"Reopened ticket","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"contact_id":{"type":"string"},"conversation_id":{"type":"string"},"channel":{"type":"string"},"status":{"type":"string","enum":["new","pending","resolved","closed","merged"]},"waiting_on":{"type":"string","nullable":true},"inbox_type_id":{"type":"string"},"subject":{"type":"string","nullable":true},"summary":{"type":"string","nullable":true},"ai_paused":{"type":"boolean"},"assignee":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"picture_url":{"type":"string","nullable":true}},"required":["id","name","email","picture_url"]},"follow_up_at":{"type":"string","nullable":true},"first_message_at":{"type":"string","nullable":true},"first_response_at":{"type":"string","nullable":true},"resolved_at":{"type":"string","nullable":true},"first_resolved_at":{"type":"string","nullable":true},"closed_at":{"type":"string","nullable":true},"time_to_first_response_ms":{"type":"number","nullable":true,"description":"Blended AI and human time to first response in milliseconds. Use ai_participated as the segmentation key."},"time_to_resolution_ms":{"type":"number","nullable":true,"description":"Blended AI and human time to resolution in milliseconds. Use ai_participated as the segmentation key."},"reopen_count":{"type":"number"},"ai_participated":{"type":"boolean"},"last_message_at":{"type":"string","nullable":true},"last_message_preview":{"type":"string","nullable":true},"created_at":{"type":"string"},"updated_at":{"type":"string"},"call_transcript_id":{"type":"string","nullable":true},"merged_into_ticket_id":{"type":"string","nullable":true}},"required":["id","workspace_id","contact_id","conversation_id","channel","status","waiting_on","inbox_type_id","subject","summary","ai_paused","assignee","follow_up_at","first_message_at","first_response_at","resolved_at","first_resolved_at","closed_at","time_to_first_response_ms","time_to_resolution_ms","reopen_count","ai_participated","last_message_at","last_message_preview","created_at","updated_at","call_transcript_id","merged_into_ticket_id"]}},"required":["data"],"description":"Single ticket response.","example":{"data":{"id":"xd88mkfbmxgckpeyzs8m9r9d3d843me3","workspace_id":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o","contact_id":"ph77c0dy0mgdpzmqz6tesry8w184002s","conversation_id":"ph77c0dy0mgdpzmqz6tesry8w184002s","channel":"unthreaded_email","status":"new","waiting_on":"customer","inbox_type_id":"guest","subject":"Early check-in request","summary":"Guest asked to confirm whether early arrival is possible.","ai_paused":false,"assignee":{"id":"m48k3v7p2q9x5t1w8r6n4j0y3u2i5o7a","name":"Alex M","email":"alex@example.com","picture_url":null},"follow_up_at":null,"first_message_at":"2026-04-01T17:22:10.000Z","first_response_at":"2026-04-01T17:22:14.000Z","resolved_at":null,"first_resolved_at":null,"closed_at":null,"time_to_first_response_ms":4000,"time_to_resolution_ms":null,"reopen_count":0,"ai_participated":true,"last_message_at":"2026-04-03T03:14:15.000Z","last_message_preview":"Can I check in early?","created_at":"2026-04-01T17:22:10.000Z","updated_at":"2026-04-03T03:14:15.000Z","call_transcript_id":null,"merged_into_ticket_id":null}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"409":{"description":"Ticket cannot be reopened","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}}},"/v1/tickets/{id}/notes":{"get":{"operationId":"listTicketNotes","security":[{"bearerAuth":[]}],"tags":["tickets"],"summary":"List ticket notes","description":"Returns internal notes attached to a ticket.","parameters":[{"schema":{"type":"string","description":"Ticket id.","example":"xd88mkfbmxgckpeyzs8m9r9d3d843me3"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"Optional workspace override. If omitted, Conduit resolves the ticket's workspace automatically.","example":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o"},"required":false,"name":"workspace_id","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"string","enum":["asc","desc"]},"required":false,"name":"order","in":"query"}],"responses":{"200":{"description":"Ticket notes","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"ticket_id":{"type":"string"},"contact_id":{"type":"string"},"body":{"type":"string"},"author":{"type":"object","properties":{"user_id":{"type":"string","nullable":true},"name":{"type":"string","nullable":true},"email":{"type":"string","nullable":true},"picture_url":{"type":"string","nullable":true}},"required":["user_id","name","email","picture_url"]},"created_at":{"type":"string"},"updated_at":{"type":"string","nullable":true},"attachments":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","description":"Convex storage URL for the attachment. Long-lived (no signature expiry); fetched directly without auth."},"content_type":{"type":"string"},"name":{"type":"string","nullable":true}},"required":["url","content_type","name"]}}},"required":["id","workspace_id","ticket_id","contact_id","body","author","created_at","updated_at","attachments"]}},"next_cursor":{"type":"string","nullable":true},"has_more":{"type":"boolean"}},"required":["data","next_cursor","has_more"],"description":"Cursor-paginated ticket notes response.","example":{"data":[{"id":"nt77c0dy0mgdpzmqz6tesry8w184002s","workspace_id":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o","ticket_id":"xd88mkfbmxgckpeyzs8m9r9d3d843me3","contact_id":"ph77c0dy0mgdpzmqz6tesry8w184002s","body":"Guest asked for a manager follow-up tomorrow.","author":{"user_id":"m48k3v7p2q9x5t1w8r6n4j0y3u2i5o7a","name":"Alex M","email":"alex@example.com","picture_url":null},"created_at":"2026-04-03T03:15:04.000Z","updated_at":null,"attachments":[{"url":"https://example.convex.cloud/api/storage/file.csv","content_type":"text/csv","name":"failed-contacts.csv"}]}],"next_cursor":null,"has_more":false}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}},"post":{"operationId":"createTicketNote","security":[{"bearerAuth":[]}],"tags":["tickets"],"summary":"Create ticket note","description":"Creates an internal note on a ticket. Requires a token with write access.","parameters":[{"schema":{"type":"string","description":"Ticket id.","example":"xd88mkfbmxgckpeyzs8m9r9d3d843me3"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"Optional workspace override. If omitted, Conduit resolves the ticket's workspace automatically.","example":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o"},"required":false,"name":"workspace_id","in":"query"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"body":{"type":"string"},"mention_user_ids":{"type":"array","items":{"type":"string"},"maxItems":25},"attachments":{"type":"array","items":{"type":"object","properties":{"attachment_id":{"type":"string","minLength":1,"description":"Convex storage id returned by the signed upload PUT response. This is the attachment id used by message and note APIs."},"name":{"type":"string","minLength":1,"description":"Original filename to display."},"content_type":{"type":"string","minLength":1,"description":"MIME content type supplied when the file was uploaded."},"content_length":{"type":"integer","minimum":0,"description":"File size in bytes."}},"required":["attachment_id","name","content_type","content_length"],"description":"Uploaded attachment metadata. First call `POST /v1/attachments/upload-url`, PUT the bytes to `upload_url`, then pass the PUT response `storageId` as `attachment_id`. Email delivers attachments directly. SMS and WhatsApp delivery depends on the configured Twilio/Linq sender and carrier media support; unsupported channels reject attachments.","example":{"attachment_id":"kg2a8d8w8zv1m9q9f9h7e3b2n97j6x2c","name":"failed-contacts.csv","content_type":"text/csv","content_length":18432}},"maxItems":10}},"description":"Request body for creating an internal ticket note.","example":{"body":"Guest asked for a manager follow-up tomorrow.","mention_user_ids":["m48k3v7p2q9x5t1w8r6n4j0y3u2i5o7a"],"attachments":[{"attachment_id":"kg2a8d8w8zv1m9q9f9h7e3b2n97j6x2c","name":"failed-contacts.csv","content_type":"text/csv","content_length":18432}]}}}}},"responses":{"201":{"description":"Created ticket note","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"ticket_id":{"type":"string"},"contact_id":{"type":"string"},"body":{"type":"string"},"author":{"type":"object","properties":{"user_id":{"type":"string","nullable":true},"name":{"type":"string","nullable":true},"email":{"type":"string","nullable":true},"picture_url":{"type":"string","nullable":true}},"required":["user_id","name","email","picture_url"]},"created_at":{"type":"string"},"updated_at":{"type":"string","nullable":true},"attachments":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","description":"Convex storage URL for the attachment. Long-lived (no signature expiry); fetched directly without auth."},"content_type":{"type":"string"},"name":{"type":"string","nullable":true}},"required":["url","content_type","name"]}}},"required":["id","workspace_id","ticket_id","contact_id","body","author","created_at","updated_at","attachments"]}},"required":["data"],"description":"Single ticket note response.","example":{"data":{"id":"nt77c0dy0mgdpzmqz6tesry8w184002s","workspace_id":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o","ticket_id":"xd88mkfbmxgckpeyzs8m9r9d3d843me3","contact_id":"ph77c0dy0mgdpzmqz6tesry8w184002s","body":"Guest asked for a manager follow-up tomorrow.","author":{"user_id":"m48k3v7p2q9x5t1w8r6n4j0y3u2i5o7a","name":"Alex M","email":"alex@example.com","picture_url":null},"created_at":"2026-04-03T03:15:04.000Z","updated_at":null,"attachments":[{"url":"https://example.convex.cloud/api/storage/file.csv","content_type":"text/csv","name":"failed-contacts.csv"}]}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}}},"/v1/tickets/{id}/notes/{note_id}":{"get":{"operationId":"getTicketNote","security":[{"bearerAuth":[]}],"tags":["tickets"],"summary":"Get ticket note","description":"Returns a single internal note attached to a ticket.","parameters":[{"schema":{"type":"string","description":"Ticket id.","example":"xd88mkfbmxgckpeyzs8m9r9d3d843me3"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"Ticket note id.","example":"nt77c0dy0mgdpzmqz6tesry8w184002s"},"required":true,"name":"note_id","in":"path"},{"schema":{"type":"string","description":"Optional workspace override. If omitted, Conduit resolves the ticket's workspace automatically.","example":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o"},"required":false,"name":"workspace_id","in":"query"}],"responses":{"200":{"description":"Ticket note","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"ticket_id":{"type":"string"},"contact_id":{"type":"string"},"body":{"type":"string"},"author":{"type":"object","properties":{"user_id":{"type":"string","nullable":true},"name":{"type":"string","nullable":true},"email":{"type":"string","nullable":true},"picture_url":{"type":"string","nullable":true}},"required":["user_id","name","email","picture_url"]},"created_at":{"type":"string"},"updated_at":{"type":"string","nullable":true},"attachments":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","description":"Convex storage URL for the attachment. Long-lived (no signature expiry); fetched directly without auth."},"content_type":{"type":"string"},"name":{"type":"string","nullable":true}},"required":["url","content_type","name"]}}},"required":["id","workspace_id","ticket_id","contact_id","body","author","created_at","updated_at","attachments"]}},"required":["data"],"description":"Single ticket note response.","example":{"data":{"id":"nt77c0dy0mgdpzmqz6tesry8w184002s","workspace_id":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o","ticket_id":"xd88mkfbmxgckpeyzs8m9r9d3d843me3","contact_id":"ph77c0dy0mgdpzmqz6tesry8w184002s","body":"Guest asked for a manager follow-up tomorrow.","author":{"user_id":"m48k3v7p2q9x5t1w8r6n4j0y3u2i5o7a","name":"Alex M","email":"alex@example.com","picture_url":null},"created_at":"2026-04-03T03:15:04.000Z","updated_at":null,"attachments":[{"url":"https://example.convex.cloud/api/storage/file.csv","content_type":"text/csv","name":"failed-contacts.csv"}]}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}},"patch":{"operationId":"updateTicketNote","security":[{"bearerAuth":[]}],"tags":["tickets"],"summary":"Update ticket note","description":"Updates an internal note on a ticket. Requires a token with write access.","parameters":[{"schema":{"type":"string","description":"Ticket id.","example":"xd88mkfbmxgckpeyzs8m9r9d3d843me3"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"Ticket note id.","example":"nt77c0dy0mgdpzmqz6tesry8w184002s"},"required":true,"name":"note_id","in":"path"},{"schema":{"type":"string","description":"Optional workspace override. If omitted, Conduit resolves the ticket's workspace automatically.","example":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o"},"required":false,"name":"workspace_id","in":"query"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"body":{"type":"string","minLength":1}},"required":["body"],"description":"Request body for updating an internal ticket note.","example":{"body":"Guest asked for a manager follow-up tomorrow."}}}}},"responses":{"200":{"description":"Updated ticket note","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"ticket_id":{"type":"string"},"contact_id":{"type":"string"},"body":{"type":"string"},"author":{"type":"object","properties":{"user_id":{"type":"string","nullable":true},"name":{"type":"string","nullable":true},"email":{"type":"string","nullable":true},"picture_url":{"type":"string","nullable":true}},"required":["user_id","name","email","picture_url"]},"created_at":{"type":"string"},"updated_at":{"type":"string","nullable":true},"attachments":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","description":"Convex storage URL for the attachment. Long-lived (no signature expiry); fetched directly without auth."},"content_type":{"type":"string"},"name":{"type":"string","nullable":true}},"required":["url","content_type","name"]}}},"required":["id","workspace_id","ticket_id","contact_id","body","author","created_at","updated_at","attachments"]}},"required":["data"],"description":"Single ticket note response.","example":{"data":{"id":"nt77c0dy0mgdpzmqz6tesry8w184002s","workspace_id":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o","ticket_id":"xd88mkfbmxgckpeyzs8m9r9d3d843me3","contact_id":"ph77c0dy0mgdpzmqz6tesry8w184002s","body":"Guest asked for a manager follow-up tomorrow.","author":{"user_id":"m48k3v7p2q9x5t1w8r6n4j0y3u2i5o7a","name":"Alex M","email":"alex@example.com","picture_url":null},"created_at":"2026-04-03T03:15:04.000Z","updated_at":null,"attachments":[{"url":"https://example.convex.cloud/api/storage/file.csv","content_type":"text/csv","name":"failed-contacts.csv"}]}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}},"delete":{"operationId":"deleteTicketNote","security":[{"bearerAuth":[]}],"tags":["tickets"],"summary":"Delete ticket note","description":"Deletes an internal note from a ticket. Requires a token with write access.","parameters":[{"schema":{"type":"string","description":"Ticket id.","example":"xd88mkfbmxgckpeyzs8m9r9d3d843me3"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"Ticket note id.","example":"nt77c0dy0mgdpzmqz6tesry8w184002s"},"required":true,"name":"note_id","in":"path"},{"schema":{"type":"string","description":"Optional workspace override. If omitted, Conduit resolves the ticket's workspace automatically.","example":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o"},"required":false,"name":"workspace_id","in":"query"}],"responses":{"200":{"description":"Deleted ticket note","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]}},"required":["success"],"description":"Ticket note deletion response.","example":{"success":true}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}}},"/v1/workspaces/{id}/workflows":{"get":{"operationId":"listWorkflows","security":[{"bearerAuth":[]}],"tags":["workflows"],"summary":"List workflows","description":"Returns paginated workflow summaries for a workspace. Defaults to the latest version per workflow; pass `all_versions=true` to include version history.","parameters":[{"schema":{"type":"string","description":"Workspace identifier.","example":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o"},"required":true,"name":"id","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":100},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"string","enum":["true","false"],"description":"When `true`, include every stored version of each workflow. Defaults to the latest version per workflow.","example":"false"},"required":false,"name":"all_versions","in":"query"}],"responses":{"200":{"description":"Workflows","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"workflow_id":{"type":"string"},"master_id":{"type":"string","nullable":true},"folder_id":{"type":"string","nullable":true},"name":{"type":"string"},"enabled":{"type":"boolean"},"status":{"type":"string"},"version":{"type":"number"},"is_latest":{"type":"boolean"},"color":{"type":"string"},"trigger_summary":{"type":"string","nullable":true},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["workflow_id","master_id","folder_id","name","enabled","status","version","is_latest","color","trigger_summary","created_at","updated_at"]}},"next_cursor":{"type":"string","nullable":true},"has_more":{"type":"boolean"}},"required":["data","next_cursor","has_more"],"description":"Cursor-paginated workflows response.","example":{"data":[{"workflow_id":"k17demo8f8x7c9v0n2q4r6t8y1u3i5o","master_id":"m92demo8f8x7c9v0n2q4r6t8y1u3i5o","folder_id":"wx7demo8f8x7c9v0n2q4r6t8y1u3i5o","name":"New reservation welcome","enabled":true,"status":"ACTIVE","version":3,"is_latest":true,"color":"#2563eb","trigger_summary":"RESERVATION_NEW","created_at":"2026-04-01T17:22:10.000Z","updated_at":"2026-04-03T03:14:15.000Z"}],"next_cursor":"page-token","has_more":true}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}}},"/v1/workflows/schema":{"get":{"operationId":"getWorkflowSchema","security":[{"bearerAuth":[]}],"tags":["workflows"],"summary":"Get workflow definition schema","description":"Returns a JSON Schema describing a valid workflow definition input: every step type with its config schema, every trigger type with its config schema, and the graph rules. Call this before creating or updating a workflow.","responses":{"200":{"description":"Workflow definition JSON Schema","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","additionalProperties":{"nullable":true},"description":"JSON Schema document describing a valid workflow definition input: every step type with its config schema, every trigger type with its config schema, and the graph rules."}},"required":["data"],"description":"JSON Schema for a workflow definition input, derived from the workflow step and trigger validators. Call this before create_workflow / update_workflow to construct a valid definition."}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}}},"/v1/workflows":{"post":{"operationId":"createWorkflow","security":[{"bearerAuth":[]}],"tags":["workflows"],"summary":"Create workflow","description":"Creates a new workflow (master + version 1) from a full definition. Created as DRAFT unless `activate` is true. Returns the same shape as GET /v1/workflows/{id}.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"workspace_id":{"type":"string","description":"Workspace to create the workflow in"},"name":{"type":"string","minLength":1,"description":"Workflow name"},"description":{"type":"string","nullable":true},"color":{"type":"string","description":"Hex color for the workflow, e.g. #2563eb"},"trigger":{"type":"object","nullable":true,"properties":{"type":{"type":"string","description":"Trigger type. See get_workflow_schema."},"config":{"type":"object","additionalProperties":{"nullable":true},"description":"Trigger configuration for this trigger type."}},"required":["type","config"],"description":"The workflow trigger, or null for a trigger-less workflow."},"first_step_id":{"type":"string","nullable":true,"description":"Id of the entry step, or null."},"steps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Caller-assigned step id. `next_step_id` and branch pointers reference these ids; server rewrites them to stored ids."},"type":{"type":"string","description":"Step type. See get_workflow_schema for the set."},"description":{"type":"string","nullable":true},"next_step_id":{"type":"string","nullable":true,"description":"Id of the next step in the chain, or null for a leaf."},"position":{"type":"object","nullable":true,"properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"description":"Optional editor canvas position."},"config":{"type":"object","additionalProperties":{"nullable":true},"description":"Step configuration for this step type (the `config` object get_workflow returns). Call get_workflow_schema for the per-type shape."}},"required":["id","type","config"]},"maxItems":1000,"description":"The step graph."},"activate":{"type":"boolean","description":"When true, the version goes live (status ACTIVE). Defaults to false (DRAFT)."}},"required":["workspace_id","name","steps"],"description":"Create a new workflow (master + version 1) from a full definition. Created as DRAFT unless activate is true."}}}},"responses":{"201":{"description":"Created workflow definition","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"workflow_id":{"type":"string"},"master_id":{"type":"string","nullable":true},"folder_id":{"type":"string","nullable":true},"name":{"type":"string"},"enabled":{"type":"boolean"},"status":{"type":"string"},"version":{"type":"number"},"is_latest":{"type":"boolean"},"color":{"type":"string"},"trigger_summary":{"type":"string","nullable":true},"created_at":{"type":"string"},"updated_at":{"type":"string"},"description":{"type":"string","nullable":true},"trigger":{"type":"object","nullable":true,"properties":{"type":{"type":"string"},"config":{"type":"object","additionalProperties":{"nullable":true}}},"required":["type","config"]},"first_step_id":{"type":"string","nullable":true},"steps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"description":{"type":"string","nullable":true},"position":{"type":"object","nullable":true,"properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"]},"next_step_id":{"type":"string","nullable":true},"config":{"type":"object","additionalProperties":{"nullable":true},"description":"Step configuration as stored by the Workflows editor, with any embedded credential material (e.g. HTTP auth header values) redacted."}},"required":["id","type","description","position","next_step_id","config"]}},"edges":{"type":"array","items":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"},"kind":{"type":"string","enum":["next","condition_true","condition_false","filter","branch_true","branch_false"]}},"required":["from","to","kind"]}}},"required":["workflow_id","master_id","folder_id","name","enabled","status","version","is_latest","color","trigger_summary","created_at","updated_at","description","trigger","first_step_id","steps","edges"]}},"required":["data"],"description":"Full workflow definition: metadata, trigger, and the step graph (steps + derived edges) as the Workflows editor stores it. Embedded secrets are redacted."}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}}},"/v1/workflows/{id}":{"put":{"operationId":"updateWorkflow","security":[{"bearerAuth":[]}],"tags":["workflows"],"summary":"Update workflow","description":"Replaces a workflow definition by creating a new version under the same workflow (the old version is untouched). New version is DRAFT unless `activate` is true. Config fields whose value is the redaction placeholder are preserved from the current version. Supply Idempotency-Key to make retries return the originally-created version; reusing a key with a different request returns 409.","parameters":[{"schema":{"type":"string","description":"Workflow (version) identifier.","example":"k17demo8f8x7c9v0n2q4r6t8y1u3i5o"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":512,"description":"Optional retry key. Repeating the same workflow update returns the originally-created version; reusing the key with a different request returns 409.","example":"workflow-update-01J0K2M4N6P8Q0R2S4T6V8W0XY"},"required":false,"name":"idempotency-key","in":"header"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"workspace_id":{"type":"string","description":"Optional workspace override. Omit to resolve the workflow's workspace automatically."},"name":{"type":"string","minLength":1,"description":"Workflow name"},"description":{"type":"string","nullable":true},"color":{"type":"string","description":"Hex color for the workflow, e.g. #2563eb"},"trigger":{"type":"object","nullable":true,"properties":{"type":{"type":"string","description":"Trigger type. See get_workflow_schema."},"config":{"type":"object","additionalProperties":{"nullable":true},"description":"Trigger configuration for this trigger type."}},"required":["type","config"],"description":"The workflow trigger, or null for a trigger-less workflow."},"first_step_id":{"type":"string","nullable":true,"description":"Id of the entry step, or null."},"steps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Caller-assigned step id. `next_step_id` and branch pointers reference these ids; server rewrites them to stored ids."},"type":{"type":"string","description":"Step type. See get_workflow_schema for the set."},"description":{"type":"string","nullable":true},"next_step_id":{"type":"string","nullable":true,"description":"Id of the next step in the chain, or null for a leaf."},"position":{"type":"object","nullable":true,"properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"description":"Optional editor canvas position."},"config":{"type":"object","additionalProperties":{"nullable":true},"description":"Step configuration for this step type (the `config` object get_workflow returns). Call get_workflow_schema for the per-type shape."}},"required":["id","type","config"]},"maxItems":1000,"description":"The step graph."},"activate":{"type":"boolean","description":"When true, the version goes live (status ACTIVE). Defaults to false (DRAFT)."}},"required":["name","steps"],"description":"Replace a workflow definition by creating a new version under the same workflow. New version is DRAFT unless activate is true."}}}},"responses":{"200":{"description":"Updated workflow definition (new version)","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"workflow_id":{"type":"string"},"master_id":{"type":"string","nullable":true},"folder_id":{"type":"string","nullable":true},"name":{"type":"string"},"enabled":{"type":"boolean"},"status":{"type":"string"},"version":{"type":"number"},"is_latest":{"type":"boolean"},"color":{"type":"string"},"trigger_summary":{"type":"string","nullable":true},"created_at":{"type":"string"},"updated_at":{"type":"string"},"description":{"type":"string","nullable":true},"trigger":{"type":"object","nullable":true,"properties":{"type":{"type":"string"},"config":{"type":"object","additionalProperties":{"nullable":true}}},"required":["type","config"]},"first_step_id":{"type":"string","nullable":true},"steps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"description":{"type":"string","nullable":true},"position":{"type":"object","nullable":true,"properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"]},"next_step_id":{"type":"string","nullable":true},"config":{"type":"object","additionalProperties":{"nullable":true},"description":"Step configuration as stored by the Workflows editor, with any embedded credential material (e.g. HTTP auth header values) redacted."}},"required":["id","type","description","position","next_step_id","config"]}},"edges":{"type":"array","items":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"},"kind":{"type":"string","enum":["next","condition_true","condition_false","filter","branch_true","branch_false"]}},"required":["from","to","kind"]}}},"required":["workflow_id","master_id","folder_id","name","enabled","status","version","is_latest","color","trigger_summary","created_at","updated_at","description","trigger","first_step_id","steps","edges"]}},"required":["data"],"description":"Full workflow definition: metadata, trigger, and the step graph (steps + derived edges) as the Workflows editor stores it. Embedded secrets are redacted."}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"409":{"description":"Workflow version conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}},"get":{"operationId":"getWorkflow","security":[{"bearerAuth":[]}],"tags":["workflows"],"summary":"Get workflow definition","description":"Returns a single workflow's full definition: metadata, trigger, and the step graph (steps + derived edges) as the Workflows editor stores it. Embedded credential material is redacted.","parameters":[{"schema":{"type":"string","description":"Workflow (version) identifier.","example":"k17demo8f8x7c9v0n2q4r6t8y1u3i5o"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"Optional workspace override. If omitted, Conduit resolves the workflow's workspace automatically.","example":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o"},"required":false,"name":"workspace_id","in":"query"}],"responses":{"200":{"description":"Workflow definition","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"workflow_id":{"type":"string"},"master_id":{"type":"string","nullable":true},"folder_id":{"type":"string","nullable":true},"name":{"type":"string"},"enabled":{"type":"boolean"},"status":{"type":"string"},"version":{"type":"number"},"is_latest":{"type":"boolean"},"color":{"type":"string"},"trigger_summary":{"type":"string","nullable":true},"created_at":{"type":"string"},"updated_at":{"type":"string"},"description":{"type":"string","nullable":true},"trigger":{"type":"object","nullable":true,"properties":{"type":{"type":"string"},"config":{"type":"object","additionalProperties":{"nullable":true}}},"required":["type","config"]},"first_step_id":{"type":"string","nullable":true},"steps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"description":{"type":"string","nullable":true},"position":{"type":"object","nullable":true,"properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"]},"next_step_id":{"type":"string","nullable":true},"config":{"type":"object","additionalProperties":{"nullable":true},"description":"Step configuration as stored by the Workflows editor, with any embedded credential material (e.g. HTTP auth header values) redacted."}},"required":["id","type","description","position","next_step_id","config"]}},"edges":{"type":"array","items":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"},"kind":{"type":"string","enum":["next","condition_true","condition_false","filter","branch_true","branch_false"]}},"required":["from","to","kind"]}}},"required":["workflow_id","master_id","folder_id","name","enabled","status","version","is_latest","color","trigger_summary","created_at","updated_at","description","trigger","first_step_id","steps","edges"]}},"required":["data"],"description":"Full workflow definition: metadata, trigger, and the step graph (steps + derived edges) as the Workflows editor stores it. Embedded secrets are redacted."}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"409":{"description":"Workflow version conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}}},"/v1/workflows/{id}/executions":{"get":{"operationId":"listWorkflowExecutions","security":[{"bearerAuth":[]}],"tags":["workflows"],"summary":"List workflow executions","description":"Returns the paginated run history for a workflow, newest first. Filter by `status` and by `started_after` / `started_before`.","parameters":[{"schema":{"type":"string","description":"Workflow (version) identifier.","example":"k17demo8f8x7c9v0n2q4r6t8y1u3i5o"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"Optional workspace override. If omitted, Conduit resolves the workflow's workspace automatically.","example":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o"},"required":false,"name":"workspace_id","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"string","enum":["STARTED","RUNNING","SUCCESS","FAILED","CANCELLED"],"description":"Filter executions by lifecycle status.","example":"SUCCESS"},"required":false,"name":"status","in":"query"},{"schema":{"type":"string","format":"date-time","description":"Only return executions started at or after this ISO 8601 timestamp.","example":"2026-04-01T00:00:00.000Z"},"required":false,"name":"started_after","in":"query"},{"schema":{"type":"string","format":"date-time","description":"Only return executions started strictly before this ISO 8601 timestamp.","example":"2026-04-30T00:00:00.000Z"},"required":false,"name":"started_before","in":"query"}],"responses":{"200":{"description":"Workflow executions","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"execution_id":{"type":"string"},"workflow_id":{"type":"string"},"master_id":{"type":"string","nullable":true},"status":{"type":"string","nullable":true},"trigger_source":{"type":"string","nullable":true},"started_at":{"type":"string"},"ended_at":{"type":"string","nullable":true},"error_summary":{"type":"string","nullable":true}},"required":["execution_id","workflow_id","master_id","status","trigger_source","started_at","ended_at","error_summary"]}},"next_cursor":{"type":"string","nullable":true},"has_more":{"type":"boolean"}},"required":["data","next_cursor","has_more"],"description":"Cursor-paginated workflow executions response.","example":{"data":[{"execution_id":"e11demo8f8x7c9v0n2q4r6t8y1u3i5o","workflow_id":"k17demo8f8x7c9v0n2q4r6t8y1u3i5o","master_id":"m92demo8f8x7c9v0n2q4r6t8y1u3i5o","status":"SUCCESS","trigger_source":"RESERVATION_NEW","started_at":"2026-04-03T03:14:15.000Z","ended_at":"2026-04-03T03:14:18.000Z","error_summary":null}],"next_cursor":"page-token","has_more":true}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}}},"/v1/workflow-executions/{id}/events":{"get":{"operationId":"listWorkflowExecutionEvents","security":[{"bearerAuth":[]}],"tags":["workflows"],"summary":"List workflow execution events","description":"Returns the paginated, step-level event log for a single workflow execution. Ascending by timestamp by default. Payload summaries have credential/raw-request material redacted.","parameters":[{"schema":{"type":"string","description":"Workflow execution identifier.","example":"e11demo8f8x7c9v0n2q4r6t8y1u3i5o"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"Optional workspace override. If omitted, Conduit resolves the execution's workspace automatically.","example":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o"},"required":false,"name":"workspace_id","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"string","enum":["asc","desc"],"description":"Sort order by event timestamp. Ascending by default.","example":"asc"},"required":false,"name":"order","in":"query"}],"responses":{"200":{"description":"Workflow execution events","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"event_id":{"type":"string"},"step_id":{"type":"string","nullable":true},"step_name":{"type":"string","nullable":true},"type":{"type":"string","nullable":true},"status":{"type":"string","nullable":true},"timestamp":{"type":"string"},"payload_summary":{"nullable":true,"description":"Redacted summary of the event payload; credential/raw-request fields are stripped."}},"required":["event_id","step_id","step_name","type","status","timestamp"]}},"next_cursor":{"type":"string","nullable":true},"has_more":{"type":"boolean"}},"required":["data","next_cursor","has_more"],"description":"Cursor-paginated, step-level workflow execution event log (ascending by default).","example":{"data":[{"event_id":"v42demo8f8x7c9v0n2q4r6t8y1u3i5o","step_id":"s31demo8f8x7c9v0n2q4r6t8y1u3i5o","step_name":"Send welcome message","type":"SENT_MESSAGE","status":null,"timestamp":"2026-04-03T03:14:16.000Z","payload_summary":{"type":"SENT_MESSAGE","messageIds":["..."]}}],"next_cursor":"page-token","has_more":true}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}}},"/v1/kb/search":{"post":{"operationId":"searchKnowledge","security":[{"bearerAuth":[]}],"tags":["kb"],"summary":"Search knowledge base","description":"Hybrid search over the workspace knowledge base. Returns the top matching chunks with their parent node titles and relevance scores.","parameters":[{"schema":{"type":"string","description":"Workspace to query.","example":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o"},"required":true,"name":"workspace_id","in":"query"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"query":{"type":"string","minLength":1,"description":"Natural-language search query.","example":"what time is checkout"},"entity_ids":{"type":"array","items":{"type":"string"},"description":"Restrict results to nodes scoped to any of these entities."},"max_results":{"type":"integer","minimum":1,"maximum":50,"description":"Maximum number of results to return.","example":10}},"required":["query"],"example":{"query":"what time is checkout","max_results":10}}}}},"responses":{"200":{"description":"Knowledge search results","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"node_id":{"type":"string"},"chunk_id":{"type":"string"},"node_title":{"type":"string"},"chunk_text":{"type":"string"},"context":{"type":"string"},"chunk_index":{"type":"number","description":"0-based position of the chunk within its parent node."},"source":{"type":"string"},"relevance_score":{"type":"number","description":"Hybrid search score, 0-1. Higher is better."}},"required":["node_id","chunk_id","node_title","chunk_text"]}}},"required":["data"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"503":{"description":"Knowledge service temporarily unavailable","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}}},"/v1/kb/nodes/search":{"post":{"operationId":"searchKnowledgeNodes","security":[{"bearerAuth":[]}],"tags":["kb"],"summary":"Search knowledge nodes","description":"Paginated, filtered listing of knowledge nodes. Supports cursor-based keyset pagination and optional body inclusion.","parameters":[{"schema":{"type":"string","description":"Workspace to query.","example":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o"},"required":true,"name":"workspace_id","in":"query"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"filters":{"type":"object","properties":{"entity_ids":{"type":"array","items":{"type":"string"},"description":"Restrict to nodes scoped to any of these entities."},"source":{"type":"string","enum":["google_drive","notion","airtable","link","pms","ingest","manual"],"description":"Filter by ingest source. `manual` for nodes created via the API, `pms` for nodes synced from a PMS, `ingest` for file uploads."},"source_type":{"type":"string","enum":["pdf","csv","excel","docx","text","html"],"description":"Filter by source format (e.g. `pdf`, `link`, `manual`, `notion`)."},"source_id":{"type":"string","description":"Filter by upstream source identifier (e.g. PMS listing id, document hash)."},"is_directory":{"type":"boolean","description":"`true` returns only folders, `false` only content nodes."},"enabled":{"type":"boolean","description":"Filter by agent-visibility state."},"parent_id":{"type":"string","description":"Restrict to direct children of this node. Omit to search across the whole workspace."}},"additionalProperties":false},"pagination":{"type":"object","properties":{"cursor":{"type":"string"},"page_size":{"type":"integer","minimum":1,"maximum":100,"description":"Defaults to 20. Max 100."}},"additionalProperties":false},"include_body":{"type":"boolean","description":"Include full node bodies in the response. Off by default to keep payloads small."}},"additionalProperties":false,"example":{"filters":{"parent_id":"65f1a2b3c4d5e6f7a8b9c0d1","source":"manual","enabled":true},"pagination":{"page_size":20},"include_body":false}}}}},"responses":{"200":{"description":"Knowledge nodes","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"title":{"type":"string"},"body":{"type":"string"},"chunk_body":{"type":"boolean","description":"True when the body is chunked and embedded for search."},"entity_ids":{"type":"array","items":{"type":"string"},"description":"The file's entity scope, empty when workspace-wide. Always empty for folders, which carry no scope."},"parent_id":{"type":"string","nullable":true},"ancestors":{"type":"array","items":{"type":"string"},"description":"Ordered ancestor node ids from root to immediate parent."},"depth":{"type":"number","description":"Depth in the tree, 0 = root."},"source":{"type":"string","enum":["google_drive","notion","airtable","link","pms","ingest","manual"]},"source_type":{"type":"string","nullable":true,"enum":["pdf","csv","excel","docx","text","html"]},"source_id":{"type":"string","nullable":true},"is_directory":{"type":"boolean","description":"True for folder nodes that group children."},"metadata":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"enabled":{"type":"boolean"},"created_by":{"type":"string","nullable":true},"embed_status":{"type":"string","nullable":true,"description":"Embedding pipeline state (pending, ready, failed)."},"chunk_count":{"type":"number","nullable":true},"version":{"type":"number"},"tags":{"type":"array","items":{"type":"string"}},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","workspace_id","title","body","chunk_body","entity_ids","parent_id","ancestors","depth","source","source_type","source_id","is_directory","metadata","enabled","created_by","embed_status","chunk_count","version","tags","created_at","updated_at"]}},"next_cursor":{"type":"string","nullable":true},"has_more":{"type":"boolean"},"total_count":{"type":"number"}},"required":["data","next_cursor","has_more"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"503":{"description":"Knowledge service temporarily unavailable","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}}},"/v1/kb/nodes":{"get":{"operationId":"listKnowledgeNodes","security":[{"bearerAuth":[]}],"tags":["kb"],"summary":"List knowledge nodes","description":"Lists direct children of a knowledge node. Omit `parent_id` to list workspace root entries.","parameters":[{"schema":{"type":"string","description":"Workspace to query.","example":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o"},"required":true,"name":"workspace_id","in":"query"},{"schema":{"type":"string","description":"Parent node id. Omit to list workspace root."},"required":false,"name":"parent_id","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"Knowledge nodes","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"is_directory":{"type":"boolean"},"enabled":{"type":"boolean"},"source":{"type":"string","enum":["google_drive","notion","airtable","link","pms","ingest","manual"]},"source_type":{"type":"string","nullable":true,"enum":["pdf","csv","excel","docx","text","html"]},"source_id":{"type":"string","nullable":true},"parent_id":{"type":"string","nullable":true},"entity_ids":{"type":"array","items":{"type":"string"}},"embed_status":{"type":"string","nullable":true},"chunk_count":{"type":"number","nullable":true},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","title","is_directory","enabled","source","entity_ids","created_at","updated_at"]}}},"required":["data"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"503":{"description":"Knowledge service temporarily unavailable","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}},"post":{"operationId":"createKnowledgeNode","security":[{"bearerAuth":[]}],"tags":["kb"],"summary":"Create knowledge node","description":"Creates a manual knowledge node or directory. Requires a token with `read_write` access. Nodes created through this endpoint are always recorded with `source: manual`.","parameters":[{"schema":{"type":"string","description":"Workspace to query.","example":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o"},"required":true,"name":"workspace_id","in":"query"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"description":"Node display title."},"body":{"type":"string","description":"Markdown or plain-text body. Ignored when `is_directory` is true."},"parent_id":{"type":"string","description":"Parent node id. Omit to create at workspace root."},"entity_ids":{"type":"array","items":{"type":"string"},"description":"Scope the file to one entity (a listing, `group:<id>`, or `unit:<listingId>:<subunitId>`). Omit for workspace-wide. Files only: folders are structure and carry no scope."},"is_directory":{"type":"boolean","description":"Create as a folder with no body. Children can be nested underneath. Folders carry no scope, so `entity_ids` must be omitted."},"metadata":{"type":"object","additionalProperties":{"nullable":true},"description":"Arbitrary JSON metadata. Not searchable."},"enabled":{"type":"boolean","description":"Defaults to true. Disabled nodes are excluded from agent search."}},"required":["title"],"example":{"title":"Checkout instructions","body":"Checkout is at 11 AM...","entity_ids":["ent_abc"],"enabled":true}}}}},"responses":{"201":{"description":"Knowledge node created","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"title":{"type":"string"},"body":{"type":"string"},"chunk_body":{"type":"boolean","description":"True when the body is chunked and embedded for search."},"entity_ids":{"type":"array","items":{"type":"string"},"description":"The file's entity scope, empty when workspace-wide. Always empty for folders, which carry no scope."},"parent_id":{"type":"string","nullable":true},"ancestors":{"type":"array","items":{"type":"string"},"description":"Ordered ancestor node ids from root to immediate parent."},"depth":{"type":"number","description":"Depth in the tree, 0 = root."},"source":{"type":"string","enum":["google_drive","notion","airtable","link","pms","ingest","manual"]},"source_type":{"type":"string","nullable":true,"enum":["pdf","csv","excel","docx","text","html"]},"source_id":{"type":"string","nullable":true},"is_directory":{"type":"boolean","description":"True for folder nodes that group children."},"metadata":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"enabled":{"type":"boolean"},"created_by":{"type":"string","nullable":true},"embed_status":{"type":"string","nullable":true,"description":"Embedding pipeline state (pending, ready, failed)."},"chunk_count":{"type":"number","nullable":true},"version":{"type":"number"},"tags":{"type":"array","items":{"type":"string"}},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","workspace_id","title","body","chunk_body","entity_ids","parent_id","ancestors","depth","source","source_type","source_id","is_directory","metadata","enabled","created_by","embed_status","chunk_count","version","tags","created_at","updated_at"]}},"required":["data"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"503":{"description":"Knowledge service temporarily unavailable","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}}},"/v1/kb/nodes/{node_id}":{"get":{"operationId":"getKnowledgeNode","security":[{"bearerAuth":[]}],"tags":["kb"],"summary":"Get knowledge node","description":"Returns a single knowledge node, including its body, metadata, ancestors, and embedding status.","parameters":[{"schema":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"Knowledge node id (24 hex characters).","example":"65f1a2b3c4d5e6f7a8b9c0d1"},"required":true,"name":"node_id","in":"path"},{"schema":{"type":"string","description":"Workspace to query.","example":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o"},"required":true,"name":"workspace_id","in":"query"}],"responses":{"200":{"description":"Knowledge node","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"title":{"type":"string"},"body":{"type":"string"},"chunk_body":{"type":"boolean","description":"True when the body is chunked and embedded for search."},"entity_ids":{"type":"array","items":{"type":"string"},"description":"The file's entity scope, empty when workspace-wide. Always empty for folders, which carry no scope."},"parent_id":{"type":"string","nullable":true},"ancestors":{"type":"array","items":{"type":"string"},"description":"Ordered ancestor node ids from root to immediate parent."},"depth":{"type":"number","description":"Depth in the tree, 0 = root."},"source":{"type":"string","enum":["google_drive","notion","airtable","link","pms","ingest","manual"]},"source_type":{"type":"string","nullable":true,"enum":["pdf","csv","excel","docx","text","html"]},"source_id":{"type":"string","nullable":true},"is_directory":{"type":"boolean","description":"True for folder nodes that group children."},"metadata":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"enabled":{"type":"boolean"},"created_by":{"type":"string","nullable":true},"embed_status":{"type":"string","nullable":true,"description":"Embedding pipeline state (pending, ready, failed)."},"chunk_count":{"type":"number","nullable":true},"version":{"type":"number"},"tags":{"type":"array","items":{"type":"string"}},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","workspace_id","title","body","chunk_body","entity_ids","parent_id","ancestors","depth","source","source_type","source_id","is_directory","metadata","enabled","created_by","embed_status","chunk_count","version","tags","created_at","updated_at"]}},"required":["data"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"503":{"description":"Knowledge service temporarily unavailable","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}},"patch":{"operationId":"updateKnowledgeNode","security":[{"bearerAuth":[]}],"tags":["kb"],"summary":"Update knowledge node","description":"Partial update of a knowledge node. Requires a token with `read_write` access.","parameters":[{"schema":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"Knowledge node id (24 hex characters).","example":"65f1a2b3c4d5e6f7a8b9c0d1"},"required":true,"name":"node_id","in":"path"},{"schema":{"type":"string","description":"Workspace to query.","example":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o"},"required":true,"name":"workspace_id","in":"query"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"description":"New display title."},"body":{"type":"string","description":"New markdown or plain-text body. Triggers re-indexing."},"parent_id":{"type":"string","nullable":true,"description":"Set to null to move the node to the workspace root. Omit to leave the parent unchanged."},"entity_ids":{"type":"array","items":{"type":"string"},"description":"Replaces the file's entity scope. Pass `[]` to make the file workspace-wide. Files only: rejected on a folder. Send it on its own: a request carrying `entity_ids` alongside any other field is rejected with 400, so a scope change is always a separate call."},"metadata":{"type":"object","additionalProperties":{"nullable":true},"description":"Replaces the full metadata object. Pass `{}` to clear."},"enabled":{"type":"boolean","description":"Toggle agent visibility. Disabled nodes are excluded from search."},"tags":{"type":"array","items":{"type":"string"},"description":"Replaces the full tag set. Pass `[]` to clear."}},"example":{"title":"Checkout instructions (updated)","tags":["seasonal"],"enabled":true}}}}},"responses":{"200":{"description":"Knowledge node updated","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"title":{"type":"string"},"body":{"type":"string"},"chunk_body":{"type":"boolean","description":"True when the body is chunked and embedded for search."},"entity_ids":{"type":"array","items":{"type":"string"},"description":"The file's entity scope, empty when workspace-wide. Always empty for folders, which carry no scope."},"parent_id":{"type":"string","nullable":true},"ancestors":{"type":"array","items":{"type":"string"},"description":"Ordered ancestor node ids from root to immediate parent."},"depth":{"type":"number","description":"Depth in the tree, 0 = root."},"source":{"type":"string","enum":["google_drive","notion","airtable","link","pms","ingest","manual"]},"source_type":{"type":"string","nullable":true,"enum":["pdf","csv","excel","docx","text","html"]},"source_id":{"type":"string","nullable":true},"is_directory":{"type":"boolean","description":"True for folder nodes that group children."},"metadata":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"enabled":{"type":"boolean"},"created_by":{"type":"string","nullable":true},"embed_status":{"type":"string","nullable":true,"description":"Embedding pipeline state (pending, ready, failed)."},"chunk_count":{"type":"number","nullable":true},"version":{"type":"number"},"tags":{"type":"array","items":{"type":"string"}},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","workspace_id","title","body","chunk_body","entity_ids","parent_id","ancestors","depth","source","source_type","source_id","is_directory","metadata","enabled","created_by","embed_status","chunk_count","version","tags","created_at","updated_at"]}},"required":["data"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"503":{"description":"Knowledge service temporarily unavailable","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}},"delete":{"operationId":"deleteKnowledgeNode","security":[{"bearerAuth":[]}],"tags":["kb"],"summary":"Delete knowledge node","description":"Deletes a knowledge node and any descendant nodes. Requires a token with `read_write` access.","parameters":[{"schema":{"type":"string","pattern":"^[a-f0-9]{24}$","description":"Knowledge node id (24 hex characters).","example":"65f1a2b3c4d5e6f7a8b9c0d1"},"required":true,"name":"node_id","in":"path"},{"schema":{"type":"string","description":"Workspace to query.","example":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o"},"required":true,"name":"workspace_id","in":"query"}],"responses":{"200":{"description":"Knowledge node deleted","content":{"application/json":{"schema":{"type":"object","properties":{"deleted_count":{"type":"number"}},"required":["deleted_count"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"503":{"description":"Knowledge service temporarily unavailable","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}}},"/v1/skills":{"get":{"operationId":"listSkills","security":[{"bearerAuth":[]}],"tags":["skills"],"summary":"List workspace agent skills","description":"Returns cursor-paginated workspace agent skills. Sidebar/global-assistant skills are not included in this API.","parameters":[{"schema":{"type":"string","description":"Workspace to query.","example":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o"},"required":true,"name":"workspace_id","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"}],"responses":{"200":{"description":"Workspace skills","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"body":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"enabled":{"type":"boolean"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","workspace_id","name","description","body","tags","enabled","created_at","updated_at"]}},"next_cursor":{"type":"string","nullable":true},"has_more":{"type":"boolean"}},"required":["data","next_cursor","has_more"],"description":"Cursor-paginated workspace skills response.","example":{"data":[{"id":"ks77c0dy0mgdpzmqz6tesry8w184002s","workspace_id":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o","name":"booking-policy","description":"Use this skill for refund and cancellation questions.","body":"Guests may cancel up to 48 hours before check-in for a full refund.","tags":["policy","refunds"],"enabled":true,"created_at":"2026-04-01T17:22:10.000Z","updated_at":"2026-04-03T03:14:15.000Z"}],"next_cursor":"page-token","has_more":true}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}},"post":{"operationId":"createSkill","security":[{"bearerAuth":[]}],"tags":["skills"],"summary":"Create skill","description":"Creates a workspace agent skill. Requires a token with write access.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspace_id":{"type":"string"},"name":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"description":{"type":"string","minLength":1,"maxLength":1024},"body":{"type":"string","minLength":1},"tags":{"type":"array","items":{"type":"string"}},"enabled":{"type":"boolean"},"auto_assign_to_existing_v2_agents":{"type":"boolean"}},"required":["workspace_id","name","description","body"],"description":"Request body for creating a workspace agent skill. External callers must explicitly opt into auto-assignment.","example":{"workspace_id":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o","name":"booking-policy","description":"Use this skill for refund and cancellation questions.","body":"Guests may cancel up to 48 hours before check-in for a full refund.","tags":["policy","refunds"],"enabled":true,"auto_assign_to_existing_v2_agents":false}}}}},"responses":{"201":{"description":"Skill created","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"body":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"enabled":{"type":"boolean"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","workspace_id","name","description","body","tags","enabled","created_at","updated_at"]}},"required":["data"],"description":"Single workspace skill response.","example":{"data":{"id":"ks77c0dy0mgdpzmqz6tesry8w184002s","workspace_id":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o","name":"booking-policy","description":"Use this skill for refund and cancellation questions.","body":"Guests may cancel up to 48 hours before check-in for a full refund.","tags":["policy","refunds"],"enabled":true,"created_at":"2026-04-01T17:22:10.000Z","updated_at":"2026-04-03T03:14:15.000Z"}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}}},"/v1/skills/{id}":{"get":{"operationId":"getSkill","security":[{"bearerAuth":[]}],"tags":["skills"],"summary":"Get skill by id","description":"Returns a single workspace agent skill.","parameters":[{"schema":{"type":"string","description":"Skill id.","example":"ks77c0dy0mgdpzmqz6tesry8w184002s"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"Optional workspace override. If omitted, Conduit resolves the skill's workspace automatically.","example":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o"},"required":false,"name":"workspace_id","in":"query"}],"responses":{"200":{"description":"Skill","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"body":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"enabled":{"type":"boolean"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","workspace_id","name","description","body","tags","enabled","created_at","updated_at"]}},"required":["data"],"description":"Single workspace skill response.","example":{"data":{"id":"ks77c0dy0mgdpzmqz6tesry8w184002s","workspace_id":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o","name":"booking-policy","description":"Use this skill for refund and cancellation questions.","body":"Guests may cancel up to 48 hours before check-in for a full refund.","tags":["policy","refunds"],"enabled":true,"created_at":"2026-04-01T17:22:10.000Z","updated_at":"2026-04-03T03:14:15.000Z"}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}},"patch":{"operationId":"patchSkill","security":[{"bearerAuth":[]}],"tags":["skills"],"summary":"Patch skill","description":"Updates mutable workspace agent skill fields. Requires a token with write access.","parameters":[{"schema":{"type":"string","description":"Skill id.","example":"ks77c0dy0mgdpzmqz6tesry8w184002s"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"Optional workspace override. If omitted, Conduit resolves the skill's workspace automatically.","example":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o"},"required":false,"name":"workspace_id","in":"query"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"description":{"type":"string","minLength":1,"maxLength":1024},"body":{"type":"string","minLength":1},"tags":{"type":"array","nullable":true,"items":{"type":"string"}},"enabled":{"type":"boolean"}},"description":"Request body for patching a workspace agent skill. Pass null to clear optional metadata fields.","example":{"name":"reservation-policy","tags":["policy","reservations"],"enabled":false}}}}},"responses":{"200":{"description":"Skill updated","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"body":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"enabled":{"type":"boolean"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","workspace_id","name","description","body","tags","enabled","created_at","updated_at"]}},"required":["data"],"description":"Single workspace skill response.","example":{"data":{"id":"ks77c0dy0mgdpzmqz6tesry8w184002s","workspace_id":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o","name":"booking-policy","description":"Use this skill for refund and cancellation questions.","body":"Guests may cancel up to 48 hours before check-in for a full refund.","tags":["policy","refunds"],"enabled":true,"created_at":"2026-04-01T17:22:10.000Z","updated_at":"2026-04-03T03:14:15.000Z"}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}},"delete":{"operationId":"deleteSkill","security":[{"bearerAuth":[]}],"tags":["skills"],"summary":"Delete skill","description":"Deletes a workspace agent skill. Requires a token with write access.","parameters":[{"schema":{"type":"string","description":"Skill id.","example":"ks77c0dy0mgdpzmqz6tesry8w184002s"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"Optional workspace override. If omitted, Conduit resolves the skill's workspace automatically.","example":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o"},"required":false,"name":"workspace_id","in":"query"}],"responses":{"204":{"description":"Skill deleted"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}}},"/v1/custom-tools/runtimes":{"get":{"operationId":"listCustomToolRuntimes","security":[{"bearerAuth":[]}],"tags":["custom_tools"],"summary":"List custom tool runtimes","description":"Returns the supported custom tool runtimes (Python, JavaScript) with the exact entrypoint signature, required return shape, starter template, built-in modules, and auto-installable third-party packages for each. Read this before authoring `code` for create/update.","responses":{"200":{"description":"Supported custom tool runtimes","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"language":{"type":"string"},"display_name":{"type":"string"},"file_extension":{"type":"string"},"package_manager":{"type":"string"},"entrypoint_signature":{"type":"string"},"return_contract":{"type":"string"},"starter_template":{"type":"string"},"builtin_modules":{"type":"array","items":{"type":"string"}},"available_packages":{"type":"array","items":{"type":"string"}}},"required":["language","display_name","file_extension","package_manager","entrypoint_signature","return_contract","starter_template","builtin_modules","available_packages"]}}},"required":["data"],"description":"Supported custom tool runtimes, with the entrypoint signature, return contract, and available dependencies per language.","example":{"data":[{"language":"python","display_name":"Python","file_extension":"py","package_manager":"pip","entrypoint_signature":"def main(**params) -> dict","return_contract":"Return a dict containing a string `message` key. Optionally include `rawData` for structured data the agent can read. Example: `return {\"message\": \"Found 3 results\", \"rawData\": {...}}`.","starter_template":"def main(**params):\n    result = \"Hello from custom tool!\"\n    return {\"message\": result, \"rawData\": {\"any\": \"additional data\"}}","builtin_modules":["json","math","datetime","re","urllib"],"available_packages":["httpx","numpy","pandas","requests"]},{"language":"javascript","display_name":"JavaScript","file_extension":"js","package_manager":"bun","entrypoint_signature":"async function main(params) -> object","return_contract":"Return an object containing a string `message` key. Optionally include `rawData` for structured data the agent can read. Example: `return { message: 'Found 3 results', rawData: {...} }`.","starter_template":"async function main(params) {\n    const result = \"Hello from custom tool!\";\n    return { message: result, rawData: { any: \"additional data\" } };\n}","builtin_modules":["fs","path","crypto","https"],"available_packages":[]}]}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}}},"/v1/custom-tools":{"get":{"operationId":"listCustomTools","security":[{"bearerAuth":[]}],"tags":["custom_tools"],"summary":"List custom code tools","description":"Returns cursor-paginated custom code tools for a workspace.","parameters":[{"schema":{"type":"string","description":"Workspace to query.","example":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o"},"required":true,"name":"workspace_id","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"}],"responses":{"200":{"description":"Workspace custom tools","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"language":{"type":"string","enum":["python","javascript"],"description":"Runtime the tool's code is executed in. Determines the entrypoint signature and which dependencies are available (see GET /v1/custom-tools/runtimes)."},"code":{"type":"string"},"parameters":{"type":"object","additionalProperties":{"type":"object","properties":{"type":{"type":"string","description":"JSON-schema-style parameter type, e.g. `string`, `number`, `boolean`, `object`, `array`."},"required":{"type":"boolean","description":"Whether the agent must supply this parameter."},"description":{"type":"string","description":"What this parameter is. Shown to the model to help it fill the value correctly."},"execution_message_description":{"type":"string","description":"Optional per-parameter note surfaced while the tool is running."},"enum_values":{"type":"array","items":{"type":"string"},"description":"Optional closed set of allowed string values."}},"required":["type","required","description"]},"description":"Parameters the tool accepts, keyed by parameter name. Each becomes a key in the `params` object/dict passed to `main`."},"execution_message_description":{"type":"string","nullable":true},"enable_globally":{"type":"boolean"},"validated":{"type":"boolean"},"version":{"type":"number"},"created_at":{"type":"string"}},"required":["id","workspace_id","name","description","language","code","parameters","execution_message_description","enable_globally","validated","version","created_at"]}},"next_cursor":{"type":"string","nullable":true},"has_more":{"type":"boolean"}},"required":["data","next_cursor","has_more"],"description":"Cursor-paginated custom code tools response.","example":{"data":[{"id":"kg77c0dy0mgdpzmqz6tesry8w184002s","workspace_id":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o","name":"lookup-order-status","description":"Look up the fulfillment status of an order by id.","language":"python","code":"def main(**params):\n    order_id = params[\"order_id\"]\n    # ... fetch status ...\n    return {\n        \"message\": f\"Order {order_id} is shipped\",\n        \"rawData\": {\"status\": \"shipped\"},\n    }","parameters":{"order_id":{"type":"string","required":true,"description":"The order id to look up."}},"execution_message_description":"Looking up order status","enable_globally":false,"validated":true,"version":1,"created_at":"2026-04-01T17:22:10.000Z"}],"next_cursor":"page-token","has_more":true}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}},"post":{"operationId":"createCustomTool","security":[{"bearerAuth":[]}],"tags":["custom_tools"],"summary":"Create custom tool","description":"Creates a custom code tool. Requires a token with write access. See GET /v1/custom-tools/runtimes for the code contract.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspace_id":{"type":"string"},"name":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$","description":"Unique tool name within the workspace. Lowercase kebab-case (e.g. `lookup-order-status`), at most 64 characters. This is how the agent references the tool."},"description":{"type":"string","maxLength":1024},"language":{"type":"string","enum":["python","javascript"],"description":"Runtime the tool's code is executed in. Determines the entrypoint signature and which dependencies are available (see GET /v1/custom-tools/runtimes)."},"code":{"type":"string","minLength":1,"description":"The tool's source code. Must define a single entrypoint named `main`.\n\nPython: `def main(**params):` — parameters arrive as keyword args. Return a dict containing a string `message` key, optionally a `rawData` key with structured data.\n\nJavaScript: `async function main(params) { ... }` — parameters arrive as a single object. Return an object containing a string `message` key, optionally a `rawData` key.\n\nWrites statically validate that the code defines `main` and includes a return statement; runtime execution validates the returned object.\n\nStandard library modules are always importable. A curated set of third-party packages installs automatically on first import. Query GET /v1/custom-tools/runtimes for the exact signature, return contract, and available dependencies per language."},"parameters":{"type":"object","additionalProperties":{"type":"object","properties":{"type":{"type":"string","description":"JSON-schema-style parameter type, e.g. `string`, `number`, `boolean`, `object`, `array`."},"required":{"type":"boolean","description":"Whether the agent must supply this parameter."},"description":{"type":"string","description":"What this parameter is. Shown to the model to help it fill the value correctly."},"execution_message_description":{"type":"string","description":"Optional per-parameter note surfaced while the tool is running."},"enum_values":{"type":"array","items":{"type":"string"},"description":"Optional closed set of allowed string values."}},"required":["type","required","description"]},"description":"Parameters the tool accepts, keyed by parameter name. Each becomes a key in the `params` object/dict passed to `main`."},"execution_message_description":{"type":"string","description":"Short status line shown to the user while the tool runs, e.g. `Looking up order status`."},"enable_globally":{"type":"boolean","description":"When true, the tool is available to every agent in the workspace without per-agent enablement."}},"required":["workspace_id","name","language","code"],"description":"Request body for creating a custom code tool. Requires a token with write access.","example":{"workspace_id":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o","name":"lookup-order-status","description":"Look up the fulfillment status of an order by id.","language":"python","code":"def main(**params):\n    order_id = params[\"order_id\"]\n    return {\"message\": f\"Order {order_id} is shipped\"}","parameters":{"order_id":{"type":"string","required":true,"description":"The order id to look up."}},"execution_message_description":"Looking up order status","enable_globally":false}}}}},"responses":{"201":{"description":"Custom tool created","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"language":{"type":"string","enum":["python","javascript"],"description":"Runtime the tool's code is executed in. Determines the entrypoint signature and which dependencies are available (see GET /v1/custom-tools/runtimes)."},"code":{"type":"string"},"parameters":{"type":"object","additionalProperties":{"type":"object","properties":{"type":{"type":"string","description":"JSON-schema-style parameter type, e.g. `string`, `number`, `boolean`, `object`, `array`."},"required":{"type":"boolean","description":"Whether the agent must supply this parameter."},"description":{"type":"string","description":"What this parameter is. Shown to the model to help it fill the value correctly."},"execution_message_description":{"type":"string","description":"Optional per-parameter note surfaced while the tool is running."},"enum_values":{"type":"array","items":{"type":"string"},"description":"Optional closed set of allowed string values."}},"required":["type","required","description"]},"description":"Parameters the tool accepts, keyed by parameter name. Each becomes a key in the `params` object/dict passed to `main`."},"execution_message_description":{"type":"string","nullable":true},"enable_globally":{"type":"boolean"},"validated":{"type":"boolean"},"version":{"type":"number"},"created_at":{"type":"string"}},"required":["id","workspace_id","name","description","language","code","parameters","execution_message_description","enable_globally","validated","version","created_at"]}},"required":["data"],"description":"Single custom code tool response.","example":{"data":{"id":"kg77c0dy0mgdpzmqz6tesry8w184002s","workspace_id":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o","name":"lookup-order-status","description":"Look up the fulfillment status of an order by id.","language":"python","code":"def main(**params):\n    order_id = params[\"order_id\"]\n    # ... fetch status ...\n    return {\n        \"message\": f\"Order {order_id} is shipped\",\n        \"rawData\": {\"status\": \"shipped\"},\n    }","parameters":{"order_id":{"type":"string","required":true,"description":"The order id to look up."}},"execution_message_description":"Looking up order status","enable_globally":false,"validated":true,"version":1,"created_at":"2026-04-01T17:22:10.000Z"}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}}},"/v1/custom-tools/{id}":{"get":{"operationId":"getCustomTool","security":[{"bearerAuth":[]}],"tags":["custom_tools"],"summary":"Get custom tool by id","description":"Returns a single custom code tool, including its source code and parameter schema.","parameters":[{"schema":{"type":"string","description":"Custom tool id.","example":"kg77c0dy0mgdpzmqz6tesry8w184002s"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"Optional workspace override. If omitted, Conduit resolves the tool's workspace automatically.","example":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o"},"required":false,"name":"workspace_id","in":"query"}],"responses":{"200":{"description":"Custom tool","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"language":{"type":"string","enum":["python","javascript"],"description":"Runtime the tool's code is executed in. Determines the entrypoint signature and which dependencies are available (see GET /v1/custom-tools/runtimes)."},"code":{"type":"string"},"parameters":{"type":"object","additionalProperties":{"type":"object","properties":{"type":{"type":"string","description":"JSON-schema-style parameter type, e.g. `string`, `number`, `boolean`, `object`, `array`."},"required":{"type":"boolean","description":"Whether the agent must supply this parameter."},"description":{"type":"string","description":"What this parameter is. Shown to the model to help it fill the value correctly."},"execution_message_description":{"type":"string","description":"Optional per-parameter note surfaced while the tool is running."},"enum_values":{"type":"array","items":{"type":"string"},"description":"Optional closed set of allowed string values."}},"required":["type","required","description"]},"description":"Parameters the tool accepts, keyed by parameter name. Each becomes a key in the `params` object/dict passed to `main`."},"execution_message_description":{"type":"string","nullable":true},"enable_globally":{"type":"boolean"},"validated":{"type":"boolean"},"version":{"type":"number"},"created_at":{"type":"string"}},"required":["id","workspace_id","name","description","language","code","parameters","execution_message_description","enable_globally","validated","version","created_at"]}},"required":["data"],"description":"Single custom code tool response.","example":{"data":{"id":"kg77c0dy0mgdpzmqz6tesry8w184002s","workspace_id":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o","name":"lookup-order-status","description":"Look up the fulfillment status of an order by id.","language":"python","code":"def main(**params):\n    order_id = params[\"order_id\"]\n    # ... fetch status ...\n    return {\n        \"message\": f\"Order {order_id} is shipped\",\n        \"rawData\": {\"status\": \"shipped\"},\n    }","parameters":{"order_id":{"type":"string","required":true,"description":"The order id to look up."}},"execution_message_description":"Looking up order status","enable_globally":false,"validated":true,"version":1,"created_at":"2026-04-01T17:22:10.000Z"}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}},"patch":{"operationId":"patchCustomTool","security":[{"bearerAuth":[]}],"tags":["custom_tools"],"summary":"Patch custom tool","description":"Updates mutable custom tool fields. Only supplied fields change; changing `code` bumps the version. Requires a token with write access.","parameters":[{"schema":{"type":"string","description":"Custom tool id.","example":"kg77c0dy0mgdpzmqz6tesry8w184002s"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"Optional workspace override. If omitted, Conduit resolves the tool's workspace automatically.","example":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o"},"required":false,"name":"workspace_id","in":"query"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$","description":"Unique tool name within the workspace. Lowercase kebab-case (e.g. `lookup-order-status`), at most 64 characters. This is how the agent references the tool."},"description":{"type":"string","maxLength":1024},"language":{"type":"string","enum":["python","javascript"],"description":"Runtime the tool's code is executed in. Determines the entrypoint signature and which dependencies are available (see GET /v1/custom-tools/runtimes)."},"code":{"type":"string","minLength":1,"description":"The tool's source code. Must define a single entrypoint named `main`.\n\nPython: `def main(**params):` — parameters arrive as keyword args. Return a dict containing a string `message` key, optionally a `rawData` key with structured data.\n\nJavaScript: `async function main(params) { ... }` — parameters arrive as a single object. Return an object containing a string `message` key, optionally a `rawData` key.\n\nWrites statically validate that the code defines `main` and includes a return statement; runtime execution validates the returned object.\n\nStandard library modules are always importable. A curated set of third-party packages installs automatically on first import. Query GET /v1/custom-tools/runtimes for the exact signature, return contract, and available dependencies per language."},"parameters":{"type":"object","additionalProperties":{"type":"object","properties":{"type":{"type":"string","description":"JSON-schema-style parameter type, e.g. `string`, `number`, `boolean`, `object`, `array`."},"required":{"type":"boolean","description":"Whether the agent must supply this parameter."},"description":{"type":"string","description":"What this parameter is. Shown to the model to help it fill the value correctly."},"execution_message_description":{"type":"string","description":"Optional per-parameter note surfaced while the tool is running."},"enum_values":{"type":"array","items":{"type":"string"},"description":"Optional closed set of allowed string values."}},"required":["type","required","description"]},"description":"Parameters the tool accepts, keyed by parameter name. Each becomes a key in the `params` object/dict passed to `main`."},"execution_message_description":{"type":"string"},"enable_globally":{"type":"boolean"}},"description":"Request body for patching a custom code tool. Only supplied fields are changed. Changing `code` bumps the tool's version.","example":{"description":"Look up live fulfillment status of an order by id.","code":"def main(**params):\n    order_id = params[\"order_id\"]\n    return {\"message\": f\"Order {order_id} is out for delivery\"}"}}}}},"responses":{"200":{"description":"Custom tool updated","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"language":{"type":"string","enum":["python","javascript"],"description":"Runtime the tool's code is executed in. Determines the entrypoint signature and which dependencies are available (see GET /v1/custom-tools/runtimes)."},"code":{"type":"string"},"parameters":{"type":"object","additionalProperties":{"type":"object","properties":{"type":{"type":"string","description":"JSON-schema-style parameter type, e.g. `string`, `number`, `boolean`, `object`, `array`."},"required":{"type":"boolean","description":"Whether the agent must supply this parameter."},"description":{"type":"string","description":"What this parameter is. Shown to the model to help it fill the value correctly."},"execution_message_description":{"type":"string","description":"Optional per-parameter note surfaced while the tool is running."},"enum_values":{"type":"array","items":{"type":"string"},"description":"Optional closed set of allowed string values."}},"required":["type","required","description"]},"description":"Parameters the tool accepts, keyed by parameter name. Each becomes a key in the `params` object/dict passed to `main`."},"execution_message_description":{"type":"string","nullable":true},"enable_globally":{"type":"boolean"},"validated":{"type":"boolean"},"version":{"type":"number"},"created_at":{"type":"string"}},"required":["id","workspace_id","name","description","language","code","parameters","execution_message_description","enable_globally","validated","version","created_at"]}},"required":["data"],"description":"Single custom code tool response.","example":{"data":{"id":"kg77c0dy0mgdpzmqz6tesry8w184002s","workspace_id":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o","name":"lookup-order-status","description":"Look up the fulfillment status of an order by id.","language":"python","code":"def main(**params):\n    order_id = params[\"order_id\"]\n    # ... fetch status ...\n    return {\n        \"message\": f\"Order {order_id} is shipped\",\n        \"rawData\": {\"status\": \"shipped\"},\n    }","parameters":{"order_id":{"type":"string","required":true,"description":"The order id to look up."}},"execution_message_description":"Looking up order status","enable_globally":false,"validated":true,"version":1,"created_at":"2026-04-01T17:22:10.000Z"}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}},"delete":{"operationId":"deleteCustomTool","security":[{"bearerAuth":[]}],"tags":["custom_tools"],"summary":"Delete custom tool","description":"Deletes a custom code tool and its access-control records. Requires a token with write access.","parameters":[{"schema":{"type":"string","description":"Custom tool id.","example":"kg77c0dy0mgdpzmqz6tesry8w184002s"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"Optional workspace override. If omitted, Conduit resolves the tool's workspace automatically.","example":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o"},"required":false,"name":"workspace_id","in":"query"}],"responses":{"204":{"description":"Custom tool deleted"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}}},"/v1/custom-tools/{id}/run":{"post":{"operationId":"runCustomTool","security":[{"bearerAuth":[]}],"tags":["custom_tools"],"summary":"Run custom tool","description":"Executes a custom code tool with the given parameters and returns its result. The code runs in the sandbox exactly as an agent would invoke it. A tool whose own code fails still returns 200 with `success: false`; a non-2xx only means the tool was not found or the arguments were rejected. Requires a token with write access.","parameters":[{"schema":{"type":"string","description":"Custom tool id.","example":"kg77c0dy0mgdpzmqz6tesry8w184002s"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"workspace_id":{"type":"string","description":"Optional workspace override. If omitted, Conduit resolves the tool's workspace automatically.","example":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o"},"parameters":{"type":"object","additionalProperties":{"nullable":true},"description":"Arguments passed to the tool's `main` entrypoint, keyed by parameter name. Every parameter the tool marks as `required` must be present."}},"description":"Request body for running a custom code tool. Requires a token with write access since execution can have side effects.","example":{"workspace_id":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o","parameters":{"order_id":"ord_12345"}}}}}},"responses":{"200":{"description":"Custom tool run result","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"success":{"type":"boolean","description":"Whether the tool's code ran to completion and returned the expected shape. `false` means the code threw or returned an invalid result; see `error`."},"message":{"type":"string","nullable":true,"description":"The `message` string the tool returned, if any."},"result":{"nullable":true,"description":"The full structured object the tool returned (including `message` and any `rawData`), if the run succeeded."},"error":{"type":"string","nullable":true,"description":"Failure reason when `success` is false, otherwise null."},"logs":{"type":"string","nullable":true,"description":"Captured stdout/stderr from the run, if any."},"run_time_ms":{"type":"number","description":"Wall-clock execution time in milliseconds."}},"required":["success","message","error","logs","run_time_ms"]}},"required":["data"],"description":"Result of executing a custom code tool. A non-2xx is only returned when the tool could not be found or the arguments were rejected; a tool whose code fails returns 200 with `success: false`.","example":{"data":{"success":true,"message":"Order ord_12345 is shipped","result":{"message":"Order ord_12345 is shipped","rawData":{"status":"shipped"}},"error":null,"logs":null,"run_time_ms":842}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}}},"/v1/inbox-types":{"get":{"operationId":"listInboxTypes","security":[{"bearerAuth":[]}],"tags":["workspaces"],"summary":"List Inbox Types","description":"List the workspace's inbox types (id + name). Each id is stable and usable as a message trigger's inboxTypeId (config scopeType \"inbox\") and as the inbox_type_id filter on list_conversations. Reserved inbox types return their slug (e.g. \"guest\"); custom inbox types return their opaque id.","parameters":[{"schema":{"type":"string","description":"Workspace identifier from `list_workspaces`"},"required":true,"description":"Workspace identifier from `list_workspaces`","name":"workspace_id","in":"query"}],"responses":{"200":{"description":"List Inbox Types","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Stable inbox type id. Reserved inbox types surface as their slug (e.g. \"guest\"); custom inbox types surface as their opaque id. Usable directly as a message trigger's `inboxTypeId` (scopeType \"inbox\") and as the `inbox_type_id` filter on list_conversations."},"name":{"type":"string","description":"Human-readable inbox type name."}},"required":["id","name"]}}},"required":["data"],"description":"Every inbox type in the workspace, each with a stable id usable in a message trigger's inboxTypeId.","example":{"data":[{"id":"guest","name":"Guest"},{"id":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o","name":"VIP"}]}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}}},"/v1/contacts/{id}/pause-ai":{"post":{"operationId":"pauseContactAi","security":[{"bearerAuth":[]}],"tags":["contacts"],"summary":"Pause Contact AI","description":"Pause AI responses for a contact indefinitely or for 30 or 60 minutes.","parameters":[{"schema":{"type":"string","description":"Contact identifier"},"required":true,"description":"Contact identifier","name":"id","in":"path"},{"schema":{"type":"string"},"required":false,"name":"workspace_id","in":"query"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"duration_minutes":{"anyOf":[{"type":"number","enum":[30]},{"type":"number","enum":[60]}],"description":"Pause duration in minutes. Omit for an indefinite pause."}}}}}},"responses":{"200":{"description":"Pause Contact AI","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"language":{"type":"string","nullable":true},"id":{"type":"string"},"workspace_id":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string","nullable":true},"image_url":{"type":"string","nullable":true},"type":{"type":"string","nullable":true},"inbox_type_id":{"type":"string"},"archived":{"type":"boolean"},"ai_paused":{"type":"boolean"},"last_message_at":{"type":"string","nullable":true},"created_at":{"type":"string"},"channels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"value":{"type":"string"}},"required":["id","type","value"]}}},"required":["language","id","workspace_id","first_name","last_name","image_url","type","inbox_type_id","archived","ai_paused","last_message_at","created_at","channels"]}},"required":["data"],"description":"Single contact response.","example":{"data":{"id":"ph77c0dy0mgdpzmqz6tesry8w184002s","workspace_id":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o","first_name":"Jane","last_name":"Doe","image_url":null,"language":null,"type":null,"inbox_type_id":"guest","archived":false,"ai_paused":false,"last_message_at":"2026-04-03T03:14:15.000Z","created_at":"2026-04-01T17:22:10.000Z","channels":[{"id":"ns782tta8jzdst8a2w5vdcgfnd841nzf","type":"unthreaded_email","value":"jane@example.com"}]}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}}},"/v1/contacts/{id}/resume-ai":{"post":{"operationId":"resumeContactAi","security":[{"bearerAuth":[]}],"tags":["contacts"],"summary":"Resume Contact AI","description":"Resume AI responses for a contact.","parameters":[{"schema":{"type":"string","description":"Contact identifier"},"required":true,"description":"Contact identifier","name":"id","in":"path"},{"schema":{"type":"string"},"required":false,"name":"workspace_id","in":"query"}],"responses":{"200":{"description":"Resume Contact AI","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"language":{"type":"string","nullable":true},"id":{"type":"string"},"workspace_id":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string","nullable":true},"image_url":{"type":"string","nullable":true},"type":{"type":"string","nullable":true},"inbox_type_id":{"type":"string"},"archived":{"type":"boolean"},"ai_paused":{"type":"boolean"},"last_message_at":{"type":"string","nullable":true},"created_at":{"type":"string"},"channels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"value":{"type":"string"}},"required":["id","type","value"]}}},"required":["language","id","workspace_id","first_name","last_name","image_url","type","inbox_type_id","archived","ai_paused","last_message_at","created_at","channels"]}},"required":["data"],"description":"Single contact response.","example":{"data":{"id":"ph77c0dy0mgdpzmqz6tesry8w184002s","workspace_id":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o","first_name":"Jane","last_name":"Doe","image_url":null,"language":null,"type":null,"inbox_type_id":"guest","archived":false,"ai_paused":false,"last_message_at":"2026-04-03T03:14:15.000Z","created_at":"2026-04-01T17:22:10.000Z","channels":[{"id":"ns782tta8jzdst8a2w5vdcgfnd841nzf","type":"unthreaded_email","value":"jane@example.com"}]}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}}},"/v1/custom-attributes":{"get":{"operationId":"listCustomAttributes","security":[{"bearerAuth":[]}],"tags":["contacts"],"summary":"List Custom Attributes","description":"List custom attribute definitions for a workspace.","parameters":[{"schema":{"type":"string","description":"Workspace identifier from `list_workspaces`"},"required":true,"description":"Workspace identifier from `list_workspaces`","name":"workspace_id","in":"query"}],"responses":{"200":{"description":"List Custom Attributes","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"options":{"type":"array","nullable":true,"items":{"type":"object","properties":{"value":{"type":"string"},"color":{"type":"string"}},"required":["value","color"]}},"order":{"type":"number","nullable":true},"section_id":{"type":"string","nullable":true},"section_name":{"type":"string","nullable":true}},"required":["id","workspace_id","name","type","options","order","section_id","section_name"]}}},"required":["data"],"description":"Custom attribute definition list.","example":{"data":[{"id":"attr_123","workspace_id":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o","name":"VIP Status","type":"Select","options":[{"value":"standard","color":"gray"},{"value":"vip","color":"green"}],"order":1,"section_id":"section_123","section_name":"Contact Info"}]}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}}},"/v1/contacts/{id}/custom-attributes":{"get":{"operationId":"getContactCustomAttributes","security":[{"bearerAuth":[]}],"tags":["contacts"],"summary":"Get Contact Custom Attributes","description":"Get custom attribute values for a contact.","parameters":[{"schema":{"type":"string","description":"Contact identifier"},"required":true,"description":"Contact identifier","name":"id","in":"path"},{"schema":{"type":"string"},"required":false,"name":"workspace_id","in":"query"}],"responses":{"200":{"description":"Get Contact Custom Attributes","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"options":{"type":"array","nullable":true,"items":{"type":"object","properties":{"value":{"type":"string"},"color":{"type":"string"}},"required":["value","color"]}},"order":{"type":"number","nullable":true},"section_id":{"type":"string","nullable":true},"section_name":{"type":"string","nullable":true},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"nullable":true},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},{"nullable":true}]}},"required":["id","workspace_id","name","type","options","order","section_id","section_name","value"]}}},"required":["data"],"description":"Custom attributes for a contact.","example":{"data":[{"id":"attr_123","workspace_id":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o","name":"VIP Status","type":"Select","options":[{"value":"standard","color":"gray"},{"value":"vip","color":"green"}],"order":1,"section_id":"section_123","section_name":"Contact Info","value":"vip"},{"id":"attr_456","workspace_id":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o","name":"Move-in Date","type":"Date","options":null,"order":2,"section_id":"section_123","section_name":"Contact Info","value":null}]}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}},"patch":{"operationId":"patchContactCustomAttributes","security":[{"bearerAuth":[]}],"tags":["contacts"],"summary":"Patch Contact Custom Attributes","description":"Update custom attribute values for a contact.","parameters":[{"schema":{"type":"string","description":"Contact identifier"},"required":true,"description":"Contact identifier","name":"id","in":"path"},{"schema":{"type":"string"},"required":false,"name":"workspace_id","in":"query"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"attributes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"nullable":true},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},{"nullable":true}]}},"required":["id","value"]},"minItems":1}},"required":["attributes"]}}}},"responses":{"200":{"description":"Patch Contact Custom Attributes","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"options":{"type":"array","nullable":true,"items":{"type":"object","properties":{"value":{"type":"string"},"color":{"type":"string"}},"required":["value","color"]}},"order":{"type":"number","nullable":true},"section_id":{"type":"string","nullable":true},"section_name":{"type":"string","nullable":true},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"nullable":true},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},{"nullable":true}]}},"required":["id","workspace_id","name","type","options","order","section_id","section_name","value"]}}},"required":["data"],"description":"Custom attributes for a contact.","example":{"data":[{"id":"attr_123","workspace_id":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o","name":"VIP Status","type":"Select","options":[{"value":"standard","color":"gray"},{"value":"vip","color":"green"}],"order":1,"section_id":"section_123","section_name":"Contact Info","value":"vip"},{"id":"attr_456","workspace_id":"j57demo8f8x7c9v0n2q4r6t8y1u3i5o","name":"Move-in Date","type":"Date","options":null,"order":2,"section_id":"section_123","section_name":"Contact Info","value":null}]}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}}},"/v1/call-groups":{"post":{"operationId":"createCallGroup","security":[{"bearerAuth":[]}],"tags":["callGroups"],"summary":"Create Call Group","description":"Create a call group that routes inbound calls from workspace phone numbers to workspace users. Requires the Manage Assignment Schedule permission.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspace_id":{"type":"string","description":"Workspace identifier from `list_workspaces`"},"name":{"type":"string","minLength":1,"description":"Human-readable call group name"},"strategy":{"type":"string","enum":["longest_idle","simultaneous"],"description":"How inbound calls are distributed among group members"},"auto_away_enabled":{"type":"boolean","description":"Whether repeated missed calls set members away for longest-idle routing; ignored for simultaneous routing"},"member_user_ids":{"type":"array","items":{"type":"string"},"description":"Workspace user ids that should receive calls for this group"},"phone_number_ids":{"type":"array","items":{"type":"string"},"description":"Workspace phone number config ids assigned to this group"}},"required":["workspace_id","name","strategy","member_user_ids","phone_number_ids"]}}}},"responses":{"201":{"description":"Create Call Group","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"name":{"type":"string"},"strategy":{"type":"string","enum":["longest_idle","simultaneous"],"description":"How inbound calls are distributed among group members"},"auto_away_enabled":{"type":"boolean","nullable":true},"member_user_ids":{"type":"array","items":{"type":"string"}},"phone_number_ids":{"type":"array","items":{"type":"string"}},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","workspace_id","name","strategy","auto_away_enabled","member_user_ids","phone_number_ids","created_at","updated_at"]}},"required":["data"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}}},"/v1/call-groups/{id}":{"patch":{"operationId":"patchCallGroup","security":[{"bearerAuth":[]}],"tags":["callGroups"],"summary":"Patch Call Group","description":"Edit a call group's name, routing strategy, auto-away behavior, members, or phone numbers. Only supplied fields change. Requires the Manage Assignment Schedule permission.","parameters":[{"schema":{"type":"string","description":"Call group identifier returned by create_call_group"},"required":true,"description":"Call group identifier returned by create_call_group","name":"id","in":"path"},{"schema":{"type":"string","description":"Workspace identifier from `list_workspaces`"},"required":true,"description":"Workspace identifier from `list_workspaces`","name":"workspace_id","in":"query"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"New call group name"},"strategy":{"type":"string","enum":["longest_idle","simultaneous"],"description":"How inbound calls are distributed among group members"},"auto_away_enabled":{"type":"boolean"},"member_user_ids":{"type":"array","items":{"type":"string"},"description":"Workspace user ids that should receive calls for this group"},"phone_number_ids":{"type":"array","items":{"type":"string"},"description":"Workspace phone number config ids assigned to this group"}}}}}},"responses":{"200":{"description":"Patch Call Group","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"name":{"type":"string"},"strategy":{"type":"string","enum":["longest_idle","simultaneous"],"description":"How inbound calls are distributed among group members"},"auto_away_enabled":{"type":"boolean","nullable":true},"member_user_ids":{"type":"array","items":{"type":"string"}},"phone_number_ids":{"type":"array","items":{"type":"string"}},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","workspace_id","name","strategy","auto_away_enabled","member_user_ids","phone_number_ids","created_at","updated_at"]}},"required":["data"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}}},"/v1/reservation-alterations":{"get":{"operationId":"listReservationAlterations","security":[{"bearerAuth":[]}],"tags":["reservations"],"summary":"List Reservation Alterations","description":"List pending guest-requested Airbnb reservation alterations. Compare current and requested dates, guest counts, and host payout before responding. Poll this tool to discover new requests.","parameters":[{"schema":{"type":"string","description":"Workspace identifier from `list_workspaces`"},"required":true,"description":"Workspace identifier from `list_workspaces`","name":"workspace_id","in":"query"},{"schema":{"type":"string","enum":["pending"]},"required":false,"name":"status","in":"query"},{"schema":{"type":"integer","nullable":true,"minimum":1,"maximum":100},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","nullable":true},"required":false,"name":"cursor","in":"query"}],"responses":{"200":{"description":"List Reservation Alterations","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"reservation_id":{"type":"string"},"confirmation_code":{"type":"string"},"listing_id":{"type":"string"},"provider":{"type":"string","enum":["airbnb"]},"status":{"type":"string","enum":["pending"]},"initiated_by":{"type":"string","enum":["guest"]},"current":{"type":"object","properties":{"arrival_date":{"type":"string","nullable":true},"departure_date":{"type":"string","nullable":true},"num_nights":{"type":"number","nullable":true},"number_of_guests":{"type":"number","nullable":true},"number_of_adults":{"type":"number","nullable":true},"number_of_children":{"type":"number","nullable":true},"number_of_infants":{"type":"number","nullable":true},"number_of_pets":{"type":"number","nullable":true},"expected_payout_amount":{"type":"number","nullable":true},"currency":{"type":"string","nullable":true}},"required":["arrival_date","departure_date","num_nights","number_of_guests","number_of_adults","number_of_children","number_of_infants","number_of_pets","expected_payout_amount","currency"]},"requested":{"type":"object","properties":{"arrival_date":{"type":"string","nullable":true},"departure_date":{"type":"string","nullable":true},"num_nights":{"type":"number","nullable":true},"number_of_guests":{"type":"number","nullable":true},"number_of_adults":{"type":"number","nullable":true},"number_of_children":{"type":"number","nullable":true},"number_of_infants":{"type":"number","nullable":true},"number_of_pets":{"type":"number","nullable":true},"expected_payout_amount":{"type":"number","nullable":true},"currency":{"type":"string","nullable":true}},"required":["arrival_date","departure_date","num_nights","number_of_guests","number_of_adults","number_of_children","number_of_infants","number_of_pets","expected_payout_amount","currency"]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","workspace_id","reservation_id","confirmation_code","listing_id","provider","status","initiated_by","current","requested","created_at","updated_at"]}},"next_cursor":{"type":"string","nullable":true},"has_more":{"type":"boolean"}},"required":["data","next_cursor","has_more"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}}},"/v1/reservation-alterations/{alteration_id}/response":{"post":{"operationId":"respondToReservationAlteration","security":[{"bearerAuth":[]}],"tags":["reservations"],"summary":"Respond to Reservation Alteration","description":"Accept or decline a pending guest-requested Airbnb reservation alteration. An accepted change applies on Airbnb and can change reservation dates, guest counts, charges, or refunds. A declined change leaves the original reservation unchanged.","parameters":[{"schema":{"type":"string","description":"Airbnb alteration identifier"},"required":true,"description":"Airbnb alteration identifier","name":"alteration_id","in":"path"},{"schema":{"type":"string","description":"Workspace identifier from `list_workspaces`"},"required":true,"description":"Workspace identifier from `list_workspaces`","name":"workspace_id","in":"query"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"decision":{"type":"string","enum":["accept","decline"]}},"required":["decision"]}}}},"responses":{"200":{"description":"Respond to Reservation Alteration","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"decision":{"type":"string","enum":["accept","decline"]},"status":{"type":"string","enum":["accepted","declined"]},"already_applied":{"type":"boolean"}},"required":["id","decision","status","already_applied"]}},"required":["data"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}}},"/v1/workspaces/{workspace_id}/workflow-folders":{"get":{"operationId":"listWorkflowFolders","security":[{"bearerAuth":[]}],"tags":["workflows"],"summary":"List Workflow Folders","description":"List workflow folders in a workspace. Use the returned folder ids with move_workflow_to_folder.","parameters":[{"schema":{"type":"string","description":"Workspace identifier from `list_workspaces`"},"required":true,"description":"Workspace identifier from `list_workspaces`","name":"workspace_id","in":"path"},{"schema":{"type":"integer","nullable":true,"minimum":1,"maximum":100},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","nullable":true},"required":false,"name":"cursor","in":"query"}],"responses":{"200":{"description":"List Workflow Folders","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"name":{"type":"string"},"created_at":{"type":"string"}},"required":["id","workspace_id","name","created_at"]}},"next_cursor":{"type":"string","nullable":true},"has_more":{"type":"boolean"}},"required":["data","next_cursor","has_more"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}},"post":{"operationId":"createWorkflowFolder","security":[{"bearerAuth":[]}],"tags":["workflows"],"summary":"Create Workflow Folder","description":"Create a workflow folder in a workspace. Requires the Manage Workflows permission.","parameters":[{"schema":{"type":"string","description":"Workspace identifier from `list_workspaces`"},"required":true,"description":"Workspace identifier from `list_workspaces`","name":"workspace_id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Workflow folder name"}},"required":["name"]}}}},"responses":{"201":{"description":"Create Workflow Folder","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"name":{"type":"string"},"created_at":{"type":"string"}},"required":["id","workspace_id","name","created_at"]}},"required":["data"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}}},"/v1/workflows/{id}/folder":{"patch":{"operationId":"moveWorkflowToFolder","security":[{"bearerAuth":[]}],"tags":["workflows"],"summary":"Move Workflow To Folder","description":"Move a workflow into a workflow folder. Set folder_id to null to remove it from its current folder. Requires the Manage Workflows permission.","parameters":[{"schema":{"type":"string","description":"Workflow (version) identifier"},"required":true,"description":"Workflow (version) identifier","name":"id","in":"path"},{"schema":{"type":"string"},"required":false,"name":"workspace_id","in":"query"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"folder_id":{"type":"string","nullable":true,"minLength":1,"description":"Destination workflow folder id. Set to null to remove the workflow from its folder."}},"required":["folder_id"]}}}},"responses":{"200":{"description":"Move Workflow To Folder","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"workflow_id":{"type":"string"},"master_id":{"type":"string","nullable":true},"folder_id":{"type":"string","nullable":true}},"required":["workflow_id","master_id","folder_id"]}},"required":["data"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}}},"/v1/listings/{listing_id}/snapshot":{"get":{"operationId":"getListing","security":[{"bearerAuth":[]}],"tags":["listings"],"summary":"Get Listing","description":"Get details for one workspace listing by listing_id, usually after list_listings. Returns documented active status, latest status-change metadata when recorded, and an allowlisted listing snapshot for agent context and availability workflows. Does not return door codes, wifi credentials, custom fields, manuals, images, or raw PMS data.","parameters":[{"schema":{"anyOf":[{"type":"string"},{"type":"number"}],"description":"Listing ID returned by list_listings or used by check_listing_availability."},"required":true,"description":"Listing ID returned by list_listings or used by check_listing_availability.","name":"listing_id","in":"path"},{"schema":{"type":"string","description":"The workspace ID to get the listing from."},"required":true,"description":"The workspace ID to get the listing from.","name":"workspace_id","in":"query"}],"responses":{"200":{"description":"Get Listing","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"found":{"type":"boolean","description":"Whether a matching listing was found."},"listing":{"type":"object","properties":{"listingId":{"type":"string","description":"Listing ID to pass as listing_id to check_listing_availability."},"name":{"type":"string","description":"Display name, preferring the internal listing name."},"publicName":{"type":"string","description":"Public listing name from the PMS."},"internalName":{"type":"string","description":"Internal listing name, when configured."},"pmsPlatform":{"type":"string","description":"The property management system this listing is synced from."},"fullAddress":{"type":"string","description":"Full listing address."},"street":{"type":"string","description":"Street address."},"city":{"type":"string","description":"City."},"state":{"type":"string","description":"State or region."},"zip":{"type":"string","description":"Postal code."},"country":{"type":"string","description":"Country."},"timezone":{"type":"string","description":"IANA timezone of the listing."},"isActive":{"type":"boolean","description":"Whether the listing is active in Conduit."},"active":{"type":"boolean","description":"Whether the listing is active in Conduit."},"status_changed_at":{"type":"string","format":"date-time","description":"When the active status last changed. Omitted for changes made before status auditing was introduced."},"status_changed_by":{"type":"object","properties":{"kind":{"type":"string","enum":["user","system"]},"user_id":{"type":"string"}},"required":["kind"],"description":"Who last changed the active status. Omitted for changes made before status auditing was introduced."},"status_source":{"type":"string","enum":["conduit","pms"],"description":"Where the latest recorded status change originated. Omitted for changes made before status auditing was introduced."},"bedrooms":{"type":"number","description":"Number of bedrooms."},"beds":{"type":"number","description":"Number of beds."},"bathrooms":{"type":"number","description":"Number of bathrooms."},"maxGuests":{"type":"number","description":"Maximum guest count."},"minNights":{"type":"number","description":"Minimum stay length in nights."},"maxNights":{"type":"number","description":"Maximum stay length in nights."},"maxPets":{"type":"number","description":"Maximum allowed pets."},"squareMeters":{"type":"number","description":"Listing size in square metres."},"nightlyPrice":{"type":"number","description":"Base nightly price when known."},"currency":{"type":"string","description":"ISO 4217 currency code for prices."},"imageUrl":{"type":"string","format":"uri","description":"Primary public listing image."},"description":{"type":"string","description":"Compact public listing description."},"amenities":{"type":"array","items":{"type":"string"},"description":"Compact list of public amenities."},"houseRules":{"type":"string","description":"Compact public house rules."},"cancellationPolicy":{"type":"string","description":"Compact cancellation policy summary."},"guidebookUrl":{"type":"string","description":"Guest-facing guidebook URL."},"checkInTime":{"type":"string","description":"Check-in time, when known."},"checkOutTime":{"type":"string","description":"Check-out time, when known."}},"required":["listingId","name","publicName","pmsPlatform","fullAddress","isActive","active"],"description":"Allowlisted listing details. Present only when found is true."}},"required":["found"]}},"required":["data"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}}},"/v1/listings/catalog":{"get":{"operationId":"listListings","security":[{"bearerAuth":[]}],"tags":["listings"],"summary":"List Listings","description":"List workspace listings with the listingId needed by check_listing_availability and other exact listing operations. Use query to narrow by internal listing name, or omit it to browse paginated listings. Use listing_ids to return an exact ordered subset. Use active to select active or inactive listings; include_inactive defaults to true when active is omitted. Results contain documented active-status metadata plus sanitized public details including images, descriptions, capacity, amenities, and base nightly price when known.","parameters":[{"schema":{"type":"string","description":"The workspace ID to list listings for"},"required":true,"description":"The workspace ID to list listings for","name":"workspace_id","in":"query"},{"schema":{"type":"string"},"required":false,"name":"query","in":"query"},{"schema":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]},"minItems":1,"maxItems":50},"required":false,"name":"listing_ids","in":"query"},{"schema":{"type":"boolean"},"required":false,"name":"active","in":"query"},{"schema":{"type":"boolean","default":true},"required":false,"name":"include_inactive","in":"query"},{"schema":{"type":"string","nullable":true},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"integer","nullable":true,"minimum":1,"maximum":50},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"List Listings","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"listings":{"type":"array","items":{"type":"object","properties":{"listingId":{"type":"string","description":"Listing ID to pass as listing_id to check_listing_availability."},"name":{"type":"string","description":"Listing display name, preferring the internal name when configured."},"publicName":{"type":"string","description":"Public listing name from the PMS."},"internalName":{"type":"string","description":"Internal listing name, when configured."},"pmsPlatform":{"type":"string","description":"The property management system this listing is synced from"},"address":{"type":"string","description":"Full listing address"},"city":{"type":"string","description":"City the listing is in"},"bedrooms":{"type":"number","description":"Number of bedrooms"},"beds":{"type":"number","description":"Number of beds"},"bathrooms":{"type":"number","description":"Number of bathrooms"},"maxGuests":{"type":"number","description":"Maximum guest count"},"maxPets":{"type":"number","description":"Maximum allowed pets"},"squareMeters":{"type":"number","description":"Listing size in square metres"},"nightlyPrice":{"type":"number","description":"Base nightly price when known"},"currency":{"type":"string","description":"ISO 4217 currency code for prices"},"imageUrl":{"type":"string","format":"uri","description":"Primary public listing image"},"description":{"type":"string","description":"Compact public listing description"},"amenities":{"type":"array","items":{"type":"string"},"description":"Compact list of public amenities"},"timezone":{"type":"string","description":"IANA timezone of the listing"},"isActive":{"type":"boolean","description":"Whether the listing is active in Conduit"},"active":{"type":"boolean","description":"Whether the listing is active in Conduit."},"status_changed_at":{"type":"string","format":"date-time","description":"When the active status last changed. Omitted for changes made before status auditing was introduced."},"status_changed_by":{"type":"object","properties":{"kind":{"type":"string","enum":["user","system"]},"user_id":{"type":"string"}},"required":["kind"],"description":"Who last changed the active status. Omitted for changes made before status auditing was introduced."},"status_source":{"type":"string","enum":["conduit","pms"],"description":"Where the latest recorded status change originated. Omitted for changes made before status auditing was introduced."}},"required":["listingId","name","publicName","pmsPlatform","address","isActive","active"]},"description":"Workspace listings matching the request"},"nextCursor":{"type":"string","description":"Cursor for the next page, when hasMore is true"},"hasMore":{"type":"boolean","description":"Whether another page of results is available"}},"required":["listings","hasMore"]}},"required":["data"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}}},"/v1/listing-groups":{"get":{"operationId":"listListingGroups","security":[{"bearerAuth":[]}],"tags":["listings"],"summary":"List Listing Groups","description":"List the listing groups in a workspace. Use a group_id with list_listing_group_listings to inspect its members.","parameters":[{"schema":{"type":"string","description":"The workspace ID to list listing groups for."},"required":true,"description":"The workspace ID to list listing groups for.","name":"workspace_id","in":"query"},{"schema":{"type":"string","nullable":true},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"integer","nullable":true,"minimum":1,"maximum":50},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"List Listing Groups","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"groups":{"type":"array","items":{"type":"object","properties":{"groupId":{"type":"string","description":"Conduit listing group ID."},"name":{"type":"string","description":"Listing group name."},"listingCount":{"type":"integer","minimum":0,"description":"Number of group members."}},"required":["groupId","name","listingCount"]}},"nextCursor":{"type":"string"},"hasMore":{"type":"boolean"}},"required":["groups","hasMore"]}},"required":["data"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}}},"/v1/listing-groups/{group_id}/listings":{"get":{"operationId":"listListingGroupListings","security":[{"bearerAuth":[]}],"tags":["listings"],"summary":"List Listing Group Listings","description":"List the listings stored in one listing group. Results include active status and retain unavailable group members.","parameters":[{"schema":{"type":"string","description":"Listing group ID returned by list_listing_groups."},"required":true,"description":"Listing group ID returned by list_listing_groups.","name":"group_id","in":"path"},{"schema":{"type":"string","description":"The workspace ID that owns the listing group."},"required":true,"description":"The workspace ID that owns the listing group.","name":"workspace_id","in":"query"},{"schema":{"type":"string","nullable":true,"pattern":"^\\d+$"},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"integer","nullable":true,"minimum":1,"maximum":50},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"List Listing Group Listings","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"found":{"type":"boolean"},"group":{"type":"object","properties":{"groupId":{"type":"string","description":"Conduit listing group ID."},"name":{"type":"string","description":"Listing group name."},"listingCount":{"type":"integer","minimum":0,"description":"Number of group members."}},"required":["groupId","name","listingCount"]},"listings":{"type":"array","items":{"type":"object","properties":{"listingId":{"type":"string","description":"PMS listing ID stored in the group."},"found":{"type":"boolean","description":"Whether the listing still exists in this workspace."},"name":{"type":"string","description":"Listing name. Omitted when the listing is unavailable."},"isActive":{"type":"boolean","description":"Whether the listing is active in Conduit."}},"required":["listingId","found","isActive"]}},"nextCursor":{"type":"string"},"hasMore":{"type":"boolean"}},"required":["found","listings","hasMore"]}},"required":["data"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}}},"/v1/workspaces/{workspace_id}/portal-sessions":{"get":{"operationId":"listPortalSessions","security":[{"bearerAuth":[]}],"tags":["portals"],"summary":"List Portal Sessions","description":"List reservations selected by arrival date, departure date, listing, contact, or PMS reservation identifiers. Each reservation includes one nullable portal session and check-in progress summary.","parameters":[{"schema":{"type":"string","minLength":1,"description":"Workspace identifier"},"required":true,"description":"Workspace identifier","name":"workspace_id","in":"path"},{"schema":{"type":"string","format":"date"},"required":false,"name":"arrival_date","in":"query"},{"schema":{"type":"string","format":"date"},"required":false,"name":"departure_date","in":"query"},{"schema":{"type":"string","minLength":1},"required":false,"name":"listing_id","in":"query"},{"schema":{"type":"string","minLength":1},"required":false,"name":"contact_id","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":10000},"required":false,"name":"external_reservation_ids","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"}],"responses":{"200":{"description":"List Portal Sessions","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"reservation":{"type":"object","properties":{"id":{"type":"string","minLength":1},"external_id":{"type":"string"},"listing_id":{"type":"string","nullable":true},"arrival_date":{"type":"string"},"departure_date":{"type":"string"}},"required":["id","external_id","listing_id","arrival_date","departure_date"]},"session":{"type":"object","nullable":true,"properties":{"id":{"type":"string","minLength":1},"workspace_id":{"type":"string","minLength":1},"template_id":{"type":"string","minLength":1},"template_name":{"type":"string","nullable":true},"contact_id":{"type":"string","minLength":1},"reservation_id":{"type":"string","nullable":true,"minLength":1},"submission_id":{"type":"string","nullable":true,"minLength":1},"state":{"type":"string","enum":["outstanding","completed","expired","delivery_failed"]},"status":{"type":"string","enum":["active","completed","expired"]},"source_channel":{"type":"string","enum":["auto","sms","whatsapp","email"]},"created_at":{"type":"string","format":"date-time"},"expires_at":{"type":"string","format":"date-time"},"viewed_at":{"type":"string","nullable":true,"format":"date-time"},"completed_at":{"type":"string","nullable":true,"format":"date-time"},"last_interaction_at":{"type":"string","nullable":true,"format":"date-time"},"delivered_at":{"type":"string","nullable":true,"format":"date-time"},"delivery_failed_at":{"type":"string","nullable":true,"format":"date-time"},"progress":{"type":"object","properties":{"status":{"type":"string","enum":["not_started","needs_agreement","needs_signature","needs_waiver_payment","needs_id","needs_review","needs_deposit","needs_fee","needs_details","needs_questions","needs_guests","rejected","ready"]},"next_step":{"type":"string","nullable":true,"enum":["agreement","damage_waiver","id_check","security_deposit","mandatory_fee","guest_details","additional_questions","other_guests"]},"counts":{"type":"object","properties":{"total":{"type":"integer","minimum":0},"completed":{"type":"integer","minimum":0},"pending":{"type":"integer","minimum":0},"waived":{"type":"integer","minimum":0}},"required":["total","completed","pending","waived"]}},"required":["status","next_step","counts"]}},"required":["id","workspace_id","template_id","template_name","contact_id","reservation_id","submission_id","state","status","source_channel","created_at","expires_at","viewed_at","completed_at","last_interaction_at","delivered_at","delivery_failed_at","progress"]}},"required":["reservation","session"]}},"next_cursor":{"type":"string","nullable":true},"has_more":{"type":"boolean"}},"required":["data","next_cursor","has_more"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}}},"/v1/workspaces/{workspace_id}/portal-sessions/{session_id}":{"get":{"operationId":"getPortalSession","security":[{"bearerAuth":[]}],"tags":["portals"],"summary":"Get Portal Session","description":"Get one portal session with reservation-scoped check-in progress, every submitted field, safe order summaries, ticket references, and downloadable Conduit-stored assets. Provider-hosted files are reported as unavailable rather than omitted.","parameters":[{"schema":{"type":"string","minLength":1,"description":"Workspace identifier"},"required":true,"description":"Workspace identifier","name":"workspace_id","in":"path"},{"schema":{"type":"string","minLength":1,"description":"Portal session identifier"},"required":true,"description":"Portal session identifier","name":"session_id","in":"path"}],"responses":{"200":{"description":"Get Portal Session","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"session":{"type":"object","properties":{"id":{"type":"string","minLength":1},"workspace_id":{"type":"string","minLength":1},"template_id":{"type":"string","minLength":1},"template_name":{"type":"string","nullable":true},"contact_id":{"type":"string","minLength":1},"reservation_id":{"type":"string","nullable":true,"minLength":1},"submission_id":{"type":"string","nullable":true,"minLength":1},"state":{"type":"string","enum":["outstanding","completed","expired","delivery_failed"]},"status":{"type":"string","enum":["active","completed","expired"]},"source_channel":{"type":"string","enum":["auto","sms","whatsapp","email"]},"created_at":{"type":"string","format":"date-time"},"expires_at":{"type":"string","format":"date-time"},"viewed_at":{"type":"string","nullable":true,"format":"date-time"},"completed_at":{"type":"string","nullable":true,"format":"date-time"},"last_interaction_at":{"type":"string","nullable":true,"format":"date-time"},"delivered_at":{"type":"string","nullable":true,"format":"date-time"},"delivery_failed_at":{"type":"string","nullable":true,"format":"date-time"},"delivery_failure_reason":{"type":"string","nullable":true}},"required":["id","workspace_id","template_id","template_name","contact_id","reservation_id","submission_id","state","status","source_channel","created_at","expires_at","viewed_at","completed_at","last_interaction_at","delivered_at","delivery_failed_at","delivery_failure_reason"]},"contact":{"type":"object","properties":{"id":{"type":"string","minLength":1},"full_name":{"type":"string"},"email":{"type":"string","nullable":true},"phone":{"type":"string","nullable":true}},"required":["id","full_name","email","phone"]},"reservation":{"type":"object","nullable":true,"properties":{"id":{"type":"string","minLength":1},"external_id":{"type":"string"},"channel_reservation_id":{"type":"string","nullable":true},"confirmation_code":{"type":"string","nullable":true},"pms_platform":{"type":"string"},"arrival_date":{"type":"string"},"departure_date":{"type":"string"}},"required":["id","external_id","channel_reservation_id","confirmation_code","pms_platform","arrival_date","departure_date"]},"submission":{"type":"object","nullable":true,"properties":{"id":{"type":"string","minLength":1},"scope":{"type":"string","enum":["reservation","session"]},"origin_session_id":{"type":"string","minLength":1},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","scope","origin_session_id","created_at","updated_at"]},"tickets":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"delivered_at":{"type":"string","format":"date-time"}},"required":["id","delivered_at"]}},"progress":{"type":"object","properties":{"status":{"type":"string","enum":["not_started","needs_agreement","needs_signature","needs_waiver_payment","needs_id","needs_review","needs_deposit","needs_fee","needs_details","needs_questions","needs_guests","rejected","ready"]},"next_step":{"type":"string","nullable":true,"enum":["agreement","damage_waiver","id_check","security_deposit","mandatory_fee","guest_details","additional_questions","other_guests"]},"counts":{"type":"object","properties":{"total":{"type":"integer","minimum":0},"completed":{"type":"integer","minimum":0},"pending":{"type":"integer","minimum":0},"waived":{"type":"integer","minimum":0}},"required":["total","completed","pending","waived"]},"steps":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"step_type":{"type":"string","enum":["agreement"]},"state":{"type":"string","enum":["pending","completed","waived"]},"completed_at":{"type":"string","nullable":true,"format":"date-time"},"waived":{"type":"object","nullable":true,"properties":{"at":{"type":"string","nullable":true,"format":"date-time"},"by_name":{"type":"string","nullable":true},"reason":{"type":"string","nullable":true}},"required":["at","by_name","reason"]},"details":{"type":"object","nullable":true,"properties":{"submissions":{"type":"array","items":{"type":"object","properties":{"instance_id":{"type":"string"},"signed_at":{"type":"string","format":"date-time"},"signature_name":{"type":"string"},"title":{"type":"string"},"body":{"type":"string"},"field_responses":{"type":"array","items":{"type":"object","properties":{"field_id":{"type":"string"},"kind":{"type":"string","enum":["short_text","long_text","email","phone","date","checkbox","select","multi_select","acknowledgment","initials"]},"value":{"anyOf":[{"type":"string"},{"type":"boolean"},{"type":"array","items":{"type":"string"}}]}},"required":["field_id","kind","value"]}}},"required":["instance_id","signed_at","signature_name","title","body","field_responses"]}}},"required":["submissions"]}},"required":["step_type","state","completed_at","waived","details"]},{"type":"object","properties":{"step_type":{"type":"string","enum":["damage_waiver"]},"state":{"type":"string","enum":["pending","completed","waived"]},"completed_at":{"type":"string","nullable":true,"format":"date-time"},"waived":{"type":"object","nullable":true,"properties":{"at":{"type":"string","nullable":true,"format":"date-time"},"by_name":{"type":"string","nullable":true},"reason":{"type":"string","nullable":true}},"required":["at","by_name","reason"]},"details":{"type":"object","nullable":true,"properties":{"signed_at":{"type":"string","format":"date-time"},"signature_name":{"type":"string"},"title":{"type":"string"},"body":{"type":"string"},"paid_at":{"type":"string","nullable":true,"format":"date-time"},"paid_amount_in_cents":{"type":"integer","nullable":true},"currency":{"type":"string","nullable":true},"field_responses":{"type":"array","items":{"type":"object","properties":{"field_id":{"type":"string"},"kind":{"type":"string","enum":["short_text","long_text","email","phone","date","checkbox","select","multi_select","acknowledgment","initials"]},"value":{"anyOf":[{"type":"string"},{"type":"boolean"},{"type":"array","items":{"type":"string"}}]}},"required":["field_id","kind","value"]}}},"required":["signed_at","signature_name","title","body","paid_at","paid_amount_in_cents","currency","field_responses"]}},"required":["step_type","state","completed_at","waived","details"]},{"type":"object","properties":{"step_type":{"type":"string","enum":["id_check"]},"state":{"type":"string","enum":["pending","completed","waived"]},"completed_at":{"type":"string","nullable":true,"format":"date-time"},"waived":{"type":"object","nullable":true,"properties":{"at":{"type":"string","nullable":true,"format":"date-time"},"by_name":{"type":"string","nullable":true},"reason":{"type":"string","nullable":true}},"required":["at","by_name","reason"]},"details":{"type":"object","nullable":true,"properties":{"submitted_at":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["pending","submitted","approved","rejected"]},"reviewed_at":{"type":"string","nullable":true,"format":"date-time"},"review_note":{"type":"string","nullable":true},"provider":{"type":"string","enum":["conduit","didit"]},"didit_status":{"type":"string","nullable":true},"document_type":{"type":"string","nullable":true,"enum":["drivers_license","passport","state_id","other"]},"document_type_label":{"type":"string","nullable":true},"full_name":{"type":"string","nullable":true},"date_of_birth":{"type":"string","nullable":true},"issuing_country":{"type":"string","nullable":true},"expiry_date":{"type":"string","nullable":true},"liveness_score":{"type":"number","nullable":true},"face_match_score":{"type":"number","nullable":true},"warnings":{"type":"array","items":{"type":"object","properties":{"risk":{"type":"string"},"type":{"type":"string"},"description":{"type":"string"}},"required":["risk","type","description"]}},"ai_review":{"type":"object","nullable":true,"properties":{"reviewed_at":{"type":"string","format":"date-time"},"model":{"type":"string"},"status":{"type":"string","enum":["passed","failed","uncertain"]},"document_readable":{"type":"boolean"},"name_matches":{"type":"boolean","nullable":true},"face_matches":{"type":"boolean","nullable":true},"reason":{"type":"string"}},"required":["reviewed_at","model","status","document_readable","name_matches","face_matches","reason"]}},"required":["submitted_at","status","reviewed_at","review_note","provider","didit_status","document_type","document_type_label","full_name","date_of_birth","issuing_country","expiry_date","liveness_score","face_match_score","warnings","ai_review"]}},"required":["step_type","state","completed_at","waived","details"]},{"type":"object","properties":{"step_type":{"type":"string","enum":["security_deposit"]},"state":{"type":"string","enum":["pending","completed","waived"]},"completed_at":{"type":"string","nullable":true,"format":"date-time"},"waived":{"type":"object","nullable":true,"properties":{"at":{"type":"string","nullable":true,"format":"date-time"},"by_name":{"type":"string","nullable":true},"reason":{"type":"string","nullable":true}},"required":["at","by_name","reason"]},"details":{"type":"object","nullable":true,"properties":{"status":{"type":"string","enum":["pending_setup","scheduled","processing","action_required","pending_authorization","authorized","charged","renewal_required","renewed","released","captured","failed","canceled"]},"amount_in_cents":{"type":"integer"},"currency":{"type":"string"},"setup_completed_at":{"type":"string","nullable":true,"format":"date-time"},"authorization_scheduled_at":{"type":"string","nullable":true,"format":"date-time"},"authorized_at":{"type":"string","nullable":true,"format":"date-time"},"release_eligible_at":{"type":"string","nullable":true,"format":"date-time"},"released_at":{"type":"string","nullable":true,"format":"date-time"},"captured_at":{"type":"string","nullable":true,"format":"date-time"},"captured_amount_in_cents":{"type":"integer","nullable":true}},"required":["status","amount_in_cents","currency","setup_completed_at","authorization_scheduled_at","authorized_at","release_eligible_at","released_at","captured_at","captured_amount_in_cents"]}},"required":["step_type","state","completed_at","waived","details"]},{"type":"object","properties":{"step_type":{"type":"string","enum":["mandatory_fee"]},"state":{"type":"string","enum":["pending","completed","waived"]},"completed_at":{"type":"string","nullable":true,"format":"date-time"},"waived":{"type":"object","nullable":true,"properties":{"at":{"type":"string","nullable":true,"format":"date-time"},"by_name":{"type":"string","nullable":true},"reason":{"type":"string","nullable":true}},"required":["at","by_name","reason"]},"details":{"type":"object","nullable":true,"properties":{"paid_at":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["pending","paid","refunded","failed","canceled"]},"amount_in_cents":{"type":"integer"},"currency":{"type":"string"},"title":{"type":"string"},"instructions":{"type":"string"},"line_items":{"type":"array","items":{"type":"object","properties":{"instance_id":{"type":"string"},"amount_in_cents":{"type":"integer"},"currency":{"type":"string"},"title":{"type":"string"},"instructions":{"type":"string"}},"required":["instance_id","amount_in_cents","currency","title","instructions"]}}},"required":["paid_at","status","amount_in_cents","currency","title","instructions","line_items"]}},"required":["step_type","state","completed_at","waived","details"]},{"type":"object","properties":{"step_type":{"type":"string","enum":["guest_details"]},"state":{"type":"string","enum":["pending","completed","waived"]},"completed_at":{"type":"string","nullable":true,"format":"date-time"},"waived":{"type":"object","nullable":true,"properties":{"at":{"type":"string","nullable":true,"format":"date-time"},"by_name":{"type":"string","nullable":true},"reason":{"type":"string","nullable":true}},"required":["at","by_name","reason"]},"details":{"type":"object","nullable":true,"properties":{"submitted_at":{"type":"string","format":"date-time"},"full_name":{"type":"string","nullable":true},"email":{"type":"string","nullable":true},"phone":{"type":"string","nullable":true},"eta":{"type":"string","nullable":true},"etd":{"type":"string","nullable":true},"answers":{"type":"array","items":{"type":"object","properties":{"field_id":{"type":"string"},"label":{"type":"string"},"type":{"anyOf":[{"type":"string","enum":["predefined"]},{"type":"string","enum":["text","long_text","country","single_select","multi_select","checkbox","photo_upload","document_upload","attachment"]}]},"predefined_key":{"type":"string","nullable":true,"enum":["full_name","email","phone","eta","etd"]},"value":{"type":"string"},"selected_values":{"type":"array","nullable":true,"items":{"type":"string"}},"checked":{"type":"boolean","nullable":true},"attachments":{"type":"array","items":{"type":"object","properties":{"file_name":{"type":"string","nullable":true},"content_type":{"type":"string","nullable":true},"download_url":{"type":"string","nullable":true,"format":"uri"}},"required":["file_name","content_type","download_url"]}}},"required":["field_id","label","type","predefined_key","value","selected_values","checked","attachments"]}}},"required":["submitted_at","full_name","email","phone","eta","etd","answers"]}},"required":["step_type","state","completed_at","waived","details"]},{"type":"object","properties":{"step_type":{"type":"string","enum":["additional_questions"]},"state":{"type":"string","enum":["pending","completed","waived"]},"completed_at":{"type":"string","nullable":true,"format":"date-time"},"waived":{"type":"object","nullable":true,"properties":{"at":{"type":"string","nullable":true,"format":"date-time"},"by_name":{"type":"string","nullable":true},"reason":{"type":"string","nullable":true}},"required":["at","by_name","reason"]},"details":{"type":"object","nullable":true,"properties":{"sets":{"type":"array","items":{"type":"object","properties":{"instance_id":{"type":"string"},"title":{"type":"string","nullable":true},"submitted_at":{"type":"string","format":"date-time"},"answers":{"type":"array","items":{"type":"object","properties":{"question_id":{"type":"string"},"label":{"type":"string"},"type":{"type":"string","nullable":true,"enum":["text","long_text","country","single_select","multi_select","checkbox","photo_upload","document_upload","attachment"]},"value":{"type":"string"},"selected_values":{"type":"array","nullable":true,"items":{"type":"string"}},"checked":{"type":"boolean","nullable":true},"attachments":{"type":"array","items":{"type":"object","properties":{"file_name":{"type":"string","nullable":true},"content_type":{"type":"string","nullable":true},"download_url":{"type":"string","nullable":true,"format":"uri"}},"required":["file_name","content_type","download_url"]}}},"required":["question_id","label","type","value","selected_values","checked","attachments"]}}},"required":["instance_id","title","submitted_at","answers"]}}},"required":["sets"]}},"required":["step_type","state","completed_at","waived","details"]},{"type":"object","properties":{"step_type":{"type":"string","enum":["other_guests"]},"state":{"type":"string","enum":["pending","completed","waived"]},"completed_at":{"type":"string","nullable":true,"format":"date-time"},"waived":{"type":"object","nullable":true,"properties":{"at":{"type":"string","nullable":true,"format":"date-time"},"by_name":{"type":"string","nullable":true},"reason":{"type":"string","nullable":true}},"required":["at","by_name","reason"]},"details":{"type":"object","nullable":true,"properties":{"submitted_at":{"type":"string","format":"date-time"},"guests":{"type":"array","items":{"type":"object","properties":{"guest_index":{"type":"integer","minimum":0},"full_name":{"type":"string"},"email":{"type":"string","nullable":true},"phone":{"type":"string","nullable":true},"fields":{"type":"array","items":{"type":"object","properties":{"field_id":{"type":"string"},"label":{"type":"string"},"type":{"type":"string","nullable":true,"enum":["text","email","phone","image"]},"value":{"type":"string","nullable":true},"image_file_name":{"type":"string","nullable":true}},"required":["field_id","label","type","value","image_file_name"]}}},"required":["guest_index","full_name","email","phone","fields"]}}},"required":["submitted_at","guests"]}},"required":["step_type","state","completed_at","waived","details"]}]}}},"required":["status","next_step","counts","steps"]},"orders":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"kind":{"type":"string","enum":["purchase","request"]},"status":{"type":"string","enum":["pending","succeeded","failed","refunded","requested","declined","expired"]},"buyer_contact_id":{"type":"string","minLength":1},"currency":{"type":"string"},"subtotal_in_cents":{"type":"integer"},"tax_in_cents":{"type":"integer"},"total_in_cents":{"type":"integer"},"items":{"type":"array","items":{"type":"object","properties":{"offer_id":{"type":"string","minLength":1},"name":{"type":"string"},"unit_amount_in_cents":{"type":"integer"},"quantity":{"type":"integer"},"total_in_cents":{"type":"integer"}},"required":["offer_id","name","unit_amount_in_cents","quantity","total_in_cents"]}},"form_inputs":{"type":"array","items":{"type":"object","properties":{"block_id":{"type":"string"},"name":{"type":"string"},"label":{"type":"string"},"value":{"type":"string"}},"required":["block_id","name","label","value"]}},"created_at":{"type":"string","format":"date-time"},"purchased_at":{"type":"string","nullable":true,"format":"date-time"},"failed_at":{"type":"string","nullable":true,"format":"date-time"},"refunded_at":{"type":"string","nullable":true,"format":"date-time"}},"required":["id","kind","status","buyer_contact_id","currency","subtotal_in_cents","tax_in_cents","total_in_cents","items","form_inputs","created_at","purchased_at","failed_at","refunded_at"]}},"assets":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["id_document","contact_photo","signature","signed_pdf","guest_detail_attachment","question_attachment","other_guest_image"]},"step_type":{"type":"string","enum":["agreement","damage_waiver","id_check","security_deposit","mandatory_fee","guest_details","additional_questions","other_guests"]},"document_type":{"type":"string","nullable":true,"enum":["drivers_license","passport","state_id","other"]},"subject":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["contact"]},"contact_id":{"type":"string","minLength":1}},"required":["type","contact_id"]},{"type":"object","properties":{"type":{"type":"string","enum":["other_guest"]},"guest_index":{"type":"integer","minimum":0},"full_name":{"type":"string"}},"required":["type","guest_index","full_name"]}]},"field":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"label":{"type":"string"}},"required":["id","label"]},"field_path":{"type":"string"},"file_name":{"type":"string","nullable":true},"content_type":{"type":"string","nullable":true},"download_url":{"type":"string","nullable":true,"format":"uri"},"url_expires_at":{"type":"string","nullable":true,"format":"date-time"},"unavailable_reason":{"type":"string","nullable":true,"enum":["provider_hosted","not_stored","deleted"]}},"required":["kind","step_type","document_type","subject","field","field_path","file_name","content_type","download_url","url_expires_at","unavailable_reason"]}}},"required":["session","contact","reservation","submission","tickets","progress","orders","assets"]}},"required":["data"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}}},"/v1/workspaces/{workspace_id}/portal-templates":{"get":{"operationId":"listPortalTemplateCatalog","security":[{"bearerAuth":[]}],"tags":["portals"],"summary":"List Portal Templates","description":"List saved portal templates with their status, version, and update time.","parameters":[{"schema":{"type":"string","minLength":1,"description":"Workspace identifier"},"required":true,"description":"Workspace identifier","name":"workspace_id","in":"path"},{"schema":{"type":"string","enum":["draft","active","paused","archived"]},"required":false,"name":"status","in":"query"},{"schema":{"type":"string"},"required":false,"name":"search","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"}],"responses":{"200":{"description":"List Portal Templates","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"status":{"type":"string","enum":["draft","active","paused","archived"]},"version":{"type":"number"},"updated_at":{"type":"number"}},"required":["id","workspace_id","name","slug","status","version","updated_at"]}},"next_cursor":{"type":"string","nullable":true},"has_more":{"type":"boolean"}},"required":["data","next_cursor","has_more"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}},"post":{"operationId":"createPortalTemplate","security":[{"bearerAuth":[]}],"tags":["portals"],"summary":"Create Portal Template","description":"Create a portal template. A template starts as a draft unless the request sets another valid status.","parameters":[{"schema":{"type":"string","minLength":1,"description":"Workspace identifier"},"required":true,"description":"Workspace identifier","name":"workspace_id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"status":{"type":"string","enum":["draft","active","paused"]},"meta":{"type":"object","properties":{"business_type":{"type":"string","enum":["str","hotel","restaurant","salon","gym","other"]},"expiry_hours":{"type":"number","nullable":true,"minimum":0,"exclusiveMinimum":true}},"required":["business_type"]},"branding":{"type":"object","properties":{"logo_url":{"type":"string","nullable":true},"brand_color":{"type":"string","nullable":true,"pattern":"^#?[0-9a-fA-F]{6}$"},"accent_color":{"type":"string","nullable":true,"pattern":"^#?[0-9a-fA-F]{6}$"},"background_color":{"type":"string","nullable":true,"pattern":"^#?[0-9a-fA-F]{6}$"},"theme":{"type":"string","enum":["light","dark"]}}},"header":{"type":"object","properties":{"business_name":{"type":"string","nullable":true},"context_line":{"type":"string","nullable":true},"hero_source":{"type":"string","nullable":true,"enum":["listing","custom"]},"hero_image_url":{"type":"string","nullable":true},"hero_image_attribution":{"type":"object","nullable":true,"properties":{"source":{"type":"string","enum":["unsplash"]},"photographerName":{"type":"string"},"photographerUrl":{"type":"string","format":"uri"},"photoUrl":{"type":"string","format":"uri"}},"required":["source","photographerName","photographerUrl","photoUrl"]},"show_trust_badge":{"type":"boolean"}}},"layout":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["header"]},"id":{"type":"string"}},"required":["type","id"]},{"type":"object","properties":{"type":{"type":"string","enum":["offerHero"]},"id":{"type":"string"},"offerId":{"type":"string","minLength":1},"badgeLabel":{"type":"string"},"headline":{"type":"string"},"tagline":{"type":"string"}},"required":["type","id","offerId"]},{"type":"object","properties":{"type":{"type":"string","enum":["offer"]},"id":{"type":"string"},"offerId":{"type":"string","minLength":1},"badge":{"type":"object","properties":{"label":{"type":"string"},"tone":{"type":"string","enum":["neutral","success","warning"]}},"required":["label","tone"]}},"required":["type","id","offerId"]},{"type":"object","properties":{"type":{"type":"string","enum":["offerGrid"]},"id":{"type":"string"},"offerIds":{"type":"array","items":{"type":"string","minLength":1}},"columns":{"anyOf":[{"type":"number","enum":[1]},{"type":"number","enum":[2]}]}},"required":["type","id","offerIds","columns"]},{"type":"object","properties":{"type":{"type":"string","enum":["bundle"]},"id":{"type":"string"},"offerIds":{"type":"array","items":{"type":"string","minLength":1}},"bundlePriceInCents":{"type":"integer","minimum":0},"label":{"type":"string"}},"required":["type","id","offerIds","label"]},{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"id":{"type":"string"},"body":{"type":"string"},"variant":{"type":"string","enum":["section","body"]}},"required":["type","id","body","variant"]},{"type":"object","properties":{"type":{"type":"string","enum":["trustStrip"]},"id":{"type":"string"},"items":{"type":"array","items":{"type":"string","enum":["secure_checkout","free_cancellation","verified_business","powered_by_stripe"]}}},"required":["type","id","items"]},{"type":"object","properties":{"type":{"type":"string","enum":["spacer"]},"id":{"type":"string"},"size":{"type":"string","enum":["sm","md","lg"]}},"required":["type","id","size"]},{"type":"object","properties":{"type":{"type":"string","enum":["image"]},"id":{"type":"string"},"url":{"type":"string","format":"uri"},"alt":{"type":"string"},"aspectRatio":{"type":"string","enum":["square","wide","tall"]}},"required":["type","id","url","alt"]},{"type":"object","properties":{"type":{"type":"string","enum":["formInput"]},"id":{"type":"string"},"name":{"type":"string"},"label":{"type":"string"},"placeholder":{"type":"string"},"required":{"type":"boolean"},"inputType":{"type":"string","enum":["text","email","tel"]}},"required":["type","id","name","label","required","inputType"]},{"type":"object","properties":{"type":{"type":"string","enum":["paymentPlaceholder"]},"id":{"type":"string"},"label":{"type":"string"}},"required":["type","id"]}]}},"after_payment":{"type":"object","properties":{"mode":{"type":"string","enum":["stay","full_screen"]},"message":{"type":"string"},"show_receipt":{"type":"boolean"}},"required":["mode","message","show_receipt"]},"confirmation_message":{"type":"object","properties":{"enabled":{"type":"boolean"},"template":{"type":"string"}},"required":["enabled","template"]},"checkout":{"type":"object","properties":{"allow_cart":{"type":"boolean"},"payment_methods":{"type":"array","items":{"type":"string","enum":["card","apple_pay","google_pay","link"]}},"cta_label":{"type":"string"}},"required":["allow_cart","payment_methods","cta_label"]},"smart_lock":{"type":"object","nullable":true,"properties":{"enabled":{"type":"boolean"}},"required":["enabled"]},"listing_data":{"type":"object","nullable":true,"properties":{"enabled":{"type":"boolean"},"fields":{"type":"object","properties":{"address":{"type":"boolean"},"directions":{"type":"boolean"},"area":{"type":"boolean"},"checkInInstructions":{"type":"boolean"},"checkOutInstructions":{"type":"boolean"},"wifi":{"type":"boolean"},"parking":{"type":"boolean"},"houseRules":{"type":"boolean"},"houseManual":{"type":"boolean"},"trash":{"type":"boolean"},"doorCode":{"type":"boolean"}},"required":["directions","area","checkInInstructions","checkOutInstructions","wifi","parking","houseRules","houseManual","trash","doorCode"]}},"required":["enabled","fields"]}},"required":["name"]}}}},"responses":{"201":{"description":"Create Portal Template","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"status":{"type":"string","enum":["draft","active","paused","archived"]},"version":{"type":"number"},"updated_at":{"type":"number"},"config":{"type":"object","additionalProperties":{"nullable":true}}},"required":["id","workspace_id","name","slug","status","version","updated_at","config"]}},"required":["data"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}}},"/v1/workspaces/{workspace_id}/portal-templates/{id}":{"get":{"operationId":"getPortalTemplate","security":[{"bearerAuth":[]}],"tags":["portals"],"summary":"Get Portal Template","description":"Get a portal template's saved configuration and optimistic-lock version.","parameters":[{"schema":{"type":"string","minLength":1,"description":"Workspace identifier"},"required":true,"description":"Workspace identifier","name":"workspace_id","in":"path"},{"schema":{"type":"string","minLength":1,"description":"Portal template identifier"},"required":true,"description":"Portal template identifier","name":"id","in":"path"}],"responses":{"200":{"description":"Get Portal Template","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"status":{"type":"string","enum":["draft","active","paused","archived"]},"version":{"type":"number"},"updated_at":{"type":"number"},"config":{"type":"object","additionalProperties":{"nullable":true}}},"required":["id","workspace_id","name","slug","status","version","updated_at","config"]}},"required":["data"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}},"patch":{"operationId":"patchPortalTemplate","security":[{"bearerAuth":[]}],"tags":["portals"],"summary":"Update Portal Template","description":"Update selected portal template sections. Existing customer portal sessions keep their saved snapshot.","parameters":[{"schema":{"type":"string","minLength":1,"description":"Workspace identifier"},"required":true,"description":"Workspace identifier","name":"workspace_id","in":"path"},{"schema":{"type":"string","minLength":1,"description":"Portal template identifier"},"required":true,"description":"Portal template identifier","name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"expected_version":{"type":"integer","minimum":0,"exclusiveMinimum":true},"name":{"type":"string","minLength":1},"status":{"type":"string","enum":["draft","active","paused"]},"meta":{"type":"object","properties":{"business_type":{"type":"string","enum":["str","hotel","restaurant","salon","gym","other"]},"expiry_hours":{"type":"number","nullable":true,"minimum":0,"exclusiveMinimum":true}},"required":["business_type"]},"branding":{"type":"object","properties":{"logo_url":{"type":"string","nullable":true},"brand_color":{"type":"string","nullable":true,"pattern":"^#?[0-9a-fA-F]{6}$"},"accent_color":{"type":"string","nullable":true,"pattern":"^#?[0-9a-fA-F]{6}$"},"background_color":{"type":"string","nullable":true,"pattern":"^#?[0-9a-fA-F]{6}$"},"theme":{"type":"string","enum":["light","dark"]}}},"header":{"type":"object","properties":{"business_name":{"type":"string","nullable":true},"context_line":{"type":"string","nullable":true},"hero_source":{"type":"string","nullable":true,"enum":["listing","custom"]},"hero_image_url":{"type":"string","nullable":true},"hero_image_attribution":{"type":"object","nullable":true,"properties":{"source":{"type":"string","enum":["unsplash"]},"photographerName":{"type":"string"},"photographerUrl":{"type":"string","format":"uri"},"photoUrl":{"type":"string","format":"uri"}},"required":["source","photographerName","photographerUrl","photoUrl"]},"show_trust_badge":{"type":"boolean"}}},"layout":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["header"]},"id":{"type":"string"}},"required":["type","id"]},{"type":"object","properties":{"type":{"type":"string","enum":["offerHero"]},"id":{"type":"string"},"offerId":{"type":"string","minLength":1},"badgeLabel":{"type":"string"},"headline":{"type":"string"},"tagline":{"type":"string"}},"required":["type","id","offerId"]},{"type":"object","properties":{"type":{"type":"string","enum":["offer"]},"id":{"type":"string"},"offerId":{"type":"string","minLength":1},"badge":{"type":"object","properties":{"label":{"type":"string"},"tone":{"type":"string","enum":["neutral","success","warning"]}},"required":["label","tone"]}},"required":["type","id","offerId"]},{"type":"object","properties":{"type":{"type":"string","enum":["offerGrid"]},"id":{"type":"string"},"offerIds":{"type":"array","items":{"type":"string","minLength":1}},"columns":{"anyOf":[{"type":"number","enum":[1]},{"type":"number","enum":[2]}]}},"required":["type","id","offerIds","columns"]},{"type":"object","properties":{"type":{"type":"string","enum":["bundle"]},"id":{"type":"string"},"offerIds":{"type":"array","items":{"type":"string","minLength":1}},"bundlePriceInCents":{"type":"integer","minimum":0},"label":{"type":"string"}},"required":["type","id","offerIds","label"]},{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"id":{"type":"string"},"body":{"type":"string"},"variant":{"type":"string","enum":["section","body"]}},"required":["type","id","body","variant"]},{"type":"object","properties":{"type":{"type":"string","enum":["trustStrip"]},"id":{"type":"string"},"items":{"type":"array","items":{"type":"string","enum":["secure_checkout","free_cancellation","verified_business","powered_by_stripe"]}}},"required":["type","id","items"]},{"type":"object","properties":{"type":{"type":"string","enum":["spacer"]},"id":{"type":"string"},"size":{"type":"string","enum":["sm","md","lg"]}},"required":["type","id","size"]},{"type":"object","properties":{"type":{"type":"string","enum":["image"]},"id":{"type":"string"},"url":{"type":"string","format":"uri"},"alt":{"type":"string"},"aspectRatio":{"type":"string","enum":["square","wide","tall"]}},"required":["type","id","url","alt"]},{"type":"object","properties":{"type":{"type":"string","enum":["formInput"]},"id":{"type":"string"},"name":{"type":"string"},"label":{"type":"string"},"placeholder":{"type":"string"},"required":{"type":"boolean"},"inputType":{"type":"string","enum":["text","email","tel"]}},"required":["type","id","name","label","required","inputType"]},{"type":"object","properties":{"type":{"type":"string","enum":["paymentPlaceholder"]},"id":{"type":"string"},"label":{"type":"string"}},"required":["type","id"]}]}},"after_payment":{"type":"object","properties":{"mode":{"type":"string","enum":["stay","full_screen"]},"message":{"type":"string"},"show_receipt":{"type":"boolean"}},"required":["mode","message","show_receipt"]},"confirmation_message":{"type":"object","properties":{"enabled":{"type":"boolean"},"template":{"type":"string"}},"required":["enabled","template"]},"checkout":{"type":"object","properties":{"allow_cart":{"type":"boolean"},"payment_methods":{"type":"array","items":{"type":"string","enum":["card","apple_pay","google_pay","link"]}},"cta_label":{"type":"string"}},"required":["allow_cart","payment_methods","cta_label"]},"smart_lock":{"type":"object","nullable":true,"properties":{"enabled":{"type":"boolean"}},"required":["enabled"]},"listing_data":{"type":"object","nullable":true,"properties":{"enabled":{"type":"boolean"},"fields":{"type":"object","properties":{"address":{"type":"boolean"},"directions":{"type":"boolean"},"area":{"type":"boolean"},"checkInInstructions":{"type":"boolean"},"checkOutInstructions":{"type":"boolean"},"wifi":{"type":"boolean"},"parking":{"type":"boolean"},"houseRules":{"type":"boolean"},"houseManual":{"type":"boolean"},"trash":{"type":"boolean"},"doorCode":{"type":"boolean"}},"required":["directions","area","checkInInstructions","checkOutInstructions","wifi","parking","houseRules","houseManual","trash","doorCode"]}},"required":["enabled","fields"]}},"required":["expected_version"]}}}},"responses":{"200":{"description":"Update Portal Template","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"status":{"type":"string","enum":["draft","active","paused","archived"]},"version":{"type":"number"},"updated_at":{"type":"number"},"config":{"type":"object","additionalProperties":{"nullable":true}}},"required":["id","workspace_id","name","slug","status","version","updated_at","config"]}},"required":["data"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}}},"/v1/workspaces/{workspace_id}/portal-templates/{id}/duplicate":{"post":{"operationId":"duplicatePortalTemplate","security":[{"bearerAuth":[]}],"tags":["portals"],"summary":"Duplicate Portal Template","description":"Create a draft copy of a portal template.","parameters":[{"schema":{"type":"string","minLength":1,"description":"Workspace identifier"},"required":true,"description":"Workspace identifier","name":"workspace_id","in":"path"},{"schema":{"type":"string","minLength":1,"description":"Portal template identifier"},"required":true,"description":"Portal template identifier","name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"expected_version":{"type":"integer","minimum":0,"exclusiveMinimum":true},"new_name":{"type":"string","minLength":1}},"required":["expected_version","new_name"]}}}},"responses":{"201":{"description":"Duplicate Portal Template","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"status":{"type":"string","enum":["draft","active","paused","archived"]},"version":{"type":"number"},"updated_at":{"type":"number"},"config":{"type":"object","additionalProperties":{"nullable":true}}},"required":["id","workspace_id","name","slug","status","version","updated_at","config"]}},"required":["data"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}}},"/v1/workspaces/{workspace_id}/portal-templates/{id}/archive":{"post":{"operationId":"archivePortalTemplate","security":[{"bearerAuth":[]}],"tags":["portals"],"summary":"Archive Portal Template","description":"Archive a portal template without deleting its history.","parameters":[{"schema":{"type":"string","minLength":1,"description":"Workspace identifier"},"required":true,"description":"Workspace identifier","name":"workspace_id","in":"path"},{"schema":{"type":"string","minLength":1,"description":"Portal template identifier"},"required":true,"description":"Portal template identifier","name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"expected_version":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"required":["expected_version"]}}}},"responses":{"200":{"description":"Archive Portal Template","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"status":{"type":"string","enum":["draft","active","paused","archived"]},"version":{"type":"number"},"updated_at":{"type":"number"},"config":{"type":"object","additionalProperties":{"nullable":true}}},"required":["id","workspace_id","name","slug","status","version","updated_at","config"]}},"required":["data"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}}},"/v1/workspaces/{workspace_id}/portal-templates/{id}/restore":{"post":{"operationId":"restorePortalTemplate","security":[{"bearerAuth":[]}],"tags":["portals"],"summary":"Restore Portal Template","description":"Restore an archived portal template as a draft.","parameters":[{"schema":{"type":"string","minLength":1,"description":"Workspace identifier"},"required":true,"description":"Workspace identifier","name":"workspace_id","in":"path"},{"schema":{"type":"string","minLength":1,"description":"Portal template identifier"},"required":true,"description":"Portal template identifier","name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"expected_version":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"required":["expected_version"]}}}},"responses":{"200":{"description":"Restore Portal Template","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"status":{"type":"string","enum":["draft","active","paused","archived"]},"version":{"type":"number"},"updated_at":{"type":"number"},"config":{"type":"object","additionalProperties":{"nullable":true}}},"required":["id","workspace_id","name","slug","status","version","updated_at","config"]}},"required":["data"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}}},"/v1/workspaces/{workspace_id}/portal-templates/{id}/delete":{"post":{"operationId":"deletePortalTemplate","security":[{"bearerAuth":[]}],"tags":["portals"],"summary":"Delete Portal Template","description":"Permanently delete a portal template that has no recorded sales. This action also deletes its customer sessions.","parameters":[{"schema":{"type":"string","minLength":1,"description":"Workspace identifier"},"required":true,"description":"Workspace identifier","name":"workspace_id","in":"path"},{"schema":{"type":"string","minLength":1,"description":"Portal template identifier"},"required":true,"description":"Portal template identifier","name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"expected_version":{"type":"integer","minimum":0,"exclusiveMinimum":true},"confirm_name":{"type":"string","minLength":1}},"required":["expected_version","confirm_name"]}}}},"responses":{"200":{"description":"Delete Portal Template","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}},"required":["data"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}}},"/v1/workspaces/{workspace_id}/portal-offers":{"get":{"operationId":"listPortalOfferCatalog","security":[{"bearerAuth":[]}],"tags":["portals"],"summary":"List Portal Offer Catalog","description":"List portal offer definitions for configuration work. This does not list offers on one customer portal session.","parameters":[{"schema":{"type":"string","minLength":1,"description":"Workspace identifier"},"required":true,"description":"Workspace identifier","name":"workspace_id","in":"path"},{"schema":{"type":"boolean"},"required":false,"name":"include_archived","in":"query"},{"schema":{"type":"string"},"required":false,"name":"search","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"}],"responses":{"200":{"description":"List Portal Offer Catalog","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"name":{"type":"string"},"price_in_cents":{"type":"number"},"currency":{"type":"string"},"category":{"type":"string"},"kind":{"type":"string","enum":["purchase","request","ad"]},"active":{"type":"boolean"},"updated_at":{"type":"number"}},"required":["id","workspace_id","name","price_in_cents","currency","active","updated_at"]}},"next_cursor":{"type":"string","nullable":true},"has_more":{"type":"boolean"}},"required":["data","next_cursor","has_more"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}},"post":{"operationId":"createPortalOffer","security":[{"bearerAuth":[]}],"tags":["portals"],"summary":"Create Portal Offer","description":"Create an active portal offer for a workspace.","parameters":[{"schema":{"type":"string","minLength":1,"description":"Workspace identifier"},"required":true,"description":"Workspace identifier","name":"workspace_id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"description":{"type":"string"},"price_in_cents":{"type":"integer","minimum":0},"percent_price":{"type":"object","properties":{"percent":{"type":"number","minimum":0,"exclusiveMinimum":true,"maximum":100},"of":{"type":"string","enum":["totalPrice","grossRent","netRent","subtotal","totalFees","totalTaxes"]}},"required":["percent","of"]},"compare_at_price_in_cents":{"type":"integer","minimum":0},"image_url":{"type":"string"},"image_attribution":{"type":"object","properties":{"source":{"type":"string","enum":["unsplash"]},"photographerName":{"type":"string"},"photographerUrl":{"type":"string","format":"uri"},"photoUrl":{"type":"string","format":"uri"}},"required":["source","photographerName","photographerUrl","photoUrl"]},"background_hex":{"type":"string","pattern":"^#?[0-9a-fA-F]{6}$"},"category":{"type":"string"},"kind":{"type":"string","enum":["purchase","request","ad"]},"link_url":{"type":"string"},"highlights":{"type":"array","items":{"type":"string"}},"availability":{"type":"object","properties":{"visibleFrom":{"type":"number","minimum":0},"visibleUntil":{"type":"number","minimum":0},"bookableFrom":{"type":"number","minimum":0},"bookableUntil":{"type":"number","minimum":0}}},"targeting":{"type":"object","properties":{"bookingChannels":{"type":"array","items":{"type":"string"}},"bookingChannelMode":{"type":"string","enum":["include","exclude"]},"sources":{"type":"array","items":{"type":"string"},"description":"Exact, case-sensitive reservation.source values from the PMS"},"sourceMode":{"type":"string","enum":["include","exclude"],"description":"Defaults to include for the listed sources"},"minNights":{"type":"integer","minimum":0},"maxNights":{"type":"integer","minimum":0},"minVacantNightsBeforeArrival":{"type":"integer","minimum":0},"minVacantNightsAfterDeparture":{"type":"integer","minimum":0},"listingIds":{"type":"array","items":{"type":"string"}},"listingGroupIds":{"type":"array","items":{"type":"string","minLength":1}},"inboxTypeIds":{"type":"array","items":{"type":"string"}},"inboxMode":{"type":"string","enum":["include","exclude"]},"customAttributeConditions":{"type":"object","properties":{"combinator":{"type":"string","enum":["all","any"]},"conditions":{"type":"array","items":{"type":"object","properties":{"attributeId":{"type":"string","minLength":1},"operator":{"type":"string","enum":["equals","not_equals","contains","not_contains","greater_than","less_than","before","after","has_value","has_no_value"]},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["attributeId","operator"]}}},"required":["combinator","conditions"]}}}},"required":["name","description","price_in_cents"]}}}},"responses":{"201":{"description":"Create Portal Offer","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"price_in_cents":{"type":"number"},"currency":{"type":"string"},"percent_price":{"type":"object","properties":{"percent":{"type":"number","minimum":0,"exclusiveMinimum":true,"maximum":100},"of":{"type":"string","enum":["totalPrice","grossRent","netRent","subtotal","totalFees","totalTaxes"]}},"required":["percent","of"]},"compare_at_price_in_cents":{"type":"number"},"image_url":{"type":"string"},"image_attribution":{"type":"object","properties":{"source":{"type":"string","enum":["unsplash"]},"photographerName":{"type":"string"},"photographerUrl":{"type":"string","format":"uri"},"photoUrl":{"type":"string","format":"uri"}},"required":["source","photographerName","photographerUrl","photoUrl"]},"background_hex":{"type":"string"},"category":{"type":"string"},"kind":{"type":"string","enum":["purchase","request","ad"]},"option_groups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"type":{"type":"string","enum":["single","multi","counts"]},"required":{"type":"boolean"},"max_count":{"type":"integer"},"options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"subtitle":{"type":"string"},"price_in_cents":{"type":"integer"},"time_slot":{"type":"string"}},"required":["id","title","price_in_cents"]}}},"required":["id","label","type","required","options"]}},"combinations_enabled":{"type":"boolean"},"link_url":{"type":"string"},"highlights":{"type":"array","items":{"type":"string"}},"availability":{"type":"object","properties":{"visibleFrom":{"type":"number","minimum":0},"visibleUntil":{"type":"number","minimum":0},"bookableFrom":{"type":"number","minimum":0},"bookableUntil":{"type":"number","minimum":0}}},"targeting":{"type":"object","properties":{"bookingChannels":{"type":"array","items":{"type":"string"}},"bookingChannelMode":{"type":"string","enum":["include","exclude"]},"sources":{"type":"array","items":{"type":"string"},"description":"Exact, case-sensitive reservation.source values from the PMS"},"sourceMode":{"type":"string","enum":["include","exclude"],"description":"Defaults to include for the listed sources"},"minNights":{"type":"integer","minimum":0},"maxNights":{"type":"integer","minimum":0},"minVacantNightsBeforeArrival":{"type":"integer","minimum":0},"minVacantNightsAfterDeparture":{"type":"integer","minimum":0},"listingIds":{"type":"array","items":{"type":"string"}},"listingGroupIds":{"type":"array","items":{"type":"string","minLength":1}},"inboxTypeIds":{"type":"array","items":{"type":"string"}},"inboxMode":{"type":"string","enum":["include","exclude"]},"customAttributeConditions":{"type":"object","properties":{"combinator":{"type":"string","enum":["all","any"]},"conditions":{"type":"array","items":{"type":"object","properties":{"attributeId":{"type":"string","minLength":1},"operator":{"type":"string","enum":["equals","not_equals","contains","not_contains","greater_than","less_than","before","after","has_value","has_no_value"]},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["attributeId","operator"]}}},"required":["combinator","conditions"]}}},"sku":{"type":"string"},"active":{"type":"boolean"},"created_at":{"type":"number"},"updated_at":{"type":"number"}},"required":["id","workspace_id","name","description","price_in_cents","currency","active","created_at","updated_at"]}},"required":["data"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}}},"/v1/workspaces/{workspace_id}/portal-offers/{id}":{"get":{"operationId":"getPortalOffer","security":[{"bearerAuth":[]}],"tags":["portals"],"summary":"Get Portal Offer","description":"Get a complete portal offer definition and its concurrency timestamp.","parameters":[{"schema":{"type":"string","minLength":1,"description":"Workspace identifier"},"required":true,"description":"Workspace identifier","name":"workspace_id","in":"path"},{"schema":{"type":"string","minLength":1,"description":"Portal offer identifier"},"required":true,"description":"Portal offer identifier","name":"id","in":"path"}],"responses":{"200":{"description":"Get Portal Offer","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"price_in_cents":{"type":"number"},"currency":{"type":"string"},"percent_price":{"type":"object","properties":{"percent":{"type":"number","minimum":0,"exclusiveMinimum":true,"maximum":100},"of":{"type":"string","enum":["totalPrice","grossRent","netRent","subtotal","totalFees","totalTaxes"]}},"required":["percent","of"]},"compare_at_price_in_cents":{"type":"number"},"image_url":{"type":"string"},"image_attribution":{"type":"object","properties":{"source":{"type":"string","enum":["unsplash"]},"photographerName":{"type":"string"},"photographerUrl":{"type":"string","format":"uri"},"photoUrl":{"type":"string","format":"uri"}},"required":["source","photographerName","photographerUrl","photoUrl"]},"background_hex":{"type":"string"},"category":{"type":"string"},"kind":{"type":"string","enum":["purchase","request","ad"]},"option_groups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"type":{"type":"string","enum":["single","multi","counts"]},"required":{"type":"boolean"},"max_count":{"type":"integer"},"options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"subtitle":{"type":"string"},"price_in_cents":{"type":"integer"},"time_slot":{"type":"string"}},"required":["id","title","price_in_cents"]}}},"required":["id","label","type","required","options"]}},"combinations_enabled":{"type":"boolean"},"link_url":{"type":"string"},"highlights":{"type":"array","items":{"type":"string"}},"availability":{"type":"object","properties":{"visibleFrom":{"type":"number","minimum":0},"visibleUntil":{"type":"number","minimum":0},"bookableFrom":{"type":"number","minimum":0},"bookableUntil":{"type":"number","minimum":0}}},"targeting":{"type":"object","properties":{"bookingChannels":{"type":"array","items":{"type":"string"}},"bookingChannelMode":{"type":"string","enum":["include","exclude"]},"sources":{"type":"array","items":{"type":"string"},"description":"Exact, case-sensitive reservation.source values from the PMS"},"sourceMode":{"type":"string","enum":["include","exclude"],"description":"Defaults to include for the listed sources"},"minNights":{"type":"integer","minimum":0},"maxNights":{"type":"integer","minimum":0},"minVacantNightsBeforeArrival":{"type":"integer","minimum":0},"minVacantNightsAfterDeparture":{"type":"integer","minimum":0},"listingIds":{"type":"array","items":{"type":"string"}},"listingGroupIds":{"type":"array","items":{"type":"string","minLength":1}},"inboxTypeIds":{"type":"array","items":{"type":"string"}},"inboxMode":{"type":"string","enum":["include","exclude"]},"customAttributeConditions":{"type":"object","properties":{"combinator":{"type":"string","enum":["all","any"]},"conditions":{"type":"array","items":{"type":"object","properties":{"attributeId":{"type":"string","minLength":1},"operator":{"type":"string","enum":["equals","not_equals","contains","not_contains","greater_than","less_than","before","after","has_value","has_no_value"]},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["attributeId","operator"]}}},"required":["combinator","conditions"]}}},"sku":{"type":"string"},"active":{"type":"boolean"},"created_at":{"type":"number"},"updated_at":{"type":"number"}},"required":["id","workspace_id","name","description","price_in_cents","currency","active","created_at","updated_at"]}},"required":["data"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}},"patch":{"operationId":"patchPortalOffer","security":[{"bearerAuth":[]}],"tags":["portals"],"summary":"Update Portal Offer","description":"Update a portal offer definition. Saved customer portals that reference this offer receive the new values.","parameters":[{"schema":{"type":"string","minLength":1,"description":"Workspace identifier"},"required":true,"description":"Workspace identifier","name":"workspace_id","in":"path"},{"schema":{"type":"string","minLength":1,"description":"Portal offer identifier"},"required":true,"description":"Portal offer identifier","name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"expected_updated_at":{"type":"number","minimum":0},"name":{"type":"string","minLength":1},"description":{"type":"string"},"price_in_cents":{"type":"integer","minimum":0},"percent_price":{"type":"object","nullable":true,"properties":{"percent":{"type":"number","minimum":0,"exclusiveMinimum":true,"maximum":100},"of":{"type":"string","enum":["totalPrice","grossRent","netRent","subtotal","totalFees","totalTaxes"]}},"required":["percent","of"]},"compare_at_price_in_cents":{"type":"integer","nullable":true,"minimum":0},"image_url":{"type":"string","nullable":true},"image_attribution":{"type":"object","nullable":true,"properties":{"source":{"type":"string","enum":["unsplash"]},"photographerName":{"type":"string"},"photographerUrl":{"type":"string","format":"uri"},"photoUrl":{"type":"string","format":"uri"}},"required":["source","photographerName","photographerUrl","photoUrl"]},"background_hex":{"type":"string","nullable":true,"pattern":"^#?[0-9a-fA-F]{6}$"},"category":{"type":"string","nullable":true},"kind":{"type":"string","enum":["purchase","request","ad"]},"link_url":{"type":"string","nullable":true},"highlights":{"type":"array","nullable":true,"items":{"type":"string"}},"availability":{"type":"object","nullable":true,"properties":{"visibleFrom":{"type":"number","minimum":0},"visibleUntil":{"type":"number","minimum":0},"bookableFrom":{"type":"number","minimum":0},"bookableUntil":{"type":"number","minimum":0}}},"targeting":{"type":"object","nullable":true,"properties":{"bookingChannels":{"type":"array","items":{"type":"string"}},"bookingChannelMode":{"type":"string","enum":["include","exclude"]},"sources":{"type":"array","items":{"type":"string"},"description":"Exact, case-sensitive reservation.source values from the PMS"},"sourceMode":{"type":"string","enum":["include","exclude"],"description":"Defaults to include for the listed sources"},"minNights":{"type":"integer","minimum":0},"maxNights":{"type":"integer","minimum":0},"minVacantNightsBeforeArrival":{"type":"integer","minimum":0},"minVacantNightsAfterDeparture":{"type":"integer","minimum":0},"listingIds":{"type":"array","items":{"type":"string"}},"listingGroupIds":{"type":"array","items":{"type":"string","minLength":1}},"inboxTypeIds":{"type":"array","items":{"type":"string"}},"inboxMode":{"type":"string","enum":["include","exclude"]},"customAttributeConditions":{"type":"object","properties":{"combinator":{"type":"string","enum":["all","any"]},"conditions":{"type":"array","items":{"type":"object","properties":{"attributeId":{"type":"string","minLength":1},"operator":{"type":"string","enum":["equals","not_equals","contains","not_contains","greater_than","less_than","before","after","has_value","has_no_value"]},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["attributeId","operator"]}}},"required":["combinator","conditions"]}}}},"required":["expected_updated_at"]}}}},"responses":{"200":{"description":"Update Portal Offer","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"price_in_cents":{"type":"number"},"currency":{"type":"string"},"percent_price":{"type":"object","properties":{"percent":{"type":"number","minimum":0,"exclusiveMinimum":true,"maximum":100},"of":{"type":"string","enum":["totalPrice","grossRent","netRent","subtotal","totalFees","totalTaxes"]}},"required":["percent","of"]},"compare_at_price_in_cents":{"type":"number"},"image_url":{"type":"string"},"image_attribution":{"type":"object","properties":{"source":{"type":"string","enum":["unsplash"]},"photographerName":{"type":"string"},"photographerUrl":{"type":"string","format":"uri"},"photoUrl":{"type":"string","format":"uri"}},"required":["source","photographerName","photographerUrl","photoUrl"]},"background_hex":{"type":"string"},"category":{"type":"string"},"kind":{"type":"string","enum":["purchase","request","ad"]},"option_groups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"type":{"type":"string","enum":["single","multi","counts"]},"required":{"type":"boolean"},"max_count":{"type":"integer"},"options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"subtitle":{"type":"string"},"price_in_cents":{"type":"integer"},"time_slot":{"type":"string"}},"required":["id","title","price_in_cents"]}}},"required":["id","label","type","required","options"]}},"combinations_enabled":{"type":"boolean"},"link_url":{"type":"string"},"highlights":{"type":"array","items":{"type":"string"}},"availability":{"type":"object","properties":{"visibleFrom":{"type":"number","minimum":0},"visibleUntil":{"type":"number","minimum":0},"bookableFrom":{"type":"number","minimum":0},"bookableUntil":{"type":"number","minimum":0}}},"targeting":{"type":"object","properties":{"bookingChannels":{"type":"array","items":{"type":"string"}},"bookingChannelMode":{"type":"string","enum":["include","exclude"]},"sources":{"type":"array","items":{"type":"string"},"description":"Exact, case-sensitive reservation.source values from the PMS"},"sourceMode":{"type":"string","enum":["include","exclude"],"description":"Defaults to include for the listed sources"},"minNights":{"type":"integer","minimum":0},"maxNights":{"type":"integer","minimum":0},"minVacantNightsBeforeArrival":{"type":"integer","minimum":0},"minVacantNightsAfterDeparture":{"type":"integer","minimum":0},"listingIds":{"type":"array","items":{"type":"string"}},"listingGroupIds":{"type":"array","items":{"type":"string","minLength":1}},"inboxTypeIds":{"type":"array","items":{"type":"string"}},"inboxMode":{"type":"string","enum":["include","exclude"]},"customAttributeConditions":{"type":"object","properties":{"combinator":{"type":"string","enum":["all","any"]},"conditions":{"type":"array","items":{"type":"object","properties":{"attributeId":{"type":"string","minLength":1},"operator":{"type":"string","enum":["equals","not_equals","contains","not_contains","greater_than","less_than","before","after","has_value","has_no_value"]},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["attributeId","operator"]}}},"required":["combinator","conditions"]}}},"sku":{"type":"string"},"active":{"type":"boolean"},"created_at":{"type":"number"},"updated_at":{"type":"number"}},"required":["id","workspace_id","name","description","price_in_cents","currency","active","created_at","updated_at"]}},"required":["data"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}}},"/v1/workspaces/{workspace_id}/portal-offers/{id}/archive":{"post":{"operationId":"archivePortalOffer","security":[{"bearerAuth":[]}],"tags":["portals"],"summary":"Archive Portal Offer","description":"Archive a portal offer and remove it from portal template layouts.","parameters":[{"schema":{"type":"string","minLength":1,"description":"Workspace identifier"},"required":true,"description":"Workspace identifier","name":"workspace_id","in":"path"},{"schema":{"type":"string","minLength":1,"description":"Portal offer identifier"},"required":true,"description":"Portal offer identifier","name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"expected_updated_at":{"type":"number","minimum":0}},"required":["expected_updated_at"]}}}},"responses":{"200":{"description":"Archive Portal Offer","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"price_in_cents":{"type":"number"},"currency":{"type":"string"},"percent_price":{"type":"object","properties":{"percent":{"type":"number","minimum":0,"exclusiveMinimum":true,"maximum":100},"of":{"type":"string","enum":["totalPrice","grossRent","netRent","subtotal","totalFees","totalTaxes"]}},"required":["percent","of"]},"compare_at_price_in_cents":{"type":"number"},"image_url":{"type":"string"},"image_attribution":{"type":"object","properties":{"source":{"type":"string","enum":["unsplash"]},"photographerName":{"type":"string"},"photographerUrl":{"type":"string","format":"uri"},"photoUrl":{"type":"string","format":"uri"}},"required":["source","photographerName","photographerUrl","photoUrl"]},"background_hex":{"type":"string"},"category":{"type":"string"},"kind":{"type":"string","enum":["purchase","request","ad"]},"option_groups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"type":{"type":"string","enum":["single","multi","counts"]},"required":{"type":"boolean"},"max_count":{"type":"integer"},"options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"subtitle":{"type":"string"},"price_in_cents":{"type":"integer"},"time_slot":{"type":"string"}},"required":["id","title","price_in_cents"]}}},"required":["id","label","type","required","options"]}},"combinations_enabled":{"type":"boolean"},"link_url":{"type":"string"},"highlights":{"type":"array","items":{"type":"string"}},"availability":{"type":"object","properties":{"visibleFrom":{"type":"number","minimum":0},"visibleUntil":{"type":"number","minimum":0},"bookableFrom":{"type":"number","minimum":0},"bookableUntil":{"type":"number","minimum":0}}},"targeting":{"type":"object","properties":{"bookingChannels":{"type":"array","items":{"type":"string"}},"bookingChannelMode":{"type":"string","enum":["include","exclude"]},"sources":{"type":"array","items":{"type":"string"},"description":"Exact, case-sensitive reservation.source values from the PMS"},"sourceMode":{"type":"string","enum":["include","exclude"],"description":"Defaults to include for the listed sources"},"minNights":{"type":"integer","minimum":0},"maxNights":{"type":"integer","minimum":0},"minVacantNightsBeforeArrival":{"type":"integer","minimum":0},"minVacantNightsAfterDeparture":{"type":"integer","minimum":0},"listingIds":{"type":"array","items":{"type":"string"}},"listingGroupIds":{"type":"array","items":{"type":"string","minLength":1}},"inboxTypeIds":{"type":"array","items":{"type":"string"}},"inboxMode":{"type":"string","enum":["include","exclude"]},"customAttributeConditions":{"type":"object","properties":{"combinator":{"type":"string","enum":["all","any"]},"conditions":{"type":"array","items":{"type":"object","properties":{"attributeId":{"type":"string","minLength":1},"operator":{"type":"string","enum":["equals","not_equals","contains","not_contains","greater_than","less_than","before","after","has_value","has_no_value"]},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["attributeId","operator"]}}},"required":["combinator","conditions"]}}},"sku":{"type":"string"},"active":{"type":"boolean"},"created_at":{"type":"number"},"updated_at":{"type":"number"}},"required":["id","workspace_id","name","description","price_in_cents","currency","active","created_at","updated_at"]}},"required":["data"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}}},"/v1/workspaces/{workspace_id}/portal-offers/{id}/restore":{"post":{"operationId":"restorePortalOffer","security":[{"bearerAuth":[]}],"tags":["portals"],"summary":"Restore Portal Offer","description":"Restore an archived portal offer without adding it to portal templates.","parameters":[{"schema":{"type":"string","minLength":1,"description":"Workspace identifier"},"required":true,"description":"Workspace identifier","name":"workspace_id","in":"path"},{"schema":{"type":"string","minLength":1,"description":"Portal offer identifier"},"required":true,"description":"Portal offer identifier","name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"expected_updated_at":{"type":"number","minimum":0}},"required":["expected_updated_at"]}}}},"responses":{"200":{"description":"Restore Portal Offer","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"price_in_cents":{"type":"number"},"currency":{"type":"string"},"percent_price":{"type":"object","properties":{"percent":{"type":"number","minimum":0,"exclusiveMinimum":true,"maximum":100},"of":{"type":"string","enum":["totalPrice","grossRent","netRent","subtotal","totalFees","totalTaxes"]}},"required":["percent","of"]},"compare_at_price_in_cents":{"type":"number"},"image_url":{"type":"string"},"image_attribution":{"type":"object","properties":{"source":{"type":"string","enum":["unsplash"]},"photographerName":{"type":"string"},"photographerUrl":{"type":"string","format":"uri"},"photoUrl":{"type":"string","format":"uri"}},"required":["source","photographerName","photographerUrl","photoUrl"]},"background_hex":{"type":"string"},"category":{"type":"string"},"kind":{"type":"string","enum":["purchase","request","ad"]},"option_groups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"type":{"type":"string","enum":["single","multi","counts"]},"required":{"type":"boolean"},"max_count":{"type":"integer"},"options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"subtitle":{"type":"string"},"price_in_cents":{"type":"integer"},"time_slot":{"type":"string"}},"required":["id","title","price_in_cents"]}}},"required":["id","label","type","required","options"]}},"combinations_enabled":{"type":"boolean"},"link_url":{"type":"string"},"highlights":{"type":"array","items":{"type":"string"}},"availability":{"type":"object","properties":{"visibleFrom":{"type":"number","minimum":0},"visibleUntil":{"type":"number","minimum":0},"bookableFrom":{"type":"number","minimum":0},"bookableUntil":{"type":"number","minimum":0}}},"targeting":{"type":"object","properties":{"bookingChannels":{"type":"array","items":{"type":"string"}},"bookingChannelMode":{"type":"string","enum":["include","exclude"]},"sources":{"type":"array","items":{"type":"string"},"description":"Exact, case-sensitive reservation.source values from the PMS"},"sourceMode":{"type":"string","enum":["include","exclude"],"description":"Defaults to include for the listed sources"},"minNights":{"type":"integer","minimum":0},"maxNights":{"type":"integer","minimum":0},"minVacantNightsBeforeArrival":{"type":"integer","minimum":0},"minVacantNightsAfterDeparture":{"type":"integer","minimum":0},"listingIds":{"type":"array","items":{"type":"string"}},"listingGroupIds":{"type":"array","items":{"type":"string","minLength":1}},"inboxTypeIds":{"type":"array","items":{"type":"string"}},"inboxMode":{"type":"string","enum":["include","exclude"]},"customAttributeConditions":{"type":"object","properties":{"combinator":{"type":"string","enum":["all","any"]},"conditions":{"type":"array","items":{"type":"object","properties":{"attributeId":{"type":"string","minLength":1},"operator":{"type":"string","enum":["equals","not_equals","contains","not_contains","greater_than","less_than","before","after","has_value","has_no_value"]},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["attributeId","operator"]}}},"required":["combinator","conditions"]}}},"sku":{"type":"string"},"active":{"type":"boolean"},"created_at":{"type":"number"},"updated_at":{"type":"number"}},"required":["id","workspace_id","name","description","price_in_cents","currency","active","created_at","updated_at"]}},"required":["data"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}}},"/v1/workspaces/{workspace_id}/portal-guides":{"get":{"operationId":"listPortalGuides","security":[{"bearerAuth":[]}],"tags":["portals"],"summary":"List Portal Guides","description":"List workspace portal guides with their publication status and update time.","parameters":[{"schema":{"type":"string","minLength":1,"description":"Workspace identifier"},"required":true,"description":"Workspace identifier","name":"workspace_id","in":"path"},{"schema":{"type":"boolean"},"required":false,"name":"include_archived","in":"query"},{"schema":{"type":"string"},"required":false,"name":"search","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"}],"responses":{"200":{"description":"List Portal Guides","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"title":{"type":"string"},"category":{"type":"string"},"status":{"type":"string","enum":["draft","published","archived"]},"show_after_check_in_only":{"type":"boolean"},"visibility_boundary":{"type":"object","properties":{"amount":{"type":"integer","minimum":1},"unit":{"type":"string","enum":["minutes","hours","days"]}},"required":["amount","unit"]},"updated_at":{"type":"number"}},"required":["id","workspace_id","title","status","updated_at"]}},"next_cursor":{"type":"string","nullable":true},"has_more":{"type":"boolean"}},"required":["data","next_cursor","has_more"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}},"post":{"operationId":"createPortalGuide","security":[{"bearerAuth":[]}],"tags":["portals"],"summary":"Create Portal Guide","description":"Create a portal guide for a workspace.","parameters":[{"schema":{"type":"string","minLength":1,"description":"Workspace identifier"},"required":true,"description":"Workspace identifier","name":"workspace_id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1},"description":{"type":"string"},"category":{"type":"string"},"cover_image_url":{"type":"string"},"cover_image_attribution":{"type":"object","properties":{"source":{"type":"string","enum":["unsplash"]},"photographerName":{"type":"string"},"photographerUrl":{"type":"string","format":"uri"},"photoUrl":{"type":"string","format":"uri"}},"required":["source","photographerName","photographerUrl","photoUrl"]},"blocks":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["text"]},"id":{"type":"string"},"title":{"type":"string"},"body":{"type":"string"}},"required":["kind","id","body"]},{"type":"object","properties":{"kind":{"type":"string","enum":["place"]},"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"address":{"type":"string"},"mapsUrl":{"type":"string"},"imageUrl":{"type":"string"},"imageAttribution":{"type":"object","properties":{"source":{"type":"string","enum":["unsplash"]},"photographerName":{"type":"string"},"photographerUrl":{"type":"string","format":"uri"},"photoUrl":{"type":"string","format":"uri"}},"required":["source","photographerName","photographerUrl","photoUrl"]},"hostTip":{"type":"string"},"placeType":{"type":"string","enum":["restaurant","cafe","bar","bakery","grocery","shopping","beach","park","trail","viewpoint","museum","landmark","activity","tour","gym","spa","pharmacy","medical","transit","parking","other"]},"distanceFromProperty":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"bookingUrl":{"type":"string"},"phone":{"type":"string"},"website":{"type":"string"},"priceBand":{"type":"string","enum":["$","$$","$$$","$$$$"]},"hours":{"type":"string"}},"required":["kind","id","name"]},{"type":"object","properties":{"kind":{"type":"string","enum":["tip"]},"id":{"type":"string"},"body":{"type":"string"},"tone":{"type":"string","enum":["info","tip","warning","danger"]}},"required":["kind","id","body"]},{"type":"object","properties":{"kind":{"type":"string","enum":["list"]},"id":{"type":"string"},"title":{"type":"string"},"variant":{"type":"string","enum":["bulleted","ordered"]},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"text":{"type":"string"}},"required":["id","text"]}}},"required":["kind","id","variant","items"]},{"type":"object","properties":{"kind":{"type":"string","enum":["facts"]},"id":{"type":"string"},"title":{"type":"string"},"variant":{"type":"string","enum":["pairs","schedule"]},"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"value":{"type":"string"}},"required":["id","label","value"]}}},"required":["kind","id","variant","rows"]},{"type":"object","properties":{"kind":{"type":"string","enum":["media"]},"id":{"type":"string"},"title":{"type":"string"},"layout":{"type":"string","enum":["single","gallery","steps"]},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"imageUrl":{"type":"string"},"imageAttribution":{"type":"object","properties":{"source":{"type":"string","enum":["unsplash"]},"photographerName":{"type":"string"},"photographerUrl":{"type":"string","format":"uri"},"photoUrl":{"type":"string","format":"uri"}},"required":["source","photographerName","photographerUrl","photoUrl"]},"caption":{"type":"string"},"hotspots":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"x":{"type":"number"},"y":{"type":"number"},"label":{"type":"string"}},"required":["id","x","y","label"]}}},"required":["id"]}}},"required":["kind","id","layout","items"]},{"type":"object","properties":{"kind":{"type":"string","enum":["embed"]},"id":{"type":"string"},"variant":{"type":"string","enum":["video","pdf","tour"]},"url":{"type":"string","format":"uri"},"title":{"type":"string"},"uploaded":{"type":"boolean"},"posterUrl":{"type":"string","format":"uri"}},"required":["kind","id","variant","url"]},{"type":"object","properties":{"kind":{"type":"string","enum":["action"]},"id":{"type":"string"},"label":{"type":"string"},"url":{"type":"string","format":"uri"},"description":{"type":"string"},"price":{"type":"string"}},"required":["kind","id","label","url"]},{"type":"object","properties":{"kind":{"type":"string","enum":["contact"]},"id":{"type":"string"},"title":{"type":"string"},"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"role":{"type":"string"},"phone":{"type":"string"},"sms":{"type":"boolean"},"whatsapp":{"type":"boolean"},"note":{"type":"string"}},"required":["id","name"]}}},"required":["kind","id","rows"]},{"type":"object","properties":{"kind":{"type":"string","enum":["checklist"]},"id":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"}},"required":["id","label"]}}},"required":["kind","id","items"]},{"type":"object","properties":{"kind":{"type":"string","enum":["schedule"]},"id":{"type":"string"},"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"value":{"type":"string"}},"required":["id","label","value"]}}},"required":["kind","id","rows"]},{"type":"object","properties":{"kind":{"type":"string","enum":["photoSteps"]},"id":{"type":"string"},"steps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"imageUrl":{"type":"string"},"imageAttribution":{"type":"object","properties":{"source":{"type":"string","enum":["unsplash"]},"photographerName":{"type":"string"},"photographerUrl":{"type":"string","format":"uri"},"photoUrl":{"type":"string","format":"uri"}},"required":["source","photographerName","photographerUrl","photoUrl"]},"caption":{"type":"string"}},"required":["id","caption"]}}},"required":["kind","id","steps"]},{"type":"object","properties":{"kind":{"type":"string","enum":["video"]},"id":{"type":"string"},"url":{"type":"string"},"title":{"type":"string"}},"required":["kind","id","url"]}]}},"status":{"type":"string","enum":["draft","published"]},"targeting":{"type":"object","properties":{"listingIds":{"type":"array","items":{"type":"string"}},"listingGroupIds":{"type":"array","items":{"type":"string","minLength":1}}}},"show_after_check_in_only":{"type":"boolean"},"visibility_boundary":{"type":"object","properties":{"amount":{"type":"integer","minimum":1},"unit":{"type":"string","enum":["minutes","hours","days"]}},"required":["amount","unit"]}},"required":["title"]}}}},"responses":{"201":{"description":"Create Portal Guide","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"category":{"type":"string"},"cover_image_url":{"type":"string"},"cover_image_attribution":{"type":"object","properties":{"source":{"type":"string","enum":["unsplash"]},"photographerName":{"type":"string"},"photographerUrl":{"type":"string","format":"uri"},"photoUrl":{"type":"string","format":"uri"}},"required":["source","photographerName","photographerUrl","photoUrl"]},"blocks":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["text"]},"id":{"type":"string"},"title":{"type":"string"},"body":{"type":"string"}},"required":["kind","id","body"]},{"type":"object","properties":{"kind":{"type":"string","enum":["place"]},"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"address":{"type":"string"},"mapsUrl":{"type":"string"},"imageUrl":{"type":"string"},"imageAttribution":{"type":"object","properties":{"source":{"type":"string","enum":["unsplash"]},"photographerName":{"type":"string"},"photographerUrl":{"type":"string","format":"uri"},"photoUrl":{"type":"string","format":"uri"}},"required":["source","photographerName","photographerUrl","photoUrl"]},"hostTip":{"type":"string"},"placeType":{"type":"string","enum":["restaurant","cafe","bar","bakery","grocery","shopping","beach","park","trail","viewpoint","museum","landmark","activity","tour","gym","spa","pharmacy","medical","transit","parking","other"]},"distanceFromProperty":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"bookingUrl":{"type":"string"},"phone":{"type":"string"},"website":{"type":"string"},"priceBand":{"type":"string","enum":["$","$$","$$$","$$$$"]},"hours":{"type":"string"}},"required":["kind","id","name"]},{"type":"object","properties":{"kind":{"type":"string","enum":["tip"]},"id":{"type":"string"},"body":{"type":"string"},"tone":{"type":"string","enum":["info","tip","warning","danger"]}},"required":["kind","id","body"]},{"type":"object","properties":{"kind":{"type":"string","enum":["list"]},"id":{"type":"string"},"title":{"type":"string"},"variant":{"type":"string","enum":["bulleted","ordered"]},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"text":{"type":"string"}},"required":["id","text"]}}},"required":["kind","id","variant","items"]},{"type":"object","properties":{"kind":{"type":"string","enum":["facts"]},"id":{"type":"string"},"title":{"type":"string"},"variant":{"type":"string","enum":["pairs","schedule"]},"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"value":{"type":"string"}},"required":["id","label","value"]}}},"required":["kind","id","variant","rows"]},{"type":"object","properties":{"kind":{"type":"string","enum":["media"]},"id":{"type":"string"},"title":{"type":"string"},"layout":{"type":"string","enum":["single","gallery","steps"]},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"imageUrl":{"type":"string"},"imageAttribution":{"type":"object","properties":{"source":{"type":"string","enum":["unsplash"]},"photographerName":{"type":"string"},"photographerUrl":{"type":"string","format":"uri"},"photoUrl":{"type":"string","format":"uri"}},"required":["source","photographerName","photographerUrl","photoUrl"]},"caption":{"type":"string"},"hotspots":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"x":{"type":"number"},"y":{"type":"number"},"label":{"type":"string"}},"required":["id","x","y","label"]}}},"required":["id"]}}},"required":["kind","id","layout","items"]},{"type":"object","properties":{"kind":{"type":"string","enum":["embed"]},"id":{"type":"string"},"variant":{"type":"string","enum":["video","pdf","tour"]},"url":{"type":"string","format":"uri"},"title":{"type":"string"},"uploaded":{"type":"boolean"},"posterUrl":{"type":"string","format":"uri"}},"required":["kind","id","variant","url"]},{"type":"object","properties":{"kind":{"type":"string","enum":["action"]},"id":{"type":"string"},"label":{"type":"string"},"url":{"type":"string","format":"uri"},"description":{"type":"string"},"price":{"type":"string"}},"required":["kind","id","label","url"]},{"type":"object","properties":{"kind":{"type":"string","enum":["contact"]},"id":{"type":"string"},"title":{"type":"string"},"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"role":{"type":"string"},"phone":{"type":"string"},"sms":{"type":"boolean"},"whatsapp":{"type":"boolean"},"note":{"type":"string"}},"required":["id","name"]}}},"required":["kind","id","rows"]},{"type":"object","properties":{"kind":{"type":"string","enum":["checklist"]},"id":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"}},"required":["id","label"]}}},"required":["kind","id","items"]},{"type":"object","properties":{"kind":{"type":"string","enum":["schedule"]},"id":{"type":"string"},"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"value":{"type":"string"}},"required":["id","label","value"]}}},"required":["kind","id","rows"]},{"type":"object","properties":{"kind":{"type":"string","enum":["photoSteps"]},"id":{"type":"string"},"steps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"imageUrl":{"type":"string"},"imageAttribution":{"type":"object","properties":{"source":{"type":"string","enum":["unsplash"]},"photographerName":{"type":"string"},"photographerUrl":{"type":"string","format":"uri"},"photoUrl":{"type":"string","format":"uri"}},"required":["source","photographerName","photographerUrl","photoUrl"]},"caption":{"type":"string"}},"required":["id","caption"]}}},"required":["kind","id","steps"]},{"type":"object","properties":{"kind":{"type":"string","enum":["video"]},"id":{"type":"string"},"url":{"type":"string"},"title":{"type":"string"}},"required":["kind","id","url"]}]}},"status":{"type":"string","enum":["draft","published","archived"]},"targeting":{"type":"object","properties":{"listingIds":{"type":"array","items":{"type":"string"}},"listingGroupIds":{"type":"array","items":{"type":"string","minLength":1}}}},"show_after_check_in_only":{"type":"boolean"},"visibility_boundary":{"type":"object","properties":{"amount":{"type":"integer","minimum":1},"unit":{"type":"string","enum":["minutes","hours","days"]}},"required":["amount","unit"]},"order":{"type":"number"},"created_at":{"type":"number"},"updated_at":{"type":"number"}},"required":["id","workspace_id","title","blocks","status","created_at","updated_at"]}},"required":["data"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}}},"/v1/workspaces/{workspace_id}/portal-guides/{id}":{"get":{"operationId":"getPortalGuide","security":[{"bearerAuth":[]}],"tags":["portals"],"summary":"Get Portal Guide","description":"Get a complete portal guide and its concurrency timestamp.","parameters":[{"schema":{"type":"string","minLength":1,"description":"Workspace identifier"},"required":true,"description":"Workspace identifier","name":"workspace_id","in":"path"},{"schema":{"type":"string","minLength":1,"description":"Portal guide identifier"},"required":true,"description":"Portal guide identifier","name":"id","in":"path"}],"responses":{"200":{"description":"Get Portal Guide","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"category":{"type":"string"},"cover_image_url":{"type":"string"},"cover_image_attribution":{"type":"object","properties":{"source":{"type":"string","enum":["unsplash"]},"photographerName":{"type":"string"},"photographerUrl":{"type":"string","format":"uri"},"photoUrl":{"type":"string","format":"uri"}},"required":["source","photographerName","photographerUrl","photoUrl"]},"blocks":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["text"]},"id":{"type":"string"},"title":{"type":"string"},"body":{"type":"string"}},"required":["kind","id","body"]},{"type":"object","properties":{"kind":{"type":"string","enum":["place"]},"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"address":{"type":"string"},"mapsUrl":{"type":"string"},"imageUrl":{"type":"string"},"imageAttribution":{"type":"object","properties":{"source":{"type":"string","enum":["unsplash"]},"photographerName":{"type":"string"},"photographerUrl":{"type":"string","format":"uri"},"photoUrl":{"type":"string","format":"uri"}},"required":["source","photographerName","photographerUrl","photoUrl"]},"hostTip":{"type":"string"},"placeType":{"type":"string","enum":["restaurant","cafe","bar","bakery","grocery","shopping","beach","park","trail","viewpoint","museum","landmark","activity","tour","gym","spa","pharmacy","medical","transit","parking","other"]},"distanceFromProperty":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"bookingUrl":{"type":"string"},"phone":{"type":"string"},"website":{"type":"string"},"priceBand":{"type":"string","enum":["$","$$","$$$","$$$$"]},"hours":{"type":"string"}},"required":["kind","id","name"]},{"type":"object","properties":{"kind":{"type":"string","enum":["tip"]},"id":{"type":"string"},"body":{"type":"string"},"tone":{"type":"string","enum":["info","tip","warning","danger"]}},"required":["kind","id","body"]},{"type":"object","properties":{"kind":{"type":"string","enum":["list"]},"id":{"type":"string"},"title":{"type":"string"},"variant":{"type":"string","enum":["bulleted","ordered"]},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"text":{"type":"string"}},"required":["id","text"]}}},"required":["kind","id","variant","items"]},{"type":"object","properties":{"kind":{"type":"string","enum":["facts"]},"id":{"type":"string"},"title":{"type":"string"},"variant":{"type":"string","enum":["pairs","schedule"]},"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"value":{"type":"string"}},"required":["id","label","value"]}}},"required":["kind","id","variant","rows"]},{"type":"object","properties":{"kind":{"type":"string","enum":["media"]},"id":{"type":"string"},"title":{"type":"string"},"layout":{"type":"string","enum":["single","gallery","steps"]},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"imageUrl":{"type":"string"},"imageAttribution":{"type":"object","properties":{"source":{"type":"string","enum":["unsplash"]},"photographerName":{"type":"string"},"photographerUrl":{"type":"string","format":"uri"},"photoUrl":{"type":"string","format":"uri"}},"required":["source","photographerName","photographerUrl","photoUrl"]},"caption":{"type":"string"},"hotspots":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"x":{"type":"number"},"y":{"type":"number"},"label":{"type":"string"}},"required":["id","x","y","label"]}}},"required":["id"]}}},"required":["kind","id","layout","items"]},{"type":"object","properties":{"kind":{"type":"string","enum":["embed"]},"id":{"type":"string"},"variant":{"type":"string","enum":["video","pdf","tour"]},"url":{"type":"string","format":"uri"},"title":{"type":"string"},"uploaded":{"type":"boolean"},"posterUrl":{"type":"string","format":"uri"}},"required":["kind","id","variant","url"]},{"type":"object","properties":{"kind":{"type":"string","enum":["action"]},"id":{"type":"string"},"label":{"type":"string"},"url":{"type":"string","format":"uri"},"description":{"type":"string"},"price":{"type":"string"}},"required":["kind","id","label","url"]},{"type":"object","properties":{"kind":{"type":"string","enum":["contact"]},"id":{"type":"string"},"title":{"type":"string"},"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"role":{"type":"string"},"phone":{"type":"string"},"sms":{"type":"boolean"},"whatsapp":{"type":"boolean"},"note":{"type":"string"}},"required":["id","name"]}}},"required":["kind","id","rows"]},{"type":"object","properties":{"kind":{"type":"string","enum":["checklist"]},"id":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"}},"required":["id","label"]}}},"required":["kind","id","items"]},{"type":"object","properties":{"kind":{"type":"string","enum":["schedule"]},"id":{"type":"string"},"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"value":{"type":"string"}},"required":["id","label","value"]}}},"required":["kind","id","rows"]},{"type":"object","properties":{"kind":{"type":"string","enum":["photoSteps"]},"id":{"type":"string"},"steps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"imageUrl":{"type":"string"},"imageAttribution":{"type":"object","properties":{"source":{"type":"string","enum":["unsplash"]},"photographerName":{"type":"string"},"photographerUrl":{"type":"string","format":"uri"},"photoUrl":{"type":"string","format":"uri"}},"required":["source","photographerName","photographerUrl","photoUrl"]},"caption":{"type":"string"}},"required":["id","caption"]}}},"required":["kind","id","steps"]},{"type":"object","properties":{"kind":{"type":"string","enum":["video"]},"id":{"type":"string"},"url":{"type":"string"},"title":{"type":"string"}},"required":["kind","id","url"]}]}},"status":{"type":"string","enum":["draft","published","archived"]},"targeting":{"type":"object","properties":{"listingIds":{"type":"array","items":{"type":"string"}},"listingGroupIds":{"type":"array","items":{"type":"string","minLength":1}}}},"show_after_check_in_only":{"type":"boolean"},"visibility_boundary":{"type":"object","properties":{"amount":{"type":"integer","minimum":1},"unit":{"type":"string","enum":["minutes","hours","days"]}},"required":["amount","unit"]},"order":{"type":"number"},"created_at":{"type":"number"},"updated_at":{"type":"number"}},"required":["id","workspace_id","title","blocks","status","created_at","updated_at"]}},"required":["data"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}},"patch":{"operationId":"patchPortalGuide","security":[{"bearerAuth":[]}],"tags":["portals"],"summary":"Update Portal Guide","description":"Update a portal guide. Published guide changes reach matching customer portals immediately.","parameters":[{"schema":{"type":"string","minLength":1,"description":"Workspace identifier"},"required":true,"description":"Workspace identifier","name":"workspace_id","in":"path"},{"schema":{"type":"string","minLength":1,"description":"Portal guide identifier"},"required":true,"description":"Portal guide identifier","name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"expected_updated_at":{"type":"number","minimum":0},"title":{"type":"string","minLength":1},"description":{"type":"string","nullable":true},"category":{"type":"string","nullable":true},"cover_image_url":{"type":"string","nullable":true},"cover_image_attribution":{"type":"object","nullable":true,"properties":{"source":{"type":"string","enum":["unsplash"]},"photographerName":{"type":"string"},"photographerUrl":{"type":"string","format":"uri"},"photoUrl":{"type":"string","format":"uri"}},"required":["source","photographerName","photographerUrl","photoUrl"]},"blocks":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["text"]},"id":{"type":"string"},"title":{"type":"string"},"body":{"type":"string"}},"required":["kind","id","body"]},{"type":"object","properties":{"kind":{"type":"string","enum":["place"]},"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"address":{"type":"string"},"mapsUrl":{"type":"string"},"imageUrl":{"type":"string"},"imageAttribution":{"type":"object","properties":{"source":{"type":"string","enum":["unsplash"]},"photographerName":{"type":"string"},"photographerUrl":{"type":"string","format":"uri"},"photoUrl":{"type":"string","format":"uri"}},"required":["source","photographerName","photographerUrl","photoUrl"]},"hostTip":{"type":"string"},"placeType":{"type":"string","enum":["restaurant","cafe","bar","bakery","grocery","shopping","beach","park","trail","viewpoint","museum","landmark","activity","tour","gym","spa","pharmacy","medical","transit","parking","other"]},"distanceFromProperty":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"bookingUrl":{"type":"string"},"phone":{"type":"string"},"website":{"type":"string"},"priceBand":{"type":"string","enum":["$","$$","$$$","$$$$"]},"hours":{"type":"string"}},"required":["kind","id","name"]},{"type":"object","properties":{"kind":{"type":"string","enum":["tip"]},"id":{"type":"string"},"body":{"type":"string"},"tone":{"type":"string","enum":["info","tip","warning","danger"]}},"required":["kind","id","body"]},{"type":"object","properties":{"kind":{"type":"string","enum":["list"]},"id":{"type":"string"},"title":{"type":"string"},"variant":{"type":"string","enum":["bulleted","ordered"]},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"text":{"type":"string"}},"required":["id","text"]}}},"required":["kind","id","variant","items"]},{"type":"object","properties":{"kind":{"type":"string","enum":["facts"]},"id":{"type":"string"},"title":{"type":"string"},"variant":{"type":"string","enum":["pairs","schedule"]},"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"value":{"type":"string"}},"required":["id","label","value"]}}},"required":["kind","id","variant","rows"]},{"type":"object","properties":{"kind":{"type":"string","enum":["media"]},"id":{"type":"string"},"title":{"type":"string"},"layout":{"type":"string","enum":["single","gallery","steps"]},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"imageUrl":{"type":"string"},"imageAttribution":{"type":"object","properties":{"source":{"type":"string","enum":["unsplash"]},"photographerName":{"type":"string"},"photographerUrl":{"type":"string","format":"uri"},"photoUrl":{"type":"string","format":"uri"}},"required":["source","photographerName","photographerUrl","photoUrl"]},"caption":{"type":"string"},"hotspots":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"x":{"type":"number"},"y":{"type":"number"},"label":{"type":"string"}},"required":["id","x","y","label"]}}},"required":["id"]}}},"required":["kind","id","layout","items"]},{"type":"object","properties":{"kind":{"type":"string","enum":["embed"]},"id":{"type":"string"},"variant":{"type":"string","enum":["video","pdf","tour"]},"url":{"type":"string","format":"uri"},"title":{"type":"string"},"uploaded":{"type":"boolean"},"posterUrl":{"type":"string","format":"uri"}},"required":["kind","id","variant","url"]},{"type":"object","properties":{"kind":{"type":"string","enum":["action"]},"id":{"type":"string"},"label":{"type":"string"},"url":{"type":"string","format":"uri"},"description":{"type":"string"},"price":{"type":"string"}},"required":["kind","id","label","url"]},{"type":"object","properties":{"kind":{"type":"string","enum":["contact"]},"id":{"type":"string"},"title":{"type":"string"},"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"role":{"type":"string"},"phone":{"type":"string"},"sms":{"type":"boolean"},"whatsapp":{"type":"boolean"},"note":{"type":"string"}},"required":["id","name"]}}},"required":["kind","id","rows"]},{"type":"object","properties":{"kind":{"type":"string","enum":["checklist"]},"id":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"}},"required":["id","label"]}}},"required":["kind","id","items"]},{"type":"object","properties":{"kind":{"type":"string","enum":["schedule"]},"id":{"type":"string"},"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"value":{"type":"string"}},"required":["id","label","value"]}}},"required":["kind","id","rows"]},{"type":"object","properties":{"kind":{"type":"string","enum":["photoSteps"]},"id":{"type":"string"},"steps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"imageUrl":{"type":"string"},"imageAttribution":{"type":"object","properties":{"source":{"type":"string","enum":["unsplash"]},"photographerName":{"type":"string"},"photographerUrl":{"type":"string","format":"uri"},"photoUrl":{"type":"string","format":"uri"}},"required":["source","photographerName","photographerUrl","photoUrl"]},"caption":{"type":"string"}},"required":["id","caption"]}}},"required":["kind","id","steps"]},{"type":"object","properties":{"kind":{"type":"string","enum":["video"]},"id":{"type":"string"},"url":{"type":"string"},"title":{"type":"string"}},"required":["kind","id","url"]}]}},"status":{"type":"string","enum":["draft","published"]},"targeting":{"type":"object","nullable":true,"properties":{"listingIds":{"type":"array","items":{"type":"string"}},"listingGroupIds":{"type":"array","items":{"type":"string","minLength":1}}}},"show_after_check_in_only":{"type":"boolean"},"visibility_boundary":{"type":"object","nullable":true,"properties":{"amount":{"type":"integer","minimum":1},"unit":{"type":"string","enum":["minutes","hours","days"]}},"required":["amount","unit"]}},"required":["expected_updated_at"]}}}},"responses":{"200":{"description":"Update Portal Guide","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"category":{"type":"string"},"cover_image_url":{"type":"string"},"cover_image_attribution":{"type":"object","properties":{"source":{"type":"string","enum":["unsplash"]},"photographerName":{"type":"string"},"photographerUrl":{"type":"string","format":"uri"},"photoUrl":{"type":"string","format":"uri"}},"required":["source","photographerName","photographerUrl","photoUrl"]},"blocks":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["text"]},"id":{"type":"string"},"title":{"type":"string"},"body":{"type":"string"}},"required":["kind","id","body"]},{"type":"object","properties":{"kind":{"type":"string","enum":["place"]},"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"address":{"type":"string"},"mapsUrl":{"type":"string"},"imageUrl":{"type":"string"},"imageAttribution":{"type":"object","properties":{"source":{"type":"string","enum":["unsplash"]},"photographerName":{"type":"string"},"photographerUrl":{"type":"string","format":"uri"},"photoUrl":{"type":"string","format":"uri"}},"required":["source","photographerName","photographerUrl","photoUrl"]},"hostTip":{"type":"string"},"placeType":{"type":"string","enum":["restaurant","cafe","bar","bakery","grocery","shopping","beach","park","trail","viewpoint","museum","landmark","activity","tour","gym","spa","pharmacy","medical","transit","parking","other"]},"distanceFromProperty":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"bookingUrl":{"type":"string"},"phone":{"type":"string"},"website":{"type":"string"},"priceBand":{"type":"string","enum":["$","$$","$$$","$$$$"]},"hours":{"type":"string"}},"required":["kind","id","name"]},{"type":"object","properties":{"kind":{"type":"string","enum":["tip"]},"id":{"type":"string"},"body":{"type":"string"},"tone":{"type":"string","enum":["info","tip","warning","danger"]}},"required":["kind","id","body"]},{"type":"object","properties":{"kind":{"type":"string","enum":["list"]},"id":{"type":"string"},"title":{"type":"string"},"variant":{"type":"string","enum":["bulleted","ordered"]},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"text":{"type":"string"}},"required":["id","text"]}}},"required":["kind","id","variant","items"]},{"type":"object","properties":{"kind":{"type":"string","enum":["facts"]},"id":{"type":"string"},"title":{"type":"string"},"variant":{"type":"string","enum":["pairs","schedule"]},"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"value":{"type":"string"}},"required":["id","label","value"]}}},"required":["kind","id","variant","rows"]},{"type":"object","properties":{"kind":{"type":"string","enum":["media"]},"id":{"type":"string"},"title":{"type":"string"},"layout":{"type":"string","enum":["single","gallery","steps"]},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"imageUrl":{"type":"string"},"imageAttribution":{"type":"object","properties":{"source":{"type":"string","enum":["unsplash"]},"photographerName":{"type":"string"},"photographerUrl":{"type":"string","format":"uri"},"photoUrl":{"type":"string","format":"uri"}},"required":["source","photographerName","photographerUrl","photoUrl"]},"caption":{"type":"string"},"hotspots":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"x":{"type":"number"},"y":{"type":"number"},"label":{"type":"string"}},"required":["id","x","y","label"]}}},"required":["id"]}}},"required":["kind","id","layout","items"]},{"type":"object","properties":{"kind":{"type":"string","enum":["embed"]},"id":{"type":"string"},"variant":{"type":"string","enum":["video","pdf","tour"]},"url":{"type":"string","format":"uri"},"title":{"type":"string"},"uploaded":{"type":"boolean"},"posterUrl":{"type":"string","format":"uri"}},"required":["kind","id","variant","url"]},{"type":"object","properties":{"kind":{"type":"string","enum":["action"]},"id":{"type":"string"},"label":{"type":"string"},"url":{"type":"string","format":"uri"},"description":{"type":"string"},"price":{"type":"string"}},"required":["kind","id","label","url"]},{"type":"object","properties":{"kind":{"type":"string","enum":["contact"]},"id":{"type":"string"},"title":{"type":"string"},"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"role":{"type":"string"},"phone":{"type":"string"},"sms":{"type":"boolean"},"whatsapp":{"type":"boolean"},"note":{"type":"string"}},"required":["id","name"]}}},"required":["kind","id","rows"]},{"type":"object","properties":{"kind":{"type":"string","enum":["checklist"]},"id":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"}},"required":["id","label"]}}},"required":["kind","id","items"]},{"type":"object","properties":{"kind":{"type":"string","enum":["schedule"]},"id":{"type":"string"},"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"value":{"type":"string"}},"required":["id","label","value"]}}},"required":["kind","id","rows"]},{"type":"object","properties":{"kind":{"type":"string","enum":["photoSteps"]},"id":{"type":"string"},"steps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"imageUrl":{"type":"string"},"imageAttribution":{"type":"object","properties":{"source":{"type":"string","enum":["unsplash"]},"photographerName":{"type":"string"},"photographerUrl":{"type":"string","format":"uri"},"photoUrl":{"type":"string","format":"uri"}},"required":["source","photographerName","photographerUrl","photoUrl"]},"caption":{"type":"string"}},"required":["id","caption"]}}},"required":["kind","id","steps"]},{"type":"object","properties":{"kind":{"type":"string","enum":["video"]},"id":{"type":"string"},"url":{"type":"string"},"title":{"type":"string"}},"required":["kind","id","url"]}]}},"status":{"type":"string","enum":["draft","published","archived"]},"targeting":{"type":"object","properties":{"listingIds":{"type":"array","items":{"type":"string"}},"listingGroupIds":{"type":"array","items":{"type":"string","minLength":1}}}},"show_after_check_in_only":{"type":"boolean"},"visibility_boundary":{"type":"object","properties":{"amount":{"type":"integer","minimum":1},"unit":{"type":"string","enum":["minutes","hours","days"]}},"required":["amount","unit"]},"order":{"type":"number"},"created_at":{"type":"number"},"updated_at":{"type":"number"}},"required":["id","workspace_id","title","blocks","status","created_at","updated_at"]}},"required":["data"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}}},"/v1/workspaces/{workspace_id}/portal-guides/{id}/duplicate":{"post":{"operationId":"duplicatePortalGuide","security":[{"bearerAuth":[]}],"tags":["portals"],"summary":"Duplicate Portal Guide","description":"Create a draft copy of a portal guide.","parameters":[{"schema":{"type":"string","minLength":1,"description":"Workspace identifier"},"required":true,"description":"Workspace identifier","name":"workspace_id","in":"path"},{"schema":{"type":"string","minLength":1,"description":"Portal guide identifier"},"required":true,"description":"Portal guide identifier","name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"expected_updated_at":{"type":"number","minimum":0}},"required":["expected_updated_at"]}}}},"responses":{"201":{"description":"Duplicate Portal Guide","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"category":{"type":"string"},"cover_image_url":{"type":"string"},"cover_image_attribution":{"type":"object","properties":{"source":{"type":"string","enum":["unsplash"]},"photographerName":{"type":"string"},"photographerUrl":{"type":"string","format":"uri"},"photoUrl":{"type":"string","format":"uri"}},"required":["source","photographerName","photographerUrl","photoUrl"]},"blocks":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["text"]},"id":{"type":"string"},"title":{"type":"string"},"body":{"type":"string"}},"required":["kind","id","body"]},{"type":"object","properties":{"kind":{"type":"string","enum":["place"]},"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"address":{"type":"string"},"mapsUrl":{"type":"string"},"imageUrl":{"type":"string"},"imageAttribution":{"type":"object","properties":{"source":{"type":"string","enum":["unsplash"]},"photographerName":{"type":"string"},"photographerUrl":{"type":"string","format":"uri"},"photoUrl":{"type":"string","format":"uri"}},"required":["source","photographerName","photographerUrl","photoUrl"]},"hostTip":{"type":"string"},"placeType":{"type":"string","enum":["restaurant","cafe","bar","bakery","grocery","shopping","beach","park","trail","viewpoint","museum","landmark","activity","tour","gym","spa","pharmacy","medical","transit","parking","other"]},"distanceFromProperty":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"bookingUrl":{"type":"string"},"phone":{"type":"string"},"website":{"type":"string"},"priceBand":{"type":"string","enum":["$","$$","$$$","$$$$"]},"hours":{"type":"string"}},"required":["kind","id","name"]},{"type":"object","properties":{"kind":{"type":"string","enum":["tip"]},"id":{"type":"string"},"body":{"type":"string"},"tone":{"type":"string","enum":["info","tip","warning","danger"]}},"required":["kind","id","body"]},{"type":"object","properties":{"kind":{"type":"string","enum":["list"]},"id":{"type":"string"},"title":{"type":"string"},"variant":{"type":"string","enum":["bulleted","ordered"]},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"text":{"type":"string"}},"required":["id","text"]}}},"required":["kind","id","variant","items"]},{"type":"object","properties":{"kind":{"type":"string","enum":["facts"]},"id":{"type":"string"},"title":{"type":"string"},"variant":{"type":"string","enum":["pairs","schedule"]},"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"value":{"type":"string"}},"required":["id","label","value"]}}},"required":["kind","id","variant","rows"]},{"type":"object","properties":{"kind":{"type":"string","enum":["media"]},"id":{"type":"string"},"title":{"type":"string"},"layout":{"type":"string","enum":["single","gallery","steps"]},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"imageUrl":{"type":"string"},"imageAttribution":{"type":"object","properties":{"source":{"type":"string","enum":["unsplash"]},"photographerName":{"type":"string"},"photographerUrl":{"type":"string","format":"uri"},"photoUrl":{"type":"string","format":"uri"}},"required":["source","photographerName","photographerUrl","photoUrl"]},"caption":{"type":"string"},"hotspots":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"x":{"type":"number"},"y":{"type":"number"},"label":{"type":"string"}},"required":["id","x","y","label"]}}},"required":["id"]}}},"required":["kind","id","layout","items"]},{"type":"object","properties":{"kind":{"type":"string","enum":["embed"]},"id":{"type":"string"},"variant":{"type":"string","enum":["video","pdf","tour"]},"url":{"type":"string","format":"uri"},"title":{"type":"string"},"uploaded":{"type":"boolean"},"posterUrl":{"type":"string","format":"uri"}},"required":["kind","id","variant","url"]},{"type":"object","properties":{"kind":{"type":"string","enum":["action"]},"id":{"type":"string"},"label":{"type":"string"},"url":{"type":"string","format":"uri"},"description":{"type":"string"},"price":{"type":"string"}},"required":["kind","id","label","url"]},{"type":"object","properties":{"kind":{"type":"string","enum":["contact"]},"id":{"type":"string"},"title":{"type":"string"},"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"role":{"type":"string"},"phone":{"type":"string"},"sms":{"type":"boolean"},"whatsapp":{"type":"boolean"},"note":{"type":"string"}},"required":["id","name"]}}},"required":["kind","id","rows"]},{"type":"object","properties":{"kind":{"type":"string","enum":["checklist"]},"id":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"}},"required":["id","label"]}}},"required":["kind","id","items"]},{"type":"object","properties":{"kind":{"type":"string","enum":["schedule"]},"id":{"type":"string"},"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"value":{"type":"string"}},"required":["id","label","value"]}}},"required":["kind","id","rows"]},{"type":"object","properties":{"kind":{"type":"string","enum":["photoSteps"]},"id":{"type":"string"},"steps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"imageUrl":{"type":"string"},"imageAttribution":{"type":"object","properties":{"source":{"type":"string","enum":["unsplash"]},"photographerName":{"type":"string"},"photographerUrl":{"type":"string","format":"uri"},"photoUrl":{"type":"string","format":"uri"}},"required":["source","photographerName","photographerUrl","photoUrl"]},"caption":{"type":"string"}},"required":["id","caption"]}}},"required":["kind","id","steps"]},{"type":"object","properties":{"kind":{"type":"string","enum":["video"]},"id":{"type":"string"},"url":{"type":"string"},"title":{"type":"string"}},"required":["kind","id","url"]}]}},"status":{"type":"string","enum":["draft","published","archived"]},"targeting":{"type":"object","properties":{"listingIds":{"type":"array","items":{"type":"string"}},"listingGroupIds":{"type":"array","items":{"type":"string","minLength":1}}}},"show_after_check_in_only":{"type":"boolean"},"visibility_boundary":{"type":"object","properties":{"amount":{"type":"integer","minimum":1},"unit":{"type":"string","enum":["minutes","hours","days"]}},"required":["amount","unit"]},"order":{"type":"number"},"created_at":{"type":"number"},"updated_at":{"type":"number"}},"required":["id","workspace_id","title","blocks","status","created_at","updated_at"]}},"required":["data"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}}},"/v1/workspaces/{workspace_id}/portal-guides/{id}/archive":{"post":{"operationId":"archivePortalGuide","security":[{"bearerAuth":[]}],"tags":["portals"],"summary":"Archive Portal Guide","description":"Archive a portal guide without deleting it.","parameters":[{"schema":{"type":"string","minLength":1,"description":"Workspace identifier"},"required":true,"description":"Workspace identifier","name":"workspace_id","in":"path"},{"schema":{"type":"string","minLength":1,"description":"Portal guide identifier"},"required":true,"description":"Portal guide identifier","name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"expected_updated_at":{"type":"number","minimum":0}},"required":["expected_updated_at"]}}}},"responses":{"200":{"description":"Archive Portal Guide","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"category":{"type":"string"},"cover_image_url":{"type":"string"},"cover_image_attribution":{"type":"object","properties":{"source":{"type":"string","enum":["unsplash"]},"photographerName":{"type":"string"},"photographerUrl":{"type":"string","format":"uri"},"photoUrl":{"type":"string","format":"uri"}},"required":["source","photographerName","photographerUrl","photoUrl"]},"blocks":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["text"]},"id":{"type":"string"},"title":{"type":"string"},"body":{"type":"string"}},"required":["kind","id","body"]},{"type":"object","properties":{"kind":{"type":"string","enum":["place"]},"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"address":{"type":"string"},"mapsUrl":{"type":"string"},"imageUrl":{"type":"string"},"imageAttribution":{"type":"object","properties":{"source":{"type":"string","enum":["unsplash"]},"photographerName":{"type":"string"},"photographerUrl":{"type":"string","format":"uri"},"photoUrl":{"type":"string","format":"uri"}},"required":["source","photographerName","photographerUrl","photoUrl"]},"hostTip":{"type":"string"},"placeType":{"type":"string","enum":["restaurant","cafe","bar","bakery","grocery","shopping","beach","park","trail","viewpoint","museum","landmark","activity","tour","gym","spa","pharmacy","medical","transit","parking","other"]},"distanceFromProperty":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"bookingUrl":{"type":"string"},"phone":{"type":"string"},"website":{"type":"string"},"priceBand":{"type":"string","enum":["$","$$","$$$","$$$$"]},"hours":{"type":"string"}},"required":["kind","id","name"]},{"type":"object","properties":{"kind":{"type":"string","enum":["tip"]},"id":{"type":"string"},"body":{"type":"string"},"tone":{"type":"string","enum":["info","tip","warning","danger"]}},"required":["kind","id","body"]},{"type":"object","properties":{"kind":{"type":"string","enum":["list"]},"id":{"type":"string"},"title":{"type":"string"},"variant":{"type":"string","enum":["bulleted","ordered"]},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"text":{"type":"string"}},"required":["id","text"]}}},"required":["kind","id","variant","items"]},{"type":"object","properties":{"kind":{"type":"string","enum":["facts"]},"id":{"type":"string"},"title":{"type":"string"},"variant":{"type":"string","enum":["pairs","schedule"]},"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"value":{"type":"string"}},"required":["id","label","value"]}}},"required":["kind","id","variant","rows"]},{"type":"object","properties":{"kind":{"type":"string","enum":["media"]},"id":{"type":"string"},"title":{"type":"string"},"layout":{"type":"string","enum":["single","gallery","steps"]},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"imageUrl":{"type":"string"},"imageAttribution":{"type":"object","properties":{"source":{"type":"string","enum":["unsplash"]},"photographerName":{"type":"string"},"photographerUrl":{"type":"string","format":"uri"},"photoUrl":{"type":"string","format":"uri"}},"required":["source","photographerName","photographerUrl","photoUrl"]},"caption":{"type":"string"},"hotspots":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"x":{"type":"number"},"y":{"type":"number"},"label":{"type":"string"}},"required":["id","x","y","label"]}}},"required":["id"]}}},"required":["kind","id","layout","items"]},{"type":"object","properties":{"kind":{"type":"string","enum":["embed"]},"id":{"type":"string"},"variant":{"type":"string","enum":["video","pdf","tour"]},"url":{"type":"string","format":"uri"},"title":{"type":"string"},"uploaded":{"type":"boolean"},"posterUrl":{"type":"string","format":"uri"}},"required":["kind","id","variant","url"]},{"type":"object","properties":{"kind":{"type":"string","enum":["action"]},"id":{"type":"string"},"label":{"type":"string"},"url":{"type":"string","format":"uri"},"description":{"type":"string"},"price":{"type":"string"}},"required":["kind","id","label","url"]},{"type":"object","properties":{"kind":{"type":"string","enum":["contact"]},"id":{"type":"string"},"title":{"type":"string"},"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"role":{"type":"string"},"phone":{"type":"string"},"sms":{"type":"boolean"},"whatsapp":{"type":"boolean"},"note":{"type":"string"}},"required":["id","name"]}}},"required":["kind","id","rows"]},{"type":"object","properties":{"kind":{"type":"string","enum":["checklist"]},"id":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"}},"required":["id","label"]}}},"required":["kind","id","items"]},{"type":"object","properties":{"kind":{"type":"string","enum":["schedule"]},"id":{"type":"string"},"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"value":{"type":"string"}},"required":["id","label","value"]}}},"required":["kind","id","rows"]},{"type":"object","properties":{"kind":{"type":"string","enum":["photoSteps"]},"id":{"type":"string"},"steps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"imageUrl":{"type":"string"},"imageAttribution":{"type":"object","properties":{"source":{"type":"string","enum":["unsplash"]},"photographerName":{"type":"string"},"photographerUrl":{"type":"string","format":"uri"},"photoUrl":{"type":"string","format":"uri"}},"required":["source","photographerName","photographerUrl","photoUrl"]},"caption":{"type":"string"}},"required":["id","caption"]}}},"required":["kind","id","steps"]},{"type":"object","properties":{"kind":{"type":"string","enum":["video"]},"id":{"type":"string"},"url":{"type":"string"},"title":{"type":"string"}},"required":["kind","id","url"]}]}},"status":{"type":"string","enum":["draft","published","archived"]},"targeting":{"type":"object","properties":{"listingIds":{"type":"array","items":{"type":"string"}},"listingGroupIds":{"type":"array","items":{"type":"string","minLength":1}}}},"show_after_check_in_only":{"type":"boolean"},"visibility_boundary":{"type":"object","properties":{"amount":{"type":"integer","minimum":1},"unit":{"type":"string","enum":["minutes","hours","days"]}},"required":["amount","unit"]},"order":{"type":"number"},"created_at":{"type":"number"},"updated_at":{"type":"number"}},"required":["id","workspace_id","title","blocks","status","created_at","updated_at"]}},"required":["data"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}}},"/v1/workspaces/{workspace_id}/portal-guides/{id}/restore":{"post":{"operationId":"restorePortalGuide","security":[{"bearerAuth":[]}],"tags":["portals"],"summary":"Restore Portal Guide","description":"Restore an archived portal guide as a draft.","parameters":[{"schema":{"type":"string","minLength":1,"description":"Workspace identifier"},"required":true,"description":"Workspace identifier","name":"workspace_id","in":"path"},{"schema":{"type":"string","minLength":1,"description":"Portal guide identifier"},"required":true,"description":"Portal guide identifier","name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"expected_updated_at":{"type":"number","minimum":0}},"required":["expected_updated_at"]}}}},"responses":{"200":{"description":"Restore Portal Guide","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"category":{"type":"string"},"cover_image_url":{"type":"string"},"cover_image_attribution":{"type":"object","properties":{"source":{"type":"string","enum":["unsplash"]},"photographerName":{"type":"string"},"photographerUrl":{"type":"string","format":"uri"},"photoUrl":{"type":"string","format":"uri"}},"required":["source","photographerName","photographerUrl","photoUrl"]},"blocks":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["text"]},"id":{"type":"string"},"title":{"type":"string"},"body":{"type":"string"}},"required":["kind","id","body"]},{"type":"object","properties":{"kind":{"type":"string","enum":["place"]},"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"address":{"type":"string"},"mapsUrl":{"type":"string"},"imageUrl":{"type":"string"},"imageAttribution":{"type":"object","properties":{"source":{"type":"string","enum":["unsplash"]},"photographerName":{"type":"string"},"photographerUrl":{"type":"string","format":"uri"},"photoUrl":{"type":"string","format":"uri"}},"required":["source","photographerName","photographerUrl","photoUrl"]},"hostTip":{"type":"string"},"placeType":{"type":"string","enum":["restaurant","cafe","bar","bakery","grocery","shopping","beach","park","trail","viewpoint","museum","landmark","activity","tour","gym","spa","pharmacy","medical","transit","parking","other"]},"distanceFromProperty":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"bookingUrl":{"type":"string"},"phone":{"type":"string"},"website":{"type":"string"},"priceBand":{"type":"string","enum":["$","$$","$$$","$$$$"]},"hours":{"type":"string"}},"required":["kind","id","name"]},{"type":"object","properties":{"kind":{"type":"string","enum":["tip"]},"id":{"type":"string"},"body":{"type":"string"},"tone":{"type":"string","enum":["info","tip","warning","danger"]}},"required":["kind","id","body"]},{"type":"object","properties":{"kind":{"type":"string","enum":["list"]},"id":{"type":"string"},"title":{"type":"string"},"variant":{"type":"string","enum":["bulleted","ordered"]},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"text":{"type":"string"}},"required":["id","text"]}}},"required":["kind","id","variant","items"]},{"type":"object","properties":{"kind":{"type":"string","enum":["facts"]},"id":{"type":"string"},"title":{"type":"string"},"variant":{"type":"string","enum":["pairs","schedule"]},"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"value":{"type":"string"}},"required":["id","label","value"]}}},"required":["kind","id","variant","rows"]},{"type":"object","properties":{"kind":{"type":"string","enum":["media"]},"id":{"type":"string"},"title":{"type":"string"},"layout":{"type":"string","enum":["single","gallery","steps"]},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"imageUrl":{"type":"string"},"imageAttribution":{"type":"object","properties":{"source":{"type":"string","enum":["unsplash"]},"photographerName":{"type":"string"},"photographerUrl":{"type":"string","format":"uri"},"photoUrl":{"type":"string","format":"uri"}},"required":["source","photographerName","photographerUrl","photoUrl"]},"caption":{"type":"string"},"hotspots":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"x":{"type":"number"},"y":{"type":"number"},"label":{"type":"string"}},"required":["id","x","y","label"]}}},"required":["id"]}}},"required":["kind","id","layout","items"]},{"type":"object","properties":{"kind":{"type":"string","enum":["embed"]},"id":{"type":"string"},"variant":{"type":"string","enum":["video","pdf","tour"]},"url":{"type":"string","format":"uri"},"title":{"type":"string"},"uploaded":{"type":"boolean"},"posterUrl":{"type":"string","format":"uri"}},"required":["kind","id","variant","url"]},{"type":"object","properties":{"kind":{"type":"string","enum":["action"]},"id":{"type":"string"},"label":{"type":"string"},"url":{"type":"string","format":"uri"},"description":{"type":"string"},"price":{"type":"string"}},"required":["kind","id","label","url"]},{"type":"object","properties":{"kind":{"type":"string","enum":["contact"]},"id":{"type":"string"},"title":{"type":"string"},"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"role":{"type":"string"},"phone":{"type":"string"},"sms":{"type":"boolean"},"whatsapp":{"type":"boolean"},"note":{"type":"string"}},"required":["id","name"]}}},"required":["kind","id","rows"]},{"type":"object","properties":{"kind":{"type":"string","enum":["checklist"]},"id":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"}},"required":["id","label"]}}},"required":["kind","id","items"]},{"type":"object","properties":{"kind":{"type":"string","enum":["schedule"]},"id":{"type":"string"},"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"value":{"type":"string"}},"required":["id","label","value"]}}},"required":["kind","id","rows"]},{"type":"object","properties":{"kind":{"type":"string","enum":["photoSteps"]},"id":{"type":"string"},"steps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"imageUrl":{"type":"string"},"imageAttribution":{"type":"object","properties":{"source":{"type":"string","enum":["unsplash"]},"photographerName":{"type":"string"},"photographerUrl":{"type":"string","format":"uri"},"photoUrl":{"type":"string","format":"uri"}},"required":["source","photographerName","photographerUrl","photoUrl"]},"caption":{"type":"string"}},"required":["id","caption"]}}},"required":["kind","id","steps"]},{"type":"object","properties":{"kind":{"type":"string","enum":["video"]},"id":{"type":"string"},"url":{"type":"string"},"title":{"type":"string"}},"required":["kind","id","url"]}]}},"status":{"type":"string","enum":["draft","published","archived"]},"targeting":{"type":"object","properties":{"listingIds":{"type":"array","items":{"type":"string"}},"listingGroupIds":{"type":"array","items":{"type":"string","minLength":1}}}},"show_after_check_in_only":{"type":"boolean"},"visibility_boundary":{"type":"object","properties":{"amount":{"type":"integer","minimum":1},"unit":{"type":"string","enum":["minutes","hours","days"]}},"required":["amount","unit"]},"order":{"type":"number"},"created_at":{"type":"number"},"updated_at":{"type":"number"}},"required":["id","workspace_id","title","blocks","status","created_at","updated_at"]}},"required":["data"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}}},"/v1/workspaces/{workspace_id}/portal-guides/reorder":{"post":{"operationId":"reorderPortalGuides","security":[{"bearerAuth":[]}],"tags":["portals"],"summary":"Reorder Portal Guides","description":"Set the display order for all non-archived portal guides. Include every non-archived guide exactly once.","parameters":[{"schema":{"type":"string","minLength":1,"description":"Workspace identifier"},"required":true,"description":"Workspace identifier","name":"workspace_id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Portal guide identifier"},"expected_updated_at":{"type":"number","minimum":0}},"required":["id","expected_updated_at"]},"minItems":1,"description":"Every non-archived guide in the workspace, in the requested display order"}},"required":["items"]}}}},"responses":{"200":{"description":"Reorder Portal Guides","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"category":{"type":"string"},"cover_image_url":{"type":"string"},"cover_image_attribution":{"type":"object","properties":{"source":{"type":"string","enum":["unsplash"]},"photographerName":{"type":"string"},"photographerUrl":{"type":"string","format":"uri"},"photoUrl":{"type":"string","format":"uri"}},"required":["source","photographerName","photographerUrl","photoUrl"]},"blocks":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["text"]},"id":{"type":"string"},"title":{"type":"string"},"body":{"type":"string"}},"required":["kind","id","body"]},{"type":"object","properties":{"kind":{"type":"string","enum":["place"]},"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"address":{"type":"string"},"mapsUrl":{"type":"string"},"imageUrl":{"type":"string"},"imageAttribution":{"type":"object","properties":{"source":{"type":"string","enum":["unsplash"]},"photographerName":{"type":"string"},"photographerUrl":{"type":"string","format":"uri"},"photoUrl":{"type":"string","format":"uri"}},"required":["source","photographerName","photographerUrl","photoUrl"]},"hostTip":{"type":"string"},"placeType":{"type":"string","enum":["restaurant","cafe","bar","bakery","grocery","shopping","beach","park","trail","viewpoint","museum","landmark","activity","tour","gym","spa","pharmacy","medical","transit","parking","other"]},"distanceFromProperty":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"bookingUrl":{"type":"string"},"phone":{"type":"string"},"website":{"type":"string"},"priceBand":{"type":"string","enum":["$","$$","$$$","$$$$"]},"hours":{"type":"string"}},"required":["kind","id","name"]},{"type":"object","properties":{"kind":{"type":"string","enum":["tip"]},"id":{"type":"string"},"body":{"type":"string"},"tone":{"type":"string","enum":["info","tip","warning","danger"]}},"required":["kind","id","body"]},{"type":"object","properties":{"kind":{"type":"string","enum":["list"]},"id":{"type":"string"},"title":{"type":"string"},"variant":{"type":"string","enum":["bulleted","ordered"]},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"text":{"type":"string"}},"required":["id","text"]}}},"required":["kind","id","variant","items"]},{"type":"object","properties":{"kind":{"type":"string","enum":["facts"]},"id":{"type":"string"},"title":{"type":"string"},"variant":{"type":"string","enum":["pairs","schedule"]},"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"value":{"type":"string"}},"required":["id","label","value"]}}},"required":["kind","id","variant","rows"]},{"type":"object","properties":{"kind":{"type":"string","enum":["media"]},"id":{"type":"string"},"title":{"type":"string"},"layout":{"type":"string","enum":["single","gallery","steps"]},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"imageUrl":{"type":"string"},"imageAttribution":{"type":"object","properties":{"source":{"type":"string","enum":["unsplash"]},"photographerName":{"type":"string"},"photographerUrl":{"type":"string","format":"uri"},"photoUrl":{"type":"string","format":"uri"}},"required":["source","photographerName","photographerUrl","photoUrl"]},"caption":{"type":"string"},"hotspots":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"x":{"type":"number"},"y":{"type":"number"},"label":{"type":"string"}},"required":["id","x","y","label"]}}},"required":["id"]}}},"required":["kind","id","layout","items"]},{"type":"object","properties":{"kind":{"type":"string","enum":["embed"]},"id":{"type":"string"},"variant":{"type":"string","enum":["video","pdf","tour"]},"url":{"type":"string","format":"uri"},"title":{"type":"string"},"uploaded":{"type":"boolean"},"posterUrl":{"type":"string","format":"uri"}},"required":["kind","id","variant","url"]},{"type":"object","properties":{"kind":{"type":"string","enum":["action"]},"id":{"type":"string"},"label":{"type":"string"},"url":{"type":"string","format":"uri"},"description":{"type":"string"},"price":{"type":"string"}},"required":["kind","id","label","url"]},{"type":"object","properties":{"kind":{"type":"string","enum":["contact"]},"id":{"type":"string"},"title":{"type":"string"},"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"role":{"type":"string"},"phone":{"type":"string"},"sms":{"type":"boolean"},"whatsapp":{"type":"boolean"},"note":{"type":"string"}},"required":["id","name"]}}},"required":["kind","id","rows"]},{"type":"object","properties":{"kind":{"type":"string","enum":["checklist"]},"id":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"}},"required":["id","label"]}}},"required":["kind","id","items"]},{"type":"object","properties":{"kind":{"type":"string","enum":["schedule"]},"id":{"type":"string"},"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"value":{"type":"string"}},"required":["id","label","value"]}}},"required":["kind","id","rows"]},{"type":"object","properties":{"kind":{"type":"string","enum":["photoSteps"]},"id":{"type":"string"},"steps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"imageUrl":{"type":"string"},"imageAttribution":{"type":"object","properties":{"source":{"type":"string","enum":["unsplash"]},"photographerName":{"type":"string"},"photographerUrl":{"type":"string","format":"uri"},"photoUrl":{"type":"string","format":"uri"}},"required":["source","photographerName","photographerUrl","photoUrl"]},"caption":{"type":"string"}},"required":["id","caption"]}}},"required":["kind","id","steps"]},{"type":"object","properties":{"kind":{"type":"string","enum":["video"]},"id":{"type":"string"},"url":{"type":"string"},"title":{"type":"string"}},"required":["kind","id","url"]}]}},"status":{"type":"string","enum":["draft","published","archived"]},"targeting":{"type":"object","properties":{"listingIds":{"type":"array","items":{"type":"string"}},"listingGroupIds":{"type":"array","items":{"type":"string","minLength":1}}}},"show_after_check_in_only":{"type":"boolean"},"visibility_boundary":{"type":"object","properties":{"amount":{"type":"integer","minimum":1},"unit":{"type":"string","enum":["minutes","hours","days"]}},"required":["amount","unit"]},"order":{"type":"number"},"created_at":{"type":"number"},"updated_at":{"type":"number"}},"required":["id","workspace_id","title","blocks","status","created_at","updated_at"]}}},"required":["data"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}}},"/v1/workspaces/{workspace_id}/portal-brand-kit":{"get":{"operationId":"getPortalBrandKit","security":[{"bearerAuth":[]}],"tags":["portals"],"summary":"Get Portal Brand Kit","description":"Get the workspace Brand Kit used as the default for future portal sessions.","parameters":[{"schema":{"type":"string","minLength":1,"description":"Workspace identifier"},"required":true,"description":"Workspace identifier","name":"workspace_id","in":"path"}],"responses":{"200":{"description":"Get Portal Brand Kit","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"display_name":{"type":"string"},"logo":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"storage_id":{"type":"string","minLength":1}},"required":["url"]},"palette":{"type":"object","properties":{"primary":{"type":"string"},"accent":{"type":"string"},"background":{"type":"string"},"swatches":{"type":"array","items":{"type":"object","properties":{"hex":{"type":"string"},"name":{"type":"string"}},"required":["hex"]}}},"required":["primary","accent","swatches"]},"created_at":{"type":"number"},"updated_at":{"type":"number"}},"required":["id","workspace_id","palette","created_at","updated_at"]}},"required":["data"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}},"patch":{"operationId":"patchPortalBrandKit","security":[{"bearerAuth":[]}],"tags":["portals"],"summary":"Update Portal Brand Kit","description":"Update the workspace Brand Kit. Existing customer portal sessions keep their saved branding snapshot.","parameters":[{"schema":{"type":"string","minLength":1,"description":"Workspace identifier"},"required":true,"description":"Workspace identifier","name":"workspace_id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"expected_updated_at":{"type":"number","nullable":true,"minimum":0},"display_name":{"type":"string","nullable":true},"logo":{"type":"object","nullable":true,"properties":{"url":{"type":"string","format":"uri"},"storage_id":{"type":"string","minLength":1}},"required":["url"]},"primary":{"type":"string","pattern":"^#?[0-9a-fA-F]{6}$"},"accent":{"type":"string","pattern":"^#?[0-9a-fA-F]{6}$"},"background":{"type":"string","nullable":true,"pattern":"^#?[0-9a-fA-F]{6}$"},"swatches":{"type":"array","items":{"type":"object","properties":{"hex":{"type":"string","pattern":"^#?[0-9a-fA-F]{6}$"},"name":{"type":"string"}},"required":["hex"]}}},"required":["expected_updated_at"]}}}},"responses":{"200":{"description":"Update Portal Brand Kit","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"display_name":{"type":"string"},"logo":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"storage_id":{"type":"string","minLength":1}},"required":["url"]},"palette":{"type":"object","properties":{"primary":{"type":"string"},"accent":{"type":"string"},"background":{"type":"string"},"swatches":{"type":"array","items":{"type":"object","properties":{"hex":{"type":"string"},"name":{"type":"string"}},"required":["hex"]}}},"required":["primary","accent","swatches"]},"created_at":{"type":"number"},"updated_at":{"type":"number"}},"required":["id","workspace_id","palette","created_at","updated_at"]}},"required":["data"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}}},"/v1/workspaces/{workspace_id}/verification-rules":{"get":{"operationId":"listVerificationRules","security":[{"bearerAuth":[]}],"tags":["portals"],"summary":"List Verification Rules","description":"List portal verification rules in evaluation order. Agreement, mandatory fee, and additional question rules stack, so every enabled matching rule applies. Other step types use the first enabled matching rule in their slot, so order decides which applies.","parameters":[{"schema":{"type":"string","minLength":1,"description":"Workspace identifier"},"required":true,"description":"Workspace identifier","name":"workspace_id","in":"path"},{"schema":{"type":"string","enum":["id_check","agreement","damage_waiver","security_deposit","mandatory_fee","guest_details","additional_questions","other_guests"]},"required":false,"name":"step_type","in":"query"},{"schema":{"type":"boolean"},"required":false,"name":"include_disabled","in":"query"}],"responses":{"200":{"description":"List Verification Rules","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"name":{"type":"string"},"enabled":{"type":"boolean"},"order":{"type":"number"},"step_type":{"type":"string","enum":["id_check","agreement","damage_waiver","security_deposit","mandatory_fee","guest_details","additional_questions","other_guests"]},"slot":{"type":"string","enum":["identity","agreement","signature","deposit","fee","guest_details","questions","other_guests"]},"exclude_returning_guests":{"type":"boolean"},"targeting":{"type":"object","properties":{"bookingChannelMode":{"type":"string","enum":["include","exclude"]},"bookingChannels":{"type":"array","items":{"type":"string"}},"sourceMode":{"type":"string","enum":["include","exclude"],"description":"Defaults to include for the listed sources"},"sources":{"type":"array","items":{"type":"string"},"description":"Exact, case-sensitive reservation.source values from the PMS"},"minNights":{"type":"number","minimum":0},"maxNights":{"type":"number","minimum":0},"bookingDate":{"type":"object","properties":{"operator":{"type":"string","enum":["lt","lte","eq","gte","gt"]},"date":{"type":"string","format":"date"},"timezone":{"type":"string","minLength":1}},"required":["operator","date","timezone"],"additionalProperties":false},"maxBookingLeadDays":{"type":"integer","minimum":0},"matchUnknownBookingLeadTime":{"type":"boolean"},"listingIds":{"type":"array","items":{"type":"string"}},"listingGroupIds":{"type":"array","items":{"type":"string","minLength":1}}},"additionalProperties":false},"config":{"anyOf":[{"type":"object","properties":{"title":{"type":"string","minLength":1},"instructions":{"type":"string","minLength":1},"requireContactPhoto":{"type":"boolean"},"autoApprove":{"type":"boolean"},"provider":{"type":"string"}},"required":["title","instructions"],"additionalProperties":false},{"type":"object","properties":{"title":{"type":"string","minLength":1},"body":{"type":"string","minLength":1}},"required":["title","body"],"additionalProperties":false},{"type":"object","properties":{"title":{"type":"string","minLength":1},"body":{"type":"string","minLength":1},"pricing":{"type":"object","properties":{"model":{"type":"string","enum":["flat","per_night"]},"amountInCents":{"type":"integer","minimum":0},"currency":{"type":"string","minLength":1},"capInCents":{"type":"integer","minimum":0},"minimumNights":{"type":"integer","minimum":0}},"required":["model","amountInCents","currency"],"additionalProperties":false}},"required":["title","body"],"additionalProperties":false},{"type":"object","properties":{"title":{"type":"string"},"pdfVersionId":{"type":"string"},"pricing":{"type":"object","properties":{"model":{"type":"string","enum":["flat","per_night"]},"amountInCents":{"type":"integer","minimum":0},"currency":{"type":"string","minLength":1},"capInCents":{"type":"integer","minimum":0},"minimumNights":{"type":"integer","minimum":0}},"required":["model","amountInCents","currency"],"additionalProperties":false}},"required":["title","pdfVersionId"]},{"type":"object","properties":{"title":{"type":"string","minLength":1},"instructions":{"type":"string","minLength":1},"amountInCents":{"type":"integer","minimum":0,"exclusiveMinimum":true},"currency":{"type":"string","minLength":1},"releaseDelayDays":{"type":"integer","minimum":0}},"required":["title","instructions","amountInCents","currency"],"additionalProperties":false},{"type":"object","properties":{"title":{"type":"string","minLength":1},"instructions":{"type":"string","minLength":1},"amountInCents":{"type":"integer","minimum":0,"exclusiveMinimum":true},"currency":{"type":"string","minLength":1}},"required":["title","instructions","amountInCents","currency"],"additionalProperties":false},{"type":"object","properties":{"title":{"type":"string","minLength":1},"description":{"type":"string"},"collectEmail":{"type":"boolean"},"collectPhone":{"type":"boolean"},"collectEta":{"type":"boolean"},"collectEtd":{"type":"boolean"},"requiredFields":{"type":"array","items":{"type":"string","enum":["full_name","email","phone","eta","etd"]}},"fields":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1},"label":{"type":"string","minLength":1},"type":{"type":"string","enum":["predefined"]},"key":{"type":"string","enum":["full_name","email","phone","eta","etd"]},"required":{"type":"boolean"},"helpText":{"type":"string"},"placeholder":{"type":"string"}},"required":["id","label","type","key","required"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","minLength":1},"label":{"type":"string","minLength":1},"type":{"type":"string","enum":["text","long_text","country","single_select","multi_select","checkbox","photo_upload","document_upload","attachment"]},"required":{"type":"boolean"},"helpText":{"type":"string"},"placeholder":{"type":"string"},"options":{"type":"array","items":{"type":"string"}},"choices":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"label":{"type":"string","minLength":1}},"required":["id","label"],"additionalProperties":false}}},"required":["id","label","type","required"],"additionalProperties":false}]},"minItems":1,"maxItems":30}},"required":["title","collectEmail","collectPhone","collectEta","collectEtd","requiredFields"],"additionalProperties":false},{"type":"object","properties":{"title":{"type":"string","minLength":1},"description":{"type":"string"},"questions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"label":{"type":"string","minLength":1},"type":{"type":"string","enum":["text","long_text","country","single_select","multi_select","checkbox","photo_upload","document_upload","attachment"]},"required":{"type":"boolean"},"helpText":{"type":"string"},"placeholder":{"type":"string"},"options":{"type":"array","items":{"type":"string"}},"choices":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"label":{"type":"string","minLength":1}},"required":["id","label"],"additionalProperties":false}}},"required":["id","label","type","required"],"additionalProperties":false},"minItems":1,"maxItems":30}},"required":["title","questions"],"additionalProperties":false},{"type":"object","properties":{"title":{"type":"string","minLength":1},"description":{"type":"string"},"minGuests":{"type":"integer","minimum":0},"maxGuests":{"type":"integer","minimum":0,"maximum":50},"fields":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"label":{"type":"string","minLength":1},"type":{"type":"string","enum":["text","email","phone","image"]},"required":{"type":"boolean"}},"required":["id","label","type","required"],"additionalProperties":false},"maxItems":20}},"required":["title"],"additionalProperties":false}]},"created_at":{"type":"number"},"updated_at":{"type":"number"}},"required":["id","workspace_id","name","enabled","order","step_type","slot","targeting","config","created_at","updated_at"]}}},"required":["data"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}},"post":{"operationId":"createVerificationRule","security":[{"bearerAuth":[]}],"tags":["portals"],"summary":"Create Verification Rule","description":"Create a portal verification rule. The rule is enabled and appended last unless the request says otherwise, and its config must match the chosen step type.","parameters":[{"schema":{"type":"string","minLength":1,"description":"Workspace identifier"},"required":true,"description":"Workspace identifier","name":"workspace_id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Operator-facing rule name"},"targeting":{"type":"object","properties":{"bookingChannelMode":{"type":"string","enum":["include","exclude"]},"bookingChannels":{"type":"array","items":{"type":"string"}},"sourceMode":{"type":"string","enum":["include","exclude"],"description":"Defaults to include for the listed sources"},"sources":{"type":"array","items":{"type":"string"},"description":"Exact, case-sensitive reservation.source values from the PMS"},"minNights":{"type":"number","minimum":0},"maxNights":{"type":"number","minimum":0},"bookingDate":{"type":"object","properties":{"operator":{"type":"string","enum":["lt","lte","eq","gte","gt"]},"date":{"type":"string","format":"date"},"timezone":{"type":"string","minLength":1}},"required":["operator","date","timezone"],"additionalProperties":false},"maxBookingLeadDays":{"type":"integer","minimum":0},"matchUnknownBookingLeadTime":{"type":"boolean"},"listingIds":{"type":"array","items":{"type":"string"}},"listingGroupIds":{"type":"array","items":{"type":"string","minLength":1}}},"additionalProperties":false,"description":"Which stays this rule applies to. Omit to target every stay."},"exclude_returning_guests":{"type":"boolean"},"enabled":{"type":"boolean","description":"Defaults to true. Disabled rules never apply."},"step_type":{"type":"string","enum":["id_check","agreement","damage_waiver","security_deposit","mandatory_fee","guest_details","additional_questions","other_guests"]},"config":{"type":"object","additionalProperties":{"nullable":true},"description":"Shape depends on step_type. id_check: {title, instructions, requireContactPhoto?, autoApprove?}. agreement: {title, body}. damage_waiver: {title, body, pricing?}. security_deposit: {title, instructions, amountInCents, currency, releaseDelayDays?}. mandatory_fee: {title, instructions, amountInCents, currency}. guest_details: {title, description?, collectEmail, collectPhone, collectEta, collectEtd, requiredFields, fields?}. additional_questions: {title, description?, questions}. other_guests: {title, description?, minGuests?, maxGuests?, fields?}."}},"required":["name","step_type","config"]}}}},"responses":{"201":{"description":"Create Verification Rule","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"name":{"type":"string"},"enabled":{"type":"boolean"},"order":{"type":"number"},"step_type":{"type":"string","enum":["id_check","agreement","damage_waiver","security_deposit","mandatory_fee","guest_details","additional_questions","other_guests"]},"slot":{"type":"string","enum":["identity","agreement","signature","deposit","fee","guest_details","questions","other_guests"]},"exclude_returning_guests":{"type":"boolean"},"targeting":{"type":"object","properties":{"bookingChannelMode":{"type":"string","enum":["include","exclude"]},"bookingChannels":{"type":"array","items":{"type":"string"}},"sourceMode":{"type":"string","enum":["include","exclude"],"description":"Defaults to include for the listed sources"},"sources":{"type":"array","items":{"type":"string"},"description":"Exact, case-sensitive reservation.source values from the PMS"},"minNights":{"type":"number","minimum":0},"maxNights":{"type":"number","minimum":0},"bookingDate":{"type":"object","properties":{"operator":{"type":"string","enum":["lt","lte","eq","gte","gt"]},"date":{"type":"string","format":"date"},"timezone":{"type":"string","minLength":1}},"required":["operator","date","timezone"],"additionalProperties":false},"maxBookingLeadDays":{"type":"integer","minimum":0},"matchUnknownBookingLeadTime":{"type":"boolean"},"listingIds":{"type":"array","items":{"type":"string"}},"listingGroupIds":{"type":"array","items":{"type":"string","minLength":1}}},"additionalProperties":false},"config":{"anyOf":[{"type":"object","properties":{"title":{"type":"string","minLength":1},"instructions":{"type":"string","minLength":1},"requireContactPhoto":{"type":"boolean"},"autoApprove":{"type":"boolean"},"provider":{"type":"string"}},"required":["title","instructions"],"additionalProperties":false},{"type":"object","properties":{"title":{"type":"string","minLength":1},"body":{"type":"string","minLength":1}},"required":["title","body"],"additionalProperties":false},{"type":"object","properties":{"title":{"type":"string","minLength":1},"body":{"type":"string","minLength":1},"pricing":{"type":"object","properties":{"model":{"type":"string","enum":["flat","per_night"]},"amountInCents":{"type":"integer","minimum":0},"currency":{"type":"string","minLength":1},"capInCents":{"type":"integer","minimum":0},"minimumNights":{"type":"integer","minimum":0}},"required":["model","amountInCents","currency"],"additionalProperties":false}},"required":["title","body"],"additionalProperties":false},{"type":"object","properties":{"title":{"type":"string"},"pdfVersionId":{"type":"string"},"pricing":{"type":"object","properties":{"model":{"type":"string","enum":["flat","per_night"]},"amountInCents":{"type":"integer","minimum":0},"currency":{"type":"string","minLength":1},"capInCents":{"type":"integer","minimum":0},"minimumNights":{"type":"integer","minimum":0}},"required":["model","amountInCents","currency"],"additionalProperties":false}},"required":["title","pdfVersionId"]},{"type":"object","properties":{"title":{"type":"string","minLength":1},"instructions":{"type":"string","minLength":1},"amountInCents":{"type":"integer","minimum":0,"exclusiveMinimum":true},"currency":{"type":"string","minLength":1},"releaseDelayDays":{"type":"integer","minimum":0}},"required":["title","instructions","amountInCents","currency"],"additionalProperties":false},{"type":"object","properties":{"title":{"type":"string","minLength":1},"instructions":{"type":"string","minLength":1},"amountInCents":{"type":"integer","minimum":0,"exclusiveMinimum":true},"currency":{"type":"string","minLength":1}},"required":["title","instructions","amountInCents","currency"],"additionalProperties":false},{"type":"object","properties":{"title":{"type":"string","minLength":1},"description":{"type":"string"},"collectEmail":{"type":"boolean"},"collectPhone":{"type":"boolean"},"collectEta":{"type":"boolean"},"collectEtd":{"type":"boolean"},"requiredFields":{"type":"array","items":{"type":"string","enum":["full_name","email","phone","eta","etd"]}},"fields":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1},"label":{"type":"string","minLength":1},"type":{"type":"string","enum":["predefined"]},"key":{"type":"string","enum":["full_name","email","phone","eta","etd"]},"required":{"type":"boolean"},"helpText":{"type":"string"},"placeholder":{"type":"string"}},"required":["id","label","type","key","required"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","minLength":1},"label":{"type":"string","minLength":1},"type":{"type":"string","enum":["text","long_text","country","single_select","multi_select","checkbox","photo_upload","document_upload","attachment"]},"required":{"type":"boolean"},"helpText":{"type":"string"},"placeholder":{"type":"string"},"options":{"type":"array","items":{"type":"string"}},"choices":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"label":{"type":"string","minLength":1}},"required":["id","label"],"additionalProperties":false}}},"required":["id","label","type","required"],"additionalProperties":false}]},"minItems":1,"maxItems":30}},"required":["title","collectEmail","collectPhone","collectEta","collectEtd","requiredFields"],"additionalProperties":false},{"type":"object","properties":{"title":{"type":"string","minLength":1},"description":{"type":"string"},"questions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"label":{"type":"string","minLength":1},"type":{"type":"string","enum":["text","long_text","country","single_select","multi_select","checkbox","photo_upload","document_upload","attachment"]},"required":{"type":"boolean"},"helpText":{"type":"string"},"placeholder":{"type":"string"},"options":{"type":"array","items":{"type":"string"}},"choices":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"label":{"type":"string","minLength":1}},"required":["id","label"],"additionalProperties":false}}},"required":["id","label","type","required"],"additionalProperties":false},"minItems":1,"maxItems":30}},"required":["title","questions"],"additionalProperties":false},{"type":"object","properties":{"title":{"type":"string","minLength":1},"description":{"type":"string"},"minGuests":{"type":"integer","minimum":0},"maxGuests":{"type":"integer","minimum":0,"maximum":50},"fields":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"label":{"type":"string","minLength":1},"type":{"type":"string","enum":["text","email","phone","image"]},"required":{"type":"boolean"}},"required":["id","label","type","required"],"additionalProperties":false},"maxItems":20}},"required":["title"],"additionalProperties":false}]},"created_at":{"type":"number"},"updated_at":{"type":"number"}},"required":["id","workspace_id","name","enabled","order","step_type","slot","targeting","config","created_at","updated_at"]}},"required":["data"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}}},"/v1/workspaces/{workspace_id}/verification-rules/{id}":{"get":{"operationId":"getVerificationRule","security":[{"bearerAuth":[]}],"tags":["portals"],"summary":"Get Verification Rule","description":"Read one portal verification rule and its full config.","parameters":[{"schema":{"type":"string","minLength":1,"description":"Workspace identifier"},"required":true,"description":"Workspace identifier","name":"workspace_id","in":"path"},{"schema":{"type":"string","minLength":1,"description":"Verification rule identifier"},"required":true,"description":"Verification rule identifier","name":"id","in":"path"}],"responses":{"200":{"description":"Get Verification Rule","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"name":{"type":"string"},"enabled":{"type":"boolean"},"order":{"type":"number"},"step_type":{"type":"string","enum":["id_check","agreement","damage_waiver","security_deposit","mandatory_fee","guest_details","additional_questions","other_guests"]},"slot":{"type":"string","enum":["identity","agreement","signature","deposit","fee","guest_details","questions","other_guests"]},"exclude_returning_guests":{"type":"boolean"},"targeting":{"type":"object","properties":{"bookingChannelMode":{"type":"string","enum":["include","exclude"]},"bookingChannels":{"type":"array","items":{"type":"string"}},"sourceMode":{"type":"string","enum":["include","exclude"],"description":"Defaults to include for the listed sources"},"sources":{"type":"array","items":{"type":"string"},"description":"Exact, case-sensitive reservation.source values from the PMS"},"minNights":{"type":"number","minimum":0},"maxNights":{"type":"number","minimum":0},"bookingDate":{"type":"object","properties":{"operator":{"type":"string","enum":["lt","lte","eq","gte","gt"]},"date":{"type":"string","format":"date"},"timezone":{"type":"string","minLength":1}},"required":["operator","date","timezone"],"additionalProperties":false},"maxBookingLeadDays":{"type":"integer","minimum":0},"matchUnknownBookingLeadTime":{"type":"boolean"},"listingIds":{"type":"array","items":{"type":"string"}},"listingGroupIds":{"type":"array","items":{"type":"string","minLength":1}}},"additionalProperties":false},"config":{"anyOf":[{"type":"object","properties":{"title":{"type":"string","minLength":1},"instructions":{"type":"string","minLength":1},"requireContactPhoto":{"type":"boolean"},"autoApprove":{"type":"boolean"},"provider":{"type":"string"}},"required":["title","instructions"],"additionalProperties":false},{"type":"object","properties":{"title":{"type":"string","minLength":1},"body":{"type":"string","minLength":1}},"required":["title","body"],"additionalProperties":false},{"type":"object","properties":{"title":{"type":"string","minLength":1},"body":{"type":"string","minLength":1},"pricing":{"type":"object","properties":{"model":{"type":"string","enum":["flat","per_night"]},"amountInCents":{"type":"integer","minimum":0},"currency":{"type":"string","minLength":1},"capInCents":{"type":"integer","minimum":0},"minimumNights":{"type":"integer","minimum":0}},"required":["model","amountInCents","currency"],"additionalProperties":false}},"required":["title","body"],"additionalProperties":false},{"type":"object","properties":{"title":{"type":"string"},"pdfVersionId":{"type":"string"},"pricing":{"type":"object","properties":{"model":{"type":"string","enum":["flat","per_night"]},"amountInCents":{"type":"integer","minimum":0},"currency":{"type":"string","minLength":1},"capInCents":{"type":"integer","minimum":0},"minimumNights":{"type":"integer","minimum":0}},"required":["model","amountInCents","currency"],"additionalProperties":false}},"required":["title","pdfVersionId"]},{"type":"object","properties":{"title":{"type":"string","minLength":1},"instructions":{"type":"string","minLength":1},"amountInCents":{"type":"integer","minimum":0,"exclusiveMinimum":true},"currency":{"type":"string","minLength":1},"releaseDelayDays":{"type":"integer","minimum":0}},"required":["title","instructions","amountInCents","currency"],"additionalProperties":false},{"type":"object","properties":{"title":{"type":"string","minLength":1},"instructions":{"type":"string","minLength":1},"amountInCents":{"type":"integer","minimum":0,"exclusiveMinimum":true},"currency":{"type":"string","minLength":1}},"required":["title","instructions","amountInCents","currency"],"additionalProperties":false},{"type":"object","properties":{"title":{"type":"string","minLength":1},"description":{"type":"string"},"collectEmail":{"type":"boolean"},"collectPhone":{"type":"boolean"},"collectEta":{"type":"boolean"},"collectEtd":{"type":"boolean"},"requiredFields":{"type":"array","items":{"type":"string","enum":["full_name","email","phone","eta","etd"]}},"fields":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1},"label":{"type":"string","minLength":1},"type":{"type":"string","enum":["predefined"]},"key":{"type":"string","enum":["full_name","email","phone","eta","etd"]},"required":{"type":"boolean"},"helpText":{"type":"string"},"placeholder":{"type":"string"}},"required":["id","label","type","key","required"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","minLength":1},"label":{"type":"string","minLength":1},"type":{"type":"string","enum":["text","long_text","country","single_select","multi_select","checkbox","photo_upload","document_upload","attachment"]},"required":{"type":"boolean"},"helpText":{"type":"string"},"placeholder":{"type":"string"},"options":{"type":"array","items":{"type":"string"}},"choices":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"label":{"type":"string","minLength":1}},"required":["id","label"],"additionalProperties":false}}},"required":["id","label","type","required"],"additionalProperties":false}]},"minItems":1,"maxItems":30}},"required":["title","collectEmail","collectPhone","collectEta","collectEtd","requiredFields"],"additionalProperties":false},{"type":"object","properties":{"title":{"type":"string","minLength":1},"description":{"type":"string"},"questions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"label":{"type":"string","minLength":1},"type":{"type":"string","enum":["text","long_text","country","single_select","multi_select","checkbox","photo_upload","document_upload","attachment"]},"required":{"type":"boolean"},"helpText":{"type":"string"},"placeholder":{"type":"string"},"options":{"type":"array","items":{"type":"string"}},"choices":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"label":{"type":"string","minLength":1}},"required":["id","label"],"additionalProperties":false}}},"required":["id","label","type","required"],"additionalProperties":false},"minItems":1,"maxItems":30}},"required":["title","questions"],"additionalProperties":false},{"type":"object","properties":{"title":{"type":"string","minLength":1},"description":{"type":"string"},"minGuests":{"type":"integer","minimum":0},"maxGuests":{"type":"integer","minimum":0,"maximum":50},"fields":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"label":{"type":"string","minLength":1},"type":{"type":"string","enum":["text","email","phone","image"]},"required":{"type":"boolean"}},"required":["id","label","type","required"],"additionalProperties":false},"maxItems":20}},"required":["title"],"additionalProperties":false}]},"created_at":{"type":"number"},"updated_at":{"type":"number"}},"required":["id","workspace_id","name","enabled","order","step_type","slot","targeting","config","created_at","updated_at"]}},"required":["data"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}},"patch":{"operationId":"patchVerificationRule","security":[{"bearerAuth":[]}],"tags":["portals"],"summary":"Update Verification Rule","description":"Update a portal verification rule. The step type cannot change, so a supplied config must match the type the rule already has.","parameters":[{"schema":{"type":"string","minLength":1,"description":"Workspace identifier"},"required":true,"description":"Workspace identifier","name":"workspace_id","in":"path"},{"schema":{"type":"string","minLength":1,"description":"Verification rule identifier"},"required":true,"description":"Verification rule identifier","name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"expected_updated_at":{"type":"number","minimum":0},"name":{"type":"string","minLength":1},"enabled":{"type":"boolean"},"config":{"type":"object","additionalProperties":{"nullable":true},"description":"Must match the rule's existing step type."},"targeting":{"type":"object","properties":{"bookingChannelMode":{"type":"string","enum":["include","exclude"]},"bookingChannels":{"type":"array","items":{"type":"string"}},"sourceMode":{"type":"string","enum":["include","exclude"],"description":"Defaults to include for the listed sources"},"sources":{"type":"array","items":{"type":"string"},"description":"Exact, case-sensitive reservation.source values from the PMS"},"minNights":{"type":"number","minimum":0},"maxNights":{"type":"number","minimum":0},"bookingDate":{"type":"object","properties":{"operator":{"type":"string","enum":["lt","lte","eq","gte","gt"]},"date":{"type":"string","format":"date"},"timezone":{"type":"string","minLength":1}},"required":["operator","date","timezone"],"additionalProperties":false},"maxBookingLeadDays":{"type":"integer","minimum":0},"matchUnknownBookingLeadTime":{"type":"boolean"},"listingIds":{"type":"array","items":{"type":"string"}},"listingGroupIds":{"type":"array","items":{"type":"string","minLength":1}}},"additionalProperties":false},"exclude_returning_guests":{"type":"boolean"}},"required":["expected_updated_at"]}}}},"responses":{"200":{"description":"Update Verification Rule","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"name":{"type":"string"},"enabled":{"type":"boolean"},"order":{"type":"number"},"step_type":{"type":"string","enum":["id_check","agreement","damage_waiver","security_deposit","mandatory_fee","guest_details","additional_questions","other_guests"]},"slot":{"type":"string","enum":["identity","agreement","signature","deposit","fee","guest_details","questions","other_guests"]},"exclude_returning_guests":{"type":"boolean"},"targeting":{"type":"object","properties":{"bookingChannelMode":{"type":"string","enum":["include","exclude"]},"bookingChannels":{"type":"array","items":{"type":"string"}},"sourceMode":{"type":"string","enum":["include","exclude"],"description":"Defaults to include for the listed sources"},"sources":{"type":"array","items":{"type":"string"},"description":"Exact, case-sensitive reservation.source values from the PMS"},"minNights":{"type":"number","minimum":0},"maxNights":{"type":"number","minimum":0},"bookingDate":{"type":"object","properties":{"operator":{"type":"string","enum":["lt","lte","eq","gte","gt"]},"date":{"type":"string","format":"date"},"timezone":{"type":"string","minLength":1}},"required":["operator","date","timezone"],"additionalProperties":false},"maxBookingLeadDays":{"type":"integer","minimum":0},"matchUnknownBookingLeadTime":{"type":"boolean"},"listingIds":{"type":"array","items":{"type":"string"}},"listingGroupIds":{"type":"array","items":{"type":"string","minLength":1}}},"additionalProperties":false},"config":{"anyOf":[{"type":"object","properties":{"title":{"type":"string","minLength":1},"instructions":{"type":"string","minLength":1},"requireContactPhoto":{"type":"boolean"},"autoApprove":{"type":"boolean"},"provider":{"type":"string"}},"required":["title","instructions"],"additionalProperties":false},{"type":"object","properties":{"title":{"type":"string","minLength":1},"body":{"type":"string","minLength":1}},"required":["title","body"],"additionalProperties":false},{"type":"object","properties":{"title":{"type":"string","minLength":1},"body":{"type":"string","minLength":1},"pricing":{"type":"object","properties":{"model":{"type":"string","enum":["flat","per_night"]},"amountInCents":{"type":"integer","minimum":0},"currency":{"type":"string","minLength":1},"capInCents":{"type":"integer","minimum":0},"minimumNights":{"type":"integer","minimum":0}},"required":["model","amountInCents","currency"],"additionalProperties":false}},"required":["title","body"],"additionalProperties":false},{"type":"object","properties":{"title":{"type":"string"},"pdfVersionId":{"type":"string"},"pricing":{"type":"object","properties":{"model":{"type":"string","enum":["flat","per_night"]},"amountInCents":{"type":"integer","minimum":0},"currency":{"type":"string","minLength":1},"capInCents":{"type":"integer","minimum":0},"minimumNights":{"type":"integer","minimum":0}},"required":["model","amountInCents","currency"],"additionalProperties":false}},"required":["title","pdfVersionId"]},{"type":"object","properties":{"title":{"type":"string","minLength":1},"instructions":{"type":"string","minLength":1},"amountInCents":{"type":"integer","minimum":0,"exclusiveMinimum":true},"currency":{"type":"string","minLength":1},"releaseDelayDays":{"type":"integer","minimum":0}},"required":["title","instructions","amountInCents","currency"],"additionalProperties":false},{"type":"object","properties":{"title":{"type":"string","minLength":1},"instructions":{"type":"string","minLength":1},"amountInCents":{"type":"integer","minimum":0,"exclusiveMinimum":true},"currency":{"type":"string","minLength":1}},"required":["title","instructions","amountInCents","currency"],"additionalProperties":false},{"type":"object","properties":{"title":{"type":"string","minLength":1},"description":{"type":"string"},"collectEmail":{"type":"boolean"},"collectPhone":{"type":"boolean"},"collectEta":{"type":"boolean"},"collectEtd":{"type":"boolean"},"requiredFields":{"type":"array","items":{"type":"string","enum":["full_name","email","phone","eta","etd"]}},"fields":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1},"label":{"type":"string","minLength":1},"type":{"type":"string","enum":["predefined"]},"key":{"type":"string","enum":["full_name","email","phone","eta","etd"]},"required":{"type":"boolean"},"helpText":{"type":"string"},"placeholder":{"type":"string"}},"required":["id","label","type","key","required"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","minLength":1},"label":{"type":"string","minLength":1},"type":{"type":"string","enum":["text","long_text","country","single_select","multi_select","checkbox","photo_upload","document_upload","attachment"]},"required":{"type":"boolean"},"helpText":{"type":"string"},"placeholder":{"type":"string"},"options":{"type":"array","items":{"type":"string"}},"choices":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"label":{"type":"string","minLength":1}},"required":["id","label"],"additionalProperties":false}}},"required":["id","label","type","required"],"additionalProperties":false}]},"minItems":1,"maxItems":30}},"required":["title","collectEmail","collectPhone","collectEta","collectEtd","requiredFields"],"additionalProperties":false},{"type":"object","properties":{"title":{"type":"string","minLength":1},"description":{"type":"string"},"questions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"label":{"type":"string","minLength":1},"type":{"type":"string","enum":["text","long_text","country","single_select","multi_select","checkbox","photo_upload","document_upload","attachment"]},"required":{"type":"boolean"},"helpText":{"type":"string"},"placeholder":{"type":"string"},"options":{"type":"array","items":{"type":"string"}},"choices":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"label":{"type":"string","minLength":1}},"required":["id","label"],"additionalProperties":false}}},"required":["id","label","type","required"],"additionalProperties":false},"minItems":1,"maxItems":30}},"required":["title","questions"],"additionalProperties":false},{"type":"object","properties":{"title":{"type":"string","minLength":1},"description":{"type":"string"},"minGuests":{"type":"integer","minimum":0},"maxGuests":{"type":"integer","minimum":0,"maximum":50},"fields":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"label":{"type":"string","minLength":1},"type":{"type":"string","enum":["text","email","phone","image"]},"required":{"type":"boolean"}},"required":["id","label","type","required"],"additionalProperties":false},"maxItems":20}},"required":["title"],"additionalProperties":false}]},"created_at":{"type":"number"},"updated_at":{"type":"number"}},"required":["id","workspace_id","name","enabled","order","step_type","slot","targeting","config","created_at","updated_at"]}},"required":["data"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}},"delete":{"operationId":"deleteVerificationRule","security":[{"bearerAuth":[]}],"tags":["portals"],"summary":"Delete Verification Rule","description":"Permanently delete a portal verification rule. Stays already collecting this step keep what they have gathered; new stays stop being asked.","parameters":[{"schema":{"type":"string","minLength":1,"description":"Workspace identifier"},"required":true,"description":"Workspace identifier","name":"workspace_id","in":"path"},{"schema":{"type":"string","minLength":1,"description":"Verification rule identifier"},"required":true,"description":"Verification rule identifier","name":"id","in":"path"},{"schema":{"type":"number","minimum":0},"required":true,"name":"expected_updated_at","in":"query"}],"responses":{"200":{"description":"Delete Verification Rule","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}},"required":["data"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}}},"/v1/workspaces/{workspace_id}/verification-rules/reorder":{"post":{"operationId":"reorderVerificationRules","security":[{"bearerAuth":[]}],"tags":["portals"],"summary":"Reorder Verification Rules","description":"Set the evaluation order for every verification rule in the workspace. Include every rule exactly once. Stacking steps (agreements, mandatory fees, question sets) are kept in this order within their step type; for other step types the first enabled matching rule claims its slot.","parameters":[{"schema":{"type":"string","minLength":1,"description":"Workspace identifier"},"required":true,"description":"Workspace identifier","name":"workspace_id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Verification rule identifier"},"expected_updated_at":{"type":"number","minimum":0}},"required":["id","expected_updated_at"]},"minItems":1,"description":"Every rule in the workspace, in the requested order"}},"required":["items"]}}}},"responses":{"200":{"description":"Reorder Verification Rules","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspace_id":{"type":"string"},"name":{"type":"string"},"enabled":{"type":"boolean"},"order":{"type":"number"},"step_type":{"type":"string","enum":["id_check","agreement","damage_waiver","security_deposit","mandatory_fee","guest_details","additional_questions","other_guests"]},"slot":{"type":"string","enum":["identity","agreement","signature","deposit","fee","guest_details","questions","other_guests"]},"exclude_returning_guests":{"type":"boolean"},"targeting":{"type":"object","properties":{"bookingChannelMode":{"type":"string","enum":["include","exclude"]},"bookingChannels":{"type":"array","items":{"type":"string"}},"sourceMode":{"type":"string","enum":["include","exclude"],"description":"Defaults to include for the listed sources"},"sources":{"type":"array","items":{"type":"string"},"description":"Exact, case-sensitive reservation.source values from the PMS"},"minNights":{"type":"number","minimum":0},"maxNights":{"type":"number","minimum":0},"bookingDate":{"type":"object","properties":{"operator":{"type":"string","enum":["lt","lte","eq","gte","gt"]},"date":{"type":"string","format":"date"},"timezone":{"type":"string","minLength":1}},"required":["operator","date","timezone"],"additionalProperties":false},"maxBookingLeadDays":{"type":"integer","minimum":0},"matchUnknownBookingLeadTime":{"type":"boolean"},"listingIds":{"type":"array","items":{"type":"string"}},"listingGroupIds":{"type":"array","items":{"type":"string","minLength":1}}},"additionalProperties":false},"config":{"anyOf":[{"type":"object","properties":{"title":{"type":"string","minLength":1},"instructions":{"type":"string","minLength":1},"requireContactPhoto":{"type":"boolean"},"autoApprove":{"type":"boolean"},"provider":{"type":"string"}},"required":["title","instructions"],"additionalProperties":false},{"type":"object","properties":{"title":{"type":"string","minLength":1},"body":{"type":"string","minLength":1}},"required":["title","body"],"additionalProperties":false},{"type":"object","properties":{"title":{"type":"string","minLength":1},"body":{"type":"string","minLength":1},"pricing":{"type":"object","properties":{"model":{"type":"string","enum":["flat","per_night"]},"amountInCents":{"type":"integer","minimum":0},"currency":{"type":"string","minLength":1},"capInCents":{"type":"integer","minimum":0},"minimumNights":{"type":"integer","minimum":0}},"required":["model","amountInCents","currency"],"additionalProperties":false}},"required":["title","body"],"additionalProperties":false},{"type":"object","properties":{"title":{"type":"string"},"pdfVersionId":{"type":"string"},"pricing":{"type":"object","properties":{"model":{"type":"string","enum":["flat","per_night"]},"amountInCents":{"type":"integer","minimum":0},"currency":{"type":"string","minLength":1},"capInCents":{"type":"integer","minimum":0},"minimumNights":{"type":"integer","minimum":0}},"required":["model","amountInCents","currency"],"additionalProperties":false}},"required":["title","pdfVersionId"]},{"type":"object","properties":{"title":{"type":"string","minLength":1},"instructions":{"type":"string","minLength":1},"amountInCents":{"type":"integer","minimum":0,"exclusiveMinimum":true},"currency":{"type":"string","minLength":1},"releaseDelayDays":{"type":"integer","minimum":0}},"required":["title","instructions","amountInCents","currency"],"additionalProperties":false},{"type":"object","properties":{"title":{"type":"string","minLength":1},"instructions":{"type":"string","minLength":1},"amountInCents":{"type":"integer","minimum":0,"exclusiveMinimum":true},"currency":{"type":"string","minLength":1}},"required":["title","instructions","amountInCents","currency"],"additionalProperties":false},{"type":"object","properties":{"title":{"type":"string","minLength":1},"description":{"type":"string"},"collectEmail":{"type":"boolean"},"collectPhone":{"type":"boolean"},"collectEta":{"type":"boolean"},"collectEtd":{"type":"boolean"},"requiredFields":{"type":"array","items":{"type":"string","enum":["full_name","email","phone","eta","etd"]}},"fields":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1},"label":{"type":"string","minLength":1},"type":{"type":"string","enum":["predefined"]},"key":{"type":"string","enum":["full_name","email","phone","eta","etd"]},"required":{"type":"boolean"},"helpText":{"type":"string"},"placeholder":{"type":"string"}},"required":["id","label","type","key","required"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","minLength":1},"label":{"type":"string","minLength":1},"type":{"type":"string","enum":["text","long_text","country","single_select","multi_select","checkbox","photo_upload","document_upload","attachment"]},"required":{"type":"boolean"},"helpText":{"type":"string"},"placeholder":{"type":"string"},"options":{"type":"array","items":{"type":"string"}},"choices":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"label":{"type":"string","minLength":1}},"required":["id","label"],"additionalProperties":false}}},"required":["id","label","type","required"],"additionalProperties":false}]},"minItems":1,"maxItems":30}},"required":["title","collectEmail","collectPhone","collectEta","collectEtd","requiredFields"],"additionalProperties":false},{"type":"object","properties":{"title":{"type":"string","minLength":1},"description":{"type":"string"},"questions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"label":{"type":"string","minLength":1},"type":{"type":"string","enum":["text","long_text","country","single_select","multi_select","checkbox","photo_upload","document_upload","attachment"]},"required":{"type":"boolean"},"helpText":{"type":"string"},"placeholder":{"type":"string"},"options":{"type":"array","items":{"type":"string"}},"choices":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"label":{"type":"string","minLength":1}},"required":["id","label"],"additionalProperties":false}}},"required":["id","label","type","required"],"additionalProperties":false},"minItems":1,"maxItems":30}},"required":["title","questions"],"additionalProperties":false},{"type":"object","properties":{"title":{"type":"string","minLength":1},"description":{"type":"string"},"minGuests":{"type":"integer","minimum":0},"maxGuests":{"type":"integer","minimum":0,"maximum":50},"fields":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"label":{"type":"string","minLength":1},"type":{"type":"string","enum":["text","email","phone","image"]},"required":{"type":"boolean"}},"required":["id","label","type","required"],"additionalProperties":false},"maxItems":20}},"required":["title"],"additionalProperties":false}]},"created_at":{"type":"number"},"updated_at":{"type":"number"}},"required":["id","workspace_id","name","enabled","order","step_type","slot","targeting","config","created_at","updated_at"]}}},"required":["data"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}}},"/v1/billing/usage":{"get":{"operationId":"getBillingUsage","security":[{"bearerAuth":[]}],"tags":["billing"],"summary":"Get Billing Usage","description":"Get the current plan, credit balance, billing-cycle usage by product, Salesbricks aggregate usage, and bonus-credit history shown on a workspace billing page.","parameters":[{"schema":{"type":"string","description":"Workspace identifier from `list_workspaces`"},"required":true,"description":"Workspace identifier from `list_workspaces`","name":"workspace_id","in":"query"}],"responses":{"200":{"description":"Get Billing Usage","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"workspace_id":{"type":"string"},"billing_provider":{"type":"string","enum":["salesbricks","stripe","none"]},"plan":{"type":"object","properties":{"tier":{"type":"string"},"name":{"type":"string"},"max_credits":{"type":"number"},"remaining_credits":{"type":"number"},"credits_used":{"type":"number"},"is_overage":{"type":"boolean"},"can_upgrade":{"type":"boolean"},"next_tier":{"type":"string","nullable":true},"auto_scale_usage_tier":{"type":"boolean","nullable":true},"monthly_price":{"type":"number","nullable":true},"price_per_credit":{"type":"number","nullable":true}},"required":["tier","name","max_credits","remaining_credits","credits_used","is_overage","can_upgrade","next_tier","auto_scale_usage_tier","monthly_price","price_per_credit"]},"billing_cycle":{"type":"object","properties":{"started_at":{"type":"number","nullable":true},"ends_at":{"type":"number","nullable":true},"covered_by_bonus":{"type":"number"},"buckets_ready":{"type":"boolean"}},"required":["started_at","ends_at","covered_by_bonus","buckets_ready"]},"usage_by_product":{"type":"object","properties":{"workflows":{"type":"number"},"agent_runs":{"type":"number"},"operator_sidebar":{"type":"number"},"voice_ai":{"type":"number"},"internal_agents":{"type":"number"}},"required":["workflows","agent_runs","operator_sidebar","voice_ai","internal_agents"]},"bonus_credits":{"type":"object","nullable":true,"properties":{"granted":{"type":"number"},"used_total":{"type":"number"},"remaining":{"type":"number"},"expires_on":{"type":"number","nullable":true},"source":{"type":"string","nullable":true},"granted_on":{"type":"number","nullable":true},"history":{"type":"array","items":{"type":"object","properties":{"grant_id":{"type":"string"},"granted_at":{"type":"number"},"source":{"type":"string"},"amount":{"type":"number"},"remaining":{"type":"number"},"status":{"type":"string","enum":["active","depleted","expired","revoked"]}},"required":["grant_id","granted_at","source","amount","remaining","status"]}}},"required":["granted","used_total","remaining","expires_on","source","granted_on","history"]},"salesbricks":{"type":"object","nullable":true,"properties":{"order_id":{"type":"string"},"total_usage":{"type":"number"},"total_surplus":{"type":"number"},"workspace_usage":{"type":"number"},"workspace_surplus":{"type":"number"},"listing_stats":{"type":"object","nullable":true,"properties":{"total_listings":{"type":"number"},"workspace_listings":{"type":"number"},"other_workspaces_listings":{"type":"number"}},"required":["total_listings","workspace_listings","other_workspaces_listings"]}},"required":["order_id","total_usage","total_surplus","workspace_usage","workspace_surplus","listing_stats"]}},"required":["workspace_id","billing_provider","plan","billing_cycle","usage_by_product","bonus_credits","salesbricks"]}},"required":["data"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"Standard error response.","example":{"error":"Invalid workspace id"}}}}}}}}}}